A systems-oriented language with first-class algebraic effects. One source, eight compile targets — C, HLSL, GLSL, SPIR-V, LLVM IR, WebAssembly, x86-64, ARM64.
QuantaLang is a compiled systems language. It blends classical ML/Rust semantics — ownership, lifetimes, algebraic data types, traits — with a first-class effect system modelled on research into algebraic effects and handlers. Effectful computation is explicit in the type system and dispatched by user-defined handlers.
effect, perform, handle, resume,
with — compose pure code with I/O, async, logging, or backtracking
without monad stacks. Handlers are regular first-class functions.
Mark a function #[fragment] or #[compute] and it compiles
to HLSL, GLSL, or SPIR-V from the same source. No separate shader language. No
string-literal shaders.
Eight codegen backends share the same type-checked IR. Emit a standalone binary, a browser WASM module, a ReShade effect, and a Vulkan compute shader from the same library.
ai, neural, infer keywords reserve syntax
for differentiable program synthesis and neural architecture search via the
companion axiom module.
The compiler is published to crates.io and installs anywhere Rust runs.
cargo install quantalang
The binary is called quantac. Run quantac --help to see all commands.
A vignette shader written once, compiled to HLSL for ReShade or GLSL for Vulkan.
fn vignette(uv_x: f64, uv_y: f64, strength: f64, softness: f64) -> f64 {
let dx = uv_x - 0.5;
let dy = uv_y - 0.5;
let dist = sqrt(dx * dx + dy * dy);
let vig = smoothstep(0.5, 0.5 * softness, dist);
1.0 - strength * (1.0 - vig)
}
#[fragment]
fn PS_Vignette(uv: vec2) -> vec4 {
let color = tex2d(uv);
let vig = vignette(color.x, color.y, 0.5, 0.6);
vec4(color.x * vig, color.y * vig, color.z * vig, 1.0)
}
# emit HLSL for ReShade
quantac vignette.quanta --target hlsl -o vignette.fx
# emit GLSL for Vulkan
quantac vignette.quanta --target glsl -o vignette.glsl
The compiler lowers through a shared IR. Each backend emits idiomatic output for its target — not a transpiled blob.
The Quanta Universe is a 23-module ecosystem authored entirely in QuantaLang: rendering engines, algorithmic trading, color science, OS kernel work, developer tools.
quantalang · foundation · axiom
photon · spectrum · chromatic · lumina · neutrino · prism · refract
quantum-finance · field-tensor · delta · entropy
oracle · wavelength
entangle · calibrate · nova
forge · nexus
Syntax highlighting, bracket matching, and comment toggles in VS Code. LSP server ships with the compiler — works in any LSP-aware editor.
HarperZ9/quantalang-vscode — TextMate grammar, language configuration, file icon.
HarperZ9/quantalang-tmLanguage — used by the VS Code extension, submitted to github-linguist.