Skip to content

Commit

Permalink
refactor: move tonbo to a sub-folder
Browse files Browse the repository at this point in the history
  • Loading branch information
ethe committed Aug 30, 2024
1 parent 6faa991 commit fff7114
Show file tree
Hide file tree
Showing 55 changed files with 101 additions and 102 deletions.
102 changes: 5 additions & 97 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,100 +1,8 @@
workspace = { members = ["tonbo_macros"] }
[workspace]
members = ["tonbo", "tonbo_macros"]
resolver = "2"

[package]
description = "An embedded persistent KV database in Rust."
documentation = "https://docs.rs/tonbo"
[workspace.package]
edition = "2021"
license = "Apache-2.0"
name = "tonbo"
readme = "README.md"
resolver = "2"
version = "0.1.0"

[package.metadata]
msrv = "1.79.0"

[features]
bench = ["redb", "rocksdb", "sled"]
datafusion = ["dep:async-trait", "dep:datafusion"]
default = ["tokio"]
load_tbl = []
redb = ["dep:redb"]
rocksdb = ["dep:rocksdb"]
sled = ["dep:sled"]
tokio = ["tokio/fs"]

[[example]]
name = "declare"
required-features = ["tokio"]

[[example]]
name = "datafusion"
required-features = ["datafusion"]

[[bench]]
harness = false
name = "write_bench"
required-features = ["bench"]

[[bench]]
harness = false
name = "read_bench"
required-features = ["bench"]

[[bench]]
harness = false
name = "writes"
path = "benches/criterion/writes.rs"
required-features = ["sled"]

[dependencies]
arrow = "52"
async-lock = "3"
async-stream = "0.3"
async-trait = { version = "0.1", optional = true }
crc32fast = "1"
crossbeam-skiplist = "0.1"
datafusion = { version = "41", optional = true }
flume = { version = "0.11", features = ["async"] }
futures-core = "0.3"
futures-io = "0.3"
futures-util = "0.3"
lockable = "0.0.8"
once_cell = "1"
parquet = { version = "52", features = ["async"] }
pin-project-lite = "0.2"
regex = "1"
thiserror = "1"
tokio = { version = "1", features = ["io-util"], default-features = false }
tokio-util = { version = "0.7" }
tonbo_macros = { version = "0.1.0", path = "tonbo_macros" }
tracing = "0.1"
ulid = "1"

# Only used for benchmarks
redb = { version = "2", optional = true }
rocksdb = { version = "0.22", optional = true }
sled = { version = "0.34", optional = true }

[dev-dependencies]
bincode = "1"
comfy-table = "7"
criterion = { version = "0.5", features = ["async_tokio", "html_reports"] }
fastrand = "2"
futures = { version = "0.3" }
mimalloc = "0.1"
serde = "1"
tempfile = "3"
tokio = { version = "1", features = ["full"] }
trybuild = "1.0"

[target.'cfg(unix)'.dev-dependencies]
pprof = { version = "0.13", features = ["criterion", "flamegraph"] }

[profile.release]
codegen-units = 1
lto = "thin"

[profile.bench]
debug = true
inherits = "release"
repository = "https://github.com/tonbo-io/tonbo"
90 changes: 90 additions & 0 deletions tonbo/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
[package]
description = "An embedded persistent KV database in Rust."
documentation = "https://docs.rs/tonbo"
edition.workspace = true
license.workspace = true
name = "tonbo"
readme = "../README.md"
repository.workspace = true
version = "0.1.0"

[package.metadata]
msrv = "1.79.0"

[features]
bench = ["redb", "rocksdb", "sled"]
datafusion = ["dep:async-trait", "dep:datafusion"]
default = ["tokio"]
load_tbl = []
redb = ["dep:redb"]
rocksdb = ["dep:rocksdb"]
sled = ["dep:sled"]
tokio = ["tokio/fs"]

[[example]]
name = "declare"
required-features = ["tokio"]

[[example]]
name = "datafusion"
required-features = ["datafusion"]

[[bench]]
harness = false
name = "write_bench"
required-features = ["bench"]

[[bench]]
harness = false
name = "read_bench"
required-features = ["bench"]

[[bench]]
harness = false
name = "writes"
path = "benches/criterion/writes.rs"
required-features = ["sled"]

[dependencies]
arrow = "52"
async-lock = "3"
async-stream = "0.3"
async-trait = { version = "0.1", optional = true }
crc32fast = "1"
crossbeam-skiplist = "0.1"
datafusion = { version = "41", optional = true }
flume = { version = "0.11", features = ["async"] }
futures-core = "0.3"
futures-io = "0.3"
futures-util = "0.3"
lockable = "0.0.8"
once_cell = "1"
parquet = { version = "52", features = ["async"] }
pin-project-lite = "0.2"
regex = "1"
thiserror = "1"
tokio = { version = "1", features = ["io-util"], default-features = false }
tokio-util = { version = "0.7" }
tonbo_macros = { version = "0.1", path = "../tonbo_macros" }
tracing = "0.1"
ulid = "1"

# Only used for benchmarks
redb = { version = "2", optional = true }
rocksdb = { version = "0.22", optional = true }
sled = { version = "0.34", optional = true }

[dev-dependencies]
bincode = "1"
comfy-table = "7"
criterion = { version = "0.5", features = ["async_tokio", "html_reports"] }
fastrand = "2"
futures = { version = "0.3" }
mimalloc = "0.1"
serde = "1"
tempfile = "3"
tokio = { version = "1", features = ["full"] }
trybuild = "1.0"

[target.'cfg(unix)'.dev-dependencies]
pprof = { version = "0.13", features = ["criterion", "flamegraph"] }
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
9 changes: 5 additions & 4 deletions tonbo_macros/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
[package]
description = "TonboRecord macro"
description = "Helpers of Tonbo"
documentation = "https://docs.rs/tonbo_macros"
edition = "2021"
license = "Apache-2.0"
edition.workspace = true
license.workspace = true
name = "tonbo_macros"
repository.workspace = true
version = "0.1.0"

[dependencies]
Expand All @@ -12,5 +13,5 @@ quote = "1"
syn = "2"

[lib]
path = "src/lib.rs"
doctest = false
proc-macro = true
2 changes: 1 addition & 1 deletion tonbo_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ enum DataType {
///
/// # Example
///
/// ```
/// ```no_run
/// use tonbo::tonbo_record;
///
/// #[tonbo_record(::serde::Serialize, ::serde::Deserialize)]
Expand Down

0 comments on commit fff7114

Please sign in to comment.