wasm-idle 1.0.9 → 1.0.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/README.md +34 -25
  2. package/dist/playground/assetBridge.d.ts +1 -1
  3. package/dist/playground/assetBridge.js +172 -117
  4. package/dist/playground/assets.d.ts +4 -4
  5. package/dist/playground/assets.js +129 -286
  6. package/dist/playground/cachedClang.js +1 -0
  7. package/dist/playground/clang.js +5 -1
  8. package/dist/playground/clangWorkerProtocol.d.ts +1 -0
  9. package/dist/playground/dotnet.js +1 -1
  10. package/dist/playground/elixir.js +2 -2
  11. package/dist/playground/fennel.js +1 -1
  12. package/dist/playground/go.js +1 -1
  13. package/dist/playground/haskell.js +1 -1
  14. package/dist/playground/lua.js +1 -1
  15. package/dist/playground/r.js +1 -1
  16. package/dist/playground/runtimeAssetCache.d.ts +6 -0
  17. package/dist/playground/runtimeAssetCache.js +109 -0
  18. package/dist/playground/rust.js +1 -1
  19. package/dist/playground/staticRuntimeModuleVersion.d.ts +1 -1
  20. package/dist/playground/staticRuntimeModuleVersion.js +1 -1
  21. package/dist/playground/tinygo.js +1 -1
  22. package/dist/playground/typescript.js +1 -1
  23. package/dist/playground/wasmBashVersion.d.ts +25 -25
  24. package/dist/playground/wasmBashVersion.js +12 -12
  25. package/dist/playground/wasmElixirVersion.d.ts +9 -9
  26. package/dist/playground/wasmElixirVersion.js +9 -9
  27. package/dist/playground/wasmHaskellVersion.d.ts +1 -1
  28. package/dist/playground/wasmHaskellVersion.js +1 -1
  29. package/dist/playground/wasmLispVersion.d.ts +1 -1
  30. package/dist/playground/wasmLispVersion.js +1 -1
  31. package/dist/playground/wasmOcamlVersion.d.ts +4 -4
  32. package/dist/playground/wasmOcamlVersion.js +3 -3
  33. package/dist/playground/wasmPrologVersion.d.ts +19 -19
  34. package/dist/playground/wasmPrologVersion.js +18 -18
  35. package/dist/playground/wasmTypeScriptVersion.d.ts +5 -5
  36. package/dist/playground/wasmTypeScriptVersion.js +5 -5
  37. package/dist/playground/wat.js +1 -1
  38. package/dist/playground/worker/cachedClangCompile.js +7 -1
  39. package/dist/playground/worker/clang.js +13 -8
  40. package/dist/playground/worker/clangStreaming.js +6 -0
  41. package/dist/playground/worker/elixir.js +1 -1
  42. package/dist/playground/worker/go.js +1 -1
  43. package/dist/playground/worker/haskell.js +1 -1
  44. package/dist/playground/worker/lua.js +1 -1
  45. package/dist/playground/worker/python.js +7 -3
  46. package/dist/playground/worker/r.js +1 -1
  47. package/dist/playground/worker/runtimeModule.d.ts +1 -1
  48. package/dist/playground/worker/runtimeModule.js +1 -1
  49. package/dist/playground/worker/rust.js +1 -1
  50. package/dist/playground/worker/typescript.js +1 -1
  51. package/dist/playground/worker/wat.js +1 -1
  52. package/dist/playground/worker/zig.js +1 -1
  53. package/dist/playground/zig.js +1 -1
  54. package/package.json +47 -47
package/README.md CHANGED
@@ -229,18 +229,19 @@ or the browser-side package/workspace runtime that backs each row. Static ESM en
229
229
  assets loaded over HTTP on demand, not files embedded in the published npm packages.
230
230
  `Execution defaults / flags` lists the default
231
231
  targets and flags wasm-idle applies, plus the public per-run options that change execution.
232
- `Customization` lists the `runtimeAssets` fields and matching `PUBLIC_WASM_*` env overrides
233
- when they exist.
232
+ `Customization` lists the SDK's explicit `runtimeAssets` fields and the matching `PUBLIC_WASM_*`
233
+ variables understood by this repository's example page. Published packages do not read environment
234
+ variables or import SvelteKit modules.
234
235
 
235
236
  | Language / IDs | Package/version base | Execution defaults / flags | Customization |
236
237
  | ---------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
237
238
  | C3<br>`C3` | wasm-llvm/c3-browser: C3 0.8.3 / LLVM 22.1.8 | Verified c3c and builtin LLD compile real C3 in a fresh browser Worker; UTF-8 env.readByte/env.writeByte ABI and exported main; std::io and WASI unavailable | `runtimeAssets.c3.baseUrl`, `stdin`, `activePath`, `workspaceFiles`; fixed compiler flags and bounded Wasm memories |
238
- | C<br>`C` | @wasm-idle/llvm-core@1.0.9 / Clang 22.1.8 WASI sysroot from the `wasm-llvm` producer | `clang` for `wasm32-wasi`; default `-std=gnu11`; LLDB mode compiles untouched source with embedded DWARF at `-g -O0` and runs it in WAMR; normal runs still use the browser WASI host; supports `stdin` and `programArgs` | `runtimeAssets.clang.baseUrl`/`loader` or `rootUrl`; `compileArgs`, `programArgs`, `cVersion`, `activePath`, `workspaceFiles`, `debugMode`, `breakpoints`, `pauseOnEntry` |
239
- | C++<br>`CPP` | @wasm-idle/llvm-core@1.0.9 / Clang 22.1.8 WASI sysroot from the `wasm-llvm` producer | `clang++` for `wasm32-wasi`; default `-std=gnu++20`; LLDB mode compiles untouched source with embedded DWARF at `-g -O0` and runs it in WAMR; normal runs still use the browser WASI host; supports `stdin` and `programArgs` | `runtimeAssets.clang.baseUrl`/`loader` or `rootUrl`; `compileArgs`, `programArgs`, `cppVersion`, `activePath`, `workspaceFiles`, `debugMode`, `breakpoints`, `pauseOnEntry` |
240
- | Objective-C<br>`OBJC` | GNUstep libobjc2 v2.3 assets from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.0.9 | `clang -x objective-c -fobjc-runtime=gnustep-2.0 -fblocks` for `wasm32-wasi`; links `libobjc.a`, `libgnustep-base.a`, and `libffi.a` when Foundation is imported; Foundation headers are inlined from `foundation-headers.json`; includes a constructor wrapper for Objective-C class registration; auto-compiles `.m`/`.mm`/`.c` workspace files; trace debug instruments active source and uses wasm-idle controls; supports `stdin` and `programArgs`; large Objective-C assets may be served as gzip-only `.gz` files through the service worker or worker fallback | `runtimeAssets.objectivec.baseUrl`/`libobjcUrl`/`headersUrl`/`libgnustepBaseUrl`/`libgnustepBaseObjectUrl`/`foundationHeadersUrl`/`libffiUrl` or `PUBLIC_WASM_OBJECTIVEC_*`; `runtimeAssets.clang.baseUrl`/`loader` for the clang toolchain; `activePath`, `workspaceFiles`, `compileArgs`, `debug`, `breakpoints`, `pauseOnEntry` |
241
- | Objective-C++<br>`OBJECTIVECXX` | Same GNUstep libobjc2 v2.3 + libc++ assets as Objective-C from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.0.9; no extra compiler assets | `clang -x objective-c++ -std=gnu++20 -fobjc-runtime=gnustep-2.0 -fblocks` for `wasm32-wasi` with libc++ headers; active file defaults to `main.mm`; links `libobjc.a` (plus GNUstep Base and `libffi.a` when Foundation is imported); auto-compiles `.mm`/`.m`/`.c` workspace files; supports `stdin` and `programArgs`; trace debugging is not supported | Shares `runtimeAssets.objectivec` and `runtimeAssets.clang` with Objective-C; `activePath`, `workspaceFiles`, `compileArgs`, `programArgs` |
242
- | Python<br>`PYTHON3` | static ESM `static/pyodide/pyodide.mjs` / pyodide@0.29.3 | loads `pyodide.mjs`, `pyodide.asm.js`, `pyodide.asm.wasm`, and `python_stdlib.zip` from the configured static asset tree on demand; supports `stdin`, workspace files, and trace debugging | `runtimeAssets.python.baseUrl`/`loader` or `rootUrl`; `stdin`, `activePath`, `workspaceFiles`, `debug`, `breakpoints`, `pauseOnEntry`, `debugPath` |
243
- | Hy<br>`HY` | Hy 1.3.1 + funcparserlib 1.0.1 pure-Python wheels on pyodide@0.29.3 | receipt-verifies the bundled wheels, unpacks them into Pyodide site-packages, and compiles Hy with `hy.compiler.hy_compile`; `(input)`/`(print)` share the Python stdin/stdout bridge; no debugger or automatic package loading | `runtimeAssets.hy.baseUrl` or `PUBLIC_WASM_HY_BASE_URL` plus the Python runtime assets; `stdin`, `activePath` |
239
+ | C<br>`C` | @wasm-idle/llvm-core@1.0.11 / Clang 22.1.8 WASI sysroot from the `wasm-llvm` producer | `clang` for `wasm32-wasi`; default `-std=gnu11`; LLDB mode compiles untouched source with embedded DWARF at `-g -O0` and runs it in WAMR; normal runs still use the browser WASI host; supports `stdin` and `programArgs` | `runtimeAssets.clang.baseUrl`/`loader` or `rootUrl`; `compileArgs`, `programArgs`, `cVersion`, `activePath`, `workspaceFiles`, `debugMode`, `breakpoints`, `pauseOnEntry` |
240
+ | C++<br>`CPP` | @wasm-idle/llvm-core@1.0.11 / Clang 22.1.8 WASI sysroot from the `wasm-llvm` producer | `clang++` for `wasm32-wasi`; default `-std=gnu++20`; LLDB mode compiles untouched source with embedded DWARF at `-g -O0` and runs it in WAMR; normal runs still use the browser WASI host; supports `stdin` and `programArgs` | `runtimeAssets.clang.baseUrl`/`loader` or `rootUrl`; `compileArgs`, `programArgs`, `cppVersion`, `activePath`, `workspaceFiles`, `debugMode`, `breakpoints`, `pauseOnEntry` |
241
+ | Objective-C<br>`OBJC` | GNUstep libobjc2 v2.3 assets from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.0.11 | `clang -x objective-c -fobjc-runtime=gnustep-2.0 -fblocks` for `wasm32-wasi`; links `libobjc.a`, `libgnustep-base.a`, and `libffi.a` when Foundation is imported; Foundation headers are inlined from `foundation-headers.json`; includes a constructor wrapper for Objective-C class registration; auto-compiles `.m`/`.mm`/`.c` workspace files; trace debug instruments active source and uses wasm-idle controls; supports `stdin` and `programArgs`; large Objective-C assets may be served as gzip-only `.gz` files through the service worker or worker fallback | `runtimeAssets.objectivec.baseUrl`/`libobjcUrl`/`headersUrl`/`libgnustepBaseUrl`/`libgnustepBaseObjectUrl`/`foundationHeadersUrl`/`libffiUrl` or `PUBLIC_WASM_OBJECTIVEC_*`; `runtimeAssets.clang.baseUrl`/`loader` for the clang toolchain; `activePath`, `workspaceFiles`, `compileArgs`, `debug`, `breakpoints`, `pauseOnEntry` |
242
+ | Objective-C++<br>`OBJECTIVECXX` | Same GNUstep libobjc2 v2.3 + libc++ assets as Objective-C from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.0.11; no extra compiler assets | `clang -x objective-c++ -std=gnu++20 -fobjc-runtime=gnustep-2.0 -fblocks` for `wasm32-wasi` with libc++ headers; active file defaults to `main.mm`; links `libobjc.a` (plus GNUstep Base and `libffi.a` when Foundation is imported); auto-compiles `.mm`/`.m`/`.c` workspace files; supports `stdin` and `programArgs`; trace debugging is not supported | Shares `runtimeAssets.objectivec` and `runtimeAssets.clang` with Objective-C; `activePath`, `workspaceFiles`, `compileArgs`, `programArgs` |
243
+ | Python<br>`PYTHON3` | static ESM `static/pyodide/pyodide.mjs` / pyodide@314.0.7 | loads `pyodide.mjs`, `pyodide.asm.mjs`, `pyodide.asm.wasm`, and `python_stdlib.zip` from the configured static asset tree on demand; supports `stdin`, workspace files, and trace debugging | `runtimeAssets.python.baseUrl`/`loader` or `rootUrl`; `stdin`, `activePath`, `workspaceFiles`, `debug`, `breakpoints`, `pauseOnEntry`, `debugPath` |
244
+ | Hy<br>`HY` | Hy 1.3.1 + funcparserlib 1.0.1 pure-Python wheels on pyodide@314.0.7 | receipt-verifies the bundled wheels, unpacks them into Pyodide site-packages, and compiles Hy with `hy.compiler.hy_compile`; `(input)`/`(print)` share the Python stdin/stdout bridge; no debugger or automatic package loading | `runtimeAssets.hy.baseUrl` or `PUBLIC_WASM_HY_BASE_URL` plus the Python runtime assets; `stdin`, `activePath` |
244
245
  | Java<br>`JAVA` | @wasm-idle/runtime-teavm@0.0.0 / TeaVM compiler assets | `compiler.wasm` compiles Java to browser WASM/JS; supports `stdin` and `programArgs` | `runtimeAssets.java.baseUrl`/`loader` or `rootUrl` |
245
246
  | Rust<br>`RUST` | wasm-rust@0.1.0 / rust-1.99.0-browser-integrated-v1 + integrated LLVM/LLD 22.1.8 from the `wasm-llvm` producer; exact rustc/LLVM provenance is recorded for LLDB compatibility | browser host `wasm32-wasip1-threads`; default target `wasm32-wasip1`, selectable `wasm32-wasip1`, `wasm32-wasip2`, `wasm32-wasip3`; LLDB mode is currently limited to `wasm32-wasip1` and emits embedded DWARF with `-C debuginfo=2 -C opt-level=0`; normal Preview 1/2/3 execution remains unchanged; supports `stdin` and `programArgs` | `runtimeAssets.rust.compilerUrl`, `runtimeAssets.rust.debugModuleUrl`, or `PUBLIC_WASM_RUST_COMPILER_URL`; `rootUrl`, `rustTargetTriple`, `programArgs`, `debugMode`; compiler requests accept `edition`, `crateType`, `extendedTimeout`, `log`, and `onProgress`; runtime manifest controls compiler memory, timeout, and shared workspace size |
246
247
  | Go<br>`GO` | wasm-go@0.1.0 / go1.26.1 | default target `wasip1/wasm`; selectable `wasip1/wasm`, `wasip2/wasm`, `wasip3/wasm`, `js/wasm`; supports `stdin` and `programArgs` | `runtimeAssets.go.compilerUrl` or `PUBLIC_WASM_GO_COMPILER_URL`; `goTarget`, `programArgs` |
@@ -248,9 +249,9 @@ when they exist.
248
249
  | C#<br>`CSHARP` | wasm-dotnet@0.1.0 / .NET 9.0.16 browser-wasm / Roslyn C# 4.14.0 | `CSharpCompilationOptions(OutputKind.ConsoleApplication)`; `concurrentBuild=false`; target `browser-wasm`; language-specific AOT bundle `runtime/csharp/`; supports `stdin` and `programArgs` | `runtimeAssets.dotnet.moduleUrl` or `PUBLIC_WASM_DOTNET_MODULE_URL`; `programArgs`, LSP on/off |
249
250
  | F#<br>`FSHARP` | wasm-dotnet@0.1.0 / .NET 9.0.16 browser-wasm / FCS 43.12.204 / FSharp.Core 10.1.204 | `fsc.exe --target:exe --targetprofile:netcore --noframework --simpleresolution --nowin32manifest --debug- --optimize-`; language-specific AOT bundle `runtime/fsharp/`; supports `stdin` and `programArgs` | `runtimeAssets.dotnet.moduleUrl` or `PUBLIC_WASM_DOTNET_MODULE_URL`; `programArgs`, LSP on/off |
250
251
  | VB.NET<br>`VBNET` | wasm-dotnet@0.1.0 / .NET 9.0.16 browser-wasm / Roslyn Visual Basic 4.14.0 | `VisualBasicCompilationOptions(OutputKind.ConsoleApplication)`; `concurrentBuild=false`, `OptionStrict=Off`, `OptionInfer=On`, `OptionExplicit=On`; target `browser-wasm`; language-specific AOT bundle `runtime/vbnet/`; supports `stdin` and `programArgs` | `runtimeAssets.dotnet.moduleUrl` or `PUBLIC_WASM_DOTNET_MODULE_URL`; `programArgs`, LSP on/off |
