AppFlowy-Cloud/Cargo.toml
2025-03-24 12:55:22 +08:00

327 lines
9.4 KiB
TOML

[package]
name = "appflowy-cloud"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
actix.workspace = true
actix-web.workspace = true
actix-http = { workspace = true, default-features = false, features = [
"openssl",
"compress-brotli",
"compress-gzip",
] }
actix-rt = "2.9.0"
actix-web-actors = { version = "4.3" }
actix-service = "2.0.2"
actix-identity = "0.6.0"
actix-session = { version = "0.8", features = ["redis-rs-tls-session"] }
actix-multipart = { version = "0.7.2", features = ["derive"] }
zstd.workspace = true
# serde
serde_json.workspace = true
serde_repr.workspace = true
serde.workspace = true
tokio = { workspace = true, features = [
"macros",
"rt-multi-thread",
"sync",
"fs",
"time",
"full",
] }
tokio-stream.workspace = true
tokio-util = { version = "0.7.10", features = ["io"] }
futures-util = { workspace = true, features = ["std", "io"] }
chrono.workspace = true
secrecy.workspace = true
rand = { version = "0.8", features = ["std_rng"] }
anyhow.workspace = true
reqwest = { workspace = true, features = [
"json",
"rustls-tls",
"cookies",
"stream",
] }
unicode-segmentation = "1.10"
lazy_static.workspace = true
fancy-regex = "0.11.0"
bytes.workspace = true
validator.workspace = true
mime = "0.3.17"
aws-sdk-s3 = { version = "1.63.0", features = [
"behavior-version-latest",
"rt-tokio",
] }
redis = { workspace = true, features = [
"json",
"tokio-comp",
"connection-manager",
] }
tracing = { version = "0.1.40", features = ["log"] }
tracing-subscriber = { version = "0.3.19", features = [
"registry",
"env-filter",
"ansi",
"json",
"tracing-log",
] }
sqlx = { workspace = true, default-features = false, features = [
"runtime-tokio-rustls",
"macros",
"postgres",
"uuid",
"chrono",
"migrate",
] }
async-trait.workspace = true
prometheus-client.workspace = true
itertools = "0.11"
uuid.workspace = true
tokio-tungstenite = { version = "0.26.1", features = ["native-tls"] }
dotenvy.workspace = true
brotli.workspace = true
dashmap.workspace = true
async-stream.workspace = true
futures.workspace = true
semver = "1.0.22"
tonic.workspace = true
prost.workspace = true
tonic-proto.workspace = true
appflowy-collaborate = { path = "services/appflowy-collaborate" }
# ai
appflowy-ai-client = { workspace = true, features = ["dto", "client-api"] }
collab = { workspace = true, features = ["lock_timeout"] }
collab-document = { workspace = true }
collab-entity = { workspace = true }
collab-folder = { workspace = true }
collab-user = { workspace = true }
collab-database = { workspace = true }
collab-importer = { workspace = true }
collab-rt-protocol.workspace = true
#Local crate
snowflake = { path = "libs/snowflake" }
database.workspace = true
database-entity.workspace = true
gotrue = { path = "libs/gotrue" }
gotrue-entity = { path = "libs/gotrue-entity" }
infra = { path = "libs/infra" }
authentication.workspace = true
access-control.workspace = true
app-error = { workspace = true, features = [
"sqlx_error",
"actix_web_error",
"tokio_error",
"appflowy_ai_error",
] }
shared-entity = { path = "libs/shared-entity", features = ["cloud"] }
workspace-template = { workspace = true }
collab-rt-entity.workspace = true
collab-stream.workspace = true
yrs.workspace = true
tonic-build = "0.12.3"
pin-project.workspace = true
byteorder = "1.5.0"
sha2 = "0.10.8"
rayon.workspace = true
mailer.workspace = true
async_zip.workspace = true
sanitize-filename.workspace = true
futures-lite = "2.3.0"
console-subscriber = { version = "0.4.1", optional = true }
base64.workspace = true
md5.workspace = true
nanoid = "0.4.0"
http.workspace = true
indexer.workspace = true
[dev-dependencies]
flate2 = "1.0"
tempfile = "3.9.0"
assert-json-diff = "2.0.2"
scraper = "0.17.1"
client-api-test = { path = "libs/client-api-test", features = ["collab-sync"] }
client-api = { path = "libs/client-api", features = [
"collab-sync",
"test_util",
"sync_verbose_log",
"test_fast_sync",
"enable_brotli",
] }
opener = "0.6.1"
image = "0.23.14"
collab-rt-entity = { path = "libs/collab-rt-entity" }
hex = "0.4.3"
unicode-normalization = "0.1.24"
[[bin]]
name = "appflowy_cloud"
path = "src/main.rs"
[lib]
path = "src/lib.rs"
#[[bench]]
#name = "access_control_benchmark"
#harness = false
[workspace]
members = [
# libs
"libs/snowflake",
"libs/collab-rt-entity",
"libs/database",
"libs/database-entity",
"libs/client-api",
"libs/infra",
"libs/shared-entity",
"libs/gotrue",
"libs/gotrue-entity",
"admin_frontend",
"libs/app-error",
"libs/workspace-template",
"libs/authentication",
"libs/access-control",
"libs/collab-rt-protocol",
"libs/collab-stream",
"libs/client-websocket",
"libs/client-api-test",
"libs/wasm-test",
"libs/appflowy-ai-client",
"libs/client-api-entity",
# services
"services/appflowy-collaborate",
"services/appflowy-worker",
# xtask
"xtask",
"libs/tonic-proto",
"libs/mailer",
"libs/indexer",
]
[workspace.dependencies]
indexer = { path = "libs/indexer" }
collab-rt-entity = { path = "libs/collab-rt-entity" }
collab-rt-protocol = { path = "libs/collab-rt-protocol" }
database = { path = "libs/database" }
database-entity = { path = "libs/database-entity" }
shared-entity = { path = "libs/shared-entity" }
gotrue-entity = { path = "libs/gotrue-entity" }
authentication = { path = "libs/authentication" }
access-control = { path = "libs/access-control" }
mailer = { path = "libs/mailer" }
app-error = { path = "libs/app-error" }
async-trait = "0.1.77"
prometheus-client = "0.22.0"
brotli = "3.4.0"
collab-stream = { path = "libs/collab-stream" }
dotenvy = "0.15.7"
serde_json = "1.0.111"
serde_repr = "0.1.18"
serde = { version = "1.0.195", features = ["derive"] }
bytes = "1.9.0"
workspace-template = { path = "libs/workspace-template" }
uuid = { version = "1.6.1", features = ["v4", "v5"] }
anyhow = "1.0.94"
actix = "0.13.3"
actix-web = { version = "4.5.1", default-features = false, features = [
"openssl",
"compress-brotli",
"compress-gzip",
] }
actix-http = { version = "3.6.0", default-features = false }
tokio = { version = "1.36.0", features = ["sync"] }
tokio-stream = "0.1.14"
rayon = "1.10.0"
futures-util = "0.3.30"
bincode = "1.3.3"
client-websocket = { path = "libs/client-websocket" }
infra = { path = "libs/infra" }
tracing = { version = "0.1", features = ["log"] }
gotrue = { path = "libs/gotrue" }
redis = "0.25.2"
sqlx = { version = "0.8.1", default-features = false }
dashmap = "5.5.3"
futures = "0.3.30"
async-stream = "0.3.5"
reqwest = "0.12.9"
lazy_static = "1.4.0"
tonic = "0.12.3"
prost = "0.13.3"
tonic-proto = { path = "libs/tonic-proto" }
appflowy-ai-client = { path = "libs/appflowy-ai-client", default-features = false }
pgvector = { version = "0.4", features = ["sqlx"] }
client-api-entity = { path = "libs/client-api-entity" }
async_zip = { version = "0.0.17", features = ["full"] }
sanitize-filename = "0.5.0"
base64 = "0.22"
md5 = "0.7.0"
pin-project = "1.1.5"
arc-swap = { version = "1.7" }
validator = "0.19"
zstd = { version = "0.13.2", features = [] }
chrono = { version = "0.4.39", features = [
"serde",
"clock",
], default-features = false }
http = "0.2.12"
tokio-tungstenite = "0.20"
secrecy = { version = "0.8.0", features = ["serde"] }
# collaboration
yrs = { version = "0.21.3", features = ["sync"] }
collab = { version = "0.2.0" }
collab-entity = { version = "0.2.0" }
collab-folder = { version = "0.2.0" }
collab-document = { version = "0.2.0" }
collab-database = { version = "0.2.0" }
collab-user = { version = "0.2.0" }
collab-importer = { version = "0.1.0" }
[profile.release]
lto = true
opt-level = 3
codegen-units = 1
[profile.profiling]
inherits = "release"
debug = true
[profile.ci]
inherits = "release"
opt-level = 2
lto = false
[patch.crates-io]
# It's diffcult to resovle different version with the same crate used in AppFlowy Frontend and the Client-API crate.
# So using patch to workaround this issue.
collab = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "80d1c6147d1139289c2eaadab40557cc86c0f4b6" }
collab-entity = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "80d1c6147d1139289c2eaadab40557cc86c0f4b6" }
collab-folder = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "80d1c6147d1139289c2eaadab40557cc86c0f4b6" }
collab-document = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "80d1c6147d1139289c2eaadab40557cc86c0f4b6" }
collab-user = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "80d1c6147d1139289c2eaadab40557cc86c0f4b6" }
collab-database = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "80d1c6147d1139289c2eaadab40557cc86c0f4b6" }
collab-importer = { git = "https://github.com/AppFlowy-IO/AppFlowy-Collab", rev = "80d1c6147d1139289c2eaadab40557cc86c0f4b6" }
[features]
history = []
# Some AI test features are not available for self-hosted AppFlowy Cloud. Therefore, AI testing is disabled by default.
ai-test-enabled = ["client-api-test/ai-test-enabled"]
# Enable Debugging for Tokio Runtime with Tokio Console
# Reference: https://github.com/tokio-rs/console
# Steps to Enable and Use Tokio Console:
# 1. Run your application with debugging enabled:
# RUST_BACKTRACE=1 RUST_LOG=trace cargo run --package xtask
# 2. Install the Tokio Console CLI (if not already installed):
# cargo install --locked tokio-console
# 3. Open a new terminal and start the Tokio Console:
# tokio-console
tokio-runtime-profile = ["console-subscriber", "tokio/tracing"]