microsoft / vscode-wasm

A WASI implementation that uses VS Code's extension host as the implementing API
MIT License
376 stars 27 forks source link

Document how to use VS Code's component model tooling to use WASM services inside a VS Code extensions #157

Closed dbaeumer closed 4 months ago

dbaeumer commented 7 months ago

With the component model tooling we now have an easy way to integrate WASM services into VS Code extensions. We should document this via samples and a blog post.

lppedd commented 5 months ago

Hey @dbaeumer! We're interested in running some of our Kotlin code as WASM binaries in VSC.

Is this possible ATM? K/WASM requires GC.

dbaeumer commented 5 months ago

Yes, stay tuned. There will be a blog post soon on how to do that. If the Kotlin code compiles to something that has only a main function (e.g. is more like a OS program) we have already support for it. See https://code.visualstudio.com/blogs/2023/06/05/vscode-wasm-wasi

lppedd commented 5 months ago

Nice, thanks! We'd like to expose functions to the JS side. Or maybe interoperate with VS Code APIs directly.
Not sure if those options will be covered, but I'll check the blog post once it's out.

dbaeumer commented 5 months ago

Both cases are covered.

lppedd commented 5 months ago

Damn, VS Code on 🔥

dbaeumer commented 4 months ago

The blog post is out: https://code.visualstudio.com/blogs/2024/05/08/wasm

lppedd commented 4 months ago

Thanks @dbaeumer. Had a read already and everything makes sense.

Had my hopes too high for the "Full extension in Rust" part, but I guess waiting for the WASI spec is better (AFAIU 0.3 targets early/mid 2025).