Preview version, will not guarantee the stability of the API! Do NOT use in production environment!
Elegant, Clean Rust development framework🛸
TARDIS([tɑːrdɪs] "Time And Relative Dimension In Space") From "Doctor Who".
conf-remote
enable the unified configuration centercrypto
encryption, decryption and digest operationscrypto-with-sm
encryption, decryption and digest with SM.x operationsfuture
asynchronous operationsreldb-core
relational database core operations(based on SeaORM)reldb-postgres
relational database with postgres driverreldb-mysql
relational database with mysql driverreldb-sqlite
relational database with sqlite driverreldb
relational database with postgres/mysql/sqlite driversweb-server
web service operations(based on Poem)web-client
web client operationsws-client
webscoket client operationscache
cache operationsmq
message queue operationsmail
mail send operationsos
object Storage operationstest
unit test operationsThe core operations of the framework all use TardisFuns
as an entry point.
E.g.
TardisFuns::init(relative_path) // Initialize the configuration
TardisFuns::field.x // Some field operations
TardisFuns::reldb().x // Some relational database operations
TardisFuns::web_server().x // Some web service operations
Dependency Configuration
toml
[dependencies]
tardis = { version = "^0", features = ["web-server"] }
Processor Configuration ```ignore use tardis::basic::error::TardisError; use tardis::web::poemopenapi; use tardis::web::poemopenapi::param::Query; use tardis::web::web_resp::{TardisApiResult, TardisResp};
pub struct Api;
impl Api { #[oai(path = "/hello", method = "get")] async fn index(&self, name: Query
Startup class configuration ```ignore use tardis::basic::result::TardisResult; use tardis::tokio; use tardis::TardisFuns; use crate::processor::Api; mod processor;
async fn main() -> TardisResult<()> { // Initial configuration TardisFuns::init("config").await?; // Register the processor and start the web service TardisFuns::webserver().addmodule("", Api).start().await } ```
|-- examples
|-- reldb Relational database usage example
|-- web-basic Web service Usage Example
|-- web-client Web client Usage Example
|-- websocket WebSocket Usage Example
|-- cache Cache Usage Example
|-- mq Message Queue Usage Example
|-- todos A complete project usage example
|-- multi-apps Multi-application aggregation example
|-- pg-graph-search Graph search by Postgresql example
|-- perf-test Performance test case
An failed to run custom build command for openssl-sys
error occurs when running under Windows.The solution is as follows( @see https://github.com/sfackler/rust-openssl/issues/1062 ):
shell
git clone https://github.com/Microsoft/vcpkg --depth=1
cd vcpkg
bootstrap-vcpkg.bat
vcpkg.exe integrate install
vcpkg.exe install openssl:x64-windows-static
set OPENSSL_NO_VENDOR=1
set OPENSSL_DIR=<Current Dir>\packages\openssl_x64-windows-static
An failed to run custom build command for openssl-sys
error occurs when running under Ubuntu(similar to other distributions):
shell
apt install build-essential perl pkg-config libssl-dev
openssl-sys
shell
sudo pkg install cmake ninja zip pkgconf gmake
git clone https://github.com/Microsoft/vcpkg --depth=1
cd vcpkg
sh bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install openssl
Thanks to Jetbrains
for the Open Source License