| Crates.io | robotech |
| lib.rs | robotech |
| version | 1.4.0 |
| created_at | 2025-10-16 02:52:42.208979+00 |
| updated_at | 2026-01-16 02:25:10.042092+00 |
| description | Backend service implementation for the RoboTech platform, providing RESTful APIs and business logic for web applications. |
| homepage | https://github.com/rusthing/robotech-rs |
| repository | https://github.com/rusthing/robotech-rs |
| max_upload_size | |
| id | 1885317 |
| size | 175,878 |
RoboTech-RS is a backend service toolkit written in Rust. This project provides commonly used tools for RESTful controller layer and business logic layer.
This project organizes functional modules through Rust's feature flags mechanism:
api feature (enabled by default): Contains API interfaces and data transfer objects, providing a unified response
object (RO) structurebase feature: Provides basic functionalities including logging, configuration management, environment variablesweb feature: Implements web server functionality based on Actix-webcrud feature: Implements database operations based on SeaORMThis 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)crud: 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:
[dependencies.robotech]
version = "0.8.0"
features = ["web"]
To use database operations, enable the crud feature:
[dependencies.robotech]
version = "0.8.0"
features = ["web", "crud"]
This project adopts a unified response format, where all API responses follow this structure:
{
"result": 1,
"msg": "Operation completed successfully",
"timestamp": 1700000000000,
"extra": {},
"detail": "Optional detailed information",
"code": "Optional business code"
}
API Response Fields Explanation:
result: Response result (Success, IllegalArgument, Warn, Fail)msg: Response messagetimestamp: Timestampextra: Optional extra datadetail: Optional detailed informationcode: Optional business code# Build with default features (api_client)
cargo build
# Build with web server features
cargo build --features web
# Build with all features
cargo build --features web,crud
# Run service (requires web feature)
cargo run --features web
# Run service with database support
cargo run --features web,crud
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 managementThis project is licensed under the MIT License - see the LICENSE file for details.