Skip to content

Environment Setup

Set up your development environment for building Hyperstack stacks.


  • Rust 1.70+ (install via rustup)
  • A code editor with Rust support (VS Code + rust-analyzer recommended)

The Hyperstack CLI (hs) handles project initialization, deployment, and SDK generation.

Terminal window
cargo install hyperstack-cli

Verify the installation:

Terminal window
hs --version

Add the Hyperstack crate to your stack project’s Cargo.toml:

[dependencies]
hyperstack = "0.5.3"
serde = { version = "1.0", features = ["derive"] }

This gives you access to:

  • #[hyperstack] — The main macro for defining stacks
  • #[entity], #[map], #[aggregate] — Field-level attributes
  • Stream derive macro — Generates streaming infrastructure

Create a new stack project:

Terminal window
cargo new my-stack --lib
cd my-stack

Initialize Hyperstack configuration:

Terminal window
hs init

This creates hyperstack.toml and a .hyperstack/ directory for generated stack files.

hyperstack.toml:

[project]
name = "my-stack"
[sdk]
output_dir = "./generated"

Validate your setup:

Terminal window
hs config validate

VariableDescriptionDefault
HYPERSTACK_API_URLOverride API endpointProduction API


IssueSolution
hs: command not foundAdd ~/.cargo/bin to your PATH
cargo build failsEnsure hyperstack = "0.5.3" is in Cargo.toml
hs init failsCheck you’re in a valid Cargo project