wasm-idle 0.7.2 → 1.0.0-next.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 (296) hide show
  1. package/README.md +507 -38
  2. package/dist/index.d.ts +4 -9
  3. package/dist/index.js +2 -4
  4. package/dist/playground/assemblyscript.d.ts +27 -0
  5. package/dist/playground/assemblyscript.js +158 -0
  6. package/dist/playground/assetBridge.js +8 -10
  7. package/dist/playground/assets.d.ts +334 -9
  8. package/dist/playground/assets.js +963 -145
  9. package/dist/playground/awk.d.ts +5 -0
  10. package/dist/playground/awk.js +16 -0
  11. package/dist/playground/bash.d.ts +43 -0
  12. package/dist/playground/bash.js +191 -0
  13. package/dist/playground/bqn.d.ts +5 -0
  14. package/dist/playground/bqn.js +17 -0
  15. package/dist/playground/clang.d.ts +9 -13
  16. package/dist/playground/clang.js +38 -26
  17. package/dist/playground/clojurescript.d.ts +5 -0
  18. package/dist/playground/clojurescript.js +16 -0
  19. package/dist/playground/cobol.d.ts +30 -0
  20. package/dist/playground/cobol.js +185 -0
  21. package/dist/playground/d.d.ts +27 -0
  22. package/dist/playground/d.js +165 -0
  23. package/dist/playground/dotnet.d.ts +74 -0
  24. package/dist/playground/dotnet.js +293 -0
  25. package/dist/playground/duckdb.d.ts +22 -0
  26. package/dist/playground/duckdb.js +112 -0
  27. package/dist/playground/elixir.d.ts +8 -9
  28. package/dist/playground/elixir.js +43 -28
  29. package/dist/playground/forth.d.ts +5 -0
  30. package/dist/playground/forth.js +16 -0
  31. package/dist/playground/fortran.d.ts +30 -0
  32. package/dist/playground/fortran.js +193 -0
  33. package/dist/playground/gleam.d.ts +5 -0
  34. package/dist/playground/gleam.js +17 -0
  35. package/dist/playground/go.d.ts +10 -10
  36. package/dist/playground/go.js +62 -26
  37. package/dist/playground/goDebugInstrumentation.d.ts +1 -0
  38. package/dist/playground/goDebugInstrumentation.js +229 -0
  39. package/dist/playground/haskell.d.ts +27 -0
  40. package/dist/playground/haskell.js +190 -0
  41. package/dist/playground/index.d.ts +1 -1
  42. package/dist/playground/index.js +338 -107
  43. package/dist/playground/j.d.ts +5 -0
  44. package/dist/playground/j.js +17 -0
  45. package/dist/playground/janet.d.ts +5 -0
  46. package/dist/playground/janet.js +15 -0
  47. package/dist/playground/java.d.ts +5 -9
  48. package/dist/playground/java.js +21 -14
  49. package/dist/playground/julia.d.ts +5 -0
  50. package/dist/playground/julia.js +14 -0
  51. package/dist/playground/lisp.d.ts +27 -0
  52. package/dist/playground/lisp.js +165 -0
  53. package/dist/playground/loadingProgress.d.ts +22 -0
  54. package/dist/playground/loadingProgress.js +76 -0
  55. package/dist/playground/lua.d.ts +27 -0
  56. package/dist/playground/lua.js +165 -0
  57. package/dist/playground/nim.d.ts +5 -0
  58. package/dist/playground/nim.js +14 -0
  59. package/dist/playground/objectivec.d.ts +39 -0
  60. package/dist/playground/objectivec.js +255 -0
  61. package/dist/playground/ocaml.d.ts +5 -9
  62. package/dist/playground/ocaml.js +44 -44
  63. package/dist/playground/octave.d.ts +34 -0
  64. package/dist/playground/octave.js +193 -0
  65. package/dist/playground/options.d.ts +9 -40
  66. package/dist/playground/options.js +2 -1
  67. package/dist/playground/pascal.d.ts +5 -0
  68. package/dist/playground/pascal.js +16 -0
  69. package/dist/playground/perl.d.ts +5 -0
  70. package/dist/playground/perl.js +16 -0
  71. package/dist/playground/php.d.ts +27 -0
  72. package/dist/playground/php.js +162 -0
  73. package/dist/playground/prolog.d.ts +5 -0
  74. package/dist/playground/prolog.js +16 -0
  75. package/dist/playground/python.d.ts +9 -13
  76. package/dist/playground/python.js +38 -23
  77. package/dist/playground/r.d.ts +27 -0
  78. package/dist/playground/r.js +167 -0
  79. package/dist/playground/ruby.d.ts +28 -0
  80. package/dist/playground/ruby.js +166 -0
  81. package/dist/playground/runtimeModule.d.ts +1 -0
  82. package/dist/playground/runtimeModule.js +5 -0
  83. package/dist/playground/rust.d.ts +11 -10
  84. package/dist/playground/rust.js +71 -28
  85. package/dist/playground/sandbox.d.ts +2 -4
  86. package/dist/playground/sharedBuffer.d.ts +6 -0
  87. package/dist/playground/sharedBuffer.js +12 -0
  88. package/dist/playground/sqlite.d.ts +23 -0
  89. package/dist/playground/sqlite.js +117 -0
  90. package/dist/playground/staticRuntimeModuleVersion.d.ts +1 -0
  91. package/dist/playground/staticRuntimeModuleVersion.js +2 -0
  92. package/dist/playground/staticWorkerRuntime.d.ts +71 -0
  93. package/dist/playground/staticWorkerRuntime.js +356 -0
  94. package/dist/playground/stdinBuffer.d.ts +9 -7
  95. package/dist/playground/stdinBuffer.js +3 -0
  96. package/dist/playground/swift.d.ts +5 -0
  97. package/dist/playground/swift.js +14 -0
  98. package/dist/playground/tcl.d.ts +5 -0
  99. package/dist/playground/tcl.js +16 -0
  100. package/dist/playground/teavmConfig.d.ts +1 -1
  101. package/dist/playground/teavmConfig.js +2 -2
  102. package/dist/playground/tinygo.d.ts +6 -14
  103. package/dist/playground/tinygo.js +110 -208
  104. package/dist/playground/typescript.d.ts +32 -0
  105. package/dist/playground/typescript.js +176 -0
  106. package/dist/playground/wasm.d.ts +26 -0
  107. package/dist/playground/wasm.js +151 -0
  108. package/dist/playground/wasmAwkVersion.d.ts +1 -0
  109. package/dist/playground/wasmAwkVersion.js +1 -0
  110. package/dist/playground/wasmBashVersion.d.ts +1 -0
  111. package/dist/playground/wasmBashVersion.js +1 -0
  112. package/dist/playground/wasmBqnVersion.d.ts +1 -0
  113. package/dist/playground/wasmBqnVersion.js +1 -0
  114. package/dist/playground/wasmClojureScriptVersion.d.ts +1 -0
  115. package/dist/playground/wasmClojureScriptVersion.js +1 -0
  116. package/dist/playground/wasmDVersion.d.ts +1 -0
  117. package/dist/playground/wasmDVersion.js +1 -0
  118. package/dist/playground/wasmDotnetVersion.d.ts +1 -0
  119. package/dist/playground/wasmDotnetVersion.js +1 -0
  120. package/dist/playground/wasmForthVersion.d.ts +1 -0
  121. package/dist/playground/wasmForthVersion.js +1 -0
  122. package/dist/playground/wasmFortranVersion.d.ts +1 -0
  123. package/dist/playground/wasmFortranVersion.js +1 -0
  124. package/dist/playground/wasmGleamVersion.d.ts +1 -0
  125. package/dist/playground/wasmGleamVersion.js +1 -0
  126. package/dist/playground/wasmGoVersion.d.ts +1 -1
  127. package/dist/playground/wasmGoVersion.js +1 -1
  128. package/dist/playground/wasmHaskellVersion.d.ts +1 -0
  129. package/dist/playground/wasmHaskellVersion.js +1 -0
  130. package/dist/playground/wasmJVersion.d.ts +1 -0
  131. package/dist/playground/wasmJVersion.js +1 -0
  132. package/dist/playground/wasmJanetVersion.d.ts +1 -0
  133. package/dist/playground/wasmJanetVersion.js +1 -0
  134. package/dist/playground/wasmJuliaVersion.d.ts +1 -0
  135. package/dist/playground/wasmJuliaVersion.js +1 -0
  136. package/dist/playground/wasmLispVersion.d.ts +1 -0
  137. package/dist/playground/wasmLispVersion.js +1 -0
  138. package/dist/playground/wasmLuaVersion.d.ts +1 -0
  139. package/dist/playground/wasmLuaVersion.js +1 -0
  140. package/dist/playground/wasmNimVersion.d.ts +1 -0
  141. package/dist/playground/wasmNimVersion.js +1 -0
  142. package/dist/playground/wasmObjectiveCVersion.d.ts +1 -0
  143. package/dist/playground/wasmObjectiveCVersion.js +1 -0
  144. package/dist/playground/wasmOcamlVersion.d.ts +1 -1
  145. package/dist/playground/wasmOcamlVersion.js +1 -1
  146. package/dist/playground/wasmOctaveVersion.d.ts +1 -0
  147. package/dist/playground/wasmOctaveVersion.js +1 -0
  148. package/dist/playground/wasmPascalVersion.d.ts +1 -0
  149. package/dist/playground/wasmPascalVersion.js +1 -0
  150. package/dist/playground/wasmPerlVersion.d.ts +1 -0
  151. package/dist/playground/wasmPerlVersion.js +1 -0
  152. package/dist/playground/wasmPrologVersion.d.ts +1 -0
  153. package/dist/playground/wasmPrologVersion.js +1 -0
  154. package/dist/playground/wasmRVersion.d.ts +1 -0
  155. package/dist/playground/wasmRVersion.js +1 -0
  156. package/dist/playground/wasmRustVersion.d.ts +1 -1
  157. package/dist/playground/wasmRustVersion.js +1 -1
  158. package/dist/playground/wasmSwiftVersion.d.ts +1 -0
  159. package/dist/playground/wasmSwiftVersion.js +1 -0
  160. package/dist/playground/wasmTclVersion.d.ts +1 -0
  161. package/dist/playground/wasmTclVersion.js +1 -0
  162. package/dist/playground/wasmTypeScriptVersion.d.ts +1 -0
  163. package/dist/playground/wasmTypeScriptVersion.js +1 -0
  164. package/dist/playground/wasmWatVersion.d.ts +1 -0
  165. package/dist/playground/wasmWatVersion.js +1 -0
  166. package/dist/playground/wasmZigVersion.d.ts +1 -0
  167. package/dist/playground/wasmZigVersion.js +1 -0
  168. package/dist/playground/wat.d.ts +27 -0
  169. package/dist/playground/wat.js +162 -0
  170. package/dist/playground/worker/assemblyscript.js +331 -0
  171. package/dist/playground/worker/clang.js +48 -9
  172. package/dist/playground/worker/cobol.js +104 -0
  173. package/dist/playground/worker/d.js +156 -0
  174. package/dist/playground/worker/dotnet.js +128 -0
  175. package/dist/playground/worker/duckdb.js +128 -0
  176. package/dist/playground/worker/elixir.js +176 -12
  177. package/dist/playground/worker/fortran.d.ts +1 -0
  178. package/dist/playground/worker/fortran.js +267 -0
  179. package/dist/playground/worker/go.js +208 -33
  180. package/dist/playground/worker/haskell.d.ts +7 -0
  181. package/dist/playground/worker/haskell.js +363 -0
  182. package/dist/playground/worker/java.js +2 -0
  183. package/dist/playground/worker/lisp.d.ts +1 -0
  184. package/dist/playground/worker/lisp.js +161 -0
  185. package/dist/playground/worker/lua.d.ts +1 -0
  186. package/dist/playground/worker/lua.js +155 -0
  187. package/dist/playground/worker/objectivec.d.ts +1 -0
  188. package/dist/playground/worker/objectivec.js +8 -0
  189. package/dist/playground/worker/ocaml.js +24 -24
  190. package/dist/playground/worker/php.d.ts +1 -0
  191. package/dist/playground/worker/php.js +153 -0
  192. package/dist/playground/worker/python.js +93 -39
  193. package/dist/playground/worker/r.d.ts +1 -0
  194. package/dist/playground/worker/r.js +184 -0
  195. package/dist/playground/worker/ruby.d.ts +1 -0
  196. package/dist/playground/worker/ruby.js +197 -0
  197. package/dist/playground/worker/rust.js +206 -8
  198. package/dist/playground/worker/sqlite.d.ts +1 -0
  199. package/dist/playground/worker/sqlite.js +104 -0
  200. package/dist/playground/worker/typescript.d.ts +1 -0
  201. package/dist/playground/worker/typescript.js +160 -0
  202. package/dist/playground/worker/wasm.d.ts +1 -0
  203. package/dist/playground/worker/wasm.js +265 -0
  204. package/dist/playground/worker/wat.d.ts +1 -0
  205. package/dist/playground/worker/wat.js +180 -0
  206. package/dist/playground/worker/zig.d.ts +1 -0
  207. package/dist/playground/worker/zig.js +376 -0
  208. package/dist/playground/workerProgress.d.ts +8 -0
  209. package/dist/playground/workerProgress.js +13 -0
  210. package/dist/playground/workerSession.d.ts +24 -0
  211. package/dist/playground/workerSession.js +107 -0
  212. package/dist/playground/zig.d.ts +28 -0
  213. package/dist/playground/zig.js +176 -0
  214. package/package.json +200 -105
  215. package/dist/clang/app.d.ts +0 -75
  216. package/dist/clang/app.js +0 -744
  217. package/dist/clang/apply.d.ts +0 -2
  218. package/dist/clang/apply.js +0 -11
  219. package/dist/clang/color.d.ts +0 -3
  220. package/dist/clang/color.js +0 -3
  221. package/dist/clang/encode.d.ts +0 -4
  222. package/dist/clang/encode.js +0 -20
  223. package/dist/clang/error.d.ts +0 -14
  224. package/dist/clang/error.js +0 -27
  225. package/dist/clang/gccCompat.d.ts +0 -15
  226. package/dist/clang/gccCompat.js +0 -767
  227. package/dist/clang/index.d.ts +0 -85
  228. package/dist/clang/index.js +0 -1077
  229. package/dist/clang/memory/index.d.ts +0 -4
  230. package/dist/clang/memory/index.js +0 -4
  231. package/dist/clang/memory/memFs.d.ts +0 -35
  232. package/dist/clang/memory/memFs.js +0 -132
  233. package/dist/clang/memory/memory.d.ts +0 -22
  234. package/dist/clang/memory/memory.js +0 -73
  235. package/dist/clang/memory/tar.d.ts +0 -2
  236. package/dist/clang/memory/tar.js +0 -59
  237. package/dist/clang/url.d.ts +0 -4
  238. package/dist/clang/url.js +0 -5
  239. package/dist/clang/wasm.d.ts +0 -4
  240. package/dist/clang/wasm.js +0 -50
  241. package/dist/clangd/config.d.ts +0 -18
  242. package/dist/clangd/config.js +0 -14
  243. package/dist/clangd/jsonStream.d.ts +0 -9
  244. package/dist/clangd/jsonStream.js +0 -48
  245. package/dist/clangd/session.d.ts +0 -18
  246. package/dist/clangd/session.js +0 -112
  247. package/dist/clangd/worker.js +0 -131
  248. package/dist/debug/controller.svelte.d.ts +0 -43
  249. package/dist/debug/controller.svelte.js +0 -268
  250. package/dist/debug/editor/index.d.ts +0 -2
  251. package/dist/debug/editor/index.js +0 -1
  252. package/dist/debug/editor/monaco.d.ts +0 -26
  253. package/dist/debug/editor/monaco.js +0 -128
  254. package/dist/debug/expression.d.ts +0 -26
  255. package/dist/debug/expression.js +0 -547
  256. package/dist/debug/index.d.ts +0 -8
  257. package/dist/debug/index.js +0 -5
  258. package/dist/debug/language/cpp.d.ts +0 -2
  259. package/dist/debug/language/cpp.js +0 -7
  260. package/dist/debug/language/index.d.ts +0 -3
  261. package/dist/debug/language/index.js +0 -2
  262. package/dist/debug/language/python.d.ts +0 -2
  263. package/dist/debug/language/python.js +0 -14
  264. package/dist/debug/language/types.d.ts +0 -6
  265. package/dist/debug/locals.d.ts +0 -2
  266. package/dist/debug/locals.js +0 -8
  267. package/dist/lsp/cpp/server.d.ts +0 -2
  268. package/dist/lsp/cpp/server.js +0 -68
  269. package/dist/lsp/index.d.ts +0 -5
  270. package/dist/lsp/index.js +0 -4
  271. package/dist/lsp/python/main.worker.js +0 -92
  272. package/dist/lsp/python/package/arcturus_python_lsp/__init__.py +0 -3
  273. package/dist/lsp/python/package/arcturus_python_lsp/server.py +0 -462
  274. package/dist/lsp/python/server.d.ts +0 -2
  275. package/dist/lsp/python/server.js +0 -54
  276. package/dist/lsp/registry.d.ts +0 -2
  277. package/dist/lsp/registry.js +0 -12
  278. package/dist/lsp/runtime.d.ts +0 -5
  279. package/dist/lsp/runtime.js +0 -31
  280. package/dist/lsp/types.d.ts +0 -17
  281. package/dist/terminal/Terminal.svelte +0 -422
  282. package/dist/terminal/Terminal.svelte.d.ts +0 -26
  283. package/dist/terminal/index.d.ts +0 -7
  284. package/dist/terminal/index.js +0 -5
  285. package/dist/terminal/plugin/index.d.ts +0 -9
  286. package/dist/terminal/plugin/index.js +0 -19
  287. package/dist/terminal/theme.d.ts +0 -49
  288. package/dist/terminal/theme.js +0 -49
  289. package/dist/terminal/types.d.ts +0 -18
  290. package/dist/utils/vscodeJsonrpcBrowser.d.ts +0 -5
  291. package/dist/utils/vscodeJsonrpcBrowser.js +0 -4
  292. /package/dist/{clangd/worker.d.ts → playground/worker/assemblyscript.d.ts} +0 -0
  293. /package/dist/{debug/language/types.js → playground/worker/cobol.d.ts} +0 -0
  294. /package/dist/{lsp/python/main.worker.d.ts → playground/worker/d.d.ts} +0 -0
  295. /package/dist/{lsp/types.js → playground/worker/dotnet.d.ts} +0 -0
  296. /package/dist/{terminal/types.js → playground/worker/duckdb.d.ts} +0 -0
