Skip to content

Commit dbdc1a6

Browse files
committed
consolidate versions in one place
1 parent 4db3300 commit dbdc1a6

File tree

7 files changed

+74
-44
lines changed

7 files changed

+74
-44
lines changed

Cargo.toml

Lines changed: 29 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,38 @@ default-members = [
1414
"bindgen-tests",
1515
]
1616

17-
# Dependencies shared between crates
17+
[workspace.package]
18+
# If you change this, also update README.md and msrv in .github/workflows/bindgen.yml
19+
rust-version = "1.70.0"
20+
edition = "2021"
21+
22+
# All dependency version management is centralized here
1823
[workspace.dependencies]
19-
proc-macro2 = { version = "1", default-features = false }
24+
annotate-snippets = "0.11.4"
25+
bindgen = { path = "./bindgen", default-features = false }
26+
bitflags = "2.2.1"
27+
block = "0.1"
28+
cc = "1.0"
29+
cexpr = "0.6"
30+
clang-sys = "1"
31+
clap = "4"
32+
clap_complete = "4"
33+
env_logger = "0.10.0"
34+
itertools = { version = ">=0.10,<0.14", default-features = false }
35+
libloading = "0.7"
36+
log = "0.4"
37+
objc = "0.2"
38+
owo-colors = "3.5.0"
39+
prettyplease = "0.2.7"
40+
proc-macro2 = "1"
41+
quickcheck = "1.0"
42+
quote = { version = "1", default-features = false }
43+
regex = { version = "1.5.3", default-features = false }
44+
rustc-hash = "1.0.1"
2045
shlex = "1"
46+
similar = "2.2.1"
2147
syn = "2.0"
48+
tempfile = "3"
2249

2350
# Config for 'cargo dist'
2451
[workspace.metadata.dist]

bindgen-cli/Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
authors = [
3-
"The rust-bindgen project contributors",
3+
"The rust-bindgen project contributors",
44
]
55
description = "Automatically generates Rust FFI bindings to C and C++ libraries."
66
keywords = ["bindings", "ffi", "code-generation"]
@@ -12,17 +12,17 @@ repository = "https://github.com/rust-lang/rust-bindgen"
1212
documentation = "https://docs.rs/bindgen"
1313
homepage = "https://rust-lang.github.io/rust-bindgen/"
1414
version = "0.70.1"
15-
edition = "2021"
16-
rust-version = "1.70.0"
15+
rust-version.workspace = true
16+
edition.workspace = true
1717

1818
[[bin]]
1919
path = "main.rs"
2020
name = "bindgen"
2121

2222
[dependencies]
23-
bindgen = { path = "../bindgen", version = "=0.70.1", default-features = false, features = ["__cli", "experimental", "prettyplease"] }
24-
env_logger = { version = "0.10.0", optional = true }
25-
log = { version = "0.4", optional = true }
23+
bindgen = { workspace = true, features = ["__cli", "experimental", "prettyplease"] }
24+
env_logger = { workspace = true, optional = true }
25+
log = { workspace = true, optional = true }
2626
proc-macro2.workspace = true
2727
shlex.workspace = true
2828

bindgen-integration/Cargo.toml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ description = "A package to test various bindgen features"
44
version = "0.1.0"
55
authors = ["Emilio Cobos Álvarez <[email protected]>"]
66
publish = false
7-
edition = "2021"
87
build = "build.rs"
8+
rust-version.workspace = true
9+
edition.workspace = true
910

1011
[build-dependencies]
11-
bindgen = { path = "../bindgen", features = ["experimental"] }
12-
cc = "1.0"
12+
bindgen = { workspace = true, default-features = true, features = ["experimental"] }
13+
cc.workspace = true
1314

1415
[features]
1516
static = ["bindgen/static"]

bindgen-tests/Cargo.toml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@ name = "bindgen-tests"
33
edition = "2021"
44
version = "0.1.0"
55
publish = false
6+
rust-version.workspace = true
7+
edition.workspace = true
68

79
[dev-dependencies]
8-
bindgen = { path = "../bindgen", features = ["__cli", "experimental"] }
9-
owo-colors = "3.5.0"
10-
prettyplease = { version = "0.2.7", features = ["verbatim"] }
10+
bindgen = { workspace = true, default-features = true, features = ["__cli", "experimental"] }
11+
owo-colors.workspace = true
12+
prettyplease = { workspace = true, features = ["verbatim"] }
1113
proc-macro2.workspace = true
1214
shlex.workspace = true
13-
similar = { version = "2.2.1", features = ["inline"] }
15+
similar = { workspace = true, features = ["inline"] }
1416
syn.workspace = true
15-
tempfile = "3"
17+
tempfile.workspace = true
1618

