diff options
Diffstat (limited to 'components')
-rw-r--r-- | components/servo_arc/Cargo.toml | 17 | ||||
-rw-r--r-- | components/servo_arc/lib.rs (renamed from components/style/stylearc.rs) | 4 | ||||
-rw-r--r-- | components/style/Cargo.toml | 1 | ||||
-rw-r--r-- | components/style/lib.rs | 7 |
4 files changed, 26 insertions, 3 deletions
diff --git a/components/servo_arc/Cargo.toml b/components/servo_arc/Cargo.toml new file mode 100644 index 00000000000..578b845da53 --- /dev/null +++ b/components/servo_arc/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "servo_arc" +version = "0.0.1" +authors = ["The Servo Project Developers"] +license = "MPL-2.0" +publish = false + +[lib] +name = "servo_arc" +path = "lib.rs" + +[features] +servo = ["serde", "heapsize"] + +[dependencies] +heapsize = {version = "0.4.0", optional = true} +serde = {version = "0.9", optional = true} diff --git a/components/style/stylearc.rs b/components/servo_arc/lib.rs index 9b355e7d211..8f7573cbf73 100644 --- a/components/style/stylearc.rs +++ b/components/servo_arc/lib.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -//! Fork of Arc for the style system. This has the following advantages over std::Arc: +//! Fork of Arc for Servo. This has the following advantages over std::Arc: //! * We don't waste storage on the weak reference count. //! * We don't do extra RMU operations to handle the possibility of weak references. //! * We can experiment with arena allocation (todo). @@ -20,6 +20,8 @@ // duplicate those here. #![allow(missing_docs)] +#[cfg(feature = "servo")] extern crate serde; + #[cfg(feature = "servo")] use heapsize::HeapSizeOf; #[cfg(feature = "servo")] diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index 4b33f660a68..a8751e1646b 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -61,6 +61,7 @@ rayon = "0.7.1" selectors = { path = "../selectors" } serde = {version = "0.9", optional = true} serde_derive = {version = "0.9", optional = true} +servo_arc = { path = "../servo_arc" } servo_atoms = {path = "../atoms", optional = true} servo_config = {path = "../config", optional = true} smallvec = "0.4" diff --git a/components/style/lib.rs b/components/style/lib.rs index 4856610b9ed..0cde26b37f0 100644 --- a/components/style/lib.rs +++ b/components/style/lib.rs @@ -72,8 +72,8 @@ extern crate pdqsort; #[cfg(feature = "gecko")] extern crate precomputed_hash; extern crate rayon; extern crate selectors; -#[cfg(feature = "servo")] extern crate serde; #[cfg(feature = "servo")] #[macro_use] extern crate serde_derive; +pub extern crate servo_arc; #[cfg(feature = "servo")] #[macro_use] extern crate servo_atoms; #[cfg(feature = "servo")] extern crate servo_config; #[cfg(feature = "servo")] extern crate servo_url; @@ -129,7 +129,6 @@ pub mod sequential; pub mod sink; pub mod str; pub mod style_adjuster; -pub mod stylearc; pub mod stylesheet_set; pub mod stylesheets; pub mod thread_state; @@ -139,6 +138,10 @@ pub mod traversal; #[allow(non_camel_case_types)] pub mod values; +// Compat shim for the old name when it lived in the style crate. +// FIXME(bholley) Remove this. +pub use servo_arc as stylearc; + use std::fmt; use style_traits::ToCss; |