From cb3cbd6ae64bfed62b669ea80eef7a8ce2f9926f Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 4 May 2016 12:05:01 +0200 Subject: [PATCH 1/2] Remove unused image dependency. --- components/servo/Cargo.lock | 1 - components/servo/Cargo.toml | 1 - 2 files changed, 2 deletions(-) diff --git a/components/servo/Cargo.lock b/components/servo/Cargo.lock index 8ef5c04b1b81..c74fd714387d 100644 --- a/components/servo/Cargo.lock +++ b/components/servo/Cargo.lock @@ -17,7 +17,6 @@ dependencies = [ "gfx_tests 0.0.1", "gleam 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "glutin_app 0.0.1", - "image 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "layers 0.2.4 (git+https://github.com/servo/rust-layers)", "layout 0.0.1", diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index 109d4e6d7335..6c05c28d09e7 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -31,7 +31,6 @@ codegen-units = 4 # lto = false [dev-dependencies] -image = "0.9" gfx_tests = {path = "../../tests/unit/gfx"} layout_tests = {path = "../../tests/unit/layout"} net_tests = {path = "../../tests/unit/net"} From bb98b2134c32065b5898134eda3852d3097cea91 Mon Sep 17 00:00:00 2001 From: Ms2ger Date: Wed, 4 May 2016 12:06:00 +0200 Subject: [PATCH 2/2] Introduce ports/servo for the servo binary. --- components/servo/Cargo.toml | 27 +---------- docs/ORGANIZATION.md | 4 +- ports/cef/Cargo.lock | 12 ----- ports/gonk/Cargo.lock | 2 - {components => ports}/servo/Cargo.lock | 62 +++++++++++++++----------- ports/servo/Cargo.toml | 45 +++++++++++++++++++ {components => ports}/servo/build.rs | 0 {components => ports}/servo/main.rs | 2 +- python/servo/command_base.py | 2 +- 9 files changed, 86 insertions(+), 70 deletions(-) rename {components => ports}/servo/Cargo.lock (99%) create mode 100644 ports/servo/Cargo.toml rename {components => ports}/servo/build.rs (100%) rename {components => ports}/servo/main.rs (99%) diff --git a/components/servo/Cargo.toml b/components/servo/Cargo.toml index 6c05c28d09e7..a49842429405 100644 --- a/components/servo/Cargo.toml +++ b/components/servo/Cargo.toml @@ -3,23 +3,14 @@ name = "servo" version = "0.0.1" authors = ["The Servo Project Developers"] -build = "build.rs" publish = false [lib] name = "servo" path = "lib.rs" -crate-type = ["rlib"] - -[[bin]] -name = "servo" -path = "main.rs" -test = false -doc = false -bench = false [features] -default = ["glutin_app", "webdriver"] +default = ["webdriver"] webdriver = ["webdriver_server"] energy-profiling = ["profile_traits/energy-profiling"] @@ -30,18 +21,6 @@ codegen-units = 4 # debug = true # lto = false -[dev-dependencies] -gfx_tests = {path = "../../tests/unit/gfx"} -layout_tests = {path = "../../tests/unit/layout"} -net_tests = {path = "../../tests/unit/net"} -net_traits_tests = {path = "../../tests/unit/net_traits"} -profile_tests = {path = "../../tests/unit/profile"} -script_tests = {path = "../../tests/unit/script"} -style_tests = {path = "../../tests/unit/style"} -util_tests = {path = "../../tests/unit/util"} -compiletest_helper = {path = "../../tests/compiletest/helper"} -plugin_compiletest = {path = "../../tests/compiletest/plugin"} - [dependencies] webrender_traits = {git = "https://github.com/servo/webrender_traits"} webrender = {git = "https://github.com/servo/webrender"} @@ -68,13 +47,9 @@ ipc-channel = {git = "https://github.com/servo/ipc-channel"} layers = {git = "https://github.com/servo/rust-layers", features = ["plugins"]} gleam = "0.2" browserhtml = {git = "https://github.com/browserhtml/browserhtml", branch = "gh-pages"} -env_logger = "0.3" euclid = {version = "0.6.4", features = ["plugins"]} libc = "0.2" url = {version = "1.0.0", features = ["heap_size", "serde", "query_encoding"]} -[target.'cfg(target_os = "android")'.dependencies] -log = {version = "0.3", features = ["release_max_level_info"]} - [target.'cfg(not(target_os = "windows"))'.dependencies] gaol = {git = "https://github.com/servo/gaol"} diff --git a/docs/ORGANIZATION.md b/docs/ORGANIZATION.md index 0aa15ffc570d..75de735c66d2 100644 --- a/docs/ORGANIZATION.md +++ b/docs/ORGANIZATION.md @@ -37,7 +37,7 @@ * script_traits * APIs to the script crate for crates that don't want to depend on the script crate for build speed reasons. * servo - * Entry points for the servo application and libservo embedding library. + * Entry point for the libservo embedding library. * style * APIs for parsing CSS and interacting with stylesheets and styled elements. * style_traits @@ -57,6 +57,8 @@ * Embedding implementation for the `glutin` windowing library. * gonk * Embedding implementation for the Firefox OS devices. + * servo + * Entry point for the servo application. * python * servo * Implementations of servo-specific mach commands. diff --git a/ports/cef/Cargo.lock b/ports/cef/Cargo.lock index 09b4991b7239..66d1c1c75146 100644 --- a/ports/cef/Cargo.lock +++ b/ports/cef/Cargo.lock @@ -523,15 +523,6 @@ dependencies = [ "num 0.1.32 (registry+https://github.com/rust-lang/crates.io-index)", ] -[[package]] -name = "env_logger" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -dependencies = [ - "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "regex 0.1.69 (registry+https://github.com/rust-lang/crates.io-index)", -] - [[package]] name = "euclid" version = "0.6.6" @@ -1804,17 +1795,14 @@ dependencies = [ "compositing 0.0.1", "devtools 0.0.1", "devtools_traits 0.0.1", - "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.0.1 (git+https://github.com/servo/gaol)", "gfx 0.0.1", "gleam 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", - "glutin_app 0.0.1", "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", "layers 0.2.4 (git+https://github.com/servo/rust-layers)", "layout 0.0.1", "libc 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net 0.0.1", "net_traits 0.0.1", diff --git a/ports/gonk/Cargo.lock b/ports/gonk/Cargo.lock index 7f58a20cfb62..6d4c15a69596 100644 --- a/ports/gonk/Cargo.lock +++ b/ports/gonk/Cargo.lock @@ -1787,7 +1787,6 @@ dependencies = [ "compositing 0.0.1", "devtools 0.0.1", "devtools_traits 0.0.1", - "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", "gaol 0.0.1 (git+https://github.com/servo/gaol)", "gfx 0.0.1", @@ -1796,7 +1795,6 @@ dependencies = [ "layers 0.2.4 (git+https://github.com/servo/rust-layers)", "layout 0.0.1", "libc 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", "msg 0.0.1", "net 0.0.1", "net_traits 0.0.1", diff --git a/components/servo/Cargo.lock b/ports/servo/Cargo.lock similarity index 99% rename from components/servo/Cargo.lock rename to ports/servo/Cargo.lock index c74fd714387d..4a9b2423c1ac 100644 --- a/components/servo/Cargo.lock +++ b/ports/servo/Cargo.lock @@ -1,48 +1,23 @@ [root] -name = "servo" +name = "servo_app" version = "0.0.1" dependencies = [ "android_glue 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)", - "browserhtml 0.1.4 (git+https://github.com/browserhtml/browserhtml?branch=gh-pages)", - "canvas 0.0.1", - "canvas_traits 0.0.1", "compiletest_helper 0.0.1", - "compositing 0.0.1", - "devtools 0.0.1", - "devtools_traits 0.0.1", "env_logger 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", - "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", - "gaol 0.0.1 (git+https://github.com/servo/gaol)", - "gfx 0.0.1", "gfx_tests 0.0.1", - "gleam 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", "glutin_app 0.0.1", - "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", - "layers 0.2.4 (git+https://github.com/servo/rust-layers)", - "layout 0.0.1", "layout_tests 0.0.1", "libc 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.3.6 (registry+https://github.com/rust-lang/crates.io-index)", - "msg 0.0.1", - "net 0.0.1", "net_tests 0.0.1", - "net_traits 0.0.1", "net_traits_tests 0.0.1", "plugin_compiletest 0.0.1", - "profile 0.0.1", "profile_tests 0.0.1", - "profile_traits 0.0.1", - "script 0.0.1", "script_tests 0.0.1", - "script_traits 0.0.1", - "style 0.0.1", + "servo 0.0.1", "style_tests 0.0.1", - "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", - "util 0.0.1", "util_tests 0.0.1", - "webdriver_server 0.0.1", - "webrender 0.1.0 (git+https://github.com/servo/webrender)", - "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", ] [[package]] @@ -1935,6 +1910,39 @@ dependencies = [ "serde_codegen 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)", ] +[[package]] +name = "servo" +version = "0.0.1" +dependencies = [ + "browserhtml 0.1.4 (git+https://github.com/browserhtml/browserhtml?branch=gh-pages)", + "canvas 0.0.1", + "canvas_traits 0.0.1", + "compositing 0.0.1", + "devtools 0.0.1", + "devtools_traits 0.0.1", + "euclid 0.6.6 (registry+https://github.com/rust-lang/crates.io-index)", + "gaol 0.0.1 (git+https://github.com/servo/gaol)", + "gfx 0.0.1", + "gleam 0.2.15 (registry+https://github.com/rust-lang/crates.io-index)", + "ipc-channel 0.2.2 (git+https://github.com/servo/ipc-channel)", + "layers 0.2.4 (git+https://github.com/servo/rust-layers)", + "layout 0.0.1", + "libc 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)", + "msg 0.0.1", + "net 0.0.1", + "net_traits 0.0.1", + "profile 0.0.1", + "profile_traits 0.0.1", + "script 0.0.1", + "script_traits 0.0.1", + "style 0.0.1", + "url 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", + "util 0.0.1", + "webdriver_server 0.0.1", + "webrender 0.1.0 (git+https://github.com/servo/webrender)", + "webrender_traits 0.1.0 (git+https://github.com/servo/webrender_traits)", +] + [[package]] name = "servo-egl" version = "0.2.1" diff --git a/ports/servo/Cargo.toml b/ports/servo/Cargo.toml new file mode 100644 index 000000000000..ec6b63d925da --- /dev/null +++ b/ports/servo/Cargo.toml @@ -0,0 +1,45 @@ +[package] +name = "servo_app" +version = "0.0.1" +authors = ["The Servo Project Developers"] +build = "build.rs" +publish = false + +[[bin]] +name = "servo" +path = "main.rs" +test = false +doc = false +bench = false + +[features] +energy-profiling = ["servo/energy-profiling"] + +[profile.release] +opt-level = 3 +codegen-units = 4 +# Uncomment to profile on Linux: +# debug = true +# lto = false + +[dependencies] +env_logger = "0.3" +glutin_app = {path = "../../ports/glutin"} +servo = {path = "../../components/servo"} + +[target.'cfg(target_os = "android")'.dependencies] +android_glue = {version = "0.1.3"} +libc = "0.2" +log = {version = "0.3", features = ["release_max_level_info"]} + +[dev-dependencies] +compiletest_helper = {path = "../../tests/compiletest/helper"} +gfx_tests = {path = "../../tests/unit/gfx"} +layout_tests = {path = "../../tests/unit/layout"} +net_tests = {path = "../../tests/unit/net"} +net_traits_tests = {path = "../../tests/unit/net_traits"} +plugin_compiletest = {path = "../../tests/compiletest/plugin"} +profile_tests = {path = "../../tests/unit/profile"} +script_tests = {path = "../../tests/unit/script"} +style_tests = {path = "../../tests/unit/style"} +util_tests = {path = "../../tests/unit/util"} diff --git a/components/servo/build.rs b/ports/servo/build.rs similarity index 100% rename from components/servo/build.rs rename to ports/servo/build.rs diff --git a/components/servo/main.rs b/ports/servo/main.rs similarity index 99% rename from components/servo/main.rs rename to ports/servo/main.rs index 214d9ee101d4..4dd0d7b7f7fe 100644 --- a/components/servo/main.rs +++ b/ports/servo/main.rs @@ -11,7 +11,7 @@ //! of [glutin], the cross-platform OpenGL utility and windowing //! library. //! -//! For the engine itself look next door in lib.rs. +//! For the engine itself look next door in `components/servo/lib.rs`. //! //! [glutin]: https://github.com/tomaka/glutin diff --git a/python/servo/command_base.py b/python/servo/command_base.py index 9f2bf307c9de..be0398ca89dd 100644 --- a/python/servo/command_base.py +++ b/python/servo/command_base.py @@ -403,7 +403,7 @@ def build_env(self, gonk=False, hosts_file_path=None): return env def servo_crate(self): - return path.join(self.context.topdir, "components", "servo") + return path.join(self.context.topdir, "ports", "servo") def android_support_dir(self): return path.join(self.context.topdir, "support", "android")