Skip to content

Commit 3597a9d

Browse files
author
bors-servo
authored
Auto merge of #430 - servo:derive, r=Manishearth
Switch to serde_derive <!-- Reviewable:start --> This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/webrender/430) <!-- Reviewable:end -->
2 parents 98e7331 + 94437c4 commit 3597a9d

File tree

4 files changed

+24
-19
lines changed

4 files changed

+24
-19
lines changed

webrender/Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[package]
22
name = "webrender"
3-
version = "0.5.1"
3+
version = "0.6.0"
44
authors = ["Glenn Watson <gw@intuitionlibrary.com>"]
55
license = "MPL-2.0"
66
repository = "https://github.com/servo/webrender"
77

88
[features]
9-
default = ["webrender_traits/serde_codegen"]
10-
serde_macros = ["webrender_traits/serde_macros"]
9+
default = ["webrender_traits/codegen"]
10+
serde_derive = ["webrender_traits/serde_derive"]
1111

1212
[dependencies]
1313
app_units = "0.3"

webrender_traits/Cargo.toml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
[package]
22
name = "webrender_traits"
3-
version = "0.5.1"
3+
version = "0.6.0"
44
authors = ["Glenn Watson <gw@intuitionlibrary.com>"]
55
license = "MPL-2.0"
66
repository = "https://github.com/servo/webrender"
77
build = "build.rs"
88

99
[features]
10-
default = ["serde_codegen"]
10+
default = ["codegen"]
1111
nightly = ["euclid/unstable", "serde/unstable"]
12+
codegen = ["serde_codegen", "serde_codegen/with-syntex"]
1213

1314
[dependencies]
1415
app_units = "0.3.0"
@@ -18,11 +19,13 @@ gleam = "0.2.22"
1819
heapsize = "0.3.6"
1920
offscreen_gl_context = {version = "0.4.0", features = ["serde_serialization"]}
2021
serde = "0.8"
21-
serde_macros = {version = "0.8", optional = true}
22+
serde_derive = {version = "0.8", optional = true}
2223
ipc-channel = "0.5.0"
2324

2425
[target.x86_64-apple-darwin.dependencies]
2526
core-graphics = "0.4"
2627

27-
[build-dependencies]
28-
serde_codegen = {version = "0.8", optional = true}
28+
[build-dependencies.serde_codegen]
29+
version = "0.8"
30+
default_features = false
31+
optional = true

webrender_traits/build.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* License, v. 2.0. If a copy of the MPL was not distributed with this
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

5-
#[cfg(all(feature = "serde_codegen", not(feature = "serde_macros")))]
5+
#[cfg(all(feature = "serde_codegen", not(feature = "serde_derive")))]
66
mod inner {
77
extern crate serde_codegen;
88

@@ -20,24 +20,24 @@ mod inner {
2020
}
2121
}
2222

23-
#[cfg(all(feature = "serde_macros", not(feature = "serde_codegen")))]
23+
#[cfg(all(feature = "serde_derive", not(feature = "serde_codegen")))]
2424
mod inner {
2525
pub fn main() {}
2626
}
2727

28-
#[cfg(all(feature = "serde_codegen", feature = "serde_macros"))]
28+
#[cfg(all(feature = "serde_codegen", feature = "serde_derive"))]
2929
mod inner {
3030
pub fn main() {
31-
panic!("serde_codegen and serde_macros are both used. "
32-
"You probably forgot --no-default-features.")
31+
panic!("serde_codegen and serde_derive are both used. \
32+
You probably forgot --no-default-features.")
3333
}
3434
}
3535

36-
#[cfg(not(any(feature = "serde_codegen", feature = "serde_macros")))]
36+
#[cfg(not(any(feature = "serde_codegen", feature = "serde_derive")))]
3737
mod inner {
3838
pub fn main() {
39-
panic!("Neither serde_codegen nor serde_macros are used. "
40-
"You probably want --features serde_macros --no-default-features.")
39+
panic!("Neither serde_codegen nor serde_derive are used. "
40+
"You probably want --features serde_derive --no-default-features.")
4141
}
4242
}
4343

webrender_traits/src/lib.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
44

55
#![cfg_attr(feature = "nightly", feature(nonzero))]
6-
#![cfg_attr(feature = "serde_macros", feature(custom_derive, plugin))]
7-
#![cfg_attr(feature = "serde_macros", plugin(serde_macros))]
6+
#![cfg_attr(feature = "serde_derive", feature(rustc_attrs, rustc_macro, structural_match))]
87

98
extern crate app_units;
109
extern crate byteorder;
@@ -16,13 +15,16 @@ extern crate heapsize;
1615
extern crate ipc_channel;
1716
extern crate offscreen_gl_context;
1817
extern crate serde;
18+
#[cfg(feature = "serde_derive")]
19+
#[macro_use]
20+
extern crate serde_derive;
1921

2022
#[cfg(target_os = "macos")] extern crate core_graphics;
2123

2224
#[cfg(feature = "serde_codegen")]
2325
include!(concat!(env!("OUT_DIR"), "/types.rs"));
2426

25-
#[cfg(feature = "serde_macros")]
27+
#[cfg(feature = "serde_derive")]
2628
include!("types.rs");
2729

2830
mod api;

0 commit comments

Comments
 (0)