vscode-docs icon indicating copy to clipboard operation
vscode-docs copied to clipboard

Please write & publish blog for rust also

Open beingminimal opened this issue 1 year ago • 6 comments

I have read this blog but can't find anything for rust. https://code.visualstudio.com/blogs/2023/06/05/vscode-wasm-wasi

Can you please open source repo or step by step guide to achieve rust dev environment in browser like you have shown for python?

Please help.

Thanks

beingminimal avatar Jan 11 '24 03:01 beingminimal

@dbaeumer Can you please help to write a blog for rust dev environment in browser?

beingminimal avatar Jan 11 '24 03:01 beingminimal

A Rust Dev environment in the browser is currently not easily achievable since most of the Rust tools CAN'T be compiled down to WASM. Unless that is possible writing a blog post is not very useful. I will therefore close the issue.

dbaeumer avatar Jan 11 '24 10:01 dbaeumer

@dbaeumer i think it's possible now they have compiled rustc into wasm to run cargo commands, have a look in last few comments https://github.com/rust-lang/miri/issues/722

beingminimal avatar Jan 11 '24 10:01 beingminimal

I still would wait until this is officially supported.

dbaeumer avatar Jan 11 '24 11:01 dbaeumer

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

vscodenpa avatar Jan 11 '24 11:01 vscodenpa

I still would wait until this is officially supported.

As the person who managed to compile rustc to wasm, I agree. I needed quite some extensive patches to make this work and there are some major limitations like linking not being supported and not being able to compile for wasm using the resulting compiler. Some of the patches I needed have been upstreamed already, and I'm currently working on getting some others upstreamed, but that still leaves some patches that I don't think are upstreamable for the time being.

The core of rust-analyzer (the rust language server) on the other hand can be compiled for wasm just fine. You do still need to write a replacement for the language server binary itself though like for example https://github.com/rust-analyzer/rust-analyzer-wasm as the regular binary depends on being able to run cargo for getting the project metadata and doing cargo check to show error messages from the compiler as diagnostics.

bjorn3 avatar Jan 25 '24 19:01 bjorn3