mirror of
https://github.com/Cuprate/cuprate.git
synced 2024-11-17 00:07:55 +00:00
240e579066
* cargo: replace `sanakirja` with `redb` * database: update docs `sanakirja` -> `redb` * lib: add TODO for `ConcreteEnv` generic replacement * database: split `trait Database` -> `trait Database{Read,Write}` * heed: add `struct HeedTable{Ro,Rw}` to match `redb` behavior * ops: remove imports for now * env: fix `&mut` bound on RwTx * database: impl `redb`, type-checks * fix heed trait impls, `Database{Read,Write}` -> `Database{Ro,Rw}` * redb: impl `From<_>` for `RuntimeError` * update readme * heed: document `HeedTableR{o,w}` types * env: doc `sync()` invariant * database: document data & lock filenames * misc docs, `redb` durability impl, `'db` -> `'env` * redb: fixes * misc docs and fixes * Update database/README.md Co-authored-by: Boog900 <boog900@tutanota.com> --------- Co-authored-by: Boog900 <boog900@tutanota.com>
51 lines
No EOL
1.8 KiB
TOML
51 lines
No EOL
1.8 KiB
TOML
[package]
|
|
name = "cuprate-database"
|
|
version = "0.0.0"
|
|
edition = "2021"
|
|
description = "Cuprate's database abstraction"
|
|
license = "MIT"
|
|
authors = ["hinto-janai"]
|
|
repository = "https://github.com/Cuprate/cuprate/tree/main/database"
|
|
keywords = ["cuprate", "database"]
|
|
|
|
[features]
|
|
default = ["heed", "service"]
|
|
# default = ["redb", "service"] # For testing `redb`.
|
|
heed = ["dep:heed"]
|
|
redb = ["dep:redb"]
|
|
service = ["dep:crossbeam", "dep:tokio", "dep:tower"]
|
|
|
|
[dependencies]
|
|
cfg-if = { workspace = true }
|
|
# FIXME:
|
|
# We only need the `thread` feature if `service` is enabled.
|
|
# Figure out how to enable features of an already pulled in dependency conditionally.
|
|
cuprate-helper = { path = "../helper", features = ["fs", "thread"] }
|
|
paste = { workspace = true }
|
|
# Needed for database resizes.
|
|
# They must be a multiple of the OS page size.
|
|
page_size = { version = "0.6.0" }
|
|
thiserror = { workspace = true }
|
|
|
|
# `service` feature.
|
|
crossbeam = { workspace = true, features = ["std"], optional = true }
|
|
tokio = { workspace = true, features = ["full"], optional = true }
|
|
tower = { workspace = true, features = ["full"], optional = true }
|
|
# SOMEDAY: could be used in `service` as
|
|
# the database mutual exclusive `RwLock`.
|
|
#
|
|
# `parking_lot` has a fairness policy unlike `std`,
|
|
# although for now (and until testing is done),
|
|
# `std` is fine.
|
|
# parking_lot = { workspace = true, optional = true }
|
|
|
|
# Optional features.
|
|
borsh = { workspace = true, optional = true }
|
|
heed = { git = "https://github.com/Cuprate/heed", rev = "5aa75b7", optional = true }
|
|
redb = { version = "1.5.0", optional = true }
|
|
serde = { workspace = true, optional = true }
|
|
|
|
[dev-dependencies]
|
|
cuprate-helper = { path = "../helper", features = ["thread"] }
|
|
page_size = { version = "0.6.0" }
|
|
tempfile = { version = "3.10.0" } |