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 shebang #183

Closed
blt-r opened this issue Jun 28, 2023 · 1 comment · Fixed by #184
Closed

Support for shebang #183

blt-r opened this issue Jun 28, 2023 · 1 comment · Fixed by #184

Comments

@blt-r
Copy link

blt-r commented Jun 28, 2023

rustc already can ignore the shebang. And cargo-script RFC was accepted (rust-lang/cargo#12207).

This is a valid rust:

#!/usr/bin/env -S cargo +nightly -Zscript

fn main() {
    println!("Hello from cargo script")
}

But it isn't parsed

@blt-r
Copy link
Author

blt-r commented Jun 28, 2023

It is also documented in https://doc.rust-lang.org/reference/crates-and-source-files.html#shebang

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant