Skip to content

Commit 604579e

Browse files
authored
check in AGENTS.md, xtask (#26)
* check in AGENTS.md, xtask * fmt * PR fixup
1 parent f6040ba commit 604579e

7 files changed

Lines changed: 1968 additions & 90 deletions

File tree

.cargo/config.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[alias]
2+
xtask = "run --package xtask --"
3+
4+
[env]
5+
CARGO_WORKSPACE_DIR = { value = "", relative = true }
6+

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,3 @@ target
1919
# and can be added to the global gitignore or merged into this file. For a more nuclear
2020
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
2121
#.idea/
22-
23-
# Don't include AI agent files
24-
AGENTS.md

AGENTS.md

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# wgsl-rs
22

33
Rust-to-WGSL transpiler using proc macros.
4-
Workspace with `wgsl-rs`, `wgsl-rs-macros`, and `example` crates.
4+
Workspace with `wgsl-rs`, `wgsl-rs-macros`, `example`, and `xtask` crates.
55

66
## Commands
77

@@ -15,6 +15,21 @@ cargo run -p example # Run the example
1515
cargo expand -p example # Expand the example which uses the `wgsl` macro, showing the generated WGSL_MODULE
1616
```
1717

18+
### xtask - development tools for agents
19+
20+
This repo contains a `cargo xtask` that provides agents with some
21+
shorthand commands for common development tasks.
22+
23+
`cargo xtask wgsl-spec` provides access to the WGSL specification without
24+
overwhelming an agent's context window.
25+
26+
```bash
27+
cargo xtask wgsl-spec toc # List WGSL spec table of contents
28+
cargo xtask wgsl-spec section <anchor> # Fetch a spec section with subsections
29+
cargo xtask wgsl-spec section --shallow <anchor> # Fetch section without subsections
30+
cargo xtask wgsl-spec section <anchor> <sub> # Fetch a specific subsection
31+
```
32+
1833
## Code Style
1934

2035
- **Imports**: Standard lib and external crates first, then `use crate::` for internal modules

0 commit comments

Comments
 (0)