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
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 accessstd::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: