wasm-idle 1.1.0 → 1.2.0
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.
- package/README.md +267 -112
- package/dist/container/bash-profile.d.ts +80 -0
- package/dist/container/bash-profile.js +328 -0
- package/dist/container/binding.d.ts +39 -0
- package/dist/container/binding.js +331 -0
- package/dist/container/clang-runtime.d.ts +42 -0
- package/dist/container/clang-runtime.js +561 -0
- package/dist/container/client.d.ts +14 -0
- package/dist/container/client.js +185 -0
- package/dist/container/explorer.d.ts +31 -0
- package/dist/container/explorer.js +112 -0
- package/dist/container/index.d.ts +11 -0
- package/dist/container/index.js +11 -0
- package/dist/container/owner-worker.d.ts +19 -0
- package/dist/container/owner-worker.js +464 -0
- package/dist/container/protocol.d.ts +84 -0
- package/dist/container/protocol.js +28 -0
- package/dist/container/runtime-adapter.d.ts +75 -0
- package/dist/container/runtime-adapter.js +537 -0
- package/dist/container/shell-control.d.ts +49 -0
- package/dist/container/shell-control.js +360 -0
- package/dist/container/workspace.d.ts +12 -0
- package/dist/container/workspace.js +29 -0
- package/dist/index.d.ts +1 -1
- package/dist/playground/assetBridge.js +111 -33
- package/dist/playground/assets.d.ts +10 -2
- package/dist/playground/c3.js +22 -0
- package/dist/playground/c3Memory.d.ts +19 -0
- package/dist/playground/c3Memory.js +117 -0
- package/dist/playground/cachedClang.js +143 -34
- package/dist/playground/clang.d.ts +5 -1
- package/dist/playground/clang.js +61 -5
- package/dist/playground/clangAssetIntegrity.js +6 -6
- package/dist/playground/clangWorkerProtocol.d.ts +12 -1
- package/dist/playground/cobol.d.ts +3 -0
- package/dist/playground/cobol.js +10 -1
- package/dist/playground/commonlispAssets.d.ts +2 -2
- package/dist/playground/compiledArtifactCache.d.ts +3 -1
- package/dist/playground/compiledArtifactCache.js +31 -5
- package/dist/playground/compiledLldb.d.ts +41 -0
- package/dist/playground/compiledLldb.js +167 -0
- package/dist/playground/d.d.ts +10 -2
- package/dist/playground/d.js +161 -14
- package/dist/playground/debugDeadline.d.ts +12 -0
- package/dist/playground/debugDeadline.js +34 -0
- package/dist/playground/debugMailbox.d.ts +12 -0
- package/dist/playground/debugMailbox.js +77 -0
- package/dist/playground/dotnet.js +6 -8
- package/dist/playground/fortran.d.ts +3 -0
- package/dist/playground/fortran.js +10 -1
- package/dist/playground/go.js +23 -7
- package/dist/playground/goDebugInstrumentation.js +207 -97
- package/dist/playground/java-debug-FMHDKUN6.js +124 -0
- package/dist/playground/java-debug-notices.txt +492 -0
- package/dist/playground/java.d.ts +17 -1
- package/dist/playground/java.js +162 -5
- package/dist/playground/javaDebug.d.ts +62 -0
- package/dist/playground/javaDebug.js +305 -0
- package/dist/playground/javaDebugBridge.d.ts +6 -0
- package/dist/playground/javaDebugBridge.js +250 -0
- package/dist/playground/javaDebugSource.d.ts +9 -0
- package/dist/playground/javaDebugSource.js +4 -0
- package/dist/playground/javaRuntimeErrors.d.ts +9 -0
- package/dist/playground/javaRuntimeErrors.js +93 -0
- package/dist/playground/lean4Assets.d.ts +1 -25
- package/dist/playground/lean4Assets.js +2 -123
- package/dist/playground/lfortran.js +10 -0
- package/dist/playground/lfortranAssets.d.ts +2 -2
- package/dist/playground/lldbSession.d.ts +23 -2
- package/dist/playground/lldbSession.js +278 -58
- package/dist/playground/lldbSourcePath.d.ts +2 -0
- package/dist/playground/lldbSourcePath.js +9 -0
- package/dist/playground/lua.d.ts +20 -1
- package/dist/playground/lua.js +190 -8
- package/dist/playground/luaDebug.d.ts +1 -0
- package/dist/playground/luaDebug.js +1 -0
- package/dist/playground/nim.d.ts +1 -0
- package/dist/playground/nim.js +30 -0
- package/dist/playground/objectivec.d.ts +10 -6
- package/dist/playground/objectivec.js +85 -10
- package/dist/playground/options.d.ts +12 -4
- package/dist/playground/python.d.ts +8 -1
- package/dist/playground/python.js +89 -6
- package/dist/playground/ruby.d.ts +10 -1
- package/dist/playground/ruby.js +66 -1
- package/dist/playground/rubyDebug.d.ts +21 -0
- package/dist/playground/rubyDebug.js +128 -0
- package/dist/playground/runtimeAssetCache.d.ts +1 -32
- package/dist/playground/runtimeAssetCache.js +1 -193
- package/dist/playground/runtimeSession.d.ts +2 -2
- package/dist/playground/runtimeSession.js +11 -11
- package/dist/playground/rust.d.ts +10 -0
- package/dist/playground/rust.js +230 -51
- package/dist/playground/sandbox.d.ts +8 -1
- package/dist/playground/staticStdinRing.d.ts +2 -1
- package/dist/playground/staticStdinRing.js +21 -10
- package/dist/playground/staticWorkerRuntime.d.ts +15 -1
- package/dist/playground/staticWorkerRuntime.js +127 -19
- package/dist/playground/stdinBuffer.d.ts +1 -1
- package/dist/playground/stdinBuffer.js +19 -2
- package/dist/playground/tinygo.d.ts +3 -0
- package/dist/playground/tinygo.js +88 -6
- package/dist/playground/typescript.js +8 -0
- package/dist/playground/v.d.ts +6 -2
- package/dist/playground/v.js +76 -13
- package/dist/playground/wasmAwkVersion.d.ts +13 -13
- package/dist/playground/wasmAwkVersion.js +4 -4
- package/dist/playground/wasmBqnVersion.d.ts +2 -2
- package/dist/playground/wasmBqnVersion.js +2 -2
- package/dist/playground/wasmC3Version.d.ts +2 -2
- package/dist/playground/wasmC3Version.js +2 -2
- package/dist/playground/wasmClojureScriptVersion.d.ts +2 -2
- package/dist/playground/wasmClojureScriptVersion.js +2 -2
- package/dist/playground/wasmCommonLispVersion.d.ts +2 -2
- package/dist/playground/wasmCommonLispVersion.js +2 -2
- package/dist/playground/wasmDIntegrity.d.ts +5 -5
- package/dist/playground/wasmDIntegrity.js +5 -5
- package/dist/playground/wasmDVersion.d.ts +16 -1
- package/dist/playground/wasmDVersion.js +16 -1
- package/dist/playground/wasmDebugVersion.d.ts +1 -1
- package/dist/playground/wasmDebugVersion.js +1 -1
- package/dist/playground/wasmForthVersion.d.ts +2 -2
- package/dist/playground/wasmForthVersion.js +2 -2
- package/dist/playground/wasmGleamVersion.d.ts +2 -2
- package/dist/playground/wasmGleamVersion.js +2 -2
- package/dist/playground/wasmGrainVersion.d.ts +2 -2
- package/dist/playground/wasmGrainVersion.js +2 -2
- package/dist/playground/wasmJVersion.d.ts +2 -2
- package/dist/playground/wasmJVersion.js +2 -2
- package/dist/playground/wasmJanetVersion.js +2 -2
- package/dist/playground/wasmJuliaVersion.js +2 -2
- package/dist/playground/wasmLean4Version.d.ts +1 -110
- package/dist/playground/wasmLean4Version.js +2 -111
- package/dist/playground/wasmLfortranVersion.d.ts +2 -2
- package/dist/playground/wasmLfortranVersion.js +2 -2
- package/dist/playground/wasmLuaVersion.d.ts +1 -1
- package/dist/playground/wasmLuaVersion.js +1 -1
- package/dist/playground/wasmNimVersion.d.ts +9 -9
- package/dist/playground/wasmNimVersion.js +6 -6
- package/dist/playground/wasmOcamlVersion.d.ts +2 -2
- package/dist/playground/wasmOcamlVersion.js +1 -1
- package/dist/playground/wasmPascalVersion.js +2 -2
- package/dist/playground/wasmPerlVersion.js +2 -2
- package/dist/playground/wasmPrologVersion.d.ts +2 -2
- package/dist/playground/wasmPrologVersion.js +2 -2
- package/dist/playground/wasmReScriptVersion.d.ts +2 -2
- package/dist/playground/wasmReScriptVersion.js +2 -2
- package/dist/playground/wasmRustVersion.d.ts +26 -38
- package/dist/playground/wasmRustVersion.js +25 -40
- package/dist/playground/wasmTclVersion.d.ts +4 -4
- package/dist/playground/wasmTclVersion.js +2 -2
- package/dist/playground/wasmTinyGoVersion.d.ts +14 -14
- package/dist/playground/wasmTinyGoVersion.js +14 -14
- package/dist/playground/wasmTypeScriptVersion.d.ts +5 -5
- package/dist/playground/wasmTypeScriptVersion.js +5 -5
- package/dist/playground/worker/cachedClangCompile.js +52 -4
- package/dist/playground/worker/cachedClangExecute.js +6 -5
- package/dist/playground/worker/clang.js +33 -11
- package/dist/playground/worker/cobol.js +3 -3
- package/dist/playground/worker/d.js +63 -7
- package/dist/playground/worker/fortran.js +3 -3
- package/dist/playground/worker/go.js +16 -5
- package/dist/playground/worker/haskell.js +10 -7
- package/dist/playground/worker/java.js +263 -45
- package/dist/playground/worker/javaDebugEvaluator.d.ts +16 -0
- package/dist/playground/worker/javaDebugEvaluator.js +44 -0
- package/dist/playground/worker/javaDebugRuntime.d.ts +24 -0
- package/dist/playground/worker/javaDebugRuntime.js +315 -0
- package/dist/playground/worker/javaOutput.d.ts +11 -0
- package/dist/playground/worker/javaOutput.js +54 -0
- package/dist/playground/worker/lua.js +15 -3
- package/dist/playground/worker/php.js +15 -9
- package/dist/playground/worker/python.js +102 -30
- package/dist/playground/worker/pythonExecution.js +17 -1
- package/dist/playground/worker/pythonWorkspaceFiles.d.ts +6 -0
- package/dist/playground/worker/pythonWorkspaceFiles.js +26 -0
- package/dist/playground/worker/pythonWorkspaceImports.d.ts +4 -0
- package/dist/playground/worker/pythonWorkspaceImports.js +129 -0
- package/dist/playground/worker/r.js +13 -6
- package/dist/playground/worker/ruby.js +13 -0
- package/dist/playground/worker/rubyDebugPreview.d.ts +2 -0
- package/dist/playground/worker/rubyDebugPreview.js +80 -0
- package/dist/playground/worker/rubyTracepoint.d.ts +16 -0
- package/dist/playground/worker/rubyTracepoint.js +162 -0
- package/dist/playground/worker/rust.js +38 -3
- package/dist/playground/worker/sqlite.js +4 -3
- package/dist/playground/worker/tinygo.js +11 -3
- package/dist/playground/worker/typescript.js +2 -3
- package/dist/playground/worker/v.js +32 -7
- package/dist/playground/worker/wat.js +2 -3
- package/dist/playground/worker/zig.js +20 -6
- package/dist/playground/workerSession.d.ts +1 -28
- package/dist/playground/workerSession.js +1 -164
- package/dist/playground/zig.js +4 -0
- package/package.json +66 -15
- package/dist/playground/worker/python.runtime.cases.d.ts +0 -1
- package/dist/playground/worker/python.runtime.cases.js +0 -374
package/README.md
CHANGED
|
@@ -21,10 +21,42 @@ Compiler source pins, patches, and reproducible asset builds live in
|
|
|
21
21
|
[`seo-rii/wasm-llvm`](https://github.com/seo-rii/wasm-llvm); wasm-idle loads the generated
|
|
22
22
|
artifacts from external URLs instead of embedding them in npm packages.
|
|
23
23
|
|
|
24
|
+
The optional [`wasm-idle/container` entry](docs/container-website.md#sharing-the-execution-host)
|
|
25
|
+
shares the language/terminal owner, Bash/Clang setup, cancellation, and workspace synchronization
|
|
26
|
+
between browser applications. Hosts provide their Worker entry and pinned assets; UI and account
|
|
27
|
+
storage remain application-owned. Install `@wasm-idle/container` alongside wasm-idle to use it.
|
|
28
|
+
|
|
24
29
|
Verified downloads can be retained across reloads using a version-pinned, capacity-bounded
|
|
25
30
|
CacheStorage/IndexedDB cache. See [persistent asset cache configuration and coverage](docs/runtime-asset-cache.md)
|
|
26
31
|
for global/per-call opt-out, cleanup and prefetch APIs.
|
|
27
32
|
|
|
33
|
+
## Getting started
|
|
34
|
+
|
|
35
|
+
You need Node.js `^22.22.2`, `^24.15.0`, or `>=26.0.0`, and pnpm 12.9.1. These come from the root
|
|
36
|
+
`package.json` `engines` and `packageManager` fields, and `.npmrc` sets `engine-strict=true`.
|
|
37
|
+
`.tool-versions` pins Node.js 24.20.0 for asdf/mise.
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pnpm install
|
|
41
|
+
pnpm dev
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
`pnpm dev` builds the public workspace packages, then starts Vite with the cross-origin isolation
|
|
45
|
+
headers that `SharedArrayBuffer` requires. The app is served under the `/wasm-idle` base path, for
|
|
46
|
+
example `http://localhost:5173/wasm-idle/`.
|
|
47
|
+
|
|
48
|
+
Most runtime assets are checked in under `static/`. Some compiler payloads are gitignored and must
|
|
49
|
+
be prepared locally before those languages can run:
|
|
50
|
+
|
|
51
|
+
- `pnpm run prepare:test-assets` downloads the pinned Clang (with its matching clangd), OCaml,
|
|
52
|
+
C3, LFortran, Lean 4, and Common Lisp payloads. Pass group names, for example
|
|
53
|
+
`-- clang ocaml`, to prepare only some of them.
|
|
54
|
+
- `pnpm run prepare:wasm-debug-release` adds the LLDB debug runtime. Without it, C, C++, and
|
|
55
|
+
`wasm32-wasip1` Rust debug sessions use the trace fallback.
|
|
56
|
+
|
|
57
|
+
Other runtimes are refreshed from their producers with the `sync:*` scripts described under
|
|
58
|
+
[Monorepo layout](#monorepo-layout).
|
|
59
|
+
|
|
28
60
|
## Language support policy
|
|
29
61
|
|
|
30
62
|
wasm-idle language support must run user code through the real language implementation in the
|
|
@@ -33,87 +65,134 @@ parsers, translators, emulators, or "subset" executors as language support. A la
|
|
|
33
65
|
listed only after normal user code runs on that actual runtime and stdin/stdout behavior, or a
|
|
34
66
|
documented stdin limitation, is covered by tests.
|
|
35
67
|
|
|
68
|
+
## C/C++ SIMD
|
|
69
|
+
|
|
70
|
+
Normal C/C++ runs support `<wasm_simd128.h>` and the SSE through AVX2 intrinsics exposed by
|
|
71
|
+
`<immintrin.h>` or `<x86intrin.h>`, using pinned Emscripten 6.0.0 compatibility headers. The SDK
|
|
72
|
+
compiler, web playground, Bash `clang` command, and bundled LLVM 22 clangd use the same Wasm SIMD profile.
|
|
73
|
+
AVX's 256-bit operations are implemented with pairs of 128-bit Wasm vectors; this does not
|
|
74
|
+
enable native x86 assembly. `<x86intrin.h>` provides this same SIMD subset; CPU-specific APIs such as
|
|
75
|
+
`__rdtsc` are unsupported. FMA, AVX-512 and other x86-only intrinsics are outside this profile.
|
|
76
|
+
|
|
77
|
+
The LLDB/WAMR debugger does not support SIMD, so LLDB builds retain their existing scalar target.
|
|
78
|
+
Use normal runs for SIMD programs. The compatibility sources, licenses, and immutable source
|
|
79
|
+
receipts are maintained by `scripts/sync-clang-simd-headers.mjs`.
|
|
80
|
+
|
|
81
|
+
## Compiler options
|
|
82
|
+
|
|
83
|
+
Expand **Compile options** in the playground to configure each language independently. Settings
|
|
84
|
+
are saved with the workspace and included in shared links and JSON backups. C and C++ expose
|
|
85
|
+
optimization (`-O0` through `-O3`, `-Os`, `-Oz`), warning levels, warnings as errors, pedantic
|
|
86
|
+
diagnostics, and GNU extensions. C supports C89 through C23 and the C2y draft; C++ supports C++98
|
|
87
|
+
through the C++26 draft. The selected C-family flags also configure clangd, so definitions,
|
|
88
|
+
include paths, warnings, and explicit standard overrides agree with execution.
|
|
89
|
+
|
|
90
|
+
| Language | Additional compiler arguments |
|
|
91
|
+
| ------------------------------------- | ------------------------------------------------------------------------------------- |
|
|
92
|
+
| C / C++ / Objective-C / Objective-C++ | Clang flags such as `-DVALUE=42 -Iinclude -Wno-unused-variable` |
|
|
93
|
+
| D | LDC flags such as `-O2 -w -d-version=Example` |
|
|
94
|
+
| Zig | `build-exe` flags such as `-O ReleaseFast` |
|
|
95
|
+
| V | V frontend flags such as `-prod -d example` |
|
|
96
|
+
| COBOL | GnuCOBOL flags such as `-Wall -std=cobol2014 -fixed` |
|
|
97
|
+
| Haskell | GHC flags such as `-O2 -Wall -XGHC2021`; separate program arguments are unavailable |
|
|
98
|
+
| Fortran (`FORTRAN`) | Clang flags for generated C, such as `-O2 -w`; these do not configure f2c or LFortran |
|
|
99
|
+
|
|
100
|
+
Additional arguments follow the C-family selections, allowing explicit overrides. Space-separated
|
|
101
|
+
arguments support single/double quotes and backslash escapes without shell expansion. GHC's
|
|
102
|
+
string-based runtime rejects empty arguments and arguments containing spaces. The toolbar's
|
|
103
|
+
**Program arguments** field passes runtime argv separately, including for C/C++. LLDB builds keep
|
|
104
|
+
their required `-O0` and debug information. Rust, Go, and OCaml retain their existing structured
|
|
105
|
+
profile, target, and backend controls. See the [Clang manual](https://clang.llvm.org/docs/UsersManual.html)
|
|
106
|
+
for the meaning of Clang's compiler flags.
|
|
107
|
+
|
|
36
108
|
## Support matrix
|
|
37
109
|
|
|
38
110
|
All execution entries run in the browser through real runtime, compiler, or interpreter
|
|
39
111
|
implementations. `Editor support` lists browser LSP/compiler diagnostics when wired; `syntax`
|
|
40
|
-
means Monaco syntax highlighting only. C, C++,
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
|
51
|
-
|
|
|
52
|
-
|
|
|
53
|
-
|
|
|
54
|
-
|
|
|
55
|
-
|
|
|
56
|
-
|
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
|
|
|
70
|
-
|
|
|
71
|
-
|
|
|
72
|
-
|
|
|
73
|
-
|
|
|
74
|
-
|
|
|
75
|
-
|
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
|
|
|
79
|
-
|
|
|
80
|
-
|
|
|
81
|
-
|
|
|
82
|
-
|
|
|
83
|
-
|
|
|
84
|
-
|
|
|
85
|
-
|
|
|
86
|
-
|
|
|
87
|
-
|
|
|
88
|
-
|
|
|
89
|
-
|
|
|
90
|
-
|
|
|
91
|
-
|
|
|
92
|
-
|
|
|
93
|
-
|
|
|
94
|
-
|
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
|
|
|
106
|
-
|
|
|
107
|
-
|
|
|
108
|
-
|
|
|
109
|
-
|
|
|
110
|
-
|
|
|
112
|
+
means Monaco syntax highlighting only. C, C++, Objective-C, Objective-C++, V, and
|
|
113
|
+
`wasm32-wasip1` Rust use LLDB/WAMR. Java uses parser-based source hooks compiled by the real
|
|
114
|
+
javac/TeaVM pipeline, with current-frame local values, array inspection and read-only
|
|
115
|
+
primitive/String snapshot expressions. Lua uses the pinned
|
|
116
|
+
MobDebug engine in its real VM; Ruby uses CRuby TracePoint and Binding without rewriting user
|
|
117
|
+
source. Enabled debugger backends run in the page and its Workers without browser extensions.
|
|
118
|
+
JavaScript and TypeScript debugging stays disabled. See
|
|
119
|
+
[language debugger details](docs/debugger-language-support.md) for verified operations and
|
|
120
|
+
remaining producer requirements.
|
|
121
|
+
|
|
122
|
+
| Language | Browser runtime/compiler | Stdin | Editor support | Debug |
|
|
123
|
+
| ---------------- | -------------------------------------------- | ----- | -------------------- | -------------- |
|
|
124
|
+
| GolfScript | Original GolfScript interpreter on Ruby/WASI | Yes | plain text | - |
|
|
125
|
+
| APECode | Original APECode interpreter on Pyodide | Yes | plain text | - |
|
|
126
|
+
| LOLCODE 1.3 | Original lci 1.3 interpreter on WASI | Yes | plain text | - |
|
|
127
|
+
| UHMLANG (엄준식) | Original Umjunsik Go interpreter on WASI | Yes | plain text | - |
|
|
128
|
+
| Aheui | rpaheui 1.2.5 on Pyodide | Yes | plain text | - |
|
|
129
|
+
| Malbolge | Ben Olmstead Malbolge on WASI | Yes | plain text | - |
|
|
130
|
+
| Whitespace | koturn/Whitespace 0.3 on WASI | Yes | plain text | - |
|
|
131
|
+
| C3 | C3 0.8.3 + LLVM/lld WASM (byte ABI) | Yes | c3-lsp | - |
|
|
132
|
+
| C | @wasm-idle/llvm-core / Clang WASI | Yes | clangd | LLDB |
|
|
133
|
+
| C++ | @wasm-idle/llvm-core / Clang WASI | Yes | clangd | LLDB |
|
|
134
|
+
| Objective-C | GNUstep libobjc2 + @wasm-idle/llvm-core | Yes | clangd | LLDB |
|
|
135
|
+
| Objective-C++ | GNUstep libobjc2 + @wasm-idle/llvm-core | Yes | clangd | LLDB |
|
|
136
|
+
| Python | Pyodide | Yes | Python LSP | Trace |
|
|
137
|
+
| Befunge-93 | Chris Pressey Befunge-93 on WASI | Yes | plain text | - |
|
|
138
|
+
| Brainfuck | susam/bfc on WASI | Yes | plain text | - |
|
|
139
|
+
| Hy | Hy 1.3.1 on Pyodide | Yes | syntax | - |
|
|
140
|
+
| Java | TeaVM | Yes | javacs LSP (TeaVM) | Trace (source) |
|
|
141
|
+
| Rust | wasm-rust / browser rustc | Yes | rustc diagnostics | LLDB |
|
|
142
|
+
| Go | wasm-go / browser Go compiler | Yes | compiler diagnostics | Trace |
|
|
143
|
+
| D | wasm-d | Yes | syntax | - |
|
|
144
|
+
| C# | wasm-dotnet | Yes | compiler diagnostics | - |
|
|
145
|
+
| F# | wasm-dotnet | Yes | compiler diagnostics | - |
|
|
146
|
+
| VB.NET | wasm-dotnet | Yes | compiler diagnostics | - |
|
|
147
|
+
| Elixir | AtomVM / Popcorn | Yes | syntax | - |
|
|
148
|
+
| Erlang | AtomVM / Popcorn | Yes | syntax | - |
|
|
149
|
+
| Prolog | SWI-Prolog WASM worker | Yes | syntax | - |
|
|
150
|
+
| Gleam | Gleam precompiled browser runtime | Yes | compiler diagnostics | - |
|
|
151
|
+
| Grain | Grain 0.7.2 js_of_ocaml compiler + WASI | Yes | Grain LSP | - |
|
|
152
|
+
| Perl | Perl WASM worker | Yes | syntax | - |
|
|
153
|
+
| Tcl | Wacl Tcl WASM worker | Yes | syntax | - |
|
|
154
|
+
| AWK | GoAWK WASM worker | Yes | syntax | - |
|
|
155
|
+
| Pascal | pas2js worker | Yes | syntax | - |
|
|
156
|
+
| Forth | WAForth WASM worker | Yes | forth-lsp | - |
|
|
157
|
+
| J | J playground WASM worker | Yes | syntax | - |
|
|
158
|
+
| BQN | CBQN WASM worker | Yes | syntax | - |
|
|
159
|
+
| Janet | Janet VM WASM worker | Yes | syntax | - |
|
|
160
|
+
| Julia | Julia 1.3.0-DEV.560 legacy WASM worker | Yes | syntax | - |
|
|
161
|
+
| Nim | Nim 2.2.4 WASM + clang/lld WASM | Yes | Nim LSP | - |
|
|
162
|
+
| Bash | GNU Bash WASIX / Wasmer SDK | Yes | Bash LSP | - |
|
|
163
|
+
| ClojureScript | cljs.js self-hosted compiler | Yes | syntax | - |
|
|
164
|
+
| ReScript | ReScript 12.3.1 compiler (js_of_ocaml) | Yes | ReScript LSP + types | - |
|
|
165
|
+
| TinyGo | wasm-tinygo | Yes | syntax | - |
|
|
166
|
+
| OCaml | wasm-of-js-of-ocaml / js_of_ocaml | Yes | syntax | - |
|
|
167
|
+
| JavaScript | wasm-typescript / TypeScript service | Yes | TypeScript LSP | - |
|
|
168
|
+
| TypeScript | wasm-typescript / TypeScript service | Yes | TypeScript LSP | - |
|
|
169
|
+
| AssemblyScript | AssemblyScript compiler | Yes | AssemblyScript LSP | - |
|
|
170
|
+
| WAT | WABT | Yes | WAT LSP | - |
|
|
171
|
+
| WASM | Browser WebAssembly + WASI shim | Yes | syntax | - |
|
|
172
|
+
| Lua | Wasmoon | Yes | syntax | MobDebug |
|
|
173
|
+
| Fennel | fennel.lua on Wasmoon | Yes | Fennel LSP | - |
|
|
174
|
+
| Zig | zig_small.wasm | Yes | syntax | - |
|
|
175
|
+
| Scheme | Puppy Scheme / wasm-lisp | Yes | syntax | - |
|
|
176
|
+
| Common Lisp | ECL 26.5.5 (Embeddable Common-Lisp) WASM | Yes | syntax | - |
|
|
177
|
+
| Ruby | CRuby WASI | Yes | syntax | TracePoint |
|
|
178
|
+
| Haskell | ghc-in-browser | Yes | syntax | - |
|
|
179
|
+
| LFortran | LFortran LLVM evaluator (experimental) | Yes | compiler diagnostics | - |
|
|
180
|
+
| Lean 4 | Lean 4.34.1 lean --run (Emscripten) | Yes | Lean LSP (Init) | - |
|
|
181
|
+
| Fortran | f2c + @wasm-idle/llvm-core | Yes | Fortran LSP | - |
|
|
182
|
+
| COBOL | GnuCOBOL 3.2 + @wasm-idle/llvm-core | Yes | SuperBOL OSS LSP | - |
|
|
183
|
+
| V | V 0.5.2 + @wasm-idle/llvm-core | Yes | v-analyzer LSP | LLDB |
|
|
184
|
+
| R | WebR | Yes | syntax | - |
|
|
185
|
+
| Octave | wasm-octave | Yes | syntax | - |
|
|
186
|
+
| DuckDB | DuckDB-Wasm | Files | DuckDB LSP | - |
|
|
187
|
+
| SQLite | sql.js | n/a | syntax | - |
|
|
188
|
+
| PostgreSQL | PostgreSQL 18 / PGlite | Files | syntax | - |
|
|
189
|
+
| PHP | PHP 8.4 / php-wasm | Yes | PHPantom LSP | - |
|
|
111
190
|
|
|
112
191
|
## Browser LLDB debug runtime
|
|
113
192
|
|
|
114
193
|
Normal execution still compiles and instantiates the user module with the browser WebAssembly
|
|
115
|
-
engine and the existing WASI host. C, C++,
|
|
116
|
-
lazy-loaded path:
|
|
194
|
+
engine and the existing WASI host. C, C++, Objective-C, Objective-C++, V, and
|
|
195
|
+
`wasm32-wasip1` Rust debug sessions use a separate, lazy-loaded path:
|
|
117
196
|
|
|
118
197
|
```text
|
|
119
198
|
Monaco / debug UI
|
|
@@ -218,6 +297,7 @@ multi-module guests, and Rust WASI Preview 2/3 debugging remain outside the supp
|
|
|
218
297
|
|
|
219
298
|
```sh
|
|
220
299
|
cd ../wasm-llvm
|
|
300
|
+
WASM_LLVM_CLANG_ARTIFACT_DIR=/path/to/verified-clang-artifacts \
|
|
221
301
|
WASM_LLVM_LLDB_ARTIFACT_DIR=/path/to/lldb-artifacts \
|
|
222
302
|
WASM_LLVM_WAMR_ARTIFACT_DIR=/path/to/wamr-artifacts \
|
|
223
303
|
pnpm prepare:clang-release
|
|
@@ -227,9 +307,16 @@ WASM_RUST_PRODUCER_OUTPUT_ROOT=/path/to/rust-producer-output \
|
|
|
227
307
|
pnpm --dir runtimes/wasm-rust build:producer
|
|
228
308
|
pnpm sync:wasm-rust
|
|
229
309
|
pnpm sync:wasm-debug ../wasm-llvm/out/clang-browser
|
|
230
|
-
|
|
310
|
+
pnpm test:browser:debug:lldb
|
|
231
311
|
```
|
|
232
312
|
|
|
313
|
+
The Clang artifact directory must contain the verified build receipt and its matching raw-input
|
|
314
|
+
identities. The producer rejects historical artifacts without that evidence when assembling a new
|
|
315
|
+
release. For the already reviewed bundled debugger, use `pnpm prepare:wasm-debug-release` in
|
|
316
|
+
`wasm-idle` to install the immutable release selected by the tracked profile.
|
|
317
|
+
The browser command uses the qualified preview path; development-server LLDB qualification is
|
|
318
|
+
tracked separately.
|
|
319
|
+
|
|
233
320
|
The synchronized manifest rejects missing hashes, incompatible Clang/LLDB revisions, and stale
|
|
234
321
|
worker sidecars. The strict browser test covers real C, C++, and Rust breakpoint, step, output, and
|
|
235
322
|
termination paths and rejects trace fallback or a missing debug asset. The Rust producer build is
|
|
@@ -252,20 +339,20 @@ variables or import SvelteKit modules.
|
|
|
252
339
|
| GolfScript<br>`GOLFSCRIPT` | darrenks/golfscript cded5425 (upstream MIT notice), original Ruby source on the bundled Ruby/WASI VM | Loads the unchanged GolfScript CLI in a fresh Ruby VM; supports stack operations, arrays, blocks, arbitrary integers, Ruby string interpolation and original -q/-n/-r options; reads stdin to EOF, or accepts argument-array input after --, with original implicit final output | `runtimeAssets.golfscript.interpreterUrl`, `runtimeAssets.rootUrl`, `runtimeAssets.ruby`, `stdin`, `programArgs`, `activePath`, `workspaceFiles`; code-pinned original script, readonly source files, execution limits and cancellation; prepare initializes Ruby without running GolfScript source |
|
|
253
340
|
| APECode<br>`APECODE` | seo-rii/apecode 0.1.0 (c7ae98d3), original pure Python wheel on Pyodide; upstream has no declared standalone license | Runs the original parser and state-machine interpreter through run_source; reads numeric test cases to EOF, models rock weights, grippers and built-in states, and writes original result/trace bytes through Python file descriptors; each run creates fresh interpreter state | `runtimeAssets.apecode.baseUrl`, `runtimeAssets.rootUrl`, `stdin`, `activePath`, `workspaceFiles`; code-pinned local wheel; execution timeout, output and workspace limits plus cancellation; prepare loads the interpreter without parsing or running user source |
|
|
254
341
|
| LOLCODE 1.3<br>`LOLCODE` | justinmeza/lci v1.3 (GPL-3.0-or-later), wasi-sdk 33.0 build | Runs the unchanged lci lexer, parser and interpreter for LOLCODE 1.3, including functions, loops, arrays, type casts and Unicode string escapes; GIMMEH reads a line and VISIBLE normally adds a newline; each run starts with fresh state | `runtimeAssets.rootUrl`, `stdin`, `activePath`, `workspaceFiles`; fixed interpreter argv; prepare compiles the runtime without executing or validating the source |
|
|
255
|
-
| UHMLANG (엄준식)<br>`UHMLANG`
|
|
342
|
+
| UHMLANG (엄준식)<br>`UHMLANG` | rycont/umjunsik-lang e973f9d2 (MIT), Go 1.25.3 WASI build | Runs the original Go lexer, parser and evaluator with signed 64-bit arithmetic, variables, jumps and conditional statements; numeric stdin is line based and character output writes Unicode code points; each execution starts with fresh state | `runtimeAssets.rootUrl`, `stdin`, `activePath`, `workspaceFiles`; fixed interpreter argv; prepare compiles the runtime without executing or validating the source |
|
|
256
343
|
| Aheui<br>`AHEUI` | aheui/rpaheui 1.2.5 (BSD-2-Clause) on Pyodide 314.0.7; one receipt-verified pure Python wheel | Runs the original rpaheui compiler and interpreter with --no-c --warning-limit=0, 26 stacks, a queue and a port, with Unicode character/integer stdin; normal halt returns its stack value; no handwritten parser or subset executor | `runtimeAssets.rootUrl`, `runtimeAssets.aheui.baseUrl`, `stdin`, `activePath`, `workspaceFiles`; fixed interpreter argv; prepare loads the interpreter without executing source |
|
|
257
344
|
| Malbolge<br>`MALBOLGE` | Original Ben Olmstead interpreter, TryItOnline/malbolge b0869870 (public domain), compiled with WASI SDK 33 | Runs the original 59049-cell ternary and self-modifying interpreter; source-file input is separate from byte stdin/stdout; EOF stores 59048; requires at least two non-whitespace source bytes | `runtimeAssets.rootUrl`, `stdin`, `activePath`, `workspaceFiles`; fixed interpreter argv; prepare compiles the runtime without executing or validating the source |
|
|
258
345
|
| Whitespace<br>`WHITESPACE` | koturn/Whitespace 22a57aab (MIT), compiled with WASI SDK 33 | Runs the upstream Whitespace 0.3 interpreter with a documented divisor-guard correction, copy/slide, heap, labels, calls and signed 32-bit integers; character/numeric stdin and exact stdout; character EOF is -1; source limit 65535 UTF-8 bytes | `runtimeAssets.rootUrl`, `stdin`, `activePath`, `workspaceFiles`; fixed interpreter argv; prepare compiles the runtime without executing or validating the source |
|
|
259
346
|
| 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 |
|
|
260
|
-
| C<br>`C` | @wasm-idle/llvm-core@1.
|
|
261
|
-
| C++<br>`CPP` | @wasm-idle/llvm-core@1.
|
|
262
|
-
| Objective-C<br>`OBJC` | GNUstep libobjc2 v2.3 assets from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.
|
|
263
|
-
| Objective-C++<br>`OBJECTIVECXX` | Same GNUstep libobjc2 v2.3 + libc++ assets as Objective-C from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.
|
|
347
|
+
| C<br>`C` | @wasm-idle/llvm-core@1.2.0 / 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` |
|
|
348
|
+
| C++<br>`CPP` | @wasm-idle/llvm-core@1.2.0 / 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` |
|
|
349
|
+
| Objective-C<br>`OBJC` | GNUstep libobjc2 v2.3 assets from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.2.0 | `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` |
|
|
350
|
+
| Objective-C++<br>`OBJECTIVECXX` | Same GNUstep libobjc2 v2.3 + libc++ assets as Objective-C from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.2.0; 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` |
|
|
264
351
|
| 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` |
|
|
265
352
|
| Befunge-93<br>`BEFUNGE93` | catseye/Befunge-93 8fe4065c (BSD-3-Clause), compiled with WASI SDK 33 | Runs the original interpreter with an 80 by 25 wrapping playfield, signed 32-bit stack, string mode and self-modifying p/g instructions; character and integer stdin share the WASI terminal; character EOF is -1 | `runtimeAssets.rootUrl`, `stdin`, `activePath`, `workspaceFiles`; fixed quiet argv; prepare compiles the runtime without executing or validating the source |
|
|
266
353
|
| Brainfuck<br>`BRAINFUCK` | susam/bfc b1b92fc (MIT), compiled with WASI SDK 33 | Runs the pinned upstream interpreter in a browser Worker with a fresh read-only source filesystem; 30000 wrapping 8-bit cells, UTF-8 byte stdin/stdout, EOF sets the cell to zero | `runtimeAssets.rootUrl`, `stdin`, `activePath`, `workspaceFiles`; fixed interpreter argv; prepare compiles the runtime without executing or validating the source |
|
|
267
354
|
| 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` |
|
|
268
|
-
| Java<br>`JAVA` | @wasm-idle/runtime-teavm@0.0.0 / TeaVM compiler assets
|
|
355
|
+
| Java<br>`JAVA` | @wasm-idle/runtime-teavm@0.0.0 / TeaVM compiler assets; javacs 0.2.38 LSP via TeaVM 0.16.0 | `compiler.wasm` compiles Java to browser WASM/JS; supports `stdin` and `programArgs` | `runtimeAssets.java.baseUrl`/`loader` or `rootUrl`; editor: `runtimeAssets.javaLsp.baseUrl`/`assets` |
|
|
269
356
|
| 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 |
|
|
270
357
|
| 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` |
|
|
271
358
|
| D<br>`D` | wasm-d@0.1.0 / ldc-1.42.0-wasi-smoke | `ldc2 -conf=/toolchain/etc/ldc2.conf -mtriple=wasm32-wasi -c` then `wasm-ld` to WASI preview1; supports `stdin` and `programArgs` | `runtimeAssets.d.moduleUrl` or `PUBLIC_WASM_D_MODULE_URL`; `activePath`, `programArgs` |
|
|
@@ -306,9 +393,9 @@ variables or import SvelteKit modules.
|
|
|
306
393
|
| 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` |
|
|
307
394
|
| 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 |
|
|
308
395
|
| Lean 4<br>`LEAN4` | receipt-pinned `wasm-llvm/producer/lean-browser` release downloaded from its immutable commit into `static/wasm-lean4` | real Lean 4.34.1 frontend and IR interpreter (`lean --run`) built for wasm32 Emscripten with pthreads; imports a wasm32 `Init` library compiled by that build; shared-ring stdin supports interactive `getLine` and EOF | `runtimeAssets.lean4.baseUrl` relocates the reviewed bundle; `stdin`, program arguments, `activePath`, cancellation and execution limits; single-file programs importing `Init` only (no `Std`/`Lean` imports or Lake packages) |
|
|
309
|
-
| Fortran<br>`FORTRAN` | Netlib f2c 2022-09-09 + `@cowasm/f2c 1.0.0` libf2c + @wasm-idle/llvm-core@1.
|
|
310
|
-
| COBOL<br>`COBOL` | GnuCOBOL 3.2 + GMP 6.3.0 assets from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.
|
|
311
|
-
| V<br>`V` | V 0.5.2 compiler, vlib and WASI C sysroot assets from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.
|
|
396
|
+
| Fortran<br>`FORTRAN` | Netlib f2c 2022-09-09 + `@cowasm/f2c 1.0.0` libf2c + @wasm-idle/llvm-core@1.2.0 | 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` |
|
|
397
|
+
| COBOL<br>`COBOL` | GnuCOBOL 3.2 + GMP 6.3.0 assets from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.2.0 | 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` |
|
|
398
|
+
| V<br>`V` | V 0.5.2 compiler, vlib and WASI C sysroot assets from the `wasm-llvm` producer + @wasm-idle/llvm-core@1.2.0 | 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` |
|
|
312
399
|
| 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` |
|
|
313
400
|
| 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_*` |
|
|
314
401
|
| 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` |
|
|
@@ -353,19 +440,25 @@ toolchains can be consumed from pinned external runtime repositories:
|
|
|
353
440
|
- `packages/react`: React hooks around `@wasm-idle/core`.
|
|
354
441
|
- `packages/vue`: Vue composables around `@wasm-idle/core`.
|
|
355
442
|
- `packages/node`: Node.js host helpers for Node-capable sandbox loaders.
|
|
356
|
-
- `runtimes/*`: imported runtime/compiler packages
|
|
357
|
-
`wasm-
|
|
358
|
-
`wasm-
|
|
359
|
-
`
|
|
360
|
-
|
|
443
|
+
- `runtimes/*`: imported runtime/compiler packages `wasm-rust`, `wasm-of-js-of-ocaml`, `wasm-go`,
|
|
444
|
+
`wasm-d`, `wasm-dotnet`, `wasm-typescript`, `wasm-wat`, `wasm-lua`, `wasm-lisp`, `wasm-elixir`,
|
|
445
|
+
`wasm-awk`, `wasm-bash`, `wasm-clojurescript`, `pyodide`, `teavm`, `ruby`, `r`, and
|
|
446
|
+
`js-sandbox`. `wasm-pascal` holds the pas2js compiler wrapper sources and is not a workspace
|
|
447
|
+
package.
|
|
448
|
+
- `runtimes/esolangs`: pinned upstream interpreter sources and licenses for the esoteric
|
|
449
|
+
languages. `pnpm build:esolangs` and the Aheui, APECode, and GolfScript sync scripts turn them
|
|
450
|
+
into `static/wasm-<language>/` assets.
|
|
361
451
|
- `runtimes/wasm-tinygo`: the public `TINYGO` browser compiler consumer plus an explicitly labeled
|
|
362
452
|
legacy AST-to-C development harness. Static releases publish only the receipt-verified upstream
|
|
363
453
|
consumer and its source-pinned toolchain assets.
|
|
454
|
+
- `runtimes/wasm-kotlin` and `runtimes/wasm-scala`: internal compiler candidates. They are not
|
|
455
|
+
registered playground languages or workspace packages.
|
|
364
456
|
- `producers/wasm-php`: standalone, locked producer for the checked-in PHP 8.4 page asset. It is
|
|
365
457
|
outside the root workspace and is never published as an npm package.
|
|
366
|
-
- `static/wasm-zig`, `static/wasm-haskell`, `static/wasm-julia`,
|
|
367
|
-
|
|
368
|
-
|
|
458
|
+
- `static/wasm-zig`, `static/wasm-haskell`, `static/wasm-julia`, `static/wasm-nim`,
|
|
459
|
+
`static/wasm-tcl`, `static/wasm-forth`, `static/wasm-j`, `static/wasm-bqn`, and
|
|
460
|
+
`static/wasm-janet`: bundled browser runtime and compiler assets synced from upstream asset
|
|
461
|
+
builds rather than local workspace packages.
|
|
369
462
|
|
|
370
463
|
Deployment builds retain both legacy `.gz` and canonical `.gz.bin` URLs by default.
|
|
371
464
|
After building and compressing the page, `pnpm run compact:build-runtimes` reports
|
|
@@ -388,9 +481,24 @@ pnpm sync:runtime list
|
|
|
388
481
|
pnpm sync:runtimes
|
|
389
482
|
```
|
|
390
483
|
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
484
|
+
`pnpm sync:runtime list` prints every runtime the wrapper knows. It marks `manual` runtimes, which
|
|
485
|
+
`pnpm sync:runtimes` skips unless `--include-manual` is passed, and `source-required` runtimes,
|
|
486
|
+
which need an explicit source directory and never run from `sync:runtimes`.
|
|
487
|
+
|
|
488
|
+
Default sources differ by runtime:
|
|
489
|
+
|
|
490
|
+
- Runtimes with sources under `runtimes/`, such as `wasm-go`, `wasm-d`, `wasm-dotnet`,
|
|
491
|
+
`wasm-lua`, `wasm-wat`, `wasm-typescript`, `wasm-lisp`, `wasm-awk`, `wasm-pascal`, and
|
|
492
|
+
`wasm-bash`, read `runtimes/<name>/dist`.
|
|
493
|
+
- Some read an installed npm package, such as `webr` or `swipl-wasm`.
|
|
494
|
+
- Some download a pinned upstream release, such as Tcl, Perl, and Octave.
|
|
495
|
+
- Julia and Nim re-verify the checked-in assets and download their pinned release only when those
|
|
496
|
+
assets are missing.
|
|
497
|
+
- J, BQN, and Janet prefer a sibling checkout and otherwise reuse the checked-in assets.
|
|
498
|
+
- Rust, TinyGo, and ClojureScript re-verify and redeploy the checked-in `static/` snapshot.
|
|
499
|
+
|
|
500
|
+
The optional `[sourceDir] [targetDir]` arguments override these defaults. `sync:wasm-php` is not
|
|
501
|
+
part of the wrapper; it consumes `producers/wasm-php/dist` or `WASM_IDLE_WASM_PHP_DIST`.
|
|
394
502
|
|
|
395
503
|
Published packages are built in workspace dependency order. Before publishing, run:
|
|
396
504
|
|
|
@@ -415,7 +523,7 @@ opaque, receipt-pinned storage paths; these files are deployed page assets, not
|
|
|
415
523
|
contents.
|
|
416
524
|
|
|
417
525
|
PHP is built independently under `producers/wasm-php`, with its own lockfile and exact
|
|
418
|
-
`@php-wasm/web-8-4@3.1.
|
|
526
|
+
`@php-wasm/web-8-4@3.1.57` and `@php-wasm/universal@3.1.57` dependencies. Refresh the checked-in
|
|
419
527
|
page asset only when changing that producer:
|
|
420
528
|
|
|
421
529
|
```bash
|
|
@@ -477,15 +585,26 @@ cd wasm-idle
|
|
|
477
585
|
pnpm run sync:wasm-julia
|
|
478
586
|
```
|
|
479
587
|
|
|
480
|
-
Nim
|
|
588
|
+
Nim compiler preparation is owned by `wasm-llvm/producer/nim-browser`; the pinned
|
|
589
|
+
`benagastov/Nim-WASM-Compiler` distribution is delivered under
|
|
481
590
|
`static/wasm-nim/`: Nim 2.2.4 compiled to WebAssembly emits C, then bundled clang/lld WebAssembly
|
|
482
|
-
assets link a runnable WASI module.
|
|
591
|
+
assets link a runnable WASI module. Package the compiler artifacts with the producer,
|
|
592
|
+
then publish the verified bundle and current consumer Worker:
|
|
483
593
|
|
|
484
594
|
```bash
|
|
485
|
-
|
|
486
|
-
pnpm
|
|
595
|
+
# In wasm-llvm: migrate existing verified assets or select a pinned upstream source.
|
|
596
|
+
pnpm package:nim -- --from-runtime /path/to/wasm-idle/static/wasm-nim --out out/nim-browser
|
|
597
|
+
# In wasm-idle:
|
|
598
|
+
pnpm sync:wasm-nim /path/to/wasm-llvm/out/nim-browser
|
|
487
599
|
```
|
|
488
600
|
|
|
601
|
+
D compiler source patches, porting probes and artifact packaging live in
|
|
602
|
+
`wasm-llvm/producer/d-browser`. Import its verified output through
|
|
603
|
+
`WASM_LLVM_D_ARTIFACT_DIR` when building `runtimes/wasm-d`; see [the D browser integration](docs/d-browser.md).
|
|
604
|
+
C3 and LFortran continue using their existing `wasm-llvm` producers. Compiler preparation for
|
|
605
|
+
these four paths belongs to the producer repository, while execution and cache ownership belong
|
|
606
|
+
to `wasm-idle`.
|
|
607
|
+
|
|
489
608
|
## Rust browser integration
|
|
490
609
|
|
|
491
610
|
The demo app publishes the workspace `wasm-rust` compiler as a receipt-pinned executable graph
|
|
@@ -627,7 +746,8 @@ are bounded and verified against the exact expanded size and SHA-256.
|
|
|
627
746
|
|
|
628
747
|
The preparer rejects source or target paths outside their configured roots, checks each redirect
|
|
629
748
|
before following it, writes atomically, and reuses only matching files. With no group argument,
|
|
630
|
-
it prepares
|
|
749
|
+
it prepares the Clang delivery bundle with its matching clangd assets, the complete OCaml browser
|
|
750
|
+
compiler graph, and the C3, LFortran, Lean 4, and Common Lisp payloads.
|
|
631
751
|
`WASM_IDLE_TEST_ASSET_BASE_URL` can select a compatible mirror with the same receipt-verified bytes.
|
|
632
752
|
For protected local browser tests, provide `WASM_IDLE_TEST_BYPASS_COOKIE` through the environment
|
|
633
753
|
in `dev_bypass_waf=<value>` form; the browser cookie jar scopes it to the test origin. Asset
|
|
@@ -786,8 +906,8 @@ and other workspace `.sql` files run first. Preloaded stdin is exposed as the se
|
|
|
786
906
|
`/dev/blob` (`COPY t FROM '/dev/blob'` or `pg_read_file('/dev/blob')`). Override the module with
|
|
787
907
|
`PUBLIC_WASM_POSTGRESQL_MODULE_URL` or `runtimeAssets.postgresql.moduleUrl`.
|
|
788
908
|
PHP dynamically imports the checked-in `static/wasm-php/runtime.mjs` output from the standalone
|
|
789
|
-
`producers/wasm-php` build. That producer pins `@php-wasm/web-8-4@3.1.
|
|
790
|
-
`@php-wasm/universal@3.1.
|
|
909
|
+
`producers/wasm-php` build. That producer pins `@php-wasm/web-8-4@3.1.57` and
|
|
910
|
+
`@php-wasm/universal@3.1.57`. It always creates PHP 8.4; there is no version field or
|
|
791
911
|
environment-based version selector. Override only the module location with
|
|
792
912
|
`PUBLIC_WASM_PHP_MODULE_URL` or `runtimeAssets.php.moduleUrl`. A custom host must serve the entry's
|
|
793
913
|
sibling chunks and assets with compatible CORS and cross-origin isolation headers; a cross-origin
|
|
@@ -855,6 +975,9 @@ the Rust worker:
|
|
|
855
975
|
|
|
856
976
|
- `wasm32-wasip1` runs as preview1 core wasm through `@bjorn3/browser_wasi_shim`
|
|
857
977
|
- `wasm32-wasip2` runs as a preview2 component through `preview2-shim` plus transpiled `jco` output
|
|
978
|
+
- `wasm32-wasip3` also returns a component and runs on the same preview2 path. This works only
|
|
979
|
+
while emitted components keep transitional WASIp2 imports; preview3 imports are rejected until a
|
|
980
|
+
browser preview3 shim exists
|
|
858
981
|
|
|
859
982
|
C-family compilation remains hosted by `@wasm-idle/llvm-core`, while Rust delegates artifact
|
|
860
983
|
execution to `wasm-rust` so the selected target and returned artifact format stay aligned.
|
|
@@ -917,7 +1040,9 @@ const runtimeAssets: PlaygroundRuntimeAssets = {
|
|
|
917
1040
|
stdlibUrl: 'https://cdn.example.com/wasm-zig/std.tar.gz'
|
|
918
1041
|
},
|
|
919
1042
|
lisp: {
|
|
920
|
-
moduleUrl: 'https://cdn.example.com/wasm-lisp/index.js'
|
|
1043
|
+
moduleUrl: 'https://cdn.example.com/wasm-lisp/index.js',
|
|
1044
|
+
manifestUrl: 'https://cdn.example.com/wasm-lisp/runtime-manifest.v2.json',
|
|
1045
|
+
manifestFingerprint: '<runtime-manifest-fingerprint>'
|
|
921
1046
|
},
|
|
922
1047
|
haskell: {
|
|
923
1048
|
moduleUrl: 'https://cdn.example.com/wasm-haskell/dyld.mjs',
|
|
@@ -926,7 +1051,9 @@ const runtimeAssets: PlaygroundRuntimeAssets = {
|
|
|
926
1051
|
},
|
|
927
1052
|
nim: {
|
|
928
1053
|
baseUrl: 'https://cdn.example.com/wasm-nim/',
|
|
929
|
-
workerUrl: 'https://cdn.example.com/wasm-nim/runner-worker.js'
|
|
1054
|
+
workerUrl: 'https://cdn.example.com/wasm-nim/runner-worker.js',
|
|
1055
|
+
// Complete identity and receipt bundle for the served bytes; see below.
|
|
1056
|
+
...nimTrustBundle
|
|
930
1057
|
}
|
|
931
1058
|
};
|
|
932
1059
|
```
|
|
@@ -934,12 +1061,22 @@ const runtimeAssets: PlaygroundRuntimeAssets = {
|
|
|
934
1061
|
Static module overrides such as PHP's `moduleUrl` identify an entry module, not a self-contained
|
|
935
1062
|
file. Mirror its complete sibling asset tree at the same relative paths. Cross-origin asset hosts
|
|
936
1063
|
must provide compatible CORS and COEP/CORP headers and cannot rely on wasm-idle's same-origin gzip
|
|
937
|
-
service worker.
|
|
1064
|
+
service worker. The checkout stores several files from the example above only as `.gz`, for
|
|
1065
|
+
example `wasm-zig/zig_small.wasm.gz`, `wasm-wat/index.js.gz`, `wasm-lisp/index.js.gz`, and
|
|
1066
|
+
`wasm-haskell/bsdtar.wasm.gz`. A host for those URLs must return the decompressed bytes, either as
|
|
1067
|
+
a decompressed file or as that `.gz` served with `Content-Encoding: gzip`; Zig's `std.tar.gz` is
|
|
1068
|
+
served as stored.
|
|
938
1069
|
|
|
939
1070
|
Verified static runtimes such as Janet and Julia intentionally omit URL-only examples: a custom
|
|
940
1071
|
`baseUrl`, `manifestUrl`, or `workerUrl` must be accompanied by every identity and asset-receipt
|
|
941
1072
|
field declared by that runtime's asset config, including the matching `workerReceipt`. Partial
|
|
942
|
-
trust bundles fail closed instead of borrowing receipts from bundled executable bytes.
|
|
1073
|
+
trust bundles fail closed instead of borrowing receipts from bundled executable bytes. In the Nim
|
|
1074
|
+
entry above, `nimTrustBundle` stands for `profileId`, `artifactRevision`, `nimRevision`,
|
|
1075
|
+
`llvmRevision`, `memfsRevision`, `emscriptenRevision`, `manifestFingerprint`, `manifestReceipt`,
|
|
1076
|
+
`nimJavaScriptReceipt`, `nimWasmReceipt`, `nimbaseReceipt`, `clangJavaScriptReceipt`,
|
|
1077
|
+
`clangWasmReceipt`, `lldWasmReceipt`, `memfsWasmReceipt`, `sysrootReceipt`, and `workerReceipt`. An
|
|
1078
|
+
explicit Nim `manifestUrl` must be `runtime-manifest.v2.json?v=<manifestFingerprint>` under
|
|
1079
|
+
`baseUrl`. A `rootUrl` mirror of the bundled Nim files needs no `nim` entry.
|
|
943
1080
|
|
|
944
1081
|
The bundled C/C++ app uses receipt-pinned Clang language sysroots: C initially downloads only the
|
|
945
1082
|
C base, while C++ or a mixed/opaque-language build loads the C++ add-on before compiling or linking.
|
|
@@ -990,8 +1127,8 @@ The pack contains the same locked upstream files, not an import-based subset. Ea
|
|
|
990
1127
|
### Retaining compiler caches across editor navigation
|
|
991
1128
|
|
|
992
1129
|
Create one `createRuntimeSession(assets)` owner per browser application and use
|
|
993
|
-
`session.createBinding()` for each editor or execution panel.
|
|
994
|
-
|
|
1130
|
+
`session.createBinding()` for each editor or execution panel. Clang consumers, Rust,
|
|
1131
|
+
TinyGo, D, C3, Nim, LFortran and Python share a bounded owner for verified assets and compiler modules:
|
|
995
1132
|
|
|
996
1133
|
```ts
|
|
997
1134
|
import { createRuntimeSession } from 'wasm-idle';
|
|
@@ -1005,12 +1142,14 @@ await panel.dispose(); // close this panel; retain the session's cache
|
|
|
1005
1142
|
|
|
1006
1143
|
const nextPanel = session.createBinding(); // another problem, same language
|
|
1007
1144
|
await nextPanel.load('PYTHON');
|
|
1008
|
-
await session.selectLanguage('CPP'); // release old-language panels
|
|
1145
|
+
await session.selectLanguage('CPP'); // release old-language panels; retain verified assets
|
|
1009
1146
|
await session.dispose(); // full, terminal release of this owner
|
|
1010
1147
|
```
|
|
1011
1148
|
|
|
1012
|
-
Selecting a language does not download assets.
|
|
1013
|
-
|
|
1149
|
+
Selecting a language does not download assets. Only the selected language keeps active
|
|
1150
|
+
execution leases; verified compiler assets survive language changes until LRU eviction
|
|
1151
|
+
or session disposal. Selecting an unsupported/server-only language releases active leases
|
|
1152
|
+
without clearing the session's verified assets.
|
|
1014
1153
|
Executions never share mutable Wasm instances, user files or stdin. C/C++ additionally
|
|
1015
1154
|
reuse compiled programs when source, workspace and compiler options match, while
|
|
1016
1155
|
custom loaders and debugging retain the original execution path. Python still creates
|
|
@@ -1019,7 +1158,23 @@ a fresh interpreter after `clear()`; module reuse does not eliminate interpreter
|
|
|
1019
1158
|
The asset cache is LRU-bounded to 64 entries and 256 MiB of logical asset bytes
|
|
1020
1159
|
(not a measurement of the browser engine's compiled-code memory). C/C++ program
|
|
1021
1160
|
artifacts are independently bounded to 8 entries and 32 MiB. `getCacheStats()` exposes
|
|
1022
|
-
cache counters for diagnostics.
|
|
1161
|
+
cache counters for diagnostics. COBOL, Fortran, V and Objective-C/Objective-C++ connect
|
|
1162
|
+
their Clang asset bridges to this same owner. Rust, TinyGo, D, C3, Nim and LFortran use one-shot MessagePorts
|
|
1163
|
+
to request compiler modules from the session after checking the pinned artifact receipt.
|
|
1164
|
+
The host verifies the bytes again before returning a module, including on cache hits.
|
|
1165
|
+
Nim also passes verified Clang, LLD and MemFS modules to its nested compiler Worker.
|
|
1166
|
+
C3 partitions its transformed compiler by the configured memory cap; LFortran shares
|
|
1167
|
+
its compiler module while generating fresh dynamic side modules in each execution.
|
|
1168
|
+
Cache identities include artifact receipts, authorization profiles and compilation
|
|
1169
|
+
settings; TinyGo also separates the memory-cap transformation used for each toolchain.
|
|
1170
|
+
|
|
1171
|
+
`@wasm-idle/core` exports `WorkerSession`, `RuntimeAssetCache` and the
|
|
1172
|
+
`createRuntimeWasmModuleService` / `serveRuntimeWasmModule` / `requestRuntimeWasmModule`
|
|
1173
|
+
helpers for hosts implementing the same ownership model. Cancelling one request closes
|
|
1174
|
+
its subscription without terminating another request that uses the same immutable
|
|
1175
|
+
module. Compiler instances, linear memory, files and compiler helper threads remain
|
|
1176
|
+
owned by individual jobs; this cache does not combine the LLVM binaries embedded in
|
|
1177
|
+
different toolchains.
|
|
1023
1178
|
|
|
1024
1179
|
### Optional idle runtime prewarming
|
|
1025
1180
|
|