Analog of the function "system" in C ++


#1

Hello! I’m a beginner developer on Rust. I have some question. Does Rust have an analog of the function “system” as in C ++? Thank you!


#2

Probably the Process module will have what you need: https://doc.rust-lang.org/std/process/


#3

If you want to run shell code, you can follow what is done in the example of Command, which launches the shell explicitly using e.g. "sh" with "-c", followed by the shell script you want to run.


#4

Thank you! Much obliged!