Documentation

Language: VL

VL / Getting started

Article

Getting started

The compiler currently targets Naravm. A VL executable has one required, zero-argument entrypoint: function main().

vl check <file>

Overview

You need Rust stable 1.80 or newer, Cargo, and a checkout of Naravm. Clone both repositories; the compiler lives at the workspace root.

Check a program:

cargo run -- check examples/hello.vl

A clean program exits 0. A broken one exits 1 with an Ariadne report pointing at the span.

The hello-world example imports the standard module and calls std.print:

use std;

function main() {
    std.print("Hello, world!\n");
}

Build a Naravm vmfile:

cargo run -- build examples/hello.vl --out /tmp/hello.nara

Run it from the Naravm checkout:

zig build run -- /tmp/hello.nara
# Hello, world!

Topics

Editor setup and file association

Stub. How to associate .vl files and where diagnostics surface.

A first program, walked line by line

hello.vl demonstrates the required main, dotted VL namespaces, and the Naravm std::print native function. VL writes std.print; the backend maps that name to Naravm’s double-colon namespace without changing the VM.

How to read an Ariadne diagnostic

Stub. Spans, labels, and why one root cause stays one error.

VL 0.1+