Skip to content

Commit e0b1ffb

Browse files
committed
Move the servo binary to ports.
1 parent 75d3524 commit e0b1ffb

File tree

6 files changed

+105
-57
lines changed

6 files changed

+105
-57
lines changed

components/servo/Cargo.toml

Lines changed: 2 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22

3-
name = "servo"
3+
name = "libservo"
44
version = "0.0.1"
55
authors = ["The Servo Project Developers"]
66
license = "MPL-2.0"
@@ -12,39 +12,21 @@ name = "servo"
1212
path = "lib.rs"
1313
crate-type = ["rlib"]
1414

15-
[[bin]]
16-
name = "servo"
17-
path = "main.rs"
18-
test = false
19-
doc = false
20-
bench = false
21-
2215
[features]
2316
default = ["webdriver", "max_log_level"]
2417
max_log_level = ["log/release_max_level_info"]
2518
webdriver = ["webdriver_server"]
2619
energy-profiling = ["profile_traits/energy-profiling"]
2720
testing = ["style/testing"]
2821
clippy = ["plugins/clippy"]
22+
debugmozjs = ["script/debugmozjs"]
2923

3024
[profile.release]
3125
opt-level = 3
3226
# Uncomment to profile on Linux:
3327
# debug = true
3428
# lto = false
3529

36-
[dev-dependencies]
37-
compiletest_helper = {path = "../../tests/compiletest/helper"}
38-
gfx_tests = {path = "../../tests/unit/gfx"}
39-
layout_tests = {path = "../../tests/unit/layout"}
40-
net_tests = {path = "../../tests/unit/net"}
41-
net_traits_tests = {path = "../../tests/unit/net_traits"}
42-
plugin_compiletest = {path = "../../tests/compiletest/plugin"}
43-
profile_tests = {path = "../../tests/unit/profile"}
44-
script_tests = {path = "../../tests/unit/script"}
45-
style_tests = {path = "../../tests/unit/style"}
46-
util_tests = {path = "../../tests/unit/util"}
47-
4830
[dependencies]
4931
backtrace = "0.2"
5032
bluetooth_traits = {path = "../bluetooth_traits"}
@@ -61,7 +43,6 @@ env_logger = "0.3"
6143
euclid = "0.10.1"
6244
gfx = {path = "../gfx"}
6345
gleam = "0.2"
64-
glutin_app = {path = "../../ports/glutin"}
6546
ipc-channel = "0.5"
6647
layout = {path = "../layout"}
6748
layout_thread = {path = "../layout_thread"}
Lines changed: 45 additions & 32 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ports/servo/Cargo.toml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
[package]
2+
3+
name = "servo"
4+
version = "0.0.1"
5+
authors = ["The Servo Project Developers"]
6+
publish = false
7+
8+
[[bin]]
9+
name = "servo"
10+
path = "main.rs"
11+
test = false
12+
doc = false
13+
bench = false
14+
15+
[dev-dependencies]
16+
compiletest_helper = {path = "../../tests/compiletest/helper"}
17+
gfx_tests = {path = "../../tests/unit/gfx"}
18+
layout_tests = {path = "../../tests/unit/layout"}
19+
net_tests = {path = "../../tests/unit/net"}
20+
net_traits_tests = {path = "../../tests/unit/net_traits"}
21+
plugin_compiletest = {path = "../../tests/compiletest/plugin"}
22+
profile_tests = {path = "../../tests/unit/profile"}
23+
script_tests = {path = "../../tests/unit/script"}
24+
style_tests = {path = "../../tests/unit/style"}
25+
util_tests = {path = "../../tests/unit/util"}
26+
27+
[features]
28+
default = ["webdriver", "max_log_level"]
29+
max_log_level = ["log/release_max_level_info"]
30+
webdriver = ["libservo/webdriver_server"]
31+
energy-profiling = ["libservo/energy-profiling"]
32+
testing = ["libservo/testing"]
33+
clippy = ["libservo/clippy"]
34+
debugmozjs = ["libservo/debugmozjs"]
35+
36+
[profile.release]
37+
opt-level = 3
38+
# Uncomment to profile on Linux:
39+
# debug = true
40+
# lto = false
41+
42+
[dependencies]
43+
backtrace = "0.2"
44+
browserhtml = {git = "https://github.com/browserhtml/browserhtml", branch = "crate"}
45+
glutin_app = {path = "../../ports/glutin"}
46+
log = "0.3"
47+
libservo = {path = "../../components/servo"}
48+
49+
[target.'cfg(not(target_os = "android"))'.dependencies]
50+
sig = "0.1"
51+
52+
[target.'cfg(target_os = "android")'.dependencies]
53+
libc = "0.2"
54+
android_glue = "0.2"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
//! of [glutin], the cross-platform OpenGL utility and windowing
1212
//! library.
1313
//!
14-
//! For the engine itself look next door in lib.rs.
14+
//! For the engine itself look next door in `components/servo/lib.rs`.
1515
//!
1616
//! [glutin]: https://github.com/tomaka/glutin
1717

python/servo/build_commands.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ def build(self, target=None, release=False, dev=False, jobs=None,
214214
self.ensure_bootstrapped(target=target)
215215

216216
if debug_mozjs:
217-
features += ["script/debugmozjs"]
217+
features += ["debugmozjs"]
218218

219219
if features:
220220
opts += ["--features", "%s" % ' '.join(features)]

python/servo/command_base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -498,13 +498,13 @@ def build_env(self, hosts_file_path=None, target=None, is_build=False):
498498
return env
499499

500500
def servo_crate(self):
501-
return path.join(self.context.topdir, "components", "servo")
501+
return path.join(self.context.topdir, "ports", "servo")
502502

503503
def servo_features(self):
504504
"""Return a list of optional features to enable for the Servo crate"""
505505
features = []
506506
if self.config["build"]["debug-mozjs"]:
507-
features += ["script/debugmozjs"]
507+
features += ["debugmozjs"]
508508
return features
509509

510510
def android_support_dir(self):

0 commit comments

Comments
 (0)