1
0
mirror of https://github.com/fafhrd91/actix-net synced 2024-11-27 18:02:58 +01:00

move codec to separate crate

This commit is contained in:
Nikolay Kim 2018-12-09 15:19:25 -08:00
parent 3288b7648d
commit e50be58fdb
11 changed files with 37 additions and 4 deletions

View File

@ -16,6 +16,7 @@ edition = "2018"
[workspace] [workspace]
members = [ members = [
"./", "./",
"actix-codec",
"actix-service", "actix-service",
] ]
@ -48,6 +49,7 @@ cell = []
[dependencies] [dependencies]
actix = "0.7.6" actix = "0.7.6"
actix-service = "0.1.1" actix-service = "0.1.1"
actix-codec = { path = "actix-codec" }
log = "0.4" log = "0.4"
num_cpus = "1.0" num_cpus = "1.0"

5
actix-codec/CHANGES.md Normal file
View File

@ -0,0 +1,5 @@
# Changes
## [0.1.0] - 2018-12-09
* Move codec to separate crate

25
actix-codec/Cargo.toml Normal file
View File

@ -0,0 +1,25 @@
[package]
name = "actix-codec"
version = "0.1.0"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Utilities for encoding and decoding frames"
keywords = ["network", "framework", "async", "futures"]
homepage = "https://actix.rs"
repository = "https://github.com/actix/actix-net.git"
documentation = "https://docs.rs/actix-codec/"
categories = ["network-programming", "asynchronous"]
license = "MIT/Apache-2.0"
exclude = [".gitignore", ".travis.yml", ".cargo/config", "appveyor.yml"]
edition = "2018"
workspace = "../"
[lib]
name = "actix_codec"
path = "src/lib.rs"
[dependencies]
bytes = "0.4"
futures = "0.1.24"
tokio-io = "0.1"
tokio-codec = "0.1"
log = "0.4"

View File

@ -10,7 +10,7 @@
//! [`Stream`]: # //! [`Stream`]: #
//! [transports]: # //! [transports]: #
#![deny(missing_docs, missing_debug_implementations, warnings)] // #![deny(missing_docs, missing_debug_implementations, warnings)]
mod bcodec; mod bcodec;
mod framed; mod framed;
@ -23,3 +23,6 @@ pub use self::framed::{Framed, FramedParts};
// pub use self::framed2::{Framed2, FramedParts2}; // pub use self::framed2::{Framed2, FramedParts2};
pub use self::framed_read::FramedRead; pub use self::framed_read::FramedRead;
pub use self::framed_write::FramedWrite; pub use self::framed_write::FramedWrite;
pub use tokio_codec::{Decoder, Encoder};
pub use tokio_io::{AsyncRead, AsyncWrite};

View File

@ -3,6 +3,7 @@ use std::marker::PhantomData;
use std::mem; use std::mem;
use actix; use actix;
use actix_codec::Framed;
use actix_service::{IntoNewService, IntoService, NewService, Service}; use actix_service::{IntoNewService, IntoService, NewService, Service};
use futures::future::{ok, FutureResult}; use futures::future::{ok, FutureResult};
use futures::unsync::mpsc; use futures::unsync::mpsc;
@ -10,8 +11,6 @@ use futures::{Async, AsyncSink, Future, Poll, Sink, Stream};
use tokio_codec::{Decoder, Encoder}; use tokio_codec::{Decoder, Encoder};
use tokio_io::{AsyncRead, AsyncWrite}; use tokio_io::{AsyncRead, AsyncWrite};
use crate::codec::Framed;
type Request<U> = <U as Decoder>::Item; type Request<U> = <U as Decoder>::Item;
type Response<U> = <U as Encoder>::Item; type Response<U> = <U as Encoder>::Item;

View File

@ -14,7 +14,6 @@
mod cell; mod cell;
pub mod cloneable; pub mod cloneable;
pub mod codec;
pub mod connector; pub mod connector;
pub mod counter; pub mod counter;
pub mod either; pub mod either;