Environment Setup
Audience and Use
This page is for developers and platform teams preparing a reliable local or shared environment for Locus evaluation and integration.
Use it to:
- Confirm supported tooling and runtime combinations.
- Validate environment readiness before implementation work starts.
- Standardize local, CI, and staging setup patterns.
Support Matrix
| Component | Supported Baseline | Notes |
|---|---|---|
| Rust toolchain | Stable channel | Use a pinned stable toolchain in CI for reproducibility. |
| Cargo | Bundled with Rust stable | Required for build, test, examples, and docs generation. |
| OS (development) | Linux, macOS, Windows (WSL2 recommended) | Linux and macOS are primary paths for host scripting. |
| Container runtime | Docker Engine or compatible runtime | Required for image-based MCP and gateway startup paths. |
| Storage backend | In-memory or SurrealDB v3 | In-memory for fast local validation; SurrealDB for persistent environments. |
| Docs toolchain | mdbook, mdbook-mermaid | Required for generated technical docs site. |
Tooling Prerequisites
Install and verify:
rustc --version
cargo --version
docker --version
mdbook --version
mdbook-mermaid --version
If docs tools are missing:
cargo install mdbook
cargo install mdbook-mermaid
Recommended Environment Profiles
Local Development Profile
Use when iterating on features and integration code.
- Storage: in-memory or local SurrealDB.
- Host runtime: single process.
- Objective: speed and repeatability.
CI Validation Profile
Use for pull requests and release gating.
- Storage: deterministic in-memory fixtures.
- Host runtime: test-only jobs.
- Objective: compatibility and regression detection.
Staging Profile
Use for pre-production verification.
- Storage: isolated remote SurrealDB.
- Host runtime: gateway and MCP parity checks.
- Objective: rollout rehearsal and migration validation.
Baseline Verification
From repository root:
cargo check --workspace --examples
cargo test --workspace
cargo check --examples -p locus-sdk
./docs/build-technical-docs.sh
A setup is considered ready when all commands complete successfully.
Runtime Smoke Start
Image-based MCP:
docker run --rm -i -v "$PWD/locus-data:/data" ghcr.io/entasislabs/locus-mcp:0.1.0
Image-based gateway:
docker run --rm -p 8080:8080 -p 8081:8081 -v "$PWD/locus-data:/data" ghcr.io/entasislabs/locus-gateway:2.0.0
Environment Hygiene Controls
- Keep secrets outside repository files.
- Keep development and production data paths separate.
- Pin model and provider settings in shared environments.
- Use explicit tenant and session scope in integration tests.
Exit Criteria
Environment setup is complete when:
- Workspace build and tests pass.
- At least one host runtime starts successfully.
- Technical docs site builds successfully.
- Team members can reproduce setup using this page only.