Documentation
Introduction
Getting Started
Language
- Types — Primitives, optionals, function types, and type inference
- Classes and data types — Classes for mutable state, data types for immutable values
- Generics — Write type-safe code that works with any type
- Enums and pattern matching — Fixed variant types with payloads and pattern matching
- Collections and strings — Lists, dicts, sets, and string operations
- Error handling — Try/except, Result types, and custom error classes
- Readable blocks — Grouped bindings and scoped expressions for multi-step work
- Modules and imports — File-based modules, imports, and package structure
- Concurrency — Spawn tasks, manage task groups, and handle cancellation
- Contracts — Preconditions and postconditions on functions
- Language surfaces — How Vary's importable code and compiler-supported features fit together
Standard Library
- Built-in functions — Functions available everywhere without imports
- Standard library — Importable modules for JSON, crypto, filesystem, HTTP, time, process, env, logging, and more
Testing
Via
- Overview — High-level overview of Via and the main docs path.
Installation
- Linux — Install the Vary toolchain on Linux
- Windows — Install the Vary toolchain on Windows
- varyup — The toolchain manager that installs and updates Vary
- Docker — Run Vary in a Docker container
- VS Code — VS Code extension with syntax highlighting and LSP
- macOS — Install the Vary toolchain on macOS
Comparisons
LLMs
About
- Varyonic programming — Varyonic code style and a guide to its design principles
- Language design choices — Trade-offs and rationale behind language decisions
- Varyonic decisions — Observable behavior, typed domains, pure logic, and isolated decisions
- Varyonic guarantees — Errors, contracts, effects, resources, and finite decisions
- The compiler — How the compiler pipeline turns source into bytecode
- Performance — Benchmark results comparing Vary to Java and Python
- Varyonic architecture — Program structure, module layout, and patterns to avoid
- JVM codegen API — Install and embed the experimental Vary JVM bytecode generator
- Ecosystem — Tools, extensions, and integrations around Vary
- Varyonic scripting — A five-phase structure for testable scripts
- Codegen architecture — The public architecture and artifact flow of the JVM codegen component
- Codegen security — Threat model, trust assumptions, reporting, and patch policy for JVM codegen
- What we ship — Distribution formats and what each release includes
Embedded DSLs
- Embedded DSLs — Compiler-integrated syntax for SQL, HTTP, logging, JSON, and AI workflows
- HTTP services — Expose interfaces as HTTP services with typed routes
- SQLite databases — Built-in SQLite support with compile-time typed queries
- Structured logging — Typed, mutation-aware logging with pluggable sinks
- Public JSON APIs — Define secure public JSON routes with taint, capabilities, migrations, workers, safe markdown, and versioned contracts.
- JSON decode — Typed JSON extraction with path-aware errors, validation predicates, and the ? operator
- Public API security — The trust boundary, validators, sinks, auth, capabilities, audit, and compile-time gates that protect public Vary APIs.
- Semantic AI control flow — Use ai using, feels, by meaning, and llm with an explicit context
- Native AI evals — Declare typed AI cases, pure scores, aggregate gates, and bounded fixture or live runs
Project Management
- Known Issues — Currently known bugs and limitations
- Versioning — Monotonic channel versioning instead of semver
Tools and Configuration
Brand
- Brand — Logo, wordmark, and visual identity guidelines
Builtins
- Templates — Pebble-based template rendering with Vary data types as context
Libraries
- AI library — Contexts, capabilities, adapters, and budgets for Vary AI workflows