Struct linera_wit_bindgen_gen_guest_rust::Opts
source · pub struct Opts {
pub rustfmt: bool,
pub multi_module: bool,
pub unchecked: bool,
pub symbol_namespace: String,
pub export_macro: Option<String>,
pub types_path: Option<String>,
pub reexported_crate_path: Option<String>,
}
Fields§
§rustfmt: bool
Whether or not rustfmt
is executed to format generated code.
multi_module: bool
Adds the wit module name into import binding names when enabled.
unchecked: bool
Whether or not the bindings assume interface values are always well-formed or whether checks are performed.
symbol_namespace: String
A prefix to prepend to all exported symbols. Note that this is only intended for testing because it breaks the general form of the ABI.
export_macro: Option<String>
If set, the code generation is intended for standalone crates.
Standalone mode generates bindings without a wrapping module.
For exported interfaces, an export macro is also generated that can be used to export an implementation from a different crate.
types_path: Option<String>
Path inside the standalone crate where the generated types can be found.
Used inside the export macro and is prefixed with $crate::
.
reexported_crate_path: Option<String>
Path to access this crate from inside the generated macro if it has been re-exported.
This is only relevant if the [export_macro
] is set, and is prefixed with $crate::
. If
it is not set, the generated code will use the crate assuming it has been declared as a
dependency by the crate that uses the macro.