Rustc --rm flag To delete binary after it runs

To be an addition to the --run flag

To have another flag such as --rm which will delete the binary once the binary has ran.

rustc --run --rm main.rs

It seems like you might want to look at the upcoming cargo script support.

1 Like