[package] name = "tardis" version.workspace = true authors.workspace = true description.workspace = true keywords.workspace = true categories.workspace = true homepage.workspace = true documentation.workspace = true repository.workspace = true license.workspace = true edition.workspace = true readme = "README.md" [lib] name = "tardis" path = "src/lib.rs" [features] default = ["tardis-macros", "async-trait", "base64"] conf-remote = ["web-client", "async-trait", "crypto"] digest = ["sha1", "sha2", "hmac", "md-5", "sm3", "dep:digest"] aead = ["aes-gcm-siv", "aes-gcm", "aes-siv", "dep:aead"] block_modes = ["cbc", "ecb", "aes", "cipher"] base64 = [] crypto = ["rsa", "digest", "aead", "block_modes"] crypto-with-sm = ["crypto", "libsm", "num-bigint"] future = ["futures", "async-stream", "futures-util", "async-trait"] tls = ["native-tls"] reldb-core = ["future", "sqlparser", "sea-orm", "sqlx"] reldb-postgres = [ "reldb-core", "sea-orm/json-array", "sea-orm/sqlx-postgres", "tardis-macros/reldb-postgres", ] reldb-mysql = ["reldb-core", "sea-orm/sqlx-mysql", "tardis-macros/reldb-mysql"] reldb-sqlite = [ "reldb-core", "sea-orm/sqlx-sqlite", "tardis-macros/reldb-sqlite", ] reldb = ["reldb-core", "reldb-postgres", "reldb-mysql", "reldb-sqlite"] web-server = ["future", "poem", "poem-openapi", "poem-openapi-derive"] openapi-redoc = ["poem-openapi/redoc"] openapi-rapidoc = ["poem-openapi/rapidoc"] openapi-swagger = ["poem-openapi/swagger-ui"] web-client = ["reqwest"] ws-client = ["future", "tokio-tungstenite", "tls"] cache = ["futures-util", "redis", "deadpool-redis"] mq = ["futures-util", "lapin", "amq-protocol-types", "async-global-executor"] mail = ["lettre"] os = ["async-trait", "anyhow", "rust-s3", "urlencoding"] fs = ["tokio/fs", "tokio/io-util"] process = ["tokio/process"] test = ["testcontainers", "testcontainers-modules"] tracing = [ "tracing-opentelemetry", "opentelemetry", "opentelemetry-otlp", "opentelemetry_sdk", "opentelemetry-http", "poem?/opentelemetry", ] tokio-console = ["console-subscriber"] tracing-appender = ["dep:tracing-appender"] web-server-grpc = ["web-server", "dep:poem-grpc"] cluster = ["web-server", "ws-client", "cache"] build-info = ["git-version"] opentelemetry-http = ["dep:opentelemetry-http"] [dependencies] # Basic serde = { version = "1", features = ["derive"] } serde_json = { version = "1" } derive_more = { version = "1", features = ["full"] } nanoid = { version = "0.4" } base64 = { version = "0.22" } hex = { version = "0.4" } lazy_static = { version = "1.4" } rand = { version = "0.8" } rand_core = { version = "0.6" } chrono = { version = "0.4", features = ["serde"] } config = { version = "0.13" } regex = { version = "1.5" } url = { version = "2.2", features = ["serde"] } lru = { version = "0.12.0" } typed-builder = { version = "0.20" } paste = { version = "1.0" } urlencoding = { version = "2", optional = true } # Tokio tokio = { version = "1", features = [ "macros", "rt-multi-thread", "signal", "time", "sync", ] } tokio-util = { version = "0.7.12" } # Tardis Macros tardis-macros = { version = "0.1.0-rc.17", optional = true } # Log tracing = { version = "0.1" } tracing-subscriber = { version = "0.3", features = ["env-filter"] } tracing-appender = { version = "0.2", optional = true } console-subscriber = { version = "0.4", optional = true } # Tracing tracing-opentelemetry = { version = "0.25", optional = true } opentelemetry = { version = "0.24", default-features = false, features = [ "trace", ], optional = true } opentelemetry_sdk = { version = "0.24", default-features = false, features = [ "rt-tokio", "trace", ], optional = true } opentelemetry-otlp = { version = "0.17", features = [ "reqwest-client", "reqwest-rustls", "http-proto", "tls", ], optional = true } opentelemetry-http = { version = "0.13", optional = true } # TLS native-tls = { version = "0.2", optional = true } # Crypto cipher = { version = "0.4", optional = true, features = [ "block-padding", "alloc", ] } ## Digest ## see https://github.com/RustCrypto/hashes sha1 = { version = "0.10", optional = true } sha2 = { version = "0.10", optional = true } # md5 is no longer considered secure md-5 = { version = "0.10", optional = true } # this sm3 lib support digest trait sm3 = { version = "0.4", optional = true } hmac = { version = "0.12", optional = true } digest = { version = "0.10", optional = true } # RSA rsa = { version = "0.9", features = ["pem"], optional = true } # AES aead = { version = "0.5", optional = true } aes = { version = "0.8", optional = true } aes-gcm-siv = { version = "0.11", optional = true } aes-gcm = { version = "0.10", optional = true } aes-siv = { version = "0.7", optional = true } ## block-mode cbc = { version = "0.1", optional = true } ecb = { version = "0.1", optional = true } # libsm = { version = "0.6", optional = true } num-bigint = { version = "0.4", optional = true } # Future futures = { version = "0.3", optional = true } async-stream = { version = "0.3", optional = true } futures-util = { version = "0.3", optional = true } async-trait = { version = "0.1", optional = true } # RelDB sea-orm = { version = "1", features = [ "macros", "runtime-tokio-native-tls", "with-chrono", "with-json", "debug-print", ], optional = true } sqlx = { version = "0.8", features = ["any"], optional = true } sqlparser = { version = "0", optional = true } # Web Server poem-openapi = { version = "5", features = [ "chrono", "websocket", ], optional = true } poem-openapi-derive = { version = "5", optional = true } poem = { version = "3", features = [ "csrf", "opentelemetry", "rustls", "prometheus", "websocket", "multipart", "tempfile", "session", ], optional = true } poem-grpc = { version = "0.5", optional = true } # Web Client reqwest = { version = "0.12", features = [ "json", "multipart", "stream", ], optional = true } # Websocket Client tokio-tungstenite = { version = "0.24", features = [ "native-tls", ], optional = true } # Redis redis = { version = "0.27", features = [ "tokio-comp", "tokio-native-tls-comp", ], optional = true } deadpool-redis = { version = "0.18", optional = true } # Rabbit lapin = { version = "2", optional = true } amq-protocol-types = { version = "7.0", optional = true } async-global-executor = { version = "2", features = ["tokio"], optional = true } # Mail lettre = { version = "0.11", features = [ "smtp-transport", "tokio1", "tokio1-native-tls", "builder", ], optional = true } # Object Storage # rust-s3 = { version = "0.33", optional = true } rust-s3 = { version = "0.35.1", optional = true, features = [ "no-verify-ssl", ] } # rust-s3 = { path = "../../rust-s3/s3", optional = true } anyhow = { version = "1.0", optional = true } # Test # update this may cause break changes testcontainers = { version = "0.23", optional = true } testcontainers-modules = { version = "0.11", features = [ "minio", "redis", "rabbitmq", "mysql", "postgres", "elastic_search", ], optional = true } # Debug git-version = { version = "0.3.9", optional = true } http = "1.1.0" crossbeam = "0.8.4" [dev-dependencies] # Common tokio = { version = "1", features = [ "time", "rt", "macros", "sync", "process", ] } criterion = { version = "0.5" } poem-grpc-build = "0.5" prost = "0.13.3" strip-ansi-escapes = "0.2.0" portpicker = "0.1.1" # macros serde = { version = "1", features = ["derive"] } trybuild = "1.0" rust_decimal = { version = "1" } [[test]] name = "test_config" required-features = ["crypto"] [[test]] name = "test_config_with_remote" required-features = [ "test", "crypto", "web-server", "cache", "web-client", "conf-remote", "mq", ] [[test]] name = "test_crypto" required-features = ["crypto", "crypto-with-sm"] [[test]] name = "test_reldb_client" required-features = ["test", "reldb"] [[test]] name = "test_web_server" required-features = [ "test", "web-server", "cache", "web-client", "crypto", "web-server-grpc", ] [[test]] name = "test_web_client" required-features = ["test", "web-client"] [[test]] name = "test_cache_client" required-features = ["test", "cache"] [[test]] name = "test_mq_client" required-features = ["test", "mq"] [[test]] name = "test_search_client" required-features = ["test", "web-client"] [[test]] name = "test_mail_client" required-features = ["test", "mail"] [[test]] name = "test_os_client" required-features = ["test", "os"] [[test]] name = "test_basic_tracing" required-features = ["test", "tracing"] [[bench]] name = "json_benchmark" harness = false [[bench]] name = "field_benchmark" harness = false [[bench]] name = "crypto_benchmark" harness = false required-features = ["crypto", "crypto-with-sm"] [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"]