mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-09-08 00:00:13 +02:00
Refactor proc macros, add more knobs (#2022)
* Refactor proc macros, add more knobs * make macros work with rt-core
This commit is contained in:
committed by
Lucio Franco
parent
a515f9c459
commit
e8fcf55881
+2
-2
@@ -54,7 +54,7 @@ io-driver = ["mio", "lazy_static"]
|
||||
io-util = ["memchr"]
|
||||
# stdin, stdout, stderr
|
||||
io-std = ["rt-core"]
|
||||
macros = ["tokio-macros"]
|
||||
macros = ["rt-core", "tokio-macros"]
|
||||
net = ["dns", "tcp", "udp", "uds"]
|
||||
process = [
|
||||
"io-driver",
|
||||
@@ -92,7 +92,7 @@ uds = ["io-driver", "mio-uds", "libc"]
|
||||
|
||||
|
||||
[dependencies]
|
||||
tokio-macros = { version = "0.2.0", optional = true }
|
||||
tokio-macros = { version = "0.2.0", path = "../tokio-macros", optional = true }
|
||||
|
||||
bytes = "0.5.0"
|
||||
pin-project-lite = "0.1.1"
|
||||
|
||||
+11
-3
@@ -264,9 +264,17 @@ cfg_time! {
|
||||
mod util;
|
||||
|
||||
cfg_macros! {
|
||||
#[cfg(not(test))] // Work around for rust-lang/rust#62127
|
||||
pub use tokio_macros::main;
|
||||
pub use tokio_macros::test;
|
||||
cfg_rt_threaded! {
|
||||
#[cfg(not(test))] // Work around for rust-lang/rust#62127
|
||||
pub use tokio_macros::main_threaded as main;
|
||||
pub use tokio_macros::test_threaded as test;
|
||||
}
|
||||
|
||||
cfg_not_rt_threaded! {
|
||||
#[cfg(not(test))] // Work around for rust-lang/rust#62127
|
||||
pub use tokio_macros::main_basic as main;
|
||||
pub use tokio_macros::test_basic as test;
|
||||
}
|
||||
}
|
||||
|
||||
// Tests
|
||||
|
||||
Reference in New Issue
Block a user