New keyword mod
allows declaration of a sub-module. This allows discovery of modules within a crate as well as providing a single entry point for processing preprocessor directives. Modules follow rust rules such that if a crate is called x
which has a sub-module a
, the canonical name for the module will be x::a
. x::a
is added to x
's symbol scope. Additional keywords self
, super
, and crate
allow users to refer to modules relative to the current module.
- Allowing declaration of sub module code inline to the parent module
- Rust macro that creates a set of shader modules embedded in the code based off of rust/cargo file resolution logic. These would also include the encased shader types in the rust code if no preprocessor directives would influence the result.
- Allow modules in the same crate to mutually import symbols from one another. This will require parsing wgsl to generate the headers.
- Later: Extension to the language to allow for definition of mo