Update sentry-rust monorepo to 0.35.0 #6

Open
gitea-bot wants to merge 5 commits from renovate/sentry-rust-monorepo into main
5 changed files with 261 additions and 181 deletions
Showing only changes of commit 8495d0ad23 - Show all commits

81
Cargo.lock generated
View file

@ -875,9 +875,9 @@ dependencies = [
[[package]]
name = "cc"
version = "1.2.2"
version = "1.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc"
checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d"
dependencies = [
"jobserver",
"libc",
@ -1011,7 +1011,7 @@ dependencies = [
"eyre",
"rustls 0.23.19",
"tokio",
"tokio-rustls 0.26.0",
"tokio-rustls 0.26.1",
"tracing",
"url",
]
@ -1058,7 +1058,7 @@ dependencies = [
"http 1.2.0",
"mime",
"serde",
"thiserror 2.0.4",
"thiserror 2.0.5",
"tracing",
]
@ -1108,9 +1108,9 @@ dependencies = [
[[package]]
name = "clap"
version = "4.5.22"
version = "4.5.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69371e34337c4c984bbe322360c2547210bf632eb2814bbe78a6e87a2935bd2b"
checksum = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84"
dependencies = [
"clap_builder",
"clap_derive",
@ -1118,9 +1118,9 @@ dependencies = [
[[package]]
name = "clap_builder"
version = "4.5.22"
version = "4.5.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6e24c1b4099818523236a8ca881d2b45db98dadfb4625cf6608c12069fcbbde1"
checksum = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838"
dependencies = [
"anstream",
"anstyle",
@ -1142,9 +1142,9 @@ dependencies = [
[[package]]
name = "clap_lex"
version = "0.7.3"
version = "0.7.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7"
checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6"
[[package]]
name = "cmake"
@ -2056,7 +2056,7 @@ dependencies = [
"rustls 0.23.19",
"rustls-pki-types",
"tokio",
"tokio-rustls 0.26.0",
"tokio-rustls 0.26.1",
"tower-service",
"webpki-roots",
]
@ -2314,9 +2314,9 @@ dependencies = [
[[package]]
name = "js-sys"
version = "0.3.74"
version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705"
checksum = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7"
dependencies = [
"once_cell",
"wasm-bindgen",
@ -2891,7 +2891,7 @@ dependencies = [
"rustc-hash 2.1.0",
"rustls 0.23.19",
"socket2",
"thiserror 2.0.4",
"thiserror 2.0.5",
"tokio",
"tracing",
]
@ -2910,7 +2910,7 @@ dependencies = [
"rustls 0.23.19",
"rustls-pki-types",
"slab",
"thiserror 2.0.4",
"thiserror 2.0.5",
"tinyvec",
"tracing",
"web-time",
@ -3058,6 +3058,7 @@ dependencies = [
"futures-channel",
"futures-core",
"futures-util",
"h2 0.4.7",
"http 1.2.0",
"http-body 1.0.1",
"http-body-util",
@ -3080,7 +3081,7 @@ dependencies = [
"serde_urlencoded",
"sync_wrapper 1.0.2",
"tokio",
"tokio-rustls 0.26.0",
"tokio-rustls 0.26.1",
"tokio-util",
"tower-service",
"url",
@ -4032,11 +4033,11 @@ dependencies = [
[[package]]
name = "thiserror"
version = "2.0.4"
version = "2.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490"
checksum = "643caef17e3128658ff44d85923ef2d28af81bb71e0d67bbfe1d76f19a73e053"
dependencies = [
"thiserror-impl 2.0.4",
"thiserror-impl 2.0.5",
]
[[package]]
@ -4052,9 +4053,9 @@ dependencies = [
[[package]]
name = "thiserror-impl"
version = "2.0.4"
version = "2.0.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061"
checksum = "995d0bbc9995d1f19d28b7215a9352b0fc3cd3a2d2ec95c2cadc485cdedbcdde"
dependencies = [
"proc-macro2",
"quote",
@ -4167,20 +4168,19 @@ dependencies = [
[[package]]
name = "tokio-rustls"
version = "0.26.0"
version = "0.26.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4"
checksum = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37"
dependencies = [
"rustls 0.23.19",
"rustls-pki-types",
"tokio",
]
[[package]]
name = "tokio-stream"
version = "0.1.16"
version = "0.1.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1"
checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047"
dependencies = [
"futures-core",
"pin-project-lite",
@ -4586,9 +4586,9 @@ checksum = "b8dad83b4f25e74f184f64c43b150b91efe7647395b42289f38e50566d82855b"
[[package]]
name = "wasm-bindgen"
version = "0.2.97"
version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c"
checksum = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396"
dependencies = [
"cfg-if",
"once_cell",
@ -4597,13 +4597,12 @@ dependencies = [
[[package]]
name = "wasm-bindgen-backend"
version = "0.2.97"
version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd"
checksum = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79"
dependencies = [
"bumpalo",
"log",
"once_cell",
"proc-macro2",
"quote",
"syn",
@ -4612,9 +4611,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-futures"
version = "0.4.47"
version = "0.4.49"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d"
checksum = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2"
dependencies = [
"cfg-if",
"js-sys",
@ -4625,9 +4624,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.97"
version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051"
checksum = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@ -4635,9 +4634,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.97"
version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d"
checksum = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2"
dependencies = [
"proc-macro2",
"quote",
@ -4648,9 +4647,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.97"
version = "0.2.99"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49"
checksum = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6"
[[package]]
name = "wasm-streams"
@ -4667,9 +4666,9 @@ dependencies = [
[[package]]
name = "web-sys"
version = "0.3.74"
version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c"
checksum = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc"
dependencies = [
"js-sys",
"wasm-bindgen",

213
Cargo.nix
View file

@ -32,7 +32,7 @@ args@{
ignoreLockHash,
}:
let
nixifiedLockHash = "51a600afd0b9503f1748762462902306933599d46304da01c1ecdecdb6049697";
nixifiedLockHash = "0c0b31dc0753cf3ae143f348e9410457d8096f15bd25e65b9bda8c1ea66f6387";
workspaceSrc = if args.workspaceSrc == null then ./. else args.workspaceSrc;
currentLockHash = builtins.hashFile "sha256" (workspaceSrc + /Cargo.lock);
lockHashIgnored =
@ -880,7 +880,7 @@ else
profileName = "__noProfile";
}).out;
cc =
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.2" {
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.3" {
profileName = "__noProfile";
}).out;
cmake =
@ -2365,7 +2365,7 @@ else
};
buildDependencies = {
cc =
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.2" {
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.3" {
profileName = "__noProfile";
}).out;
};
@ -2680,7 +2680,7 @@ else
};
buildDependencies = {
cc =
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.2" {
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.3" {
profileName = "__noProfile";
}).out;
};
@ -2788,15 +2788,15 @@ else
};
});
"registry+https://github.com/rust-lang/crates.io-index".cc."1.2.2" =
"registry+https://github.com/rust-lang/crates.io-index".cc."1.2.3" =
overridableMkRustCrate
(profileName: rec {
name = "cc";
version = "1.2.2";
version = "1.2.3";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "f34d93e62b03caf570cccc334cbc6c2fceca82f39211051345108adcba3eebdc";
sha256 = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d";
};
features = builtins.concatLists [
[ "parallel" ]
@ -3003,7 +3003,7 @@ else
}).out;
chir_rs_http_api = (rustPackages."unknown".chir-rs-http-api."0.1.0" { inherit profileName; }).out;
clap =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap."4.5.22" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap."4.5.23" {
inherit profileName;
}).out;
color_eyre =
@ -3147,7 +3147,7 @@ else
inherit profileName;
}).out;
tokio_rustls =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.26.0" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.26.1" {
inherit profileName;
}).out;
tracing =
@ -3297,7 +3297,7 @@ else
inherit profileName;
}).out;
thiserror =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."2.0.4" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."2.0.5" {
inherit profileName;
}).out;
tracing =
@ -3377,7 +3377,7 @@ else
else
null
} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.74" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.76" {
inherit profileName;
}).out;
num_traits =
@ -3393,7 +3393,7 @@ else
else
null
} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.97" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.99" {
inherit profileName;
}).out;
${if hostPlatform.isWindows then "windows_targets" else null} =
@ -3469,15 +3469,15 @@ else
};
});
"registry+https://github.com/rust-lang/crates.io-index".clap."4.5.22" =
"registry+https://github.com/rust-lang/crates.io-index".clap."4.5.23" =
overridableMkRustCrate
(profileName: rec {
name = "clap";
version = "4.5.22";
version = "4.5.23";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "69371e34337c4c984bbe322360c2547210bf632eb2814bbe78a6e87a2935bd2b";
sha256 = "3135e7ec2ef7b10c6ed8950f0f792ed96ee093fa088608f1c76e569722700c84";
};
features = builtins.concatLists [
[ "color" ]
@ -3491,7 +3491,7 @@ else
];
dependencies = {
clap_builder =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap_builder."4.5.22" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap_builder."4.5.23" {
inherit profileName;
}).out;
clap_derive =
@ -3501,15 +3501,15 @@ else
};
});
"registry+https://github.com/rust-lang/crates.io-index".clap_builder."4.5.22" =
"registry+https://github.com/rust-lang/crates.io-index".clap_builder."4.5.23" =
overridableMkRustCrate
(profileName: rec {
name = "clap_builder";
version = "4.5.22";
version = "4.5.23";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "6e24c1b4099818523236a8ca881d2b45db98dadfb4625cf6608c12069fcbbde1";
sha256 = "30582fc632330df2bd26877bde0c1f4470d57c582bbc070376afcd04d8cb4838";
};
features = builtins.concatLists [
[ "color" ]
@ -3529,7 +3529,7 @@ else
inherit profileName;
}).out;
clap_lex =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap_lex."0.7.3" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".clap_lex."0.7.4" {
inherit profileName;
}).out;
strsim =
@ -3572,15 +3572,15 @@ else
};
});
"registry+https://github.com/rust-lang/crates.io-index".clap_lex."0.7.3" =
"registry+https://github.com/rust-lang/crates.io-index".clap_lex."0.7.4" =
overridableMkRustCrate
(profileName: rec {
name = "clap_lex";
version = "0.7.3";
version = "0.7.4";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "afb84c814227b90d6895e01398aee0d8033c00e7466aca416fb6a8e0eb19d8a7";
sha256 = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6";
};
});
@ -3596,7 +3596,7 @@ else
};
dependencies = {
cc =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.2" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.3" {
inherit profileName;
}).out;
};
@ -4768,7 +4768,7 @@ else
};
buildDependencies = {
cc =
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.2" {
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.3" {
profileName = "__noProfile";
}).out;
};
@ -5250,7 +5250,7 @@ else
else
null
} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.74" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.76" {
inherit profileName;
}).out;
${if hostPlatform.isUnix then "libc" else null} =
@ -5271,7 +5271,7 @@ else
else
null
} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.97" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.99" {
inherit profileName;
}).out;
};
@ -6070,6 +6070,7 @@ else
};
features = builtins.concatLists [
[ "http1" ]
[ "http2" ]
[ "ring" ]
[ "tls12" ]
[ "webpki-roots" ]
@ -6105,7 +6106,7 @@ else
inherit profileName;
}).out;
tokio_rustls =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.26.0" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.26.1" {
inherit profileName;
}).out;
tower_service =
@ -6226,7 +6227,7 @@ else
else
null
} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.74" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.76" {
inherit profileName;
}).out;
${
@ -6235,7 +6236,7 @@ else
else
null
} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.97" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.99" {
inherit profileName;
}).out;
${if hostPlatform.parsed.kernel.name == "windows" then "windows_core" else null} =
@ -6257,7 +6258,7 @@ else
};
buildDependencies = {
cc =
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.2" {
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.3" {
profileName = "__noProfile";
}).out;
};
@ -6808,15 +6809,15 @@ else
};
});
"registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.74" =
"registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.76" =
overridableMkRustCrate
(profileName: rec {
name = "js-sys";
version = "0.3.74";
version = "0.3.76";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "a865e038f7f6ed956f788f0d7d60c541fff74c7bd74272c5d4cf15c63743e705";
sha256 = "6717b6b5b077764fb5966237269cb3c64edddde4b14ce42647430a78ced9e7b7";
};
features = builtins.concatLists [
[ "default" ]
@ -6828,7 +6829,7 @@ else
inherit profileName;
}).out;
wasm_bindgen =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.97" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.99" {
inherit profileName;
}).out;
};
@ -6942,7 +6943,7 @@ else
];
buildDependencies = {
cc =
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.2" {
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.3" {
profileName = "__noProfile";
}).out;
pkg_config =
@ -8324,7 +8325,7 @@ else
else
null
} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.74" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.76" {
inherit profileName;
}).out;
${if hostPlatform.parsed.kernel.name == "windows" then "winapi" else null} =
@ -8380,7 +8381,7 @@ else
inherit profileName;
}).out;
thiserror =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."2.0.4" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."2.0.5" {
inherit profileName;
}).out;
tokio =
@ -8442,7 +8443,7 @@ else
inherit profileName;
}).out;
thiserror =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."2.0.4" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror."2.0.5" {
inherit profileName;
}).out;
tinyvec =
@ -8871,6 +8872,8 @@ else
[ "__rustls-ring" ]
[ "__tls" ]
[ "blocking" ]
[ "h2" ]
[ "http2" ]
[ "json" ]
[ "rustls-tls" ]
[ "rustls-tls-webpki-roots" ]
@ -8898,6 +8901,10 @@ else
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".futures-util."0.3.31" {
inherit profileName;
}).out;
${if !(hostPlatform.parsed.cpu.name == "wasm32") then "h2" else null} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".h2."0.4.7" {
inherit profileName;
}).out;
http =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".http."1.2.0" {
inherit profileName;
@ -8927,7 +8934,7 @@ else
inherit profileName;
}).out;
${if hostPlatform.parsed.cpu.name == "wasm32" then "js_sys" else null} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.74" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.76" {
inherit profileName;
}).out;
${if !(hostPlatform.parsed.cpu.name == "wasm32") then "log" else null} =
@ -8987,7 +8994,7 @@ else
inherit profileName;
}).out;
${if !(hostPlatform.parsed.cpu.name == "wasm32") then "tokio_rustls" else null} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.26.0" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.26.1" {
inherit profileName;
}).out;
${if !(hostPlatform.parsed.cpu.name == "wasm32") then "tokio_util" else null} =
@ -9003,11 +9010,11 @@ else
inherit profileName;
}).out;
${if hostPlatform.parsed.cpu.name == "wasm32" then "wasm_bindgen" else null} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.97" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.99" {
inherit profileName;
}).out;
${if hostPlatform.parsed.cpu.name == "wasm32" then "wasm_bindgen_futures" else null} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.4.47"
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.4.49"
{ inherit profileName; }
).out;
${if hostPlatform.parsed.cpu.name == "wasm32" then "wasm_streams" else null} =
@ -9015,7 +9022,7 @@ else
inherit profileName;
}).out;
${if hostPlatform.parsed.cpu.name == "wasm32" then "web_sys" else null} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.74" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.76" {
inherit profileName;
}).out;
${if !(hostPlatform.parsed.cpu.name == "wasm32") then "webpki_roots" else null} =
@ -9128,7 +9135,7 @@ else
};
buildDependencies = {
cc =
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.2" {
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".cc."1.2.3" {
profileName = "__noProfile";
}).out;
};
@ -11150,7 +11157,7 @@ else
inherit profileName;
}).out;
tokio_stream =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.16" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.17" {
inherit profileName;
}).out;
tracing =
@ -11982,15 +11989,15 @@ else
};
});
"registry+https://github.com/rust-lang/crates.io-index".thiserror."2.0.4" =
"registry+https://github.com/rust-lang/crates.io-index".thiserror."2.0.5" =
overridableMkRustCrate
(profileName: rec {
name = "thiserror";
version = "2.0.4";
version = "2.0.5";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "2f49a1853cf82743e3b7950f77e0f4d622ca36cf4317cba00c767838bac8d490";
sha256 = "643caef17e3128658ff44d85923ef2d28af81bb71e0d67bbfe1d76f19a73e053";
};
features = builtins.concatLists [
[ "default" ]
@ -11998,7 +12005,7 @@ else
];
dependencies = {
thiserror_impl =
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."2.0.4" {
(buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."2.0.5" {
profileName = "__noProfile";
}).out;
};
@ -12030,15 +12037,15 @@ else
};
});
"registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."2.0.4" =
"registry+https://github.com/rust-lang/crates.io-index".thiserror-impl."2.0.5" =
overridableMkRustCrate
(profileName: rec {
name = "thiserror-impl";
version = "2.0.4";
version = "2.0.5";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "8381894bb3efe0c4acac3ded651301ceee58a15d47c2e34885ed1908ad667061";
sha256 = "995d0bbc9995d1f19d28b7215a9352b0fc3cd3a2d2ec95c2cadc485cdedbcdde";
};
dependencies = {
proc_macro2 =
@ -12349,15 +12356,15 @@ else
};
});
"registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.26.0" =
"registry+https://github.com/rust-lang/crates.io-index".tokio-rustls."0.26.1" =
overridableMkRustCrate
(profileName: rec {
name = "tokio-rustls";
version = "0.26.0";
version = "0.26.1";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "0c7bc40d0e5a97695bb96e27995cd3a08538541b0a846f65bba7a359f36700d4";
sha256 = "5f6d0975eaace0cf0fcadee4e4aaa5da15b5c079146f2cffb67c113be122bf37";
};
features = builtins.concatLists [
[ "aws_lc_rs" ]
@ -12371,10 +12378,6 @@ else
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls."0.23.19" {
inherit profileName;
}).out;
pki_types =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".rustls-pki-types."1.10.0" {
inherit profileName;
}).out;
tokio =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".tokio."1.42.0" {
inherit profileName;
@ -12382,15 +12385,15 @@ else
};
});
"registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.16" =
"registry+https://github.com/rust-lang/crates.io-index".tokio-stream."0.1.17" =
overridableMkRustCrate
(profileName: rec {
name = "tokio-stream";
version = "0.1.16";
version = "0.1.17";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "4f4e6ce100d0eb49a2734f8c0812bcd324cf357d21810932c5df6b96ef2b86f1";
sha256 = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047";
};
features = builtins.concatLists [
[ "default" ]
@ -13478,15 +13481,15 @@ else
};
});
"registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.97" =
"registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.99" =
overridableMkRustCrate
(profileName: rec {
name = "wasm-bindgen";
version = "0.2.97";
version = "0.2.99";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "d15e63b4482863c109d70a7b8706c1e364eb6ea449b201a76c5b89cedcec2d5c";
sha256 = "a474f6281d1d70c17ae7aa6a613c87fce69a127e2624002df63dcb39d6cf6396";
};
features = builtins.concatLists [
[ "default" ]
@ -13504,25 +13507,23 @@ else
}).out;
wasm_bindgen_macro =
(
buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.97"
buildRustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.99"
{ profileName = "__noProfile"; }
).out;
};
});
"registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-backend."0.2.97" =
"registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-backend."0.2.99" =
overridableMkRustCrate
(profileName: rec {
name = "wasm-bindgen-backend";
version = "0.2.97";
version = "0.2.99";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "8d36ef12e3aaca16ddd3f67922bc63e48e953f126de60bd33ccc0101ef9998cd";
sha256 = "5f89bb38646b4f81674e8f5c3fb81b562be1fd936d84320f3264486418519c79";
};
features = builtins.concatLists [
[ "atomics" ]
[ "coverage" ]
[ "spans" ]
[ "std" ]
];
@ -13535,10 +13536,6 @@ else
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".log."0.4.22" {
inherit profileName;
}).out;
once_cell =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".once_cell."1.20.2" {
inherit profileName;
}).out;
proc_macro2 =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".proc-macro2."1.0.92" {
inherit profileName;
@ -13552,21 +13549,21 @@ else
inherit profileName;
}).out;
wasm_bindgen_shared =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.97" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.99" {
inherit profileName;
}).out;
};
});
"registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.4.47" =
"registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.4.49" =
overridableMkRustCrate
(profileName: rec {
name = "wasm-bindgen-futures";
version = "0.4.47";
version = "0.4.49";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "9dfaf8f50e5f293737ee323940c7d8b08a66a95a419223d9f41610ca08b0833d";
sha256 = "38176d9b44ea84e9184eff0bc34cc167ed044f816accfe5922e54d84cf48eca2";
};
features = builtins.concatLists [
[ "default" ]
@ -13578,7 +13575,7 @@ else
inherit profileName;
}).out;
js_sys =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.74" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.76" {
inherit profileName;
}).out;
once_cell =
@ -13586,29 +13583,27 @@ else
inherit profileName;
}).out;
wasm_bindgen =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.97" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.99" {
inherit profileName;
}).out;
${if builtins.elem "atomics" hostPlatformFeatures then "web_sys" else null} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.74" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.76" {
inherit profileName;
}).out;
};
});
"registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.97" =
"registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro."0.2.99" =
overridableMkRustCrate
(profileName: rec {
name = "wasm-bindgen-macro";
version = "0.2.97";
version = "0.2.99";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "705440e08b42d3e4b36de7d66c944be628d579796b8090bfa3471478a2260051";
sha256 = "2cc6181fd9a7492eef6fef1f33961e3695e4579b9872a6f7c83aee556666d4fe";
};
features = builtins.concatLists [
[ "atomics" ]
[ "coverage" ]
[ "spans" ]
[ "std" ]
];
@ -13619,25 +13614,23 @@ else
}).out;
wasm_bindgen_macro_support =
(
rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro-support."0.2.97"
rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro-support."0.2.99"
{ inherit profileName; }
).out;
};
});
"registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro-support."0.2.97" =
"registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-macro-support."0.2.99" =
overridableMkRustCrate
(profileName: rec {
name = "wasm-bindgen-macro-support";
version = "0.2.97";
version = "0.2.99";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "98c9ae5a76e46f4deecd0f0255cc223cfa18dc9b261213b8aa0c7b36f61b3f1d";
sha256 = "30d7a95b763d3c45903ed6c81f156801839e5ee968bb07e534c44df0fcd330c2";
};
features = builtins.concatLists [
[ "atomics" ]
[ "coverage" ]
[ "spans" ]
[ "std" ]
];
@ -13655,25 +13648,25 @@ else
inherit profileName;
}).out;
wasm_bindgen_backend =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-backend."0.2.97"
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-backend."0.2.99"
{ inherit profileName; }
).out;
wasm_bindgen_shared =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.97" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.99" {
inherit profileName;
}).out;
};
});
"registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.97" =
"registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-shared."0.2.99" =
overridableMkRustCrate
(profileName: rec {
name = "wasm-bindgen-shared";
version = "0.2.97";
version = "0.2.99";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "6ee99da9c5ba11bd675621338ef6fa52296b76b83305e9b6e5c77d4c286d6d49";
sha256 = "943aab3fdaaa029a6e0271b35ea10b72b943135afe9bffca82384098ad0e06a6";
};
});
@ -13693,33 +13686,33 @@ else
inherit profileName;
}).out;
js_sys =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.74" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.76" {
inherit profileName;
}).out;
wasm_bindgen =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.97" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.99" {
inherit profileName;
}).out;
wasm_bindgen_futures =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.4.47"
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen-futures."0.4.49"
{ inherit profileName; }
).out;
web_sys =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.74" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.76" {
inherit profileName;
}).out;
};
});
"registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.74" =
"registry+https://github.com/rust-lang/crates.io-index".web-sys."0.3.76" =
overridableMkRustCrate
(profileName: rec {
name = "web-sys";
version = "0.3.74";
version = "0.3.76";
registry = "registry+https://github.com/rust-lang/crates.io-index";
src = fetchCratesIo {
inherit name version;
sha256 = "a98bc3c33f0fe7e59ad7cd041b89034fa82a7c2d4365ca538dda6cdaf513863c";
sha256 = "04dd7223427d52553d3702c004d3b2fe07c148165faa56313cb00211e31c12bc";
};
features = builtins.concatLists [
[ "AbortController" ]
@ -13768,11 +13761,11 @@ else
];
dependencies = {
js_sys =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.74" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.76" {
inherit profileName;
}).out;
wasm_bindgen =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.97" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.99" {
inherit profileName;
}).out;
};
@ -13790,11 +13783,11 @@ else
};
dependencies = {
${if false then "js_sys" else null} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.74" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".js-sys."0.3.76" {
inherit profileName;
}).out;
${if false then "wasm_bindgen" else null} =
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.97" {
(rustPackages."registry+https://github.com/rust-lang/crates.io-index".wasm-bindgen."0.2.99" {
inherit profileName;
}).out;
};

