veko
ORO Homoiconic Language • Custom VM • Wasm 3.0 (vvm) • Native x86_64 & arm64

Veko 1.0 — Overview & Quickstart

Veko Language and Runtime

Veko (.vk source, fixed-width 64-bit .vko portable bytecode, .wasm WebAssembly 3.0 modules, and standalone native executables across 5 zero-dependency OS/CPU targets: win-x64 PE32+, win-arm64 PE32+ 0xAA64, linux-x64 ELF64, linux-arm64 ELF64, and macos-arm64 Mach-O) is a 100% self-hosted homoiconic systems and dialect programming language (https://veko-lang.org) designed to read like clear human commands, reclaim memory deterministically without a garbage collector, and execute across three backends built in pure .vk (src/, 46 modules) paired with an embedded 95-module pure-.vk standard library (lib/).

Eko Inspecting Veko's Three Execution Tracks


Why Veko Exists

Most programming languages force an uncomfortable trade-off between low-level control (C, C++, Rust, Zig with heavy punctuation or lifetime annotations), everyday ergonomics (Python, Go, Ruby, TypeScript with stop-the-world garbage collection pauses), and syntactic extensibility (Lisp and Forth with parenthesis soup or manual stack shuffling). Veko unifies all three:

  1. Parentheseless Prefix Words + Infix Math: Call fixed-arity words left-to-right (os/write-file path data) while keeping natural infix arithmetic ((crc >>> 8) ^ table[i]), tight dot chains (raw.trim.lower), and slices (buf[0..n]).
  2. Deterministic ORO + Copy-on-Write Memory: Every heap value has a single owner (rc == 1) and frees deterministically at scope exit. Shared snapshots clone lazily only if mutated, and reference cycles are structurally impossible.
  3. Slash Refinements, Zero nil, and /or Recovery: Veko 1.0 has no nil. Unit actions evaluate to .ok, JSON null maps to .null, and missing lookups or I/O failures return catchable err values handled inline via /or [ fallback ] and LIFO defer.
  4. Homoiconic [ ... ] Dialects & Capability Security: Code and data share the same block representation (quote, compose, macro, parse-block), while veko.vk allow-caps and compile-time/runtime .secret firewalls prevent unauthorized syscalls and credential leaks.
UNIFIED COMPILER & RUNTIMES

Veko 1.0 Shared Frontend & Three-Track Execution Pipeline

39 compiler modules (src/) and 79 stdlib modules (lib/) feeding 64-bit VKO VM, Wasm 3.0 sandbox, and 4 native OS/CPU targets.

Interactive SVG • Click any node (11 components)
SHARED PURE-VEKO FRONTEND lexer.vk + parser.vk + macro_eval.vk + types.vk 79-MODULE PURE-VEKO STDLIB lib/* (shared across all 3 tracks) TRACK A: 64-BIT VKO VM vko_emit.vk + oro_vm.vk TRACK B: WASM 3.0 SANDBOX codegen.vk + runtime*.vk + vvm TRACK C: NATIVE X86_64 & AARCH64 native_emit.vk + arm64_emit.vk Tokens + tight RawBlock Expanded AST use DAG 64-bit VKO PAL calls Typed AST .wasm Typed AST Machine code Frontend Whitespace Lexer [tight] vs [spaced] Frontend Two-Pass Pratt Parser arity scan + BP 80..0 Metaprogramming Homoiconic Dialect Pass quote / compose / parse-block Static Analysis Gradual Types & Caps types.vk + .secret audit Standard Library 79-Module Standard Library PQC + Reactor + Web + DB + UI Track A 64-Bit VKO Bytecode VM superinstructions + REPL Track A Host Guarded VM Host PAL VmPolicy + offscreen UI Track B Wasm 3.0 Code Generator linear-RAM ORO + bulk mem Track B Host vvm Zero-Trust Sandbox WASI 0.3 + fuel + SSRF guard Track C x86_64 & AArch64 AOT SIMD + 79-group DCE Track C Linkers PE32+ / ELF64 / Mach-O win-x64, linux, macos-arm64
Components:
Frontend
Whitespace Lexer
lexer.vk
Component 1 of 11
Architectural Role & Purpose

Tokenizes kebab-case words, slash paths, enums, unit literals, and attachment flags.

Contextual Description & System Interaction

Produces an exact token stream carrying source spans and whitespace attachment bits.

Core Functionality & Mechanics
  • Single-pass O(n) scan with 1-byte lookahead
  • Marks tight postfix attachment for xs[i] and user.name
  • Separates n - 1 subtraction from n-1 identifier and -1 literal
Frontend
Two-Pass Pratt Parser
parser.vk
Component 2 of 11
Architectural Role & Purpose

Resolves top-level arities and module aliases in Pass 1, then builds the AST in Pass 2.

Contextual Description & System Interaction

Unifies parentheseless prefix calls with infix arithmetic and left-to-right \ pipes.

Core Functionality & Mechanics
  • Supports order-independent fn, struct, def, and use bindings
  • Preserves homoiconic [ ... ] RawBlocks alongside AST nodes
  • Enforces Pratt binding power ladder from tight postfix (80) to statements (0)
Metaprogramming
Homoiconic Dialect Pass
macro_eval.vk
Component 3 of 11
Architectural Role & Purpose

Expands compile-time macros and structural block dialects before code generation.

Contextual Description & System Interaction

Enables domain mini-languages (RBAC policies, wire schemas, HTML5 trees) in pure Veko.

Core Functionality & Mechanics
  • Splices evaluated expressions into quoted blocks via compose
  • Matches grammar rules over raw token blocks via parse-block
  • Zero runtime interpreter overhead for expanded static macros
Static Analysis
Gradual Types & Caps
types.vk
Component 4 of 11
Architectural Role & Purpose

Checks gradual/strict types, generics [T], mut loans, .secret sinks, and veko.vk allow-caps.

Contextual Description & System Interaction

Guarantees identical static safety invariants across VM, Wasm 3.0, and Native AOT.

Core Functionality & Mechanics
  • Verifies struct schemas, sealed boundaries, and mut field borrows
  • Blocks .secret flows to net, disk, JSON, channels, UI, and FFI
  • Audits workspace path confinement and VKP1 trust-keys
Standard Library
79-Module Standard Library
lib/*
Component 5 of 11
Architectural Role & Purpose

Delivers codecs, NIST FIPS 203/204/205 PQC, TLS 1.3, HTTP/2, Reactor, Durable Workflows, DBs, and TUI/2D UI.

Contextual Description & System Interaction

Gives Veko complete batteries-included capabilities with deterministic ORO memory.

Core Functionality & Mechanics
  • Zero external C/OpenSSL DLL dependencies for core networking and crypto
  • Uses bytes/with-secret and crypto/seal for scoped key hygiene
  • Compiles directly alongside application modules on every backend
Track A
64-Bit VKO Bytecode VM
vko_emit.vk oro_vm.vk
Component 6 of 11
Architectural Role & Purpose

Executes fixed-width 64-bit VKO instructions, interactive REPL sessions, and .vko bundles.

Contextual Description & System Interaction

Ideal for sub-millisecond startup, live REPL exploration, doctests, and tooling.

Core Functionality & Mechanics
  • op:u8 | flags:u8 | a:u16 | bx:u32 word removes 8/16-bit local limits
  • Fused superinstructions accelerate tight loops without JIT RWX pages
  • TRY_OR and DEFER_PUSH frames drive /or recovery and LIFO cleanup
Track A Host
Guarded VM Host PAL
oro_vm.vk
Component 7 of 11
Architectural Role & Purpose

Enforces runtime capability flags (--allow-fs, --allow-net) and .secret sink checks.

Contextual Description & System Interaction

Keeps interactive execution safe by default with explicit capability opt-in.

Core Functionality & Mechanics
  • Isolates spawn worker heaps with deep-frozen value captures
  • Provides readiness reactor polling and validated offscreen UI surfaces
  • Zero GUI DLL or libc bloat inside the compiler binary
Track B
Wasm 3.0 Code Generator
codegen.vk wasm_enc.vk
Component 8 of 11
Architectural Role & Purpose

Emits standalone WebAssembly 3.0 modules with embedded 12-bucket ORO slab allocators.

Contextual Description & System Interaction

Compiles Veko apps and untrusted plugins into portable capability-audited .wasm.

Core Functionality & Mechanics
  • Lowers /or via structured try_table and tail recur via return_call
  • Uses bulk memory.copy and memory.fill for fast buffer operations
  • Exports _oro_live_slabs for mathematical zero-leak verification
Track B Host
vvm Zero-Trust Sandbox
runtime*.vk
Component 9 of 11
Architectural Role & Purpose

Runs Wasm modules under deterministic fuel quotas, memory caps, and host sandboxes.

Contextual Description & System Interaction

Designed for multi-tenant plugin execution and deterministic compliance workloads.

Core Functionality & Mechanics
  • Enforces per-directory FS confinement and private-IP SSRF blocking
  • Strictly forbids .ffi foreign library loading inside Wasm
  • Isolates concurrent workers in separate linear-memory stores
Track C
x86_64 & AArch64 AOT
native_emit.vk arm64_emit.vk
Component 10 of 11
Architectural Role & Purpose

Compiles directly to native x86_64 and ARM64 machine code with zero external toolchain.

Contextual Description & System Interaction

Delivers maximum throughput and sub-millisecond cold starts without a GC or JIT.

Core Functionality & Mechanics
  • Runtime CPUID dispatch for AVX2, SSE2, and AES-NI intrinsics
  • 79-group worklist DCE strips unused runtime/UI/FFI helpers
  • Cached veko run --native via SHA-256 content-addressed binaries
Track C Linkers
PE32+ / ELF64 / Mach-O
pe_emit.vk elf_emit.vk macho_emit.vk
Component 11 of 11
Architectural Role & Purpose

Links standalone executables for Windows x64, Linux x64/arm64, and Apple Silicon.

Contextual Description & System Interaction

Cross-compiles any target from any host OS in a single command.

Core Functionality & Mechanics
  • Win64 PE32+ (--gui Subsystem=2), static zero-libc Linux ELF64
  • 16 KiB page-aligned macOS arm64 Mach-O + SHA-256 LC_CODE_SIGNATURE
  • Triple-target S1 == S2 self-hosting bit-identical convergence

Three Execution Tracks: Purpose & Decision Guide

All three execution tracks share the exact same lexer, Pratt parser, type/capability checker, ORO ownership rules, and 95-module lib/ standard library (embedded directly inside the single-binary veko SDK):

EXECUTION MODES

Choosing Between Veko's Three Execution Tracks

Write idiomatic .vk code once and select the runtime envelope matching development speed, isolation, or native deployment.

Interactive SVG • Click any node (5 components)
SOURCE WORKSPACE veko.vk + src/*.vk RUNTIME & DEPLOYMENT ENVELOPES Identical ORO & .secret semantics --vm (default) --wasm --native .wasm PE / ELF / Mach-O Source Veko Source & Manifest veko check --strict-types Development Track A: ORO Bytecode VM veko run app.vk / veko repl Zero-Trust Track B: Wasm 3.0 Sandbox veko run --wasm --fuel=... Production Track C: Native Machine Code veko compile --native Delivery Shipped Artifacts .exe / ELF64 / Mach-O / .vkp
Components:
Source
Veko Source & Manifest
main.vk types.vk
Component 1 of 5
Architectural Role & Purpose

Single source of truth defining module imports, types, and capability declarations.

Contextual Description & System Interaction

Every Veko program starts from the same clean module graph.

Core Functionality & Mechanics
  • Checked once by veko check and formatted by veko fmt
  • Declares allow-caps = [.fs .clocks .env .net .ui] in veko.vk
  • Zero #ifdef soup across VM, Wasm 3.0, and Native targets
Development
Track A: ORO Bytecode VM
oro_vm.vk
Component 2 of 5
Architectural Role & Purpose

Fastest edit-run-test cycle, interactive REPL, and portable .vko bytecode bundles.

Contextual Description & System Interaction

Use Track A during daily coding, scripting, and interactive debugging.

Core Functionality & Mechanics
  • Instant startup with zero link wait
  • Supports dynamic eval and interactive :stats inspection
  • Default engine for veko doc --test
Zero-Trust
Track B: Wasm 3.0 Sandbox
codegen.vk
Component 3 of 5
Architectural Role & Purpose

Deterministic capability-confined execution for untrusted extensions and CI leak audits.

Contextual Description & System Interaction

Use Track B for multi-tenant plugins, reproducible sandboxes, and slab leak verification.

Core Functionality & Mechanics
  • Enforces --fuel instruction budgets and --mem-pages ceilings
  • --check-slabs proves _oro_live_slabs == 0 on exit
  • Blocks .ffi and confines filesystem roots
Production
Track C: Native Machine Code
native_emit.vk arm64_emit.vk
Component 4 of 5
Architectural Role & Purpose

Standalone zero-GC executables with SIMD acceleration and cross-OS compilation.

Contextual Description & System Interaction

Use Track C for production servers, CLI tools, desktop GUIs, and edge appliances.

Core Functionality & Mechanics
  • veko run --native caches compiled binaries by SHA-256
  • Emits win-x64 PE32+, linux-x64/arm64 static ELF64, macos-arm64 Mach-O
  • Supports --gui console-free windows and opt-in --allow-ffi
Delivery
Shipped Artifacts
pe_emit.vk elf_emit.vk macho_emit.vk
Component 5 of 5
Architectural Role & Purpose

Self-contained binaries and Ed25519/ML-DSA signed VKP1 source bundles.

Contextual Description & System Interaction

Deploy tiny self-contained artifacts anywhere from cloud VMs to ARM64 edge nodes.

Core Functionality & Mechanics
  • Zero external runtime, JVM, or garbage collector required
  • Single-file copy deployment to containers or bare metal
  • Cryptographically verifiable supply chain via veko pkg
Decision Criteria Track A: --vm / .vko Track B: --wasm (vvm) Track C: --native (x86_64 & arm64)
Primary Goal Instant run, live REPL & .vko bundles Zero-trust isolation & leak verification Standalone OS binaries with zero runtime deps
Targets Cross-platform 64-bit VKO VM WebAssembly 3.0 + WASI 0.3 (vvm) win-x64, win-arm64, linux-x64, linux-arm64, macos-arm64
Sandbox & Quotas --fuel, --allow-fs, --allow-net, --allow-listen, --allow-private-net Full HostSandbox (--fuel, --mem-pages, --check-slabs, FS chroot, SSRF guard) Compile-time veko.vk allow-caps + runtime .secret firewall
Networking & UI lib/net/client, lib/web, lib/reactor, lib/tui, offscreen .ui WASI sockets/net-poll + lib/web, lib/tui, offscreen .ui (.ffi forbidden) Full OS sockets/DNS/TLS 1.3, epoll/kqueue/IOCP, live Win32 --gui, opt-in .ffi

Meet Eko — The Veko Mascot

Eko the Galago — Veko Language Mascot

Veko's mascot is Eko, a silver-taupe Galago (bush baby):

  • Why a Galago named Eko? Eko plays on echo—the clean reflection of homoiconic [ ... ] blocks and compile-time dialects that turn domain notation directly into native code—paired with V to form Veko.
  • Oversized Amber Eyes & Inspectability: A bush baby sees clearly in the dark without guesswork, mirroring Veko's explicit mut loans and built-in token, AST, module, and bytecode inspectors (veko inspect).
  • Independent Acoustic Ears & Refinements: Galagos swivel each ribbed ear to isolate exact signals; Veko's slash refinements (/timeout, /secret, /or) and parse-block rules compose behavior cleanly at the call site.
  • Nimble Single-Branch Balance (ORO + CoW): Agile and lightweight, a Galago lands cleanly on one branch at a time—just as One Reference Only keeps a single owner per value and reclaims memory deterministically without GC pauses.

End-User Documentation Reading Path

Order & Guide Audience What You Will Learn
01. Overview & Quickstart (this page) Everyone Core pillars, execution tracks, and first commands
02. Full Tutorial New Learners 9 hands-on lessons from REPL & pipes through macros, spawn, and structs
03. Language Guide Developers Complete guide to syntax, whitespace rules, ORO memory, closures, and dialects
04. How-To & Newcomer Guide Newcomers & Devs 5 pointers on how to read/write Veko, token/AST inspection, and project recipes
04b. Cookbook & Language Comparisons Evaluators & Devs Idiomatic recipes plus Readability & Writability vs. Go, Rust, Zig, Elixir/Rebol, and Python/TS
05. Developer Tooling All Engineers veko debug & VS Code F5 DAP, veko test --coverage, testing/fuzz, veko fmt, veko lsp, veko doc --html, SVG flamegraphs, veko-lang.org packages, and migrators
06. Standard Library & PQC App & Crypto Devs Complete 95-module stdlib index, collections, codecs, classical crypto, and NIST FIPS 203/204/205 PQC
07. Net, Web, DB & VKP1 Backend & Web Devs io/Stream, DNS, Hybrid PQC TLS 1.3, HTTP/2, QUIC HTTP/3, WebSockets, web + html, JWT/OAuth2/TOTP, Zero-FFI SQLite 3 & ORM (db/sqlite), db/*, and veko-lang.org VKP1 packages
08. Async I/O & Reactor Systems Devs epoll/kqueue/IOCP readiness reactor, timers, cross-thread wakers, web/serve-reactor, and batch HTTP
09. Durable Objects & Workflows Distributed Devs Crash-safe Durable Objects and replay-safe Durable Workflows with LIFO sagas over db/kv
10. TUI, Native UI & FFI Desktop & C/Rust Devs Diffing ANSI tui, 29-widget RGBA32 desktop UI, Win32 + Linux Wayland/X11 + macOS arm64 Cocoa + Wasm <canvas>, clipboard/Hi-DPI, and .ffi (VEKO_LIB)
11. Perf, SIMD & ARM64 Systems Engineers Zero-JIT philosophy, AVX2/SSE2/AES-NI, cached veko run --native, and win-arm64/linux-arm64/macos-arm64
12. Examples & Showcase Apps All Engineers Walkthrough of all 45 examples (01..40 + core tours) and 6 multi-module demos/ apps
13. Administrator Guide Operators & SecOps Build governance, allow-caps, vvm HostSandbox quotas, VKP1 trust-keys, and .secret wiping
14. CLI & Syntax Reference All Users Complete CLI subcommands & flags, veko.vk schema, Pratt precedence ladder, and 105+ builtin arities
15. Master User Handbook All Users Consolidated single-page edition of all End-User guides

Zero-Install Playground & One-Line SDK Installation

Try Veko instantly in your browser (client-side WebAssembly 3.0 Web Worker + <canvas> + sandboxed 64-bit VKO VM) at https://veko-lang.org/play, or install the single-binary portable SDK on Linux, macOS Apple Silicon, or Windows (x86_64 and native Windows 11 ARM64 — Snapdragon X Elite/Plus, Surface Pro/Laptop, and Windows on ARM VMs):

BASH
# Linux (x86_64 / arm64) and macOS (Apple Silicon arm64) — SHA-256 verified
curl -fsSL https://veko-lang.org/install.sh | sh
POWERSHELL
# Windows (PowerShell — auto-detects x64 vs. ARM64 and installs veko-1.0.0-win-x64.zip or veko-1.0.0-win-arm64.zip)
irm https://veko-lang.org/install.ps1 | iex

Offline .zip SDK archives (veko-1.0.0-win-x64.zip for Windows x86_64 PE32+ and veko-1.0.0-win-arm64.zip for native Windows 11 ARM64 PE32+ 0xAA64, bundling veko.exe, lib/, examples/, AGENTS.md, README.md, and LICENSE) are also available at https://veko-lang.org/download.


Quickstart Commands

POWERSHELL
# Verify all 18 test suites or run the full S1 == S2 build orchestrator
veko run tests/run_tests.vk
veko run build.vk -- all

# Run programs across ORO VM (--vm), Wasm 3.0 (--wasm), or cached Native (--native)
veko run examples/hello.vk
veko run --wasm --check-slabs examples/09_concurrent_worker_pool.vk
veko run --native examples/29_async_reactor_http_server_and_client.vk
veko run --native examples/32_durable_objects_and_workflows.vk

# Cross-compile standalone native binaries for all 5 zero-dependency OS/CPU targets
veko compile --native --target=win-x64     examples/14_http_json_api_server.vk -o dist/api.exe
veko compile --native --target=win-arm64   examples/hello.vk -o dist/hello_win_arm64.exe
veko compile --native --target=linux-x64   examples/hello.vk -o dist/hello_linux_x64
veko compile --native --target=linux-arm64 examples/hello.vk -o dist/hello_linux_arm64
veko compile --native --target=macos-arm64 examples/hello.vk -o dist/hello_macos_arm64

# Run multi-module showcase applications (Web, Desktop GUI, Multi-Protocol Mesh, PQC Vault)
veko run --native demos/taskflow_studio/src/main.vk
veko run --native demos/canvas_workbench/src/main.vk
veko run --native demos/pulse_mesh/src/main.vk
veko run --native demos/vault_dialect/src/main.vk

# Launch the interactive REPL or regenerate HTML documentation
veko repl
veko docs