-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Web VS Code extensions cannot activate ms-vscode.wasm-wasi-core
#210
Comments
FWIW I've recently noticed this behaviour as well but hadn't quite got to the point of investigation where I felt comfortable raising an issue just yet (as opposed to believing it was user error on my part). The only thing I can add to the above is that I can get a node based extension using WASM and WASI Core working, but anything browser (extensionDevelopmentKind=web) based does seem to exhibit the above. |
Me too! I've been building a Rust language server compiled to WebAssembly. It works fine in Node, but on the Web, the client seems to have trouble communicating with the server ( |
I never tried to run it in the web extension host on the desktop app. I always test the web stuff inside a browser. Can you load the extension into the browser. An example that does this is here: https://github.com/microsoft/vscode-extension-samples folder wasm-language-server |
The issue also occurs in a browser – I'm running an instance of openvscode-server |
I can sideload things, like this sample, into vscode.dev just fine - the WASI dep is automatically installed and the extension works just fine. It's just the web extension host on the desktop app that's proving problematic for me, which I appreciate probably isn't the primary use case - but it's a shame that it doesn't work. |
I will have a look to see why this is failing. One reason might be the following:
|
@jrieken do we have a way to force an extension into the web extension host on the desktop? |
Yeah, only having the |
Thank you @dbaeumer , @jrieken. I've managed to get somewhere with the above steps combined. First, I downloaded a copy of wasm-core and modified its package.json to remove the "main" entry point. Installing that modified version got me past the dependency error but I then also needed to run VS Code with --enable-coi for message passing to start functioning properly. I haven't played around in great depth, but it looks like everything works "as it should" at that point. It's a shame it's not a little easier to do this, but I'm delighted to know it can be done. |
That works! However, I'm unable to enable COI with Visual Studio Code Server because |
When writing a web-only VS Code extension, i.e. with a package.json that only defines a
"browser"
entrypoint, the extension will not activate when depending onms-vscode.wasm-wasi-core
:Minimal working example:
ms-vscode.wasm-wasi-core
as an extension dependency and run.Tested on Mac (with the default "Run Web Extension" launch option; VS Code 1.94.0, on Sonoma 14.6.1), and also within a self-hosted web environment.
The text was updated successfully, but these errors were encountered: