Skip to content

Commit

Permalink
Use workspace inheritance. (#701)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
waywardmonkeys authored Aug 12, 2024
1 parent 84b8365 commit 39a3955
Show file tree
Hide file tree
Showing 9 changed files with 107 additions and 92 deletions.
14 changes: 14 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,2 +1,16 @@
[workspace]
members = ["core-foundation", "core-foundation-sys", "core-graphics-types", "core-graphics", "core-text", "cocoa", "cocoa-foundation", "io-surface"]

[workspace.package]
authors = ["The Servo Project Developers"]
edition = "2018"
license = "MIT OR Apache-2.0"
repository = "https://github.com/servo/core-foundation-rs"
rust-version = "1.65"

[workspace.dependencies]
cocoa-foundation = { default-features = false, path = "cocoa-foundation", version = "0.2" }
core-foundation = { default-features = false, path = "core-foundation", version = "0.10" }
core-foundation-sys = { default-features = false, path = "core-foundation-sys", version = "0.8" }
core-graphics = { default-features = false, path = "core-graphics", version = "0.24" }
core-graphics-types = { default-features = false, path = "core-graphics-types", version = "0.2" }
20 changes: 10 additions & 10 deletions cocoa-foundation/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@

[package]
name = "cocoa-foundation"
description = "Bindings to Cocoa Foundation for macOS"
homepage = "https://github.com/servo/core-foundation-rs"
repository = "https://github.com/servo/core-foundation-rs"
version = "0.2.0"
authors = ["The Servo Project Developers"]
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.65"

authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true

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

[dependencies]
block = "0.1"
core-foundation.workspace = true
core-graphics-types.workspace = true

bitflags = "2"
core-foundation = { default-features = false, path = "../core-foundation", version = "0.10" }
core-graphics-types = { default-features = false, path = "../core-graphics-types", version = "0.2" }
block = "0.1"
objc = "0.2.3"

[features]
Expand Down
24 changes: 12 additions & 12 deletions cocoa/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@

[package]
name = "cocoa"
description = "Bindings to Cocoa for macOS"
homepage = "https://github.com/servo/core-foundation-rs"
repository = "https://github.com/servo/core-foundation-rs"
version = "0.26.0"
authors = ["The Servo Project Developers"]
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.65"

authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true

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

[dependencies]
block = "0.1"
cocoa-foundation.workspace = true
core-foundation.workspace = true
core-graphics.workspace = true

bitflags = "2"
libc = "0.2"
cocoa-foundation = { default-features = false, path = "../cocoa-foundation", version = "0.2" }
core-foundation = { default-features = false, path = "../core-foundation", version = "0.10" }
core-graphics = { default-features = false, path = "../core-graphics", version = "0.24" }
block = "0.1"
foreign-types = "0.5"
libc = "0.2"
objc = "0.2.3"

[features]
Expand Down
20 changes: 10 additions & 10 deletions core-foundation-sys/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
[package]
name = "core-foundation-sys"
description = "Bindings to Core Foundation for macOS"
homepage = "https://github.com/servo/core-foundation-rs"
repository = "https://github.com/servo/core-foundation-rs"
version = "0.8.7"
authors = ["The Servo Project Developers"]
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.65"

authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true

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

[dependencies]

Expand All @@ -17,7 +21,3 @@ mac_os_10_7_support = [] # backwards compatibility
mac_os_10_8_features = [] # enables new features
# Disable to manually link. Enabled by default.
link = []

[package.metadata.docs.rs]
all-features = true
default-target = "x86_64-apple-darwin"
27 changes: 12 additions & 15 deletions core-foundation/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,22 +1,24 @@
[package]
name = "core-foundation"
description = "Bindings to Core Foundation for macOS"
homepage = "https://github.com/servo/core-foundation-rs"
repository = "https://github.com/servo/core-foundation-rs"
version = "0.10.0"
authors = ["The Servo Project Developers"]
license = "MIT OR Apache-2.0"

categories = ["os::macos-apis"]
keywords = ["macos", "framework", "objc"]
edition = "2018"
rust-version = "1.65"

[dependencies.core-foundation-sys]
path = "../core-foundation-sys"
default-features = false
version = "0.8.7"
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true

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

[dependencies]
core-foundation-sys.workspace = true

libc = "0.2"
uuid = { version = "1", optional = true }

Expand All @@ -28,8 +30,3 @@ mac_os_10_8_features = ["core-foundation-sys/mac_os_10_8_features"] # enables ne
with-uuid = ["dep:uuid"]
# Disable to manually link. Enabled by default.
link = ["core-foundation-sys/link"]


[package.metadata.docs.rs]
all-features = true
default-target = "x86_64-apple-darwin"
20 changes: 10 additions & 10 deletions core-graphics-types/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
[package]
name = "core-graphics-types"
description = "Bindings for some fundamental Core Graphics types"
homepage = "https://github.com/servo/core-foundation-rs"
repository = "https://github.com/servo/core-foundation-rs"
version = "0.2.0"
authors = ["The Servo Project Developers"]
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.65"

authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true

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

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

[features]
default = ["link"]
# Disable to manually link. Enabled by default.
link = ["core-foundation/link"]

[package.metadata.docs.rs]
default-target = "x86_64-apple-darwin"
35 changes: 18 additions & 17 deletions core-graphics/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,29 @@
[package]
name = "core-graphics"
description = "Bindings to Core Graphics for macOS"
homepage = "https://github.com/servo/core-foundation-rs"
repository = "https://github.com/servo/core-foundation-rs"
version = "0.24.0"
authors = ["The Servo Project Developers"]
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.65"

[features]
default = ["link"]
elcapitan = []
highsierra = []
# Disable to manually link. Enabled by default.
link = ["core-foundation/link", "core-graphics-types/link"]
authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true

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

[dependencies]
core-foundation.workspace = true
core-graphics-types.workspace = true

bitflags = "2"
core-foundation = { default-features = false, path = "../core-foundation", version = "0.10" }
core-graphics-types = { default-features = false, path = "../core-graphics-types", version = "0.2" }
foreign-types = "0.5.0"
libc = "0.2"

[package.metadata.docs.rs]
all-features = true
default-target = "x86_64-apple-darwin"
[features]
default = ["link"]
elcapitan = []
highsierra = []
# Disable to manually link. Enabled by default.
link = ["core-foundation/link", "core-graphics-types/link"]
22 changes: 12 additions & 10 deletions core-text/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
[package]
name = "core-text"
version = "21.0.0"
authors = ["The Servo Project Developers"]
description = "Bindings to the Core Text framework."
license = "MIT OR Apache-2.0"
repository = "https://github.com/servo/core-foundation-rs"
edition = "2018"
rust-version = "1.65"

authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true

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

[dependencies]
core-foundation.workspace = true
core-graphics.workspace = true

foreign-types = "0.5"

[features]
default = ["mountainlion", "link"]
# For OS X 10.7 compat, exclude this feature. It will exclude some things from
# the exposed APIs in the crate.
mountainlion = []
# Disable to manually link. Enabled by default.
link = ["core-foundation/link", "core-graphics/link"]

[dependencies]
foreign-types = "0.5"
core-foundation = { default-features = false, path = "../core-foundation", version = "0.10" }
core-graphics = { default-features = false, path = "../core-graphics", version = "0.24" }
17 changes: 9 additions & 8 deletions io-surface/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
[package]
name = "io-surface"
description = "Bindings to IO Surface for macOS"
homepage = "https://github.com/servo/core-foundation-rs"
repository = "https://github.com/servo/core-foundation-rs"
version = "0.16.0"
authors = ["The Servo Project Developers"]
license = "MIT OR Apache-2.0"
edition = "2018"
rust-version = "1.65"

authors.workspace = true
edition.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true

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

[dependencies]
core-foundation = { default-features = false, path = "../core-foundation", version = "0.10" }
core-foundation-sys = { default-features = false, path = "../core-foundation-sys", version = "0.8" }
core-foundation.workspace = true
core-foundation-sys.workspace = true

cgl = "0.3"
leaky-cow = "0.1.1"

Expand Down

0 comments on commit 39a3955

Please sign in to comment.