Compile Sentinel and agents from source code.
Prerequisites
Rust Toolchain
Install Rust via rustup:
|
# Verify installation
System Dependencies
macOS:
Ubuntu/Debian:
RHEL/Fedora:
Optional Dependencies
For the ModSecurity agent:
# macOS
# Ubuntu/Debian
Building Sentinel
Clone the Repository
Debug Build
Binary location: target/debug/sentinel
Release Build
Binary location: target/release/sentinel
Build with Features
# All features
# Specific features
Available Features
| Feature | Description | Default |
|---|---|---|
metrics | Prometheus metrics endpoint | Yes |
tracing | OpenTelemetry tracing | Yes |
tls | TLS/HTTPS support | Yes |
http2 | HTTP/2 support | Yes |
websocket | WebSocket proxying | Yes |
Building Agents
WAF Agent
ModSecurity Agent
Requires libmodsecurity:
# Set library paths if needed (macOS)
JavaScript Agent
AI Gateway Agent
WebSocket Inspector
Cross-Compilation
Linux from macOS
# Add target
# Install cross-compiler
# Build
Using Cross
For easier cross-compilation:
# Build for Linux
# Build for ARM64
Static Linking (musl)
Build Profiles
Cargo.toml Settings
[]
= true # Link-time optimization
= 1 # Better optimization
= "abort" # Smaller binary
= true # Strip symbols
[]
= "release"
= true # Include debug symbols
= #false
Build with custom profile:
Verification
Check Binary
# Version
# Help
# Validate config
Run Tests
Check for Issues
# Formatting
# Lints
# Security audit
Troubleshooting
OpenSSL Not Found
# macOS
# Linux
libmodsecurity Not Found
# Check installation
# Set paths manually
Out of Memory
For large builds:
# Reduce parallelism
Slow Builds
Use sccache for faster rebuilds:
Next Steps
- Development Setup - Configure your IDE
- Testing - Run the test suite
- Contributing - Submit your first PR