Design Thesis

Why Goldy exists, and how it differs from a conventional GPU library. Machine semantics live in Machine Specification; what is shipped today is in Goldy Runtime Mapping. Vocabulary: Terminology.

Executive summary

Goldy is a GPU runtime for the Fondaco Machine — programs own parcels (data) and express computation as schemes (dispatches + ownership-derived precedences). It targets modern native APIs (Vulkan 1.4+, DX12, Metal Tier 2+) with no translation layers, a single shader language (Slang), and a scheme-first API that sheds descriptor sets, explicit barriers, and swapchain ceremony.

The Fondaco model on GPU

Traditional GPU programming exposes descriptor set layouts, image layout transitions, render pass objects, pipeline layouts, and raw swapchain images with semaphores.

Fondaco instead gives the program:

ConceptRole
ParcelStable identity for data; physical medium is runtime-managed
SchemeFirst-class computation graph; precedences from ownership
ExchangeMediated foreign I/O (present, readback) via linear claims
GateWhere the runtime may relocate, reclaim, or insert work

Goldy's public API (Scheme, Parcel, SurfaceExchange, MemoryExchange) implements this model.

Access patterns, not graphics categories

Goldy names resources for what the hardware does, not which API invented the term:

Goldy termHardware behavior
ScatteredAny-thread read/write
BufRORead-only scattered (stronger cache hints)
BroadcastWave-broadcast constant fetch
InterpolatedDedicated texture filtering silicon
DirectSpatial2D/3D indexed access, no filtering
FilterSampler configuration

Shaders declare these as typed Slang parameters on [goldy_*] entry points. The CPU side uses matching buffer / texture kinds and scheme NodeAccess. See Parcels.

What Goldy sheds

Because Goldy requires modern baseline hardware, it drops:

Legacy conceptGoldy approach
Render pass objectsDynamic rendering
Descriptor set layoutsBindless (backend-internal)
Separate transfer queuesUnified queue model
OpenGL fixed functionShaders only
Multiple shader languagesSlang only

Details: What Goldy Sheds and Goldy vs wgpu.

Slang and virtual entry points

Goldy uses Slang as its sole shader language, compiled at runtime to SPIR-V / DXIL / MSL. The compiler is embedded in the crate.

import goldy_exp;

[goldy_compute]
[numthreads(64, 1, 1)]
void cs_main(MyUniforms cfg, Scattered<uint> data, ThreadId id) {
    data[id.x] = data[id.x] + cfg.base;
}

The virtual_main transform generates platform entry points with bindless slot resolution — see Virtual Entry Points. The goldy_exp standard library provides access functions, math, color utilities, vertex formats, and workgroup collectives.

Unified graphics and compute

Goldy treats graphics and compute as one scheme:

  • Compute simulation → raster present in one retained scheme
  • Compute-to-surface: compute writes swapchain drawables directly (no RenderPipeline) — Compute to Surface
  • Cross-scheme ordering via context timeline / ledger

This matches how modern engines and CUDA-style workloads converge on the same memory-access patterns. Goldy provides the primitives; performance patterns remain the developer's responsibility.

Backends

PlatformBackendNotes
WindowsDX12 (default), VulkanPIX on DX12
LinuxVulkanWayland surfaces
macOSMetalNative, not MoltenVK

Auto-selection with GOLDY_BACKEND override. Capability queries reflect backend-specific features honestly — Backend Architecture.

Goldy vs wgpu

wgpuGoldy
IdentityWebGPU for RustFondaco GPU runtime
GovernanceW3C specIndependent
Legacy floorVulkan 1.0+, web LCDVulkan 1.4+, modern only
Binding modelWebGPU bind groupsTyped bindless + schemes
BrowserYesNo (native only)

Use wgpu for web and maximum compatibility. Use Goldy for scheme-first Fondaco semantics and the modern feature union. Full write-up: Goldy vs wgpu.

Inspirations

SourceContribution
Sebastian Aaltonen — "No Graphics API"Target modern hardware; drop legacy ceremony
Ralph Levien — piet-gpu-hal post-mortemAbstract meaning, expose cost
Wayland compositor modelComplete frames, explicit sync, mediated present
SlangOne shader language, multi-backend
wgpuInstance / device ergonomics (adapted to schemes)
TU Darmstadt HAL paperMinimal necessary feature analysis

See also Motivation.

Roadmap posture

Shipped in 0.2.x: schemes, exchanges, compute-to-surface, growable buffers, retained replay, language bindings, Rust examples.

Designed: yielding scripts, scheme fusion / splitting, defragmentation, compute algorithm libraries (scan, sort, BLAS-class).

Speculative: WASI goldy-host, CUDA backend exploration, pre-2020 traditional-binding backend.

Do not treat Designed or Speculative items as shipped. Status table: Goldy Runtime Mapping.

Further reading

  1. Machine Specification
  2. Goldy Runtime Mapping
  3. Terminology
  4. Motivation · What Goldy Sheds · Target Hardware