Skip to content

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