provider.star — Language & Standard Library Reference
vx uses a two-phase execution model: provider.star files run as pure Starlark (no I/O), returning descriptor dicts that the Rust runtime interprets for actual downloads, installs, and execution. Providers are defined declaratively — no Rust code required for new tools.
Companion docs
- Manifest-Driven Providers — Getting-started tutorial
- Starlark Providers – Advanced Guide — Multi-runtime, hooks, system integration
Quick Start — Minimal Provider
python
load("@vx//stdlib:provider.star",
"runtime_def", "github_permissions",
"github_rust_provider")
name = "mytool"
description = "My awesome tool"
ecosystem = "devtools"
runtimes = [runtime_def("mytool")]
permissions = github_permissions()
_p = github_rust_provider("owner", "repo",
asset = "mytool-{vversion}-{triple}.{ext}")
fetch_versions = _p["fetch_versions"]
download_url = _p["download_url"]
install_layout = _p["install_layout"]
store_root = _p["store_root"]
get_execute_path = _p["get_execute_path"]
environment = _p["environment"]Navigation
| I need to… | Go here |
|---|---|
Understand the execution model, file structure, top-level variables, provider functions, and the ctx object | Core API → |
| Look up stdlib functions (env, platform, layout, github, templates…) | Standard Library → |
| Learn install layout types, version fetching strategies, and hooks | Layouts & Strategies → |
| Review Starlark syntax rules, coding conventions, and the new provider checklist | Language & Conventions → |
See Also
- Core API Reference — Execution model, file structure, provider functions,
ctxobject - Standard Library — All 14 stdlib modules (env, platform, layout, templates…)
- Layouts & Strategies — Install layouts, version fetching, hooks
- Language & Conventions — Starlark subset, coding style, new provider checklist
- Manifest-Driven Providers — Getting-started guide
- Starlark Providers – Advanced Guide — Multi-runtime providers, custom version sources
- vx.toml Reference — Project configuration
- vx.toml Syntax Guide — Patterns and recipes