Purpose: Demonstrates production-ready Rust patterns with Actix-web framework, async/await, type safety, testing, and basic infrastructure integration. While not as feature-complete as the Python, Go, or Node.js implementations, this serves as a solid foundation for Rust-based APIs.
- ✅ Actix-web server with 4 production endpoints
- ✅ Comprehensive testing (5 unit tests + 11 integration tests)
- ✅ Vault integration for health checks
- ✅ CORS middleware properly configured
- ✅ Async/await patterns with Tokio runtime
- ✅ Type-safe structs with Serde serialization
- ✅ Environment configuration for flexible deployment
- ✅ Logging infrastructure with env_logger
- ✅ CI/CD integration (cargo fmt, cargo clippy)
- ❌ Database integration (PostgreSQL, MySQL, MongoDB)
- ❌ Redis cache integration
- ❌ RabbitMQ messaging
- ❌ Circuit breakers
- ❌ Advanced error handling patterns
- ❌ Structured/production logging (e.g., JSON logs)
- ❌ Rate limiting
- ❌ Real Prometheus metrics (placeholder only)
A well-tested Rust/Actix-web application demonstrating core infrastructure integration patterns with comprehensive test coverage. Suitable for learning Rust API development and as a foundation for extending with additional features.
- Actix-web: High-performance async web framework
- Health Checks: Simple health endpoints with Vault connectivity
- Vault Integration: Vault service health monitoring
- Type Safety: Rust's compile-time guarantees preventing runtime errors
- Performance: Zero-cost abstractions for maximum efficiency
- Testing: Comprehensive unit and integration test suite
- CORS: Properly configured cross-origin resource sharing
# Start the Rust reference API
docker compose up -d rust-api
# Test endpoints
curl http://localhost:8004/
curl http://localhost:8004/health/
curl http://localhost:8004/health/vaultGET /- API informationGET /health/- Simple health checkGET /health/vault- Vault connectivity testGET /metrics- Metrics placeholder
- HTTP: 8004
- HTTPS: 8447 (when TLS enabled)
cd reference-apps/rust
cargo build --release
./target/release/devstack-core-rust-apiThis implementation demonstrates core Rust/Actix-web patterns with comprehensive testing. While it doesn't include all infrastructure integrations (databases, caching, messaging), it provides a solid, production-ready foundation that can be extended by following patterns from the Python, Go, or Node.js implementations.