mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-13 13:41:01 +00:00
Merge branch 'v0.6.x'
This commit is contained in:
+4
-2
@@ -22,9 +22,11 @@ script:
|
|||||||
- |
|
- |
|
||||||
(cd serde && travis-cargo build) &&
|
(cd serde && travis-cargo build) &&
|
||||||
(cd serde && travis-cargo test) &&
|
(cd serde && travis-cargo test) &&
|
||||||
|
(cd serde && travis-cargo --only nightly test -- --features nightly-testing) &&
|
||||||
(cd serde_tests && travis-cargo test) &&
|
(cd serde_tests && travis-cargo test) &&
|
||||||
(cd serde_macros && travis-cargo --only nightly test) &&
|
(cd serde_tests && travis-cargo --only nightly test -- --features nightly-testing) &&
|
||||||
(cd serde_macros && travis-cargo --only nightly bench) &&
|
(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 && travis-cargo --only stable doc) &&
|
||||||
(cd serde_codegen && travis-cargo --only stable doc)
|
(cd serde_codegen && travis-cargo --only stable doc)
|
||||||
|
|
||||||
|
|||||||
@@ -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:
|
This also produces:
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
+1
-1
@@ -10,7 +10,7 @@ readme = "../README.md"
|
|||||||
keywords = ["serde", "serialization"]
|
keywords = ["serde", "serialization"]
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
nightly = ["clippy"]
|
nightly-testing = ["clippy"]
|
||||||
num-bigint = ["num/bigint"]
|
num-bigint = ["num/bigint"]
|
||||||
num-complex = ["num/complex"]
|
num-complex = ["num/complex"]
|
||||||
num-impls = ["num-bigint", "num-complex", "num-rational"]
|
num-impls = ["num-bigint", "num-complex", "num-rational"]
|
||||||
|
|||||||
@@ -11,7 +11,8 @@ keywords = ["serde", "serialization"]
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["with-syntex"]
|
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"]
|
with-syntex = ["quasi/with-syntex", "quasi_codegen", "quasi_codegen/with-syntex", "syntex", "syntex_syntax"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|||||||
+13
-2
@@ -12,12 +12,23 @@ keywords = ["serde", "serialization"]
|
|||||||
name = "serde_macros"
|
name = "serde_macros"
|
||||||
plugin = true
|
plugin = true
|
||||||
|
|
||||||
|
[features]
|
||||||
|
nightly-testing = ["clippy", "serde/nightly-testing", "serde_codegen/nightly-testing"]
|
||||||
|
|
||||||
[dependencies]
|
[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"] }
|
serde_codegen = { version = "^0.6.10", path = "../serde_codegen", default-features = false, features = ["nightly"] }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
compiletest_rs = "^0.0.11"
|
compiletest_rs = "^0.0.11"
|
||||||
num = "^0.1.27"
|
num = "^0.1.27"
|
||||||
rustc-serialize = "^0.3.16"
|
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)]
|
#![feature(custom_attribute, custom_derive, plugin, test)]
|
||||||
#![plugin(clippy)]
|
#![cfg_attr(feature = "clippy", plugin(clippy))]
|
||||||
#![plugin(serde_macros)]
|
#![plugin(serde_macros)]
|
||||||
|
|
||||||
extern crate num;
|
extern crate num;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#![feature(plugin, plugin_registrar, rustc_private)]
|
#![feature(plugin_registrar, rustc_private)]
|
||||||
#![plugin(clippy)]
|
#![cfg_attr(feature = "clippy", feature(plugin))]
|
||||||
|
#![cfg_attr(feature = "clippy", plugin(clippy))]
|
||||||
|
|
||||||
extern crate serde_codegen;
|
extern crate serde_codegen;
|
||||||
extern crate rustc_plugin;
|
extern crate rustc_plugin;
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ keywords = ["serialization"]
|
|||||||
build = "build.rs"
|
build = "build.rs"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
nightly = ["clippy", "serde/nightly"]
|
nightly-testing = ["clippy", "serde/nightly-testing", "serde_codegen/nightly-testing"]
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
syntex = { version = "^0.26.0" }
|
syntex = { version = "^0.26.0" }
|
||||||
|
|||||||
Reference in New Issue
Block a user