Hello. Would be great if Cargo.lock file could be generated and then specified as well in cli, besides Cargo.toml. Just to make sure a script is easily runnable in a few of years without any effort. I know I can unpack a script using --package and preserve the Cargo.lock from there, but a command line option would save time, when working with a lot of scripts.
Edit: I found two workarounds, which are not perfect, but they work: rust-script --pkg-path my-script my-script.rs creates a directory, and I can commit only Cargo.lock from it, or I can copy a my-script-Cargo.lock to the path printed by --package, which is something like /home/koddo/.cache/rust-script/projects/f92ab9238ceaf92893fbd. Still would be great to have a command line option.
Hello. Would be great if
Cargo.lockfile could be generated and then specified as well in cli, besidesCargo.toml. Just to make sure a script is easily runnable in a few of years without any effort. I know I can unpack a script using--packageand preserve theCargo.lockfrom there, but a command line option would save time, when working with a lot of scripts.Edit: I found two workarounds, which are not perfect, but they work:
rust-script --pkg-path my-script my-script.rscreates a directory, and I can commit onlyCargo.lockfrom it, or I can copy amy-script-Cargo.lockto the path printed by--package, which is something like/home/koddo/.cache/rust-script/projects/f92ab9238ceaf92893fbd. Still would be great to have a command line option.