Run tests on wasm32 architecture#269
Merged
jan-ferdinand merged 4 commits intomasterfrom Jan 15, 2026
Merged
Conversation
da64453 to
b5941b2
Compare
This comment was marked as off-topic.
This comment was marked as off-topic.
491305c to
c49c49e
Compare
ab40f85 to
069656c
Compare
069656c to
174f7b0
Compare
Add the necessary `Cargo.toml` magic for `cargo test` to build `#[test]` and `#[proptest]` tests correctly. However the wasm test harness ignores `#[test]` and `#[proptest]`, so tests are not actually run on wasm targets when running `cargo test`. Instead, use the `#[wasm_bindgen_test]` annotation to enable tests on wasm targets. Also enables compilation on 32-bit architectures by correcting the NTT's `NUM_DOMAINS` to 29 on 32-bit systems. It remains unchanged at 32 on 64 bit systems.
The crate is unmaintained and, for the purpose of testing on wasm32, unusable. Because 1. the code has seen very little activity since its inception, 2. there are only a little more than 100 lines of code, and 3. it has worked perfectly well for all our needs so far, I think the risks associated with inlining are acceptable.
174f7b0 to
f4951a1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Convince all dependencies and tests that they should run on
wasm32architectures.TODO
proptest-arbitrary-interopto play ball, ideally through add support for building wasm32 target graydon/proptest-arbitrary-interop#3#[test]annotations into#[macro_rules_attr::apply(test)](see corresponding WIP commit)wasm32-unknown-unknowntargetREADME-wasm32.mdin README? Link to it? …?try to makeI don't know if or how this can be achievedcrate-type = ["cdylib", "rlib"]specific to thewasm32targetThis is a continuation of #265.