Skip to content

Commit 54d61ef

Browse files
add readme section
1 parent 8d90f24 commit 54d61ef

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

gen/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22

33
The generator for generating `webgpu.h` header and other extension headers or implementation specific headers from the yaml spec files.
44

5+
# Generate implementation specific header
6+
7+
The generator also allows generating custom implementation specific headers that build on top of `webgpu.h` header. The generator accepts the combination of `-yaml` & `-header` flags in sequence, which it uses to validate the specifications and then generate their headers.
8+
9+
For example, if `wgpu.yml` contains the implementation specific API, the header can be generated using:
10+
11+
```shell
12+
> go run ./gen -schema schema.json -yaml webgpu.yml -header webgpu.h -yaml wgpu.yml -header wgpu.h
13+
```
14+
15+
Since the generator does some duplication validation, the order of the files matter, so generator mandates the core `webgpu.yml` to be first in the sequence.
16+
517
# yaml spec
618

719
### Types

0 commit comments

Comments
 (0)