#machine-readable

wgsl-spec

Machine-readable specification for WGSL

2 unstable releases

0.2.0 Jul 20, 2024
0.1.0 Jul 18, 2024

#6 in #machine-readable

21 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
~35K SLoC