251
- | Elixir<br>`ELIXIR` | wasm-elixir asset bundle / @swmansion/popcorn@0.2.2 | Popcorn/AtomVM bundle `bundle.avm`; supports `stdin` | `runtimeAssets.elixir.bundleUrl` or `PUBLIC_WASM_ELIXIR_BUNDLE_URL` |
252
- | Erlang<br>`ERLANG` | wasm-elixir asset bundle / @swmansion/popcorn@0.2.2 | Popcorn/AtomVM bundle `bundle.avm`; supports `stdin` | `runtimeAssets.erlang.bundleUrl` or `PUBLIC_WASM_ERLANG_BUNDLE_URL`; falls back to Elixir bundle URL |
253
- | Prolog<br>`PROLOG` | swipl-wasm@8.0.1 synced into `static/wasm-prolog` | static worker runs SWI-Prolog; supports `stdin` and `programArgs` | `runtimeAssets.prolog.baseUrl`/`runtimeAssets.prolog.workerUrl` or `PUBLIC_WASM_PROLOG_BASE_URL`/`PUBLIC_WASM_PROLOG_WORKER_URL`; `programArgs`, `activePath`, `workspaceFiles` |
252
+ | Elixir<br>`ELIXIR` | wasm-elixir asset bundle / @swmansion/popcorn@0.3.3 | Popcorn/AtomVM bundle `bundle.avm`; supports `stdin` | `runtimeAssets.elixir.bundleUrl` or `PUBLIC_WASM_ELIXIR_BUNDLE_URL` |
253
+ | Erlang<br>`ERLANG` | wasm-elixir asset bundle / @swmansion/popcorn@0.3.3 | Popcorn/AtomVM bundle `bundle.avm`; supports `stdin` | `runtimeAssets.erlang.bundleUrl` or `PUBLIC_WASM_ERLANG_BUNDLE_URL`; falls back to Elixir bundle URL |
254
+ | Prolog<br>`PROLOG` | swipl-wasm@8.2.1 synced into `static/wasm-prolog` | static worker runs SWI-Prolog; supports `stdin` and `programArgs` | `runtimeAssets.prolog.baseUrl`/`runtimeAssets.prolog.workerUrl` or `PUBLIC_WASM_PROLOG_BASE_URL`/`PUBLIC_WASM_PROLOG_WORKER_URL`; `programArgs`, `activePath`, `workspaceFiles` |
254
255
  | Gleam<br>`GLEAM` | @live-codes/gleam-precompiled@0.5.0 static worker | Gleam worker compiles/runs browser output with source manifest; supports `stdin` | `runtimeAssets.gleam.baseUrl`/`workerUrl`/`manifestUrl` or `PUBLIC_WASM_GLEAM_*`; `programArgs`, `workspaceFiles` |
255
256
  | Grain<br>`GRAIN` | grain-lang/grain v0.7.2 release: upstream js_of_ocaml grainc.bc.js + @grain/stdlib 0.7.2 (precompiled .gro) | Verified upstream grainc compiles `.gr` workspace files to WASI in a fresh browser Worker; stdio-only WASI host with streaming `stdin` | `runtimeAssets.grain.baseUrl` or `PUBLIC_WASM_GRAIN_BASE_URL`; `stdin`, `programArgs`, `activePath`, `workspaceFiles`; Wasm memory bounded by `limits.maxWasmMemoryBytes` |
256
257
  | Perl<br>`PERL` | WebPerl v0.09-beta (webperl_prebuilt_v0.09-beta.zip) | host-verifies the manifest, stored assets, logical hashes, and profile-bound one-shot runner before executing `emperl`; supports `stdin` and `programArgs` | explicit `runtimeAssets.perl.baseUrl`/`workerUrl`/`manifestUrl` overrides require one complete profile-and-runner receipt bundle; URL-only `PUBLIC_WASM_PERL_*` overrides fail closed; `programArgs`, `activePath`, `workspaceFiles` |
@@ -263,32 +264,32 @@ when they exist.
263
264
  | Janet<br>`JANET` | Janet 1.41.3-dev / Emscripten 3.1.8 opaque vendored bundle | host-verifies the manifest, stored assets, logical hashes, and profile-bound one-shot runner before executing the Janet VM; supports `stdin` and `programArgs` | explicit `runtimeAssets.janet.baseUrl`/`workerUrl`/`manifestUrl` overrides require one complete profile-and-runner receipt bundle; URL-only `PUBLIC_WASM_JANET_*` overrides fail closed; `programArgs`, `activePath`, `workspaceFiles` |
264
265
  | Julia<br>`JULIA` | @chriskoch/julia-wasm@1.0.4 | host-verifies the manifest, stored assets, logical hashes, and profile-bound one-shot runner before executing the legacy Julia VM; supports `stdin` and `activePath` | explicit `runtimeAssets.julia.baseUrl`/`workerUrl`/`manifestUrl` overrides require one complete profile-and-runner receipt bundle; URL-only `PUBLIC_WASM_JULIA_*` overrides fail closed; `activePath` |
265
266
  | Nim<br>`NIM` | Nim 2.2.4 / benagastov Nim-WASM-Compiler with clang/lld WASM | host-verifies the manifest, eight stored assets, logical hashes, and profile-bound one-shot runner before compiling Nim to C and linking with clang/lld WASM in a disposable worker; supports `stdin`, `programArgs`, and `activePath` | explicit `runtimeAssets.nim.baseUrl`/`workerUrl`/`manifestUrl` overrides require one complete profile-and-runner receipt bundle; URL-only `PUBLIC_WASM_NIM_*` overrides fail closed; `programArgs`, `activePath` |
