wasm-idle 1.1.2 → 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.
Files changed (121) hide show
  1. package/README.md +134 -82
  2. package/dist/container/bash-profile.d.ts +80 -0
  3. package/dist/container/bash-profile.js +328 -0
  4. package/dist/{playground/container → container}/binding.d.ts +21 -8
  5. package/dist/{playground/container → container}/binding.js +109 -25
  6. package/dist/{playground/container → container}/clang-runtime.d.ts +11 -7
  7. package/dist/container/clang-runtime.js +561 -0
  8. package/dist/container/client.d.ts +14 -0
  9. package/dist/{playground/container → container}/client.js +2 -6
  10. package/dist/{playground/container → container}/explorer.d.ts +1 -1
  11. package/dist/container/index.d.ts +11 -0
  12. package/dist/container/index.js +11 -0
  13. package/dist/container/owner-worker.d.ts +19 -0
  14. package/dist/container/owner-worker.js +464 -0
  15. package/dist/{playground/container → container}/protocol.d.ts +12 -1
  16. package/dist/{playground/container → container}/runtime-adapter.d.ts +13 -11
  17. package/dist/{playground/container → container}/runtime-adapter.js +104 -41
  18. package/dist/{playground/container → container}/shell-control.d.ts +2 -2
  19. package/dist/{playground/container → container}/shell-control.js +93 -36
  20. package/dist/{playground/container → container}/workspace.d.ts +5 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/playground/assetBridge.js +5 -2
  23. package/dist/playground/assets.d.ts +8 -0
  24. package/dist/playground/clang.d.ts +5 -1
  25. package/dist/playground/clang.js +61 -5
  26. package/dist/playground/compiledLldb.d.ts +41 -0
  27. package/dist/playground/compiledLldb.js +167 -0
  28. package/dist/playground/d.d.ts +4 -1
  29. package/dist/playground/d.js +78 -9
  30. package/dist/playground/debugDeadline.d.ts +12 -0
  31. package/dist/playground/debugDeadline.js +34 -0
  32. package/dist/playground/debugMailbox.d.ts +12 -0
  33. package/dist/playground/debugMailbox.js +77 -0
  34. package/dist/playground/go.js +9 -4
  35. package/dist/playground/goDebugInstrumentation.js +24 -44
  36. package/dist/playground/java-debug-FMHDKUN6.js +124 -0
  37. package/dist/playground/java-debug-notices.txt +492 -0
  38. package/dist/playground/java.d.ts +17 -1
  39. package/dist/playground/java.js +159 -3
  40. package/dist/playground/javaDebug.d.ts +62 -0
  41. package/dist/playground/javaDebug.js +305 -0
  42. package/dist/playground/javaDebugBridge.d.ts +6 -0
  43. package/dist/playground/javaDebugBridge.js +250 -0
  44. package/dist/playground/javaDebugSource.d.ts +9 -0
  45. package/dist/playground/javaDebugSource.js +4 -0
  46. package/dist/playground/javaRuntimeErrors.js +34 -1
  47. package/dist/playground/lean4Assets.d.ts +1 -25
  48. package/dist/playground/lean4Assets.js +2 -123
  49. package/dist/playground/lfortranAssets.d.ts +2 -2
  50. package/dist/playground/lldbSession.d.ts +23 -2
  51. package/dist/playground/lldbSession.js +278 -58
  52. package/dist/playground/lldbSourcePath.d.ts +2 -0
  53. package/dist/playground/lldbSourcePath.js +9 -0
  54. package/dist/playground/lua.d.ts +20 -1
  55. package/dist/playground/lua.js +190 -8
  56. package/dist/playground/luaDebug.d.ts +1 -0
  57. package/dist/playground/luaDebug.js +1 -0
  58. package/dist/playground/nim.d.ts +1 -0
  59. package/dist/playground/nim.js +8 -0
  60. package/dist/playground/objectivec.d.ts +7 -6
  61. package/dist/playground/objectivec.js +75 -9
  62. package/dist/playground/options.d.ts +10 -4
  63. package/dist/playground/python.d.ts +8 -1
  64. package/dist/playground/python.js +81 -6
  65. package/dist/playground/ruby.d.ts +10 -1
  66. package/dist/playground/ruby.js +66 -1
  67. package/dist/playground/rubyDebug.d.ts +21 -0
  68. package/dist/playground/rubyDebug.js +128 -0
  69. package/dist/playground/rust.d.ts +5 -1
  70. package/dist/playground/rust.js +128 -46
  71. package/dist/playground/sandbox.d.ts +8 -1
  72. package/dist/playground/staticWorkerRuntime.js +8 -2
  73. package/dist/playground/stdinBuffer.d.ts +1 -1
  74. package/dist/playground/stdinBuffer.js +19 -2
  75. package/dist/playground/tinygo.js +7 -0
  76. package/dist/playground/typescript.js +8 -0
  77. package/dist/playground/v.d.ts +3 -2
  78. package/dist/playground/v.js +66 -12
  79. package/dist/playground/wasmC3Version.d.ts +2 -2
  80. package/dist/playground/wasmC3Version.js +2 -2
  81. package/dist/playground/wasmLean4Version.d.ts +1 -110
  82. package/dist/playground/wasmLean4Version.js +2 -111
  83. package/dist/playground/wasmLfortranVersion.d.ts +2 -2
  84. package/dist/playground/wasmLfortranVersion.js +2 -2
  85. package/dist/playground/wasmLuaVersion.d.ts +1 -1
  86. package/dist/playground/wasmLuaVersion.js +1 -1
  87. package/dist/playground/wasmRustVersion.d.ts +26 -38
  88. package/dist/playground/wasmRustVersion.js +25 -40
  89. package/dist/playground/worker/clang.js +1 -1
  90. package/dist/playground/worker/cobol.js +1 -1
  91. package/dist/playground/worker/d.js +51 -2
  92. package/dist/playground/worker/fortran.js +1 -1
  93. package/dist/playground/worker/java.js +188 -35
  94. package/dist/playground/worker/javaDebugEvaluator.d.ts +16 -0
  95. package/dist/playground/worker/javaDebugEvaluator.js +44 -0
  96. package/dist/playground/worker/javaDebugRuntime.d.ts +24 -0
  97. package/dist/playground/worker/javaDebugRuntime.js +315 -0
  98. package/dist/playground/worker/javaOutput.d.ts +11 -0
  99. package/dist/playground/worker/javaOutput.js +54 -0
  100. package/dist/playground/worker/lua.js +13 -0
  101. package/dist/playground/worker/python.js +57 -22
  102. package/dist/playground/worker/ruby.js +13 -0
  103. package/dist/playground/worker/rubyDebugPreview.d.ts +2 -0
  104. package/dist/playground/worker/rubyDebugPreview.js +80 -0
  105. package/dist/playground/worker/rubyTracepoint.d.ts +16 -0
  106. package/dist/playground/worker/rubyTracepoint.js +162 -0
  107. package/dist/playground/worker/rust.js +4 -1
  108. package/dist/playground/worker/v.js +30 -5
  109. package/dist/playground/zig.js +4 -0
  110. package/package.json +55 -11
  111. package/dist/playground/container/ContainerExplorer.svelte +0 -307
  112. package/dist/playground/container/ContainerExplorer.svelte.d.ts +0 -14
  113. package/dist/playground/container/clang-runtime.js +0 -343
  114. package/dist/playground/container/client.d.ts +0 -15
  115. package/dist/playground/container/owner.worker.d.ts +0 -1
  116. package/dist/playground/container/owner.worker.js +0 -390
  117. package/dist/playground/container/release.d.ts +0 -31
  118. package/dist/playground/container/release.js +0 -612
  119. /package/dist/{playground/container → container}/explorer.js +0 -0
  120. /package/dist/{playground/container → container}/protocol.js +0 -0
  121. /package/dist/{playground/container → container}/workspace.js +0 -0
