Vx: one language, every chip.
One language, every chip.
A heterogeneous-systems programming language that puts hardware topology, memory placement, and reachability directly in the type system.
Why Vx • 30-Second Demo • Quickstart • Core Pillars • Architecture • Status & Limitations • Documentation • Discord
Modern high-performance programs are rarely confined to a single CPU. They orchestrate work across host DRAM, PCIe buses, GPU high-bandwidth memory (HBM), and specialized accelerators like NPUs or the Apple Neural Engine (ANE).
In conventional languages (CUDA, C++, Python), hardware topology and memory spaces are invisible to the compiler. If host code reads a device pointer, or if an asynchronous transfer is not awaited, your program fails at runtime: with a silent corruption, a fatal segmentation fault, or an out-of-memory (OOM) crash hours into a distributed training job.
Vx eliminates this class of bugs at compile time.
Where a value lives (Memory::CPU_DRAM, Memory::GPU_HBM, Memory::NPU_HBM) and where code executes (Topology::GPU[0], Topology::NPU[0], Topology::ANE) are first-class types. The compiler checks memory capacity, bus bandwidth, and address visibility before code ever touches silicon:
| Challenge | Today (CUDA / C++ / PyTorch) | The Vx Way |
|---|---|---|
| Invalid device memory access | Host reads GPU pointer $\rightarrow$ runtime segfault (cudaErrorIllegalAddress) | Compile Error E6003: Compiler proves host cannot address device space and suggests the missing transfer |
| Memory capacity exhaustion | Runtime OOM crash when a tensor working set exceeds VRAM | Compile Error E6009 / E6010: Compiler checks memory capacity ahead of time against declared hardware limits |
| Targeting multi-accelerator nodes | Fragmented across CUDA, Metal, OpenCL, and proprietary vendor runtimes | Unified syntax: spawn on(Topology::...) with declarative hardware definitions in fleet/ |
| Asynchronous data hazards | Race conditions and manual stream synchronization bugs | Formally verified seam contracts: Transfer bounds and visibility are proven by a Z3 solver |
Here is a complete matrix multiplication that prepares data on the host, stages it into an accelerator's HBM, executes on the device, and brings the result back:
fn main() -> i32 {
// 1. Allocate and initialize host matrices
let a = Tensor<f32, [4, 4]>::fill(2.0);
let b = Tensor<f32, [4, 4]>::fill(3.0);
let mut c = Tensor<f32, [4, 4], Memory::NPU_HBM>::new();
// 2. Explicitly stage data across the interconnect into accelerator HBM
let a_npu = transfer(a, Memory::NPU_HBM);
let b_npu = transfer(b, Memory::NPU_HBM);
// 3. Dispatch execution onto the declared topology
spawn on(Topology::NPU[0]) {
c = a_npu @ b_npu;
}
// 4. Retrieve result back to host DRAM
let c_host = transfer(c, Memory::CPU_DRAM);
print(c_host[0][0]); // 24
return 0;
}
You can run it with the built-in JIT:
$ vxc matmul.vx
24
If you forget to transfer the input a and attempt to read it inside the spawn on(Topology::NPU[0]) block, the compiler refuses the program immediately:
Error[E6003] at matmul.vx:12:9: 'a' lives in CPU_DRAM but NPU[0] sees only [NPU_HBM];
insert an explicit transfer to NPU_HBM (cost 50 on the declared path)
The compiler proves that NPU[0] cannot address CPU_DRAM, finds the cheapest legal route across the declared bus edges, calculates the transfer cost, and provides the fix.
curl -fsSL https://vxlang.org/install.sh | sh
The Linux toolchains include LLVM. On macOS, install LLVM 22 first with brew install llvm@22. Getting started lists the other tools that a program can need, such as z3.
brew install llvm@22 z3 cmake ninja pkg-config. The llvm formula of Homebrew is LLVM 23 now, and Vx needs LLVM 22../scripts/provision/setup_linux.sh installs LLVM 22 from apt.llvm.org and the other packages.# Clone the repository
git clone https://github.com/vx-lang/Vx.git
cd Vx
# Locate LLVM and write local configuration
./setup.sh
# Source environment variables (required before running cargo)
source config.local
# Build the release compiler
cargo build --release
`
diagnostics: E8014 says "an Unique" because it picks "a" or "an" from the first letter
https://github.com/vx-lang/Vx/issues/4644
Labels: 없음
[Tracking] Soundness holes found by checking Vx against Anthropic's Rust posts and rustc's open soundness bugs
https://github.com/vx-lang/Vx/issues/4641
Labels: core-lang, project, tracking
std::algo::smt: the llama2 overlap query needs 95 branches and 46 product lemmas
https://github.com/vx-lang/Vx/issues/4640
Labels: 없음
prover: number the hidden names of each query from 0, so that a repeated question hits the cache
https://github.com/vx-lang/Vx/issues/4639
Labels: 없음
std::bigint: shortcuts for small and whole numbers in BigInt and Rational arithmetic
https://github.com/vx-lang/Vx/issues/4638
Labels: 없음
std::algo::smt: replace an integer name that an equality defines with its term
https://github.com/vx-lang/Vx/issues/4637
Labels: 없음
std::net: set socket options before the connect, for curl's --mptcp, --tcp-fastopen, --ip-tos and --vlan-priority
https://github.com/vx-lang/Vx/issues/4634
Labels: stdlib
No CONTRIBUTING document was found. Please check the README and open issues.