1719
[features]
1820
logging = ["bindgen/logging"]

bindgen-tests/tests/expectations/Cargo.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,14 @@ authors = [
77
"Emilio Cobos Álvarez <[email protected]>",
88
"The Servo project developers",
99
]
10-
edition = "2021"
1110
publish = false
11+
rust-version.workspace = true
12+
edition.workspace = true
1213

1314
[dependencies]
14-
block = "0.1"
15-
libloading = "0.7"
16-
objc = "0.2"
15+
block.workspace = true
16+
libloading.workspace = true
17+
objc.workspace = true
1718

1819
[lints.rust]
1920
### FIXME: these might need to be fixed,

bindgen-tests/tests/quickchecking/Cargo.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@ name = "quickchecking"
33
description = "Bindgen property tests with quickcheck. Generate random valid C code and pass it to the csmith/predicate.py script"
44
version = "0.0.0"
55
publish = false
6-
rust-version = "1.70"
7-
edition = "2021"
6+
rust-version.workspace = true
7+
edition.workspace = true
88

99
[lib]
1010
name = "quickchecking"
@@ -15,9 +15,9 @@ name = "quickchecking"
1515
path = "src/bin.rs"
1616

1717
[dependencies]
18-
clap = "4"
19-
quickcheck = "1.0"
20-
tempfile = "3"
18+
clap.workspace = true
19+
quickcheck.workspace = true
20+
tempfile.workspace = true
2121

2222
[features]
2323
# No features by default.

bindgen/Cargo.toml

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
[package]
22
authors = [
3-
"Jyun-Yan You <[email protected]>",
4-
"Emilio Cobos Álvarez <[email protected]>",
5-
"Nick Fitzgerald <[email protected]>",
6-
"The Servo project developers",
3+
"Jyun-Yan You <[email protected]>",
4+
"Emilio Cobos Álvarez <[email protected]>",
5+
"Nick Fitzgerald <[email protected]>",
6+
"The Servo project developers",
77
]
88
description = "Automatically generates Rust FFI bindings to C and C++ libraries."
99
keywords = ["bindings", "ffi", "code-generation"]
@@ -15,29 +15,28 @@ repository = "https://github.com/rust-lang/rust-bindgen"
1515
documentation = "https://docs.rs/bindgen"
1616
homepage = "https://rust-lang.github.io/rust-bindgen/"
1717
version = "0.70.1"
18-
edition = "2021"
1918
build = "build.rs"
20-
# If you change this, also update README.md and msrv in .github/workflows/bindgen.yml
21-
rust-version = "1.70.0"
19+
rust-version.workspace = true
20+
edition.workspace = true
2221

2322
[lib]
2423
name = "bindgen"
2524
path = "lib.rs"
2625

2726
[dependencies]
28-
annotate-snippets = { version = "0.11.4", optional = true }
29-
bitflags = "2.2.1"
30-
cexpr = "0.6"
31-
clang-sys = { version = "1", features = ["clang_11_0"] }
32-
clap = { version = "4", features = ["derive"], optional = true }
33-
clap_complete = { version = "4", optional = true}
34-
itertools = { version = ">=0.10,<0.14", default-features = false }
35-
log = { version = "0.4", optional = true }
36-
prettyplease = { version = "0.2.7", optional = true, features = ["verbatim"] }
27+
annotate-snippets = { workspace = true, optional = true }
28+
bitflags.workspace = true
29+
cexpr.workspace = true
30+
clang-sys = { workspace = true, features = ["clang_11_0"] }
31+
clap = { workspace = true, features = ["derive"], optional = true }
32+
clap_complete = { workspace = true, optional = true }
33+
itertools = { workspace = true }
34+
log = { workspace = true, optional = true }
35+
prettyplease = { workspace = true, optional = true, features = ["verbatim"] }
3736
proc-macro2.workspace = true
38-
quote = { version = "1", default-features = false }
39-
regex = { version = "1.5.3", default-features = false, features = ["std", "unicode-perl"] }
40-
rustc-hash = "1.0.1"
37+
quote.workspace = true
38+
regex = { workspace = true, features = ["std", "unicode-perl"] }
39+
rustc-hash.workspace = true
4140
shlex.workspace = true
4241
syn = { workspace = true, features = ["full", "extra-traits", "visit-mut"] }
4342

0 commit comments

Comments
 (0)