Skip to content

Commit

Permalink
Update to Rust v1.81.0. Bump dependencies.
Browse files Browse the repository at this point in the history
  • Loading branch information
CathalMullan committed Sep 6, 2024
1 parent c509a29 commit efee87f
Show file tree
Hide file tree
Showing 12 changed files with 76 additions and 73 deletions.
40 changes: 20 additions & 20 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ workspace = true
[dev-dependencies]
# Snapshots
# NOTE: Keep in sync with `cargo-insta` Nix package.
insta = "1.39.0"
insta = "=1.40.0"

# Encoding
percent-encoding = "2.3"
Expand All @@ -85,16 +85,16 @@ percent-encoding = "2.3"
divan = "0.1"
criterion = { version = "0.5", features = ["html_reports"] }
# NOTE: Keep in sync with `cargo-codspeed` Nix package.
codspeed-criterion-compat = "2.6.0"
codspeed-criterion-compat = "=2.7.1"

# Routers
actix-router = "0.5.3"
matchit = "0.8.3"
ntex-router = "0.5.3"
path-tree = "0.8.1"
route-recognizer = "0.3.1"
routefinder = "0.5.4"
xitca-router = "0.3.0"
actix-router = "=0.5.3"
matchit = "=0.8.4"
ntex-router = "=0.5.3"
path-tree = "=0.8.1"
route-recognizer = "=0.3.1"
routefinder = "=0.5.4"
xitca-router = "=0.3.0"

[[bench]]
name = "matchit_criterion"
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -341,29 +341,29 @@ In a router of 130 routes, benchmark matching 4 paths.

| Library | Time | Alloc Count | Alloc Size | Dealloc Count | Dealloc Size |
|:-----------------|----------:|------------:|-----------:|--------------:|-------------:|
| matchit | 452.82 ns | 4 | 416 B | 4 | 448 B |
| wayfind | 494.10 ns | 7 | 649 B | 7 | 649 B |
| xitca-router | 563.31 ns | 7 | 800 B | 7 | 832 B |
| path-tree | 576.16 ns | 4 | 416 B | 4 | 448 B |
| ntex-router | 1.8631 µs | 18 | 1.248 KB | 18 | 1.28 KB |
| route-recognizer | 4.5737 µs | 160 | 8.515 KB | 160 | 8.547 KB |
| routefinder | 6.4739 µs | 67 | 5.024 KB | 67 | 5.056 KB |
| actix-router | 21.096 µs | 214 | 13.93 KB | 214 | 13.96 KB |
| matchit | 462.33 ns | 4 | 416 B | 4 | 448 B |
| wayfind | 483.07 ns | 7 | 649 B | 7 | 649 B |
| xitca-router | 562.71 ns | 7 | 800 B | 7 | 832 B |
| path-tree | 572.69 ns | 4 | 416 B | 4 | 448 B |
| ntex-router | 1.7347 µs | 18 | 1.248 KB | 18 | 1.28 KB |
| route-recognizer | 4.6183 µs | 160 | 8.515 KB | 160 | 8.547 KB |
| routefinder | 6.5185 µs | 67 | 5.024 KB | 67 | 5.056 KB |
| actix-router | 21.268 µs | 214 | 13.93 KB | 214 | 13.96 KB |

#### `path-tree` inspired benches

In a router of 320 routes, benchmark matching 80 paths.

