Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial WebAssembly support. #175

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from

Commits on Feb 24, 2023

  1. Configuration menu
    Copy the full SHA
    8f0a9d3 View commit details
    Browse the repository at this point in the history

Commits on Feb 25, 2023

  1. 1 Configuration menu
    Copy the full SHA
    8883f64 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c888196 View commit details
    Browse the repository at this point in the history
  3. WebAssembly: Use unix locks when threads enabled.

    When compiling with `-s USE_PTHREADS` in emscripten, Posix threads
    and locks are available (assuming the WebAssembly VM supports this
    extension).
    
    This can be detected at compile time by checking for the preprocessor
    definition `__EMSCRIPTEN_PTHREADS__`.
    
    In the absence of this definition, we request a single threaded
    configuration which falls back to the implementation in `lockan.c`.
    
    This works when building `mps.c`, but does not work when
    using the older Makefile-based build system as when building
    `lockix.c` as a standalone file, `mpstd.h` is not included prior
    to the relevant portion of `config.h` being processed.
    waywardmonkeys committed Feb 25, 2023
    Configuration menu
    Copy the full SHA
    3e4f95c View commit details
    Browse the repository at this point in the history

Commits on Feb 26, 2023

  1. Initial take on CI for emscripten.

    This uses GitHub actions and installs the Emscripten SDK's
    latest version and activates it. At some point, this should
    probably change to a fixed version that is periodically
    incremented once some baseline support level is determined.
    
    This is just compiling and running what's needed for `amsss`
    for now until other pieces are in place for building and
    running more of everything.
    waywardmonkeys committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    1a2c28c View commit details
    Browse the repository at this point in the history
  2. WebAssembly: Initial support for make-based build.

    This fails still due to threaded tests being built and that
    failing.
    waywardmonkeys committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    34d59e4 View commit details
    Browse the repository at this point in the history
  3. testthr.h: Follow the pthreads path for emscripten.

    Note that this is only valid as noted in a fixme comment when
    threads are enabled in emscripten (which is not the default).
    waywardmonkeys committed Feb 26, 2023
    Configuration menu
    Copy the full SHA
    537848b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    c2fed67 View commit details
    Browse the repository at this point in the history

Commits on Feb 27, 2023

  1. WebAssembly: Initial support will be single-threaded.

    WebAssembly doesn't support `mprotect()` or signals. This will
    make it hard to support multithreaded or incremental collection
    for now.
    waywardmonkeys committed Feb 27, 2023
    Configuration menu
    Copy the full SHA
    5dadc7c View commit details
    Browse the repository at this point in the history