Struct wgsl_bindgen::WgslBindgenOption
source · pub struct WgslBindgenOption {Show 13 fields
pub entry_points: Vec<String>,
pub module_import_root: Option<String>,
pub emit_rerun_if_change: bool,
pub skip_header_comments: bool,
pub skip_hash_check: bool,
pub serialization_strategy: WgslTypeSerializeStrategy,
pub derive_serde: bool,
pub shader_source_output_type: WgslShaderSourceOutputType,
pub wgsl_type_map: WgslTypeMap,
pub output_file: Option<PathBuf>,
pub additional_scan_dirs: Vec<AdditionalScanDirectory>,
pub ir_capabilities: Option<WgslShaderIRCapabilities>,
pub short_constructor: Option<i32>,
}Fields§
§entry_points: Vec<String>A vector of entry points to be added. Each entry point is represented as a String.
module_import_root: Option<String>The root prefix/namespace if any applied to all shaders given as the entrypoints.
emit_rerun_if_change: boolA boolean flag indicating whether to emit a rerun-if-changed directive to Cargo. Defaults to true.
skip_header_comments: boolA boolean flag indicating whether to skip header comments. Enabling headers allows to not rerun if contents did not change.
skip_hash_check: boolA boolean flag indicating whether to skip the hash check. This will avoid reruns of bindings generation if
entry shaders including their imports has not changed. Defaults to false.
serialization_strategy: WgslTypeSerializeStrategyDerive encase::ShaderType
for user defined WGSL structs when WgslTypeSerializeStrategy::Encase.
else derive bytemuck
derive_serde: boolDerive serde::Serialize
and serde::Deserialize
for user defined WGSL structs when true.
shader_source_output_type: WgslShaderSourceOutputTypeThe type of output for the shader source. Defaults to FinalShaderString.
wgsl_type_map: WgslTypeMapA mapping operation for WGSL built-in types. This is used to map WGSL built-in types to their corresponding representations.
output_file: Option<PathBuf>The output file path for the generated Rust bindings. Defaults to None.
additional_scan_dirs: Vec<AdditionalScanDirectory>The additional set of directories to scan for source files.
ir_capabilities: Option<WgslShaderIRCapabilities>wgpu::naga::valid::Capabilities
The capabilities of naga to support. Defaults to None.
short_constructor: Option<i32>Whether to generate short constructor similar to enums instead of new, if parameters are below the specified threshold
Defaults to None