| Library | Time | Alloc Count | Alloc Size | Dealloc Count | Dealloc Size |
|:-----------------|----------:|------------:|-----------:|--------------:|-------------:|
| wayfind | 7.1797 µs | 117 | 9.991 KB | 117 | 9.991 KB |
| matchit | 8.9181 µs | 140 | 17.81 KB | 140 | 17.83 KB |
| path-tree | 9.5520 µs | 59 | 7.447 KB | 59 | 7.47 KB |
| xitca-router | 10.901 µs | 209 | 25.51 KB | 209 | 25.53 KB |
| ntex-router | 30.615 µs | 201 | 19.54 KB | 201 | 19.56 KB |
| route-recognizer | 91.274 µs | 2872 | 191.8 KB | 2872 | 205 KB |
| routefinder | 98.439 µs | 525 | 48.4 KB | 525 | 48.43 KB |
| actix-router | 177.68 µs | 2201 | 128.8 KB | 2201 | 128.8 KB |
| wayfind | 7.0411 µs | 117 | 9.991 KB | 117 | 9.991 KB |
| matchit | 8.8426 µs | 140 | 17.81 KB | 140 | 17.83 KB |
| path-tree | 9.2876 µs | 59 | 7.447 KB | 59 | 7.47 KB |
| xitca-router | 10.888 µs | 209 | 25.51 KB | 209 | 25.53 KB |
| ntex-router | 30.283 µs | 201 | 19.54 KB | 201 | 19.56 KB |
| routefinder | 99.873 µs | 525 | 48.4 KB | 525 | 48.43 KB |
| route-recognizer | 107.16 µs | 2872 | 191.8 KB | 2872 | 205 KB |
| actix-router | 192.44 µs | 2201 | 128.8 KB | 2201 | 128.8 KB |

## License

Expand Down
2 changes: 1 addition & 1 deletion benches/matchit_criterion.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(clippy::too_many_lines)]

//! Benches sourced from `matchit` (MIT AND BSD-3-Clause)
//! <https://github.com/ibraheemdev/matchit/blob/v0.8.3/benches/bench.rs>
//! <https://github.com/ibraheemdev/matchit/blob/v0.8.4/benches/bench.rs>
use codspeed_criterion_compat::{criterion_group, criterion_main, Criterion};
use matchit_routes::paths;
Expand Down
2 changes: 1 addition & 1 deletion benches/matchit_divan.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#![allow(clippy::too_many_lines)]

//! Benches sourced from `matchit` (MIT AND BSD-3-Clause)
//! <https://github.com/ibraheemdev/matchit/blob/v0.8.3/benches/bench.rs>
//! <https://github.com/ibraheemdev/matchit/blob/v0.8.4/benches/bench.rs>
use divan::AllocProfiler;
use matchit_routes::paths;
Expand Down
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@

