Docs · Toolchain
Getting started
Get a working vyi toolchain, then write a first program. Prefer the install
script on linux; build from source if you are hacking on the compiler. For
day-to-day CLI usage see the Tooling guide and the
CLI reference.
Vyi is early alpha. Prebuilt artifacts target linux/amd64 and linux/arm64 today.
Install
The repository ships
scripts/install.sh.
It downloads the CI-published binaries and standard library and installs them
under ~/.local by default:
curl -fsSL https://forgejo.roberthurst.ca/robert/Vyi/raw/branch/master/scripts/install.sh | bashThe script prints a short splash (with color when the terminal supports it), then installs. To remove what it installed:
curl -fsSL https://forgejo.roberthurst.ca/robert/Vyi/raw/branch/master/scripts/install.sh | bash -s -- --uninstall
# or from a checkout:
./scripts/install.sh --uninstallWhat install puts on disk:
| Path | Contents |
|---|---|
~/.local/bin/vyi | compiler CLI |
~/.local/bin/vyi-language-server | language server (editors, playground) |
~/.local/share/vyi/ | standard library ($PREFIX/share/vyi) |
Make sure the bin directory is on your PATH:
export PATH="$HOME/.local/bin:$PATH"Then check the install:
vyi helpOptions
| Variable | Default | Meaning |
|---|---|---|
PREFIX | $HOME/.local | install root (bin/ under this) |
VYI_VERSION | latest | package version: latest (builds from master) or a tag such as v0.1.0 |
VYI_INSTALL_BASE | Forgejo generic package URL | override the artifact base if you mirror releases |
VYI_OWNER | robert | Forgejo package owner (only if you fork the publish path) |
Examples:
# system-wide (needs write access to PREFIX)
PREFIX=/usr/local curl -fsSL …/install.sh | bash
# pin a tagged release (once tags exist)
VYI_VERSION=v0.1.0 curl -fsSL …/install.sh | bash
# from a local clone
./scripts/install.sh
PREFIX=/opt/vyi ./scripts/install.sh
./scripts/install.sh --uninstallThe script needs curl, tar, and a normal linux userspace. It refuses
non-linux hosts and architectures other than amd64/arm64. Color follows
NO_COLOR / VYI_FORCE_COLOR (same idea as the CLI).
Where artifacts come from
CI publishes to the Forgejo generic package registry:
https://forgejo.roberthurst.ca/api/packages/robert/generic/vyi/<version>/
vyi-linux-amd64
vyi-arm64-linux
vyi-language-server-linux-amd64
vyi-language-server-arm64-linux
vyi-stdlib.tar.gz<version> is latest for pushes to master, or a git tag name for tagged
builds. The install script picks the pair that matches your machine and unpacks
the stdlib tarball into $PREFIX/share/vyi (default ~/.local/share/vyi),
which is where the compiler looks for @-packages.
Build from source
You need Go (the version pinned by bootstrap-compiler/go.mod) and a C
compiler on PATH if you will link native (x86-64-linux / arm64-linux)
binaries.
git clone ssh://[email protected]:1122/robert/Vyi.git
cd Vyi
# compiler CLI
( cd bootstrap-compiler && go build -o vyi ./cmd/vyi )
# language server (optional; editors and the website use it)
( cd bootstrap-language-server && go build -o vyi-language-server . )Point the CLI at the in-tree standard library while developing:
export VYI_STDLIB_PATH="$PWD/packages"
# or pass --packages on each invocation:
./bootstrap-compiler/vyi run --packages packages path/to/main.vyiWithout VYI_STDLIB_PATH / --packages, the binary also probes ../packages
next to itself and ./packages relative to the current directory, so running
from a checkout often just works.
Verification gate
From bootstrap-compiler/:
go build ./...
go test ./... -count=1
go test ./transform/ -run Test_Transform_E2E_Native -count=1Installing a source build yourself
There is no separate make install. Copy the binaries somewhere on PATH and
keep the packages tree where the compiler can find it (for example under
~/.local/share/vyi, matching the install script layout):
install -m 0755 bootstrap-compiler/vyi ~/.local/bin/vyi
install -m 0755 bootstrap-language-server/vyi-language-server ~/.local/bin/vyi-language-server
mkdir -p ~/.local/share/vyi
cp -a packages/. ~/.local/share/vyi/Hello, world
Once vyi is on your PATH:
import { stdout } from "@io"
fn main() !u8 {
stdout.write("hello, world\n")
return Ok(0)
}vyi run hello.vyiThen follow the guides in order, or jump into the playground on this site.
Next steps
- Tooling guide — CLI walkthrough, targets, editor
- CLI reference — flags and exit codes
- Targets —
wasm,x86-64-linux,arm64-linux