Merge branch 'v0.6.x'
This commit is contained in:
commit
46f88037db
@ -22,9 +22,11 @@ script:
|
||||
- |
|
||||
(cd serde && travis-cargo build) &&
|
||||
(cd serde && travis-cargo test) &&
|
||||
(cd serde && travis-cargo --only nightly test -- --features nightly-testing) &&
|
||||
(cd serde_tests && travis-cargo test) &&
|
||||
(cd serde_macros && travis-cargo --only nightly test) &&
|
||||
(cd serde_macros && travis-cargo --only nightly bench) &&
|
||||
(cd serde_tests && travis-cargo --only nightly test -- --features nightly-testing) &&
|
||||
(cd serde_macros && travis-cargo --only nightly test -- --features nightly-testing) &&
|
||||
(cd serde_macros && travis-cargo --only nightly bench -- --features nightly-testing) &&
|
||||
(cd serde && travis-cargo --only stable doc) &&
|
||||
(cd serde_codegen && travis-cargo --only stable doc)
|
||||
|
||||
|
22
README.md
22
README.md
@ -129,6 +129,28 @@ fn main() {
|
||||
}
|
||||
```
|
||||
|
||||
`build.rs`
|
||||
|
||||
```rust
|
||||
extern crate syntex;
|
||||
extern crate serde_codegen;
|
||||
|
||||
use std::env;
|
||||
use std::path::Path;
|
||||
|
||||
pub fn main() {
|
||||
let out_dir = env::var_os("OUT_DIR").unwrap();
|
||||
|
||||
let src = Path::new("src/main.rs.in");
|
||||
let dst = Path::new(&out_dir).join("main.rs");
|
||||
|
||||
let mut registry = syntex::Registry::new();
|
||||
|
||||
serde_codegen::register(&mut registry);
|
||||
registry.expand("", &src, &dst).unwrap();
|
||||
}
|
||||
```
|
||||
|
||||
This also produces:
|
||||
|
||||
```
|
||||
|
@ -10,7 +10,7 @@ readme = "../README.md"
|
||||
keywords = ["serde", "serialization"]
|
||||
|
||||
[features]
|
||||
nightly = ["clippy"]
|
||||
nightly-testing = ["clippy"]
|
||||
num-bigint = ["num/bigint"]
|
||||
num-complex = ["num/complex"]
|
||||
num-impls = ["num-bigint", "num-complex", "num-rational"]
|
||||
|
@ -11,7 +11,8 @@ keywords = ["serde", "serialization"]
|
||||
|
||||
[features]
|
||||
default = ["with-syntex"]
|
||||
nightly = ["clippy", "quasi_macros"]
|
||||
nightly = ["quasi_macros"]
|
||||
nightly-testing = ["clippy"]
|
||||
with-syntex = ["quasi/with-syntex", "quasi_codegen", "quasi_codegen/with-syntex", "syntex", "syntex_syntax"]
|
||||
|
||||
[build-dependencies]
|
||||
|
@ -12,12 +12,23 @@ keywords = ["serde", "serialization"]
|
||||
name = "serde_macros"
|
||||
plugin = true
|
||||
|
||||
[features]
|
||||
nightly-testing = ["clippy", "serde/nightly-testing", "serde_codegen/nightly-testing"]
|
||||
|
||||
[dependencies]
|
||||
clippy = "^0.0.37"
|
||||
clippy = { version = "^0.0.37", optional = true }
|
||||
serde_codegen = { version = "^0.6.10", path = "../serde_codegen", default-features = false, features = ["nightly"] }
|
||||
|
||||
[dev-dependencies]
|
||||
compiletest_rs = "^0.0.11"
|
||||
num = "^0.1.27"
|
||||
rustc-serialize = "^0.3.16"
|
||||
serde = { version = "^0.6.10", path = "../serde", features = ["nightly", "num-impls"] }
|
||||
serde = { version = "^0.6.10", path = "../serde", features = ["num-impls"] }
|
||||
|
||||
[[test]]
|
||||
name = "test"
|
||||
path = "tests/test.rs"
|
||||
|
||||
[[bench]]
|
||||
name = "bench"
|
||||
path = "benches/bench.rs"
|
||||
|
@ -1,5 +1,5 @@
|
||||
#![feature(custom_attribute, custom_derive, plugin, test)]
|
||||
#![plugin(clippy)]
|
||||
#![cfg_attr(feature = "clippy", plugin(clippy))]
|
||||
#![plugin(serde_macros)]
|
||||
|
||||
extern crate num;
|
||||
|
@ -1,5 +1,6 @@
|
||||
#![feature(plugin, plugin_registrar, rustc_private)]
|
||||
#![plugin(clippy)]
|
||||
#![feature(plugin_registrar, rustc_private)]
|
||||
#![cfg_attr(feature = "clippy", feature(plugin))]
|
||||
#![cfg_attr(feature = "clippy", plugin(clippy))]
|
||||
|
||||
extern crate serde_codegen;
|
||||
extern crate rustc_plugin;
|
||||
|
@ -11,7 +11,7 @@ keywords = ["serialization"]
|
||||
build = "build.rs"
|
||||
|
||||
[features]
|
||||
nightly = ["clippy", "serde/nightly"]
|
||||
nightly-testing = ["clippy", "serde/nightly-testing", "serde_codegen/nightly-testing"]
|
||||
|
||||
[build-dependencies]
|
||||
syntex = { version = "^0.26.0" }
|
||||
|
Loading…
Reference in New Issue
Block a user