Skip to content

Getting Started

This guide covers setting up the SmartPoints development environment, building the workspace, and running tests.

Prerequisites

RequirementVersionPurpose
Rust1.87+Compiler and cargo
Git2.xSource control
Docker24+(Optional) Appliance deployment
Helm3.x(Optional) AKS deployment

Install Rust

bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
rustup update stable

Verify the installation:

bash
rustc --version   # Should be 1.87.0 or later
cargo --version

Clone and Build

bash
git clone git@github.com:SmartPointsTech/spt.git
cd spt
cargo build

The 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-wire

Run Tests

Full Test Suite

bash
cargo test

Test a Specific Crate

bash
cargo test -p spt-smartpoint
cargo test -p spt-aic
cargo test -p sptos-scope

Test with Output

bash
cargo test -p spt-smartpoint -- --nocapture

Run Integration Tests

Integration tests span multiple crates and test end-to-end flows:

bash
cargo test -p spt-integration-tests

Workspace 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 scripts

Understanding the Architecture

The codebase implements a six-layer protocol stack:

LayerCratesWhat It Does
0 - Kernelsptos-* (10 crates)Execution environment, capabilities, scheduling
1 - Hostsptos-host-* (6 crates)Instance lifecycle, platform integration
2 - Wirespt-wire, spt-wire-bridge, spt-crypto-provider, spt-natQUIC transport, DID auth, routing
3 - SmartPointspt-smartpoint, spt-pq-crypto, spt-vault, spt-aidCryptographic pairs, identity
4 - Scopesptos-scope, spt-connectors-*, spt-entra, spt-federationGovernance, connectors
5 - Marketplacespt-discovery, spt-marketplace, spt-aic, etc.Discovery, metering, identity chain
6 - Applicationspt-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 check

Run Clippy Lints

bash
cargo clippy --workspace

Format Code

bash
cargo fmt --all

Generate Documentation

bash
cargo doc --workspace --no-deps --open

Build in Release Mode

bash
cargo build --release

Next Steps

Released under the MIT License.