Skip to content

Commit

Permalink
consolidate versions in one place
Browse files Browse the repository at this point in the history
  • Loading branch information
nyurik authored and pvdrz committed Dec 1, 2024
1 parent d5b72c4 commit e55cc8d
Show file tree
Hide file tree
Showing 7 changed files with 74 additions and 45 deletions.
31 changes: 29 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,38 @@ default-members = [
"bindgen-tests",
]

# Dependencies shared between crates
[workspace.package]
# If you change this, also update README.md and msrv in .github/workflows/bindgen.yml
rust-version = "1.70.0"
edition = "2021"

# All dependency version management is centralized here
[workspace.dependencies]
proc-macro2 = { version = "1", default-features = false }
annotate-snippets = "0.11.4"
bindgen = { path = "./bindgen", default-features = false }
bitflags = "2.2.1"
block = "0.1"
cc = "1.0"
cexpr = "0.6"
clang-sys = "1"
clap = "4"
clap_complete = "4"
env_logger = "0.10.0"
itertools = { version = ">=0.10,<0.14", default-features = false }
libloading = "0.7"
log = "0.4"
objc = "0.2"
owo-colors = "3.5.0"
prettyplease = "0.2.7"
proc-macro2 = "1"
quickcheck = "1.0"
quote = { version = "1", default-features = false }
regex = { version = "1.5.3", default-features = false }
rustc-hash = "1.0.1"
shlex = "1"
similar = "2.2.1"
syn = "2.0"
tempfile = "3"

# Config for 'cargo dist'
[workspace.metadata.dist]
Expand Down
12 changes: 6 additions & 6 deletions bindgen-cli/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
authors = [
"The rust-bindgen project contributors",
"The rust-bindgen project contributors",
]
description = "Automatically generates Rust FFI bindings to C and C++ libraries."
keywords = ["bindings", "ffi", "code-generation"]
Expand All @@ -12,17 +12,17 @@ repository = "https://github.com/rust-lang/rust-bindgen"
documentation = "https://docs.rs/bindgen"
homepage = "https://rust-lang.github.io/rust-bindgen/"
version = "0.70.1"
edition = "2021"
rust-version = "1.70.0"
rust-version.workspace = true
edition.workspace = true

[[bin]]
path = "main.rs"
name = "bindgen"

[dependencies]
bindgen = { path = "../bindgen", version = "=0.70.1", default-features = false, features = ["__cli", "experimental", "prettyplease"] }
env_logger = { version = "0.10.0", optional = true }
log = { version = "0.4", optional = true }
bindgen = { workspace = true, features = ["__cli", "experimental", "prettyplease"] }
env_logger = { workspace = true, optional = true }
log = { workspace = true, optional = true }
proc-macro2.workspace = true
shlex.workspace = true

Expand Down
7 changes: 4 additions & 3 deletions bindgen-integration/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@ description = "A package to test various bindgen features"
version = "0.1.0"
authors = ["Emilio Cobos Álvarez <emilio@crisal.io>"]
publish = false
edition = "2021"
build = "build.rs"
rust-version.workspace = true
edition.workspace = true

[build-dependencies]
bindgen = { path = "../bindgen", features = ["experimental"] }
cc = "1.0"
bindgen = { workspace = true, default-features = true, features = ["experimental"] }
cc.workspace = true

[features]
static = ["bindgen/static"]
Expand Down
13 changes: 7 additions & 6 deletions bindgen-tests/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
[package]
name = "bindgen-tests"
edition = "2021"
version = "0.1.0"
publish = false
rust-version.workspace = true
edition.workspace = true

[dev-dependencies]
bindgen = { path = "../bindgen", features = ["__cli", "experimental"] }
owo-colors = "3.5.0"
prettyplease = { version = "0.2.7", features = ["verbatim"] }
bindgen = { workspace = true, default-features = true, features = ["__cli", "experimental"] }
owo-colors.workspace = true
prettyplease = { workspace = true, features = ["verbatim"] }
proc-macro2.workspace = true
shlex.workspace = true
similar = { version = "2.2.1", features = ["inline"] }
similar = { workspace = true, features = ["inline"] }
syn.workspace = true
tempfile = "3"
tempfile.workspace = true

