mirror of
https://github.com/tokio-rs/tokio.git
synced 2026-08-29 00:00:11 +02:00
macros: re-export main macro from tokio (#1198)
Includes minor fixes and a very basic example. Fixes #1183
This commit is contained in:
+2
-1
@@ -48,6 +48,7 @@ rt-full = [
|
||||
# "timer",
|
||||
"tokio-current-thread",
|
||||
"tokio-executor",
|
||||
"tokio-macros",
|
||||
# "tokio-threadpool",
|
||||
# "tokio-trace-core",
|
||||
]
|
||||
@@ -69,7 +70,7 @@ tokio-current-thread = { version = "0.2.0", optional = true, path = "../tokio-cu
|
||||
#tokio-fs = { version = "0.2.0", optional = true, path = "../tokio-fs" }
|
||||
tokio-io = { version = "0.2.0", optional = true, path = "../tokio-io" }
|
||||
tokio-executor = { version = "0.2.0", optional = true, path = "../tokio-executor" }
|
||||
#tokio-macros = { version = "0.1.0", optional = true, path = "../tokio-macros" }
|
||||
tokio-macros = { version = "0.1.0", optional = true, path = "../tokio-macros" }
|
||||
tokio-reactor = { version = "0.2.0", optional = true, path = "../tokio-reactor" }
|
||||
tokio-sync = { version = "0.2.0", optional = true, path = "../tokio-sync" }
|
||||
#tokio-threadpool = { version = "0.2.0", optional = true, path = "../tokio-threadpool" }
|
||||
|
||||
@@ -99,4 +99,7 @@ if_runtime! {
|
||||
|
||||
pub use crate::executor::spawn;
|
||||
pub use crate::runtime::run;
|
||||
|
||||
#[cfg(not(test))] // Work around for rust-lang/rust#62127
|
||||
pub use tokio_macros::main;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user