Product OS : Server
Product OS : Server provides a full functioning advanced server capable of acting as a web server, command and control distributed network, authentication server, crawling server and more. Fully featured with high level of flexibility.
What is Product OS?
Product OS is a collection of packages that provide different tools and features that can work together to build products more easily for the Rust ecosystem.
Feature Flags
Core Features
core: Basic server functionality with Hyper, Axum, and loggingstd: Standard library support
Executors
executor_tokio: Tokio async runtime support
TLS
tls: TLS/HTTPS support with Rustlsdual_server: Simultaneous HTTP/HTTPS server
Communication
ws: WebSocket supportsse: Server-Sent Events support
Security
cors: CORS supportcspolicy: Content Security Policycsrf: CSRF protection
Middleware & Features
middleware: Extensible middleware supportcompression: Response compression (gzip, deflate, brotli)extract_headers: Header extraction utilitiessecurity: Minimal security helpers (headers, config parsing)security_certificates: TLS certificate generation (viatls/controller)controller: Command-and-control stack (store + capabilities)controller_framework_axum: Controller aligned withframework_axum(included inauthentication,oidc, etc.)controller_framework_flow: Controller aligned withframework_flow
Data Stores
Store features enable product-os-store on the server. Command-control store backends are forwarded only when controller is also enabled (weak ?/ refs).
postgres_store: PostgreSQL database supportsqlite_store: SQLite database supportredis_key_value_store: Redis key-value storememory_key_value_store: In-memory key-value storefile_key_value_store: File-based key-value storeredis_queue_store: Redis queue storememory_queue_store: In-memory queue store
Installation
[]
= "0.0.1"
Pin the version to match the crate Cargo.toml when using path or git dependencies.
Documentation
Full API documentation is available at docs.rs/product-os-server.
Usage
Overview
Product OS : Server provides a full functioning advanced server capable of acting as a web server, command and control distributed network, authentication server, crawling server, and more. Fully featured with a high level of flexibility.
Features
- Web Server: High-performance HTTP/HTTPS server built on Axum and Hyper
- TLS Support: Secure connections with Rustls
- Dual Protocol: Simultaneous HTTP and HTTPS on different ports
- WebSocket Support: Real-time bidirectional communication
- Server-Sent Events: Streaming updates to clients
- Compression: Gzip, Deflate, and Brotli response compression
- CORS: Cross-Origin Resource Sharing support
- CSRF Protection: Cross-Site Request Forgery protection
- CSP: Content Security Policy support
- Middleware: Extensible middleware system
- Command & Control: Distributed system coordination
- Multiple Executors: Tokio async runtime support
Installation
Add Product OS : Server to your Cargo.toml:
[]
= { = "0.0.55", = ["core", "executor_tokio", "tls"] }
= { = "1", = ["full"] }
Quick Start
use ;
use TokioExecutor;
async
Configuration
Architecture
The server is built on:
- Hyper: Low-level HTTP implementation
- Axum: Web framework with routing and middleware
- Rustls: Modern TLS implementation
- Tower: Service abstraction for middleware
Integration
Product OS Server integrates with:
- Product OS Router: Request routing and handlers
- Product OS Configuration: Configuration management
- Product OS Security: Certificates and authentication
- Product OS Command Control: Distributed coordination
- Product OS Store: Data persistence
- Product OS Capabilities: Service/feature registration
Testing
# Run all tests
# Run with specific features
# Generate documentation
Contributing
Contributions are not currently available but will be available on a public repository soon.
License
This project is licensed under the GNU GPLv3.