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
@@ -1,110 +1 @@
1
- export declare const WASM_LEAN4_PROFILE: {
2
- readonly schemaVersion: 1;
3
- readonly profileId: "lean4-4.34.1-wasm32-emscripten-v1";
4
- readonly source: "5045d0056413266e57c625dcd7c365b10e377c52";
5
- readonly version: "4.34.1";
6
- readonly license: "Apache-2.0 AND MIT";
7
- readonly producer: {
8
- readonly repository: "https://github.com/seo-rii/wasm-llvm";
9
- readonly revision: "14ea5ecbc514b0c87338aebf8f2b567020be5750";
10
- readonly path: "artifacts/lean-browser";
11
- };
12
- readonly assets: {
13
- readonly 'producer-receipt.json': {
14
- readonly upstream: "producer-receipt.json";
15
- readonly bytes: 9768;
16
- readonly sha256: "335bd6e1720371fc161859cb7c2858600ec12314c30da1f0e5e503e324a96d42";
17
- };
18
- readonly 'lean.mjs': {
19
- readonly upstream: "lean.mjs";
20
- readonly bytes: 108528;
21
- readonly sha256: "16d6d6cb07c844bedf745f856a364ec61e86c13c4fe13a2e57c0c698a5c5f727";
22
- };
23
- readonly 'lean.wasm.gz.bin': {
24
- readonly upstream: "lean.wasm.gz";
25
- readonly logicalName: "lean.wasm";
26
- readonly encoding: "gzip";
27
- readonly bytes: 20239874;
28
- readonly sha256: "89dc3cb841d487f9e29c1dc3069e7aeb1a63e5ec0267b8250552e3fe90f855bf";
29
- readonly uncompressed: {
30
- readonly bytes: 113033667;
31
- readonly sha256: "d81dbde2ba4aaf0546affca2756477b6d1365a5633080d7119f737e5906ed919";
32
- };
33
- };
34
- readonly 'lean-init.index.json': {
35
- readonly upstream: "lean-init.index.json";
36
- readonly bytes: 321866;
37
- readonly sha256: "030b375cee435f12f7163c58c16d128340f9e20fa27a77ab646198be61906555";
38
- };
39
- readonly 'lean-init-00.pack.gz.bin': {
40
- readonly upstream: "lean-init-00.pack.gz";
41
- readonly logicalName: "lean-init-00.pack";
42
- readonly encoding: "gzip";
43
- readonly bytes: 22626621;
44
- readonly sha256: "c2cea0798b8b3e910188eb79d3d0101452c874f693294d2cf8c360fde125c08e";
45
- readonly uncompressed: {
46
- readonly bytes: 50331648;
47
- readonly sha256: "19734bd892d96cbf4ec7b1d13e1bdccbbee022f3288908ee535e2facfc99d483";
48
- };
49
- };
50
- readonly 'lean-init-01.pack.gz.bin': {
51
- readonly upstream: "lean-init-01.pack.gz";
52
- readonly logicalName: "lean-init-01.pack";
53
- readonly encoding: "gzip";
54
- readonly bytes: 22633878;
55
- readonly sha256: "6e65383d8de425a0c0f5b48430aa5be7c9f2066138080bf213a0435b0fd1d874";
56
- readonly uncompressed: {
57
- readonly bytes: 50331648;
58
- readonly sha256: "2ea9fcd0ede724bfc93bf032b7ee3d09724fbd83a17afaaaad534859e74b1200";
59
- };
60
- };
61
- readonly 'lean-init-02.pack.gz.bin': {
62
- readonly upstream: "lean-init-02.pack.gz";
63
- readonly logicalName: "lean-init-02.pack";
64
- readonly encoding: "gzip";
65
- readonly bytes: 23039094;
66
- readonly sha256: "57cc57d61067fc77d8b72008299e25956a121cd3fdf628941420966de1f762e5";
67
- readonly uncompressed: {
68
- readonly bytes: 50331648;
69
- readonly sha256: "75273ea353191316cb8fc31900ef36ffa7424a4bd62061cdbbba8477510ed3bc";
70
- };
71
- };
72
- readonly 'lean-init-03.pack.gz.bin': {
73
- readonly upstream: "lean-init-03.pack.gz";
74
- readonly logicalName: "lean-init-03.pack";
75
- readonly encoding: "gzip";
76
- readonly bytes: 22382973;
77
- readonly sha256: "e310ddf310d6d89dc7cc583f01213a1eab2684c1ada9e77368ca16637009d72a";
78
- readonly uncompressed: {
79
- readonly bytes: 50331648;
80
- readonly sha256: "480c12f5b808c18f692e9f5f5666bee3c6a2b0473075a3dd1417039b2bf05553";
81
- };
82
- };
83
- readonly 'lean-init-04.pack.gz.bin': {
84
- readonly upstream: "lean-init-04.pack.gz";
85
- readonly logicalName: "lean-init-04.pack";
86
- readonly encoding: "gzip";
87
- readonly bytes: 21886461;
88
- readonly sha256: "f1345c223483bbb8e3c25e73042c5526efbd24301df95c74d30b4799493e6697";
89
- readonly uncompressed: {
90
- readonly bytes: 50331648;
91
- readonly sha256: "5daed6ecf33bfb049e294c72ed161d6a0260440aa371b2be34f26b78377e1178";
92
- };
93
- };
94
- readonly 'lean-init-05.pack.gz.bin': {
95
- readonly upstream: "lean-init-05.pack.gz";
96
- readonly logicalName: "lean-init-05.pack";
97
- readonly encoding: "gzip";
98
- readonly bytes: 9812693;
99
- readonly sha256: "9f8deb32469cbe66669381c8f0fb5d379d506f7935beb29393b19d2c52ac8a52";
100
- readonly uncompressed: {
101
- readonly bytes: 24923128;
102
- readonly sha256: "73ca4bd7a0d07f15d3b88298b7dd273406a92e36da96cb555ebb986ee85b7b14";
103
- };
104
- };
105
- };
106
- readonly workerReceipt: {
107
- readonly bytes: 16049;
108
- readonly sha256: "3611a263c4304246c9ee2967c07be2a1c70764a39d642db87ba0b86bfbe9d519";
109
- };
110
- };
1
+ export { WASM_LEAN4_PROFILE } from '@wasm-idle/lsp/lean4';
@@ -1,111 +1,2 @@
1
- // Generated by sync:wasm-lean4 from the reviewed asset lock.
2
- export const WASM_LEAN4_PROFILE = {
3
- schemaVersion: 1,
4
- profileId: 'lean4-4.34.1-wasm32-emscripten-v1',
5
- source: '5045d0056413266e57c625dcd7c365b10e377c52',
6
- version: '4.34.1',
7
- license: 'Apache-2.0 AND MIT',
8
- producer: {
9
- repository: 'https://github.com/seo-rii/wasm-llvm',
10
- revision: '14ea5ecbc514b0c87338aebf8f2b567020be5750',
11
- path: 'artifacts/lean-browser'
12
- },
13
- assets: {
14
- 'producer-receipt.json': {
15
- upstream: 'producer-receipt.json',
16
- bytes: 9768,
17
- sha256: '335bd6e1720371fc161859cb7c2858600ec12314c30da1f0e5e503e324a96d42'
18
- },
19
- 'lean.mjs': {
20
- upstream: 'lean.mjs',
21
- bytes: 108528,
22
- sha256: '16d6d6cb07c844bedf745f856a364ec61e86c13c4fe13a2e57c0c698a5c5f727'
23
- },
24
- 'lean.wasm.gz.bin': {
25
- upstream: 'lean.wasm.gz',
26
- logicalName: 'lean.wasm',
27
- encoding: 'gzip',
28
- bytes: 20239874,
29
- sha256: '89dc3cb841d487f9e29c1dc3069e7aeb1a63e5ec0267b8250552e3fe90f855bf',
30
- uncompressed: {
31
- bytes: 113033667,
32
- sha256: 'd81dbde2ba4aaf0546affca2756477b6d1365a5633080d7119f737e5906ed919'
33
- }
34
- },
35
- 'lean-init.index.json': {
36
- upstream: 'lean-init.index.json',
37
- bytes: 321866,
38
- sha256: '030b375cee435f12f7163c58c16d128340f9e20fa27a77ab646198be61906555'
39
- },
40
- 'lean-init-00.pack.gz.bin': {
41
- upstream: 'lean-init-00.pack.gz',
42
- logicalName: 'lean-init-00.pack',
43
- encoding: 'gzip',
44
- bytes: 22626621,
45
- sha256: 'c2cea0798b8b3e910188eb79d3d0101452c874f693294d2cf8c360fde125c08e',
46
- uncompressed: {
47
- bytes: 50331648,
48
- sha256: '19734bd892d96cbf4ec7b1d13e1bdccbbee022f3288908ee535e2facfc99d483'
49
- }
50
- },
51
- 'lean-init-01.pack.gz.bin': {
52
- upstream: 'lean-init-01.pack.gz',
53
- logicalName: 'lean-init-01.pack',
54
- encoding: 'gzip',
55
- bytes: 22633878,
56
- sha256: '6e65383d8de425a0c0f5b48430aa5be7c9f2066138080bf213a0435b0fd1d874',
57
- uncompressed: {
58
- bytes: 50331648,
59
- sha256: '2ea9fcd0ede724bfc93bf032b7ee3d09724fbd83a17afaaaad534859e74b1200'
60
- }
61
- },
62
- 'lean-init-02.pack.gz.bin': {
63
- upstream: 'lean-init-02.pack.gz',
64
- logicalName: 'lean-init-02.pack',
65
- encoding: 'gzip',
66
- bytes: 23039094,
67
- sha256: '57cc57d61067fc77d8b72008299e25956a121cd3fdf628941420966de1f762e5',
68
- uncompressed: {
69
- bytes: 50331648,
70
- sha256: '75273ea353191316cb8fc31900ef36ffa7424a4bd62061cdbbba8477510ed3bc'
71
- }
72
- },
73
- 'lean-init-03.pack.gz.bin': {
74
- upstream: 'lean-init-03.pack.gz',
75
- logicalName: 'lean-init-03.pack',
76
- encoding: 'gzip',
77
- bytes: 22382973,
78
- sha256: 'e310ddf310d6d89dc7cc583f01213a1eab2684c1ada9e77368ca16637009d72a',
79
- uncompressed: {
80
- bytes: 50331648,
81
- sha256: '480c12f5b808c18f692e9f5f5666bee3c6a2b0473075a3dd1417039b2bf05553'
82
- }
83
- },
84
- 'lean-init-04.pack.gz.bin': {
85
- upstream: 'lean-init-04.pack.gz',
86
- logicalName: 'lean-init-04.pack',
87
- encoding: 'gzip',
88
- bytes: 21886461,
89
- sha256: 'f1345c223483bbb8e3c25e73042c5526efbd24301df95c74d30b4799493e6697',
90
- uncompressed: {
91
- bytes: 50331648,
92
- sha256: '5daed6ecf33bfb049e294c72ed161d6a0260440aa371b2be34f26b78377e1178'
93
- }
94
- },
95
- 'lean-init-05.pack.gz.bin': {
96
- upstream: 'lean-init-05.pack.gz',
97
- logicalName: 'lean-init-05.pack',
98
- encoding: 'gzip',
99
- bytes: 9812693,
100
- sha256: '9f8deb32469cbe66669381c8f0fb5d379d506f7935beb29393b19d2c52ac8a52',
101
- uncompressed: {
102
- bytes: 24923128,
103
- sha256: '73ca4bd7a0d07f15d3b88298b7dd273406a92e36da96cb555ebb986ee85b7b14'
104
- }
105
- }
106
- },
107
- workerReceipt: {
108
- bytes: 16049,
109
- sha256: '3611a263c4304246c9ee2967c07be2a1c70764a39d642db87ba0b86bfbe9d519'
110
- }
111
- };
1
+ // Execution and editor use the same pinned Lean distribution and asset-cache identity.
2
+ export { WASM_LEAN4_PROFILE } from '@wasm-idle/lsp/lean4';
@@ -22,7 +22,7 @@ export declare const WASM_LFORTRAN_PROFILE: {
22
22
  };
