Skip to content

Commit

Permalink
Merge pull request #44 from arindas/develop
Browse files Browse the repository at this point in the history
feat: introduces feature flags for different impls
  • Loading branch information
arindas authored Sep 14, 2024
2 parents b26f99d + f856292 commit df506b6
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
20 changes: 15 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,21 @@ zerovec = "0.10.4"
zerovec-derive = "0.10.3"
futures = "0.3.30"
num = "0.4.2"
tokio = { version = "1.37", features=["fs", "rt", "rt-multi-thread", "io-util", "sync"] }
aws-config = { version = "1.1.7", features = ["behavior-version-latest"] }
aws-sdk-s3 = "1.41.0"
tokio = { version = "1.37", features=["fs", "rt", "rt-multi-thread", "io-util", "sync"], optional = true }
aws-config = { version = "1.1.7", features = ["behavior-version-latest"], optional = true }
aws-sdk-s3 = { version = "1.41.0", optional = true }
bytes = "1.7.1"
serde = { version = "1.0.203", features = ["derive"] }
serde_json = "1.0.117"
glommio = "0.9.0"
tokio-uring = { version = "0.5.0", features = ["bytes"] }
glommio = { version = "0.9.0", optional = true }
tokio-uring = { version = "0.5.0", features = ["bytes"], optional = true }

[features]
default = ["fs", "object_storage"]
fs = ["tokio", "tokio_uring", "glommio"]
object_storage = ["aws_s3"]
tokio = ["dep:tokio"]
tokio_uring = ["dep:tokio-uring"]
glommio = ["dep:glommio"]
aws_s3 = ["dep:aws-config", "dep:aws-sdk-s3"]
legacy = []
5 changes: 5 additions & 0 deletions src/fs/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
#[cfg(feature = "glommio")]
pub mod glommio;

#[cfg(feature = "tokio")]
pub mod tokio;

#[cfg(feature = "tokio_uring")]
pub mod tokio_uring;
3 changes: 3 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@ pub mod anchored_buffer;
pub mod buffered_io;
pub mod fs;
pub mod io_types;

#[cfg(feature = "legacy")]
pub mod legacy;

pub mod object_storage;
pub mod stream;

Expand Down
1 change: 1 addition & 0 deletions src/object_storage/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
use core::cmp::Ordering;
use serde::{Deserialize, Serialize};

#[cfg(feature = "aws_s3")]
pub mod aws_s3;

pub trait PartMap {
Expand Down

0 comments on commit df506b6

Please sign in to comment.