[features]
logging = ["bindgen/logging"]
Expand Down
9 changes: 5 additions & 4 deletions bindgen-tests/tests/expectations/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ authors = [
"Emilio Cobos Álvarez <emilio@crisal.io>",
"The Servo project developers",
]
edition = "2021"
publish = false
rust-version.workspace = true
edition.workspace = true

[dependencies]
block = "0.1"
libloading = "0.7"
objc = "0.2"
block.workspace = true
libloading.workspace = true
objc.workspace = true

[lints.rust]
### FIXME: these might need to be fixed,
Expand Down
10 changes: 5 additions & 5 deletions bindgen-tests/tests/quickchecking/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ name = "quickchecking"
description = "Bindgen property tests with quickcheck. Generate random valid C code and pass it to the csmith/predicate.py script"
version = "0.0.0"
publish = false
rust-version = "1.70"
edition = "2021"
rust-version.workspace = true
edition.workspace = true

[lib]
name = "quickchecking"
Expand All @@ -15,9 +15,9 @@ name = "quickchecking"
path = "src/bin.rs"

[dependencies]
clap = "4"
quickcheck = "1.0"
tempfile = "3"
clap.workspace = true
quickcheck.workspace = true
tempfile.workspace = true

[features]
# No features by default.
Expand Down
37 changes: 18 additions & 19 deletions bindgen/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
[package]
authors = [
"Jyun-Yan You <jyyou.tw@gmail.com>",
"Emilio Cobos Álvarez <emilio@crisal.io>",
"Nick Fitzgerald <fitzgen@gmail.com>",
"The Servo project developers",
"Jyun-Yan You <jyyou.tw@gmail.com>",
"Emilio Cobos Álvarez <emilio@crisal.io>",
"Nick Fitzgerald <fitzgen@gmail.com>",
"The Servo project developers",
]
description = "Automatically generates Rust FFI bindings to C and C++ libraries."
keywords = ["bindings", "ffi", "code-generation"]
Expand All @@ -15,29 +15,28 @@ repository = "https://github.com/rust-lang/rust-bindgen"
documentation = "https://docs.rs/bindgen"
homepage = "https://rust-lang.github.io/rust-bindgen/"
version = "0.70.1"
edition = "2021"
build = "build.rs"
# If you change this, also update README.md and msrv in .github/workflows/bindgen.yml
rust-version = "1.70.0"
rust-version.workspace = true
edition.workspace = true

[lib]
name = "bindgen"
path = "lib.rs"

[dependencies]
annotate-snippets = { version = "0.11.4", optional = true }
bitflags = "2.2.1"
cexpr = "0.6"
clang-sys = { version = "1", features = ["clang_11_0"] }
clap = { version = "4", features = ["derive"], optional = true }
clap_complete = { version = "4", optional = true}
itertools = { version = ">=0.10,<0.14", default-features = false }
log = { version = "0.4", optional = true }
prettyplease = { version = "0.2.7", optional = true, features = ["verbatim"] }
annotate-snippets = { workspace = true, optional = true }
bitflags.workspace = true
cexpr.workspace = true
clang-sys = { workspace = true, features = ["clang_11_0"] }
clap = { workspace = true, features = ["derive"], optional = true }
clap_complete = { workspace = true, optional = true }
itertools = { workspace = true }
log = { workspace = true, optional = true }
prettyplease = { workspace = true, optional = true, features = ["verbatim"] }
proc-macro2.workspace = true
quote = { version = "1", default-features = false }
regex = { version = "1.5.3", default-features = false, features = ["std", "unicode-perl"] }
rustc-hash = "1.0.1"
quote.workspace = true
regex = { workspace = true, features = ["std", "unicode-perl"] }
rustc-hash.workspace = true
shlex.workspace = true
syn = { workspace = true, features = ["full", "extra-traits", "visit-mut"] }

Expand Down

0 comments on commit e55cc8d

Please sign in to comment.