Artifact reference

Artifact reference

TinyFX deliberately has several artifacts. They are related outputs of one checked frontend, not interchangeable formats.

ArtifactConsumerWhat it contains
Source .tfxCompiler/editorAuthored program, imports, and optional metadata.
.tfxbRust VM/runtime, native or browser-WASMVersioned bytecode plus shader/compute blueprints and layout information.
WGSLwgpu/WebGPUCompiler-generated shader and compute modules.
Generated TypeScript/ESMJavaScript execution coreStructured CPU program, helpers/imports, and reachable compiler-authored blueprints; never VM bytecode.
Physical WebGPU pass modulesGenerated WebGPU runtime/coreDiscriminated pass descriptions, resource bindings, exact packing/layout data, and WGSL.
Operation referenceDevelopers/toolingGenerated 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.mdx

For the end-to-end pipeline, see compiler, VM, and renderer.