View file

@ -12,7 +12,11 @@ dotenvy = "0.15.7"
eyre = "0.6.12"
mime = "0.3.17"
mime_guess = "2.0.5"
reqwest = { version = "0.12.9", default-features = false, features = ["rustls-tls", "stream"] }
reqwest = { version = "0.12.9", default-features = false, features = [
"http2",
"rustls-tls",
"stream",
] }
tokio = { version = "1.41.1", features = ["fs", "macros", "rt-multi-thread"] }
tracing = "0.1.41"
tracing-subscriber = "0.3.19"

View file

@ -1,4 +1,11 @@
use std::{collections::HashSet, future::Future, path::Path, pin::Pin};
use std::{
collections::HashSet,
future::Future,
path::{Path, PathBuf},
pin::Pin,
sync::Arc,
time::Duration,
};
use chir_rs_http_api::{
auth::{LoginRequest, PasetoToken, Scope},
@ -8,13 +15,13 @@ use clap::{arg, Parser, Subcommand};
use eyre::{eyre, Context as _, OptionExt as _, Result};
use mime_guess::{Mime, MimeGuess};
use reqwest::Body;
use tokio::join;
use tracing::instrument;
use tokio::{join, sync::Mutex, task::JoinSet};
use tracing::{info, instrument};
#[derive(Parser, Debug)]
#[command(version, about, long_about = None)]
struct Args {
#[arg(short, long, default_value = "http://localhost:5621/")]
#[arg(short, long, default_value = "https://lotte.chir.rs/")]
url: String,
#[command(subcommand)]
command: Command,
@ -42,14 +49,18 @@ enum Command {
},
}
async fn login(url: String, username: String, password: String) -> Result<()> {
async fn login(
client: Arc<reqwest::Client>,
url: String,
username: String,
password: String,
) -> Result<()> {
let request = LoginRequest {
username,
password,
scopes: HashSet::from([Scope::Full]),
};
let request = bincode::encode_to_vec(request, bincode::config::standard())?;
let client = reqwest::Client::new();
let res = client
.post(format!("{url}.api/auth/login"))
.header("Content-Type", "application/x+bincode")
@ -74,9 +85,13 @@ async fn login(url: String, username: String, password: String) -> Result<()> {
Ok(())
}
#[instrument(skip(source))]
async fn upload(url: String, source: impl AsRef<Path>, dest: String) -> Result<()> {
let client = reqwest::Client::new();
#[instrument(skip(client))]
async fn upload_inner(
client: Arc<reqwest::Client>,
url: String,
source: PathBuf,
dest: String,
) -> Result<bool> {
let token = std::env::var("CHIR_RS_TOKEN")?;
let file = tokio::fs::File::open(&source).await?;
let res = client
@ -92,17 +107,55 @@ async fn upload(url: String, source: impl AsRef<Path>, dest: String) -> Result<(
.body(Body::from(file))
.send()
.await?;
if !res.status().is_success() {
let status = res.status();
if status.is_client_error() {
let response = res.bytes().await?;
let response: APIError =
bincode::decode_from_slice(&response, bincode::config::standard())?.0;
Err(response).with_context(|| format!("Uploading to {dest}"))?;
} else if status.is_server_error() {
let response = res.bytes().await?;
let response: APIError =
bincode::decode_from_slice(&response, bincode::config::standard())?.0;
println!("Server error updating {dest}: {response:?}");
return Ok(false);
}
info!("Updated {dest}.");
Ok(true)
}
#[instrument(skip(client))]
async fn upload(
client: Arc<reqwest::Client>,
url: String,
source: PathBuf,
dest: String,
) -> Result<()> {
loop {
if upload_inner(
Arc::clone(&client),
url.clone(),
source.clone(),
dest.clone(),
)
.await?
{
break;
}
println!("Uploading to {dest} failed. waiting 5s");
tokio::time::sleep(Duration::from_secs(5)).await;
}
Ok(())
}
#[instrument(skip(source))]
async fn upload_dir(url: String, source: impl AsRef<Path>, dest: String) -> Result<()> {
#[instrument(skip(client))]
async fn upload_dir(
client: Arc<reqwest::Client>,
futs: Arc<Mutex<JoinSet<Result<()>>>>,
url: String,
source: PathBuf,
dest: String,
) -> Result<()> {
let mut dir = tokio::fs::read_dir(source).await?;
while let Some(ent) = dir.next_entry().await? {
let file_type = ent.file_type().await?;
@ -116,19 +169,39 @@ async fn upload_dir(url: String, source: impl AsRef<Path>, dest: String) -> Resu
format!("{dest}/{file_name_str}")
};
if file_type.is_dir() {
let sub_fut: Pin<Box<dyn Future<Output = Result<()>>>> =
Box::pin(upload_dir(url.clone(), ent.path(), tgt));
sub_fut.await?;
let boxed: Pin<Box<dyn Future<Output = Result<()>>>> = Box::pin(upload_dir(
Arc::clone(&client),
Arc::clone(&futs),
url.clone(),
ent.path().to_path_buf(),
tgt,
));
boxed.await?;
continue;
}
if file_name_str == "index.html" {
if dest.is_empty() {
upload(url.clone(), ent.path(), "".to_string()).await?;
} else {
upload(url.clone(), ent.path(), format!("{dest}/")).await?;
if !dest.is_empty() {
futs.lock().await.spawn(upload(
Arc::clone(&client),
url.clone(),
ent.path().to_path_buf(),
format!("{dest}/"),
));
}
futs.lock().await.spawn(upload(
Arc::clone(&client),
url.clone(),
ent.path().to_path_buf(),
dest.clone(),
));
}
upload(url.clone(), ent.path(), tgt).await?;
futs.lock().await.spawn(upload(
Arc::clone(&client),
url.clone(),
ent.path().to_path_buf(),
tgt,
));
}
Ok(())
}
@ -139,11 +212,22 @@ async fn main() -> Result<()> {
dotenvy::dotenv().ok();
tracing_subscriber::fmt::init();
let matches = Args::parse();
let client = Arc::new(reqwest::Client::new());
match matches.command {
Command::Login { username, password } => login(matches.url, username, password).await?,
Command::Upload { source, dest } => upload(matches.url, source, dest).await?,
Command::UploadDir { source, dest } => upload_dir(matches.url, source, dest).await?,
Command::Login { username, password } => {
login(client, matches.url, username, password).await?
}
Command::Upload { source, dest } => {
upload(client, matches.url, source.into(), dest).await?
}
Command::UploadDir { source, dest } => {
let futs = Arc::new(Mutex::new(JoinSet::new()));
upload_dir(client, Arc::clone(&futs), matches.url, source.into(), dest).await?;
while let Some(v) = futs.lock().await.join_next().await {
v??;
}
}
}
Ok(())

View file

@ -78,11 +78,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1733132332,
"narHash": "sha256-8DTh3irBPko0ooHaeGJ5kPwBD8mOwiMX4eBjFuicLsA=",
"lastModified": 1733563015,
"narHash": "sha256-ldx4wbxT6zPzpL/XIA4ixdtQqC4STi03jq2zabxOAr8=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "b9ffe0d2ef589f4d75a62f908f00dfd6344b6b6e",
"rev": "7aad7090b7bd3b5f18e1c5788f1aa35a7b2e57bc",
"type": "github"
},
"original": {
@ -128,11 +128,11 @@
]
},
"locked": {
"lastModified": 1733106880,
"narHash": "sha256-aJmAIjZfWfPSWSExwrYBLRgXVvgF5LP1vaeUGOOIQ98=",
"lastModified": 1733538766,
"narHash": "sha256-FEDfBpM82XGdHDbLDJC4lV+QXSVN1rERt1MqtBGJZds=",
"owner": "oxalica",
"repo": "rust-overlay",
"rev": "e66c0d43abf5bdefb664c3583ca8994983c332ae",
"rev": "66526479b295ad238843a8a7367d2da7ec102757",
"type": "github"
},
"original": {