buildInputs = with pkgs; [
# Rust
(rust-bin.stable."1.80.1".minimal.override {
(rust-bin.stable."1.81.0".minimal.override {
extensions = [
"clippy"
"rust-analyzer"
Expand All @@ -80,6 +80,7 @@
})
sccache
cargo-insta
cargo-outdated
cargo-watch

# Benchmarking
Expand All @@ -106,7 +107,7 @@
CARGO_INCREMENTAL = "0";

buildInputs = with pkgs; [
(rust-bin.stable."1.80.1".minimal)
(rust-bin.stable."1.81.0".minimal)
sccache
cargo-codspeed
];
Expand All @@ -120,7 +121,7 @@
CARGO_INCREMENTAL = "0";

buildInputs = with pkgs; [
(rust-bin.stable."1.80.1".minimal.override {
(rust-bin.stable."1.81.0".minimal.override {
extensions = [
"clippy"
"rustfmt"
Expand Down Expand Up @@ -152,7 +153,7 @@
CARGO_INCREMENTAL = "0";

buildInputs = with pkgs; [
(rust-bin.stable."1.80.1".minimal)
(rust-bin.stable."1.81.0".minimal)
sccache
];
};
Expand Down Expand Up @@ -204,7 +205,7 @@
OCI_HIDE_SKIPPED_WORKFLOWS = 1;

buildInputs = with pkgs; [
(rust-bin.stable."1.80.1".minimal)
(rust-bin.stable."1.81.0".minimal)
sccache
oci-distribution-spec-conformance
];
Expand Down
12 changes: 6 additions & 6 deletions nix/pkgs/cargo-codspeed/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ rustPlatform.buildRustPackage rec {
pname = "cargo-codspeed";

# NOTE: Keep in sync with `codspeed-criterion-compat` Rust package.
version = "2.6.0";
version = "2.7.1";

src = fetchCrate {
inherit pname version;
hash = "sha256-e4cDZ+sbylS3gaJpl6FLYPUVedBeAOGqtxDw8YbU9U8=";
hash = "sha256-crucisC3wCiEX5eXufricyBY/UuueJNDXQoyGY2+RF0=";
};

cargoHash = "sha256-ihkmD48EG1fWJ38AAt4Hy6dpATIgnEb6kApDfsTKxwA=";
cargoHash = "sha256-47aJR4ZXax39fjhSu/0eVOtnCmmGw+S/8ea/I7/RAg0=";

nativeBuildInputs = [ pkg-config ];
buildInputs =
Expand All @@ -31,14 +31,14 @@ rustPlatform.buildRustPackage rec {
doCheck = false;

meta = with lib; {
description = "A cargo subcommand for running CodSpeed on your project.";
mainProgram = "cargo-codspeed";
homepage = "https://github.com/CodSpeedHQ/codspeed-rust";
changelog = "https://github.com/CodSpeedHQ/codspeed-rust/releases/tag/v${version}";
description = "A cargo subcommand for running CodSpeed on your project.";
changelog = "https://github.com/CodSpeedHQ/codspeed-rust/releases";
license = [
licenses.mit
licenses.asl20
];
platforms = platforms.all;
mainProgram = "cargo-codspeed";
};
}
12 changes: 7 additions & 5 deletions nix/pkgs/cargo-insta/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,23 @@ rustPlatform.buildRustPackage rec {
pname = "cargo-insta";

# NOTE: Keep in sync with `cargo-insta` Rust package.
version = "1.39.0";
version = "1.40.0";

src = fetchCrate {
inherit pname version;
hash = "sha256-LUgiTIVWjxPTCQ1gZq5zL2UMxnEfC09w9xudn/9AUwM=";
hash = "sha256-rdfFriv3ghjqoPvRD7+TcdHehHE8ZGW4n0UT38+rRXc=";
};

cargoHash = "sha256-FH1d8sub8oqUnEr7oO6vofdLoL6KIHgOuF3Exar75t0=";
cargoHash = "sha256-ogIPR1dronvBMyEfSkXfOsrtXYpeWGZ5a/j9ks6m4sQ=";

doCheck = false;

meta = with lib; {
description = "A Cargo subcommand for snapshot testing.";
mainProgram = "cargo-insta";
homepage = "https://github.com/mitsuhiko/insta";
description = "A Cargo subcommand for snapshot testing.";
changelog = "https://github.com/mitsuhiko/insta/releases";
license = licenses.asl20;
platforms = platforms.all;
mainProgram = "cargo-insta";
};
}
4 changes: 2 additions & 2 deletions nix/pkgs/oci-distribution-spec-conformance/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ buildGoModule rec {
doCheck = false;

meta = with lib; {
description = " OCI Distribution Specification Conformance Tests";
mainProgram = "oci-distribution-spec-conformance";
homepage = "https://opencontainers.org";
description = " OCI Distribution Specification Conformance Tests";
changelog = "https://github.com/opencontainers/distribution-spec/releases";
license = licenses.asl20;
platforms = platforms.all;
mainProgram = "oci-distribution-spec-conformance";
};
}
2 changes: 1 addition & 1 deletion tests/matchit_delete.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Tests sourced from `matchit` (MIT AND BSD-3-Clause)
//! <https://github.com/ibraheemdev/matchit/blob/v0.8.3/tests/remove.rs>
//! <https://github.com/ibraheemdev/matchit/blob/v0.8.4/tests/remove.rs>
#![allow(clippy::too_many_lines, clippy::cognitive_complexity)]

Expand Down
2 changes: 1 addition & 1 deletion tests/matchit_matches.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Tests sourced from `matchit` (MIT AND BSD-3-Clause)
//! <https://github.com/ibraheemdev/matchit/blob/v0.8.3/tests/match.rs>
//! <https://github.com/ibraheemdev/matchit/blob/v0.8.4/tests/match.rs>
#![allow(clippy::too_many_lines)]

Expand Down

0 comments on commit efee87f

Please sign in to comment.