Getting Started
Install WasmHub and download your first runtime
Kumar Anirudha
Table of content
Install
CLI
cargo install wasmhub --features cli
This installs the wasmhub binary. Run wasmhub --help to verify.
Library
[dependencies]
wasmhub = "0.1"
tokio = { version = "1", features = ["full"] }
For download progress bars, enable the progress feature:
wasmhub = { version = "0.1", features = ["progress"] }
Your first runtime
wasmhub get go 1.23
What happens:
- WasmHub fetches
go-manifest.jsonfrom GitHub Releases - Resolves the entry for version
1.23 - Downloads the WASM binary (with retries, backoff, multi-CDN fallback)
- Verifies the SHA256 against the manifest
- Caches it under
~/.cache/wasmhub/go/1.23/
Subsequent calls return the cached binary instantly.
Inspect the cache
wasmhub cache show
wasmhub info go 1.23
Use from Rust
use wasmhub::{RuntimeLoader, Language};
#[tokio::main]
async fn main() -> wasmhub::Result<()> {
let loader = RuntimeLoader::new()?;
let go = loader.get_runtime(Language::Go, "1.23").await?;
println!("Path: {}", go.path.display());
println!("Size: {} bytes", go.size);
println!("SHA256: {}", go.sha256);
Ok(())
}
The returned Runtime is a small struct — path, size, sha256, language, version. Pass path to your WASM runtime of choice (wasmtime, wasmer, etc.).
Next steps
- CLI Reference — full command list
- Library Guide — builder config, custom CDN sources, retry tuning