docs.rs failed to build robotech-1.5.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
robotech-1.4.0
RoboTech-RS
RoboTech-RS is a backend service toolkit written in Rust. This project provides commonly used tools for RESTful controller layer and business logic layer.
Project Structure
This project organizes functional modules through Rust's feature flags mechanism:
apifeature (enabled by default): Contains API interfaces and data transfer objects, providing a unified response object (RO) structurebasefeature: Provides basic functionalities including logging, configuration management, environment variableswebfeature: Implements web server functionality based on Actix-webdbfeature: Implements database operations based on SeaORM
Tech Stack
- Rust 2024 edition
- Actix-web as Web framework (in web feature)
- SeaORM as database ORM (in db feature)
- Utoipa for OpenAPI documentation generation (in api feature)
- Serde for serialization/deserialization (in api feature)
- Chrono for time processing (in api feature)
- Tracing ecosystem for logging (in base feature)
Feature Flags
This project uses feature flags to control dependencies and functionality:
api(default): Enables API-related features, including response objects (RO) and data transferbase: Enables basic features like logging, configuration, environment managementweb: Enables web server functionality (includes base feature)db: Enables database CRUD operations (includes base feature)
The api feature is enabled by default. To use web server features, you can enable the web feature:
[]
= "0.8.0"
= ["web"]
To use database operations, enable the db feature:
[]
= "0.8.0"
= ["web", "db"]
API Response Format
This project adopts a unified response format, where all API responses follow this structure:
API Response Fields Explanation:
result: Response result (Success, IllegalArgument, Warn, Fail)msg: Response messagetimestamp: Timestampextra: Optional extra datadetail: Optional detailed informationcode: Optional business code
Quick Start
Prerequisites
- Rust 1.70 or higher
- PostgreSQL database (if using SeaORM)
Build Project
# Build with default features (api_client)
# Build with web server features
# Build with all features
Run Service
# Run service (requires web feature)
# Run service with database support
Modules
ro: Response objects for API responses with unified formatcst: Constants used across the applicationctrl: Controllers handling HTTP requestssvc: Business logic servicesconfig: Configuration managementweb_server: Web server implementationdb: Database operationslog: Logging functionalityenv: Environment variable management
License
This project is licensed under the MIT License - see the LICENSE file for details.