Skip to content
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

Support for standalone .rs files without Cargo.toml #15072

Closed
sohang3112 opened this issue Jun 18, 2023 · 2 comments
Closed

Support for standalone .rs files without Cargo.toml #15072

sohang3112 opened this issue Jun 18, 2023 · 2 comments
Labels
C-feature Category: feature request

Comments

@sohang3112
Copy link

I want to try using Rust for short scripts (similar to scripting in Bash or Python). Creating a full-fledged Cargo project can be overkill for such tasks.

I can compile & run these standalone scripts using rustc script.rs. It would be nice if Rust Analzyer also supported such scripts (for example, showing the Run button above fn main() in VS Code).

@sohang3112 sohang3112 added the C-feature Category: feature request label Jun 18, 2023
@poliorcetics
Copy link
Contributor

Especially with cargo script in nightly now, this will quickly become very very useful

@Veykril
Copy link
Member

Veykril commented Jul 12, 2023

Duplicate of #14318

Also just to note, for cargo script support we'd also need to first see support for cargo metadata parsing cargo scripts

@Veykril Veykril closed this as completed Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature request
Projects
None yet
Development

No branches or pull requests

3 participants