About

Ecosystem

Vary ships as a single CLI, but it connects to a broader set of tools. This page lists what exists and where to find it.

ComponentWhat it does
Compiler CLIRun, check, test, format, mutate, build, docs, explain
VS Code extensionSyntax highlighting, diagnostics, go-to-definition, hover
Language server (LSP)Real-time editor feedback via vary lsp with code actions
Check engine30 lint rules with auto-fix, SARIF output, suppression directives
Mutation testingBuilt-in vary mutate with AST and bytecode-level mutation
VAST differential testingRandom program generation with multi-path comparison
Web frameworkHTTP services via Quarkus (expose ... via http)
Docs generationvary docs generates diagnostic and rule reference pages
LLM skillLanguage reference context for AI coding assistants

Editor support

VS Code extension

Syntax highlighting, diagnostics, go-to-definition, hover, and find-references for .vary files. The extension connects to the Vary language server for real-time feedback as you type.

Install from the .vsix file bundled in the Docker image at /opt/vary/vscode-vary/.

FeatureDescription
TextMate grammarSyntax highlighting for .vary files
LSP clientLaunches vary lsp automatically
Bracket matchingAuto-indentation and bracket pairing

Language server (LSP)

The compiler includes a built-in LSP server. Any editor that supports the Language Server Protocol can use it.

vary lsp             # stdio mode (default, used by VS Code)
vary lsp --port 9257 # socket mode (for other editors)
LSP featureDescription
DiagnosticsType errors, warnings, and check rule violations
Go to definitionJump to symbol source
Find referencesList all usages of a symbol
HoverType information on mouseover
Document symbolsOutline view of functions and classes
Code actionsQuick-fixes for check rule violations
Semantic tokensContext-aware syntax highlighting

The language server runs the same type checker and check engine as vary check, so diagnostics in your editor match what the CLI reports.

Check engine

The vary check command includes a rule-based diagnostic engine with 30 lint rules across 6 categories: idioms, contracts, testing, mutation, safety, and API. Rules are identified by stable IDs (e.g., VCI001, VCS001).

FeatureDescription
Auto-fix (--fix)Safe automatic fixes for common issues
SARIF output (--json)Machine-readable diagnostics for CI integration
Suppression# vary-ignore-next-line VCI001: reason comments to suppress specific diagnostics
Explainvary explain VCI001 shows rationale, examples, and fix guidance
Incremental cacheCaches check results to speed up repeated runs

See Check rules and CLI reference for details.

Web framework

Vary uses Quarkus as its HTTP runtime. There is no custom web server in Vary. When you write expose MyService via http, the compiler generates JAX-RS resource classes and Quarkus handles the rest: routing, request parsing, JSON serialization, hot reload, and production deployment.

vary new my-api                # scaffold a Quarkus project
vary dev                       # start with hot reload

Quarkus was chosen because it is a production-grade framework that handles the parts a new language should not try to reimplement: HTTP/2, TLS, connection pooling, health checks, OpenAPI documentation. The Swagger UI is available at /q/swagger-ui by default.

See HTTP services for the full expose syntax.

Runtime

Vary compiles to JVM bytecode. The Docker image ships Eclipse Temurin 25, which is the only runtime we test against.

The compiler and all tools (run, test, mutate, format, check, lsp) are packaged into a single fat JAR. The Docker image wraps this JAR in a shell script so vary works as a standalone command.

Mutation testing

Mutation testing is built into the compiler, not bolted on as a plugin. vary mutate applies small changes to your source code and bytecode, runs your tests against each mutant, and reports which changes your tests failed to catch.

This works because the compiler has direct access to the AST and bytecode. External mutation tools have to parse and instrument code independently; Vary reuses the same pipeline it already has.

See Testing for details.

Docker

The recommended way to run Vary. No local Java installation required.

docker pull ghcr.io/ccollicutt/vary:latest
alias vary='docker run --rm -u "$(id -u):$(id -g)" -v "$(pwd):/workspace" -w /workspace ghcr.io/ccollicutt/vary:latest'

The image includes the compiler, runtime, stdlib, examples, VS Code extension source, and the LLM skill for AI-assisted development.

LLM skill

The Docker image bundles an LLM skill at /opt/vary/llm-skill/. This gives AI coding assistants context about Vary syntax, the type system, the stdlib, and the compiler toolchain so they can write, debug, and explain Vary code. The skill files are plain markdown and work with any LLM that supports system prompts or context files.

What does not exist yet

MissingNotes
Package manager or registryNo dependency resolution
Debugger (step-through)No breakpoint or step support
ProfilerPhase timing via --profile-phases; no call-level profiler
Self-hostingCompiler is written in Kotlin, not Vary
REPL history and tab completionBasic REPL only
← Performance
What we ship →