Getting Started
This guide covers setting up the SmartPoints development environment, building the workspace, and running tests.
Prerequisites
| Requirement | Version | Purpose |
|---|---|---|
| Rust | 1.87+ | Compiler and cargo |
| Git | 2.x | Source control |
| Docker | 24+ | (Optional) Appliance deployment |
| Helm | 3.x | (Optional) AKS deployment |
Install Rust
bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup update stableVerify the installation:
bash
rustc --version # Should be 1.87.0 or later
cargo --versionClone and Build
bash
git clone git@github.com:SmartPointsTech/spt.git
cd spt
cargo buildThe workspace contains 122 crates. A full build takes approximately 5-10 minutes on a modern machine. Subsequent builds are incremental and much faster.
Build a Specific Crate
bash
cargo build -p spt-smartpoint
cargo build -p sptos-host-core
cargo build -p spt-wireRun Tests
Full Test Suite
bash
cargo testTest a Specific Crate
bash
cargo test -p spt-smartpoint
cargo test -p spt-aic
cargo test -p sptos-scopeTest with Output
bash
cargo test -p spt-smartpoint -- --nocaptureRun Integration Tests
Integration tests span multiple crates and test end-to-end flows:
bash
cargo test -p spt-integration-testsWorkspace Structure
text
spt/
+-- Cargo.toml # Workspace manifest
+-- crates/ # All 122 crates
| +-- sptos-nucleus/ # Layer 0: Kernel core
| +-- sptos-cap/ # Layer 0: Capabilities
| +-- sptos-host-core/ # Layer 1: Host daemon
| +-- sptos-host-macos/ # Layer 1: macOS platform
| +-- spt-wire/ # Layer 2: QUIC transport
| +-- spt-wire-bridge/ # Layer 2: Envelope bridge
| +-- spt-smartpoint/ # Layer 3: Crypto pairs
| +-- spt-pq-crypto/ # Layer 3: Post-quantum crypto
| +-- spt-aid/ # Layer 3: DID identity
| +-- sptos-scope/ # Layer 4: Governance
| +-- spt-discovery/ # Layer 5: Service discovery
| +-- spt-marketplace/ # Layer 5: Marketplace
| +-- spt-aic/ # Layer 5: Identity chain
| +-- spt-appliance/ # Layer 6: Network appliance
| +-- ... # (108 more crates)
+-- docs/ # Documentation
+-- infra/ # Terraform infrastructure
+-- scripts/ # Build and utility scriptsUnderstanding the Architecture
The codebase implements a six-layer protocol stack:
| Layer | Crates | What It Does |
|---|---|---|
| 0 - Kernel | sptos-* (10 crates) | Execution environment, capabilities, scheduling |
| 1 - Host | sptos-host-* (6 crates) | Instance lifecycle, platform integration |
| 2 - Wire | spt-wire, spt-wire-bridge, spt-crypto-provider, spt-nat | QUIC transport, DID auth, routing |
| 3 - SmartPoint | spt-smartpoint, spt-pq-crypto, spt-vault, spt-aid | Cryptographic pairs, identity |
| 4 - Scope | sptos-scope, spt-connectors-*, spt-entra, spt-federation | Governance, connectors |
| 5 - Marketplace | spt-discovery, spt-marketplace, spt-aic, etc. | Discovery, metering, identity chain |
| 6 - Application | spt-appliance, spt-crew, spt-spatial, etc. | End-user features |
For full architecture documentation, see Architecture Overview.
For a complete crate listing with test counts, see the Crate Map.
Common Development Tasks
Check Compilation Without Building
bash
cargo checkRun Clippy Lints
bash
cargo clippy --workspaceFormat Code
bash
cargo fmt --allGenerate Documentation
bash
cargo doc --workspace --no-deps --openBuild in Release Mode
bash
cargo build --releaseNext Steps
- Your First SmartPoint Pair -- create, seal, and open a message
- Deploy the Network Appliance -- Docker Compose and Helm quickstart
- Architecture Overview -- understand the full protocol stack