Crate scudo_proc_macros
source · [−]Expand description
A proc-macro crate for the Rust bindings to the Scudo allocator.
The exported set_scudo_options
attribute macro allows to set Scudo
options with an annotation on the main method:
use scudo_proc_macros::set_scudo_options;
#[set_scudo_options(delete_size_mismatch = false, release_to_os_interval_ms = 1)]
fn main() {
// Use Scudo with the provided options.
}
For more on Scudo options, visit the official documentation here.
Please note: the proc macro exported by this crate works both with the scudo-sys crate as well as with the idiomatic Rust binding crate, scudo.
Attribute Macros
Sets options for the Scudo Allocator. This macro takes a list of
comma-seperated options, where each option is in the form
key = value. The value could either be a number like ‘3.14’ or a
boolean value like ‘true’. For a list of all available Scudo options,
please visit the official documentations
Pleaso note that this macro can only be used on the main method of a
Rust program.