23
23
  };
24
24
  readonly workerReceipt: {
25
- readonly bytes: 13875;
26
- readonly sha256: "6443226c53cdadbbfdc25d43d1c07c4f13d8855cfe5cfd609f45ca9b29a96cdf";
25
+ readonly bytes: 14002;
26
+ readonly sha256: "c6de6d9cabadc5f5ad40a688d97b64239db8594e7723cadd9ed533fb6c6e0de5";
27
27
  };
28
28
  };
@@ -23,7 +23,7 @@ export const WASM_LFORTRAN_PROFILE = {
23
23
  }
24
24
  },
25
25
  workerReceipt: {
26
- bytes: 13875,
27
- sha256: '6443226c53cdadbbfdc25d43d1c07c4f13d8855cfe5cfd609f45ca9b29a96cdf'
26
+ bytes: 14002,
27
+ sha256: 'c6de6d9cabadc5f5ad40a688d97b64239db8594e7723cadd9ed533fb6c6e0de5'
28
28
  }
29
29
  };
@@ -1 +1 @@
1
- export declare const WASM_LUA_ASSET_VERSION = "16efe7a68425db84";
1
+ export declare const WASM_LUA_ASSET_VERSION = "395876d71fc3dac2";
@@ -1 +1 @@
1
- export const WASM_LUA_ASSET_VERSION = '16efe7a68425db84';
1
+ export const WASM_LUA_ASSET_VERSION = '395876d71fc3dac2';
@@ -1,8 +1,8 @@
1
1
  export declare const WASM_RUST_RUNTIME_PROFILE: Readonly<{
2
- readonly profileId: "wasm-rust-7f65a4c793bc46e94bc6844d93b94eb5499610932ca111f7079300a21a731105";
2
+ readonly profileId: "wasm-rust-6990bddaebda5337b365913696303cc2c6c3251c6143721f4b0b58defd83411f";
3
3
  readonly protocolVersion: 1;
4
4
  readonly manifestPath: "runtime/runtime-manifest.v3.json";
5
- readonly manifestFingerprint: "7f65a4c793bc46e94bc6844d93b94eb5499610932ca111f7079300a21a731105";
5
+ readonly manifestFingerprint: "6990bddaebda5337b365913696303cc2c6c3251c6143721f4b0b58defd83411f";
6
6
  readonly manifestReceipt: {
7
7
  readonly bytes: 6185;
8
8
  readonly sha256: "30b210003632395a1effd19f7a46565d5f8c52a9d3a28a310fa24219f97a5a9a";
@@ -169,12 +169,12 @@ export declare const WASM_RUST_EXECUTABLE_GRAPH_PROFILE: Readonly<{
169
169
  readonly encoding: "identity";
170
170
  };
171
171
  readonly storage: {
172
- readonly bytes: 6936;
173
- readonly sha256: "3a7d5ad84676ceabef0758be7230abb97ef496375b2d4838cc25d02371465f7b";
172
+ readonly bytes: 10748;
173
+ readonly sha256: "b18798a82090629e5f86524476d757932de74af580431874c2eeebf6b704cb0f";
174
174
  };
175
175
  readonly logical: {
176
- readonly bytes: 6936;
177
- readonly sha256: "3a7d5ad84676ceabef0758be7230abb97ef496375b2d4838cc25d02371465f7b";
176
+ readonly bytes: 10748;
177
+ readonly sha256: "b18798a82090629e5f86524476d757932de74af580431874c2eeebf6b704cb0f";
178
178
  };
179
179
  readonly imports: readonly [{
180
180
  readonly kind: "static";
@@ -190,20 +190,8 @@ export declare const WASM_RUST_EXECUTABLE_GRAPH_PROFILE: Readonly<{
190
190
  readonly target: "browser-stdin.js";
191
191
  }, {
192
192
  readonly kind: "static";
193
- readonly specifier: "./vendor/browser_wasi_shim/fd.js";
194
- readonly target: "vendor/browser_wasi_shim/fd.js";
195
- }, {
196
- readonly kind: "static";
197
- readonly specifier: "./vendor/browser_wasi_shim/fs_mem.js";
198
- readonly target: "vendor/browser_wasi_shim/fs_mem.js";
199
- }, {
200
- readonly kind: "static";
201
- readonly specifier: "./vendor/browser_wasi_shim/wasi.js";
202
- readonly target: "vendor/browser_wasi_shim/wasi.js";
203
- }, {
204
- readonly kind: "static";
205
- readonly specifier: "./vendor/browser_wasi_shim/wasi_defs.js";
206
- readonly target: "vendor/browser_wasi_shim/wasi_defs.js";
193
+ readonly specifier: "./vendor/browser_wasi_shim/index.js";
194
+ readonly target: "vendor/browser_wasi_shim/index.js";
207
195
  }];
208
196
  readonly assets: readonly [];
209
197
  readonly externals: readonly [];
@@ -370,12 +358,12 @@ export declare const WASM_RUST_EXECUTABLE_GRAPH_PROFILE: Readonly<{
370
358
  readonly encoding: "identity";
371
359
  };
372
360
  readonly storage: {
373
- readonly bytes: 5220;
374
- readonly sha256: "52164fb602e546e61e6a5a2e09ae3c61aba9377c1b9918b0a788d92e4c497a5b";
361
+ readonly bytes: 5819;
362
+ readonly sha256: "8933c8f043fb3dbee28d4f61d8a3ea16a372b2c833b1071a6531071388fed730";
375
363
  };
376
364
  readonly logical: {
377
- readonly bytes: 5220;
378
- readonly sha256: "52164fb602e546e61e6a5a2e09ae3c61aba9377c1b9918b0a788d92e4c497a5b";
365
+ readonly bytes: 5819;
366
+ readonly sha256: "8933c8f043fb3dbee28d4f61d8a3ea16a372b2c833b1071a6531071388fed730";
379
367
  };
380
368
  readonly imports: readonly [];
381
369
  readonly assets: readonly [];
@@ -387,12 +375,12 @@ export declare const WASM_RUST_EXECUTABLE_GRAPH_PROFILE: Readonly<{
387
375
  readonly encoding: "identity";
388
376
  };
389
377
  readonly storage: {
390
- readonly bytes: 22093;
391
- readonly sha256: "72cd8fe5c7999ffa6e144b3d6ea3691686843063dc8405274c2573f1ea8356a2";
378
+ readonly bytes: 24122;
379
+ readonly sha256: "fc799b595d8d4022cbf02328673b5bb08ad0f86be0da9ac0b3ac12e9f5d343fa";
392
380
  };
393
381
  readonly logical: {
394
- readonly bytes: 22093;
395
- readonly sha256: "72cd8fe5c7999ffa6e144b3d6ea3691686843063dc8405274c2573f1ea8356a2";
382
+ readonly bytes: 24122;
383
+ readonly sha256: "fc799b595d8d4022cbf02328673b5bb08ad0f86be0da9ac0b3ac12e9f5d343fa";
396
384
  };
397
385
  readonly imports: readonly [{
398
386
  readonly kind: "static";
@@ -468,12 +456,12 @@ export declare const WASM_RUST_EXECUTABLE_GRAPH_PROFILE: Readonly<{
468
456
  readonly encoding: "identity";
469
457
  };
470
458
  readonly storage: {
471
- readonly bytes: 35204;
472
- readonly sha256: "82e10d23d19eee77c662ccae5ae3fe946191bcc5aee8e7528317c59add549321";
459
+ readonly bytes: 37956;
460
+ readonly sha256: "d948487286c5920a5bbdaab94188ebeeadd8e405be74f4839c1cf8ddaf083c52";
473
461
  };
474
462
  readonly logical: {
475
- readonly bytes: 35204;
476
- readonly sha256: "82e10d23d19eee77c662ccae5ae3fe946191bcc5aee8e7528317c59add549321";
463
+ readonly bytes: 37956;
464
+ readonly sha256: "d948487286c5920a5bbdaab94188ebeeadd8e405be74f4839c1cf8ddaf083c52";
477
465
  };
478
466
  readonly imports: readonly [{
479
467
  readonly kind: "static";
@@ -549,12 +537,12 @@ export declare const WASM_RUST_EXECUTABLE_GRAPH_PROFILE: Readonly<{
549
537
  readonly encoding: "identity";
550
538
  };
551
539
  readonly storage: {
552
- readonly bytes: 3686;
553
- readonly sha256: "cfbc70c3349b35c1f510ead79fdfb95bb29700f2566716b6b5fa0d1017cd00d7";
540
+ readonly bytes: 3969;
541
+ readonly sha256: "c3ee4682af8d8b9f338f1258fdff5701754f72753aa1b5385b7848bff1ff3e8d";
554
542
  };
555
543
  readonly logical: {
556
- readonly bytes: 3686;
557
- readonly sha256: "cfbc70c3349b35c1f510ead79fdfb95bb29700f2566716b6b5fa0d1017cd00d7";
544
+ readonly bytes: 3969;
545
+ readonly sha256: "c3ee4682af8d8b9f338f1258fdff5701754f72753aa1b5385b7848bff1ff3e8d";
558
546
  };
559
547
  readonly imports: readonly [{
560
548
  readonly kind: "static";
@@ -1421,6 +1409,6 @@ export declare const WASM_RUST_EXECUTABLE_GRAPH_PROFILE: Readonly<{
1421
1409
  readonly externals: readonly [];
1422
1410
  };
1423
1411
  };
1424
- readonly fingerprint: "8216ff2b93e5d712c78033636c02aadfa8a1bbfd1de88c6bfa4995b4ea0b4870";
1412
+ readonly fingerprint: "5e2563e8a985fe3a30a209aa7cb7d53cdfd2b0b8af1c1a96b7e8f2d08046bfee";
1425
1413
  }>;
1426
- export declare const WASM_RUST_ASSET_VERSION: "7f65a4c793bc46e94bc6844d93b94eb5499610932ca111f7079300a21a731105";
1414
+ export declare const WASM_RUST_ASSET_VERSION: "6990bddaebda5337b365913696303cc2c6c3251c6143721f4b0b58defd83411f";
@@ -1,8 +1,8 @@
1
1
  export const WASM_RUST_RUNTIME_PROFILE = Object.freeze({
2
- profileId: 'wasm-rust-7f65a4c793bc46e94bc6844d93b94eb5499610932ca111f7079300a21a731105',
2
+ profileId: 'wasm-rust-6990bddaebda5337b365913696303cc2c6c3251c6143721f4b0b58defd83411f',
3
3
  protocolVersion: 1,
4
4
  manifestPath: 'runtime/runtime-manifest.v3.json',
5
- manifestFingerprint: '7f65a4c793bc46e94bc6844d93b94eb5499610932ca111f7079300a21a731105',
5
+ manifestFingerprint: '6990bddaebda5337b365913696303cc2c6c3251c6143721f4b0b58defd83411f',
6
6
  manifestReceipt: {
7
7
  bytes: 6185,
8
8
  sha256: '30b210003632395a1effd19f7a46565d5f8c52a9d3a28a310fa24219f97a5a9a'
@@ -181,12 +181,12 @@ export const WASM_RUST_EXECUTABLE_GRAPH_PROFILE = Object.freeze({
181
181
  encoding: 'identity'
182
182
  },
183
183
  storage: {
184
- bytes: 6936,
185
- sha256: '3a7d5ad84676ceabef0758be7230abb97ef496375b2d4838cc25d02371465f7b'
184
+ bytes: 10748,
185
+ sha256: 'b18798a82090629e5f86524476d757932de74af580431874c2eeebf6b704cb0f'
186
186
  },
187
187
  logical: {
188
- bytes: 6936,
189
- sha256: '3a7d5ad84676ceabef0758be7230abb97ef496375b2d4838cc25d02371465f7b'
188
+ bytes: 10748,
189
+ sha256: 'b18798a82090629e5f86524476d757932de74af580431874c2eeebf6b704cb0f'
190
190
  },
191
191
  imports: [
192
192
  {
@@ -206,23 +206,8 @@ export const WASM_RUST_EXECUTABLE_GRAPH_PROFILE = Object.freeze({
206
206
  },
207
207
  {
208
208
  kind: 'static',
209
- specifier: './vendor/browser_wasi_shim/fd.js',
210
- target: 'vendor/browser_wasi_shim/fd.js'
211
- },
212
- {
213
- kind: 'static',
214
- specifier: './vendor/browser_wasi_shim/fs_mem.js',
215
- target: 'vendor/browser_wasi_shim/fs_mem.js'
216
- },
217
- {
218
- kind: 'static',
219
- specifier: './vendor/browser_wasi_shim/wasi.js',
220
- target: 'vendor/browser_wasi_shim/wasi.js'
221
- },
222
- {
223
- kind: 'static',
224
- specifier: './vendor/browser_wasi_shim/wasi_defs.js',
225
- target: 'vendor/browser_wasi_shim/wasi_defs.js'
209
+ specifier: './vendor/browser_wasi_shim/index.js',
210
+ target: 'vendor/browser_wasi_shim/index.js'
226
211
  }
227
212
  ],
228
213
  assets: [],
@@ -415,12 +400,12 @@ export const WASM_RUST_EXECUTABLE_GRAPH_PROFILE = Object.freeze({
415
400
  encoding: 'identity'
416
401
  },
417
402
  storage: {
418
- bytes: 5220,
419
- sha256: '52164fb602e546e61e6a5a2e09ae3c61aba9377c1b9918b0a788d92e4c497a5b'
403
+ bytes: 5819,
404
+ sha256: '8933c8f043fb3dbee28d4f61d8a3ea16a372b2c833b1071a6531071388fed730'
420
405
  },
421
406
  logical: {
422
- bytes: 5220,
423
- sha256: '52164fb602e546e61e6a5a2e09ae3c61aba9377c1b9918b0a788d92e4c497a5b'
407
+ bytes: 5819,
408
+ sha256: '8933c8f043fb3dbee28d4f61d8a3ea16a372b2c833b1071a6531071388fed730'
424
409
  },
425
410
  imports: [],
426
411
  assets: [],
@@ -432,12 +417,12 @@ export const WASM_RUST_EXECUTABLE_GRAPH_PROFILE = Object.freeze({
432
417
  encoding: 'identity'
433
418
  },
434
419
  storage: {
435
- bytes: 22093,
436
- sha256: '72cd8fe5c7999ffa6e144b3d6ea3691686843063dc8405274c2573f1ea8356a2'
420
+ bytes: 24122,
421
+ sha256: 'fc799b595d8d4022cbf02328673b5bb08ad0f86be0da9ac0b3ac12e9f5d343fa'
437
422
  },
438
423
  logical: {
439
- bytes: 22093,
440
- sha256: '72cd8fe5c7999ffa6e144b3d6ea3691686843063dc8405274c2573f1ea8356a2'
424
+ bytes: 24122,
425
+ sha256: 'fc799b595d8d4022cbf02328673b5bb08ad0f86be0da9ac0b3ac12e9f5d343fa'
441
426
  },
442
427
  imports: [
443
428
  {
@@ -530,12 +515,12 @@ export const WASM_RUST_EXECUTABLE_GRAPH_PROFILE = Object.freeze({
530
515
  encoding: 'identity'
531
516
  },
532
517
  storage: {
533
- bytes: 35204,
534
- sha256: '82e10d23d19eee77c662ccae5ae3fe946191bcc5aee8e7528317c59add549321'
518
+ bytes: 37956,
519
+ sha256: 'd948487286c5920a5bbdaab94188ebeeadd8e405be74f4839c1cf8ddaf083c52'
535
520
  },
536
521
  logical: {
537
- bytes: 35204,
538
- sha256: '82e10d23d19eee77c662ccae5ae3fe946191bcc5aee8e7528317c59add549321'
522
+ bytes: 37956,
523
+ sha256: 'd948487286c5920a5bbdaab94188ebeeadd8e405be74f4839c1cf8ddaf083c52'
539
524
  },
540
525
  imports: [
541
526
  {
@@ -628,12 +613,12 @@ export const WASM_RUST_EXECUTABLE_GRAPH_PROFILE = Object.freeze({
628
613
  encoding: 'identity'
629
614
  },
630
615
  storage: {
631
- bytes: 3686,
632
- sha256: 'cfbc70c3349b35c1f510ead79fdfb95bb29700f2566716b6b5fa0d1017cd00d7'
616
+ bytes: 3969,
617
+ sha256: 'c3ee4682af8d8b9f338f1258fdff5701754f72753aa1b5385b7848bff1ff3e8d'
633
618
  },
634
619
  logical: {
635
- bytes: 3686,
636
- sha256: 'cfbc70c3349b35c1f510ead79fdfb95bb29700f2566716b6b5fa0d1017cd00d7'
620
+ bytes: 3969,
621
+ sha256: 'c3ee4682af8d8b9f338f1258fdff5701754f72753aa1b5385b7848bff1ff3e8d'
637
622
  },
638
623
  imports: [
639
624
  {
@@ -1588,6 +1573,6 @@ export const WASM_RUST_EXECUTABLE_GRAPH_PROFILE = Object.freeze({
1588
1573
  externals: []
1589
1574
  }
1590
1575
  },
1591
- fingerprint: '8216ff2b93e5d712c78033636c02aadfa8a1bbfd1de88c6bfa4995b4ea0b4870'
1576
+ fingerprint: '5e2563e8a985fe3a30a209aa7cb7d53cdfd2b0b8af1c1a96b7e8f2d08046bfee'
1592
1577
  });
1593
1578
  export const WASM_RUST_ASSET_VERSION = WASM_RUST_RUNTIME_PROFILE.manifestFingerprint;
@@ -149,7 +149,7 @@ self.onmessage = async (event) => {
149
149
  self.postMessage({ error: error.message, ...missingPrecompiledHeader() });
150
150
  }
151
151
  }
152
- else if (code) {
152
+ else if (typeof code === 'string') {
153
153
  clang.log = log;
154
154
  stdinBufferClang = new Int32Array(buffer);
155
155
  debugBufferClang = new Int32Array(debugBuffer);
@@ -54,7 +54,7 @@ self.onmessage = async (event) => {
54
54
  postMessage({ error: error?.message || String(error) });
55
55
  }
56
56
  }
57
- else if (typeof log === 'boolean' && !code) {
57
+ else if (code === '' || (typeof log === 'boolean' && code === undefined)) {
58
58
  // The compiler receives the current logging preference for every compilation.
59
59
  if (typeof code === 'string')
60
60
  postMessage({ results: true });
@@ -1,4 +1,5 @@
1
1
  import { waitForBufferedStdin } from '../stdinBuffer';
2
+ import { normalizeLldbWorkspacePath } from '../lldbSourcePath';
2
3
  import { loadVerifiedDOuterAssets, snapshotDOuterAssetConfig } from '../dOuterAssets';
3
4
  import { createRuntimeAssetsKey, requestRuntimeWasmModule, verifyRuntimeAssetIntegrity } from '@wasm-idle/core';
4
5
  let stdinBufferD = null;
@@ -54,6 +55,13 @@ async function loadRuntime(config) {
54
55
  const runtimeBaseUrl = new URL('./', manifestUrl);
55
56
  runtimeBaseUrl.search = manifestUrl.search;
56
57
  return {
58
+ compilerProvenance: manifest.compiler?.ldc2?.integrity
59
+ ? {
60
+ name: 'ldc',
61
+ version: manifest.version,
62
+ binarySha256: manifest.compiler.ldc2.integrity.uncompressedSha256
63
+ }
64
+ : undefined,
57
65
  compiler: await factory({
58
66
  runtimeBaseUrl: runtimeBaseUrl.href,
59
67
  manifest,
@@ -94,8 +102,9 @@ function normalizeDiagnostic(diagnostic) {
94
102
  };
95
103
  }
96
104
  self.onmessage = async (event) => {
97
- const { load, moduleUrl: nextModuleUrl, manifestUrl: nextManifestUrl, outerIntegrity, buffer, code, prepare, args = [], stdin, fileName = 'main.d', log } = event.data;
105
+ const { load, moduleUrl: nextModuleUrl, manifestUrl: nextManifestUrl, outerIntegrity, buffer, code, prepare, args = [], compileArgs: requestedCompileArgs = [], stdin, fileName = 'main.d', log, debugMode } = event.data;
98
106
  try {
107
+ const compileArgs = [...requestedCompileArgs];
99
108
  if (load) {
100
109
  runtimeConfig = snapshotDOuterAssetConfig({
101
110
  moduleUrl: nextModuleUrl,
@@ -113,7 +122,22 @@ self.onmessage = async (event) => {
113
122
  if (!runtimeConfig)
114
123
  throw new Error('D runtime has not been loaded');
115
124
  const runtime = await loadRuntime(runtimeConfig);
116
- const compileCacheKey = `${fileName}\n${code}`;
125
+ const lldb = debugMode === 'lldb';
126
+ const sourcePath = normalizeLldbWorkspacePath(fileName);
127
+ const compilerFileName = sourcePath.split('/').at(-1) || 'main.d';
128
+ // Debugger requirements take precedence over user optimization and DWARF flags.
129
+ const compilerArgs = [
130
+ ...compileArgs,
131
+ ...(lldb
132
+ ? [
133
+ '-g',
134
+ '-O0',
135
+ '-dwarf-version=4',
136
+ `--fdebug-prefix-map=/work/${compilerFileName}=/workspace/${sourcePath}`
137
+ ]
138
+ : [])
139
+ ];
140
+ const compileCacheKey = JSON.stringify([debugMode || 'none', fileName, code, compilerArgs]);
117
141
  if (!compiledArtifact || compiledCacheKey !== compileCacheKey) {
118
142
  if (log) {
119
143
  console.log(`[wasm-idle:d-worker] compile start prepare=${String(prepare)} file=${fileName} bytes=${code.length}`);
@@ -123,6 +147,7 @@ self.onmessage = async (event) => {
123
147
  fileName,
124
148
  target: 'wasm32-wasi',
125
149
  log,
150
+ compileArgs: compilerArgs,
126
151
  onProgress(progress) {
127
152
  postMessage({ progress });
128
153
  }
@@ -154,6 +179,30 @@ self.onmessage = async (event) => {
154
179
  postMessage({ results: true });
155
180
  return;
156
181
  }
182
+ if (lldb) {
183
+ if (!runtime.compilerProvenance)
184
+ throw new Error('D LLDB debugging requires verified compiler provenance.');
185
+ if (!compiledArtifact.bytes)
186
+ throw new Error('D LLDB debugging requires the compiler to return WebAssembly bytes.');
187
+ const bytes = new Uint8Array(compiledArtifact.bytes);
188
+ const sha256 = async (value) => Array.from(new Uint8Array(await crypto.subtle.digest('SHA-256', new Uint8Array(value))), (byte) => byte.toString(16).padStart(2, '0')).join('');
189
+ const contentSha256 = await sha256(new TextEncoder().encode(code));
190
+ const path = `/workspace/${sourcePath}`;
191
+ postMessage({
192
+ lldbArtifact: {
193
+ bytes,
194
+ descriptor: {
195
+ kind: 'dwarf',
196
+ sourceRoot: '/workspace',
197
+ moduleSha256: await sha256(bytes),
198
+ files: [{ path, contentSha256 }],
199
+ compiler: runtime.compilerProvenance
200
+ },
201
+ sources: [{ path, content: code, contentSha256 }]
202
+ }
203
+ });
204
+ return;
205
+ }
157
206
  const hasInitialStdin = typeof stdin === 'string';
158
207
  let initialStdin = hasInitialStdin ? stdin : null;
159
208
  const execution = await runtime.executeBrowserDArtifact(compiledArtifact, {
@@ -253,7 +253,7 @@ self.onmessage = async (event) => {
253
253
  postMessage({ error: error?.message || String(error) });
254
254
  }
255
255
  }
256
- else if (typeof log === 'boolean' && !code) {
256
+ else if (code === '' || (typeof log === 'boolean' && code === undefined)) {
257
257
  if (clang)
258
258
  clang.log = log;
259
259
  if (typeof code === 'string')