Trait CompilerWrapper

Source
pub trait CompilerWrapper: ToolWrapper {
    // Required methods
    fn add_cc_arg<S>(&mut self, arg: S) -> &mut Self
       where S: AsRef<str>;
    fn add_link_arg<S>(&mut self, arg: S) -> &mut Self
       where S: AsRef<str>;
    fn link_staticlib<S>(&mut self, dir: &Path, name: S) -> &mut Self
       where S: AsRef<str>;

    // Provided methods
    fn add_cc_args<S>(&mut self, args: &[S]) -> &mut Self
       where S: AsRef<str> { ... }
    fn add_link_args<S>(&mut self, args: &[S]) -> &mut Self
       where S: AsRef<str> { ... }
    fn link_libpython(&mut self) -> Result<&mut Self, String> { ... }
}
Expand description

Wrap a compiler hijacking its arguments

Required Methods§

Source

fn add_cc_arg<S>(&mut self, arg: S) -> &mut Self
where S: AsRef<str>,

Add a compiler argument only when compiling

Add a compiler argument only when linking

Link static C lib

Provided Methods§

Source

fn add_cc_args<S>(&mut self, args: &[S]) -> &mut Self
where S: AsRef<str>,

Add compiler arguments only when compiling

Add compiler arguments only when linking

Finds the current python3 version and adds -lpython3.<version> as linker argument. Useful for fuzzers that need libpython, such as nautilus-based fuzzers.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§