[package] name = "blockstore" version = "0.7.0" edition = "2021" license = "Apache-2.0" description = "An IPLD blockstore capable of holding arbitrary data indexed by CID" authors = ["Eiger "] homepage = "https://www.eiger.co" repository = "https://github.com/eigerco/blockstore" readme = "README.md" rust-version = "1.75" # crates.io is limited to 5 keywords and 5 categories keywords = ["bitswap", "blockstore", "ipld", "cid"] # Must be one of categories = ["asynchronous", "data-structures"] [dependencies] cid = "0.11.0" dashmap = "6.0.1" lru = { version = "0.12.2", optional = true } multihash = "0.19.1" thiserror = "1.0.40" [target.'cfg(not(target_arch = "wasm32"))'.dependencies] redb = { version = "2", optional = true } # Upgrading this dependency invalidates existing persistent dbs. # Those can be restored by migrating between versions: # https://docs.rs/sled/latest/sled/struct.Db.html#examples-1 sled = { version = "0.34.7", optional = true } tokio = { version = "1.29.0", features = ["macros", "rt", "sync"], optional = true } [target.'cfg(target_arch = "wasm32")'.dependencies] js-sys = { version = "0.3.68", optional = true } rexie = { version = "0.6.1", optional = true } wasm-bindgen = { version = "0.2.91", optional = true } [dev-dependencies] rstest = "0.22.0" tokio = { version = "1.29.0", features = ["macros", "rt", "time"] } tempfile = "3.10" # doc-tests multihash-codetable = { version = "0.1.1", features = ["digest", "sha2"] } [target.'cfg(target_arch = "wasm32")'.dev-dependencies] wasm-bindgen-test = "0.3.41" [features] indexeddb = ["dep:js-sys", "dep:rexie", "dep:wasm-bindgen"] lru = ["dep:lru"] redb = ["dep:redb", "dep:tokio"] sled = ["dep:sled", "dep:tokio"] [package.metadata.docs.rs] all-features = true rustdoc-args = ["--cfg", "docsrs"] targets = ["x86_64-unknown-linux-gnu", "wasm32-unknown-unknown"] [package.metadata.cargo-udeps.ignore] development = ["multihash-codetable"]