2
<p><span class="h-card" translate="no"><a href="https://fosstodon.org/@phated" class="u-url mention">@<span>phated</span></a></span> &gt; Worker scripts also do not support importing source code using importScripts or import(...).</p><p>I need this</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> yeah, I thought there was overlap. I was using vscode-wasm to get the Noir LSP running in the browser, but I stopped working there over a year ago so haven&#39;t kept up. </p><p>Btw, some searching on vscode&#39;s docs showed mention of Web Workers being available in WebviewPanels. Are they an option? <a href="https://code.visualstudio.com/api/extension-guides/webview#using-web-workers" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">code.visualstudio.com/api/exte</span><span class="invisible">nsion-guides/webview#using-web-workers</span></a></p>
<p><span class="h-card" translate="no"><a href="https://fosstodon.org/@phated" class="u-url mention">@<span>phated</span></a></span> this repository implements basically the same thing as my extension, except that mine is shipping today</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> &gt;grabs pencil and notebook of catchphrases&lt; &quot;Thus, crimes.&quot;</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> ah, okay. Alternatively, if this is in vscode, they might have some additional APIs for sandboxing. I think I remember Dirk was communicating between two plugins for vscode-wasm: <a href="https://github.com/microsoft/vscode-wasm" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">github.com/microsoft/vscode-wa</span><span class="invisible">sm</span></a></p>
<p><span class="h-card" translate="no"><a href="https://fosstodon.org/@phated" class="u-url mention">@<span>phated</span></a></span> that&#39;s what the sandbox escape is from. even if you restrict globalThis in the context</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> Worker Threads with a data url wouldn&#39;t work? <a href="https://nodejs.org/docs/latest-v20.x/api/worker_threads.html" target="_blank" rel="nofollow noopener noreferrer" translate="no"><span class="invisible">https://</span><span class="ellipsis">nodejs.org/docs/latest-v20.x/a</span><span class="invisible">pi/worker_threads.html</span></a></p>
<p>_normally_, i would have fixed this by compiling a JavaScript interpreter to WebAssembly and sandboxing everything in it</p><p>unfortunately, the JavaScript i&#39;m running is a part of a thing that sandboxes other things in WebAssembly, so i can&#39;t exactly do that</p><p>(i mean i could but it would be horrible and i&#39;m not going to)</p>
<p>why did i decide to look at nodejs before going to bed</p><p>i will lose sleep over it now ;_;</p>