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

WebAssembly support #69

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

brassy-endomorph
Copy link

Adds conditional compilation for the wasm32 target to enable wasm support. Tested with a small program on Firefox 88.0.1 and it works well enough. It requires a nightly compiler to access std::time::Instant in a way that doesn't panic. Possibly as a result of using the nightly compiler, it errors on test execution with the following:

$ cargo test --target wasm32-unknown-unknown --no-default-features
...
    Finished test [unoptimized + debuginfo] target(s) in 0.02s
     Running unittests (target/wasm32-unknown-unknown/debug/deps/ketos-951c6b0f1e1fa322.wasm)
/home/user/code/misc/ketos/target/wasm32-unknown-unknown/debug/deps/ketos-951c6b0f1e1fa322.wasm: 1: /home/user/code/misc/ketos/target/wasm32-unknown-unknown/debug/deps/ketos-951c6b0f1e1fa322.wasm: Syntax error: end of file unexpected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant