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

Run tests under WebAssembly in CI #93

Open
robertknight opened this issue Apr 14, 2024 · 0 comments
Open

Run tests under WebAssembly in CI #93

robertknight opened this issue Apr 14, 2024 · 0 comments
Labels
qa Quality / correctness checks WebAssembly

Comments

@robertknight
Copy link
Owner

robertknight commented Apr 14, 2024

CI currently builds the library for WebAssembly, but doesn't run tests. cargo test doesn't work directly with a WASM target, but tests can be built and then run using eg. wasmtime:

cargo build --tests -p rten --target wasm32-wasi
wasmtime target/wasm32-wasi/debug/deps/rten-{build_hash}.wasm

From a quick test just now, all the tests can run except for test_rnn_pytorch which tries to read a local file, which is disallowed. I believe there is a way to read the file, but we also want to make sure that the library will work in a browser environment where those APIs are not available.

robertknight added a commit that referenced this issue Apr 14, 2024
For the moment this just documents how to build and run WASM tests locally.

See #93 for supporting this in CI.
@robertknight robertknight added the qa Quality / correctness checks label May 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
qa Quality / correctness checks WebAssembly
Projects
None yet
Development

No branches or pull requests

1 participant