Active development · v0.8.0 + main

The Vyne language

A C-flavored scientific numerical language with deterministic region memory, native C output, an AST interpreter for fast iteration, a CUDA device backend, and a native ESP32 and Arduino Uno firmware path. No garbage collector. No hidden allocation pauses. Numerical computing, live charts, and managed desktop graphics in one language.

0GC pauses
3execution backends
20+numerical libraries
110Arduino bindings

What Vyne is

Vyne is a statically analyzable numerical programming language built around one idea: memory lifetime belongs in the source code, not in a garbage collector. Values live in a bump arena. A region block confines scratch allocations to a lexical scope, and the arena rewinds at the closing brace. That contract is identical on a desktop and on a 2 KB microcontroller.

The surface syntax is deliberately C-shaped: braces, semicolons, fn declarations, if / while / through control flow, and :: type annotations. On top of that it adds first-class functions, generics by monomorphization, interfaces, pipeline and null-coalescing operators, string interpolation, := declarations, bitwise operators, Float32, executable contracts, and source-to-source reverse-mode automatic differentiation.

 train_step.vy vyne
use native vmath; use external "voptim/voptim.vy"; params :: Array<Float64> := [0.5, -0.2, 0.1]; opt :: voptim.AdamState := voptim.adam_new(params, 0.9, 0.999, 1e-8); @bounded<1_048_576> region step { through epoch :: 0..999 -> loop { # every allocation inside this region is reclaimed at `};` grads :: voptim.Series := voptim.Series([0.01, -0.02, 0.03], 3); lr :: Float64 := voptim.cosine(epoch, 0.05, 1000); voptim.adam_step(opt, grads, lr); }; };

Three execution models, one AST

Interpreter
vynec --ast script.vy runs directly for fast iteration and REPL use. The AST interpreter is the reference semantics for the language.
C transpiler
vynec --compile lowers the same AST to one self-contained C translation unit and hands it to the host C compiler for native binaries.
Embedded firmware
vynec build uses selected ESP32 or Uno hardware. The arena is 64 KB on ESP32 and 1 KB on AVR; checkpoint and rewind semantics remain explicit.

Why Vyne

Predictable memory
Regions reclaim scratch memory in one pointer rewind. Peak memory stays flat across millions of iterations on desktop and on an Uno.
Small, readable surface
One file format, one type system, no macros and no metaprogramming. The whole language fits in a weekend; the library stack grows as you need it.
Native where it matters
Typed arrays and struct layouts cross the native ABI unboxed. The numerical kernels lower to plain C loops with no per-element dispatch.
A real numerical stack
Linear algebra, neural networks, FFT, statistics, optimization, sparse and dense solvers, DSP, control, images, CSV/JSON, plotting, and domain libraries — with Vyne facades over native kernels.

What is new in this generation

  • The region policy suite — @bounded, @zeroed, @deterministic, @realtime, @pool, @slab, @ring, @streamed, @persistent, @speculative, @device, @layout<soa>, and the AD composition attributes, with region.commit, region.move, and drop.
  • Source-to-source AD — @differentiable, @backward, grad, array-reduction VJPs, and custom <fn>_vjp adjoints.
  • A CUDA device backend — @device<cuda>, Float32 by default, forward/backward kernels, reusable vnn training blocks, and a CPU fallback.
  • An Arduino Uno target — a 1 KB arena, 16 checkpoints, 110 bindings, and the same region semantics as desktop.
  • ESP32 and select-once hardware — saved presets, short build/run commands, Wi-Fi, NVS, display, sprites, touch, sensors, and the measured HW-950 configuration.
  • Zero-copy slices — borrowed Slice<T> views and typed-array reserve/resize for reusable numerical buffers.
  • Universal live plotting — colorful image and ESP32 charts with bounded series and automatic live updates.
  • Managed graphics and audio — raylib 6.2, App-owned resources and frames, cameras, shaders, render targets, music, and one-shot sound.
  • A full numerical library stack — linear algebra, ML, FFT, statistics, optimization, sparse and dense solvers, DSP, control, CSV/JSON, plotting, imaging, buses, and domain libraries.
  • A real project — the SRCNN image upscaler with dataset generation, training, CUDA inference, and PSNR/SSIM benchmarks.
  • ESPCN device training — explicit forward/backward/AdamW, checkpoint reload, and reproducible bundled metrics. Explore the graphics showcases for real rendering examples.

Start here

If you want to run code immediately, read Installation and Hello, World. If you want the whole language in one pass, take the Language Tour. If you want to understand the memory model first, jump to Memory & Regions. The SRCNN showcase shows a complete project end to end: dataset generation, training, CUDA inference, and image-quality benchmarking.

Documentation scope
This site is a language and library manual, not a compiler tour. It documents what you can write and call. For internals, read the source tree; for the full release history, read CHANGELOG.md.