github fornwall/rust-script 0.23.0

latest releases: 0.35.0, 0.34.0, 0.33.0...
20 months ago
  • 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!

Don't miss a new rust-script release

NewReleases is sending notifications on new releases.