266
- | Bash<br>`BASH` | @wasm-idle/runtime-bash@0.1.0 / GNU Bash WASIX + receipt-pinned @wasmer/sdk@0.9.0 profile | host-verifies one profile manifest, the stored SDK JavaScript, Wasmer Wasm, and WEBc before starting a fixed worker generation with no runtime-asset fetches; invokes `bash -c <code> <activePath> ...programArgs` and supports `stdin`, `programArgs`, `activePath`, and `workspaceFiles` | `rootUrl` mirrors reuse the bundled profile; explicit `runtimeAssets.bash.baseUrl`/`manifestUrl`/`moduleUrl`/`wasmerWasmUrl`/`webcUrl` overrides require one complete profile; `workerUrl` is rejected; `stdin`, `programArgs`, `activePath`, `workspaceFiles` |
267
+ | Bash<br>`BASH` | @wasm-idle/runtime-bash@0.1.0 / GNU Bash WASIX + receipt-pinned @wasmer/sdk@0.10.0 profile | host-verifies one profile manifest, the stored SDK JavaScript, Wasmer Wasm, and WEBc before starting a fixed worker generation with no runtime-asset fetches; invokes `bash -c <code> <activePath> ...programArgs` and supports `stdin`, `programArgs`, `activePath`, and `workspaceFiles` | `rootUrl` mirrors reuse the bundled profile; explicit `runtimeAssets.bash.baseUrl`/`manifestUrl`/`moduleUrl`/`wasmerWasmUrl`/`webcUrl` overrides require one complete profile; `workerUrl` is rejected; `stdin`, `programArgs`, `activePath`, `workspaceFiles` |
267
268
  | ClojureScript<br>`CLOJURESCRIPT` | @wasm-idle/runtime-clojurescript@0.1.0 / ClojureScript 1.12.134 | static worker compiles and evaluates with the official `cljs.js` self-hosted compiler; supports `stdin`, `programArgs`, `activePath`, and `workspaceFiles` | `runtimeAssets.clojurescript.baseUrl`/`runtimeAssets.clojurescript.workerUrl` or `PUBLIC_WASM_CLOJURESCRIPT_BASE_URL`/`PUBLIC_WASM_CLOJURESCRIPT_WORKER_URL`; `programArgs`, `activePath`, `workspaceFiles` |
268
269
  | ReScript<br>`RESCRIPT` | upstream ReScript 12.3.1 playground `compiler.js` + `compiler-builtins/cmij.js` + `@rescript/runtime@12.3.1` | static worker compiles `Main.res` to CommonJS with the official js_of_ocaml ReScript compiler, then runs it against the upstream stdlib runtime; stdin via `fs.readLineSync(0)`/`fs.readFileSync(0)`; compiler errors/warnings become editor diagnostics; supports `programArgs` | `runtimeAssets.rescript.baseUrl`/`runtimeAssets.rescript.workerUrl` or `PUBLIC_WASM_RESCRIPT_BASE_URL`/`PUBLIC_WASM_RESCRIPT_WORKER_URL`; `programArgs`, `activePath`, `workspaceFiles` |
269
270
  | TinyGo<br>`TINYGO` | wasm-tinygo@0.0.0 / upstream TinyGo 0.40.1 browser toolchain | receipt-verifies and runs upstream `cmd/go` plus TinyGo in a disposable capped Worker; targets `wasip1`; supports `stdin`, `programArgs`, `workspaceFiles`, hosted C++ without exceptions/RTTI, and offline `vendor/modules.txt` | `runtimeAssets.tinygo.moduleUrl`/`assetLoader`; `PUBLIC_WASM_TINYGO_MODULE_URL`, execution/workspace resource limits, `programArgs` |
270
271
  | OCaml<br>`OCAML` | wasm-of-js-of-ocaml@0.1.0 / js_of_ocaml + wasm_of_ocaml | default backend `wasm`; selectable `wasm`, `js`; `ocamlWasmBinaryenMode` `fast`, `full`; supports `stdin`; outer module and manifest are size/SHA-256 verified before use | `runtimeAssets.ocaml.moduleUrl`/`manifestUrl` plus `moduleReceipt`/`manifestReceipt` for a custom generation, or `PUBLIC_WASM_OCAML_*` for a mirror of the bundled generation; `ocamlBackend` |
271
- | JavaScript<br>`JAVASCRIPT` | wasm-typescript@0.1.0 / @swc/wasm-typescript@1.15.33 | TypeScript service transpiles JS/TS and runs in browser sandbox; supports `stdin` and `programArgs` | `runtimeAssets.typescript.moduleUrl`/`libUrl` or `PUBLIC_WASM_TYPESCRIPT_MODULE_URL` |
272
- | TypeScript<br>`TYPESCRIPT` | wasm-typescript@0.1.0 / @swc/wasm-typescript@1.15.33 | TypeScript service transpiles then runs in browser sandbox; supports `stdin` and `programArgs` | `runtimeAssets.typescript.moduleUrl`/`libUrl` or `PUBLIC_WASM_TYPESCRIPT_MODULE_URL` |
273
- | AssemblyScript<br>`ASSEMBLYSCRIPT` | static ESM `static/wasm-assemblyscript/runtime.mjs` produced from assemblyscript@0.28.17 + @assemblyscript/loader@0.28.17 | `asc <activePath> --outFile module.wasm --runtime incremental --bindings raw --optimize --exportRuntime`; runs the emitted WASM through WASI/browser imports and supports `stdin` | `runtimeAssets.assemblyscript.moduleUrl` or `PUBLIC_WASM_ASSEMBLYSCRIPT_MODULE_URL` or `rootUrl`; `stdin`, `activePath`, `workspaceFiles` |
272
+ | JavaScript<br>`JAVASCRIPT` | wasm-typescript@0.1.0 / @swc/wasm-typescript@1.16.13 | TypeScript service transpiles JS/TS and runs in browser sandbox; supports `stdin` and `programArgs` | `runtimeAssets.typescript.moduleUrl`/`libUrl` or `PUBLIC_WASM_TYPESCRIPT_MODULE_URL` |
273
+ | TypeScript<br>`TYPESCRIPT` | wasm-typescript@0.1.0 / @swc/wasm-typescript@1.16.13 | TypeScript service transpiles then runs in browser sandbox; supports `stdin` and `programArgs` | `runtimeAssets.typescript.moduleUrl`/`libUrl` or `PUBLIC_WASM_TYPESCRIPT_MODULE_URL` |
274
+ | AssemblyScript<br>`ASSEMBLYSCRIPT` | static ESM `static/wasm-assemblyscript/runtime.mjs` produced from assemblyscript@0.28.20 + @assemblyscript/loader@0.28.20 | `asc <activePath> --outFile module.wasm --runtime incremental --bindings raw --optimize --exportRuntime`; runs the emitted WASM through WASI/browser imports and supports `stdin` | `runtimeAssets.assemblyscript.moduleUrl` or `PUBLIC_WASM_ASSEMBLYSCRIPT_MODULE_URL` or `rootUrl`; `stdin`, `activePath`, `workspaceFiles` |
274
275
  | WAT<br>`WAT` | wasm-wat@0.1.0 / wabt@1.0.39 | WABT parses WAT to WASM then runs through WASI shim; supports `stdin` and `programArgs` | `runtimeAssets.wat.moduleUrl` or `PUBLIC_WASM_WAT_MODULE_URL`; `programArgs` |
