wasm-rquickjs 0.3.4

Tool for wrapping JavaScript modules as WebAssembly components using the QuickJS engine
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// worker_threads module - JavaScript-only stub (no native functions needed)
pub const WORKER_THREADS_JS: &str = include_str!("worker_threads.js");

// Re-export for aliases
pub const REEXPORT_JS: &str =
    r#"export * from 'node:worker_threads'; export { default } from 'node:worker_threads';"#;

pub const WIRE_JS: &str = r#"
    import __wasm_rquickjs_worker_threads, { MessageChannel as __wasm_rquickjs_MessageChannel, MessagePort as __wasm_rquickjs_MessagePort } from 'node:worker_threads';
    globalThis.worker_threads = __wasm_rquickjs_worker_threads;
    globalThis.MessageChannel = __wasm_rquickjs_MessageChannel;
    globalThis.MessagePort = __wasm_rquickjs_MessagePort;
"#;