Installation
Relevant source files
The following files were used as context for generating this wiki page:
Cyberpath Sentinel is a document-based DBMS written in Rust. Installation requires the Rust toolchain and can be accomplished either by installing the binary directly using cargo or by cloning the source code and building it manually. The project is structured as a Cargo workspace, and release builds are heavily optimized for performance and security.
This document outlines the prerequisites and available methods for installing Sentinel. For more details on the architecture and features, refer to the Implementation Plan.
Sources: README.md:11, 82, Cargo.toml:1-4
Prerequisites
To build Sentinel, you need the Rust programming language toolchain. The project specifies a required Rust version.
- Rust Version:
1.92.0or compatible.
Sources: Cargo.toml:8
Installation Methods
There are two primary ways to install Sentinel: using cargo install for a quick setup, or building from source for development and contribution purposes.
This diagram illustrates the two installation paths.
Sources: README.md:82-87
Using cargo install
This is the simplest method to install the Sentinel binary. Cargo will download the source code, compile it, and place the executable in your Cargo binary path.
cargo install cyberpath-sentinel
Sources: README.md:83
Building from Source
This method is recommended for developers who want to modify the source code or contribute to the project.
- Clone the repository:
git clone https://github.com/cyberpath-HQ/cyberpath-sentinel - Navigate to the project directory:
cd cyberpath-sentinel - Build the project in release mode for an optimized binary:
cargo build --release
The resulting executable will be located at target/release/sentinel.
Sources: README.md:85-87
Build Configuration
Sentinel's release builds are configured for maximum performance, smaller binary size, and enhanced security by disabling debugging features and enabling optimizations.
Release Profile
The [profile.release] section in the root Cargo.toml defines the settings for release builds.
| Setting | Value | Description |
|---|---|---|
codegen-units | 1 | Creates a single codegen unit for better optimization opportunities. |
lto | true | Enables Link Time Optimization for better whole-program codegen. |
opt-level | 3 | Sets the maximum optimization level. |
panic | abort | Aborts on panic instead of unwinding, resulting in a smaller binary. |
overflow-checks | false | Disables integer overflow checks to improve performance. |
strip | true | Strips symbols from the binary to reduce its size. |
debug | false | Excludes debugging information. |
debug-assertions | false | Disables debug_assert! macros. |
incremental | false | Disables incremental compilation for a clean, reliable release build. |
Sources: Cargo.toml:10-20
Project & Dependency Structure
Sentinel uses a Cargo workspace to manage its crates. The main application logic is contained within the sentinel crate.
This diagram shows the workspace structure.
Sources: Cargo.toml:1-4, crates/sentinel/Cargo.toml
Core Dependencies
During installation, Cargo will download and compile several key dependencies that form the foundation of Sentinel's technology stack.
| Dependency | Purpose |
|---|---|
tokio | Asynchronous runtime for I/O. |
serde / serde_json | Data serialization/deserialization. |
parking_lot | High-performance concurrency primitives. |
dashmap | Concurrent hash map for caching. |
fs2 | Cross-platform file locking. |
aes-gcm | AES-256-GCM encryption. |
git2 | Git operations for replication. |
anyhow / thiserror | Error handling. |
Sources: IMPLEMENTATION_PLAN.md:580-612