package/dist/index.d.ts CHANGED
@@ -1,13 +1,8 @@
1
- import Terminal from './terminal';
2
- export { cppDebugLanguageAdapter, pythonDebugLanguageAdapter, evaluateDebugExpression, createDebugSessionController, MonacoDebugView, attachMonacoDebugActions, selectInlineDebugLocals } from './debug';
3
- export { getEditorLanguageServer, getCppLanguageServer, getPythonLanguageServer, resolveCppLanguageServerBaseUrl, resolveCppLanguageServerRuntimeAssetConfig, resolvePythonLanguageServerBaseUrl } from './lsp';
4
1
  import playground, { createPlaygroundBinding } from './playground';
5
- export default Terminal;
2
+ export default playground;
6
3
  export { createPlaygroundBinding, playground };
7
- export type { DebugCommand, DebugFrame, DebugSessionEvent, DebugVariable, SandboxExecutionOptions, TerminalControl } from './terminal';
8
- export type { CompilerDiagnostic } from './playground/options';
9
- export type { DebugSessionController, DebugSessionControllerOptions, DebugWatchValue, MonacoDebugActionsOptions } from './debug';
4
+ export { isSharedArrayBufferAvailable, requireSharedArrayBuffer } from './playground/sharedBuffer';
5
+ export type { DebugCommand, DebugFrame, DebugSessionEvent, DebugVariable, TerminalControl } from '@wasm-idle/core';
6
+ export type { CompilerDiagnostic, SandboxExecutionOptions } from './playground/options';
10
7
  export type { PlaygroundRuntimeAssets, RuntimeAssetConfig, RuntimeAssetLoadRequest, RuntimeAssetLoader, RuntimeAssetLoaderResult } from './playground/assets';
