chore: cargo features

This commit is contained in:
əlemi 2023-04-11 14:02:03 +02:00
parent f1f65aafdb
commit 9a0311eb38

View file

@ -14,6 +14,7 @@ path = "src/lib/lib.rs"
[[bin]] # Bin to run the CodeMP gRPC server
name = "server"
path = "src/server/main.rs"
required-features = ["server"]
[[bin]]
name = "client-nvim"
@ -21,25 +22,33 @@ path = "src/client/nvim/main.rs"
required-features = ["nvim"]
[dependencies]
# core
tracing = "0.1"
tracing-subscriber = "0.3"
tonic = "0.9"
tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "sync", "full"] }
tokio-stream = "0.1"
rmpv = "1"
serde = "1"
serde_json = "1"
operational-transform = { version = "0.6", features = ["serde"] }
md5 = "0.7.0"
prost = "0.11.8"
md5 = "0.7.0"
uuid = { version = "1.3.1", features = ["v4"] }
operational-transform = { version = "0.6", features = ["serde"] }
# can these be optional?
tokio = { version = "1.0", features = ["macros", "rt-multi-thread", "sync", "full"], optional = false }
tokio-stream = { version = "0.1", optional = false }
serde = { version = "1", optional = false }
serde_json = { version = "1", optional = false }
# runtime
# logs
tracing-subscriber = { version = "0.3", optional = true }
# nvim
rmpv = { version = "1", optional = true }
clap = { version = "4.2.1", features = ["derive"], optional = true }
nvim-rs = { version = "0.5", features = ["use_tokio"], optional = true }
uuid = { version = "1.3.1", features = ["v4"] }
[build-dependencies]
tonic-build = "0.9"
[features]
default = ["nvim"]
cli = ["dep:clap"]
nvim = ["dep:nvim-rs", "dep:clap"]
default = []
logs = ["dep:tracing-subscriber"]
# runtime = ["dep:tokio", "dep:tokio-stream"]
# serde = ["dep:serde", "dep:serde_json"]
server = ["logs"]
nvim = ["logs", "dep:nvim-rs", "dep:clap", "dep:rmpv"]