Please add a flag such as --run to have the binary run automatically once the binary is built
rustc --run main.rs
Please add a flag such as --run to have the binary run automatically once the binary is built
rustc --run main.rs
This seems higher-level than rustc should have. cargo run exists, and cargo also has (experimentally on nightly) a script mode; both of those seem like better fits for this than rustc. In particular, whatever tool is driving rustc could easily do this itself.
Is rustc going to be deprecated over cargo run?
Cargo internally uses rustc and adds dependency management and a build system on top. So no, rustc will not be deprecated. It is just not meant to be invoked directly by the user in almost all cases.
This topic was automatically closed 540 days after the last reply. New replies are no longer allowed.