11
8
  export type { BoundSandbox, PlaygroundBinding, PlaygroundTerminalProps, SandboxProgress, SandboxRuntimeAssets } from './playground/sandbox';
12
- export type { DebugLanguageAdapter } from './debug';
13
- export type { EditorLanguageServerHandle, EditorLanguageServerRuntimeOptions } from './lsp';
package/dist/index.js CHANGED
@@ -1,6 +1,4 @@
1
- import Terminal from './terminal';
2
- export { cppDebugLanguageAdapter, pythonDebugLanguageAdapter, evaluateDebugExpression, createDebugSessionController, MonacoDebugView, attachMonacoDebugActions, selectInlineDebugLocals } from './debug';
3
- export { getEditorLanguageServer, getCppLanguageServer, getPythonLanguageServer, resolveCppLanguageServerBaseUrl, resolveCppLanguageServerRuntimeAssetConfig, resolvePythonLanguageServerBaseUrl } from './lsp';
4
1
  import playground, { createPlaygroundBinding } from './playground';
5
- export default Terminal;
2
+ export default playground;
6
3
  export { createPlaygroundBinding, playground };
4
+ export { isSharedArrayBufferAvailable, requireSharedArrayBuffer } from './playground/sharedBuffer';
@@ -0,0 +1,27 @@
1
+ import type { CompilerDiagnostic, SandboxExecutionOptions } from './options';
2
+ import { type PlaygroundRuntimeAssets } from './assets';
3
+ import type { Sandbox, SandboxProgress } from './sandbox';
4
+ declare class AssemblyScriptSandbox implements Sandbox {
5
+ output: any;
6
+ worker?: Worker;
7
+ buffer: import("./sharedBuffer").WasmIdleSharedBuffer;
8
+ pendingInput: string[];
9
+ begin: number;
10
+ elapse: number;
11
+ uid: number;
12
+ exit: boolean;
13
+ moduleUrl: string;
14
+ oncompilerdiagnostic?: (diagnostic: CompilerDiagnostic) => void;
15
+ waitingForInput: boolean;
16
+ pendingEof: boolean;
17
+ private readonly workerSession;
18
+ load(runtimeAssets?: string | PlaygroundRuntimeAssets, _code?: string, _log?: boolean, _args?: string[], _options?: SandboxExecutionOptions, progress?: SandboxProgress): Promise<void>;
19
+ write(input: string): void;
20
+ eof(): void;
21
+ private flushPendingInput;
22
+ run(code: string, prepare: boolean, _log?: boolean, _prog?: SandboxProgress, _args?: string[], options?: SandboxExecutionOptions): Promise<boolean | string>;
23
+ kill(): void;
24
+ terminate(): void;
25
+ clear(): Promise<void>;
26
+ }
27
+ export default AssemblyScriptSandbox;
@@ -0,0 +1,158 @@
1
+ import { resolveAssemblyScriptRuntimeModuleUrl } from './assets';
2
+ import { flushBufferedEof, flushQueuedStdin, resetBufferedStdin } from './stdinBuffer';
3
+ import { createWasmIdleSharedBuffer } from './sharedBuffer';
4
+ import { WorkerSession } from './workerSession';
5
+ import { reportWorkerProgress } from './workerProgress';
6
+ class AssemblyScriptSandbox {
7
+ output = null;
8
+ worker = null;
9
+ buffer = createWasmIdleSharedBuffer(4096);
10
+ pendingInput = [];
11
+ begin = 0;
12
+ elapse = 0;
13
+ uid = 0;
14
+ exit = true;
15
+ moduleUrl = '';
16
+ oncompilerdiagnostic;
17
+ waitingForInput = false;
18
+ pendingEof = false;
19
+ workerSession = new WorkerSession({
20
+ label: 'AssemblyScript',
21
+ onDispose: (worker) => {
22
+ if (this.worker === worker)
23
+ delete this.worker;
24
+ this.exit = true;
25
+ this.waitingForInput = false;
26
+ this.pendingEof = false;
27
+ }
28
+ });
29
+ load(runtimeAssets = '', _code = '', _log = true, _args = [], _options = {}, progress) {
30
+ return this.workerSession.load(async (resolve, reject) => {
31
+ this.pendingInput = [];
32
+ this.waitingForInput = false;
33
+ this.pendingEof = false;
34
+ const currentUrl = typeof window !== 'undefined' ? window.location.href : '';
35
+ const nextModuleUrl = resolveAssemblyScriptRuntimeModuleUrl(runtimeAssets, currentUrl);
36
+ if (this.worker && this.moduleUrl !== nextModuleUrl)
37
+ this.workerSession.reset();
38
+ this.moduleUrl = nextModuleUrl;
39
+ if (!this.worker) {
40
+ this.worker = new (await import('./worker/assemblyscript?worker')).default();
41
+ this.workerSession.attach(this.worker);
42
+ this.worker.onmessage = (event) => {
43
+ if (event.data?.load) {
44
+ progress?.set?.(1);
45
+ resolve();
46
+ }
47
+ if (event.data?.error)
48
+ reject(event.data.error);
49
+ };
50
+ this.worker.postMessage({
51
+ load: true,
52
+ moduleUrl: this.moduleUrl,
53
+ log: _log
54
+ });
55
+ }
56
+ else {
57
+ progress?.set?.(1);
58
+ resolve();
59
+ }
60
+ });
61
+ }
62
+ write(input) {
63
+ this.pendingInput.push(input);
64
+ this.pendingEof = false;
65
+ this.flushPendingInput();
66
+ }
67
+ eof() {
68
+ this.pendingEof = true;
69
+ this.flushPendingInput();
70
+ }
71
+ flushPendingInput() {
72
+ if (!this.waitingForInput)
73
+ return;
74
+ if (flushQueuedStdin(this.pendingInput, this.buffer)) {
75
+ this.waitingForInput = false;
76
+ return;
77
+ }
78
+ if (this.pendingEof) {
79
+ flushBufferedEof(this.buffer);
80
+ this.pendingEof = false;
81
+ this.waitingForInput = false;
82
+ }
83
+ }
84
+ run(code, prepare, _log = true, _prog, _args = [], options = {}) {
85
+ this.exit = false;
86
+ return new Promise((resolve, reject) => {
87
+ if (!this.worker)
88
+ return reject('Worker not loaded');
89
+ const _uid = ++this.uid;
90
+ const operation = this.workerSession.beginRun(this.worker, reject);
91
+ const handler = (event) => {
92
+ if (!this.worker)
93
+ return reject('Worker not loaded');
94
+ if (_uid !== this.uid)
95
+ return (this.worker.onmessage = null);
96
+ const { output, results, error, buffer, diagnostic, progress } = event.data;
97
+ if (buffer) {
98
+ this.waitingForInput = true;
99
+ this.flushPendingInput();
100
+ }
101
+ reportWorkerProgress(_prog, progress);
102
+ if (output)
103
+ this.output?.(output);
104
+ if (diagnostic)
105
+ this.oncompilerdiagnostic?.(diagnostic);
106
+ if (results) {
107
+ this.elapse = Date.now() - this.begin;
108
+ this.exit = true;
109
+ this.waitingForInput = false;
110
+ this.pendingEof = false;
111
+ this.workerSession.complete(operation);
112
+ resolve(results);
113
+ }
114
+ if (error) {
115
+ this.elapse = Date.now() - this.begin;
116
+ this.exit = true;
117
+ this.waitingForInput = false;
118
+ this.pendingEof = false;
119
+ this.workerSession.complete(operation);
120
+ reject(error);
121
+ }
122
+ };
123
+ this.worker.onmessage = handler;
124
+ this.begin = Date.now();
125
+ this.worker.postMessage({
126
+ code,
127
+ prepare,
128
+ buffer: this.buffer,
129
+ stdin: options.stdin,
130
+ activePath: options.activePath || 'main.as.ts',
131
+ workspaceFiles: options.workspaceFiles || [],
132
+ log: _log
133
+ });
134
+ });
135
+ }
136
+ kill() {
137
+ this.terminate();
138
+ }
139
+ terminate() {
140
+ this.waitingForInput = false;
141
+ this.pendingEof = false;
142
+ this.uid += 1;
143
+ this.workerSession.terminate();
144
+ this.exit = true;
145
+ }
146
+ async clear() {
147
+ this.pendingInput = [];
148
+ this.waitingForInput = false;
149
+ this.pendingEof = false;
150
+ if (this.worker)
151
+ this.worker.onmessage = null;
152
+ resetBufferedStdin(this.buffer);
153
+ if (!this.exit) {
154
+ this.terminate();
155
+ }
156
+ }
157
+ }
158
+ export default AssemblyScriptSandbox;
@@ -1,15 +1,9 @@
1
- import { CLANGD_RUNTIME_LOAD_ASSETS, CLANG_RUNTIME_LOAD_ASSETS, JAVA_RUNTIME_LOAD_ASSETS, PYTHON_RUNTIME_LOAD_ASSETS } from './assets';
1
+ import { RUNTIME_LOAD_ASSETS } from './assets';
2
2
  const encoder = new TextEncoder();
