I would like to call the compilation of a rust program from a python script. Are there any options to pull this off?
def compile():
binary_file = rust_compile(path, release=True)
return binary_file
You can use the library subprocess
to execute console commands and doing so execute the rust compiler.
subprocess.run(["rustc","program.rc"])
And then get the path of the binary file