Artifact reference
TinyFX deliberately has several artifacts. They are related outputs of one checked frontend, not interchangeable formats.
| Artifact | Consumer | What it contains |
|---|---|---|
Source .tfx | Compiler/editor | Authored program, imports, and optional metadata. |
.tfxb | Rust VM/runtime, native or browser-WASM | Versioned bytecode plus shader/compute blueprints and layout information. |
| WGSL | wgpu/WebGPU | Compiler-generated shader and compute modules. |
| Generated TypeScript/ESM | JavaScript execution core | Structured CPU program, helpers/imports, and reachable compiler-authored blueprints; never VM bytecode. |
| Physical WebGPU pass modules | Generated WebGPU runtime/core | Discriminated pass descriptions, resource bindings, exact packing/layout data, and WGSL. |
| Operation reference | Developers/tooling | Generated catalog metadata, declarations, target routes, and evidence. |
Compatibility boundaries
.tfxb has its own versioned wire format. A runtime rejects incompatible
binary programs and asks for a rebuild; do not treat it as a long-term generic
serialization format.
The generated-program/runtime and core/platform interfaces are separately versioned contracts. Generated ESM checks the required runtime capabilities before device acquisition. Physical blueprint schemas are also versioned so the compiler can evolve one pass shape without silently changing a frozen shape used by another target.
Captures and layouts
WGSL and generated WebGPU artifacts include more than shader text. They carry compiler-owned capture order, resource identity, binding descriptions, vertex attributes, fragment/depth/blend state, compute domains, and exact uniform packing plans. Runtime code consumes those plans; it does not rediscover layouts from user source or platform reflection.
Inspecting outputs
tfx build app.tfx -o app.tfxb
tfx build app.tfx --emit-wgsl out/wgsl
tfx build app.tfx --emit-typescript out/app.ts
tfx build app.tfx --emit-webgpu out/webgpu
tfx reference --format markdown -o docs/refs/operations.mdxFor the end-to-end pipeline, see compiler, VM, and renderer.