package/README.md CHANGED
@@ -21,6 +21,11 @@ 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.
@@ -60,87 +65,134 @@ parsers, translators, emulators, or "subset" executors as language support. A la
60
65
  listed only after normal user code runs on that actual runtime and stdin/stdout behavior, or a
61
66
  documented stdin limitation, is covered by tests.
62
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
+
63
108
  ## Support matrix
64
109
 
65
110
  All execution entries run in the browser through real runtime, compiler, or interpreter
66
111
  implementations. `Editor support` lists browser LSP/compiler diagnostics when wired; `syntax`
67
- means Monaco syntax highlighting only. C, C++, and `wasm32-wasip1` Rust use the browser LLDB/WAMR
68
- debug runtime; the remaining debug-enabled languages retain wasm-idle's trace controls.
69
-
70
- | Language | Browser runtime/compiler | Stdin | Editor support | Debug |
71
- | -------------- | -------------------------------------------- | ----- | -------------------- | ----- |
72
- | GolfScript | Original GolfScript interpreter on Ruby/WASI | Yes | plain text | - |
73
- | APECode | Original APECode interpreter on Pyodide | Yes | plain text | - |
74
- | LOLCODE 1.3 | Original lci 1.3 interpreter on WASI | Yes | plain text | - |
75
- | UHMLANG (엄준식) | Original Umjunsik Go interpreter on WASI | Yes | plain text | - |
76
- | Aheui | rpaheui 1.2.5 on Pyodide | Yes | plain text | - |
77
- | Malbolge | Ben Olmstead Malbolge on WASI | Yes | plain text | - |
78
- | Whitespace | koturn/Whitespace 0.3 on WASI | Yes | plain text | - |
79
- | C3 | C3 0.8.3 + LLVM/lld WASM (byte ABI) | Yes | compiler diagnostics | - |
80
- | C | @wasm-idle/llvm-core / Clang WASI | Yes | clangd | LLDB |
81
- | C++ | @wasm-idle/llvm-core / Clang WASI | Yes | clangd | LLDB |
82
- | Objective-C | GNUstep libobjc2 + @wasm-idle/llvm-core | Yes | clangd | Trace |
83
- | Objective-C++ | GNUstep libobjc2 + @wasm-idle/llvm-core | Yes | clangd | - |
84
- | Python | Pyodide | Yes | Python LSP | Trace |
85
- | Befunge-93 | Chris Pressey Befunge-93 on WASI | Yes | plain text | - |
86
- | Brainfuck | susam/bfc on WASI | Yes | plain text | - |
87
- | Hy | Hy 1.3.1 on Pyodide | Yes | syntax | - |
88
- | Java | TeaVM | Yes | syntax | - |
89
- | Rust | wasm-rust / browser rustc | Yes | rustc diagnostics | LLDB |
90
- | Go | wasm-go / browser Go compiler | Yes | compiler diagnostics | Trace |
91
- | D | wasm-d | Yes | syntax | - |
92
- | C# | wasm-dotnet | Yes | compiler diagnostics | - |
93
- | F# | wasm-dotnet | Yes | compiler diagnostics | - |
94
- | VB.NET | wasm-dotnet | Yes | compiler diagnostics | - |
95
- | Elixir | AtomVM / Popcorn | Yes | syntax | - |
96
- | Erlang | AtomVM / Popcorn | Yes | syntax | - |
97
- | Prolog | SWI-Prolog WASM worker | Yes | syntax | - |
98
- | Gleam | Gleam precompiled browser runtime | Yes | compiler diagnostics | - |
99
- | Grain | Grain 0.7.2 js_of_ocaml compiler + WASI | Yes | compiler diagnostics | - |
100
- | Perl | Perl WASM worker | Yes | syntax | - |
101
- | Tcl | Wacl Tcl WASM worker | Yes | syntax | - |
102
- | AWK | GoAWK WASM worker | Yes | syntax | - |
103
- | Pascal | pas2js worker | Yes | syntax | - |
104
- | Forth | WAForth WASM worker | Yes | syntax | - |
105
- | J | J playground WASM worker | Yes | syntax | - |
106
- | BQN | CBQN WASM worker | Yes | syntax | - |
107
- | Janet | Janet VM WASM worker | Yes | syntax | - |
108
- | Julia | Julia 1.3.0-DEV.560 legacy WASM worker | Yes | syntax | - |
109
- | Nim | Nim 2.2.4 WASM + clang/lld WASM | Yes | syntax | - |
110
- | Bash | GNU Bash WASIX / Wasmer SDK | Yes | syntax | - |
111
- | ClojureScript | cljs.js self-hosted compiler | Yes | syntax | - |
112
- | ReScript | ReScript 12.3.1 compiler (js_of_ocaml) | Yes | compiler diagnostics | - |
113
- | TinyGo | wasm-tinygo | Yes | syntax | - |
114
- | OCaml | wasm-of-js-of-ocaml / js_of_ocaml | Yes | syntax | - |
115
- | JavaScript | wasm-typescript / TypeScript service | Yes | TypeScript LSP | - |
116
- | TypeScript | wasm-typescript / TypeScript service | Yes | TypeScript LSP | - |
117
- | AssemblyScript | AssemblyScript compiler | Yes | AssemblyScript LSP | - |
118
- | WAT | WABT | Yes | WAT LSP | - |
119
- | WASM | Browser WebAssembly + WASI shim | Yes | syntax | - |
120
- | Lua | Wasmoon | Yes | syntax | - |
121
- | Fennel | fennel.lua on Wasmoon | Yes | syntax | - |
122
- | Zig | zig_small.wasm | Yes | syntax | - |
123
- | Scheme | Puppy Scheme / wasm-lisp | Yes | syntax | - |
124
- | Common Lisp | ECL 26.5.5 (Embeddable Common-Lisp) WASM | Yes | syntax | - |
125
- | Ruby | CRuby WASI | Yes | syntax | - |
126
- | Haskell | ghc-in-browser | Yes | syntax | - |
127
- | LFortran | LFortran LLVM evaluator (experimental) | Yes | compiler diagnostics | - |
128
- | Lean 4 | Lean 4.34.1 lean --run (Emscripten) | Yes | compiler diagnostics | - |
129
- | Fortran | f2c + @wasm-idle/llvm-core | Yes | Fortran LSP | - |
130
- | COBOL | GnuCOBOL 3.2 + @wasm-idle/llvm-core | Yes | syntax | - |
131
- | V | V 0.5.2 + @wasm-idle/llvm-core | Yes | syntax | - |
132
- | R | WebR | Yes | syntax | - |
133
- | Octave | wasm-octave | Yes | syntax | - |
134
- | DuckDB | DuckDB-Wasm | Files | DuckDB LSP | - |
135
- | SQLite | sql.js | n/a | syntax | - |
136
- | PostgreSQL | PostgreSQL 18 / PGlite | Files | syntax | - |
137
- | PHP | PHP 8.4 / php-wasm | Yes | syntax | - |
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 | - |
138
190
 
