Skip to content

Commit 547a0ed

Browse files
authored
Merge pull request #1401 from dtolnay/foldhash
Switch C++ std::hash<T> implementations to foldhash
2 parents f3cd913 + cf9f18a commit 547a0ed

File tree

21 files changed

+179
-252
lines changed

21 files changed

+179
-252
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
fail-fast: false
2323
matrix:
24-
rust: [nightly, beta, stable, 1.82.0, 1.74.0, 1.71.0]
24+
rust: [nightly, beta, stable, 1.82.0, 1.74.0, 1.73.0]
2525
os: [ubuntu]
2626
include:
2727
- name: Cargo on macOS
@@ -53,7 +53,7 @@ jobs:
5353
# builds.
5454
run: |
5555
echo RUSTFLAGS=$RUSTFLAGS >> $GITHUB_ENV
56-
echo exclude=--exclude cxx-test-suite ${{matrix.rust == '1.71.0' && '--exclude cxxbridge-cmd' || ''}} >> $GITHUB_OUTPUT
56+
echo exclude=--exclude cxx-test-suite ${{matrix.rust == '1.73.0' && '--exclude cxxbridge-cmd' || ''}} >> $GITHUB_OUTPUT
5757
env:
5858
RUSTFLAGS: ${{env.RUSTFLAGS}} ${{matrix.os != 'ubuntu' && github.event_name != 'schedule' && '--cfg skip_ui_tests' || ''}}
5959
id: testsuite

BUCK

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ rust_library(
1313
deps = [
1414
":core",
1515
":cxxbridge-macro",
16+
"//third-party:foldhash",
1617
],
1718
)
1819

BUILD.bazel

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ rust_library(
1313
":cxxbridge-macro",
1414
],
1515
visibility = ["//visibility:public"],
16-
deps = [":core-lib"],
16+
deps = [
17+
":core-lib",
18+
"@crates.io//:foldhash",
19+
],
1720
)
1821

1922
alias(

Cargo.toml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,18 +12,19 @@ keywords = ["ffi", "c++"]
1212
license = "MIT OR Apache-2.0"
1313
links = "cxxbridge1"
1414
repository = "https://github.com/dtolnay/cxx"
15-
rust-version = "1.71"
15+
rust-version = "1.73"
1616

1717
[features]
1818
default = ["std", "cxxbridge-flags/default"] # c++11
1919
"c++14" = ["cxxbridge-flags/c++14"]
2020
"c++17" = ["cxxbridge-flags/c++17"]
2121
"c++20" = ["cxxbridge-flags/c++20"]
2222
alloc = []
23-
std = ["alloc"]
23+
std = ["alloc", "foldhash/std"]
2424

2525
[dependencies]
2626
cxxbridge-macro = { version = "=1.0.130", path = "macro" }
27+
foldhash = { version = "0.1", default-features = false }
2728
link-cplusplus = "1.0.9"
2829

2930
[build-dependencies]

MODULE.bazel.lock

Lines changed: 19 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ cxx = "1.0"
2424
cxx-build = "1.0"
2525
```
2626

27-
*Compiler support: requires rustc 1.71+ and c++11 or newer*<br>
27+
*Compiler support: requires rustc 1.73+ and c++11 or newer*<br>
2828
*[Release notes](https://github.com/dtolnay/cxx/releases)*
2929

3030
<br>

build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ fn main() {
3636
println!("cargo:rustc-check-cfg=cfg(skip_ui_tests)");
3737
}
3838

39-
if rustc.minor < 71 {
40-
println!("cargo:warning=The cxx crate requires a rustc version 1.71.0 or newer.");
39+
if rustc.minor < 73 {
40+
println!("cargo:warning=The cxx crate requires a rustc version 1.73.0 or newer.");
4141
println!(
4242
"cargo:warning=You appear to be building with: {}",
4343
rustc.version,

flags/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ description = "Compiler configuration of the `cxx` crate (implementation detail)
77
edition = "2021"
88
license = "MIT OR Apache-2.0"
99
repository = "https://github.com/dtolnay/cxx"
10-
rust-version = "1.71"
10+
rust-version = "1.73"
1111

1212
[features]
1313
default = [] # c++11

gen/build/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ homepage = "https://cxx.rs"
1111
keywords = ["ffi", "build-dependencies"]
1212
license = "MIT OR Apache-2.0"
1313
repository = "https://github.com/dtolnay/cxx"
14-
rust-version = "1.71"
14+
rust-version = "1.73"
1515

1616
[features]
1717
parallel = ["cc/parallel"]

gen/cmd/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ homepage = "https://cxx.rs"
1010
keywords = ["ffi"]
1111
license = "MIT OR Apache-2.0"
1212
repository = "https://github.com/dtolnay/cxx"
13-
rust-version = "1.71"
13+
rust-version = "1.73"
1414

1515
[[bin]]
1616
name = "cxxbridge"

0 commit comments

Comments
 (0)