How to pass RUST_BACKTRACE=1 when running a Rust binary installed in Debian?
Just in case someone is looking for setting environment variable from source code, here is how you do it: use std::env; fn main() { // this method needs to be inside main() method env::set_var(“RUST_BACKTRACE”, “1”); } The benefit of this approach — in contrast to manually setting the env variable from PowerShell– is that you … Read more