diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..8c91a74 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,8 @@ +language: rust +rust: + - stable + - beta + - nightly +matrix: + allow_failures: + - rust: nightly diff --git a/benches/libraries.rs b/benches/libraries.rs index cdfa6ef..bd27b74 100644 --- a/benches/libraries.rs +++ b/benches/libraries.rs @@ -79,23 +79,19 @@ fn bench_stalwart(b: &mut Bencher) { }); } -/* - // These libraries do not support all RFCs and might be faster -// on the benchmarks as they skip certain encoded parts or fail -// while trying to parse the messages. -// Also no body conversion between HTML/text is done by these. +// on the benchmarks as they do not parse all header fields, +// do not decode encoded parts or fail while trying to parse the messages. +// Also no text body conversion between HTML/plain-text is done by these. +// +// To benchmark against these libraries, add to Cargo.toml dev-dependencies: +// // email = "0.0.21" // email-format = "0.8" -// email-parser = "0.5.0" +// email-parser = { version = "0.5.0", features=["headers", "mime"] } // mailparse = "0.13" -#[bench] -fn bench_mailparse(b: &mut Bencher) { - bench_all_samples(b, "mailparse", |bytes, _str| { - mailparse::parse_mail(bytes).unwrap(); - }); -} +/* #[bench] fn bench_email_parser(b: &mut Bencher) { @@ -104,6 +100,13 @@ fn bench_email_parser(b: &mut Bencher) { }); } +#[bench] +fn bench_mailparse(b: &mut Bencher) { + bench_all_samples(b, "mailparse", |bytes, _str| { + mailparse::parse_mail(bytes).unwrap(); + }); +} + #[bench] fn benchmark_email(b: &mut Bencher) { bench_all_samples(b, "email", |_bytes, str| { @@ -119,6 +122,4 @@ fn bench_email_format(b: &mut Bencher) { }); } - - */