Skip to content

Commit 6f1c5dd

Browse files
Gate async socket behind feature
1 parent 5d4da34 commit 6f1c5dd

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

dgram/Cargo.toml

+4-1
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@ name = "dgram"
33
version = "0.1.0"
44
edition = "2021"
55

6+
[features]
7+
async = ["dep:tokio"]
8+
69
[dependencies]
710
libc = "0.2.76"
811
nix = "0.26.2"
912
smallvec = { version = "1.10", features = ["union"] }
10-
tokio = { version = "1.29", features = ["full", "test-util"] }
13+
tokio = { version = "1.29", features = ["full", "test-util"], optional = true }

dgram/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#[cfg(feature = "async")]
12
pub mod async_socket;
23
pub mod socket;
34
pub mod syscalls;

0 commit comments

Comments
 (0)