diff --git a/Cargo.toml b/Cargo.toml index 7d2a8ecb..cbe42108 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,9 +2,9 @@ members = [ "ntex", "ntex-codec", - "ntex-macros", "ntex-router", "ntex-rt", + "ntex-rt-macros", "ntex-service", # "ntex-web-macros", ] @@ -12,8 +12,8 @@ members = [ [patch.crates-io] ntex = { path = "ntex" } ntex-codec = { path = "ntex-codec" } -ntex-macros = { path = "ntex-macros" } ntex-router = { path = "ntex-router" } ntex-rt = { path = "ntex-rt" } +ntex-rt-macros = { path = "ntex-rt-macros" } ntex-service = { path = "ntex-service" } ntex-web-macros = { path = "ntex-web-macros" } diff --git a/ntex-codec/Cargo.toml b/ntex-codec/Cargo.toml index 8922d6ca..a32234a6 100644 --- a/ntex-codec/Cargo.toml +++ b/ntex-codec/Cargo.toml @@ -4,7 +4,7 @@ version = "0.1.0" authors = ["Nikolay Kim "] description = "Utilities for encoding and decoding frames" keywords = ["network", "framework", "async", "futures"] -homepage = "https://actix.rs" +homepage = "https://ntex.rs" repository = "https://github.com/ntex-rs/ntex.git" documentation = "https://docs.rs/ntex-codec/" categories = ["network-programming", "asynchronous"] diff --git a/ntex-codec/src/framed.rs b/ntex-codec/src/framed.rs index dc8818ef..bbace51e 100644 --- a/ntex-codec/src/framed.rs +++ b/ntex-codec/src/framed.rs @@ -35,6 +35,7 @@ where T: AsyncRead + AsyncWrite, U: Decoder + Encoder, { + #[inline] /// Provides a `Stream` and `Sink` interface for reading and writing to this /// `Io` object, using `Decode` and `Encode` to read and write the raw data. /// @@ -60,6 +61,7 @@ where } impl Framed { + #[inline] /// Provides a `Stream` and `Sink` interface for reading and writing to this /// `Io` object, using `Decode` and `Encode` to read and write the raw data. /// @@ -87,16 +89,19 @@ impl Framed { } } + #[inline] /// Returns a reference to the underlying codec. pub fn get_codec(&self) -> &U { &self.codec } + #[inline] /// Returns a mutable reference to the underlying codec. pub fn get_codec_mut(&mut self) -> &mut U { &mut self.codec } + #[inline] /// Returns a reference to the underlying I/O stream wrapped by /// `Frame`. /// @@ -107,6 +112,7 @@ impl Framed { &self.io } + #[inline] /// Returns a mutable reference to the underlying I/O stream wrapped by /// `Frame`. /// @@ -117,16 +123,19 @@ impl Framed { &mut self.io } + #[inline] /// Check if write buffer is empty. pub fn is_write_buf_empty(&self) -> bool { self.write_buf.is_empty() } + #[inline] /// Check if write buffer is full. pub fn is_write_buf_full(&self) -> bool { self.write_buf.len() >= HW } + #[inline] /// Consume the `Frame`, returning `Frame` with different codec. pub fn into_framed(self, codec: U2) -> Framed { Framed { @@ -138,6 +147,7 @@ impl Framed { } } + #[inline] /// Consume the `Frame`, returning `Frame` with different io. pub fn map_io(self, f: F) -> Framed where @@ -152,6 +162,7 @@ impl Framed { } } + #[inline] /// Consume the `Frame`, returning `Frame` with different codec. pub fn map_codec(self, f: F) -> Framed where @@ -166,6 +177,7 @@ impl Framed { } } + #[inline] /// Consumes the `Frame`, returning its underlying I/O stream, the buffer /// with unprocessed data, and the codec. /// diff --git a/ntex-macros/Cargo.toml b/ntex-rt-macros/Cargo.toml similarity index 70% rename from ntex-macros/Cargo.toml rename to ntex-rt-macros/Cargo.toml index 0bd0b069..7ac1e06a 100644 --- a/ntex-macros/Cargo.toml +++ b/ntex-rt-macros/Cargo.toml @@ -1,10 +1,10 @@ [package] -name = "ntex-macros" +name = "ntex-rt-macros" version = "0.1.0" authors = ["Nikolay Kim "] -description = "Ntex runtime macros" +description = "ntex runtime macros" repository = "https://github.com/ntex-rs/ntex" -documentation = "https://docs.rs/ntex-macros/" +documentation = "https://docs.rs/ntex-rt-macros/" categories = ["network-programming", "asynchronous"] license = "MIT" edition = "2018" @@ -17,4 +17,4 @@ quote = "^1" syn = { version = "^1", features = ["full"] } [dev-dependencies] -ntex = { version = "0.1.1" } +ntex = { version = "0.1.0" } diff --git a/ntex-macros/LICENSE b/ntex-rt-macros/LICENSE similarity index 100% rename from ntex-macros/LICENSE rename to ntex-rt-macros/LICENSE diff --git a/ntex-macros/src/lib.rs b/ntex-rt-macros/src/lib.rs similarity index 100% rename from ntex-macros/src/lib.rs rename to ntex-rt-macros/src/lib.rs diff --git a/ntex-rt/Cargo.toml b/ntex-rt/Cargo.toml index d04fe7dd..7e0e245b 100644 --- a/ntex-rt/Cargo.toml +++ b/ntex-rt/Cargo.toml @@ -1,8 +1,8 @@ [package] name = "ntex-rt" -version = "1.0.0" +version = "0.1.0" authors = ["Nikolay Kim "] -description = "Actix runtime" +description = "ntex runtime" keywords = ["network", "framework", "async", "futures"] homepage = "https://ntex.rs" repository = "https://github.com/ntex-rs/ntex.git" @@ -16,7 +16,7 @@ name = "ntex_rt" path = "src/lib.rs" [dependencies] -ntex-macros = "0.1.0" +ntex-rt-macros = "0.1.0" actix-threadpool = "0.3" futures = "0.3.1" tokio = { version = "0.2.6", default-features=false, features = ["rt-core", "rt-util", "io-driver", "tcp", "uds", "udp", "time", "signal", "stream"] } diff --git a/ntex-rt/src/lib.rs b/ntex-rt/src/lib.rs index 0ec57502..536bd5ee 100644 --- a/ntex-rt/src/lib.rs +++ b/ntex-rt/src/lib.rs @@ -10,7 +10,7 @@ pub use self::runtime::Runtime; pub use self::system::System; #[cfg(not(test))] // Work around for rust-lang/rust#62127 -pub use ntex_macros::{rt_main as main, rt_test as test}; +pub use ntex_rt_macros::{rt_main as main, rt_test as test}; #[doc(hidden)] pub use actix_threadpool as blocking; diff --git a/ntex-service/Cargo.toml b/ntex-service/Cargo.toml index 07f6b728..dc2a27ea 100644 --- a/ntex-service/Cargo.toml +++ b/ntex-service/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "ntex-service" -version = "1.0.5" +version = "0.1.0" authors = ["Nikolay Kim "] description = "Actix service" keywords = ["network", "framework", "async", "futures"] @@ -20,4 +20,4 @@ futures-util = "0.3.1" pin-project = "0.4.6" [dev-dependencies] -ntex-rt = "1.0" \ No newline at end of file +ntex-rt = "0.1" \ No newline at end of file diff --git a/ntex/Cargo.toml b/ntex/Cargo.toml index 5502a314..0156d47e 100644 --- a/ntex/Cargo.toml +++ b/ntex/Cargo.toml @@ -37,10 +37,10 @@ cookie = ["coo-kie", "coo-kie/percent-encode"] [dependencies] ntex-codec = "0.1" -ntex-macros = "0.1" -ntex-rt = "1.0" +ntex-rt = "0.1" +ntex-rt-macros = "0.1" ntex-router = "0.3" -ntex-service = "1.0" +ntex-service = "0.1" ntex-web-macros = "0.1" actix-threadpool = "0.3.1" @@ -95,7 +95,7 @@ mio-uds = { version = "0.6.7" } brotli2 = { version="0.3.2", optional = true } flate2 = { version = "1.0.13", optional = true } -tokio = { version = "0.2.6", default-features=false, features = ["rt-core", "rt-util", "io-driver", "tcp", "uds", "udp", "time", "signal", "stream"] } +tokio = "0.2.6" [dev-dependencies] futures = "0.3.1" diff --git a/ntex/src/lib.rs b/ntex/src/lib.rs index efe96077..94c1d691 100644 --- a/ntex/src/lib.rs +++ b/ntex/src/lib.rs @@ -15,7 +15,7 @@ #[macro_use] extern crate log; -pub use ntex_macros::{main, test}; +pub use ntex_rt_macros::{main, test}; pub mod channel; pub mod codec;