275
276
  | WASM<br>`WASM` | Browser WebAssembly + @bjorn3/browser_wasi_shim@0.4.2 | loads provided WASM bytes and executes with WASI preview1 imports; supports `stdin` and `programArgs` | `programArgs`, `stdin`, `activePath` |
276
277
  | Lua<br>`LUA` | wasm-lua@0.1.0 / wasmoon@1.16.0 | Wasmoon Lua VM; supports `stdin` and `programArgs` | `runtimeAssets.lua.moduleUrl` or `PUBLIC_WASM_LUA_MODULE_URL`; `programArgs` |
277
278
  | Fennel<br>`FENNEL` | static wasm-fennel `fennel-1.6.1.lua.gz` (official Fennel 1.6.1) on wasm-lua@0.1.0 | receipt-verified `fennel.lua` compiler evaluated by the Wasmoon Lua VM; supports `stdin` and `programArgs` | `runtimeAssets.fennel.compilerUrl` or `PUBLIC_WASM_FENNEL_COMPILER_URL` plus the Lua module URL; `programArgs` |
278
279
  | Zig<br>`ZIG` | static wasm-zig assets / `zig_small.wasm` + `std.tar.gz` | native gzip delivery for the tar standard library; default target `wasm64-wasi`; Zig compile args are appended; supports `stdin`, `compileArgs`, `programArgs` | `runtimeAssets.zig.compilerUrl`/`stdlibUrl` or `PUBLIC_WASM_ZIG_*`; `zigTargetTriple`, `activePath`, `workspaceFiles` |
279
280
  | Scheme<br>`LISP` | wasm-lisp@0.1.0 / Puppy Scheme WASM component | receipt-verified Puppy Scheme compiler/runtime; supports `stdin` and `programArgs` | `runtimeAssets.lisp.{moduleUrl,manifestUrl,manifestFingerprint}` or `PUBLIC_WASM_LISP_{MODULE_URL,MANIFEST_URL,MANIFEST_FINGERPRINT}`; `programArgs` |
280
- | Ruby<br>`RUBY` | receipt-pinned `static/wasm-ruby` profile produced from @ruby/3.4-wasm-wasi@2.9.3-2.9.4 + @ruby/wasm-wasi@2.9.3-2.9.4 | host-verifies the manifest, canonical stored module and gzip bytes, and logical WASM before transferring three owned buffers to a no-fetch CRuby 3.4 worker; supports `stdin`, `programArgs`, and workspace files | `rootUrl` mirrors reuse the bundled profile; explicit `runtimeAssets.ruby` overrides require one complete profile and same-origin canonical paths; URL-only `PUBLIC_WASM_RUBY_*` overrides fail closed; `stdin`, `programArgs`, `workspaceFiles` |
281
+ | Ruby<br>`RUBY` | receipt-pinned `static/wasm-ruby` profile produced from @ruby/3.4-wasm-wasi@2.10.1 + @ruby/wasm-wasi@2.10.1 | host-verifies the manifest, canonical stored module and gzip bytes, and logical WASM before transferring three owned buffers to a no-fetch CRuby 3.4 worker; supports `stdin`, `programArgs`, and workspace files | `rootUrl` mirrors reuse the bundled profile; explicit `runtimeAssets.ruby` overrides require one complete profile and same-origin canonical paths; URL-only `PUBLIC_WASM_RUBY_*` overrides fail closed; `stdin`, `programArgs`, `workspaceFiles` |
281
282
  | Haskell<br>`HASKELL` | ghc-in-browser / GHC 9.14.0.20251031 WASI rootfs | loads `dyld.mjs`, `rootfs.tar.zst`, `bsdtar.wasm`; `compileArgs` become GHC args, otherwise legacy `args` become GHC args | `runtimeAssets.haskell.moduleUrl`/`rootfsUrl`/`bsdtarUrl`; `mainSoPath`, `searchDirs`, `activePath`, `workspaceFiles` |
282
283
  | LFortran<br>`LFORTRAN` | receipt-pinned `wasm-llvm/producer/lfortran-browser` artifacts in `static/wasm-lfortran` | real LFortran 0.65.0-97-gab867a23 LLVM evaluator compiles and executes Emscripten side modules in a fresh Worker; shared-ring stdin supports delayed READ and EOF; experimental Fortran feature coverage | `runtimeAssets.lfortran.baseUrl` relocates the reviewed bundle; `stdin`, `activePath`, workspace data/include files, cancellation and execution limits; no program arguments or multi-file module build orchestration |
