VibeLang
Code with Intent. Ship with Confidence!
VibeLang compiles intent, contracts, and effects into deterministic native binaries. Ship agentic services that stay correct — whether code is written by humans or AI.
1.1x
Faster than C, Rust
~20x
Faster than Python
1.7ms
Cold start
0
Runtime deps
pub run_agent( action: Str, risk: Int, budget: Int) -> Result<Str, Error> { // Declare intent: used for drift checks + reviews. @intent "execute an AI agent action only when risk is within budget" @examples { // Examples compile into tests. run_agent("summarize", 2, 5) => ok run_agent("deploy", 9, 3) => err } // Preconditions: enforced in dev/test (and optionally release). @require budget > 0 @require risk >= 0 // Explicit effects: makes I/O + concurrency visible to the compiler. @effect io @effect concurrency // Guardrail: block high-risk actions before doing any work. if risk > budget { return err("risk exceeds budget") } // Spawn the action and receive a typed result through a channel. result := chan(1) go execute(action, result) ok(result.recv())}Why VibeLang
Built for creative velocity.
Engineered for controlled execution.
Intent-Driven by Default
@intent, @require, @ensure, @examples, and @effect — all first-class language primitives that compile into real checks.
Native AOT Performance
Cranelift-powered compilation to native binaries. No VM, no JIT, no garbage collection pauses in the hot path.
Deterministic Builds
Same source, same flags, same binary. Deterministic diagnostics and release evidence eliminate CI surprises.
Structured Concurrency
Compile-time sendability checks and transitive effect tracking catch data races before they reach production.
AI-Native Guardrails
Move fast with LLM copilots. Intent annotations survive refactoring and drift detection catches regressions early.
Complete Toolchain
Compiler, test runner, formatter, linter, doc generator, package manager, and LSP — all in the vibe CLI.
Intent-Driven Development
Declare. Verify. Execute. Observe.
State behavior with concise syntax, verify with compiler gates, execute with runtime enforcement, observe with deterministic diagnostics.
State What, Not Just How
@intent annotations describe purpose in natural language. They survive refactoring and guide AI-assisted code reviews.
pub greet(name: Str) -> Int { @intent "print a greeting for the given name" @effect io println(name) 0}Compiler and CI Validate Everything
@require and @ensure become executable checks. @examples generate real test cases.
pub divide(a: Int, b: Int) -> Int { @require b != 0 @ensure . * b <= a @examples { divide(10, 3) => 3 divide(9, 3) => 3 } a / b}Deterministic Artifacts, Every Time
Build and run native binaries with the same semantics verified in CI. No runtime surprises.
$ vibe build main.yb --profile release $ vibe run main.yb Close the Feedback Loop
Logs, metrics, and crash repro formats close the loop. Intent drift becomes a fixable signal, not a silent regression.
AI assists. Determinism decides. Compilation never depends on AI services — always deterministic, always offline-capable.
Transitive effect tracking. The compiler knows every function that touches IO, allocation, or shared state.
Code Snippets
Show, Don't Tell
Expressive syntax, explicit constraints, visible intent. Contracts, effects, and examples are first-class language features — they compile into real checks.
AI agents gated by compile-time contracts. Risk exceeds budget? Blocked before it runs.
1pub gate_action(2 risk: Int, budget: Int3) -> Int {4 @intent "allow agent action only when5 risk stays within budget"6 @examples {7 gate_action(2, 5) => 18 gate_action(9, 3) => 09 }10 @require budget > 011 @require risk >= 012 @ensure . >= 013 @ensure . <= 114 @effect io1516 if risk > budget { return 0 }17 118}@intentDeclare IntentDescribe what this function should do in plain language. The AI sidecar uses this for drift detection across refactors.
@examplesExecutable ExamplesInput/output pairs that the compiler turns into real test cases. Run them with vibe test — they're not just documentation.
@requirePreconditionsChecked at function entry in dev/test builds. Catch bad inputs before they propagate through your system.
@ensurePostconditionsChecked before return. The dot (.) refers to the return value. Use old(expr) to snapshot entry-time state.
@effectEffect DeclarationsDeclare side effects explicitly. The compiler tracks them transitively through your entire call graph.
Performance
C-Level Speed. Modern Syntax.
Competes with C, C++, and Rust on real-world workloads.
VibeLang compiles directly to native machine code — no virtual machine, no interpreter, no garbage collector pauses. We benchmark against the fastest compiled and interpreted languages to keep ourselves honest.
Against the Fastest Compiled Languages
Average performance ratio — below 1.0 means VibeLang is faster
vs C
0.89x
VibeLang is faster
Across 3 shared benchmark programs
vs Rust
0.93x
VibeLang is faster
Across 16 shared programs — wins 9 of 16
vs Zig
0.82x
VibeLang is faster
Across 12 shared programs
vs C++
1.74x
C++ is faster
Across 4 shared programs
Where VibeLang Outperforms C and Rust
Real programs where VibeLang beats established systems languages
binarytreesjson-serdehttp-servermerkletreesnsievelruAgainst Interpreted Languages
The speed gap you get by switching from a scripting language to VibeLang
All benchmarks run inside Docker on identical hardware. Every program's output is verified for correctness before timing. Full methodology and raw data available on the benchmarks page.
The AI Era
Where AI Writes Code,
VibeLang Keeps It Honest.
As AI agents generate more production code, the gap between “compiles” and “correct” widens. VibeLang closes it with language-level guardrails.
The Problem
LLMs generate code that compiles but silently drifts from product intent. The more agents contribute, the faster correctness degrades. Traditional testing catches bugs — not intent violations.
VibeLang's Answer
Embed control into the language itself. Contracts, effects, and deterministic builds create guardrails that scale — whether code is written by humans, copilots, or autonomous agents.
Autonomous Agent Pipelines
Multi-agent systems where each step has explicit contracts. Guardrail functions score risk, block unsafe actions, and enforce budgets — all verified at compile time.
LLM-Generated Codebases
AI writes the code, VibeLang verifies the intent. @intent annotations survive refactoring, @examples become executable tests, and drift detection flags regressions before they ship.
Regulated & Auditable Systems
Reproducible builds, deterministic diagnostics, and release evidence make every deployment verifiable. Compliance becomes a build artifact, not a manual process.
The Road Ahead
- Intent annotations catch AI-generated drift
- Contracts enforce correctness at function boundaries
- Effect system tracks side effects across call graphs
- Multi-agent orchestration with typed channels
- Self-healing pipelines with contract-driven retry
- AI sidecar (Claude) suggests missing contracts from code patterns
- Autonomous code generation with provable intent alignment
- Cross-service contract verification at deploy time
- Self-hosting compiler written entirely in VibeLang
Concurrency
Structured Concurrency,
Verified at Compile Time.
Go-inspired primitives with compile-time safety guarantees. Every concurrent operation is effect-tracked and sendability-checked.
Worker Pool with Channels
1worker(id: Int, done: Chan) -> Int {2 @effect concurrency3 done.send(id * id)4 05}67pub main() -> Int {8 @effect concurrency9 @effect io10 @effect alloc11 done := chan(4)1213 go worker(3, done)14 go worker(7, done)1516 first := done.recv()17 second := done.recv()1819 println(first + second)20 021}Select with Timeout
select { case msg := inbox.recv() => println(msg) case after 5s => println("timeout") case closed shutdown => println("shutting down")}Fan-Out / Fan-In
goLightweight Tasks
M:N work-stealing scheduler. Thousands of concurrent tasks without OS thread overhead.
chanTyped Channels
Bounded channels with compile-time sendability checks. No data races in safe code.
selectMultiplexed I/O
Multiplex channels with built-in timeout and graceful shutdown detection.
@effectEffect Tracking
Concurrency effects tracked transitively. The compiler knows every function that touches shared state.
Toolchain
One Binary. Everything You Need.
Nine commands. One CLI. Zero external dependencies.
vibe checkType-check + validate contracts
vibe buildCompile to native binary
vibe runBuild and execute
vibe testRun tests + @examples
vibe fmtFormat source code
vibe docGenerate API docs
vibe lint --intentAI-powered drift detection (Claude)
vibe pkg resolveManage dependencies
vibe lspLanguage server for editors
Get Started
From Source to Native in 60 Seconds
Clone, build, run. For packaged binaries, see the platform install guides.
1. Install from source
$ git clone https://github.com/skhan75/VibeLang.git $ cd VibeLang $ cargo build --release -p vibe_cli $ export PATH="$PWD/target/release:$PATH" 2. Create, run, test, format
$ vibe new hello && cd hello $ vibe run main.yb $ vibe test main.yb $ vibe fmt . --check Your first program
1pub main() -> Int {2 @effect io3 println("hello from vibelang")4 05}Expected output:
hello from vibelangWant to contribute? Check out our contributing guide.