14
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
this post was submitted on 22 Oct 2024
14 points (85.0% liked)
Rust
6029 readers
1 users here now
Welcome to the Rust community! This is a place to discuss about the Rust programming language.
Wormhole
Credits
- The icon is a modified version of the official rust logo (changing the colors to a gradient and black background)
founded 1 year ago
MODERATORS
You might want to checkout rust-script which essentially does the same but also lets you use it as a hashbang line to make executable rust scripts. And works with cargo/can install deps.
There is also an RFC for this feature.
Thank for sharing rust-script which is basically what I made but written in Rust and seems to store the binary in another directory when the binary is exexuted.
Is the RFC trying to introduce a command
cargo script
to run single rust scripts?That's pretty cool, but terrifying as well. Can't wait for somebody to go a step further and start writing proc macros (call it
rusht
) to replace bash scripts with rust scripts. Actually, now that I think about it, not so terrifying. They can probably be debugged better, could be safer (unless someone starts publishing malicious proc macros), allow dependencies to be added to compose better scripts without relying on they system's package manager, and so much more.Anti Commercial-AI license