pub struct Opts {
pub rustfmt: bool,
pub unchecked: bool,
pub no_std: bool,
pub macro_export: bool,
pub raw_strings: bool,
pub macro_call_prefix: Option<String>,
pub export_macro_name: Option<String>,
pub skip: Vec<String>,
}Fields§
§rustfmt: boolWhether or not rustfmt is executed to format generated code.
unchecked: boolWhether or not the bindings assume interface values are always well-formed or whether checks are performed.
no_std: boolIf true, code generation should avoid any features that depend on std.
macro_export: boolIf true, adds #[macro_export] to the export_*! macro generated to
export it from the Rust crate.
raw_strings: boolIf true, code generation should pass borrowed string arguments as
&[u8] instead of &str. Strings are still required to be valid
UTF-8, but this avoids the need for Rust code to do its own UTF-8
validation if it doesn’t already have a &str.
macro_call_prefix: Option<String>The prefix to use when calling functions from within the generated
export! macro.
This enables the generated export! macro to reference code from
another mod/crate.
export_macro_name: Option<String>The name of the generated export! macro to use.
If None, the name is derived from the name of the world in the
format export_{world_name}!.
skip: Vec<String>Names of functions to skip generating bindings for.