3
3
  const transferBuffer = (bytes) => bytes.byteOffset === 0 && bytes.byteLength === bytes.buffer.byteLength
4
4
  ? bytes.buffer
5
5
  : bytes.buffer.slice(bytes.byteOffset, bytes.byteOffset + bytes.byteLength);
6
- const expectedAssetsForRuntime = (runtime) => new Set(runtime === 'python'
7
- ? [...PYTHON_RUNTIME_LOAD_ASSETS]
8
- : runtime === 'java'
9
- ? [...JAVA_RUNTIME_LOAD_ASSETS]
10
- : runtime === 'clang'
11
- ? [...CLANG_RUNTIME_LOAD_ASSETS]
12
- : [...CLANGD_RUNTIME_LOAD_ASSETS]);
6
+ const expectedAssetsForRuntime = (runtime) => new Set(RUNTIME_LOAD_ASSETS[runtime]);
13
7
  class RuntimeLoadProgress {
14
8
  fractions = new Map();
15
9
  expectedAssets;
@@ -28,7 +22,9 @@ class RuntimeLoadProgress {
28
22
  update(asset, loaded, total) {
29
23
  if (!this.expectedAssets.has(asset))
30
24
  return;
31
- const fraction = total && total > 0 ? Math.min(loaded / total, 1) : loaded > 0 ? 1 : 0;
25
+ if (!total || total <= 0)
26
+ return;
27
+ const fraction = Math.min(loaded / total, 1);
32
28
  this.fractions.set(asset, fraction);
33
29
  this.emit();
34
30
  }
@@ -165,7 +161,9 @@ export class WorkerAssetBridge {
165
161
  const response = await fetch(url);
166
162
  if (!response.ok)
167
163
  throw new Error(`Failed to load ${asset}: ${response.status}`);
168
- const contentLength = Number(response.headers.get('content-length') || 0) || undefined;
164
+ const contentLength = Number(response.headers.get('x-wasm-idle-original-content-length') ||
165
+ response.headers.get('content-length') ||
166
+ 0) || undefined;
169
167
  const mimeType = response.headers.get('content-type') || undefined;
170
168
  if (!response.body) {
171
169
  const bytes = new Uint8Array(await response.arrayBuffer());
@@ -19,10 +19,17 @@ export interface RuntimeAssetConfig {
19
19
  }
20
20
  export interface RustRuntimeAssetConfig {
21
21
  compilerUrl?: string;
22
+ debugModuleUrl?: string;
22
23
  }
23
24
  export interface GoRuntimeAssetConfig {
24
25
  compilerUrl?: string;
25
26
  }
27
+ export interface DRuntimeAssetConfig {
28
+ moduleUrl?: string;
29
+ }
30
+ export interface DotnetRuntimeAssetConfig {
31
+ moduleUrl?: string;
32
+ }
26
33
  export interface OcamlRuntimeAssetConfig {
27
34
  moduleUrl?: string;
28
35
  manifestUrl?: string;
@@ -30,14 +37,146 @@ export interface OcamlRuntimeAssetConfig {
30
37
  export interface TinyGoRuntimeAssetConfig {
31
38
  moduleUrl?: string;
32
39
  appUrl?: string;
33
- hostCompileUrl?: string;
34
- disableHostCompile?: boolean;
35
40
  assetLoader?: TinyGoRuntimeAssetLoader;
36
41
  assetPacks?: TinyGoRuntimeAssetPackReference[];
37
42
  }
38
43
  export interface ElixirRuntimeAssetConfig {
39
44
  bundleUrl?: string;
40
45
  }
46
+ export interface ErlangRuntimeAssetConfig {
47
+ bundleUrl?: string;
48
+ }
49
+ export interface TypeScriptRuntimeAssetConfig {
50
+ moduleUrl?: string;
51
+ libUrl?: string;
52
+ }
53
+ export interface WatRuntimeAssetConfig {
54
+ moduleUrl?: string;
55
+ }
56
+ export interface LuaRuntimeAssetConfig {
57
+ moduleUrl?: string;
58
+ }
59
+ export interface HaskellRuntimeAssetConfig {
60
+ moduleUrl?: string;
61
+ rootfsUrl?: string;
62
+ bsdtarUrl?: string;
63
+ mainSoPath?: string;
64
+ searchDirs?: string[];
65
+ }
66
+ export interface FortranRuntimeAssetConfig {
67
+ baseUrl?: string;
68
+ f2cWasmUrl?: string;
69
+ libf2cUrl?: string;
70
+ f2cHeaderUrl?: string;
71
+ analyzerUrl?: string;
72
+ }
73
+ export interface CobolRuntimeAssetConfig {
74
+ baseUrl?: string;
75
+ }
76
+ export interface ObjectiveCRuntimeAssetConfig {
77
+ baseUrl?: string;
78
+ libobjcUrl?: string;
79
+ headersUrl?: string;
80
+ libgnustepBaseUrl?: string;
81
+ libgnustepBaseObjectUrl?: string;
82
+ foundationHeadersUrl?: string;
83
+ libffiUrl?: string;
84
+ }
85
+ export interface ZigRuntimeAssetConfig {
86
+ compilerUrl?: string;
87
+ stdlibUrl?: string;
88
+ }
89
+ export interface LispRuntimeAssetConfig {
90
+ moduleUrl?: string;
91
+ }
92
+ export interface RubyRuntimeAssetConfig {
93
+ moduleUrl?: string;
94
+ wasmUrl?: string;
95
+ }
96
+ export interface RRuntimeAssetConfig {
97
+ baseUrl?: string;
98
+ }
99
+ export interface OctaveRuntimeAssetConfig {
100
+ baseUrl?: string;
101
+ workerUrl?: string;
102
+ manifestUrl?: string;
103
+ }
104
+ export interface PrologRuntimeAssetConfig {
105
+ baseUrl?: string;
106
+ workerUrl?: string;
107
+ }
108
+ export interface GleamRuntimeAssetConfig {
109
+ baseUrl?: string;
110
+ workerUrl?: string;
111
+ manifestUrl?: string;
112
+ }
113
+ export interface PerlRuntimeAssetConfig {
114
+ baseUrl?: string;
115
+ workerUrl?: string;
116
+ }
117
+ export interface TclRuntimeAssetConfig {
118
+ baseUrl?: string;
119
+ workerUrl?: string;
120
+ }
121
+ export interface AwkRuntimeAssetConfig {
122
+ baseUrl?: string;
123
+ workerUrl?: string;
124
+ }
125
+ export interface PascalRuntimeAssetConfig {
126
+ baseUrl?: string;
127
+ workerUrl?: string;
128
+ }
129
+ export interface ForthRuntimeAssetConfig {
130
+ baseUrl?: string;
131
+ workerUrl?: string;
132
+ }
133
+ export interface JRuntimeAssetConfig {
134
+ baseUrl?: string;
135
+ workerUrl?: string;
136
+ }
137
+ export interface BqnRuntimeAssetConfig {
138
+ baseUrl?: string;
139
+ workerUrl?: string;
140
+ }
141
+ export interface JanetRuntimeAssetConfig {
142
+ baseUrl?: string;
143
+ workerUrl?: string;
144
+ }
145
+ export interface JuliaRuntimeAssetConfig {
146
+ baseUrl?: string;
147
+ workerUrl?: string;
148
+ }
149
+ export interface NimRuntimeAssetConfig {
150
+ baseUrl?: string;
151
+ workerUrl?: string;
152
+ }
153
+ export interface BashRuntimeAssetConfig {
154
+ moduleUrl?: string;
155
+ webcUrl?: string;
156
+ workerUrl?: string;
157
+ }
158
+ export interface ClojureScriptRuntimeAssetConfig {
159
+ baseUrl?: string;
160
+ workerUrl?: string;
161
+ }
162
+ export interface SwiftRuntimeAssetConfig {
163
+ baseUrl?: string;
164
+ workerUrl?: string;
165
+ manifestUrl?: string;
166
+ }
167
+ export interface SqliteRuntimeAssetConfig {
168
+ moduleUrl?: string;
169
+ wasmUrl?: string;
170
+ }
171
+ export interface AssemblyScriptRuntimeAssetConfig {
172
+ moduleUrl?: string;
173
+ }
174
+ export interface DuckDbRuntimeAssetConfig {
175
+ moduleUrl?: string;
176
+ }
177
+ export interface PhpRuntimeAssetConfig {
178
+ moduleUrl?: string;
179
+ }
41
180
  export interface PlaygroundRuntimeAssets {
42
181
  rootUrl?: string;
43
182
  python?: RuntimeAssetConfig;
@@ -46,9 +185,43 @@ export interface PlaygroundRuntimeAssets {
46
185
  clangd?: RuntimeAssetConfig;
47
186
  rust?: RustRuntimeAssetConfig;
48
187
  go?: GoRuntimeAssetConfig;
188
+ d?: DRuntimeAssetConfig;
189
+ dotnet?: DotnetRuntimeAssetConfig;
49
190
  ocaml?: OcamlRuntimeAssetConfig;
50
191
  tinygo?: TinyGoRuntimeAssetConfig;
51
192
  elixir?: ElixirRuntimeAssetConfig;
193
+ erlang?: ErlangRuntimeAssetConfig;
194
+ typescript?: TypeScriptRuntimeAssetConfig;
195
+ wat?: WatRuntimeAssetConfig;
196
+ lua?: LuaRuntimeAssetConfig;
197
+ haskell?: HaskellRuntimeAssetConfig;
198
+ fortran?: FortranRuntimeAssetConfig;
199
+ cobol?: CobolRuntimeAssetConfig;
200
+ objectivec?: ObjectiveCRuntimeAssetConfig;
201
+ zig?: ZigRuntimeAssetConfig;
202
+ lisp?: LispRuntimeAssetConfig;
203
+ ruby?: RubyRuntimeAssetConfig;
204
+ r?: RRuntimeAssetConfig;
205
+ octave?: OctaveRuntimeAssetConfig;
206
+ prolog?: PrologRuntimeAssetConfig;
207
+ gleam?: GleamRuntimeAssetConfig;
208
+ perl?: PerlRuntimeAssetConfig;
209
+ tcl?: TclRuntimeAssetConfig;
210
+ awk?: AwkRuntimeAssetConfig;
211
+ pascal?: PascalRuntimeAssetConfig;
212
+ forth?: ForthRuntimeAssetConfig;
213
+ j?: JRuntimeAssetConfig;
214
+ bqn?: BqnRuntimeAssetConfig;
215
+ janet?: JanetRuntimeAssetConfig;
216
+ julia?: JuliaRuntimeAssetConfig;
217
+ nim?: NimRuntimeAssetConfig;
218
+ bash?: BashRuntimeAssetConfig;
219
+ clojurescript?: ClojureScriptRuntimeAssetConfig;
220
+ swift?: SwiftRuntimeAssetConfig;
221
+ assemblyscript?: AssemblyScriptRuntimeAssetConfig;
222
+ duckdb?: DuckDbRuntimeAssetConfig;
223
+ sqlite?: SqliteRuntimeAssetConfig;
224
+ php?: PhpRuntimeAssetConfig;
52
225
  }
53
226
  export interface TinyGoRuntimeAssetLoaderRequest {
54
227
  assetPath: string;
@@ -68,17 +241,169 @@ export interface ResolvedRuntimeAssetConfig {
68
241
  loader?: RuntimeAssetLoader;
69
242
  useAssetBridge: boolean;
70
243
  }
244
+ export interface ResolvedFortranRuntimeAssetConfig {
245
+ baseUrl: string;
246
+ f2cWasmUrl: string;
247
+ libf2cUrl: string;
248
+ f2cHeaderUrl: string;
249
+ analyzerUrl: string;
250
+ }
251
+ export interface ResolvedObjectiveCRuntimeAssetConfig {
252
+ baseUrl: string;
253
+ libobjcUrl: string;
254
+ headersUrl: string;
255
+ libgnustepBaseUrl: string;
256
+ libgnustepBaseObjectUrl: string;
257
+ foundationHeadersUrl: string;
258
+ libffiUrl: string;
259
+ }
71
260
  export declare const PYTHON_RUNTIME_LOAD_ASSETS: readonly ["pyodide.asm.js", "pyodide-lock.json", "pyodide.asm.wasm", "python_stdlib.zip"];
72
261
  export declare const JAVA_RUNTIME_LOAD_ASSETS: readonly ["compiler.wasm-runtime.js", "compiler.wasm", "compile-classlib-teavm.bin", "runtime-classlib-teavm.bin"];
73
- export declare const CLANG_RUNTIME_LOAD_ASSETS: readonly ["bin/memfs.zip", "bin/clang.zip", "bin/lld.zip", "bin/sysroot.tar.zip"];
262
+ export declare const CLANG_RUNTIME_LOAD_ASSETS: readonly ["bin/memfs.wasm.gz", "bin/clang.wasm.gz", "bin/lld.wasm.gz", "bin/sysroot.tar.gz"];
74
263
  export declare const CLANGD_RUNTIME_LOAD_ASSETS: readonly ["clangd.js", "clangd.wasm.gz"];
264
+ export declare const RUNTIME_LOAD_ASSETS: {
265
+ python: readonly ["pyodide.asm.js", "pyodide-lock.json", "pyodide.asm.wasm", "python_stdlib.zip"];
266
+ java: readonly ["compiler.wasm-runtime.js", "compiler.wasm", "compile-classlib-teavm.bin", "runtime-classlib-teavm.bin"];
267
+ clang: readonly ["bin/memfs.wasm.gz", "bin/clang.wasm.gz", "bin/lld.wasm.gz", "bin/sysroot.tar.gz"];
268
+ clangd: readonly ["clangd.js", "clangd.wasm.gz"];
269
+ };
75
270
  export declare function resolveRuntimeAssetConfig(runtime: RuntimeAssetRuntime, options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): ResolvedRuntimeAssetConfig;
76
- export declare function resolveRustCompilerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): any;
77
- export declare function resolveGoCompilerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): any;
78
- export declare function resolveOcamlModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): any;
79
- export declare function resolveOcamlManifestUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): any;
271
+ export declare function resolveRustCompilerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
272
+ export declare function resolveRustDebugModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
273
+ export declare function resolveGoCompilerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
274
+ export declare function resolveDModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
275
+ export declare function resolveDotnetModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
276
+ export declare function resolveOcamlModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
277
+ export declare function resolveOcamlManifestUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
80
278
  export declare function resolveTinyGoAppUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
81
279
  export declare function resolveTinyGoModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
82
- export declare function resolveTinyGoHostCompileUrls(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string[];
83
- export declare function resolveTinyGoHostCompileUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
84
280
  export declare function resolveElixirBundleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
281
+ export declare function resolveErlangBundleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
282
+ export declare function resolveTypeScriptModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
283
+ export declare function resolveWatModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
284
+ export declare function resolveLuaModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
285
+ export declare function resolveZigCompilerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
286
+ export declare function resolveHaskellModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
287
+ export declare function resolveHaskellRootfsUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
288
+ export declare function resolveHaskellBsdtarUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
289
+ export declare function resolveFortranBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
290
+ export declare function resolveFortranF2cWasmUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
291
+ export declare function resolveFortranLibf2cUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
292
+ export declare function resolveFortranF2cHeaderUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
293
+ export declare function resolveFortranAnalyzerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
294
+ export declare function resolveFortranRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): ResolvedFortranRuntimeAssetConfig;
295
+ export declare function resolveCobolBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
296
+ export declare function resolveObjectiveCBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
297
+ export declare function resolveObjectiveCLibobjcUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
298
+ export declare function resolveObjectiveCHeadersUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
299
+ export declare function resolveObjectiveCLibgnustepBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
300
+ export declare function resolveObjectiveCLibgnustepBaseObjectUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
301
+ export declare function resolveObjectiveCFoundationHeadersUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
302
+ export declare function resolveObjectiveCLibffiUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
303
+ export declare function resolveObjectiveCRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): ResolvedObjectiveCRuntimeAssetConfig;
304
+ export declare function resolveZigStdlibUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
305
+ export declare function resolveLispModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
306
+ export declare function resolveRubyWasmUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
307
+ export declare function resolveRBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
308
+ export declare function resolveOctaveBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
309
+ export declare function resolveOctaveWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
310
+ export declare function resolveOctaveManifestUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
311
+ export declare function resolveOctaveRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
312
+ baseUrl: string;
313
+ workerUrl: string;
314
+ manifestUrl: string;
315
+ };
316
+ export declare function resolvePrologBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
317
+ export declare function resolvePrologWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
318
+ export declare function resolvePrologRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
319
+ baseUrl: string;
320
+ workerUrl: string;
321
+ };
322
+ export declare function resolveGleamBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
323
+ export declare function resolveGleamWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
324
+ export declare function resolveGleamManifestUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
325
+ export declare function resolveGleamRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
326
+ baseUrl: string;
327
+ workerUrl: string;
328
+ manifestUrl: string;
329
+ };
330
+ export declare function resolvePerlBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
331
+ export declare function resolvePerlWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
332
+ export declare function resolvePerlRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
333
+ baseUrl: string;
334
+ workerUrl: string;
335
+ };
336
+ export declare function resolveTclBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
337
+ export declare function resolveTclWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
338
+ export declare function resolveTclRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
339
+ baseUrl: string;
340
+ workerUrl: string;
341
+ };
342
+ export declare function resolveAwkBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
343
+ export declare function resolveAwkWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
344
+ export declare function resolveAwkRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
345
+ baseUrl: string;
346
+ workerUrl: string;
347
+ };
348
+ export declare function resolvePascalBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
349
+ export declare function resolvePascalWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
350
+ export declare function resolvePascalRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
351
+ baseUrl: string;
352
+ workerUrl: string;
353
+ };
354
+ export declare function resolveClojureScriptBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
355
+ export declare function resolveClojureScriptWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
356
+ export declare function resolveClojureScriptRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
357
+ baseUrl: string;
358
+ workerUrl: string;
359
+ };
360
+ export declare function resolveForthBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
361
+ export declare function resolveForthWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
362
+ export declare function resolveForthRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
363
+ baseUrl: string;
364
+ workerUrl: string;
365
+ };
366
+ export declare function resolveJBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
367
+ export declare function resolveJWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
368
+ export declare function resolveJRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
369
+ baseUrl: string;
370
+ workerUrl: string;
371
+ };
372
+ export declare function resolveBqnBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
373
+ export declare function resolveBqnWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
374
+ export declare function resolveBqnRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
375
+ baseUrl: string;
376
+ workerUrl: string;
377
+ };
378
+ export declare function resolveJanetBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
379
+ export declare function resolveJanetWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
380
+ export declare function resolveJanetRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
381
+ baseUrl: string;
382
+ workerUrl: string;
383
+ };
384
+ export declare function resolveJuliaBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
385
+ export declare function resolveJuliaWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
386
+ export declare function resolveJuliaRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
387
+ baseUrl: string;
388
+ workerUrl: string;
389
+ };
390
+ export declare function resolveNimBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
391
+ export declare function resolveNimWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
392
+ export declare function resolveNimRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
393
+ baseUrl: string;
394
+ workerUrl: string;
395
+ };
396
+ export declare function resolveSwiftBaseUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
397
+ export declare function resolveSwiftWorkerUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
398
+ export declare function resolveSwiftManifestUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
399
+ export declare function resolveSwiftRuntimeAssetConfig(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): {
400
+ baseUrl: string;
401
+ workerUrl: string;
402
+ manifestUrl: string;
403
+ };
404
+ export declare function resolveSqliteWasmUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
405
+ export declare function resolveAssemblyScriptRuntimeModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
406
+ export declare function resolveDuckDbRuntimeModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
407
+ export declare function resolvePhpRuntimeModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
408
+ export declare function resolveRubyRuntimeModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;
409
+ export declare function resolveSqliteRuntimeModuleUrl(options: string | PlaygroundRuntimeAssets | undefined, currentUrl?: string): string;