I have one use case where I would need to have the created binary of a script. Let's say I have developed a script which I would like to make available to all users of a system.
In this case it would be bad if each user would need to have a rust toolchain installed. Specifically for user root this is not a good idea IMHO.
Manually I could get the binary by
running rust-script -p myscript.ers
look in for example ~/.cache/rust-script/projects/ed124eaf5e3ad7a29957e85f/Cargo.toml for the binary name
copy the binary from ~/.cache/rust-script/binaries/release/
and deliver it
Question: wouldn't it be a good idea to offer this as a function which could perhaps be called like this?
rust-script --delivery myscript.ers
First of all,
rust-script
is really great.I have one use case where I would need to have the created binary of a script. Let's say I have developed a script which I would like to make available to all users of a system.
In this case it would be bad if each user would need to have a rust toolchain installed. Specifically for user
root
this is not a good idea IMHO.Manually I could get the binary by
rust-script -p myscript.ers
~/.cache/rust-script/projects/ed124eaf5e3ad7a29957e85f/Cargo.toml
for the binary name~/.cache/rust-script/binaries/release/
Question: wouldn't it be a good idea to offer this as a function which could perhaps be called like this?
rust-script --delivery myscript.ers