Expand description
wesl.toml configuration parsing and file scanning.
This module handles reading wesl.toml configuration files and building module hierarchies from glob patterns.
# Version of WESL used in this project.
edition = "2026_pre"
# Optional, can be auto-inferred from the existence of a package manager file.
# Inclusion of this field is encouraged.
package-manager = "npm"
# Where are the shaders located. This is the path of `package::`.
root = "./shaders"
# Optional
include = [ "shaders/**/*.wesl", "shaders/**/*.wgsl" ]
# Optional.
# Some projects have large folders that we shouldn't react to.
exclude = [ "**/test" ]
# Lists all used dependencies
[dependencies]
# Shorthand for `foolib = { package = "foolib" }`
foolib = {}
# Can be used for renaming packages. Now bevy in my code is called "cute_bevy".
cute_bevy = { package = "bevy" }
# File path to a folder with a wesl.toml. Simplest kind of dependency.
mylib = { path = "../mylib" }Structs§
- Package
Config - Package configuration fields.
- Scan
Result - Result of scanning files, including any non-fatal warnings.
- Wesl
Toml - Parsed wesl.toml configuration.
Enums§
- Dependencies
Config - The
[dependencies]section of wesl.toml. - Dependency
Spec - A single dependency specification.
- Dependency
Spec Proxy - Intermediate data type for serialization / deserialization
- Package
Manager - Scan
Warning - Warning emitted during file scanning (non-fatal).
- Wesl
Edition
Functions§
- scan_
from_ config - Scan files based on a WeslToml and build a Module hierarchy.