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.mdto the URL or sendingAccept: 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.
Prerequisites
Section titled “Prerequisites”- 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.
cargo install a4-cliVerify the installation:
a4 --versionRust Dependencies
Section titled “Rust Dependencies”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 attributesStreamderive macro — Generates streaming infrastructure
Project Initialization
Section titled “Project Initialization”Create a new stack project:
cargo new my-stack --libcd my-stackInitialize Arete configuration:
a4 initThis creates arete.toml and a .arete/ directory for generated stack files.
arete.toml:
[project]name = "my-stack"
[sdk]output_dir = "./generated"Validate your setup:
a4 config validateEnvironment Variables
Section titled “Environment Variables”| Variable | Description | Default |
|---|---|---|
ARETE_API_URL | Override API endpoint | Production API |
Next Steps
Section titled “Next Steps”- Stack Definitions — Understand the declarative model
- Your First Stack — Build an end-to-end streaming app
- Macros Reference — Complete attribute documentation
Troubleshooting
Section titled “Troubleshooting”| Issue | Solution |
|---|---|
a4: command not found | Add ~/.cargo/bin to your PATH |
cargo build fails | Ensure arete = "0.1.1" is in Cargo.toml |
a4 init fails | Check you’re in a valid Cargo project |