Skip to content
For the complete documentation index optimized for AI agents, see llms.txt or llms-full.txt. A markdown version of this page is available by appending .md to the URL or sending Accept: text/markdown.

Environment Setup

For AI agents: the documentation index is at llms.txt (full corpus: llms-full.txt). A markdown source for this page is /building-stacks/installation.md.

Set up your development environment for building Arete stacks.


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

The Arete CLI (a4) handles project initialization, deployment, and SDK generation.

Terminal window
cargo install a4-cli

Verify the installation:

Terminal window
a4 --version

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

[dependencies]
arete = "0.1.1"
serde = { version = "1.0", features = ["derive"] }

This gives you access to:

  • #[arete] — 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 Arete configuration:

Terminal window
a4 init

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

arete.toml:

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

Validate your setup:

Terminal window
a4 config validate

VariableDescriptionDefault
ARETE_API_URLOverride API endpointProduction API


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