Your first program
Follow this page exactly after Install. Every command assumes you have vow on your PATH.
1. Scaffold a project
Section titled “1. Scaffold a project”vow new hello-appcd hello-appls src/main.vow project.tomlvow new creates:
| File | Purpose |
|---|---|
src/main.vow |
Entry point (main in project.toml) |
project.toml |
Project name, version, deps |
vow.lock |
Lockfile (empty deps initially) |
README.md |
Build/run commands |
Default src/main.vow:
fn main(caps: Caps) -> int { print("Hello from Vow!") return 0}Every program’s entry point is fn main(caps: Caps) -> int. Capabilities enter only here. If you never use caps, you still must declare it.
2. Check types
Section titled “2. Check types”vow check src/main.vowExpected: ok: src/main.vow
3. Run
Section titled “3. Run”vow run src/main.vowecho $?Expected output includes Hello from Vow! and exit code 0.
4. Build a binary
Section titled “4. Build a binary”vow build src/main.vow -o hello-app./hello-appecho $? # 0The -o name can match the project name or anything you like; it is not required to be hello.vow.
Single file (optional)
Section titled “Single file (optional)”You do not need vow new for a one-off script. Create hello.vow in any directory:
fn main(caps: Caps) -> int { return 1 + 2;}vow build hello.vow -o hello./helloecho $? # 3Or vow run hello.vow.
Types you already have
Section titled “Types you already have”- Integers:
int,int64(no implicit mix — useas) bool, heapString,Array<T>- Prelude:
Option<T>,Result<T, E>— no null - Structs, enums,
match(exhaustive)
fn unwrap_or(opt: Option<int>, fallback: int) -> int { return match opt { Some(x) => x, None => fallback };}- CLI commands
- Tutorial — every major construct by use case
- Capabilities — grant I/O explicitly
- The 5-minute tour
- Limitations