#machine-readable

wgsl-spec

Machine-readable specification for WGSL

2 unstable releases

0.2.0 Jul 20, 2024
0.1.0 Jul 18, 2024

#7 in #machine-readable

Download history 214/week @ 2024-07-15 32/week @ 2024-07-22 16/week @ 2024-07-29 14/week @ 2024-08-05 9/week @ 2024-08-12 5/week @ 2024-08-19 13/week @ 2024-08-26 7/week @ 2024-09-02 13/week @ 2024-09-09 29/week @ 2024-09-16 27/week @ 2024-09-23 28/week @ 2024-09-30 7/week @ 2024-10-07 6/week @ 2024-10-14

70 downloads per month
Used in glasgow

MIT license

350KB
506 lines

Machine Readable Spec for WGSL (WebGPU Shading Language)

This repo contains scripts for scraping the WGSL spec and produces a set of JSON files in the spec/ directory:

  • spec/tokens.json: keywords and special names.
  • spec/functions.json: information about builtin functions, complete with signatures and documentation.

Building

You can download the most recent spec by running:

./x update-upstream

And then to regenerate the JSON files:

./x run

Dependencies

~0.4–6MB
~34K SLoC