Goldy: GPU runtime for the Fondaco Machine
Goldy is a Rust GPU library that realizes the Fondaco Machine on modern hardware. Merchants describe parcels (data) and schemes (computation with ownership-derived ordering); Goldy manages the physical medium, schedules dispatches, and mediates all foreign interaction through exchanges.
Maturity: Goldy 0.2 is the Fondaco Machine public API. SemVer applies within 0.2.x; expect breaking changes at 0.3. Python bindings remain alpha; Rust is the primary surface.
Why Fondaco?
Traditional GPU APIs expose descriptors, barriers, render passes, and swapchain plumbing. The Fondaco model is different.
Goldy makes that model practical on 2020+ GPUs:
| Fondaco concept | Goldy realization |
|---|---|
| Scheme | Scheme — retained dependency graph, resubmitted each frame |
| Parcel | Parcel / Buffer / Texture — stable handles |
| Dispatch | Compute, render, copy, and present nodes inside a scheme |
| Exchange | SurfaceExchange, MemoryExchange |
| Settlement | Transaction → Claim → consume() / discard() |
What Goldy ships today
- Scheme-first API — record once, submit every frame; barriers and transient aliasing derived automatically
- Typed bindless shaders — Slang with
[goldy_compute],[goldy_vertex],[goldy_fragment]andgoldy_expaccess patterns (Scattered,Broadcast,Interpolated, …) - Compute-to-surface — compute shaders write swapchain drawables directly; no raster pass required
- Native backends — Vulkan 1.4+ (Windows, Linux), DX12 (Windows), Metal Tier 2+ (macOS); no MoltenVK
- Multi-language bindings — Rust (primary), Python, .NET, C++
- 21 Rust examples — triangle, compute particles, Game of Life, plasma, multi-window, and more
Not yet shipped (see runtime mapping for status): yielding scripts, $yield petitions, scheme fusion/splitting, defragmentation, WASI host integration.
Quick example: compute-to-surface
use ;
let instance = new?;
let device = instance
.request_adapter?
.request_device?;
let ctx = device.create_context?;
let pool = new?;
let surface = new?;
let shader = from_slang?;
let pipeline = new?;
let uniforms = pool.alloc_buffer_with_data?;
let mut scheme = new;
let present = surface.bind_destination?;
scheme
.node
.with_parcel
.with_present
.dispatch;
// Each frame:
let mut submission = scheme.submit?;
present.1.claim?.consume?;
Windowed examples require the examples feature:
Architecture
Merchant (schemes + parcels)
│
▼
Scheme / GraphIR ←── wave & partition analysis, retention
│
▼
RetainedPool / TransientPool / VramAllocator
│
▼
Vulkan │ DX12 │ Metal ←── Slang → SPIR-V / DXIL / MSL
│
▼
Exchanges (present, readback)
Goldy abstracts where bytes live (Layer A: medium) but exposes what access costs (Layer B: coalescing, occupancy, residency). See the design thesis.
Installation
[]
= "0.2"
Slang is embedded at build time and extracted at runtime — application developers do not install Slang separately. Set GOLDY_SLANG_PATH only to override. Maintainer bump procedure: slang/manifest.json + slang/download.sh.
Release packaging and shader debugging notes live in the GitHub repo.
Platforms
| Platform | Backend | Window surfaces |
|---|---|---|
| Windows | DX12 (default), Vulkan | Yes |
| Linux | Vulkan | Wayland (X11 not supported) |
| macOS | Metal | Yes |
Override backend: GOLDY_BACKEND=vulkan|dx12|metal.
Minimum hardware: Vulkan 1.4+, DX12 with Enhanced Barriers, Metal Argument Buffers Tier 2+. See Target Hardware.
Documentation
- 📖 Documentation — tutorials, programming model, backends, bindings
- 📖 Fondaco Machine spec — normative abstract machine
- 📖 Goldy runtime mapping — what Goldy implements today vs designs in progress
- 📖 API reference — Rust docs
Development
GOLDY_VALIDATION=all
Run all examples: ./run_all_examples.sh (requires --features examples).
License
MIT — see LICENSE.
Author
Mohamed Koubaa