Rustx invoke cargo-script.
https://doc.rust-lang.org/reference/input-format.html
-
cargo install rustx
,cargo install cargo-script
-
create a file, for example,
hello.rs
as below, thenchmod +x hello.rs
,./hello.rs
.
#!/usr/bin/env rustx
fn main() {
println!("Hello!");
}
Licensed under either of these:
- Apache License Version 2.0 LICENSE-APACHE
- MIT License LICENSE-MIT
Please sign a cla, thanks!