You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Instead of using cargo run to run the generated package, build an executable with cargo build (if necessary), then execute the resulting binary directly. Brings two advantages:
After the first run where the binary is built, subsequent runs will be a lot faster as cargo is avoided (#39).
By not standing inside the current working directory when building, we avoid being affected by rust toolchain files (#31).
By avoiding cargo in subsequent runs, one can use a shebang such as #! /usr/bin/env -S rust-script -c to always get cargo output - but only after changing the file.
Rename --gen-pkg-only (which only generates a package from the script without building it) to -p/--package, and make it print the path to the generated package.
This allows flexibility and additional tools, such as cargo tree --manifest-path $(rust-script -p my-script.rs)/Cargo.toml (#60).
Change the short option for --cargo-output from -o to -c.
Rename -c/--toolchain-version to -t/--toolchain.
Update dependencies (most notably clap was updated from 3 to 4).
Drop support for templates: Usage seems low, and they complicate things. Reach out if you have a need for this.
As a result of the dependency updates, the MSRV (minimum supported rust version) was bumped to 1.64. Reach out if that is a problem!