1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-20 15:17:07 +00: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]
members = [
"./",
"actix-codec",
"actix-service",
]
@ -48,6 +49,7 @@ cell = []
[dependencies]
actix = "0.7.6"
actix-service = "0.1.1"
actix-codec = { path = "actix-codec" }
log = "0.4"
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`]: #
//! [transports]: #
#![deny(missing_docs, missing_debug_implementations, warnings)]
// #![deny(missing_docs, missing_debug_implementations, warnings)]
mod bcodec;
mod framed;
@ -23,3 +23,6 @@ pub use self::framed::{Framed, FramedParts};
// pub use self::framed2::{Framed2, FramedParts2};
pub use self::framed_read::FramedRead;
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 actix;
use actix_codec::Framed;
use actix_service::{IntoNewService, IntoService, NewService, Service};
use futures::future::{ok, FutureResult};
use futures::unsync::mpsc;
@ -10,8 +11,6 @@ use futures::{Async, AsyncSink, Future, Poll, Sink, Stream};
use tokio_codec::{Decoder, Encoder};
use tokio_io::{AsyncRead, AsyncWrite};
use crate::codec::Framed;
type Request<U> = <U as Decoder>::Item;
type Response<U> = <U as Encoder>::Item;

View file

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