From f4d3af296c05260dfbb3deea4f8fa400cb6887d3 Mon Sep 17 00:00:00 2001 From: Martin Robinson Date: Thu, 5 Oct 2023 19:47:39 +0200 Subject: [PATCH] Move `*_traits` and other shared types to `shared` This is the start of the organization of types that are in their own crates in order to break dependency cycles between other crates. The idea here is that putting these packages into their own directory is the first step toward cleaning them up. They have grown organically and it is difficult to explain to new folks where to put new shared types. Many of these crates contain more than traits or don't contain traits at all. Notably, `script_traits` isn't touched because it is vendored from Gecko. Eventually this will move to `third_party`. --- Cargo.toml | 14 +++++++ components/background_hang_monitor/Cargo.toml | 2 +- components/bluetooth/Cargo.toml | 4 +- components/canvas/Cargo.toml | 6 +-- components/compositing/Cargo.toml | 16 ++++---- components/config/Cargo.toml | 2 +- components/constellation/Cargo.toml | 26 ++++++------- components/devtools/Cargo.toml | 6 +-- components/gfx/Cargo.toml | 4 +- components/layout/Cargo.toml | 18 ++++----- components/layout_2020/Cargo.toml | 16 ++++---- components/layout_thread/Cargo.toml | 18 ++++----- components/layout_thread_2020/Cargo.toml | 18 ++++----- components/media/Cargo.toml | 2 +- components/metrics/Cargo.toml | 8 ++-- components/net/Cargo.toml | 10 ++--- components/profile/Cargo.toml | 2 +- components/script/Cargo.toml | 22 +++++------ components/script_layout_interface/Cargo.toml | 39 ------------------- components/servo/Cargo.toml | 26 ++++++------- .../bluetooth}/Cargo.toml | 2 +- .../bluetooth}/blocklist.rs | 0 .../bluetooth}/lib.rs | 0 .../bluetooth}/scanfilter.rs | 0 .../canvas}/Cargo.toml | 8 ++-- .../canvas}/canvas.rs | 0 .../{canvas_traits => shared/canvas}/lib.rs | 0 .../{canvas_traits => shared/canvas}/webgl.rs | 0 .../canvas}/webgl_channel/ipc.rs | 0 .../canvas}/webgl_channel/mod.rs | 0 .../canvas}/webgl_channel/mpsc.rs | 0 .../compositing}/Cargo.toml | 20 +++++----- .../compositing}/constellation_msg.rs | 0 .../compositing}/lib.rs | 0 .../devtools}/Cargo.toml | 6 +-- .../devtools}/lib.rs | 0 .../embedder}/Cargo.toml | 4 +- .../embedder}/build.rs | 0 .../embedder}/lib.rs | 0 .../embedder}/resources.rs | 32 ++++++++------- .../{gfx_traits => shared/gfx}/Cargo.toml | 4 +- components/{gfx_traits => shared/gfx}/lib.rs | 0 .../{gfx_traits => shared/gfx}/print_tree.rs | 0 .../layout}/Cargo.toml | 14 +++---- .../{layout_traits => shared/layout}/lib.rs | 0 components/{ => shared}/msg/Cargo.toml | 4 +- .../{ => shared}/msg/constellation_msg.rs | 0 components/{ => shared}/msg/lib.rs | 0 .../{net_traits => shared/net}/Cargo.toml | 14 +++---- .../net}/blob_url_store.rs | 0 .../net}/fetch/headers.rs | 0 .../net}/filemanager_thread.rs | 0 .../{net_traits => shared/net}/image/base.rs | 0 .../{net_traits => shared/net}/image_cache.rs | 0 components/{net_traits => shared/net}/lib.rs | 0 .../{net_traits => shared/net}/pub_domains.rs | 0 .../{net_traits => shared/net}/quality.rs | 0 .../{net_traits => shared/net}/request.rs | 0 .../{net_traits => shared/net}/response.rs | 0 .../net}/storage_thread.rs | 0 .../{net_traits => shared/net}/tests/image.rs | 0 .../{net_traits => shared/net}/tests/lib.rs | 0 .../net}/tests/pub_domains.rs | 0 .../net}/tests/whitespace.rs | 0 .../profile}/Cargo.toml | 2 +- .../{profile_traits => shared/profile}/ipc.rs | 0 .../{profile_traits => shared/profile}/lib.rs | 0 .../{profile_traits => shared/profile}/mem.rs | 0 .../profile}/time.rs | 0 .../script}/Cargo.toml | 30 +++++++------- .../script}/compositor.rs | 0 .../{script_traits => shared/script}/lib.rs | 0 .../script}/script_msg.rs | 0 .../script}/serializable.rs | 0 .../script}/tests/compositor.rs | 0 .../script}/transferable.rs | 0 .../script}/webdriver_msg.rs | 0 components/shared/script_layout/Cargo.toml | 39 +++++++++++++++++++ .../script_layout}/lib.rs | 0 .../script_layout}/message.rs | 0 .../script_layout}/rpc.rs | 0 .../script_layout}/wrapper_traits.rs | 0 .../webrender}/Cargo.toml | 0 .../webrender}/lib.rs | 0 components/style/Cargo.toml | 2 +- components/webdriver_server/Cargo.toml | 10 ++--- components/webgpu/Cargo.toml | 4 +- tests/unit/metrics/Cargo.toml | 10 ++--- tests/unit/profile/Cargo.toml | 6 +-- 89 files changed, 244 insertions(+), 226 deletions(-) delete mode 100644 components/script_layout_interface/Cargo.toml rename components/{bluetooth_traits => shared/bluetooth}/Cargo.toml (86%) rename components/{bluetooth_traits => shared/bluetooth}/blocklist.rs (100%) rename components/{bluetooth_traits => shared/bluetooth}/lib.rs (100%) rename components/{bluetooth_traits => shared/bluetooth}/scanfilter.rs (100%) rename components/{canvas_traits => shared/canvas}/Cargo.toml (82%) rename components/{canvas_traits => shared/canvas}/canvas.rs (100%) rename components/{canvas_traits => shared/canvas}/lib.rs (100%) rename components/{canvas_traits => shared/canvas}/webgl.rs (100%) rename components/{canvas_traits => shared/canvas}/webgl_channel/ipc.rs (100%) rename components/{canvas_traits => shared/canvas}/webgl_channel/mod.rs (100%) rename components/{canvas_traits => shared/canvas}/webgl_channel/mpsc.rs (100%) rename components/{compositing_traits => shared/compositing}/Cargo.toml (50%) rename components/{compositing_traits => shared/compositing}/constellation_msg.rs (100%) rename components/{compositing_traits => shared/compositing}/lib.rs (100%) rename components/{devtools_traits => shared/devtools}/Cargo.toml (81%) rename components/{devtools_traits => shared/devtools}/lib.rs (100%) rename components/{embedder_traits => shared/embedder}/Cargo.toml (90%) rename components/{embedder_traits => shared/embedder}/build.rs (100%) rename components/{embedder_traits => shared/embedder}/lib.rs (100%) rename components/{embedder_traits => shared/embedder}/resources.rs (80%) rename components/{gfx_traits => shared/gfx}/Cargo.toml (78%) rename components/{gfx_traits => shared/gfx}/lib.rs (100%) rename components/{gfx_traits => shared/gfx}/print_tree.rs (100%) rename components/{layout_traits => shared/layout}/Cargo.toml (56%) rename components/{layout_traits => shared/layout}/lib.rs (100%) rename components/{ => shared}/msg/Cargo.toml (81%) rename components/{ => shared}/msg/constellation_msg.rs (100%) rename components/{ => shared}/msg/lib.rs (100%) rename components/{net_traits => shared/net}/Cargo.toml (77%) rename components/{net_traits => shared/net}/blob_url_store.rs (100%) rename components/{net_traits => shared/net}/fetch/headers.rs (100%) rename components/{net_traits => shared/net}/filemanager_thread.rs (100%) rename components/{net_traits => shared/net}/image/base.rs (100%) rename components/{net_traits => shared/net}/image_cache.rs (100%) rename components/{net_traits => shared/net}/lib.rs (100%) rename components/{net_traits => shared/net}/pub_domains.rs (100%) rename components/{net_traits => shared/net}/quality.rs (100%) rename components/{net_traits => shared/net}/request.rs (100%) rename components/{net_traits => shared/net}/response.rs (100%) rename components/{net_traits => shared/net}/storage_thread.rs (100%) rename components/{net_traits => shared/net}/tests/image.rs (100%) rename components/{net_traits => shared/net}/tests/lib.rs (100%) rename components/{net_traits => shared/net}/tests/pub_domains.rs (100%) rename components/{net_traits => shared/net}/tests/whitespace.rs (100%) rename components/{profile_traits => shared/profile}/Cargo.toml (91%) rename components/{profile_traits => shared/profile}/ipc.rs (100%) rename components/{profile_traits => shared/profile}/lib.rs (100%) rename components/{profile_traits => shared/profile}/mem.rs (100%) rename components/{profile_traits => shared/profile}/time.rs (100%) rename components/{script_traits => shared/script}/Cargo.toml (58%) rename components/{script_traits => shared/script}/compositor.rs (100%) rename components/{script_traits => shared/script}/lib.rs (100%) rename components/{script_traits => shared/script}/script_msg.rs (100%) rename components/{script_traits => shared/script}/serializable.rs (100%) rename components/{script_traits => shared/script}/tests/compositor.rs (100%) rename components/{script_traits => shared/script}/transferable.rs (100%) rename components/{script_traits => shared/script}/webdriver_msg.rs (100%) create mode 100644 components/shared/script_layout/Cargo.toml rename components/{script_layout_interface => shared/script_layout}/lib.rs (100%) rename components/{script_layout_interface => shared/script_layout}/message.rs (100%) rename components/{script_layout_interface => shared/script_layout}/rpc.rs (100%) rename components/{script_layout_interface => shared/script_layout}/wrapper_traits.rs (100%) rename components/{webrender_traits => shared/webrender}/Cargo.toml (100%) rename components/{webrender_traits => shared/webrender}/lib.rs (100%) diff --git a/Cargo.toml b/Cargo.toml index 0af1ef5b3cc..f8225b55d3b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,20 +19,26 @@ atomic_refcell = "0.1.13" backtrace = "0.3" base64 = "0.21.5" bitflags = "2.4" +bluetooth_traits = { path = "components/shared/bluetooth" } byteorder = "1.5" +canvas_traits = { path = "components/shared/canvas" } cfg-if = "1.0.0" +compositing_traits = { path = "components/shared/compositing" } content-security-policy = { version = "0.5", features = ["serde"] } cookie = "0.12" crossbeam-channel = "0.5" cssparser = "0.29" darling = { version = "0.13", default-features = false } data-url = "0.1.0" +devtools_traits = { path = "components/shared/devtools" } +embedder_traits = { path = "components/shared/embedder" } encoding_rs = "0.8" env_logger = "0.8" euclid = "0.22" fnv = "1.0" fxhash = "0.2" getopts = "0.2.11" +gfx_traits = { path = "components/shared/gfx" } gleam = "0.15" headers = "0.3" html5ever = "0.26" @@ -46,6 +52,7 @@ indexmap = { version = "1.0.2", features = ["std"] } ipc-channel = "0.18" itertools = "0.10" keyboard-types = "0.6" +layout_traits = { path = "components/shared/layout" } lazy_static = "1.4" libc = "0.2" log = "0.4" @@ -53,10 +60,13 @@ malloc_size_of_derive = "0.1" mime = "0.3.13" mime_guess = "2.0.3" mozangle = "0.4" +msg = { path = "components/shared/msg" } +net_traits = { path = "components/shared/net" } num-traits = "0.2" parking_lot = "0.12" percent-encoding = "2.0" proc-macro2 = "1" +profile_traits = { path = "components/shared/profile" } quote = "1" rand = "0.8" rand_core = "0.6" @@ -65,6 +75,8 @@ rayon = "1" regex = "1.10" rustls = { version = "0.21.7", features = ["dangerous_configuration"] } rustls-pemfile = "1.0.3" +script_layout_interface = { path = "components/shared/script_layout" } +script_traits = { path = "components/shared/script" } serde = "1.0.190" serde_bytes = "0.11" serde_json = "1.0" @@ -73,6 +85,7 @@ smallvec = "1.11" sparkle = "0.1.26" string_cache = "0.8" string_cache_codegen = "0.5" +style_traits = { path = "components/style_traits", features = ["servo"] } # NOTE: the sm-angle feature only enables ANGLE on Windows, not other platforms! surfman = { version = "0.8", features = ["chains", "sm-angle", "sm-angle-default"] } syn = { version = "2", default-features = false, features = ["clone-impls", "derive", "parsing"] } @@ -90,6 +103,7 @@ webpki = "0.22" webpki-roots = "0.25" webrender = { git = "https://github.com/servo/webrender", features = ["capture"] } webrender_api = { git = "https://github.com/servo/webrender" } +webrender_traits = { path = "components/shared/webrender" } winapi = "0.3" xi-unicode = "0.1.0" xml5ever = "0.17" diff --git a/components/background_hang_monitor/Cargo.toml b/components/background_hang_monitor/Cargo.toml index ac2e7caacd2..32cfbf93227 100644 --- a/components/background_hang_monitor/Cargo.toml +++ b/components/background_hang_monitor/Cargo.toml @@ -18,7 +18,7 @@ crossbeam-channel = { workspace = true } ipc-channel = { workspace = true } libc = { workspace = true } log = { workspace = true } -msg = { path = "../msg" } +msg = { workspace = true } serde_json = { workspace = true } [dev-dependencies] diff --git a/components/bluetooth/Cargo.toml b/components/bluetooth/Cargo.toml index 93ed7d6e151..fa2a6feb742 100644 --- a/components/bluetooth/Cargo.toml +++ b/components/bluetooth/Cargo.toml @@ -12,9 +12,9 @@ path = "lib.rs" [dependencies] bitflags = { workspace = true } -bluetooth_traits = { path = "../bluetooth_traits" } +bluetooth_traits = { workspace = true } device = { git = "https://github.com/servo/devices", features = ["bluetooth-test"], rev = "cb28c4725ffbfece99dab842d17d3e8c50774778" } -embedder_traits = { path = "../embedder_traits" } +embedder_traits = { workspace = true } ipc-channel = { workspace = true } log = { workspace = true } servo_config = { path = "../config" } diff --git a/components/canvas/Cargo.toml b/components/canvas/Cargo.toml index d2e727dc042..3838af2e1d6 100644 --- a/components/canvas/Cargo.toml +++ b/components/canvas/Cargo.toml @@ -18,7 +18,7 @@ xr-profile = ["webxr-api/profile", "time"] [dependencies] bitflags = { workspace = true } byteorder = { workspace = true } -canvas_traits = { path = "../canvas_traits" } +canvas_traits = { workspace = true } crossbeam-channel = { workspace = true } cssparser = { workspace = true } euclid = { workspace = true } @@ -38,12 +38,12 @@ servo_arc = { path = "../servo_arc" } servo_config = { path = "../config" } sparkle = { workspace = true } style = { path = "../style" } -style_traits = { path = "../style_traits" } +style_traits = { workspace = true } surfman = { workspace = true } time = { workspace = true, optional = true } webrender = { workspace = true } webrender_api = { workspace = true } webrender_surfman = { path = "../webrender_surfman" } -webrender_traits = { path = "../webrender_traits" } +webrender_traits = { workspace = true } webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] } webxr = { git = "https://github.com/servo/webxr", features = ["ipc"] } diff --git a/components/compositing/Cargo.toml b/components/compositing/Cargo.toml index b2fa4608669..8f8130ccc00 100644 --- a/components/compositing/Cargo.toml +++ b/components/compositing/Cargo.toml @@ -17,29 +17,29 @@ gl = ["gleam", "pixels"] [dependencies] canvas = { path = "../canvas" } -compositing_traits = { path = "../compositing_traits" } +compositing_traits = { workspace = true } crossbeam-channel = { workspace = true } -embedder_traits = { path = "../embedder_traits" } +embedder_traits = { workspace = true } euclid = { workspace = true } fnv = { workspace = true } -gfx_traits = { path = "../gfx_traits" } +gfx_traits = { workspace = true } gleam = { workspace = true, optional = true } image = { workspace = true } ipc-channel = { workspace = true } keyboard-types = { workspace = true } libc = { workspace = true } log = { workspace = true } -msg = { path = "../msg" } -net_traits = { path = "../net_traits" } +msg = { workspace = true } +net_traits = { workspace = true } num-traits = { workspace = true } pixels = { path = "../pixels", optional = true } -profile_traits = { path = "../profile_traits" } -script_traits = { path = "../script_traits" } +profile_traits = { workspace = true } +script_traits = { workspace = true } servo_config = { path = "../config" } servo-media = { git = "https://github.com/servo/media" } servo_geometry = { path = "../geometry" } servo_url = { path = "../url" } -style_traits = { path = "../style_traits" } +style_traits = { workspace = true } time = { workspace = true } webrender = { workspace = true } webrender_api = { workspace = true } diff --git a/components/config/Cargo.toml b/components/config/Cargo.toml index 7671b55810c..c18b865b7d3 100644 --- a/components/config/Cargo.toml +++ b/components/config/Cargo.toml @@ -11,7 +11,7 @@ name = "servo_config" path = "lib.rs" [dependencies] -embedder_traits = { path = "../embedder_traits" } +embedder_traits = { workspace = true } euclid = { workspace = true } getopts = { workspace = true } lazy_static = { workspace = true } diff --git a/components/constellation/Cargo.toml b/components/constellation/Cargo.toml index 6d880a03c60..ebb2030336d 100644 --- a/components/constellation/Cargo.toml +++ b/components/constellation/Cargo.toml @@ -13,38 +13,38 @@ path = "lib.rs" [dependencies] background_hang_monitor = { path = "../background_hang_monitor" } backtrace = { workspace = true } -bluetooth_traits = { path = "../bluetooth_traits" } -canvas_traits = { path = "../canvas_traits" } -compositing_traits = { path = "../compositing_traits" } +bluetooth_traits = { workspace = true } +canvas_traits = { workspace = true } +compositing_traits = { workspace = true } crossbeam-channel = { workspace = true } -devtools_traits = { path = "../devtools_traits" } -embedder_traits = { path = "../embedder_traits" } +devtools_traits = { workspace = true } +embedder_traits = { workspace = true } euclid = { workspace = true } gfx = { path = "../gfx" } -gfx_traits = { path = "../gfx_traits" } +gfx_traits = { workspace = true } http = { workspace = true } headers = { workspace = true } ipc-channel = { workspace = true } keyboard-types = { workspace = true } -layout_traits = { path = "../layout_traits" } +layout_traits = { workspace = true } log = { workspace = true } media = { path = "../media" } metrics = { path = "../metrics" } -msg = { path = "../msg" } +msg = { workspace = true } net = { path = "../net" } -net_traits = { path = "../net_traits" } -profile_traits = { path = "../profile_traits" } -script_traits = { path = "../script_traits" } +net_traits = { workspace = true } +profile_traits = { workspace = true } +script_traits = { workspace = true } serde = { workspace = true } servo_config = { path = "../config" } servo_rand = { path = "../rand" } servo_remutex = { path = "../remutex" } servo_url = { path = "../url" } -style_traits = { path = "../style_traits" } +style_traits = { workspace = true } webgpu = { path = "../webgpu" } webrender = { workspace = true } webrender_api = { workspace = true } -webrender_traits = { path = "../webrender_traits" } +webrender_traits = { workspace = true } webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] } [target.'cfg(any(target_os="macos", all(not(target_os = "windows"), not(target_os = "ios"), not(target_os="android"), not(target_arch="arm"), not(target_arch="aarch64"))))'.dependencies] diff --git a/components/devtools/Cargo.toml b/components/devtools/Cargo.toml index d461147ec2f..413fc560c1b 100644 --- a/components/devtools/Cargo.toml +++ b/components/devtools/Cargo.toml @@ -12,13 +12,13 @@ path = "lib.rs" [dependencies] crossbeam-channel = { workspace = true } -devtools_traits = { path = "../devtools_traits" } -embedder_traits = { path = "../embedder_traits" } +devtools_traits = { workspace = true } +embedder_traits = { workspace = true } headers = { workspace = true } http = { workspace = true } ipc-channel = { workspace = true } log = { workspace = true } -msg = { path = "../msg" } +msg = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } servo_config = { path = "../config" } diff --git a/components/gfx/Cargo.toml b/components/gfx/Cargo.toml index 924d39902ff..3d9db55ec8a 100644 --- a/components/gfx/Cargo.toml +++ b/components/gfx/Cargo.toml @@ -19,14 +19,14 @@ bitflags = { workspace = true } euclid = { workspace = true } fnv = { workspace = true } fontsan = { git = "https://github.com/servo/fontsan" } -gfx_traits = { path = "../gfx_traits" } +gfx_traits = { workspace = true } harfbuzz-sys = "0.5" ipc-channel = { workspace = true } lazy_static = { workspace = true } libc = { workspace = true } log = { workspace = true } malloc_size_of = { path = "../malloc_size_of" } -net_traits = { path = "../net_traits" } +net_traits = { workspace = true } range = { path = "../range" } serde = { workspace = true } servo_arc = { path = "../servo_arc" } diff --git a/components/layout/Cargo.toml b/components/layout/Cargo.toml index 6065abdf95e..7cc0871631b 100644 --- a/components/layout/Cargo.toml +++ b/components/layout/Cargo.toml @@ -16,27 +16,27 @@ doctest = false app_units = { workspace = true } atomic_refcell = { workspace = true } bitflags = { workspace = true } -canvas_traits = { path = "../canvas_traits" } -embedder_traits = { path = "../embedder_traits" } +canvas_traits = { workspace = true } +embedder_traits = { workspace = true } euclid = { workspace = true } fnv = { workspace = true } gfx = { path = "../gfx" } -gfx_traits = { path = "../gfx_traits" } +gfx_traits = { workspace = true } html5ever = { workspace = true } ipc-channel = { workspace = true } lazy_static = { workspace = true } libc = { workspace = true } log = { workspace = true } malloc_size_of = { path = "../malloc_size_of" } -msg = { path = "../msg" } -net_traits = { path = "../net_traits" } +msg = { workspace = true } +net_traits = { workspace = true } num-traits = { workspace = true } parking_lot = { workspace = true } -profile_traits = { path = "../profile_traits" } +profile_traits = { workspace = true } range = { path = "../range" } rayon = { workspace = true } -script_layout_interface = { path = "../script_layout_interface" } -script_traits = { path = "../script_traits" } +script_layout_interface = { workspace = true } +script_traits = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } servo_arc = { path = "../servo_arc" } @@ -47,7 +47,7 @@ servo_url = { path = "../url" } size_of_test = { path = "../size_of_test" } smallvec = { workspace = true, features = ["union"] } style = { path = "../style", features = ["servo"] } -style_traits = { path = "../style_traits" } +style_traits = { workspace = true } unicode-bidi = { workspace = true, features = ["with_serde"] } unicode-script = { workspace = true } webrender_api = { workspace = true } diff --git a/components/layout_2020/Cargo.toml b/components/layout_2020/Cargo.toml index 31f7214be25..d95a069d8d4 100644 --- a/components/layout_2020/Cargo.toml +++ b/components/layout_2020/Cargo.toml @@ -15,33 +15,33 @@ doctest = false [dependencies] app_units = { workspace = true } atomic_refcell = { workspace = true } -canvas_traits = { path = "../canvas_traits" } +canvas_traits = { workspace = true } bitflags = { workspace = true } cssparser = { workspace = true } -embedder_traits = { path = "../embedder_traits" } +embedder_traits = { workspace = true } euclid = { workspace = true } fnv = { workspace = true } fxhash = { workspace = true } gfx = { path = "../gfx" } -gfx_traits = { path = "../gfx_traits" } +gfx_traits = { workspace = true } html5ever = { workspace = true } ipc-channel = { workspace = true } libc = { workspace = true } log = { workspace = true } -msg = { path = "../msg" } -net_traits = { path = "../net_traits" } +msg = { workspace = true } +net_traits = { workspace = true } parking_lot = { workspace = true } range = { path = "../range" } rayon = { workspace = true } -script_layout_interface = { path = "../script_layout_interface" } -script_traits = { path = "../script_traits" } +script_layout_interface = { workspace = true } +script_traits = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } servo_arc = { path = "../servo_arc" } servo_config = { path = "../config" } servo_url = { path = "../url" } style = { path = "../style", features = ["servo"] } -style_traits = { path = "../style_traits" } +style_traits = { workspace = true } unicode-script = { workspace = true } webrender_api = { workspace = true } xi-unicode = { workspace = true } diff --git a/components/layout_thread/Cargo.toml b/components/layout_thread/Cargo.toml index 459e871c4a2..4073ea2ce41 100644 --- a/components/layout_thread/Cargo.toml +++ b/components/layout_thread/Cargo.toml @@ -14,31 +14,31 @@ path = "lib.rs" app_units = { workspace = true } atomic_refcell = { workspace = true } crossbeam-channel = { workspace = true } -embedder_traits = { path = "../embedder_traits" } +embedder_traits = { workspace = true } euclid = { workspace = true } fnv = { workspace = true } fxhash = { workspace = true } gfx = { path = "../gfx" } -gfx_traits = { path = "../gfx_traits" } +gfx_traits = { workspace = true } histogram = "0.6.8" html5ever = { workspace = true } ipc-channel = { workspace = true } layout = { path = "../layout", package = "layout_2013" } -layout_traits = { path = "../layout_traits" } +layout_traits = { workspace = true } lazy_static = { workspace = true } libc = { workspace = true } log = { workspace = true } malloc_size_of = { path = "../malloc_size_of" } metrics = { path = "../metrics" } -msg = { path = "../msg" } -net_traits = { path = "../net_traits" } +msg = { workspace = true } +net_traits = { workspace = true } parking_lot = { workspace = true } -profile_traits = { path = "../profile_traits" } +profile_traits = { workspace = true } range = { path = "../range" } rayon = { workspace = true } script = { path = "../script" } -script_layout_interface = { path = "../script_layout_interface" } -script_traits = { path = "../script_traits" } +script_layout_interface = { workspace = true } +script_traits = { workspace = true } selectors = { path = "../selectors", features = ["shmem"] } serde_json = { workspace = true } servo_allocator = { path = "../allocator" } @@ -47,6 +47,6 @@ servo_atoms = { path = "../atoms" } servo_config = { path = "../config" } servo_url = { path = "../url" } style = { path = "../style" } -style_traits = { path = "../style_traits" } +style_traits = { workspace = true } time = { workspace = true } webrender_api = { workspace = true } diff --git a/components/layout_thread_2020/Cargo.toml b/components/layout_thread_2020/Cargo.toml index b437b0dbbff..29ffe6d2739 100644 --- a/components/layout_thread_2020/Cargo.toml +++ b/components/layout_thread_2020/Cargo.toml @@ -14,29 +14,29 @@ path = "lib.rs" app_units = { workspace = true } atomic_refcell = { workspace = true } crossbeam-channel = { workspace = true } -embedder_traits = { path = "../embedder_traits" } +embedder_traits = { workspace = true } euclid = { workspace = true } fnv = { workspace = true } fxhash = { workspace = true } gfx = { path = "../gfx" } -gfx_traits = { path = "../gfx_traits" } +gfx_traits = { workspace = true } html5ever = { workspace = true } ipc-channel = { workspace = true } layout = { path = "../layout_2020", package = "layout_2020" } -layout_traits = { path = "../layout_traits" } +layout_traits = { workspace = true } lazy_static = { workspace = true } libc = { workspace = true } log = { workspace = true } malloc_size_of = { path = "../malloc_size_of" } metrics = { path = "../metrics" } -msg = { path = "../msg" } -net_traits = { path = "../net_traits" } +msg = { workspace = true } +net_traits = { workspace = true } parking_lot = { workspace = true } -profile_traits = { path = "../profile_traits" } +profile_traits = { workspace = true } range = { path = "../range" } script = { path = "../script" } -script_layout_interface = { path = "../script_layout_interface" } -script_traits = { path = "../script_traits" } +script_layout_interface = { workspace = true } +script_traits = { workspace = true } selectors = { path = "../selectors", features = ["shmem"] } servo_allocator = { path = "../allocator" } servo_arc = { path = "../servo_arc" } @@ -44,5 +44,5 @@ servo_atoms = { path = "../atoms" } servo_config = { path = "../config" } servo_url = { path = "../url" } style = { path = "../style" } -style_traits = { path = "../style_traits" } +style_traits = { workspace = true } webrender_api = { workspace = true } diff --git a/components/media/Cargo.toml b/components/media/Cargo.toml index e667638e1ba..a63c108fcac 100644 --- a/components/media/Cargo.toml +++ b/components/media/Cargo.toml @@ -20,4 +20,4 @@ serde = { workspace = true } servo-media = { git = "https://github.com/servo/media" } servo_config = { path = "../config" } webrender_api = { workspace = true } -webrender_traits = { path = "../webrender_traits" } +webrender_traits = { workspace = true } diff --git a/components/metrics/Cargo.toml b/components/metrics/Cargo.toml index 88eeaf0355e..1b5dc9330c5 100644 --- a/components/metrics/Cargo.toml +++ b/components/metrics/Cargo.toml @@ -11,14 +11,14 @@ name = "metrics" path = "lib.rs" [dependencies] -gfx_traits = { path = "../gfx_traits" } +gfx_traits = { workspace = true } ipc-channel = { workspace = true } log = { workspace = true } malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = { workspace = true } -msg = { path = "../msg" } -profile_traits = { path = "../profile_traits" } -script_traits = { path = "../script_traits" } +msg = { workspace = true } +profile_traits = { workspace = true } +script_traits = { workspace = true } servo_config = { path = "../config" } servo_url = { path = "../url" } time = { workspace = true } diff --git a/components/net/Cargo.toml b/components/net/Cargo.toml index 928cddb4bb9..6db18281a86 100644 --- a/components/net/Cargo.toml +++ b/components/net/Cargo.toml @@ -23,8 +23,8 @@ content-security-policy = { workspace = true } cookie_rs = { package = "cookie", version = "0.12" } crossbeam-channel = { workspace = true } data-url = { workspace = true } -devtools_traits = { path = "../devtools_traits" } -embedder_traits = { path = "../embedder_traits" } +devtools_traits = { workspace = true } +embedder_traits = { workspace = true } flate2 = "1" futures = { version = "0.3", package = "futures" } futures-util = { version = "0.3" } @@ -43,11 +43,11 @@ malloc_size_of = { path = "../malloc_size_of" } malloc_size_of_derive = { workspace = true } mime = { workspace = true } mime_guess = { workspace = true } -msg = { path = "../msg" } -net_traits = { path = "../net_traits" } +msg = { workspace = true } +net_traits = { workspace = true } percent-encoding = { workspace = true } pixels = { path = "../pixels" } -profile_traits = { path = "../profile_traits" } +profile_traits = { workspace = true } rayon = { workspace = true } rustls = { workspace = true } rustls-pemfile = { workspace = true } diff --git a/components/profile/Cargo.toml b/components/profile/Cargo.toml index 0e20ea2b1a4..33d8500e53c 100644 --- a/components/profile/Cargo.toml +++ b/components/profile/Cargo.toml @@ -12,7 +12,7 @@ path = "lib.rs" [dependencies] ipc-channel = { workspace = true } -profile_traits = { path = "../profile_traits" } +profile_traits = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } servo_config = { path = "../config" } diff --git a/components/script/Cargo.toml b/components/script/Cargo.toml index f26c7442bd7..41527bf18c6 100644 --- a/components/script/Cargo.toml +++ b/components/script/Cargo.toml @@ -37,8 +37,8 @@ atomic_refcell = { workspace = true } backtrace = { workspace = true } base64 = { workspace = true } bitflags = { workspace = true } -bluetooth_traits = { path = "../bluetooth_traits" } -canvas_traits = { path = "../canvas_traits" } +bluetooth_traits = { workspace = true } +canvas_traits = { workspace = true } chrono = "0.4" content-security-policy = { workspace = true } cookie = { workspace = true } @@ -46,16 +46,16 @@ crossbeam-channel = { workspace = true } cssparser = { workspace = true } data-url = { workspace = true } deny_public_fields = { path = "../deny_public_fields" } -devtools_traits = { path = "../devtools_traits" } +devtools_traits = { workspace = true } dom_struct = { path = "../dom_struct" } domobject_derive = { path = "../domobject_derive" } -embedder_traits = { path = "../embedder_traits" } +embedder_traits = { workspace = true } encoding_rs = { workspace = true } enum-iterator = "0.3" euclid = { workspace = true } fnv = { workspace = true } fxhash = { workspace = true } -gfx_traits = { path = "../gfx_traits" } +gfx_traits = { workspace = true } headers = { workspace = true } html5ever = { workspace = true } http = { workspace = true } @@ -76,20 +76,20 @@ media = { path = "../media" } metrics = { path = "../metrics" } mime = { workspace = true } mime_guess = { workspace = true } -msg = { path = "../msg" } -net_traits = { path = "../net_traits" } +msg = { workspace = true } +net_traits = { workspace = true } num-traits = { workspace = true } parking_lot = { workspace = true } percent-encoding = { workspace = true } phf = "0.10" pixels = { path = "../pixels" } -profile_traits = { path = "../profile_traits" } +profile_traits = { workspace = true } range = { path = "../range" } ref_filter_map = "1.0.1" regex = { workspace = true } -script_layout_interface = { path = "../script_layout_interface" } +script_layout_interface = { workspace = true } script_plugins = { path = "../script_plugins" } -script_traits = { path = "../script_traits" } +script_traits = { workspace = true } selectors = { path = "../selectors", features = ["shmem"] } serde = { workspace = true, features = ["derive"] } serde_bytes = { workspace = true } @@ -104,7 +104,7 @@ servo_url = { path = "../url" } smallvec = { workspace = true, features = ["union"] } sparkle = { workspace = true } style = { path = "../style", features = ["servo"] } -style_traits = { path = "../style_traits" } +style_traits = { workspace = true } swapper = "0.1" tempfile = "3" tendril = { version = "0.4.1", features = ["encoding_rs"] } diff --git a/components/script_layout_interface/Cargo.toml b/components/script_layout_interface/Cargo.toml deleted file mode 100644 index 6a123c766e9..00000000000 --- a/components/script_layout_interface/Cargo.toml +++ /dev/null @@ -1,39 +0,0 @@ -[package] -name = "script_layout_interface" -version = "0.0.1" -authors = ["The Servo Project Developers"] -license = "MPL-2.0" -edition = "2018" -publish = false - -[lib] -name = "script_layout_interface" -path = "lib.rs" - -[dependencies] -app_units = { workspace = true } -atomic_refcell = { workspace = true } -canvas_traits = { path = "../canvas_traits" } -crossbeam-channel = { workspace = true } -euclid = { workspace = true } -fxhash = { workspace = true } -gfx_traits = { path = "../gfx_traits" } -html5ever = { workspace = true } -ipc-channel = { workspace = true } -libc = { workspace = true } -malloc_size_of = { path = "../malloc_size_of" } -malloc_size_of_derive = { workspace = true } -metrics = { path = "../metrics" } -msg = { path = "../msg" } -net_traits = { path = "../net_traits" } -parking_lot = { workspace = true } -profile_traits = { path = "../profile_traits" } -range = { path = "../range" } -script_traits = { path = "../script_traits" } -selectors = { path = "../selectors", features = ["shmem"] } -servo_arc = { path = "../servo_arc" } -servo_atoms = { path = "../atoms" } -servo_url = { path = "../url" } -style = { path = "../style", features = ["servo"] } -style_traits = { path = "../style_traits", features = ["servo"] } -webrender_api = { git = "https://github.com/servo/webrender" } diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index 852fe1dbe66..e3bdc4921a4 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -34,20 +34,20 @@ xr-profile = ["canvas/xr-profile", "canvas_traits/xr-profile", "script/xr-profil [dependencies] background_hang_monitor = { path = "../background_hang_monitor" } bluetooth = { path = "../bluetooth" } -bluetooth_traits = { path = "../bluetooth_traits" } +bluetooth_traits = { workspace = true } canvas = { path = "../canvas", default-features = false } -canvas_traits = { path = "../canvas_traits" } +canvas_traits = { workspace = true } compositing = { path = "../compositing", features = ["gl"] } -compositing_traits = { path = "../compositing_traits" } +compositing_traits = { workspace = true } constellation = { path = "../constellation" } crossbeam-channel = { workspace = true } devtools = { path = "../devtools" } -devtools_traits = { path = "../devtools_traits" } -embedder_traits = { path = "../embedder_traits" } +devtools_traits = { workspace = true } +embedder_traits = { workspace = true } env_logger = { workspace = true } euclid = { workspace = true } gfx = { path = "../gfx" } -gfx_traits = { path = "../gfx_traits" } +gfx_traits = { workspace = true } gleam = { workspace = true } gstreamer = { version = "0.15", features = ["v1_16"], optional = true } ipc-channel = { workspace = true } @@ -57,14 +57,14 @@ layout_thread_2020 = { path = "../layout_thread_2020" } log = { workspace = true } media = { path = "../media" } mozangle = { workspace = true } -msg = { path = "../msg" } +msg = { workspace = true } net = { path = "../net" } -net_traits = { path = "../net_traits" } +net_traits = { workspace = true } profile = { path = "../profile" } -profile_traits = { path = "../profile_traits" } +profile_traits = { workspace = true } script = { path = "../script" } -script_layout_interface = { path = "../script_layout_interface" } -script_traits = { path = "../script_traits" } +script_layout_interface = { workspace = true } +script_traits = { workspace = true } servo-media = { git = "https://github.com/servo/media" } servo-media-dummy = { git = "https://github.com/servo/media" } servo-media-gstreamer = { git = "https://github.com/servo/media", optional = true } @@ -73,14 +73,14 @@ servo_geometry = { path = "../geometry" } servo_url = { path = "../url" } sparkle = { workspace = true } style = { path = "../style", features = ["servo"] } -style_traits = { path = "../style_traits", features = ["servo"] } +style_traits = { workspace = true } surfman = { workspace = true } webdriver_server = { path = "../webdriver_server", optional = true } webgpu = { path = "../webgpu" } webrender = { workspace = true } webrender_api = { workspace = true } webrender_surfman = { path = "../webrender_surfman" } -webrender_traits = { path = "../webrender_traits" } +webrender_traits = { workspace = true } webxr = { git = "https://github.com/servo/webxr" } webxr-api = { git = "https://github.com/servo/webxr" } diff --git a/components/bluetooth_traits/Cargo.toml b/components/shared/bluetooth/Cargo.toml similarity index 86% rename from components/bluetooth_traits/Cargo.toml rename to components/shared/bluetooth/Cargo.toml index fc1830585de..c83b15c4cdc 100644 --- a/components/bluetooth_traits/Cargo.toml +++ b/components/shared/bluetooth/Cargo.toml @@ -11,7 +11,7 @@ name = "bluetooth_traits" path = "lib.rs" [dependencies] -embedder_traits = { path = "../embedder_traits" } +embedder_traits = { workspace = true } ipc-channel = { workspace = true } regex = { workspace = true } serde = { workspace = true } diff --git a/components/bluetooth_traits/blocklist.rs b/components/shared/bluetooth/blocklist.rs similarity index 100% rename from components/bluetooth_traits/blocklist.rs rename to components/shared/bluetooth/blocklist.rs diff --git a/components/bluetooth_traits/lib.rs b/components/shared/bluetooth/lib.rs similarity index 100% rename from components/bluetooth_traits/lib.rs rename to components/shared/bluetooth/lib.rs diff --git a/components/bluetooth_traits/scanfilter.rs b/components/shared/bluetooth/scanfilter.rs similarity index 100% rename from components/bluetooth_traits/scanfilter.rs rename to components/shared/bluetooth/scanfilter.rs diff --git a/components/canvas_traits/Cargo.toml b/components/shared/canvas/Cargo.toml similarity index 82% rename from components/canvas_traits/Cargo.toml rename to components/shared/canvas/Cargo.toml index 9199be4edf3..6f3eca8c160 100644 --- a/components/canvas_traits/Cargo.toml +++ b/components/shared/canvas/Cargo.toml @@ -20,14 +20,14 @@ cssparser = { workspace = true } euclid = { workspace = true } ipc-channel = { workspace = true } lazy_static = { workspace = true } -malloc_size_of = { path = "../malloc_size_of" } +malloc_size_of = { path = "../../malloc_size_of" } malloc_size_of_derive = { workspace = true } -pixels = { path = "../pixels" } +pixels = { path = "../../pixels" } serde = { workspace = true } serde_bytes = { workspace = true } -servo_config = { path = "../config" } +servo_config = { path = "../../config" } sparkle = { workspace = true } -style = { path = "../style" } +style = { path = "../../style" } time = { workspace = true, optional = true } webrender_api = { workspace = true } webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] } diff --git a/components/canvas_traits/canvas.rs b/components/shared/canvas/canvas.rs similarity index 100% rename from components/canvas_traits/canvas.rs rename to components/shared/canvas/canvas.rs diff --git a/components/canvas_traits/lib.rs b/components/shared/canvas/lib.rs similarity index 100% rename from components/canvas_traits/lib.rs rename to components/shared/canvas/lib.rs diff --git a/components/canvas_traits/webgl.rs b/components/shared/canvas/webgl.rs similarity index 100% rename from components/canvas_traits/webgl.rs rename to components/shared/canvas/webgl.rs diff --git a/components/canvas_traits/webgl_channel/ipc.rs b/components/shared/canvas/webgl_channel/ipc.rs similarity index 100% rename from components/canvas_traits/webgl_channel/ipc.rs rename to components/shared/canvas/webgl_channel/ipc.rs diff --git a/components/canvas_traits/webgl_channel/mod.rs b/components/shared/canvas/webgl_channel/mod.rs similarity index 100% rename from components/canvas_traits/webgl_channel/mod.rs rename to components/shared/canvas/webgl_channel/mod.rs diff --git a/components/canvas_traits/webgl_channel/mpsc.rs b/components/shared/canvas/webgl_channel/mpsc.rs similarity index 100% rename from components/canvas_traits/webgl_channel/mpsc.rs rename to components/shared/canvas/webgl_channel/mpsc.rs diff --git a/components/compositing_traits/Cargo.toml b/components/shared/compositing/Cargo.toml similarity index 50% rename from components/compositing_traits/Cargo.toml rename to components/shared/compositing/Cargo.toml index c4f3f6b05f0..03185ed8e86 100644 --- a/components/compositing_traits/Cargo.toml +++ b/components/shared/compositing/Cargo.toml @@ -11,19 +11,19 @@ name = "compositing_traits" path = "lib.rs" [dependencies] -canvas = { path = "../canvas" } +canvas = { path = "../../canvas" } crossbeam-channel = { workspace = true } -embedder_traits = { path = "../embedder_traits" } +embedder_traits = { workspace = true } euclid = { workspace = true } -gfx_traits = { path = "../gfx_traits" } +gfx_traits = { workspace = true } ipc-channel = { workspace = true } keyboard-types = { workspace = true } log = { workspace = true } -msg = { path = "../msg" } -net_traits = { path = "../net_traits" } -profile_traits = { path = "../profile_traits" } -script_traits = { path = "../script_traits" } -servo_url = { path = "../url" } -style_traits = { path = "../style_traits" } +msg = { workspace = true } +net_traits = { workspace = true } +profile_traits = { workspace = true } +script_traits = { workspace = true } +servo_url = { path = "../../url" } +style_traits = { workspace = true } webrender_api = { workspace = true } -webrender_surfman = { path = "../webrender_surfman" } +webrender_surfman = { path = "../../webrender_surfman" } diff --git a/components/compositing_traits/constellation_msg.rs b/components/shared/compositing/constellation_msg.rs similarity index 100% rename from components/compositing_traits/constellation_msg.rs rename to components/shared/compositing/constellation_msg.rs diff --git a/components/compositing_traits/lib.rs b/components/shared/compositing/lib.rs similarity index 100% rename from components/compositing_traits/lib.rs rename to components/shared/compositing/lib.rs diff --git a/components/devtools_traits/Cargo.toml b/components/shared/devtools/Cargo.toml similarity index 81% rename from components/devtools_traits/Cargo.toml rename to components/shared/devtools/Cargo.toml index 74bd6ddc24b..ff6d1d40dfd 100644 --- a/components/devtools_traits/Cargo.toml +++ b/components/shared/devtools/Cargo.toml @@ -15,10 +15,10 @@ bitflags = { workspace = true } headers = { workspace = true } http = { workspace = true } ipc-channel = { workspace = true } -malloc_size_of = { path = "../malloc_size_of" } +malloc_size_of = { path = "../../malloc_size_of" } malloc_size_of_derive = { workspace = true } -msg = { path = "../msg" } +msg = { workspace = true } serde = { workspace = true } -servo_url = { path = "../url" } +servo_url = { path = "../../url" } time = { workspace = true } uuid = { workspace = true, features = ["serde"] } diff --git a/components/devtools_traits/lib.rs b/components/shared/devtools/lib.rs similarity index 100% rename from components/devtools_traits/lib.rs rename to components/shared/devtools/lib.rs diff --git a/components/embedder_traits/Cargo.toml b/components/shared/embedder/Cargo.toml similarity index 90% rename from components/embedder_traits/Cargo.toml rename to components/shared/embedder/Cargo.toml index 283a8c52b66..41ae0b581bf 100644 --- a/components/embedder_traits/Cargo.toml +++ b/components/shared/embedder/Cargo.toml @@ -17,10 +17,10 @@ ipc-channel = { workspace = true } keyboard-types = { workspace = true } lazy_static = { workspace = true } log = { workspace = true } -msg = { path = "../msg" } +msg = { workspace = true } num-derive = "0.3" num-traits = { workspace = true } serde = { workspace = true } -servo_url = { path = "../url" } +servo_url = { path = "../../url" } webrender_api = { workspace = true } webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] } diff --git a/components/embedder_traits/build.rs b/components/shared/embedder/build.rs similarity index 100% rename from components/embedder_traits/build.rs rename to components/shared/embedder/build.rs diff --git a/components/embedder_traits/lib.rs b/components/shared/embedder/lib.rs similarity index 100% rename from components/embedder_traits/lib.rs rename to components/shared/embedder/lib.rs diff --git a/components/embedder_traits/resources.rs b/components/shared/embedder/resources.rs similarity index 80% rename from components/embedder_traits/resources.rs rename to components/shared/embedder/resources.rs index 21cee14cc07..fd1f44ff455 100644 --- a/components/embedder_traits/resources.rs +++ b/components/shared/embedder/resources.rs @@ -118,30 +118,34 @@ fn resources_for_tests() -> Box { } fn read(&self, file: Resource) -> Vec { match file { - Resource::Preferences => &include_bytes!("../../resources/prefs.json")[..], + Resource::Preferences => &include_bytes!("../../../resources/prefs.json")[..], Resource::BluetoothBlocklist => { - &include_bytes!("../../resources/gatt_blocklist.txt")[..] + &include_bytes!("../../../resources/gatt_blocklist.txt")[..] + }, + Resource::DomainList => { + &include_bytes!("../../../resources/public_domains.txt")[..] }, - Resource::DomainList => &include_bytes!("../../resources/public_domains.txt")[..], Resource::HstsPreloadList => { - &include_bytes!("../../resources/hsts_preload.json")[..] + &include_bytes!("../../../resources/hsts_preload.json")[..] }, - Resource::BadCertHTML => &include_bytes!("../../resources/badcert.html")[..], - Resource::NetErrorHTML => &include_bytes!("../../resources/neterror.html")[..], - Resource::UserAgentCSS => &include_bytes!("../../resources/user-agent.css")[..], - Resource::ServoCSS => &include_bytes!("../../resources/servo.css")[..], + Resource::BadCertHTML => &include_bytes!("../../../resources/badcert.html")[..], + Resource::NetErrorHTML => &include_bytes!("../../../resources/neterror.html")[..], + Resource::UserAgentCSS => &include_bytes!("../../../resources/user-agent.css")[..], + Resource::ServoCSS => &include_bytes!("../../../resources/servo.css")[..], Resource::PresentationalHintsCSS => { - &include_bytes!("../../resources/presentational-hints.css")[..] + &include_bytes!("../../../resources/presentational-hints.css")[..] }, - Resource::QuirksModeCSS => &include_bytes!("../../resources/quirks-mode.css")[..], - Resource::RippyPNG => &include_bytes!("../../resources/rippy.png")[..], + Resource::QuirksModeCSS => { + &include_bytes!("../../../resources/quirks-mode.css")[..] + }, + Resource::RippyPNG => &include_bytes!("../../../resources/rippy.png")[..], Resource::MediaControlsCSS => { - &include_bytes!("../../resources/media-controls.css")[..] + &include_bytes!("../../../resources/media-controls.css")[..] }, Resource::MediaControlsJS => { - &include_bytes!("../../resources/media-controls.js")[..] + &include_bytes!("../../../resources/media-controls.js")[..] }, - Resource::CrashHTML => &include_bytes!("../../resources/crash.html")[..], + Resource::CrashHTML => &include_bytes!("../../../resources/crash.html")[..], } .to_owned() } diff --git a/components/gfx_traits/Cargo.toml b/components/shared/gfx/Cargo.toml similarity index 78% rename from components/gfx_traits/Cargo.toml rename to components/shared/gfx/Cargo.toml index 8163bb49b5d..f94b5870c35 100644 --- a/components/gfx_traits/Cargo.toml +++ b/components/shared/gfx/Cargo.toml @@ -11,8 +11,8 @@ name = "gfx_traits" path = "lib.rs" [dependencies] -malloc_size_of = { path = "../malloc_size_of" } +malloc_size_of = { path = "../../malloc_size_of" } malloc_size_of_derive = { workspace = true } -range = { path = "../range" } +range = { path = "../../range" } serde = { workspace = true } webrender_api = { workspace = true } diff --git a/components/gfx_traits/lib.rs b/components/shared/gfx/lib.rs similarity index 100% rename from components/gfx_traits/lib.rs rename to components/shared/gfx/lib.rs diff --git a/components/gfx_traits/print_tree.rs b/components/shared/gfx/print_tree.rs similarity index 100% rename from components/gfx_traits/print_tree.rs rename to components/shared/gfx/print_tree.rs diff --git a/components/layout_traits/Cargo.toml b/components/shared/layout/Cargo.toml similarity index 56% rename from components/layout_traits/Cargo.toml rename to components/shared/layout/Cargo.toml index 532d358fd42..c81ed04454c 100644 --- a/components/layout_traits/Cargo.toml +++ b/components/shared/layout/Cargo.toml @@ -12,12 +12,12 @@ path = "lib.rs" [dependencies] crossbeam-channel = { workspace = true } -gfx = { path = "../gfx" } +gfx = { path = "../../gfx" } ipc-channel = { workspace = true } -metrics = { path = "../metrics" } -msg = { path = "../msg" } -net_traits = { path = "../net_traits" } -profile_traits = { path = "../profile_traits" } -script_traits = { path = "../script_traits" } -servo_url = { path = "../url" } +metrics = { path = "../../metrics" } +msg = { workspace = true } +net_traits = { workspace = true } +profile_traits = { workspace = true } +script_traits = { workspace = true } +servo_url = { path = "../../url" } webrender_api = { workspace = true } diff --git a/components/layout_traits/lib.rs b/components/shared/layout/lib.rs similarity index 100% rename from components/layout_traits/lib.rs rename to components/shared/layout/lib.rs diff --git a/components/msg/Cargo.toml b/components/shared/msg/Cargo.toml similarity index 81% rename from components/msg/Cargo.toml rename to components/shared/msg/Cargo.toml index 49dfb7232bd..d64880b5c6f 100644 --- a/components/msg/Cargo.toml +++ b/components/shared/msg/Cargo.toml @@ -15,9 +15,9 @@ doctest = false [dependencies] ipc-channel = { workspace = true } lazy_static = { workspace = true } -malloc_size_of = { path = "../malloc_size_of" } +malloc_size_of = { path = "../../malloc_size_of" } malloc_size_of_derive = { workspace = true } parking_lot = { workspace = true } serde = { workspace = true } -size_of_test = { path = "../size_of_test" } +size_of_test = { path = "../../size_of_test" } webrender_api = { workspace = true } diff --git a/components/msg/constellation_msg.rs b/components/shared/msg/constellation_msg.rs similarity index 100% rename from components/msg/constellation_msg.rs rename to components/shared/msg/constellation_msg.rs diff --git a/components/msg/lib.rs b/components/shared/msg/lib.rs similarity index 100% rename from components/msg/lib.rs rename to components/shared/msg/lib.rs diff --git a/components/net_traits/Cargo.toml b/components/shared/net/Cargo.toml similarity index 77% rename from components/net_traits/Cargo.toml rename to components/shared/net/Cargo.toml index 13005f40790..432c8676ccb 100644 --- a/components/net_traits/Cargo.toml +++ b/components/shared/net/Cargo.toml @@ -15,7 +15,7 @@ doctest = false [dependencies] content-security-policy = { workspace = true } cookie = { workspace = true } -embedder_traits = { path = "../embedder_traits" } +embedder_traits = { workspace = true } headers = { workspace = true } http = { workspace = true } hyper = { workspace = true } @@ -24,18 +24,18 @@ image = { workspace = true } ipc-channel = { workspace = true } lazy_static = { workspace = true } log = { workspace = true } -malloc_size_of = { path = "../malloc_size_of" } +malloc_size_of = { path = "../../malloc_size_of" } malloc_size_of_derive = { workspace = true } mime = { workspace = true } -msg = { path = "../msg" } +msg = { workspace = true } num-traits = { workspace = true } percent-encoding = { workspace = true } -pixels = { path = "../pixels" } +pixels = { path = "../../pixels" } rustls = { workspace = true } serde = { workspace = true } -servo_arc = { path = "../servo_arc" } -servo_rand = { path = "../rand" } -servo_url = { path = "../url" } +servo_arc = { path = "../../servo_arc" } +servo_rand = { path = "../../rand" } +servo_url = { path = "../../url" } time = { workspace = true } url = { workspace = true } uuid = { workspace = true } diff --git a/components/net_traits/blob_url_store.rs b/components/shared/net/blob_url_store.rs similarity index 100% rename from components/net_traits/blob_url_store.rs rename to components/shared/net/blob_url_store.rs diff --git a/components/net_traits/fetch/headers.rs b/components/shared/net/fetch/headers.rs similarity index 100% rename from components/net_traits/fetch/headers.rs rename to components/shared/net/fetch/headers.rs diff --git a/components/net_traits/filemanager_thread.rs b/components/shared/net/filemanager_thread.rs similarity index 100% rename from components/net_traits/filemanager_thread.rs rename to components/shared/net/filemanager_thread.rs diff --git a/components/net_traits/image/base.rs b/components/shared/net/image/base.rs similarity index 100% rename from components/net_traits/image/base.rs rename to components/shared/net/image/base.rs diff --git a/components/net_traits/image_cache.rs b/components/shared/net/image_cache.rs similarity index 100% rename from components/net_traits/image_cache.rs rename to components/shared/net/image_cache.rs diff --git a/components/net_traits/lib.rs b/components/shared/net/lib.rs similarity index 100% rename from components/net_traits/lib.rs rename to components/shared/net/lib.rs diff --git a/components/net_traits/pub_domains.rs b/components/shared/net/pub_domains.rs similarity index 100% rename from components/net_traits/pub_domains.rs rename to components/shared/net/pub_domains.rs diff --git a/components/net_traits/quality.rs b/components/shared/net/quality.rs similarity index 100% rename from components/net_traits/quality.rs rename to components/shared/net/quality.rs diff --git a/components/net_traits/request.rs b/components/shared/net/request.rs similarity index 100% rename from components/net_traits/request.rs rename to components/shared/net/request.rs diff --git a/components/net_traits/response.rs b/components/shared/net/response.rs similarity index 100% rename from components/net_traits/response.rs rename to components/shared/net/response.rs diff --git a/components/net_traits/storage_thread.rs b/components/shared/net/storage_thread.rs similarity index 100% rename from components/net_traits/storage_thread.rs rename to components/shared/net/storage_thread.rs diff --git a/components/net_traits/tests/image.rs b/components/shared/net/tests/image.rs similarity index 100% rename from components/net_traits/tests/image.rs rename to components/shared/net/tests/image.rs diff --git a/components/net_traits/tests/lib.rs b/components/shared/net/tests/lib.rs similarity index 100% rename from components/net_traits/tests/lib.rs rename to components/shared/net/tests/lib.rs diff --git a/components/net_traits/tests/pub_domains.rs b/components/shared/net/tests/pub_domains.rs similarity index 100% rename from components/net_traits/tests/pub_domains.rs rename to components/shared/net/tests/pub_domains.rs diff --git a/components/net_traits/tests/whitespace.rs b/components/shared/net/tests/whitespace.rs similarity index 100% rename from components/net_traits/tests/whitespace.rs rename to components/shared/net/tests/whitespace.rs diff --git a/components/profile_traits/Cargo.toml b/components/shared/profile/Cargo.toml similarity index 91% rename from components/profile_traits/Cargo.toml rename to components/shared/profile/Cargo.toml index 2743cc61c09..7e3650bed0e 100644 --- a/components/profile_traits/Cargo.toml +++ b/components/shared/profile/Cargo.toml @@ -15,6 +15,6 @@ crossbeam-channel = { workspace = true } ipc-channel = { workspace = true } log = { workspace = true } serde = { workspace = true } -servo_config = { path = "../config" } +servo_config = { path = "../../config" } signpost = { git = "https://github.com/pcwalton/signpost.git" } time = { workspace = true } diff --git a/components/profile_traits/ipc.rs b/components/shared/profile/ipc.rs similarity index 100% rename from components/profile_traits/ipc.rs rename to components/shared/profile/ipc.rs diff --git a/components/profile_traits/lib.rs b/components/shared/profile/lib.rs similarity index 100% rename from components/profile_traits/lib.rs rename to components/shared/profile/lib.rs diff --git a/components/profile_traits/mem.rs b/components/shared/profile/mem.rs similarity index 100% rename from components/profile_traits/mem.rs rename to components/shared/profile/mem.rs diff --git a/components/profile_traits/time.rs b/components/shared/profile/time.rs similarity index 100% rename from components/profile_traits/time.rs rename to components/shared/profile/time.rs diff --git a/components/script_traits/Cargo.toml b/components/shared/script/Cargo.toml similarity index 58% rename from components/script_traits/Cargo.toml rename to components/shared/script/Cargo.toml index 7d6978dff02..c27dd185d0b 100644 --- a/components/script_traits/Cargo.toml +++ b/components/shared/script/Cargo.toml @@ -12,14 +12,14 @@ path = "lib.rs" [dependencies] bitflags = { workspace = true } -bluetooth_traits = { path = "../bluetooth_traits" } -canvas_traits = { path = "../canvas_traits" } +bluetooth_traits = { workspace = true } +canvas_traits = { workspace = true } cookie = { workspace = true } crossbeam-channel = { workspace = true } -devtools_traits = { path = "../devtools_traits" } -embedder_traits = { path = "../embedder_traits" } +devtools_traits = { workspace = true } +embedder_traits = { workspace = true } euclid = { workspace = true } -gfx_traits = { path = "../gfx_traits" } +gfx_traits = { workspace = true } headers = { workspace = true } http = { workspace = true } hyper_serde = { workspace = true } @@ -27,21 +27,21 @@ ipc-channel = { workspace = true } keyboard-types = { workspace = true } libc = { workspace = true } log = { workspace = true } -malloc_size_of = { path = "../malloc_size_of" } +malloc_size_of = { path = "../../malloc_size_of" } malloc_size_of_derive = { workspace = true } -media = { path = "../media" } -msg = { path = "../msg" } -net_traits = { path = "../net_traits" } -pixels = { path = "../pixels" } -profile_traits = { path = "../profile_traits" } +media = { path = "../../media" } +msg = { workspace = true } +net_traits = { workspace = true } +pixels = { path = "../../pixels" } +profile_traits = { workspace = true } serde = { workspace = true } -servo_atoms = { path = "../atoms" } -servo_url = { path = "../url" } +servo_atoms = { path = "../../atoms" } +servo_url = { path = "../../url" } smallvec = { workspace = true } -style_traits = { path = "../style_traits", features = ["servo"] } +style_traits = { workspace = true } time = { workspace = true } uuid = { workspace = true } webdriver = { workspace = true } -webgpu = { path = "../webgpu" } +webgpu = { path = "../../webgpu" } webrender_api = { workspace = true } webxr-api = { git = "https://github.com/servo/webxr", features = ["ipc"] } diff --git a/components/script_traits/compositor.rs b/components/shared/script/compositor.rs similarity index 100% rename from components/script_traits/compositor.rs rename to components/shared/script/compositor.rs diff --git a/components/script_traits/lib.rs b/components/shared/script/lib.rs similarity index 100% rename from components/script_traits/lib.rs rename to components/shared/script/lib.rs diff --git a/components/script_traits/script_msg.rs b/components/shared/script/script_msg.rs similarity index 100% rename from components/script_traits/script_msg.rs rename to components/shared/script/script_msg.rs diff --git a/components/script_traits/serializable.rs b/components/shared/script/serializable.rs similarity index 100% rename from components/script_traits/serializable.rs rename to components/shared/script/serializable.rs diff --git a/components/script_traits/tests/compositor.rs b/components/shared/script/tests/compositor.rs similarity index 100% rename from components/script_traits/tests/compositor.rs rename to components/shared/script/tests/compositor.rs diff --git a/components/script_traits/transferable.rs b/components/shared/script/transferable.rs similarity index 100% rename from components/script_traits/transferable.rs rename to components/shared/script/transferable.rs diff --git a/components/script_traits/webdriver_msg.rs b/components/shared/script/webdriver_msg.rs similarity index 100% rename from components/script_traits/webdriver_msg.rs rename to components/shared/script/webdriver_msg.rs diff --git a/components/shared/script_layout/Cargo.toml b/components/shared/script_layout/Cargo.toml new file mode 100644 index 00000000000..553a773afac --- /dev/null +++ b/components/shared/script_layout/Cargo.toml @@ -0,0 +1,39 @@ +[package] +name = "script_layout_interface" +version = "0.0.1" +authors = ["The Servo Project Developers"] +license = "MPL-2.0" +edition = "2018" +publish = false + +[lib] +name = "script_layout_interface" +path = "lib.rs" + +[dependencies] +app_units = { workspace = true } +atomic_refcell = { workspace = true } +canvas_traits = { workspace = true } +crossbeam-channel = { workspace = true } +euclid = { workspace = true } +fxhash = { workspace = true } +gfx_traits = { workspace = true } +html5ever = { workspace = true } +ipc-channel = { workspace = true } +libc = { workspace = true } +malloc_size_of = { path = "../../malloc_size_of" } +malloc_size_of_derive = { workspace = true } +metrics = { path = "../../metrics" } +msg = { workspace = true } +net_traits = { workspace = true } +parking_lot = { workspace = true } +profile_traits = { workspace = true } +range = { path = "../../range" } +script_traits = { workspace = true } +selectors = { path = "../../selectors", features = ["shmem"] } +servo_arc = { path = "../../servo_arc" } +servo_atoms = { path = "../../atoms" } +servo_url = { path = "../../url" } +style = { path = "../../style", features = ["servo"] } +style_traits = { workspace = true } +webrender_api = { git = "https://github.com/servo/webrender" } diff --git a/components/script_layout_interface/lib.rs b/components/shared/script_layout/lib.rs similarity index 100% rename from components/script_layout_interface/lib.rs rename to components/shared/script_layout/lib.rs diff --git a/components/script_layout_interface/message.rs b/components/shared/script_layout/message.rs similarity index 100% rename from components/script_layout_interface/message.rs rename to components/shared/script_layout/message.rs diff --git a/components/script_layout_interface/rpc.rs b/components/shared/script_layout/rpc.rs similarity index 100% rename from components/script_layout_interface/rpc.rs rename to components/shared/script_layout/rpc.rs diff --git a/components/script_layout_interface/wrapper_traits.rs b/components/shared/script_layout/wrapper_traits.rs similarity index 100% rename from components/script_layout_interface/wrapper_traits.rs rename to components/shared/script_layout/wrapper_traits.rs diff --git a/components/webrender_traits/Cargo.toml b/components/shared/webrender/Cargo.toml similarity index 100% rename from components/webrender_traits/Cargo.toml rename to components/shared/webrender/Cargo.toml diff --git a/components/webrender_traits/lib.rs b/components/shared/webrender/lib.rs similarity index 100% rename from components/webrender_traits/lib.rs rename to components/shared/webrender/lib.rs diff --git a/components/style/Cargo.toml b/components/style/Cargo.toml index e4da882b70a..decd0147159 100644 --- a/components/style/Cargo.toml +++ b/components/style/Cargo.toml @@ -75,7 +75,7 @@ smallvec = "1.0" static_assertions = "1.1" string_cache = { version = "0.8", optional = true } style_derive = { path = "../style_derive" } -style_traits = { path = "../style_traits" } +style_traits = { workspace = true } time = "0.1" to_shmem = { path = "../to_shmem" } to_shmem_derive = { path = "../to_shmem_derive" } diff --git a/components/webdriver_server/Cargo.toml b/components/webdriver_server/Cargo.toml index 02e8599450d..91ebed0445a 100644 --- a/components/webdriver_server/Cargo.toml +++ b/components/webdriver_server/Cargo.toml @@ -12,7 +12,7 @@ path = "lib.rs" [dependencies] base64 = { workspace = true } -compositing_traits = { path = "../compositing_traits" } +compositing_traits = { workspace = true } cookie = { workspace = true } crossbeam-channel = { workspace = true } euclid = { workspace = true } @@ -22,14 +22,14 @@ image = { workspace = true } ipc-channel = { workspace = true } keyboard-types = { workspace = true } log = { workspace = true } -msg = { path = "../msg" } -net_traits = { path = "../net_traits" } +msg = { workspace = true } +net_traits = { workspace = true } pixels = { path = "../pixels" } -script_traits = { path = "../script_traits" } +script_traits = { workspace = true } serde = { workspace = true } serde_json = { workspace = true } servo_config = { path = "../config" } servo_url = { path = "../url" } -style_traits = { path = "../style_traits" } +style_traits = { workspace = true } uuid = { workspace = true } webdriver = { workspace = true } diff --git a/components/webgpu/Cargo.toml b/components/webgpu/Cargo.toml index 718df8f418d..f84c614dda6 100644 --- a/components/webgpu/Cargo.toml +++ b/components/webgpu/Cargo.toml @@ -16,13 +16,13 @@ euclid = { workspace = true } ipc-channel = { workspace = true } log = { workspace = true } malloc_size_of = { path = "../malloc_size_of" } -msg = { path = "../msg" } +msg = { workspace = true } serde = { workspace = true, features = ["serde_derive"] } servo_config = { path = "../config" } smallvec = { workspace = true, features = ["serde"] } webrender = { workspace = true } webrender_api = { workspace = true } -webrender_traits = { path = "../webrender_traits" } +webrender_traits = { workspace = true } wgpu-core = { version = "0.17", features = ["replay", "trace", "serial-pass", "wgsl"] } wgpu-types = { version = "0.17" } diff --git a/tests/unit/metrics/Cargo.toml b/tests/unit/metrics/Cargo.toml index 7a0bf170dc7..580d14cef5c 100644 --- a/tests/unit/metrics/Cargo.toml +++ b/tests/unit/metrics/Cargo.toml @@ -11,10 +11,10 @@ path = "lib.rs" doctest = false [dependencies] -gfx_traits = {path = "../../../components/gfx_traits"} +gfx_traits = { workspace = true } ipc-channel = { workspace = true } -metrics = {path = "../../../components/metrics"} -msg = {path = "../../../components/msg"} -profile_traits = {path = "../../../components/profile_traits"} -servo_url = {path = "../../../components/url"} +metrics = { path = "../../../components/metrics" } +msg = { workspace = true } +profile_traits = { workspace = true } +servo_url = { path = "../../../components/url" } time = { workspace = true } diff --git a/tests/unit/profile/Cargo.toml b/tests/unit/profile/Cargo.toml index 79deebc2213..b423d43b65d 100644 --- a/tests/unit/profile/Cargo.toml +++ b/tests/unit/profile/Cargo.toml @@ -12,7 +12,7 @@ doctest = false [dependencies] ipc-channel = { workspace = true } -profile = {path = "../../../components/profile"} -profile_traits = {path = "../../../components/profile_traits"} -servo_config = {path = "../../../components/config"} +profile = { path = "../../../components/profile" } +profile_traits = { workspace = true } +servo_config = { path = "../../../components/config" }