139
191
  ## Browser LLDB debug runtime
140
192
 
141
193
  Normal execution still compiles and instantiates the user module with the browser WebAssembly
142
- engine and the existing WASI host. C, C++, and `wasm32-wasip1` Rust debug sessions use a separate,
143
- 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:
144
196
 
145
197
  ```text
146
198
  Monaco / debug UI
@@ -287,20 +339,20 @@ variables or import SvelteKit modules.
287
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 |
288
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 |
289
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 |
290
- | 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 |
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 |
291
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 |
292
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 |
293
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 |
294
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 |
295
- | 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` |
296
- | 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` |
297
- | 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` |
298
- | 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` |
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` |
299
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` |
300
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 |
301
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 |
302
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` |
303
- | 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` |
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` |
304
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 |
305
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` |
306
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` |
@@ -341,9 +393,9 @@ variables or import SvelteKit modules.
341
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` |
342
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 |
343
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) |
344
- | 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` |
345
- | 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` |
346
- | 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` |
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` |
347
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` |
348
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_*` |
349
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` |
@@ -0,0 +1,80 @@
1
+ import { type Container, type ContainerOptions, type SnapshotEntry, type HostCommandInvocation, type HostCommandRecord, type HostCommandRoute } from '@wasm-idle/container';
2
+ import { type WasixAssetReference, type WasixSdk, type WasixShellOptions, type WasixShellSession, type WasixWorkerGroup } from '@wasm-idle/container/adapters/wasix';
3
+ export declare const BASH_BIN = "/usr/local/bin";
4
+ export declare const BASH_SYSROOT = "/usr/share/wasm-sysroot";
5
+ export declare const C_SYSROOT = "/usr/share/wasm-sysroot-c";
6
+ /** Expose the verified legacy sysroot through the canonical driver's automatic search paths. */
7
+ export declare function withCanonicalWasiPaths(entries: readonly Omit<SnapshotEntry, 'inode'>[]): readonly Omit<SnapshotEntry, "inode">[];
8
+ /** Pinned assets and worker URLs selected by trusted application code. */
9
+ export interface BashProfileConfiguration {
10
+ manifest: string;
11
+ manifestSha256: string;
12
+ assetURLs: readonly string[];
13
+ sdkUrl: string;
14
+ sdkWorkerUrl: string;
15
+ liveWorkerUrl: string;
16
+ clangWorkerUrl: string;
17
+ sdkAsset?: WasixAssetReference;
18
+ shellAsset?: WasixAssetReference;
19
+ bashWasmSha256: string;
20
+ memory: WasixShellOptions['memory'];
21
+ clangSha256: string;
22
+ linkerSha256: string;
23
+ cacheNamespace: string;
24
+ commandTimeoutMs?: number;
25
+ maxWorkers?: number;
26
+ clangFilesystem?: string;
27
+ /** Requires a matching host Worker with module reuse services. */
28
+ clangModuleServices?: boolean;
29
+ sysrootProfile?: 'full' | 'c-base-v1';
30
+ sysrootLayers?: {
31
+ schemaVersion: 1;
32
+ basePackage: 'llvm-sysroot-c';
33
+ cxxPackage: 'llvm-sysroot-cxx';
34
+ full: {
35
+ sha256: string;
36
+ bytes: number;
37
+ };
38
+ };
39
+ }
40
+ export interface BashProfileOptions {
41
+ config: BashProfileConfiguration;
42
+ sdk: WasixSdk;
43
+ /** The injecting host retains the lifetime of this persistence workspace. */
44
+ workspace?: ContainerOptions['workspace'];
45
+ fetch?: typeof globalThis.fetch;
46
+ onRecord?: (record: HostCommandRecord) => void;
47
+ onInvocation?: (invocation: HostCommandInvocation) => void;
48
+ adapters?: ContainerOptions['adapters'];
49
+ commands?: ContainerOptions['commands'];
50
+ workerGroup?: WasixWorkerGroup;
51
+ /** Registered BusyBox commands chosen by the application's pinned distribution. */
52
+ shellCommands?: readonly string[];
53
+ shellRoutes?: Readonly<Record<string, HostCommandRoute>>;
54
+ }
55
+ /** Compose verified USTAR layers without changing retained header or file bytes. */
56
+ export declare function composeSysrootLayers(base: Uint8Array, cxx: Uint8Array): Uint8Array<ArrayBuffer>;
57
+ /** A shared Bash/Clang owner. Importing this module does not load any runtime assets. */
58
+ export declare function createBashProfile({ config, sdk, workspace, fetch: fetcher, onRecord, onInvocation, adapters, commands, workerGroup, shellCommands, shellRoutes }: BashProfileOptions): Promise<Readonly<{
59
+ container: Container;
60
+ manager: import("@wasm-idle/container").ContainerPackageManager;
61
+ shellAssets: import("@wasm-idle/container").VerifiedAssetLoader;
62
+ workers: WasixWorkerGroup;
63
+ cache: Readonly<{
64
+ enabled: true;
65
+ namespace: string;
66
+ version: string;
67
+ storageReserveBytes: 0;
68
+ }>;
69
+ clangFilesystem: "snapshot" | "live";
70
+ sysrootProfile: "full" | "c-base-v1";
71
+ inspectSysroot: (profile?: string) => {
72
+ sha256: string;
73
+ entries: number;
74
+ files: number;
75
+ } | null;
76
+ prepareCommand: (invocation: HostCommandInvocation, signal: AbortSignal) => Promise<void>;
77
+ prepareClang(profile: "c" | "full", signal: AbortSignal): Promise<string[]>;
78
+ startShell(options?: Pick<WasixShellOptions, "mounts" | "args" | "cwd" | "env">, signal?: AbortSignal): Promise<WasixShellSession>;
79
+ dispose(): Promise<void>;
80
+ }>>;