283
- | Fortran<br>`FORTRAN` | Netlib f2c 2022-09-09 + `@cowasm/f2c 1.0.0` libf2c + @wasm-idle/llvm-core@1.0.9 | runs `f2c.wasm` in WASI, compiles generated C with the llvm-core Clang host, links `libf2c.a`, then executes the resulting WASI module with `stdin` and `programArgs` | `runtimeAssets.fortran.baseUrl`/`f2cWasmUrl`/`libf2cUrl`/`f2cHeaderUrl`/`analyzerUrl` or `PUBLIC_WASM_FORTRAN_*`; `runtimeAssets.clang.baseUrl`/`loader` for the C backend; `activePath`, `workspaceFiles`, `compileArgs` |
284
- | COBOL<br>`COBOL` | GnuCOBOL 3.2 + GMP 6.3.0 assets from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.0.9 | native gzip delivery for the frontend Wasm and filesystem tar assets; translates free-format COBOL with the real GnuCOBOL `cobc` frontend, compiles the generated C with the llvm-core Clang host, links libcob/GMP, and executes the resulting WASI module with `stdin` and `programArgs` | `runtimeAssets.cobol.baseUrl` or `PUBLIC_WASM_COBOL_BASE_URL`; `runtimeAssets.clang.baseUrl`/`loader` for the C backend; `activePath`, `workspaceFiles`, `compileArgs` |
285
- | V<br>`V` | V 0.5.2 compiler, vlib and WASI C sysroot assets from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.0.9 | native gzip delivery for the compiler Wasm and filesystem tar assets; translates V to C with the real V compiler (built from the upstream `vc` bootstrap for WASI), compiles the generated C with the llvm-core Clang host, and executes the resulting WASI module with `stdin` and `programArgs` | `runtimeAssets.v.baseUrl` or `PUBLIC_WASM_V_BASE_URL`; `runtimeAssets.clang.baseUrl`/`loader` for the C backend; `activePath`, `workspaceFiles`, `compileArgs` |
284
+ | Fortran<br>`FORTRAN` | Netlib f2c 2022-09-09 + `@cowasm/f2c 1.0.0` libf2c + @wasm-idle/llvm-core@1.0.11 | runs `f2c.wasm` in WASI, compiles generated C with the llvm-core Clang host, links `libf2c.a`, then executes the resulting WASI module with `stdin` and `programArgs` | `runtimeAssets.fortran.baseUrl`/`f2cWasmUrl`/`libf2cUrl`/`f2cHeaderUrl`/`analyzerUrl` or `PUBLIC_WASM_FORTRAN_*`; `runtimeAssets.clang.baseUrl`/`loader` for the C backend; `activePath`, `workspaceFiles`, `compileArgs` |
285
+ | COBOL<br>`COBOL` | GnuCOBOL 3.2 + GMP 6.3.0 assets from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.0.11 | native gzip delivery for the frontend Wasm and filesystem tar assets; translates free-format COBOL with the real GnuCOBOL `cobc` frontend, compiles the generated C with the llvm-core Clang host, links libcob/GMP, and executes the resulting WASI module with `stdin` and `programArgs` | `runtimeAssets.cobol.baseUrl` or `PUBLIC_WASM_COBOL_BASE_URL`; `runtimeAssets.clang.baseUrl`/`loader` for the C backend; `activePath`, `workspaceFiles`, `compileArgs` |
286
+ | V<br>`V` | V 0.5.2 compiler, vlib and WASI C sysroot assets from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.0.11 | native gzip delivery for the compiler Wasm and filesystem tar assets; translates V to C with the real V compiler (built from the upstream `vc` bootstrap for WASI), compiles the generated C with the llvm-core Clang host, and executes the resulting WASI module with `stdin` and `programArgs` | `runtimeAssets.v.baseUrl` or `PUBLIC_WASM_V_BASE_URL`; `runtimeAssets.clang.baseUrl`/`loader` for the C backend; `activePath`, `workspaceFiles`, `compileArgs` |
286
287
  | R<br>`R` | versioned static `static/webr/<hash>/webr.js` / webr@0.6.0 | loads the browser ESM entry `webr.js` and its WebR runtime files from the configured static asset tree on demand; supports `stdin`, `programArgs`, and workspace files | `runtimeAssets.r.baseUrl` or `PUBLIC_WASM_R_BASE_URL`; `stdin`, `programArgs`, `activePath`, `workspaceFiles` |
287
288
  | Octave<br>`OCTAVE` | Octave 10.3.0 (octave-10.3.0-pl5321h996e327_3.tar.bz2) | Octave CLI Emscripten worker; supports `stdin` and `programArgs` | `runtimeAssets.octave.baseUrl`/`workerUrl`/`manifestUrl` or `PUBLIC_WASM_OCTAVE_*` |
