Early developmentVectrune is pre-1.0 and evolving quickly. Syntax and APIs may change between releases.Follow progress on GitHub

Mass-adoption milestone

Get to a useful Vectrune app in minutes.

Vectrune is a declarative language and runtime for structured data, APIs, and small app workflows. This teaching-site version focuses on one clear goal: help you run a working app, understand the file shape, and pick the right next example.

Quickstart

5-minute first success

Install Vectrune for your platform, then run your first app end to end.

Install Vectrune

macOS and Linux - Homebrew

brew tap davethomas11/homebrew-vectrune
brew install vectrune

Then verify the install with:

vectrune --version

Windows - release download

The repository currently documents a release-download path for Windows.

  • Open the GitHub Releases page.
  • Download the latest Windows executable.
  • Place the executable folder on your PATH.
Open Releases page

Any platform - build from source

cargo install --path .

Use this path when you already have a Rust toolchain and want to run from a local clone.

1

Verify the install

vectrune --version
2

Run the example app

vectrune examples/app.rune

This starts the minimal REST app defined in examples/app.rune.

3

Hit the health route

curl http://127.0.0.1:3000/health

Expected response: OK

What you just learned

Vectrune apps use readable sections like @App and @Route, and you can get a working server without a lot of framework boilerplate.

Interactive

Try Vectrune in your browser

Type some Rune code below and run it directly in this sandbox.

Code

Output

Click 'Run' to see output here...

Try changing the log message or adding new routes.

Language tour

Read a Vectrune file at a glance

@App

Defines the app name, type, version, and optional startup behavior.

@Schema/Thing

Defines structure and validation rules for request or data shapes.

@Route/METHOD /path

Maps an HTTP route to a sequence of steps in a run: block.

@Component/Name and props

Define reusable view sections with @Component/Name, then pass named values at each invocation site: MyComponent title="Hello".

Builtins in run:

Use builtins such as parse-json, validate, respond, and memory helpers.

#!RUNE

@App
name = Example API
type = REST
version = 1.0

@Route/GET /health
run:
    log "Health check"
    respond 200 "OK\

Guided example

Walk through a memory-backed API

The examples/memory_api.rune example teaches app startup, schema validation, and REST routes together.

1. Initialize app state

@App
name = Memory Example API
version = 1.0
type = REST
run:
    skaters = load-rune skateboarders.rune
    set-memory skaters

Load starter data at boot and keep it in memory for later routes.

2. Define a schema

@Schema/Skater
fields:
    name: String
    age: Integer
    style: String

Use schemas to validate the shape of incoming data before mutating state.

3. Read from memory

@Route/GET /Skaters
run:
    skaters = get-memory skaters
    return skaters

Routes can pull from runtime memory and return the current value directly.

4. Validate before write

@Route/PUT /Skaters
run:
    skaters = get-memory skaters
    new-skater = parse-json body
    validate new-skater #Skater
    append skaters.Skateboarder.record new-skater
    set-memory skaters
    return skaters

Parse the request, validate it against the schema, then update shared state.

Key builtins in this walkthrough

load-rune, set-memory, get-memory, parse-json, validate, append, and return.

Starter examples

Pick the right next example

Beginner

examples/app.rune

The smallest complete app. Best first stop for understanding @App, @Route, and run:.

Beginner

examples/skateboarders.rune

A low-cognitive-overhead data document for learning records, repeated entries, and transform workflows.

Practical

examples/user_api.rune

A stronger REST example with schemas, CRUD-style routes, validation, and path parameters.

Practical

examples/book_graphql.rune

Learn GraphQL queries and mutations with memory-backed state and a compact app shape.

Advanced

examples/tic_tac_toe/

A Rune-Web example split into UI, logic, and style parts. Good once the basics already feel natural.

What next

Where the teaching site is going

Coming next

  • Full-featured Wasm playground (now in preview!)
  • Step-by-step language tour pages
  • Builtin reference pages sourced from knowledge/
  • More guided walkthroughs for REST, GraphQL, and Rune-Web

Current intent

We are currently transitioning this teaching site to be fully interactive. The sandbox is now powered by the actual Vectrune runtime compiled to WebAssembly, ensuring that what you see in your browser is exactly what you get when running the CLI locally.