pub struct CodegenOptions {
pub exclude_global_allow_pragmas: bool,
pub prefixes: Vec<Prefix>,
pub emit_logging: bool,
pub split_match_arms: bool,
pub match_arm_split_threshold: Option<usize>,
}Expand description
Options for code generation.
Fields§
§exclude_global_allow_pragmas: boolDo not include the #![allow(...)] pragmas in the generated
source. Useful if it must be include!()’d elsewhere.
prefixes: Vec<Prefix>Prefixes to remove when printing file names in generaed files. This helps keep codegen deterministic.
emit_logging: boolEmit log::debug! and log::trace! invocations in the generated code to help
debug rule matching and execution.
In Cranelift this is typically controlled by a cargo feature on the
crate that includes the generated code (e.g. cranelift-codegen).
split_match_arms: boolSplit large match arms into local closures when generating iterator terms.
In Cranelift this is typically controlled by a cargo feature on the
crate that includes the generated code (e.g. cranelift-codegen).
match_arm_split_threshold: Option<usize>Threshold for splitting match arms into local closures.
If None, a default threshold is used.
Trait Implementations§
Source§impl Clone for CodegenOptions
impl Clone for CodegenOptions
Source§fn clone(&self) -> CodegenOptions
fn clone(&self) -> CodegenOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more