288
- | DuckDB<br>`DUCKDB` | static ESM `static/wasm-duckdb/runtime.mjs` produced from @duckdb/duckdb-wasm@1.33.1-dev45.0 | selects the best DuckDB-Wasm MVP/EH bundle on demand and creates a fresh in-memory database per run; `stdin` is registered as `stdin.txt` and `/dev/stdin` rather than terminal stdin | `runtimeAssets.duckdb.moduleUrl` or `PUBLIC_WASM_DUCKDB_MODULE_URL` or `rootUrl`; `stdin`, `activePath`, `workspaceFiles` |
289
- | SQLite<br>`SQLITE` | static ESM `static/wasm-sqlite/runtime.mjs` produced from sql.js@1.14.1 | sql.js loads `sql-wasm.wasm` on demand and executes SQL in a fresh in-memory database; terminal stdin is not applicable | `runtimeAssets.sqlite.moduleUrl`/`wasmUrl` or `PUBLIC_WASM_SQLITE_MODULE_URL`/`PUBLIC_WASM_SQLITE_WASM_URL` or `rootUrl`; `workspaceFiles` |
289
+ | DuckDB<br>`DUCKDB` | static ESM `static/wasm-duckdb/runtime.mjs` produced from @duckdb/duckdb-wasm@1.33.1-dev57.0 | selects the best DuckDB-Wasm MVP/EH bundle on demand and creates a fresh in-memory database per run; `stdin` is registered as `stdin.txt` and `/dev/stdin` rather than terminal stdin | `runtimeAssets.duckdb.moduleUrl` or `PUBLIC_WASM_DUCKDB_MODULE_URL` or `rootUrl`; `stdin`, `activePath`, `workspaceFiles` |
290
+ | SQLite<br>`SQLITE` | static ESM `static/wasm-sqlite/runtime.mjs` produced from sql.js@1.14.2 | sql.js loads `sql-wasm.wasm` on demand and executes SQL in a fresh in-memory database; terminal stdin is not applicable | `runtimeAssets.sqlite.moduleUrl`/`wasmUrl` or `PUBLIC_WASM_SQLITE_MODULE_URL`/`PUBLIC_WASM_SQLITE_WASM_URL` or `rootUrl`; `workspaceFiles` |
290
291
  | PostgreSQL<br>`POSTGRESQL` | static ESM `static/wasm-postgresql/runtime.mjs` produced from @electric-sql/pglite@0.5.8 | upstream PostgreSQL compiled to WebAssembly by PGlite; initdb runs once per worker and every run restores a fresh in-memory cluster, sends the script as one simple query, and prints result sets, notices, and `COPY ... TO STDOUT`; preloaded `stdin` is exposed as the server file `/dev/blob` | `runtimeAssets.postgresql.moduleUrl` or `PUBLIC_WASM_POSTGRESQL_MODULE_URL` or `rootUrl`; `stdin`, `activePath`, `workspaceFiles` |
291
- | PHP<br>`PHP` | static ESM `static/wasm-php/runtime.mjs` prebuilt by the standalone `producers/wasm-php` producer from @php-wasm/web-8-4@3.1.34 + @php-wasm/universal@3.1.34 | fixed PHP `8.4` php-wasm runtime; injects `$argv`/`$argc` and runs the active workspace script with `php.run`; supports `stdin` and `programArgs`; there is no runtime version selector | `runtimeAssets.php.moduleUrl` or `PUBLIC_WASM_PHP_MODULE_URL` or `rootUrl`; `stdin`, `programArgs`, `activePath`, `workspaceFiles` |
292
+ | PHP<br>`PHP` | static ESM `static/wasm-php/runtime.mjs` prebuilt by the standalone `producers/wasm-php` producer from @php-wasm/web-8-4@3.1.57 + @php-wasm/universal@3.1.57 | fixed PHP `8.4` php-wasm runtime; injects `$argv`/`$argc` and runs the active workspace script with `php.run`; supports `stdin` and `programArgs`; there is no runtime version selector | `runtimeAssets.php.moduleUrl` or `PUBLIC_WASM_PHP_MODULE_URL` or `rootUrl`; `stdin`, `programArgs`, `activePath`, `workspaceFiles` |
292
293
 
293
294
  ### Blocked candidates
294
295
 
@@ -340,9 +341,6 @@ toolchains can be consumed from pinned external runtime repositories:
340
341
  - `static/wasm-zig`, `static/wasm-haskell`, `static/wasm-julia`, and `static/wasm-nim`: bundled browser runtime and
341
342
  compiler assets synced from
342
343
  upstream asset builds rather than local workspace packages.
343
- - `tools/*`: migrated local toolchain projects that are too broad or infrastructure-heavy to run as
344
- normal runtime workspace packages. `tools/dool` contains the Docker judge backend for Elixir and
345
- the other server-side language runners.
346
344
 
347
345
  Deployment builds retain both legacy `.gz` and canonical `.gz.bin` URLs by default.
348
346
  After building and compressing the page, `pnpm run compact:build-runtimes` reports
@@ -696,6 +694,17 @@ and loaded through `runtimeAssets` HTTP(S) URLs. References to bundled assets be
696
694
  deployed to the page's HTTP origin, not files embedded in an npm package; library consumers must
697
695
  provide their own externally hosted URLs.
698
696
 
697
+ The published SDK has no SvelteKit runtime dependency. Configure it explicitly through `rootUrl`
698
+ and `runtimeAssets`; a host may read its own environment variables before constructing those
699
+ options. SvelteKit is used to build and package this repository's example application. Only that
700
+ application reads the optional `PUBLIC_WASM_*` and `PUBLIC_TEAVM_BASE_URL` variables and translates
701
+ them into SDK options. Existing explicit fields, including the example's versioned bundled URLs
702
+ and receipt profiles, take precedence; unset fields can use example environment values. A custom
703
+ runtime still requires its complete matching trust profile and receipts.
704
+
705
+ The `PUBLIC_*` alternatives described below apply only to the example page. Library consumers
706
+ pass the corresponding `runtimeAssets` fields directly.
707
+
699
708
  Browser runtime payloads stored as `.wasm.gz` or `.tar.gz` use the platform
700
709
  `DecompressionStream('gzip')` path. Zig's standard library is delivered as `std.tar.gz`, and the
701
710
  Clang and COBOL producer archives are repackaged as `.wasm.gz`/`.tar.gz` during sync. `fflate`
@@ -8,7 +8,6 @@ export declare class WorkerAssetBridge {
8
8
  private readonly runtime;
9
9
  private config;
10
10
  private persistentCacheBaseline;
11
- private readonly persistentCacheBySignal;
12
11
  private progress;
13
12
  private expectedAssets;
14
13
  private languageSysroots;
@@ -29,6 +28,7 @@ export declare class WorkerAssetBridge {
29
28
  private sourceAssetByteLimit;
30
29
  handleMessage(event: MessageEvent<any>): boolean;
31
30
  private respond;
31
+ private captureLoadContext;
32
32
  private loadVerifiedAsset;
33
33
  private validateAssetRequest;
34
34
  private loadAsset;