Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion WeslToml.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,11 @@ The patterns are glob patterns, which support

If the last path segment does not contain a file extension or wildcard, then it is treated as a directory, and files with `.wesl` or `.wgsl` extensions inside that directory are included.

To implement this, one starts at the `root` folder, and recursively goes over the children.
1. If a `wesl.toml` file is present, that entire subtree is excluded, as it is under the purview of another `wesl.toml` file.
2. If the file/folder path matches any exclusion, that entire subtree is excluded.
3. If the file/folder path does *not* match the *prefix* of any of the inclusions, then that subtree is excluded.

### Path semantics

File paths in the `root`, `include` and `exclude` fields are relative to the directory containing the `wesl.toml` file. Absolute paths (starting with `/` or `C:/`) are not allowed.
Expand Down Expand Up @@ -125,4 +130,4 @@ Semantics are:
We are publishing a normal package that also contain wesl code[^2]. This lets us support wesl packages that come with host code!

[^1]: npm, pnpm, yarn... package managers with a `node_modules/` directory and `package.json` file.
[^2]: In Rust land, this is necessary to comply with the [crates.io policy of being compatible with the cargo build tool](https://crates.io/policies).
[^2]: In Rust land, this is necessary to comply with the [crates.io policy of being compatible with the cargo build tool](https://crates.io/policies).