Skip to content
Open
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
213 changes: 193 additions & 20 deletions Cargo.lock

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ authors = [
]
edition = "2024"
description = "prism is the first trust-minimized key-transparency solution, allowing for automatic verification of service providers via light clients. Powered by Celestia."
homepage = "https://prism.deltadevs.xyz"
homepage = "https://prism.rs"
repository = "https://github.com/deltadevsde/prism"
license = "MIT"
license = "AGPL-3.0"
keywords = ["crypto", "key-transparency"]
readme = "README.md"

Expand Down Expand Up @@ -84,8 +84,8 @@ reqwest = { version = "0.12", features = ["json"] }
url = { version = "2.5" }

# database
rocksdb = { version = "0.21.0", features = ["multi-threaded-cf"] }
redb = "2.6.0"
sled = "0.34.7"

# async
async-trait = "0.1.86"
Expand Down Expand Up @@ -282,3 +282,8 @@ unexpected_cfgs = { level = "warn", check-cfg = [
# https://davidlattimore.github.io/posts/2024/02/04/speeding-up-the-rust-edit-build-run-cycle.html
debug = "line-tables-only"
split-debuginfo = "unpacked"

[profile.bench]
opt-level = 3
debug = false
lto = true
1 change: 1 addition & 0 deletions crates/cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ path = "src/main.rs"

[features]
default = []
rocksdb = ["prism-storage/rocksdb"]
test_utils = []

[dependencies]
Expand Down
8 changes: 7 additions & 1 deletion crates/cli/src/apply_args/database.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
use anyhow::Result;
use prism_storage::{DatabaseConfig, rocksdb::RocksDBConfig};
use prism_storage::DatabaseConfig;

#[cfg(feature = "rocksdb")]
use prism_storage::rocksdb::RocksDBConfig;

use crate::cli_args::{CliDatabaseArgs, CliDatabaseType};

Expand All @@ -9,6 +12,7 @@ pub fn apply_database_args(config: &mut DatabaseConfig, args: &CliDatabaseArgs)
// No cli arg specified, do not modify config
Ok(())
}
#[cfg(feature = "rocksdb")]
(DatabaseConfig::RocksDB(rocksdb_config), Some(CliDatabaseType::RocksDB)) => {
apply_rocksdb_args(rocksdb_config, args)
}
Expand All @@ -20,6 +24,7 @@ pub fn apply_database_args(config: &mut DatabaseConfig, args: &CliDatabaseArgs)
}
}

#[cfg(feature = "rocksdb")]
fn apply_rocksdb_args(config: &mut RocksDBConfig, args: &CliDatabaseArgs) -> Result<()> {
if let Some(path) = &args.rocksdb_path {
config.path = path.clone();
Expand All @@ -28,6 +33,7 @@ fn apply_rocksdb_args(config: &mut RocksDBConfig, args: &CliDatabaseArgs) -> Res
}

#[cfg_attr(coverage_nightly, coverage(off))]
#[cfg(feature = "rocksdb")]
#[cfg(test)]
mod tests {
use anyhow::Result;
Expand Down
Loading
Loading