Skip to content

Commit

Permalink
Cleaning up feature flags
Browse files Browse the repository at this point in the history
Closes #293

This commit removes a lot of implicit feature flags for dependencies,
leaving just the intended feature flags exposed.
  • Loading branch information
ecton committed May 16, 2023
1 parent 22cdc8b commit 81ffe82
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 28 deletions.
6 changes: 5 additions & 1 deletion crates/bonsaidb-client/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ rust-version = "1.65"
[features]
default = ["full"]
full = ["websockets", "trusted-dns", "token-authentication", "password-hashing"]
websockets = ["bonsaidb-core/websockets", "tokio-tungstenite", "bincode"]
websockets = [
"bonsaidb-core/websockets",
"dep:tokio-tungstenite",
"dep:bincode",
]
trusted-dns = ["fabruic/trust-dns"]
test-util = []
tracing = ["pot/tracing"]
Expand Down
4 changes: 2 additions & 2 deletions crates/bonsaidb-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ rust-version = "1.65"

[features]
default = []
test-util = ["tokio", "anyhow", "num_cpus"]
test-util = ["dep:tokio", "dep:anyhow", "dep:num_cpus"]
websockets = []
actionable-traits = []
instrument = ["pot/tracing"]
encryption = []
password-hashing = []
token-authentication = ["blake3", "rand"]
token-authentication = ["dep:blake3", "dep:rand"]
included-from-omnibus = ["bonsaidb-macros/omnibus-path"]
included-from-server = ["bonsaidb-macros/server-path"]
included-from-local = ["bonsaidb-macros/local-path"]
Expand Down
2 changes: 1 addition & 1 deletion crates/bonsaidb-files/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ homepage = "https://bonsaidb.io/"
rust-version = "1.65"

[features]
async = ["tokio", "futures"]
async = ["dep:tokio", "dep:futures"]

[[example]]
name = "basic-files-async"
Expand Down
22 changes: 11 additions & 11 deletions crates/bonsaidb-local/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,26 +25,26 @@ full = [
"compression",
"async",
]
cli = ["clap", "crossterm"]
cli = ["dep:clap", "dep:crossterm"]
internal-apis = []
instrument = ["pot/tracing", "nebari/tracing", "tracing"]
instrument = ["pot/tracing", "nebari/tracing", "dep:tracing"]
encryption = [
"bonsaidb-core/encryption",
"hpke",
"zeroize",
"region",
"chacha20poly1305",
"dep:hpke",
"dep:zeroize",
"dep:region",
"dep:chacha20poly1305",
]
compression = ["lz4_flex"]
compression = ["dep:lz4_flex"]
password-hashing = [
"argon2",
"zeroize",
"once_cell",
"dep:argon2",
"dep:zeroize",
"dep:once_cell",
"bonsaidb-core/password-hashing",
]
token-authentication = ["bonsaidb-core/token-authentication"]
included-from-omnibus = []
async = ["tokio", "async-trait", "futures"]
async = ["dep:tokio", "dep:async-trait", "dep:futures"]

[dependencies]
async-trait = { version = "0.1", optional = true }
Expand Down
14 changes: 7 additions & 7 deletions crates/bonsaidb-server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,17 @@ full = [
"password-hashing",
"compression",
]
cli = ["clap", "pem", "env_logger", "bonsaidb-local/cli"]
cli = ["dep:clap", "pem", "dep:env_logger", "bonsaidb-local/cli"]
test-util = ["bonsaidb-core/test-util"]
websockets = [
"bonsaidb-core/websockets",
"tokio-tungstenite",
"bincode",
"base64",
"sha-1",
"dep:tokio-tungstenite",
"dep:bincode",
"dep:base64",
"dep:sha-1",
]
instrument = ["tracing", "pot/tracing"]
acme = ["async-acme", "pem"]
instrument = ["dep:tracing", "pot/tracing"]
acme = ["dep:async-acme", "pem"]
encryption = ["bonsaidb-local/encryption", "bonsaidb-core/encryption"]
password-hashing = [
"bonsaidb-local/password-hashing",
Expand Down
12 changes: 6 additions & 6 deletions crates/bonsaidb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ server = ["dep:bonsaidb-server", "local", "async"]
client-full = ["client", "bonsaidb-client?/full"]
client = ["dep:bonsaidb-client"]
test-util = ["bonsaidb-client?/test-util", "bonsaidb-server?/test-util"]
files = ["bonsaidb-files"]
files = ["dep:bonsaidb-files"]

keystorage-s3 = ["bonsaidb-keystorage-s3"]
keystorage-s3 = ["dep:bonsaidb-keystorage-s3"]

cli = [
"anyhow",
"tokio",
"clap",
"url",
"dep:anyhow",
"dep:tokio",
"dep:clap",
"dep:url",
"bonsaidb-local?/cli",
"bonsaidb-server?/cli",
]
Expand Down

0 comments on commit 81ffe82

Please sign in to comment.