RUST Address Sanitizer in cargo.toml

Hi all!
I wonder that how to use address sanitizer with cargo.toml file.

As I know, we can use rust address sanitizer in cargo like below commed.

RUSTFLAGS="-Z sanitizer=address" cargo run

However, i want to know that how to apply rust address sanitiizer in cargo.toml file. I mean that If we set rust address sanitizer dependency in cargo.toml, then automatically the program is compiled with RUST ASan.

Is there any way to use RUST ASan in cargo.toml??
Thank you! Have a nice day

Not in Cargo.toml, but in .cargo/config.toml, as described here.

1 Like

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.