rust-lang / vscode-rust

Rust extension for Visual Studio Code
https://marketplace.visualstudio.com/items?itemName=rust-lang.rust
Other
1.39k stars 167 forks source link

Proposal: add rust-script support #960

Open crabdancing opened 2 years ago

crabdancing commented 2 years ago

rust-script, for those who aren't aware, is a popular mechanism by which Rust projects can be distributed as a single all-in-one shell script style file.

Its use cases are varied -- probably mostly sysops/devops, providing superior performance (after first run) to other solutions like Python & Bash, while inheriting the superior syntax and feature set of the full Rust language. It has the potential to bring the safety-first performant benefits of Rust to an entire new use case, making maintainable performant scripting a much easier problem to solve.

Unfortunately, the ecosystem is not very rust-script aware, which makes it a pain to use in practice. vscode-rust intellisense doesn't seem to work without an external Cargo manifest. Syntax highlighting doesn't work with the .ers extension. There are probably some other issues, but they aren't coming to mind at the moment.

lnicola commented 2 years ago

This extension is unmaintained. You want https://github.com/rust-lang/rust-analyzer/issues/9609.

I suppose we could add .ers support, but running without a Cargo.toml isn't trivial.