Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
218 changes: 216 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ categories = ["database", "network-programming"]

[workspace.dependencies]
thiserror = "2"
tracing = "0.1"

base64 = "0.22"
blake3 = "1.8"
dashmap = "6.1"
tokio = { version = "1.49", default-features = false }

# Chosen over `leveldb` crate which requires C++ LevelDB via FFI.
rusty-leveldb = "1"
2 changes: 2 additions & 0 deletions minikv-core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ categories.workspace = true

[dependencies]
thiserror.workspace = true
tracing.workspace = true
base64 = { workspace = true }
blake3 = { workspace = true }
dashmap = { workspace = true }
rusty-leveldb = { workspace = true }

[dev-dependencies]
tokio = { workspace = true, features = ["full"] }
13 changes: 13 additions & 0 deletions minikv-core/src/error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/// Unified error type for minikv.
#[derive(Debug, thiserror::Error)]
pub enum Error {
/// Errors from the rusty-leveldb storage engine.
#[error("LevelDB error: {0}")]
LevelDb(String),
}

impl From<rusty_leveldb::Status> for Error {
fn from(s: rusty_leveldb::Status) -> Self {
Error::LevelDb(s.to_string())
}
}
4 changes: 4 additions & 0 deletions minikv-core/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
pub mod error;
pub mod hashing;
pub mod locking;
pub mod storage;
pub mod volumes;

pub use error::Error;
Loading