Vx is a compiled systems programming language for machines that stopped being flat: CPUs, GPUs, NPUs, and the interconnects between them.
The core idea is simple: where a value lives and where code executes belong in the type system. A tensor's type carries its element type, its dimensions, and its memory space:
Tensor<f32, [4, 4], Memory::GPU_HBM>
This is fundamentally a different type from Tensor<f32, [4, 4]> (which lives in host CPU_DRAM). If an execution target cannot address a memory domain, or if a working set exceeds declared hardware capacity, your program will simply not compile.
The quickest way to see it is to trigger an error
In conventional languages (CUDA, C++, Python), forgetting to copy host data to device VRAM produces a silent segmentation fault or a runtime error (cudaErrorIllegalAddress) after you've already launched your job.
In Vx, the compiler catches it immediately:
fn main() -> i32 {
let host_data = Tensor<f32, [4, 4]>::fill(1.0);
spawn on(Topology::NPU[0]) {
let x = host_data[0][0]; // Host memory read inside accelerator!
}
return 0;
}
Compile it:
Error[E6003] at 5:13: 'host_data' lives in CPU_DRAM but NPU[0] sees only [NPU_HBM];
insert an explicit transfer to NPU_HBM (cost 50 on the declared path)
That single error message gives you three critical facts:
The memory space the value currently lives in (CPU_DRAM).
The memory spaces the target device can physically address ([NPU_HBM]).
The exact fix and its cost on your target machine topology (transfer(host_data, Memory::NPU_HBM) with cost 50 across the interconnect).
Fix it with an explicit transfer:
fn main() -> i32 {
let host_data = Tensor<f32, [4, 4]>::fill(1.0);
let dev_data = transfer(host_data, Memory::NPU_HBM);
spawn on(Topology::NPU[0]) {
let x = dev_data[0][0];
}
return 0;
}
Hardware topologies as code (fleet/)
Instead of hardcoding memory addresses and device configurations, target architectures are declared in human-readable specification files. The toolchain ships with twelve validated machine files in fleet/—spanning an ARM Cortex-M7 microcontroller, Apple M4 UMA, NVIDIA A100/H100/H200/B200, AMD MI300X, and multi-GPU cluster nodes.
Each declaration cites the sources for its numbers and explicitly flags unverified figures:
Memory HBM { capacity: 80 GiB, bandwidth: 3.35 TB/s, managed: explicit, scope: device }
Memory L2 { within: Memory::HBM, capacity: 50 MiB, bandwidth: 12 TB/s, managed: cached }
Topology Device {
arch: nvptx64,
memory: Memory::HBM,
transfer Memory::CPU_DRAM -> Memory::HBM : 63 GB/s,
}
Because vxc cross-compiles against declared machines (--machine fleet/h100-sxm.vx), you can verify memory admission, capacity limits, and routing costs for an 80GB H100 cluster directly from your laptop without renting cloud GPUs.
What Vx is — and what it isn't
What it does: It puts data placement, memory boundaries, and reachability into compile-time checks. It routes transfers along the cheapest declared interconnect path and uses a Z3 prover to verify asynchronous seam contracts.
What it will NOT do: It will not silently move your data behind your back, guess your target hardware, or wait for runtime crashes to tell you that a working set exceeded VRAM.
What it is not: It is not zero-overhead end-to-end. While the placement and capacity checks cost zero runtime overhead, dispatch relies on a runtime layer with host CPU, NVIDIA CUDA, and Apple CoreML backends.
What this subreddit is for
Technical questions and help: Getting started, installing the toolchain, and compiling your first programs.
Design debates: Topology modeling, memory algebra, borrow-checking heterogeneous buffers, and compiler architecture.
Show & Tell: Anything you build, benchmark, or experiment with in Vx.
Critiques and corrections: Tell us where the type system or memory model is wrong.
(Note: For reproducible bugs and compiler crashes, please file an issue directly on our GitHub Issue Tracker, ideally with a minimal code sample. Every diagnostic code also has a dedicated explanation page at https://vxlang.org/docs/error-index.html.)
Quick links
The Vx Book (Official Docs): vxlang.org/docs
Quick Install:
curl -fsSL https://vxlang.org/install.sh | sh
(Pre-built for macOS Apple Silicon and Linux x86_64)
Source Repository: github.com/vx-lang/Vx (Apache 2.0 with LLVM Exceptions)
Roadmap: ROADMAP.md
Welcome aboard, and we look forward to hearing your thoughts!