Skip to content

Commit 39a3955

Browse files
Use workspace inheritance. (#701)
Consolidate package configuration where possible. This also removes the `homepage` key as it only points to the repository so isn't providing anything additional. Use workspace dependencies for the crates provided by the workspace and used within the workspace. This centralizes the version number maintenance a bit.
1 parent 84b8365 commit 39a3955

File tree

9 files changed

+107
-92
lines changed

9 files changed

+107
-92
lines changed

Cargo.toml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
[workspace]
22
members = ["core-foundation", "core-foundation-sys", "core-graphics-types", "core-graphics", "core-text", "cocoa", "cocoa-foundation", "io-surface"]
3+
4+
[workspace.package]
5+
authors = ["The Servo Project Developers"]
6+
edition = "2018"
7+
license = "MIT OR Apache-2.0"
8+
repository = "https://github.com/servo/core-foundation-rs"
9+
rust-version = "1.65"
10+
11+
[workspace.dependencies]
12+
cocoa-foundation = { default-features = false, path = "cocoa-foundation", version = "0.2" }
13+
core-foundation = { default-features = false, path = "core-foundation", version = "0.10" }
14+
core-foundation-sys = { default-features = false, path = "core-foundation-sys", version = "0.8" }
15+
core-graphics = { default-features = false, path = "core-graphics", version = "0.24" }
16+
core-graphics-types = { default-features = false, path = "core-graphics-types", version = "0.2" }

cocoa-foundation/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
1-
21
[package]
32
name = "cocoa-foundation"
43
description = "Bindings to Cocoa Foundation for macOS"
5-
homepage = "https://github.com/servo/core-foundation-rs"
6-
repository = "https://github.com/servo/core-foundation-rs"
74
version = "0.2.0"
8-
authors = ["The Servo Project Developers"]
9-
license = "MIT OR Apache-2.0"
10-
edition = "2018"
11-
rust-version = "1.65"
5+
6+
authors.workspace = true
7+
edition.workspace = true
8+
license.workspace = true
9+
repository.workspace = true
10+
rust-version.workspace = true
1211

1312
[package.metadata.docs.rs]
1413
default-target = "x86_64-apple-darwin"
1514

1615
[dependencies]
17-
block = "0.1"
16+
core-foundation.workspace = true
17+
core-graphics-types.workspace = true
18+
1819
bitflags = "2"
19-
core-foundation = { default-features = false, path = "../core-foundation", version = "0.10" }
20-
core-graphics-types = { default-features = false, path = "../core-graphics-types", version = "0.2" }
20+
block = "0.1"
2121
objc = "0.2.3"
2222

2323
[features]

cocoa/Cargo.toml

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
21
[package]
32
name = "cocoa"
43
description = "Bindings to Cocoa for macOS"
5-
homepage = "https://github.com/servo/core-foundation-rs"
6-
repository = "https://github.com/servo/core-foundation-rs"
74
version = "0.26.0"
8-
authors = ["The Servo Project Developers"]
9-
license = "MIT OR Apache-2.0"
10-
edition = "2018"
11-
rust-version = "1.65"
5+
6+
authors.workspace = true
7+
edition.workspace = true
8+
license.workspace = true
9+
repository.workspace = true
10+
rust-version.workspace = true
1211

1312
[package.metadata.docs.rs]
1413
default-target = "x86_64-apple-darwin"
1514

1615
[dependencies]
17-
block = "0.1"
16+
cocoa-foundation.workspace = true
17+
core-foundation.workspace = true
18+
core-graphics.workspace = true
19+
1820
bitflags = "2"
19-
libc = "0.2"
20-
cocoa-foundation = { default-features = false, path = "../cocoa-foundation", version = "0.2" }
21-
core-foundation = { default-features = false, path = "../core-foundation", version = "0.10" }
22-
core-graphics = { default-features = false, path = "../core-graphics", version = "0.24" }
21+
block = "0.1"
2322
foreign-types = "0.5"
23+
libc = "0.2"
2424
objc = "0.2.3"
2525

2626
[features]

core-foundation-sys/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
[package]
22
name = "core-foundation-sys"
33
description = "Bindings to Core Foundation for macOS"
4-
homepage = "https://github.com/servo/core-foundation-rs"
5-
repository = "https://github.com/servo/core-foundation-rs"
64
version = "0.8.7"
7-
authors = ["The Servo Project Developers"]
8-
license = "MIT OR Apache-2.0"
9-
edition = "2018"
10-
rust-version = "1.65"
5+
6+
authors.workspace = true
7+
edition.workspace = true
8+
license.workspace = true
9+
repository.workspace = true
10+
rust-version.workspace = true
11+
12+
[package.metadata.docs.rs]
13+
all-features = true
14+
default-target = "x86_64-apple-darwin"
1115

1216
[dependencies]
1317

@@ -17,7 +21,3 @@ mac_os_10_7_support = [] # backwards compatibility
1721
mac_os_10_8_features = [] # enables new features
1822
# Disable to manually link. Enabled by default.
1923
link = []
20-
21-
[package.metadata.docs.rs]
22-
all-features = true
23-
default-target = "x86_64-apple-darwin"

core-foundation/Cargo.toml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,24 @@
11
[package]
22
name = "core-foundation"
33
description = "Bindings to Core Foundation for macOS"
4-
homepage = "https://github.com/servo/core-foundation-rs"
5-
repository = "https://github.com/servo/core-foundation-rs"
64
version = "0.10.0"
7-
authors = ["The Servo Project Developers"]
8-
license = "MIT OR Apache-2.0"
5+
96
categories = ["os::macos-apis"]
107
keywords = ["macos", "framework", "objc"]
11-
edition = "2018"
12-
rust-version = "1.65"
138

14-
[dependencies.core-foundation-sys]
15-
path = "../core-foundation-sys"
16-
default-features = false
17-
version = "0.8.7"
9+
authors.workspace = true
10+
edition.workspace = true
11+
license.workspace = true
12+
repository.workspace = true
13+
rust-version.workspace = true
14+
15+
[package.metadata.docs.rs]
16+
all-features = true
17+
default-target = "x86_64-apple-darwin"
1818

1919
[dependencies]
20+
core-foundation-sys.workspace = true
21+
2022
libc = "0.2"
2123
uuid = { version = "1", optional = true }
2224

@@ -28,8 +30,3 @@ mac_os_10_8_features = ["core-foundation-sys/mac_os_10_8_features"] # enables ne
2830
with-uuid = ["dep:uuid"]
2931
# Disable to manually link. Enabled by default.
3032
link = ["core-foundation-sys/link"]
31-
32-
33-
[package.metadata.docs.rs]
34-
all-features = true
35-
default-target = "x86_64-apple-darwin"

core-graphics-types/Cargo.toml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
[package]
22
name = "core-graphics-types"
33
description = "Bindings for some fundamental Core Graphics types"
4-
homepage = "https://github.com/servo/core-foundation-rs"
5-
repository = "https://github.com/servo/core-foundation-rs"
64
version = "0.2.0"
7-
authors = ["The Servo Project Developers"]
8-
license = "MIT OR Apache-2.0"
9-
edition = "2018"
10-
rust-version = "1.65"
5+
6+
authors.workspace = true
7+
edition.workspace = true
8+
license.workspace = true
9+
repository.workspace = true
10+
rust-version.workspace = true
11+
12+
[package.metadata.docs.rs]
13+
default-target = "x86_64-apple-darwin"
1114

1215
[dependencies]
13-
core-foundation = { default-features = false, path = "../core-foundation", version = "0.10" }
16+
core-foundation.workspace = true
1417

1518
[features]
1619
default = ["link"]
1720
# Disable to manually link. Enabled by default.
1821
link = ["core-foundation/link"]
19-
20-
[package.metadata.docs.rs]
21-
default-target = "x86_64-apple-darwin"

core-graphics/Cargo.toml

Lines changed: 18 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,29 @@
11
[package]
22
name = "core-graphics"
33
description = "Bindings to Core Graphics for macOS"
4-
homepage = "https://github.com/servo/core-foundation-rs"
5-
repository = "https://github.com/servo/core-foundation-rs"
64
version = "0.24.0"
7-
authors = ["The Servo Project Developers"]
8-
license = "MIT OR Apache-2.0"
9-
edition = "2018"
10-
rust-version = "1.65"
115

12-
[features]
13-
default = ["link"]
14-
elcapitan = []
15-
highsierra = []
16-
# Disable to manually link. Enabled by default.
17-
link = ["core-foundation/link", "core-graphics-types/link"]
6+
authors.workspace = true
7+
edition.workspace = true
8+
license.workspace = true
9+
repository.workspace = true
10+
rust-version.workspace = true
11+
12+
[package.metadata.docs.rs]
13+
all-features = true
14+
default-target = "x86_64-apple-darwin"
1815

1916
[dependencies]
17+
core-foundation.workspace = true
18+
core-graphics-types.workspace = true
19+
2020
bitflags = "2"
21-
core-foundation = { default-features = false, path = "../core-foundation", version = "0.10" }
22-
core-graphics-types = { default-features = false, path = "../core-graphics-types", version = "0.2" }
2321
foreign-types = "0.5.0"
2422
libc = "0.2"
2523

26-
[package.metadata.docs.rs]
27-
all-features = true
28-
default-target = "x86_64-apple-darwin"
24+
[features]
25+
default = ["link"]
26+
elcapitan = []
27+
highsierra = []
28+
# Disable to manually link. Enabled by default.
29+
link = ["core-foundation/link", "core-graphics-types/link"]

core-text/Cargo.toml

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,28 @@
11
[package]
22
name = "core-text"
33
version = "21.0.0"
4-
authors = ["The Servo Project Developers"]
54
description = "Bindings to the Core Text framework."
6-
license = "MIT OR Apache-2.0"
7-
repository = "https://github.com/servo/core-foundation-rs"
8-
edition = "2018"
9-
rust-version = "1.65"
5+
6+
authors.workspace = true
7+
edition.workspace = true
8+
license.workspace = true
9+
repository.workspace = true
10+
rust-version.workspace = true
1011

1112
[package.metadata.docs.rs]
1213
all-features = true
1314
default-target = "x86_64-apple-darwin"
1415

16+
[dependencies]
17+
core-foundation.workspace = true
18+
core-graphics.workspace = true
19+
20+
foreign-types = "0.5"
21+
1522
[features]
1623
default = ["mountainlion", "link"]
1724
# For OS X 10.7 compat, exclude this feature. It will exclude some things from
1825
# the exposed APIs in the crate.
1926
mountainlion = []
2027
# Disable to manually link. Enabled by default.
2128
link = ["core-foundation/link", "core-graphics/link"]
22-
23-
[dependencies]
24-
foreign-types = "0.5"
25-
core-foundation = { default-features = false, path = "../core-foundation", version = "0.10" }
26-
core-graphics = { default-features = false, path = "../core-graphics", version = "0.24" }

io-surface/Cargo.toml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
[package]
22
name = "io-surface"
33
description = "Bindings to IO Surface for macOS"
4-
homepage = "https://github.com/servo/core-foundation-rs"
5-
repository = "https://github.com/servo/core-foundation-rs"
64
version = "0.16.0"
7-
authors = ["The Servo Project Developers"]
8-
license = "MIT OR Apache-2.0"
9-
edition = "2018"
10-
rust-version = "1.65"
5+
6+
authors.workspace = true
7+
edition.workspace = true
8+
license.workspace = true
9+
repository.workspace = true
10+
rust-version.workspace = true
1111

1212
[package.metadata.docs.rs]
1313
default-target = "x86_64-apple-darwin"
1414

1515
[dependencies]
16-
core-foundation = { default-features = false, path = "../core-foundation", version = "0.10" }
17-
core-foundation-sys = { default-features = false, path = "../core-foundation-sys", version = "0.8" }
16+
core-foundation.workspace = true
17+
core-foundation-sys.workspace = true
18+
1819
cgl = "0.3"
1920
leaky-cow = "0.1.1"
2021

0 commit comments

Comments
 (0)