Skip to content

Commit 71eb738

Browse files
authored
Merge pull request #153 from Berrysoft/fix/features
feat: add some features for monocrate
2 parents a35a814 + 57dc968 commit 71eb738

File tree

5 files changed

+36
-17
lines changed

5 files changed

+36
-17
lines changed

Cargo.toml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ compio-net = { path = "./compio-net", version = "0.2.0-beta.1" }
3333
compio-signal = { path = "./compio-signal", version = "0.1.1-beta.1" }
3434
compio-dispatcher = { path = "./compio-dispatcher", version = "0.1.0-beta.1" }
3535
compio-log = { path = "./compio-log", version = "0.1.0-beta.1" }
36-
compio-tls = { path = "./compio-tls", version = "0.1.0-beta.1" }
36+
compio-tls = { path = "./compio-tls", version = "0.1.0-beta.1", default-features = false }
3737

3838
cfg-if = "1.0.0"
3939
criterion = "0.5.1"
@@ -46,16 +46,9 @@ nix = "0.27.1"
4646
once_cell = "1.18.0"
4747
os_pipe = "1.1.4"
4848
paste = "1.0.14"
49-
send_wrapper = "0.6"
5049
slab = "0.4.9"
5150
socket2 = "0.5.5"
5251
tempfile = "3.8.1"
5352
tokio = "1.33.0"
5453
widestring = "1.0.2"
5554
windows-sys = "0.48.0"
56-
57-
native-tls = "0.2.11"
58-
rustls = "0.22.0-alpha.4"
59-
rustls-native-certs = "0.7.0-alpha.1"
60-
61-
hyper = "0.14"

compio-tls/Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "compio-tls"
3-
version = "0.1.0-beta.1"
3+
version = "0.1.0-beta.2"
44
description = "TLS adaptor with compio"
55
categories = ["asynchronous", "network-programming"]
66
keywords = ["async", "net", "tls"]
@@ -18,15 +18,15 @@ rustdoc-args = ["--cfg", "docsrs"]
1818
compio-buf = { workspace = true }
1919
compio-io = { workspace = true, features = ["compat"] }
2020

21-
native-tls = { workspace = true, optional = true }
22-
rustls = { workspace = true, optional = true }
21+
native-tls = { version = "0.2.11", optional = true }
22+
rustls = { version = "0.22.0-alpha.4", optional = true }
2323

2424
[dev-dependencies]
2525
compio-net = { workspace = true }
2626
compio-runtime = { workspace = true }
2727
compio-macros = { workspace = true }
2828

29-
rustls-native-certs = { workspace = true }
29+
rustls-native-certs = "0.7.0-alpha.1"
3030

3131
[features]
3232
default = ["native-tls"]

compio-tls/src/lib.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@
44
#![cfg_attr(feature = "read_buf", feature(read_buf, core_io_borrowed_buf))]
55
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
66

7+
#[cfg(feature = "native-tls")]
8+
pub use native_tls;
9+
#[cfg(feature = "rustls")]
10+
pub use rustls;
11+
712
mod adapter;
813
mod stream;
914

compio/Cargo.toml

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "compio"
3-
version = "0.9.0-beta.2"
3+
version = "0.9.0-beta.3"
44
description = "completion based async runtime"
55
categories = ["asynchronous", "filesystem", "network-programming"]
66
keywords = ["async", "fs", "iocp", "io-uring", "net"]
@@ -39,7 +39,7 @@ compio-io = { workspace = true, optional = true }
3939
compio-net = { workspace = true }
4040
compio-signal = { workspace = true, optional = true }
4141
compio-dispatcher = { workspace = true, optional = true }
42-
compio-log = { workspace = true, optional = true }
42+
compio-log = { workspace = true }
4343
compio-tls = { workspace = true, optional = true }
4444

4545
# Shared dev dependencies for all platforms
@@ -74,6 +74,7 @@ default = ["runtime", "io-uring"]
7474
io-uring = ["compio-driver/io-uring"]
7575
polling = ["compio-driver/polling"]
7676
io = ["dep:compio-io"]
77+
io-compat = ["io", "compio-io/compat"]
7778
runtime = [
7879
"dep:compio-runtime",
7980
"compio-fs/runtime",
@@ -86,10 +87,17 @@ signal = ["dep:compio-signal", "event"]
8687
time = ["compio-runtime/time", "runtime"]
8788
dispatcher = ["dep:compio-dispatcher", "runtime"]
8889
tls = ["dep:compio-tls"]
89-
all = ["time", "macros", "signal", "dispatcher", "tls"]
90+
native-tls = ["tls", "compio-tls/native-tls"]
91+
rustls = ["tls", "compio-tls/rustls"]
92+
all = ["time", "macros", "signal", "dispatcher", "native-tls", "rustls"]
9093

94+
arrayvec = ["compio-buf/arrayvec"]
95+
bumpalo = ["compio-buf/bumpalo"]
96+
bytes = ["compio-buf/bytes"]
9197
criterion = ["compio-runtime?/criterion"]
9298

99+
enable_log = ["compio-log/enable_log"]
100+
93101
# Nightly features
94102
allocator_api = ["compio-buf/allocator_api", "compio-io?/allocator_api"]
95103
lazy_cell = ["compio-signal?/lazy_cell"]
@@ -98,9 +106,12 @@ once_cell_try = [
98106
"compio-runtime?/once_cell_try",
99107
"compio-signal?/once_cell_try",
100108
]
101-
read_buf = ["compio-buf/read_buf", "compio-io?/read_buf"]
109+
read_buf = [
110+
"compio-buf/read_buf",
111+
"compio-io?/read_buf",
112+
"compio-tls?/read_buf",
113+
]
102114
try_trait_v2 = ["compio-buf/try_trait_v2"]
103-
enable_log = ["compio-log/enable_log"]
104115
nightly = [
105116
"allocator_api",
106117
"lazy_cell",

compio/src/lib.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@
2222
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
2323
#![warn(missing_docs)]
2424

25+
#[cfg(feature = "arrayvec")]
26+
pub use buf::arrayvec;
27+
#[cfg(feature = "bumpalo")]
28+
pub use buf::bumpalo;
29+
#[cfg(feature = "bytes")]
30+
pub use buf::bytes;
2531
#[doc(no_inline)]
2632
pub use buf::BufResult;
2733
#[cfg(feature = "dispatcher")]
@@ -47,5 +53,9 @@ pub use runtime::event;
4753
#[cfg(feature = "time")]
4854
#[doc(no_inline)]
4955
pub use runtime::time;
56+
#[cfg(feature = "native-tls")]
57+
pub use tls::native_tls;
58+
#[cfg(feature = "rustls")]
59+
pub use tls::rustls;
5060
#[doc(inline)]
5161
pub use {compio_buf as buf, compio_driver as driver, compio_fs as fs, compio_net as net};

0 commit comments

Comments
 (0)