Vex is the package manager and build tool for the Wave programming language. It manages Wave project manifests, dependency resolution, lockfiles, and stable invocation of wavec.
Vex is designed to sit above wavec in the same way Cargo sits above rustc: Vex owns project structure and dependency orchestration, while wavec remains the compiler with detailed build flags.
- Rust toolchain for building Vex from source
waveccompatible with thebuild --dry-run --error-format=jsonschema v1 contractgitwhen using Git dependencies
Vex runs wavec from PATH by default. Set VEX_WAVEC=/path/to/wavec to use a specific compiler binary.
vex init [--lib]
vex build [--target <triple>] [--release] [--dry-run] [--locked] [--offline]
vex run [--target <triple>] [--release] [--dry-run] [--locked] [--offline] [-- <args...>]
vex check [--target <triple>] [--release] [--dry-run] [--locked] [--offline]
vex fetch [--locked] [--offline]
vex update [<package>...]
vex info
vex setup wavec [--version <version>]
vex --versionmy_project/
├── src/
│ └── main.wave
├── vex.ws
├── vex.lock
└── .vex/
└── deps/
Vex uses vex.ws as the project manifest. The extension is .ws.
{
name = "my_project",
version = 0.1.0,
lib = false,
description = "my_project Project",
author = "unknown",
license = "Unknown",
dependencies = []
}
Vex currently uses a Git-first package model and does not require a central package registry. Local path dependencies are also supported.
Path dependency:
{
name = "my_project",
version = 0.1.0,
dependencies = [
{ name = "local_math", path = "../local_math" }
]
}
Git dependency:
{
name = "my_project",
version = 0.1.0,
dependencies = [
{ name = "math", git = "https://github.com/example/wave-math.git", tag = "v0.1.0" }
]
}
A dependency entry must use exactly one of path or git. Git dependencies may specify at most one of branch, tag, or rev.
Fetched Git dependencies are stored under .vex/deps/<name>. Every fetched dependency must contain a vex.ws file at its root. Dependency manifests are resolved recursively, and a package name must identify one source and version requirement across the graph.
On the first vex fetch, build, run, or check, Vex resolves each Git selector to an exact commit and records the complete transitive graph in vex.lock. Later commands reuse those commits without updating branches or tags. Run vex update explicitly to refresh every Git dependency and rewrite the lockfile.
Pass one or more package names to update only those packages, including transitive dependencies. Unrelated packages keep their exact locked commits and are not fetched. If an updated package changes its dependencies, Vex recalculates that part of the graph while preserving unrelated locked packages.
# Refresh the complete Git dependency graph.
vex update
# Refresh only alpha and the transitive package shared_core.
vex update alpha shared_coreCommit vex.lock so the same manifest and lockfile select the same dependency graph. A dry run never fetches or rewrites dependencies; use vex fetch first when the locked checkout is not available locally.
Use --locked when Vex must not create or modify vex.lock. The command fails if the lockfile is missing, uses an older schema, or does not match the manifest graph. It may still download a commit already pinned by the lockfile when the managed checkout is missing.
Use --offline to prohibit all Git network operations. Vex may switch an existing managed checkout to a locally available locked commit, but it fails with instructions to run vex fetch when a checkout or commit is missing.
Combine both options for the strictest CI build:
vex fetch --locked
vex build --locked --offlinevex update intentionally accepts neither option because it refreshes Git refs and rewrites the lockfile.
Vex uses wavec internally and validates the compiler dry-run plan before executing a real build. Vex commands stay manifest-based; raw compiler flags belong to wavec, not to Vex.
Build progress is written to stderr with Cargo-style stages such as Resolving, Fetching, Compiling, Checking, Running, and Finished. Program output remains on stdout.
Examples:
vex build --target x86_64-unknown-linux-gnu
vex build --locked --offline
vex run -- arg1 arg2
vex check
VEX_WAVEC=/opt/wave/bin/wavec vex build --dry-run