omnipaxos icon indicating copy to clipboard operation
omnipaxos copied to clipboard

Make compiling RocksDB optional for storage crate

Open JonathanArns opened this issue 11 months ago • 1 comments

Could we add a feature memory-only or something like it, to remove RocksDB from the dependency list of the storage crate? It's kind of annoying to install external binary dependencies if I don't even use them :/

JonathanArns avatar Mar 27 '24 09:03 JonathanArns

It is also pulling in a bunch of other crates by default.

Possible fix:

[features]
default = ["persistent"]

# or any other suitable name (rocksdb)
persistent = [
  "dep:rocksdb",
  "dep:serde",
  "dep:bincode",
  "dep:zerocopy",
]

# all made optional
serde = { version = "1.0", features = ["derive"], optional = true }
bincode = { version = "1.3.3", optional = true }
zerocopy = { version = "0.6.1", optional = true }
rocksdb =  { version = "0.21.0", optional = true }

Set as a default feature to not break existing projects and can be disabled through:

omnipaxos_storage = { version = "..",  default-features = false }

Max-Meldrum avatar Mar 27 '24 11:03 Max-Meldrum