Compiler API reference

Compiler API reference

Every export of the typeshade package, generated from the compiler at commit 26de7be8. One page per function, type, interface and class.

This is the surface a host application and the fn() builder call. A shader author writes the language reference instead.

Authoring 48 members
The builder a shader is written with: modules, functions, variables and control flow.
Builtins 96 members
The math, vector and texture functions a shader calls, spelled once for both targets.
Values 15 members
Literals, typed references and the constructors that turn a JavaScript value into a node.
Types 85 members
The type keys and type descriptors the authoring surface is typed by.
IR 40 members
The intermediate representation every backend reads: nodes, statements and declarations.
Layout 24 members
The declarators that state a struct or a bound resource once, for the host and both targets.
Emit 30 members
The WGSL and GLSL ES 3.00 writers, module fragments and the passes that run before them.
Reflection 26 members
What reflect() recovers from a module: bind groups, byte layouts and entry points.
CPU oracle 10 members
The CPU backend that runs a module in f64 and gives the reference values to compare against.
Console 8 members
What a shader says through console.log: the events the CPU delivers, and the decoder for the ones the GPU records.
Runtime 21 members
The program runtime that runs compiled programs on WebGPU, and the array a kernel call keeps on the device.
Diagnostics 5 members
The coded error class and the validation gate every emit goes through.
Emulated f64 10 members
Double precision on targets that have none, carried in pairs of f32 lanes.
Variants 17 members
Feature axes as one family of modules, compiled and linked point by point.
Backends 27 members
The backend contract, the capability model and the registry that spells an intrinsic.
Tooling 20 members
Registry generation, semantic comparison, emit identity and size measurement.
Editor 8 members
What an editor asks the compiler for: diagnostics, completion and hover, at a source position.

Edit this page Report a problem