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

Add wasm32-wasi support with tests #677

Merged
merged 3 commits into from
May 28, 2023
Merged

Commits on May 27, 2023

  1. Add wasm32-wasi support with tests

    @sunfishcode added `wasm32-wasi` support in uuid-rs#477, but somewhere along the way it appears to have
    been broken or dropped. Thankfully, the reason for the breakage doesn't appear too deep: the
    `wasm-bindgen` support was enabled for all `wasm32` architectures, rather than just the
    `wasm32-unknown-unknown` target triple that [`wasm-bindgen`
    supports](https://rustwasm.github.io/wasm-bindgen/reference/rust-targets.html).
    
    This PR fixes the `cfg` expressions for `wasm-bindgen`-specific code so that they no longer catch
    `wasm32-wasi`, and now `wasm32-wasi` just works 🎉
    
    To guard against future breakage, I added some `wasm32-wasi` testing infrastructure. A new CI
    target modeled on the `wasm-bindgen` target tests the `wasm32-wasi` implementation against
    `wasmtime`. Since test runners can't be specified at the command line, this requires a
    `.cargo/config` addition as well.
    
    I also noticed and fixed a typo in the existing `wasm-bindgen` CI target that I believe has been
    causing the tests to not run with any of the version features enabled.
    acfoltzer committed May 27, 2023
    Configuration menu
    Copy the full SHA
    f2ca3d4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f74e05e View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    403f845 View commit details
    Browse the repository at this point in the history