Vais (Vibe AI Language for Systems) is a systems programming language optimized for AI code generation. The current public baseline includes a clean compiler main gate and a VaisDB aggregate main full-build smoke, while DB/server/web product claims stay tied to named gates.
fn fib(n: i64) -> i64 { I n <= 1 { n } else { @(n - 1) + @(n - 2) } } fn main() -> i64 { result := fib(10) puts("fib(10) = {result}") 0 }struct Vec2 { x: f64, y: f64 } fn len(v: Vec2) -> f64 { sqrt(v.x * v.x + v.y * v.y) } fn main() -> i64 { p := Vec2 { x: 3.0, y: 4.0 } puts("len = {len(p)}") 0 }enum Shape { Circle(f64), Rect(f64, f64), } fn area(s: Shape) -> f64 { match s { Circle(r) => 3.14159 * r * r, Rect(w, h) => w * h, } }
Full-word declaration and import spellings are canonical where available; compact control forms such as I, LF, LW, D, B, and C remain current syntax. Public claims distinguish the compiler main gate, the VaisDB aggregate main full-build smoke, schema fixtures, and scoped integration evidence.
enum Shape { Circle(f64), Rect(f64, f64) }
fn area(s: Shape) -> f64 {
match s {
Circle(r) => 3.14 * r * r,
Rect(w, h) => w * h,
}
}
fn classify(s: Shape) -> str {
a := area(s)
I a > 100.0 { "large" }
else I a > 10.0 { "medium" }
else { "small" }
}
enum Shape { Circle(f64), Rect(f64, f64) }
fn area(s: &Shape) -> f64 {
match s {
Shape::Circle(r) => 3.14 * r * r,
Shape::Rect(w, h) => w * h,
}
}
fn classify(s: &Shape) -> &str {
let a = area(s);
if a > 100.0 { "large" }
else if a > 10.0 { "medium" }
else { "small" }
}
from enum import Enum
from dataclasses import dataclass
import math
class Circle:
radius: float
class Rect:
width: float; height: float
def area(s) -> float:
match s:
case Circle(r): return 3.14 * r * r
case Rect(w, h): return w * h
def classify(s) -> str:
a = area(s)
if a > 100.0: return "large"
elif a > 10.0: return "medium"
else: return "small"
type Shape interface { area() float64 }
type Circle struct { R float64 }
type Rect struct { W, H float64 }
func (c Circle) area() float64 {
return 3.14 * c.R * c.R
}
func (r Rect) area() float64 {
return r.W * r.H
}
func classify(s Shape) string {
a := s.area()
if a > 100.0 { return "large" }
if a > 10.0 { return "medium" }
return "small"
}
typedef enum { CIRCLE, RECT } ShapeTag;
typedef struct {
ShapeTag tag;
union { double r; struct { double w, h; }; };
} Shape;
double area(Shape s) {
switch (s.tag) {
case CIRCLE: return 3.14 * s.r * s.r;
case RECT: return s.w * s.h;
}
}
const char* classify(Shape s) {
double a = area(s);
if (a > 100.0) return "large";
if (a > 10.0) return "medium";
return "small";
}
Vais emits LLVM IR for native builds. The compile-speed chart is current; the runtime chart is a scoped historical snapshot until the runtime suite is refreshed.
Designed from the ground up for AI-assisted development without sacrificing performance.
fn, struct, enum, else, match, return, use, and pub are canonical where the compiler exposes full-word spellings. Compact control tokens remain explicit syntax where no full-word spelling is promoted.
The @ operator calls the current function recursively. No need to repeat the function name — AI-friendly and concise.
If/else, match, and blocks all return values. No return keyword needed for the last expression. Functional and ergonomic.
Compiles promoted native paths through LLVM. Broader optimization and backend claims are tracked by explicit certification gates.
Bidirectional type checking infers types automatically. Write x := 42 instead of explicit type annotations everywhere.
LSP server, formatter, debugger, REPL, package manager, and IDE plugins exist as implementation surfaces. Support level depends on named gates.
The promoted path is native codegen. JavaScript, WebAssembly, and browser execution paths remain experimental unless a page names a gate.
Per-module dependency tracking and parallel codegen are active workbench surfaces; exact performance claims require benchmark gates.
The repository contains 50,000+ lines of Vais compiler sources used for bootstrap and conformance work. Current guarantees are the certified Core and promoted runtime gates.
Generic monomorphization is promoted only where named fixtures cover it. Generic enum layout and broader specialization semantics remain gate-bound language work.
Phase 158 strict type coercion: implicit widening only (i32→i64), no silent bool↔int or float↔int conversions. All cross-type casts are explicit with as, matching Rust's safety guarantees.
Database, server, and web packages are tracked by explicit package, runtime, unit, full-build, cross-package schema, and shared-schema product evidence. The compiler main baseline now includes the clean-cache VaisDB aggregate full-build smoke; other runtime/package counts remain scoped evidence.
Hybrid relational + vector database workbench with main full-build smoke 36/36 modules clean, plus scoped package codegen 261/261 and runtime smoke 34/34 evidence. Product-complete SQL/vector/FTS coverage remains outside the current claim.
HTTP framework workbench with server runtime integration evidence 20/20. Broader REST, GraphQL, WebSocket, auth, and deployment guarantees require dedicated gates.
Web framework workbench with scoped runtime smoke evidence 61/77, unit 390/390, ecosystem package tests 3272/3272, full-build 24/24, and shared-schema product evidence 9/9 ported as a compiler main-fixture workspace gate. Size claims require a size gate.
<script> let count = __vx_state(0) let doubled = __vx_derived(count * 2) </script> <template> <button @on:click={count++}> Count: {count} (×2 = {doubled}) </button> </template> <style> button { padding: 12px 24px; } </style>
Try Vais syntax and examples in the browser. Real compilation uses the playground API; browser-only compile/execute remains experimental.
curl -fsSL https://vaislang.dev/install.sh | sh
Detects your OS & arch automatically. macOS, Linux, WSL.
irm https://vaislang.dev/install.ps1 | iex
brew tap vaislang/tap && brew install vais
cargo install vaisc
docker run -it vaislang/vais:latest