Basic WebAssembly support with minimal Javascript API #615. Currently 6/12 crypto functions supported. Tested in browser with all default features disabled.

This commit is contained in:
Rujia Liu
2023-09-08 17:27:22 +08:00
parent a0b5a24853
commit b6ce6b7cdb
9 changed files with 184 additions and 32 deletions

View File

@@ -453,9 +453,9 @@ impl Machine {
let user_output = Stream::stdout(&mut machine_st.arena);
let user_error = Stream::stderr(&mut machine_st.arena);
#[cfg(not(target_os = "wasi"))]
#[cfg(not(target_arch = "wasm32"))]
let runtime = tokio::runtime::Runtime::new().unwrap();
#[cfg(target_os = "wasi")]
#[cfg(target_arch = "wasm32")]
let runtime = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()