diff --git a/Cargo.lock b/Cargo.lock index eae984373..0408aacd0 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -19,9 +19,9 @@ dependencies = [ [[package]] name = "aho-corasick" -version = "1.1.4" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301" +checksum = "c982642fa9e8606056828ee9a8505737230110bb1099153c79efe865c59d12ba" dependencies = [ "memchr", ] @@ -43,9 +43,9 @@ checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" [[package]] name = "android_system_properties" -version = "0.1.5" +version = "0.1.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" +checksum = "ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc" dependencies = [ "libc", ] @@ -116,13 +116,13 @@ dependencies = [ [[package]] name = "bytemuck_derive" -version = "1.11.0" +version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f65693059b6b9c588b9f62fed1cedbf0a8b805631457ea162d68f0de186f3de5" +checksum = "fc0e56a716f1e132ff6bf4bdac1c944a3fcdc1cae65f70a4a2a1ac3b401d2d1f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] @@ -156,7 +156,7 @@ dependencies = [ "rand_distr", "rayon", "safetensors", - "thiserror 2.0.19", + "thiserror 2.0.20", "tokenizers", "yoke", "zerocopy", @@ -220,9 +220,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.3.0" +version = "1.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89588d05638b5b4594a3348a2d6c20277e43a7f5c5202b05cc56888475a47b8" +checksum = "5d262e149917187838d5b42777c8253bcb64500067342904e7d429499a6f277e" dependencies = [ "find-msvc-tools", "shlex", @@ -288,18 +288,18 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.3" +version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fb99565819980999fb7b4a1796046a5c949e6d4ff132cf5fadf5a641e20d776" +checksum = "473c7e07f409a8d772161724aa8db6a765a2532a70f9667eeb7b49d3d02fbdca" dependencies = [ "clap_builder", ] [[package]] name = "clap_builder" -version = "4.6.2" +version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f09628afdcc538b57f3c6341e9c8e9970f18e4a481690a64974d7023bd33548b" +checksum = "7b48fea5a88e9ae728a2dcbedbfc0e730f7d60da42e1cb049a83c9fb8b789889" dependencies = [ "anstyle", "clap_lex", @@ -652,7 +652,7 @@ dependencies = [ [[package]] name = "deep_causality_haft" -version = "0.4.1" +version = "0.4.2" dependencies = [ "deep_causality_algebra", ] @@ -855,9 +855,9 @@ checksum = "e1d926b4d407d372f141f93bb444696142c29d32962ccbd3531117cf3aa0bfa9" [[package]] name = "either" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91622ff5e7162018101f2fea40d6ebf4a78bbe5a49736a2020649edf9693679e" +checksum = "9e5e8f6c15a24b9a3ee5efec809ccd006d3b30e8b3bb63c39af737c7f87daa1d" [[package]] name = "enum-as-inner" @@ -901,9 +901,9 @@ checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" [[package]] name = "find-msvc-tools" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +checksum = "26b73573e6edcd2af0cdf47bd6cb58f0b3839491263c314eaad1ccf24430e1de" [[package]] name = "float8" @@ -1218,9 +1218,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "js-sys" -version = "0.3.103" +version = "0.3.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" +checksum = "0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a" dependencies = [ "cfg-if", "futures-util", @@ -1229,9 +1229,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.187" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7743783ea728ef5c31194c6590797eed286449b4a4e87d626d8a51f0a94e732" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] name = "libm" @@ -1262,19 +1262,19 @@ checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "macro_rules_attribute" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65049d7923698040cd0b1ddcced9b0eb14dd22c5f86ae59c3740eab64a676520" +checksum = "b3ae8f6d608c795738406608304d30a2dfbdc8e58e44f7ba43236da5208ded3c" dependencies = [ "macro_rules_attribute-proc_macro", - "paste", + "pastey", ] [[package]] name = "macro_rules_attribute-proc_macro" -version = "0.2.2" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "670fdfda89751bc4a84ac13eaa63e205cf0fd22b4c9a5fbfa085b63c1f1d3a30" +checksum = "fc04a4c58212d57930a24bf47d3fa87485264a3a054e9c10e042eb373573ad3c" [[package]] name = "material_examples" @@ -1384,9 +1384,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.8" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367" +checksum = "93e7820bc0a80a0238e650327316f929ba18d5be054b647490a3a6a339f3e7c0" dependencies = [ "num-integer", "num-traits", @@ -1500,9 +1500,9 @@ dependencies = [ [[package]] name = "parquet" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5302d4da74d6596a1f11f9928767995b53bca657cbeea1e4e8c5074f8a1157dd" +checksum = "7065842956a20c2a536924ce8e4d9955f7422451511b9eb7500d7bfe5077e59c" dependencies = [ "ahash", "bytes", @@ -1512,7 +1512,6 @@ dependencies = [ "num-bigint", "num-integer", "num-traits", - "paste", "seq-macro", "twox-hash", ] @@ -1523,6 +1522,12 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" +[[package]] +name = "pastey" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2ee67f1008b1ba2321834326597b8e186293b049a023cdef258527550b9935b4" + [[package]] name = "physics_examples" version = "0.1.0" @@ -1775,9 +1780,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.16" +version = "0.4.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad" +checksum = "ad8553b9b26413251cbf30e620595c7a41b3887f03da04579c0e6b0d6a06b4b2" dependencies = [ "aho-corasick", "memchr", @@ -1888,7 +1893,7 @@ checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 3.0.2", + "syn 3.0.3", ] [[package]] @@ -1992,9 +1997,9 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.2" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a207d6d6a2b7fc470b80443726053f18a2481b7e1eee970597051596567987a3" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" dependencies = [ "proc-macro2", "quote", @@ -2050,11 +2055,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.19" +version = "2.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" +checksum = "ec86235f5fcc2a73650310756d2ac5b138a5780bbbdfae3eeccec992c435ba4f" dependencies = [ - "thiserror-impl 2.0.19", + "thiserror-impl 2.0.20", ] [[package]] @@ -2070,13 +2075,13 @@ dependencies = [ [[package]] name = "thiserror-impl" -version = "2.0.19" +version = "2.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" +checksum = "bc04cd3e1236dd4a98afca4569f2deb3f120e5422a4023be2cb683f8486292af" dependencies = [ "proc-macro2", "quote", - "syn 3.0.2", + "syn 3.0.3", ] [[package]] @@ -2125,7 +2130,7 @@ dependencies = [ "serde", "serde_json", "spm_precompiled", - "thiserror 2.0.19", + "thiserror 2.0.20", "unicode-normalization-alignments", "unicode-segmentation", "unicode_categories", @@ -2150,13 +2155,13 @@ dependencies = [ [[package]] name = "tokio-macros" -version = "2.7.1" +version = "2.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6328af13490e73a9b4694030fafd93f8c8c6a9dede33e821c3fc63eddf8042ba" +checksum = "78773a2a397f451582ce068015985c33193cf6dea8b74d2a639fe457b2f07b0e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.3", ] [[package]] @@ -2256,9 +2261,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" +checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70" dependencies = [ "cfg-if", "once_cell", @@ -2269,9 +2274,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" +checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -2279,9 +2284,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" +checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" dependencies = [ "bumpalo", "proc-macro2", @@ -2292,18 +2297,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" +checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" dependencies = [ "unicode-ident", ] [[package]] name = "web-sys" -version = "0.3.103" +version = "0.3.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8622dcb61c0bcc9fffa6938bed81210af2da9a7e4a1a834b2e37a59b6dfb6141" +checksum = "c435338968042f4f59a557f690a253676d47ce13ceb55d70100e7facf6620a30" dependencies = [ "js-sys", "wasm-bindgen", @@ -2439,18 +2444,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.55" +version = "0.8.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5a105cd7b140f6eeec8acff2ea38135d3cab283ada58540f629fe51e46696eb" +checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.55" +version = "0.8.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fe976fb70c78cd64cccfe3a6fc142244e8a77b70959b30faf9d0ac37ee228eb" +checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1" dependencies = [ "proc-macro2", "quote", diff --git a/MODULE.bazel b/MODULE.bazel index d80cbc5aa..b99a76b4e 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -5,13 +5,13 @@ module(name = "deep_causality") # https://registry.bazel.build/ ############################################################################### bazel_dep(name = "aspect_bazel_lib", version = "2.22.5") -bazel_dep(name = "bazel_skylib", version = "1.9.0") +bazel_dep(name = "bazel_skylib", version = "1.9.2") bazel_dep(name = "platforms", version = "1.1.0") -bazel_dep(name = "rules_rust", version = "0.71.2") +bazel_dep(name = "rules_rust", version = "0.73.0") ############################################################################### -# Vendored locally (thirdparty/rules_lean) rather than pulled from a third-party -# registry, and patched to pin the Lean v4.32.0 toolchain sha256. See lean/. +# Vendored locally (thirdparty/rules_lean) and patched to pin +# the Lean v4.32.0 toolchain sha256. See lean/. ############################################################################### bazel_dep(name = "rules_lean", version = "0.5.4") local_path_override( diff --git a/MODULE.bazel.lock b/MODULE.bazel.lock index 57d6a546e..b14253e8f 100644 --- a/MODULE.bazel.lock +++ b/MODULE.bazel.lock @@ -68,8 +68,8 @@ "https://bcr.bazel.build/modules/bazel_skylib/1.7.1/MODULE.bazel": "3120d80c5861aa616222ec015332e5f8d3171e062e3e804a2a0253e1be26e59b", "https://bcr.bazel.build/modules/bazel_skylib/1.8.1/MODULE.bazel": "88ade7293becda963e0e3ea33e7d54d3425127e0a326e0d17da085a5f1f03ff6", "https://bcr.bazel.build/modules/bazel_skylib/1.8.2/MODULE.bazel": "69ad6927098316848b34a9142bcc975e018ba27f08c4ff403f50c1b6e646ca67", - "https://bcr.bazel.build/modules/bazel_skylib/1.9.0/MODULE.bazel": "72997b29dfd95c3fa0d0c48322d05590418edef451f8db8db5509c57875fb4b7", - "https://bcr.bazel.build/modules/bazel_skylib/1.9.0/source.json": "7ad77c1e8c1b84222d9b3f3cae016a76639435744c19330b0b37c0a3c9da7dc0", + "https://bcr.bazel.build/modules/bazel_skylib/1.9.2/MODULE.bazel": "8c51259b0f4481475586dbfede7591e57b75702e637f840f6138eec80c34b270", + "https://bcr.bazel.build/modules/bazel_skylib/1.9.2/source.json": "41cbde7546542dee2f26e3f10bf1c4ac57909943194b7ac48cc5238a01893aa8", "https://bcr.bazel.build/modules/buildozer/8.5.1/MODULE.bazel": "a35d9561b3fc5b18797c330793e99e3b834a473d5fbd3d7d7634aafc9bdb6f8f", "https://bcr.bazel.build/modules/buildozer/8.5.1/source.json": "e3386e6ff4529f2442800dee47ad28d3e6487f36a1f75ae39ae56c70f0cd2fbd", "https://bcr.bazel.build/modules/gawk/5.3.2.bcr.1/MODULE.bazel": "cdf8cbe5ee750db04b78878c9633cc76e80dcf4416cbe982ac3a9222f80713c8", @@ -202,8 +202,8 @@ "https://bcr.bazel.build/modules/rules_python/1.6.0/MODULE.bazel": "7e04ad8f8d5bea40451cf80b1bd8262552aa73f841415d20db96b7241bd027d8", "https://bcr.bazel.build/modules/rules_python/1.7.0/MODULE.bazel": "d01f995ecd137abf30238ad9ce97f8fc3ac57289c8b24bd0bf53324d937a14f8", "https://bcr.bazel.build/modules/rules_python/1.7.0/source.json": "028a084b65dcf8f4dc4f82f8778dbe65df133f234b316828a82e060d81bdce32", - "https://bcr.bazel.build/modules/rules_rust/0.71.2/MODULE.bazel": "e1857f08dab5ba2f3049104993e453cea71183661dc5e5e92be73523f742353f", - "https://bcr.bazel.build/modules/rules_rust/0.71.2/source.json": "a7ccb5614b194ffedc5a539f06d9bfc64aa47f48c40d9e6f6bbb840e1a55ff30", + "https://bcr.bazel.build/modules/rules_rust/0.73.0/MODULE.bazel": "25e3b077128612754c4add1b4c90d20a6be06566b623dee6e32038d0e8f93062", + "https://bcr.bazel.build/modules/rules_rust/0.73.0/source.json": "8eeb3d9ba7c57916b63887a651e8f84c2f68b7243af9e712d728c2a0b7882255", "https://bcr.bazel.build/modules/rules_shell/0.2.0/MODULE.bazel": "fda8a652ab3c7d8fee214de05e7a9916d8b28082234e8d2c0094505c5268ed3c", "https://bcr.bazel.build/modules/rules_shell/0.3.0/MODULE.bazel": "de4402cd12f4cc8fda2354fce179fdb068c0b9ca1ec2d2b17b3e21b24c1a937b", "https://bcr.bazel.build/modules/rules_shell/0.4.1/MODULE.bazel": "00e501db01bbf4e3e1dd1595959092c2fadf2087b2852d3f553b5370f5633592", diff --git a/deep_causality_cfd/Cargo.toml b/deep_causality_cfd/Cargo.toml index 4870537f0..3ec6e2fb4 100644 --- a/deep_causality_cfd/Cargo.toml +++ b/deep_causality_cfd/Cargo.toml @@ -48,8 +48,11 @@ std = [ "dep:deep_causality_uncertain", ] -# Opt-in CPU parallelism. Forwards to the topology crate's Rayon-backed DEC -# operator loops and the shared `MaybeParallel` marker. Serial by default; +# CPU parallelism. Forwards to the topology crate's Rayon-backed DEC operator +# loops and the shared `MaybeParallel` marker. On in the `default` set above; +# build with `--no-default-features --features std` for the serial loops. The +# Rayon fan-out costs more than it saves on small grids, so serial is the faster +# choice below roughly 256^2 cells (measured in `benches/PERFORMANCE.md`). parallel = [ "deep_causality_topology/parallel", "deep_causality_par/parallel", diff --git a/deep_causality_cfd/README.md b/deep_causality_cfd/README.md index 20714fe78..d635212c5 100644 --- a/deep_causality_cfd/README.md +++ b/deep_causality_cfd/README.md @@ -5,8 +5,8 @@ Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Right # DeepCausality CFD: Counterfactual Fluid Dynamics -DeepCausality CFD provides Counterfactual Fluid Dynamics and Multidisciplinary analysis and optimization (MDAO) by coupling fluid dynamics, multiple physics, navigation, and control, in one typed dynamic process. -DeepCausality CFD couples several disciplines' analyses, optimizes over the coupled result, +DeepCausality CFD provides Counterfactual Fluid Dynamics and multidisciplinary analysis and optimization (MDAO) by coupling fluid dynamics, multiple physics, navigation, and control, in one typed dynamic process. +DeepCausality CFD couples several disciplines' analyses, optimizes over the coupled result, and keeps track of the uncertainty along the way: the plasma-blackout example marches a compressible flow, reacts its plasma chemistry, gates a Kalman filter on the result, flies the control command it selects, and picks that command by forking the running @@ -17,7 +17,7 @@ counterfactual dynamics, and precision as a parameter, in one crate. The crate is unpublished, but you can add it [as a git dependency](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#specifying-dependencies-from-git-repositories): -you can pin the repo by: +You can pin the repo by: * branch e.g. 'branch = "main"' * tag e.g. 'tag = "0.10.3"' * commit e.g. 'rev = "0c09903..."' @@ -34,40 +34,16 @@ The fastest way to see the whole crate work end to end: cargo run --release -p avionics_examples --example plasma_blackout_corridor ``` -## Three Solver Paradigms, One Language - -**Calculus-based: the DEC-native Navier-Stokes solver.** Velocity lives as an edge 1-form on a -discrete exterior calculus. Each time step marches the Leray-projected rate, so the field stays -divergence-free at every step, and the `SolenoidalField` type-state rejects time-stepping an -unprojected field at compile time. Validated against Taylor-Green decay, exact Couette and -Poiseuille states, the Ghia et al. (1982) lid-driven cavity tables, and cylinder wake -references. - -**Compression-based: the QTT marchers.** The compressible Euler marchers (1-D through 3-D, -including a body-fitted variant) run on quantized tensor trains, where a `2^L` grid costs order -`chi^2 * L`: logarithmic in point count, with sharp structure paid for in bond dimension. The -rank studies in `studies/` measured the decisive caveat (the rank driver is coordinate -alignment, not sharpness), and the compressible carrier answers it with a shock-fitted inflow -strip: the exact Rankine-Hugoniot state is the boundary of the marched layer, so the shock is -never captured at all. - -**Analytic and pointwise: fitted closures.** Exact Rankine-Hugoniot jumps, the Park -two-temperature relaxation closures, the finite-rate ionization network, and the pointwise -Navier-Stokes regime evaluators with their causal-effect wrappers. A stagnation line with a -fitted shock runs entirely on these, with no grid. - -All three families sit behind the same `CfdFlow` language and the same scalar type, so one -program can pick per problem: the DEC solver for an incompressible cavity, the QTT marcher for -a reentry layer, a fitted closure for the stagnation line. - -## Counterfactual Dynamics +## Counterfactual Flow Dynamics `CfdFlow` is a two-level language. At the **trajectory** level, `CfdFlow::march` marches a coupled run until a predicate fires and yields a resumable pause; at the **campaign** level, `CfdFlow::study` runs a family of counterfactual cases forked from that pause to a `Verdict`. A -fork shares the paused state in O(1) through copy-on-write (tensor fields, navigation engine, and -provenance log included) and continues each branch in its own alternated world. From the -plasma-blackout corridor, condensed: +fork shares the marched tensor state in O(1) and never copies it. The `CoupledField` is +copy-on-write: each branch takes its single clone at its first field write, which `continue_march` +always performs, so the per-branch field cost is O(cells), not O(1). That clone covers the per-cell +scalar vectors, the navigation engine, and the provenance log. Each branch then continues in its +own alternated world. From the plasma-blackout corridor, condensed: ```rust // Trajectory level: march until the evolved sheath's n_e crosses the GPS L1 cutoff. @@ -101,22 +77,30 @@ run. The sibling weather-dispersion table takes the other counterfactual form `.baseline(standard_day).alternate(weather_world).ensemble(draws).couple(..).march_for(..) .reduce_ensemble(..)` — flying six atmospheres alternated from one baseline, each an ensemble of receiver-noise draws. The gating sequence is a named value the study inserts whole -(`GateSeq`), the DSL never exits or prints (`verdict()` returns data), and an optional -`save_log(path)` flushes each run's provenance to disk, one file per branch under a fan-out. - -## Native Multi Regime - -The regime is a classified property of the evolved state, re-decided every step. A vehicle -entering or leaving orbit transitions dynamically through several regimes, and this crate -switches three regime axes independently, each on a measured quantity: - -- **Flow regime.** `RegimeClassify` turns the freestream Knudsen number into the governing - model: continuum Navier-Stokes, slip-corrected continuum, transitional, or free-molecular. -- **Dynamics regime.** The navigation engine switches integrators on the force ratio - `ε = a_aero/a_grav`: while gravity dominates, the trajectory advances on the exact - KS-conformal core with aero as a between-step kick (Encke); once aero dominates, it switches - to direct Cowell integration. This handles orbit entry and exit, where the integrator that is - exact in orbit loses accuracy in the atmosphere. +(`GateSeq`), and the DSL never exits or prints (`verdict()` returns data). The optional +campaign-level `save_log(path)` writes provenance to disk on that coupled `march_for` path: one +file per branch under the fan-out, plus a `.main.log` naming every spawn and rejoin. The +`fork` / `branch` / `continue_for` chain shown above does not thread the audit sink, so it writes +no files. Each of its branches still carries its full provenance in the returned report's effect +log. + +## Dynamic Regime Switch + +The regime is classified dynamically from the evolved state at each step. A vehicle entering or +leaving orbit transitions through several regimes, and the governing regime switches on the +physics: + +- **Flow regime.** `RegimeClassify` classifies the freestream Knudsen number into the governing + model — continuum Navier-Stokes, slip-corrected continuum, transitional, or free-molecular — + and logs each transition. The classification is a diagnostic carried on the evolved state: the + crate does not switch closures on it, and no slip, transitional, or free-molecular closure is + implemented. +- **Dynamics regime.** `RegimeSwitch` and `aero_gravity_ratio` express the integrator switch on the + force ratio `ε = a_aero/a_grav`: while gravity dominates, a trajectory advances on the exact + KS-conformal core with aero as a between-step kick (Encke); once aero dominates, direct Cowell + integration is the appropriate choice. This is the criterion for orbit entry and exit, where the + integrator that is exact in orbit loses accuracy in the atmosphere. Both are public API; the + shipped navigation engine does not call them, so the switch is the caller's to apply. - **Link regime.** The evolved electron density sets the plasma frequency, and the plasma frequency decides whether the GNSS link exists. The Kalman filter's measurement gating follows it. @@ -125,7 +109,9 @@ The regime is read straight off the evolved field, so the DSL turns a regime pro **event the run finds** rather than a station it is told to switch at: ```rust -// `field.regime()` -> Option<&RegimeClass> { model, knudsen, plasma_frequency, gnss_denied }. +// `field.regime()` -> Option> { model, knudsen, plasma_frequency, gnss_denied, +// mach_regime, thrust_state, touchdown }. The last three are the powered-descent axes and stay +// neutral unless `RegimeClassify::with_flight_axes` is called. // Blackout is therefore an interval the run discovers: march to the onset event, fly the // committed world through the dark, and continue to the recovery event. let onset = CfdFlow::march(&nominal) @@ -145,7 +131,7 @@ Every transition lands in the provenance log. From an actual corridor run ```text regime -> slip (GNSS-available), Kn=0.07829109848665225 -regime -> slip (GNSS-denied), Kn=0.012690837165407727 +regime -> slip (GNSS-denied), Kn=0.012690837165407727 regime -> continuum (GNSS-denied), Kn=0.00993838892165156 regime -> continuum (GNSS-available), Kn=0.0002551442196046344 ``` @@ -153,7 +139,7 @@ regime -> continuum (GNSS-available), Kn=0.0002551442196046344 One descent moves through orbit-like dynamics, slip flow, continuum flow, comms blackout, and reacquisition in one uninterrupted program. -## Native Multiphysics +## Dynamic Multiphysics A coupling stack is a static cons-tuple of `PhysicsStage`s stepping one shared `CoupledField`: @@ -202,14 +188,102 @@ close one loop in one process. Two more design decisions carry this. `CfdFlow` composes the run itself: the trajectory march yields a resumable pause, the campaign study forks it (or alternates whole worlds from a -baseline), continues each branch in copy-on-write O(1), and reduces the outcomes to gated rows — +baseline), continues each branch copy-on-write from the shared state, and reduces the outcomes to +gated rows — branch fan-outs run concurrently and bit-identically to the sequential run, and `verdict()` returns the result as data the caller maps to an exit code. And configuration is separate from execution: the `flow_config` layer holds owned descriptions (grids, schedules, seeds, stop conditions, observables, world-published constants) while the `flow` layer materializes runs from them, so a counterfactual is the same flow handed a different description. -## Everything Self-Verifies +## Multiple Solver Paradigms + +**Calculus-based: the DEC-native Navier-Stokes solver.** Velocity lives as an edge 1-form on a +discrete exterior calculus. Each time step marches the Leray-projected rate, so the field stays +divergence-free at every step. The `SolenoidalField` type-state encodes that: the carrier is a +private field, so there is no public constructor, every constructing path is a projection, and the type +implements no arithmetic, so two projected fields cannot be added into an unprojected one. Two +wall-bounded escape hatches are public. `constrain_edges` and `with_lift` re-wrap a modified tensor +without re-projecting; they exist because the DEC solver re-enters them at the end of each step, on +the output of the constrained projection that already pinned those edges. Off that path the caller +carries the invariant. Validated against Taylor-Green decay, exact Couette and +Poiseuille states, the Ghia et al. (1982) lid-driven cavity tables, and cylinder wake +references. + +**Quantized Tensor Trains: the QTT marchers.** The compressible Euler marchers (1-D through 3-D, +including a body-fitted variant) run on quantized tensor trains, where a `2^L` grid *stores* order +`chi^2 * L`: logarithmic in point count for a bounded bond dimension `chi`, with sharp structure +paid for in `chi`. Storage is not runtime: the incompressible immersed harness measured per-step +wall-clock rising far faster than `chi^2 * L` while the achieved bond stayed flat, so a +non-compression bottleneck dominates that path (see the QTT envelope note in +[`verification/README.md`](verification/README.md)). Whether `chi` stays bounded is the design +question the rank studies in `studies/` answered, and they measured the decisive caveat: the rank +driver is coordinate alignment, not sharpness. For the descent-schedule case the compressible +carrier answers it with a shock-fitted inflow strip, imposing the exact Rankine-Hugoniot state as +the boundary of the marched layer, so that shock is never captured at all. + +**Analytic and pointwise: fitted closures.** Exact Rankine-Hugoniot jumps, the Park +two-temperature relaxation closures, the finite-rate ionization network, and the pointwise +Navier-Stokes regime evaluators with their causal-effect wrappers. A stagnation line with a +fitted shock runs entirely on these, with no grid. + +All three solver families sit behind the same `CfdFlow` language and the same scalar type, so you +can pick the best fit for your problem: the DEC solver for an incompressible cavity, the QTT +marcher for a reentry layer, a fitted closure for the stagnation line. + +## Provenance for Comparison Across Boundaries + +The append-only effect log continues across regimes and physics. When a counterfactual fan-out +occurs, each branch writes its own scenario effect log, so you can compare why one variant failed +and others succeeded. Provenance is preserved under counterfactual intervention: when you inject a +failure to stress-test a simulation, the effect log records the intervention, the replaced value, +and every subsequent derived step, so you can read the causal chain from its inception to its +completion. + +Because the log continues across boundaries and records regime changes, it allows precise +comparative dissection across transitions. For example, you can compare flow parameters from the +subsonic regime before and after the vehicle enters the transonic regime. This supports efficient +structured diffs over causal event sequences, with precise attribution. + +Generate parameter tables, for example for weather conditions, from a single flow simulation where +each scenario brings its own append-only effect log for end-to-end provenance. + +Ingest trajectory logs from an existing 6-DOF simulation generated with your own tooling, run +counterfactuals across the parameter space to find the failure threshold at which the simulation +breaks down, and use the provenance log to compare how the safety envelope evolves across regimes. + +## Precision as a Parameter + +Every theory, solver, stage, and observable is generic over one real scalar. A program fixes a +single alias and the entire computation runs at that precision: `f32` for speed, `f64` for +industry-standard precision, or `Float106` for high-fidelity, reference-grade results with up to 30 +significant digits. One line change, three precision levels. Precision as a parameter also makes +every solver in this project future-proof for the upcoming IEEE f16 and f128 standards. + +```rust +/// Working precision. +pub type FloatType = f64; // or f32, or deep_causality_num::Float106 + +``` + +Specification constants stay exact `f64` literals; `ft` lifts each one into the working +precision, and every derived number is computed in `FloatType`. Changing the alias reruns the +whole program at another precision. + + +## Selected Capabilities + +- **Suspend and resume a march.** `save_resume_state` / `load_resume_state` (with `pack_resume` / + `unpack_resume`) checkpoint a running `CoupledField` to disk and restore it. A world fingerprint guards + the seam, so a snapshot taken under different constants is refused rather than silently resumed. +- **Duct marching.** `DuctMarchRun`, composed by `CfdFlow::march`, runs an internal-flow duct case over a + borrowed `DuctConfig` and returns an owned `Report`. +- **Ignition corridor.** `IgnitionCorridor`, committed through by `ThrottleGuidance`, expresses the + four-condition corridor a powered-descent throttle must satisfy; the margin is supplied by the caller. +- **Closed-form acoustic core inverse.** `AcousticCoreInverse` (with its 2-D and 3-D forms) inverts the + constant-coefficient acoustic core `A₀ = I − β·∂²` on a periodic grid, without an iterative solve. + +## Verification The crate ships its evidence, and CI runs it. `verification/` holds thirteen runnable programs gated against analytic solutions, published references, or internal invariants; @@ -227,31 +301,6 @@ holds after the `fix-ramc-vibrational-relaxation-pair` reduced-mass correction, stagnation-line closed-form Park-2T controller to 1.27 decades below the anchor (reported as an offset, not re-admitted). -## Precision as a Parameter - -Every theory, solver, stage, and observable is generic over one real scalar (`CfdScalar`, -built on `RealField`). A program fixes a single alias and the entire computation runs at that -precision, from the flux stencils to the Kalman filter, downcasting to `f64` only at the -display boundary. From the `qtt_ramc_stagline` verification: - -```rust -/// Working precision. -pub type FloatType = f64; // or f32, or deep_causality_num::Float106 - -/// Lift an exact `f64` specification into the working precision. -pub fn ft(x: f64) -> FloatType { - FromPrimitive::from_f64(x).expect("specification lifts into FloatType") -} -``` - -Specification constants stay exact `f64` literals; `ft` lifts each one into the working -precision, and every derived number is computed in `FloatType`. Changing the alias reruns the -whole program at another precision. The plasma-blackout corridor measured all three: at `f64`, -all gates pass in about 40 seconds; at 106-bit `Float106`, every gate and every discrete event -step is identical, with continuous witnesses agreeing to 15 or 16 significant digits, which -places the corridor's error budget in the model closures and the grid rather than in round-off; -One line change, three precison levels. - ## Where Things Live | Path | Contents | @@ -259,18 +308,28 @@ One line change, three precison levels. | `src/theories/` | Fluid theories: the DEC-native `FluidTheory` realization and the pointwise Navier-Stokes regime evaluators with their causal-effect wrappers | | `src/solvers/` | The DEC Navier-Stokes solver, the QTT incompressible/immersed/linear solvers, the compressible Euler and 2-D/3-D marchers, shock fitting, the Park-2T closure | | `src/types/flow/` | The `CfdFlow` DSL: the trajectory march (runs, pauses, forks, the named-stage builder) and the campaign study grammar (phase family, `GateSeq`/`Verdict`, the `StudyEffect` carrier, the `save_log` audit sink), plus the coupling stack, physics stages, blackout stages, and reports | -| `src/types/flow_config/` | The configuration layer: owned config containers and type-state builders | +| `src/types/flow_config/` | The configuration layer: owned config containers, fluent builders validated at `build()`, and type-state phase transitions for the zone and coupling tuples | | `src/navigation/` | GNSS-denial navigation: the 17-state error-state Kalman engine, synthetic INS sensors, the integrator regime switch | | `src/coordinate/` | Body-fitted and blended coordinate maps with metric providers | | `src/tensor_bridge/` | The CFD to tensor-network bridge: QTT field codecs and finite-difference operator assembly | | `verification/` | Self-verifying reference checks (see its [README](verification/README.md)) | | `studies/` | Design-question probes with gated findings (see its [README](studies/README.md)) | | `benches/` | Criterion benches and the pinned `PERFORMANCE.md` | -| `papers/` | The cited source PDFs behind constants and closures | +| `papers/` | Source PDFs behind constants and closures, indexed by [`papers/README.md`](papers/README.md), which maps each PDF to its citing code and lists the references cited in code whose PDF is not yet present | The end-to-end examples, the plasma-blackout corridor and its weather-dispersion -table, live in [`examples/avionics_examples/cfd/`](../examples/avionics_examples/cfd/). They -are built entirely from this crate's public API. +table, live in [`examples/avionics_examples/cfd/`](../examples/avionics_examples/cfd/). Every +run is driven through this crate's `CfdFlow` API. The examples also depend on five workspace +crates directly, because this crate's signatures expose their types without re-exporting them: + +- `deep_causality_tensor` for `CausalTensor`, `CausalTensorTrain`, and `Truncation`, which + appear in the QTT configs and the field accessors. +- `deep_causality_core` for `AlternatableContext` and `EffectLog`, the fork and provenance seams. +- `deep_causality_haft` for `LogAddEntry` and `LogSize`, the traits that read that log. +- `deep_causality_algebra` and `deep_causality_num` for `Real` and `FromPrimitive`, two of the + traits behind the `CfdScalar` bound, needed to call scalar methods in generic code. + +The plasma-blackout examples additionally use `deep_causality_physics` for advanced physics. ## License diff --git a/deep_causality_cfd/benches/PERFORMANCE.md b/deep_causality_cfd/benches/PERFORMANCE.md index 5fb286502..c5551419e 100644 --- a/deep_causality_cfd/benches/PERFORMANCE.md +++ b/deep_causality_cfd/benches/PERFORMANCE.md @@ -1,8 +1,13 @@ # `deep_causality_cfd` — Solver Benchmark Performance -Sequential vs. parallel (`--features parallel`) timings for the three `CfdFlow` solver benchmarks. -The `parallel` feature forwards to the Rayon-backed DEC operator loops in `deep_causality_topology` -(via the shared `MaybeParallel` marker); without it the same loops run serially. +Sequential vs. parallel timings for the three `CfdFlow` solver benchmarks. The `parallel` feature +forwards to the Rayon-backed DEC operator loops in `deep_causality_topology` (via the shared +`MaybeParallel` marker); without it the same loops run serially. + +`parallel` sits in the crate's `default` feature set. A plain `cargo bench` therefore reproduces the +**parallel** column; the sequential column needs `--no-default-features --features std`. The numbers +below were measured before `parallel` joined the default set; the commands are written for the +feature set as it stands today. ## Methodology @@ -14,12 +19,12 @@ The `parallel` feature forwards to the Rayon-backed DEC operator loops in `deep_ - **Commands:** ```bash - # sequential (default features) - cargo bench -p deep_causality_cfd --bench bench_dec_ns_march -- --warm-up-time 1 --measurement-time 2 --sample-size 30 - cargo bench -p deep_causality_cfd --bench bench_mms_verify -- --warm-up-time 1 --measurement-time 2 --sample-size 30 - cargo bench -p deep_causality_cfd --bench bench_operator_study -- --warm-up-time 1 --measurement-time 2 --sample-size 30 + # sequential (parallel switched off; it is on in the default set) + cargo bench -p deep_causality_cfd --no-default-features --features std --bench bench_dec_ns_march -- --warm-up-time 1 --measurement-time 2 --sample-size 30 + cargo bench -p deep_causality_cfd --no-default-features --features std --bench bench_mms_verify -- --warm-up-time 1 --measurement-time 2 --sample-size 30 + cargo bench -p deep_causality_cfd --no-default-features --features std --bench bench_operator_study -- --warm-up-time 1 --measurement-time 2 --sample-size 30 - # parallel (Rayon-backed DEC loops) + # parallel (Rayon-backed DEC loops; also what a plain `cargo bench` runs) cargo bench -p deep_causality_cfd --features parallel --bench bench_dec_ns_march -- ... cargo bench -p deep_causality_cfd --features parallel --bench bench_mms_verify -- ... cargo bench -p deep_causality_cfd --features parallel --bench bench_operator_study -- ... @@ -29,9 +34,9 @@ The `parallel` feature forwards to the Rayon-backed DEC operator loops in `deep_ **slower** (overhead exceeds the work). > **Summary:** at the resolutions these benches use, the `parallel` feature does **not** help and -> actively **hurts** the marching solver — the per-loop Rayon fan-out costs more than the DEC operator -> work it parallelizes on small grids. It is a knob for large grids, not the default. See -> [Interpretation](#interpretation). +> actively **hurts** the marching solver. The per-loop Rayon fan-out costs more than the DEC operator +> work it parallelizes on small grids. It ships on and earns its keep on large grids; switch it off +> with `--no-default-features --features std` for small ones. See [Interpretation](#interpretation). ## 1. DEC Navier–Stokes marching (`bench_dec_ns_march`) @@ -131,7 +136,7 @@ path, and there the fan-out overhead still slightly outweighs the gain (0.90×). always a net loss. The speedup stays well under the 16-core ideal because the per-step constrained projection and march orchestration are largely serial (Amdahl). - **Verification is unaffected** because it does no DEC-loop work. -- **Guidance:** keep `parallel` **off** below ~256² (small/CI-scale workloads); - enable it for grids ≳ 384², where it is a real win (≥1.25×). Re-measure to confirm the crossover on - the target hardware. +- **Guidance:** `parallel` is on by default. Below ~256² (small/CI-scale workloads) switch it **off** + with `--no-default-features --features std`; leave it on for grids ≳ 384², where it is a real win + (≥1.25×). Re-measure to confirm the crossover on the target hardware. - **Caveat:** these are single-machine medians at a short measurement window; verify at target configuration; \ No newline at end of file diff --git a/deep_causality_cfd/papers/README.md b/deep_causality_cfd/papers/README.md new file mode 100644 index 000000000..d080642c8 --- /dev/null +++ b/deep_causality_cfd/papers/README.md @@ -0,0 +1,47 @@ + + +# `deep_causality_cfd/papers/` + +Load-bearing constants, kernels, and validation references cite their source by author-year in the +docstring or harness where they are used; the source PDF lives here. This index maps each PDF to the +code that cites it, so an uncited PDF is visible rather than silently carried (AUDIT-REPORT Phase 4, +item 23). + +## Present and cited + +| PDF | Reference | Cited by | +|-----|-----------|----------| +| `kirkpatrick2003.pdf` | Kirkpatrick et al. (2003) | `src/solvers/dec/surface_force.rs` | +| `Droege2005.pdf` | Dröge & Verstappen (2005) | `verification/dec_cylinder_verification/` (St and C_d reference bands) | +| `mohamed2016.pdf` | Mohamed, Hirani & Samtaney (2016), "Discrete exterior calculus discretization of incompressible Navier–Stokes equations over surface simplicial meshes", J. Comput. Phys. 312:175–191 | `src/solvers/dec/mod.rs` (the DEC NS formulation this solver follows, on a periodic lattice complex rather than a surface simplicial mesh) | +| `mittal2005.pdf` | Mittal & Iaccarino (2005), "Immersed Boundary Methods", Annu. Rev. Fluid Mech. 37:239–261 | `src/solvers/qtt/immersed_2d.rs` (the immersed-boundary method class the Brinkman penalization belongs to) | + +Both `mohamed2016.pdf` and `mittal2005.pdf` were carried here uncited until the Phase-4 sweep; each +was read, confirmed on topic, and cited at the module it supports. + +## Cited in code, PDF not yet present + +Add these PDFs to complete the convention. The bibliographic details below are what the citing code +states; confirm each against the published record when adding the file. + +- **Angot, Bruneau & Fabrie (1999)**, "A penalization method to take into account obstacles in + incompressible viscous flows", Numerische Mathematik 81(4):497–520. Cited by + `src/solvers/qtt/immersed_2d.rs` and `verification/qtt_cylinder_verification/` for the Brinkman + penalization method and its `η → 0` convergence rate (`O(η^{3/4})`). +- **Peddinti et al. (2024)**, "A quantum-inspired framework for computational fluid dynamics", + Communications Physics 7, 135. Cited by `src/tensor_bridge/mod.rs` and the QTT verification + READMEs as the MPS Navier–Stokes construction the bridge follows. +- **Kazeev & Khoromskij**, "Low-Rank Explicit QTT Representation of the Laplace Operator and Its + Inverse". Cited by `src/tensor_bridge/mod.rs` for the QTT finite-difference operator construction. + Author and title are as recorded in + `openspec/notes/archive/cfd-plasma-blackout/gap-1/gap-one-cfd-tensor-bridge.md`; **venue and year are + not recorded anywhere in this repository**, so they are deliberately omitted here rather than + supplied from recall. Fill them in from the published record when adding the PDF. + +Other references cited in prose without a PDF here (Park, RAM-C II, Millikan–White, Ghia 1982, +Taylor & Green 1937, Sod 1978, Gourianov et al. 2022) are named at their use sites with enough +detail to locate them; the crate README's `papers/` row points at this index rather than claiming +every cited source is present. diff --git a/deep_causality_cfd/src/coordinate/blended.rs b/deep_causality_cfd/src/coordinate/blended.rs index e0f8b7bae..062e4683d 100644 --- a/deep_causality_cfd/src/coordinate/blended.rs +++ b/deep_causality_cfd/src/coordinate/blended.rs @@ -56,6 +56,15 @@ const DET_FLOOR_FRACTION: f64 = 1.0e-6; /// Geometry + blend parameters for [`BlendedMap`]: the `2^lx × 2^ly` lattice, the polar fan /// `r ∈ [r0, r0+dr]`, `θ ∈ [theta0, theta0+dtheta]`, and the blend `lambda ∈ [0, 1]`. +/// +/// **Unenforced precondition: `theta0 = −dtheta/2`.** The Cartesian-capture partner is built as an +/// axis-aligned rectangle `(0, dr, span_y, 0)`, which is the fan's own frame only when the fan is +/// centred on `θ = 0`. For any other `theta0` the two charts being blended are relatively rotated by +/// `theta0 + dtheta/2`, so the blend interpolates between a fitted chart and a *misaligned* rectangle +/// and `lambda` no longer sweeps fitted → capture for the same geometry. The constructor does not +/// reject this: it validates positivity, `lambda ∈ [0, 1]` and the determinant scan, not the frame. +/// Either pass a fan centred on zero, or rotate the rectangle to the bisector `theta0 + dtheta/2` +/// before comparing blends. pub struct BlendedMapConfig { lx: usize, ly: usize, diff --git a/deep_causality_cfd/src/lib.rs b/deep_causality_cfd/src/lib.rs index 05ba7f9e7..edc3714ab 100644 --- a/deep_causality_cfd/src/lib.rs +++ b/deep_causality_cfd/src/lib.rs @@ -19,8 +19,11 @@ //! scalar (`CfdScalar`). Composition is static (no `dyn`), //! built on the `deep_causality_haft` HKT/algebra foundation. //! -//! CPU parallelism is opt-in via the `parallel` feature -//! and rides the `MaybeParallel` bound. +//! CPU parallelism ships on: `parallel` sits in the crate's `default` feature +//! set and rides the `MaybeParallel` bound. Build with +//! `--no-default-features --features std` for the serial operator loops, which +//! are the faster choice below roughly 256² cells +//! (see `benches/PERFORMANCE.md`). extern crate alloc; @@ -66,6 +69,8 @@ pub use crate::navigation::{ ImuModel, InsErrorState, IntegratorRegime, NAV_STATES, NavFilter, ReentryNavEngine, RegimeSwitch, aero_gravity_ratio, nav_transition_matrix, }; +// The nominal attitude representation `ReentryNavEngine` carries and returns (`attitude()` / `restore`). +pub use deep_causality_num_complex::Quaternion; // The CfdFlow DSL facade (owned case descriptions materialized at run). // Workflow composition — the CfdFlow DSL (the "how"). @@ -92,7 +97,7 @@ pub use crate::types::flow::{ BlackoutTrigger, BranchAccumulator, BranchOutcome, BurnEnvelope, CfdFlow, CompressibleFork, CompressibleMarchRun, CompressiblePause, CoupledField, CoupledMarch, Coupling, CyberneticCorrect, DuctMarchRun, EosStage, FiniteRateIonizationStage, FlightSensors, - ForkEconomics, Gates, GoverningModel, IGNITION_COMMIT_AIDED_FIELD, IGNITION_COMMIT_MACH_FIELD, + ForkEconomics, GoverningModel, IGNITION_COMMIT_AIDED_FIELD, IGNITION_COMMIT_MACH_FIELD, IGNITION_COMMIT_Q_FIELD, IGNITION_COMMIT_SIGMA_FIELD, IGNITION_COMMIT_STEP_FIELD, IGNITION_LATCH_FIELD, IgnitionCorridor, IonizationStage, LEG_RE_SEEDS_FIELD, MachRegime, MarchFork, MarchPause, MarchPipeline, MarchRun, MarchState, MmsBuilder, Operator, diff --git a/deep_causality_cfd/src/navigation/eskf.rs b/deep_causality_cfd/src/navigation/eskf.rs index 00a63e0e1..e896f6a70 100644 --- a/deep_causality_cfd/src/navigation/eskf.rs +++ b/deep_causality_cfd/src/navigation/eskf.rs @@ -19,7 +19,9 @@ //! 2nd ed., Artech House (2013), §14 (error-state / sequential Kalman update). use super::ins_error_state::InsErrorState; +use alloc::format; use deep_causality_algebra::RealField; +use deep_causality_physics::PhysicsError; /// The error-state dimension (17 = INS 15-state + clock bias/drift). pub const NAV_STATES: usize = 17; @@ -79,6 +81,64 @@ pub fn nav_transition_matrix(dt: R, f: [R; 3]) -> [[R; NAV_STATES] m } +/// Validate that `cov` is a covariance before it enters a filter: every entry finite, the matrix +/// symmetric to a `√ε` relative tolerance, and every diagonal entry (a variance) non-negative. +/// +/// **Symmetry tolerance.** Exact equality `cov[i][j] == cov[j][i]` is the wrong test for a restored +/// float covariance: a matrix that has round-tripped through serialisation, or been assembled outside +/// the filter's own symmetrised Joseph update, carries float-level asymmetry that is not a defect. The +/// admitted band is `|cov[i][j] − cov[j][i]| ≤ √ε · (1 + max(|cov[i][j]|, |cov[j][i]|))` — scale-relative +/// (the diagonal spans `2500` down to `1e-14` across the 17 states), with the `1 +` an absolute floor so +/// a near-zero off-diagonal is not held to a relative test against zero. `√ε` (≈ 1.5e-8 for `f64`, +/// 3.4e-4 for `f32`) is the conventional "half the significant digits" tolerance and scales with the +/// scalar's precision. +/// +/// This is the necessary-condition covariance check at the construction/restoration chokepoint (design +/// D3); the sufficient PSD guarantee against round-off drift during a run is maintained by the guarded +/// measurement update ([`NavFilter::update_scalar`]), which refuses a non-positive innovation covariance. +fn validate_covariance( + cov: &[[R; NAV_STATES]; NAV_STATES], +) -> Result<(), PhysicsError> { + // 1. Every entry finite (no NaN/∞ smuggled in through a diagonal or a restored matrix). + for (i, row) in cov.iter().enumerate() { + for (j, &c) in row.iter().enumerate() { + if !c.is_finite() { + return Err(PhysicsError::PhysicalInvariantBroken(format!( + "navigation covariance entry [{i}][{j}] is not finite" + ))); + } + } + } + // 2. Symmetric to the √ε relative tolerance documented above. + let tol = R::epsilon().sqrt(); + for (i, row) in cov.iter().enumerate() { + for (j, &a) in row.iter().enumerate().skip(i + 1) { + let b = cov[j][i]; + let scale = R::one() + max_abs(a, b); + if (a - b).abs() > tol * scale { + return Err(PhysicsError::PhysicalInvariantBroken(format!( + "navigation covariance is not symmetric: [{i}][{j}] and [{j}][{i}] differ beyond tolerance" + ))); + } + } + } + // 3. Every diagonal entry is a variance: non-negative. + for (i, row) in cov.iter().enumerate() { + if row[i] < R::zero() { + return Err(PhysicsError::PhysicalInvariantBroken(format!( + "navigation covariance diagonal [{i}][{i}] is a negative variance" + ))); + } + } + Ok(()) +} + +/// The larger of `|a|`, `|b|` — the scale a symmetry residual is measured relative to. +fn max_abs(a: R, b: R) -> R { + let (a, b) = (a.abs(), b.abs()); + if a > b { a } else { b } +} + /// A 17-state error-state Kalman filter: the error-state estimate + its covariance. #[derive(Clone, Debug)] pub struct NavFilter { @@ -88,36 +148,169 @@ pub struct NavFilter { impl NavFilter { /// Build the filter from an initial error-state estimate and an initial covariance diagonal. - pub fn new(state: InsErrorState, cov_diag: [R; NAV_STATES]) -> Self { - Self { - state, - cov: diag(&cov_diag), - } + /// + /// `cov_diag` is indexed in the canonical 17-state order + /// `[pos(3), vel(3), att(3), accel_bias(3), gyro_bias(3), clock_bias, clock_drift]`, the order + /// [`InsErrorState::to_array`] packs. Entry `i` is the initial variance of state `i`. + /// + /// # Errors + /// Rejects a `cov_diag` that is not a covariance diagonal: a non-finite entry, or a negative + /// variance. A diagonal is symmetric by construction, so only finiteness and non-negativity are + /// checked here (see [`validate_covariance`]). Admitting a zero or negative variance here is what + /// makes the degenerate measurement-update path reachable, so it is refused at the entry point. + pub fn new(state: InsErrorState, cov_diag: [R; NAV_STATES]) -> Result { + let cov = diag(&cov_diag); + validate_covariance(&cov)?; + Ok(Self { state, cov }) } - /// Predict one step: propagate the error state and `P ← F·P·Fᵀ + Q` (`Q` = the process-noise - /// diagonal — IMU random walk + clock noise, inflated during buffet). - pub fn predict(&mut self, dt: R, specific_force: [R; 3], process_noise_diag: [R; NAV_STATES]) { + /// Predict one step: propagate the error state and `P ← F·P·Fᵀ + Q_d`, where the process noise is + /// the **first-order discretisation** `Q_d = Q_c·dt` of the caller's continuous-time input. + /// + /// `process_noise_diag` is indexed in the canonical 17-state order + /// `[pos(3), vel(3), att(3), accel_bias(3), gyro_bias(3), clock_bias, clock_drift]`, the order + /// [`InsErrorState::to_array`] packs. + /// + /// It is a **continuous-time process-noise spectral density** (units: `state²/s`, e.g. + /// `m²/s` on the position block, `(m/s)²/s` on velocity), *not* an already-discretised + /// per-step covariance. Scaling it by `dt` is what makes the accumulated covariance a function of + /// **elapsed time** rather than step count: over a fixed horizon `T = N·dt`, the additive noise is + /// `N·(Q_c·dt) = T·Q_c`, independent of `dt`, so the filter's tuning survives a change of step size. + /// Without the `dt` factor (the pre-2026-07-24 behaviour) halving `dt` over a fixed horizon doubled + /// the accumulated process noise and silently re-tuned the filter. + /// + /// `Q_d = Q_c·dt` is the standard first-order (Euler–Maruyama) discretisation of the random-walk and + /// white-noise terms this filter carries — IMU bias random walk and clock noise (Groves 2013, + /// §14.2.4). The within-step cross-coupling the transition matrix induces (a Van Loan discretisation + /// would capture it) is deliberately not modelled here: it buys accuracy the filter's other Tier-A + /// approximations (`C ≈ I`, no Earth rotation) do not warrant. + /// + /// # Errors + /// Refuses a step it cannot discretise, rather than reporting success while writing a `NaN` or a + /// negative variance into the covariance: + /// * a non-finite or non-positive `dt`. `dt = NaN` poisons every entry of `F` and therefore all of + /// `P`; `dt < 0` runs the discretisation backwards and *subtracts* `|dt|·Q_c` from the diagonal, + /// leaving negative variances that no later check inside the filter looks at; `dt = 0` is a step + /// that does not advance and adds nothing, so it is refused as a caller error rather than + /// silently absorbed. + /// * a negative or non-finite process-noise entry. A spectral density is non-negative by + /// definition, and a negative one shrinks the covariance on a *predict* — uncertainty falling + /// while dead-reckoning is the wrong direction to be wrong for a GNSS-denied estimate. + /// + /// Rejection is **atomic**: both checks precede any mutation, so a refused predict leaves the + /// state and covariance exactly as they were and the caller can retry the step. The + /// [`ReentryNavEngine::predict`](crate::ReentryNavEngine::predict) that drives this filter already + /// returns a `Result`, so the refusal reaches the marcher. + pub fn predict( + &mut self, + dt: R, + specific_force: [R; 3], + process_noise_diag: [R; NAV_STATES], + ) -> Result<(), PhysicsError> { + // Guard the step size before it enters `F` and the `Q_c·dt` discretisation. + if dt <= R::zero() || !dt.is_finite() { + return Err(PhysicsError::PhysicalInvariantBroken(format!( + "navigation predict step dt is non-positive or non-finite (dt.is_finite() = {})", + dt.is_finite() + ))); + } + // Guard the spectral density: a variance rate is non-negative and finite. + for (i, &q) in process_noise_diag.iter().enumerate() { + if q < R::zero() || !q.is_finite() { + return Err(PhysicsError::PhysicalInvariantBroken(format!( + "process-noise spectral density [{i}] is negative or non-finite (is_finite() = {})", + q.is_finite() + ))); + } + } + // All guards passed — from here every write is committed, so the predict is atomic. self.state = self.state.propagate(dt, specific_force); let f = nav_transition_matrix(dt, specific_force); let fp = mat_mul(&f, &self.cov); let fpft = mat_mul(&fp, &mat_transpose(&f)); - self.cov = mat_add(&fpft, &diag(&process_noise_diag)); + // Q_d = Q_c · dt : discretise the continuous-time spectral density onto this step. + let q_d: [R; NAV_STATES] = core::array::from_fn(|i| process_noise_diag[i] * dt); + self.cov = mat_add(&fpft, &diag(&q_d)); + Ok(()) } /// Fold in one scalar measurement `z = h·δx + noise` with measurement variance `r` (a sequential /// scalar update; `S = h·P·hᵀ + r` is a scalar, so no inversion). Corrects the estimate and shrinks /// the covariance. /// + /// `h` is the measurement row in the canonical 17-state order + /// `[pos(3), vel(3), att(3), accel_bias(3), gyro_bias(3), clock_bias, clock_drift]`, the order + /// [`InsErrorState::to_array`] packs. One axis of a position fix sets `h[i] = 1` for `i` in `0..3`; + /// the clock bias is index `15` and the clock drift index `16`. + /// /// The covariance update is the **Joseph form** `P ← (I−K·h)·P·(I−K·h)ᵀ + r·K⊗K`, followed by a /// re-symmetrization. The simple form `P − K⊗(h·P)` loses symmetry and positive-definiteness /// under long sequences of near-unity-gain folds (a precise receiver folded every step), after /// which the cross-term gains change sign and the injected corrections diverge; Joseph is /// PSD-preserving unconditionally (Groves 2013, §3.4.3). - pub fn update_scalar(&mut self, h: [R; NAV_STATES], z: R, r: R) { + /// + /// **What the re-symmetrization guarantees, and what it does not.** Entries `[i][j]` and + /// `[j][i]` are written from the same two summands, so `P` is symmetric when this method + /// returns. That is a per-update property, not a running one: [`predict`](Self::predict) forms + /// `F·P·Fᵀ + Q_d` and does **not** re-symmetrize, and the two triple products accumulate their + /// sums in different orders, so float-level asymmetry re-enters at every predict step. Nothing + /// here bounds how far asymmetry or the positive-semi-definiteness margin drifts over a long + /// run, and Joseph's PSD preservation is an exact-arithmetic result. In floating point it is + /// the robust form, not a proof. The standing checks are the guards below (a refused update + /// mutates nothing) and the `validate_covariance` screen, which runs only at construction and + /// restore. + /// + /// **What is measured, and what is still unpinned.** The *predict* half now is: a 5000-step + /// predict-only coast is held against the `√ε` band `restore` admits, and the measured residual sits + /// around `3e-7` of it — sub-linear in step count (10× the steps moved it by 2.6×, the signature of a + /// random walk rather than amplification), so a snapshot taken after a long dead-reckoning coast is + /// not a rejection hazard. The *fold* half is not: the longest sequence in the suite is 60 position + /// fixes (`closed_loop_tests`), and those tests assert position error and variance collapse; none + /// reads [`covariance`](Self::covariance) after a long near-unity-gain sequence to bound + /// `max|P[i][j] − P[j][i]|` or to check `vᵀPv ≥ 0`. A refactor back to the simple form would still + /// pass CI. + /// + /// # Errors + /// Refuses a measurement it cannot fold, rather than writing a `NaN` into the state and covariance: + /// * a non-finite measurement `z` (a garbage sensor fix): `k·z` would poison every state component, + /// including the zero-gain ones (`0·NaN = NaN`), while the covariance stays finite — an invisible + /// corruption. `z` is not read until after this check, so the rejection stays atomic; + /// * a negative or non-finite measurement variance `r` (a variance is non-negative by definition); + /// * a non-positive or non-finite innovation covariance `s = h·P·hᵀ + r`, which the gain divides by. + /// + /// Rejection is **atomic**: every check precedes any mutation, so a refused update leaves the state + /// and covariance exactly as they were. This matters for the sequential per-axis folds in + /// [`ReentryNavEngine::correct_position`], where a rejection on one axis must not leave an earlier + /// axis half-applied. + pub fn update_scalar(&mut self, h: [R; NAV_STATES], z: R, r: R) -> Result<(), PhysicsError> { + // Guard the measurement itself: a non-finite `z` slips past the `r` and `s` guards (neither + // reads `z`) and, via `x_new[i] = x[i] + k[i]·(z − h·x)`, writes `NaN` into every state + // component while the Joseph covariance update stays finite — a silent, witness-invisible poison. + if !z.is_finite() { + return Err(PhysicsError::PhysicalInvariantBroken( + "measurement z is non-finite".into(), + )); + } + // Guard the measurement variance before it enters the innovation covariance. + if r < R::zero() || !r.is_finite() { + return Err(PhysicsError::PhysicalInvariantBroken(format!( + "measurement variance r is negative or non-finite (r.is_finite() = {})", + r.is_finite() + ))); + } let x = self.state.to_array(); let ph = mat_vec(&self.cov, &h); // P·hᵀ let s = dot(&h, &ph) + r; // innovation covariance (scalar) + // Guard the innovation covariance before dividing: `s ≤ 0` (reachable when a zero-variance + // state meets a zero-variance measurement) or `s` non-finite would make the gain `NaN`. + // Written as `s <= 0 || !finite` rather than `!(s > 0)` to keep `neg_cmp_op_on_partial_ord` clean. + if s <= R::zero() || !s.is_finite() { + return Err(PhysicsError::PhysicalInvariantBroken(format!( + "innovation covariance s = h·P·hᵀ + r is non-positive or non-finite (s.is_finite() = {})", + s.is_finite() + ))); + } + // All guards passed — from here every write is committed, so the update is atomic. let innov = z - dot(&h, &x); let k: [R; NAV_STATES] = core::array::from_fn(|i| ph[i] / s); // Kalman gain let x_new: [R; NAV_STATES] = core::array::from_fn(|i| x[i] + k[i] * innov); @@ -139,6 +332,7 @@ impl NavFilter { (joseph + joseph_t) * half }) }); + Ok(()) } /// The full error-state covariance matrix (snapshot access; diagnostics use @@ -150,8 +344,18 @@ impl NavFilter { /// Rebuild a filter from snapshotted state and covariance: the exact inverse of reading /// [`state`](Self::state) and [`covariance`](Self::covariance). Exists for the /// state-snapshot resume path. - pub fn restore(state: InsErrorState, cov: [[R; NAV_STATES]; NAV_STATES]) -> Self { - Self { state, cov } + /// + /// # Errors + /// Rejects a `cov` that is not a covariance: a non-finite entry, an asymmetry beyond the + /// [`validate_covariance`] tolerance, or a negative variance on the diagonal. A snapshot carrying + /// such a matrix was already broken; failing loudly at restore is better than continuing from it + /// (a non-symmetric or negative-variance covariance drives the measurement update to a `NaN`). + pub fn restore( + state: InsErrorState, + cov: [[R; NAV_STATES]; NAV_STATES], + ) -> Result { + validate_covariance(&cov)?; + Ok(Self { state, cov }) } /// The current error-state estimate. diff --git a/deep_causality_cfd/src/navigation/ins_error_state.rs b/deep_causality_cfd/src/navigation/ins_error_state.rs index d4dcbb4f0..2b260d255 100644 --- a/deep_causality_cfd/src/navigation/ins_error_state.rs +++ b/deep_causality_cfd/src/navigation/ins_error_state.rs @@ -8,11 +8,19 @@ //! matrix action; the covariance propagation and measurement update ride on top of it in later slices. //! //! 17 error states: position (3), velocity (3), attitude-error (3), accelerometer bias (3), gyro bias -//! (3), plus the two carried clock states (bias, drift). The load-bearing property — and what the -//! closed-loop navigation gate rests on — is the **inertial drift growth law through the blackout**: a -//! constant accelerometer bias grows the position error as `t²`, a constant gyro bias as `t³` (the bias -//! tilts the attitude, which mis-projects the specific force). Keeping the bias + clock states alive -//! through the coast is what gives rapid reacquisition when GNSS returns. +//! (3), plus the two carried clock states (bias, drift). The **inertial drift growth law through the +//! blackout** is a property of this error-dynamics *model*: a constant accelerometer bias grows the +//! position error as `t²`, and a constant gyro bias as `t³` (the bias tilts the attitude, which +//! mis-projects the specific force). Keeping the bias + clock states alive through the coast is what +//! gives rapid reacquisition when GNSS returns. +//! +//! **The `t³` arm is not exercised by the shipped translational engine.** `ReentryNavEngine` integrates +//! translation, and the examples supply `ImuModel::sense_angular_rate` with a zero gyro bias, so the +//! attitude tilt that drives the `t³` term never grows in a shipped run: the observed drift is the `t²` +//! accelerometer arm. The `t³` law is the model's stated behaviour, not a measured result of this crate, +//! and the closed-loop navigation gates rest on the `t²` arm. See also `nav_sensors.rs`: the carried +//! `ImuModel::gyro_bias` is used to sense the angular rate, and it is not applied as a rotation of the +//! sensed specific force. //! //! Representative-frame model (Tier-A): no Earth rotation / transport rate; the body→nav DCM is taken as //! identity over a step (`C ≈ I`), so the linearised error dynamics are diff --git a/deep_causality_cfd/src/navigation/nav_sensors.rs b/deep_causality_cfd/src/navigation/nav_sensors.rs index f26569702..8e27fa50d 100644 --- a/deep_causality_cfd/src/navigation/nav_sensors.rs +++ b/deep_causality_cfd/src/navigation/nav_sensors.rs @@ -44,6 +44,14 @@ impl ImuModel { core::array::from_fn(|i| true_specific_force[i] + self.accel_bias[i]) } + /// The measured body angular rate: the true rate plus the gyro bias — the `ω̂` the nominal attitude + /// integrates. For the point-mass corridor/weather (no true rotation, `IMU_GYRO_BIAS = 0`) this is + /// zero, so the nominal attitude stays at identity; a non-zero gyro bias would tilt the nominal, the + /// error the ESKF's gyro-bias and attitude states exist to track. + pub fn sense_angular_rate(&self, true_angular_rate: [R; 3]) -> [R; 3] { + core::array::from_fn(|i| true_angular_rate[i] + self.gyro_bias[i]) + } + /// The accelerometer bias (the drift driver). pub fn accel_bias(&self) -> [R; 3] { self.accel_bias diff --git a/deep_causality_cfd/src/navigation/reentry_nav.rs b/deep_causality_cfd/src/navigation/reentry_nav.rs index 09f5d0849..6aac6e2c5 100644 --- a/deep_causality_cfd/src/navigation/reentry_nav.rs +++ b/deep_causality_cfd/src/navigation/reentry_nav.rs @@ -24,6 +24,7 @@ use super::eskf::NavFilter; use deep_causality_algebra::RealField; use deep_causality_num::FromPrimitive; +use deep_causality_num_complex::Quaternion; use deep_causality_physics::{ KsPropagator, PhysicsError, ks_strang_step, relativistic_clock_drift_rate_kernel, }; @@ -35,6 +36,17 @@ pub struct ReentryNavEngine { position: [R; 3], velocity: [R; 3], filter: NavFilter, + /// The nominal **body→nav attitude**. Integrated from the sensed angular rate each predict and + /// corrected by the estimated `δψ` on each fix, this is what makes the ESKF's attitude-error state an + /// error *about a nominal* rather than an estimate with nowhere to go: the reset in + /// [`correct_position`](Self::correct_position) may zero the attitude block precisely because the + /// correction was injected here first. Its DCM `attitude.to_rotation_matrix()` rotates the body-frame + /// specific force into the nav frame the filter's `−[f]×` coupling reads; the identity quaternion + /// reproduces the Tier-A `C ≈ I` model exactly. A non-rotating vehicle (`ω̂ = 0`) stays at identity + /// under *predict*, but a fix still injects the small `δψ` the position↔attitude cross-covariance + /// carries, so the nominal drifts a hair off identity and the numbers move slightly (measured: the + /// corridor's reacquisition error `0.2802 → 0.2804 m`) — the applied correction, not a no-op. + attitude: Quaternion, /// Carried proper-time offset `τ − t` (s) — the relativistic clock correction, **not** the KS /// fictitious time `s`. tau_offset: R, @@ -43,41 +55,72 @@ pub struct ReentryNavEngine { impl ReentryNavEngine { /// Build the engine from an initial Cartesian nominal `(position, velocity)`, the primary - /// gravitational parameter `gm`, and an initialised error-state filter. + /// gravitational parameter `gm`, and an initialised error-state filter. The nominal attitude starts + /// at identity (`C ≈ I`); a known initial attitude can be injected afterwards via a fix, or the + /// engine can be [`restore`](Self::restore)d with one. pub fn new(position: [R; 3], velocity: [R; 3], gm: R, filter: NavFilter) -> Self { Self { gm, position, velocity, filter, + attitude: Quaternion::identity(), tau_offset: R::zero(), elapsed: R::zero(), } } - /// One predict step of `dt`: advance the nominal (KS drift + the ④ aero acceleration as a Strang - /// kick), propagate the error-state covariance, and accumulate the carried relativistic clock offset - /// `τ` from the real orbit geometry. `process_noise` is the ESKF `Q` diagonal. + /// One predict step of `dt`: integrate the nominal attitude from the sensed body angular rate, + /// advance the nominal (KS drift + the ④ aero acceleration as a Strang kick), propagate the + /// error-state covariance, and accumulate the carried relativistic clock offset `τ` from the real + /// orbit geometry. `process_noise` is the ESKF `Q` continuous-time spectral density (see + /// [`NavFilter::predict`]). + /// + /// `angular_rate` is the **sensed body angular rate `ω̂`** (rad/s) — the gyro's measurement, true + /// rate plus bias. It integrates the nominal body→nav attitude; the resulting DCM `C(q)` rotates the + /// body-frame specific force `aero_accel` into the nav frame the filter's `−[f]×` coupling reads, + /// replacing the Tier-A `C ≈ I` assumption. For a non-rotating vehicle (`ω̂ = 0`, the point-mass + /// examples) *this* step keeps the attitude exactly at identity and `C(q)·f = f`; the nominal only + /// leaves identity when [`correct_position`](Self::correct_position) injects a fix's `δψ`. /// /// # Errors - /// Propagates KS-propagation / clock-kernel failures (the half-kicked state must stay bound). + /// Propagates KS-propagation / clock-kernel failures (the half-kicked state must stay bound) and a + /// refusal from [`NavFilter::predict`] (a non-positive/non-finite `dt`, a negative process-noise + /// entry). The step is **atomic**: every fallible stage runs against locals and nothing is written + /// back until all of them have succeeded, so a refused predict leaves the attitude, the nominal + /// position/velocity, the filter, the carried clock and the elapsed time exactly as they were. A + /// caller may therefore retry the same step without double-integrating the gyro — the failure mode + /// an "integrate the attitude first, then propagate" ordering would produce. pub fn predict( &mut self, dt: R, aero_accel: [R; 3], + angular_rate: [R; 3], process_noise: [R; 17], ) -> Result<(), PhysicsError> { + // Integrate the nominal attitude into a *local*: q ← normalize(q ⊗ Δq), + // Δq = from_axis_angle(ω̂, |ω̂|·dt). A zero rate yields the identity rotor (from_axis_angle + // returns identity for a zero-length axis), so a non-rotating vehicle leaves the nominal exactly + // at identity. It is committed to `self` only once every fallible stage below has succeeded. + let delta = Quaternion::from_axis_angle(angular_rate, norm(angular_rate) * dt); + let attitude = (self.attitude * delta).normalize(); + let (r1, v1) = ks_strang_step(self.position, self.velocity, self.gm, dt, |_r, _v| { aero_accel })?; - self.position = r1; - self.velocity = v1; - // The accelerometer senses only the non-gravitational (aero) specific force. - self.filter.predict(dt, aero_accel, process_noise); // Carried clock: dτ/dt − 1 at the current geometry, integrated on proper time (s ≠ τ). let radius = norm(r1); let speed = norm(v1); let rate = relativistic_clock_drift_rate_kernel(radius, speed, self.gm)?; + // The accelerometer senses the non-gravitational (aero) specific force in the *body* frame; + // rotate it into the nav frame via the nominal DCM before the filter's error-dynamics use it. + let f_nav = mat3_vec(&attitude.to_rotation_matrix(), aero_accel); + // The last fallible stage, and itself atomic (it validates before it mutates), so it goes first + // among the commits: if it refuses, no field of the engine has been touched yet. + self.filter.predict(dt, f_nav, process_noise)?; + self.attitude = attitude; + self.position = r1; + self.velocity = v1; self.tau_offset += rate * dt; self.elapsed += dt; Ok(()) @@ -86,19 +129,44 @@ impl ReentryNavEngine { /// Fold in a position fix (GNSS or through-plasma optical): three sequential scalar updates of the /// per-axis position error, then **inject** the estimated error into the nominal and reset the /// navigation error (the ESKF feedback). `r_var` is the per-axis measurement variance. - pub fn correct_position(&mut self, measured_position: [R; 3], r_var: R) { + /// + /// # Errors + /// Propagates a refusal from [`NavFilter::update_scalar`] — a degenerate measurement (non-finite or + /// negative `r_var`, or a zero-variance axis met with a zero-variance fix) — so a caller learns the + /// fix was **not** folded rather than continuing as if it had been. The three per-axis folds are + /// applied atomically: the filter is snapshotted first and rolled back on any rejection, so a + /// refusal on the second axis never leaves the first axis's fold applied (nor a partial correction + /// injected into the nominal). + pub fn correct_position( + &mut self, + measured_position: [R; 3], + r_var: R, + ) -> Result<(), PhysicsError> { + let backup = self.filter.clone(); for (i, &m) in measured_position.iter().enumerate() { let z = m - self.position[i]; let mut h = [R::zero(); 17]; h[i] = R::one(); - self.filter.update_scalar(h, z, r_var); + if let Err(e) = self.filter.update_scalar(h, z, r_var) { + self.filter = backup; + return Err(e); + } } let est = *self.filter.state(); let dp = est.position_error(); let dv = est.velocity_error(); + let dpsi = est.attitude_error(); self.position = core::array::from_fn(|i| self.position[i] + dp[i]); self.velocity = core::array::from_fn(|i| self.velocity[i] + dv[i]); + // Inject the estimated attitude error into the nominal: q ← normalize(Δq ⊗ q), where Δq rotates + // by the small-angle error `δψ`. Only after this is the reset below legitimate — the attitude + // block is zeroed *because* its estimate was transferred to the nominal, not discarded. For the + // point-mass examples `δψ ≈ 0`, so this leaves the nominal at identity but the covariance + // reduction is now justified by an applied (≈ zero) correction rather than claimed for free. + let correction = Quaternion::from_axis_angle(dpsi, norm(dpsi)); + self.attitude = (correction * self.attitude).normalize(); self.filter.reset_navigation_error(); + Ok(()) } /// The current Cartesian nominal position. @@ -128,14 +196,16 @@ impl ReentryNavEngine { /// Rebuild an engine from snapshotted state: the exact inverse of reading /// [`position`](Self::position), [`velocity`](Self::velocity), [`gm`](Self::gm), - /// [`filter`](Self::filter), [`carried_clock_offset`](Self::carried_clock_offset), and - /// [`elapsed_time`](Self::elapsed_time). Exists for the state-snapshot resume path, so a - /// restored engine is bit-identical to the suspended one. + /// [`filter`](Self::filter), [`attitude`](Self::attitude), + /// [`carried_clock_offset`](Self::carried_clock_offset), and [`elapsed_time`](Self::elapsed_time). + /// Exists for the state-snapshot resume path, so a restored engine is bit-identical to the + /// suspended one — including the nominal attitude, so a resumed rotating vehicle keeps its heading. pub fn restore( position: [R; 3], velocity: [R; 3], gm: R, filter: NavFilter, + attitude: Quaternion, tau_offset: R, elapsed: R, ) -> Self { @@ -144,6 +214,7 @@ impl ReentryNavEngine { position, velocity, filter, + attitude, tau_offset, elapsed, } @@ -154,6 +225,11 @@ impl ReentryNavEngine { &self.filter } + /// The nominal body→nav attitude (the reacquisition/resume witness for the attitude channel). + pub fn attitude(&self) -> Quaternion { + self.attitude + } + /// Whether the current nominal is a bound Kepler orbit — i.e. it lifts back onto the KS constraint /// manifold (the B2 projection invariant: a valid re-lift means the bilinear gauge is satisfied). pub fn is_on_orbit_manifold(&self) -> bool { @@ -164,3 +240,9 @@ impl ReentryNavEngine { fn norm(v: [R; 3]) -> R { (v[0] * v[0] + v[1] * v[1] + v[2] * v[2]).sqrt() } + +/// Rotate a 3-vector by a 3×3 matrix: `m · v`. Used to carry the body-frame specific force into the nav +/// frame via the nominal attitude's DCM. +fn mat3_vec(m: &[[R; 3]; 3], v: [R; 3]) -> [R; 3] { + core::array::from_fn(|i| m[i][0] * v[0] + m[i][1] * v[1] + m[i][2] * v[2]) +} diff --git a/deep_causality_cfd/src/navigation/regime_switch.rs b/deep_causality_cfd/src/navigation/regime_switch.rs index 259388740..550d91c27 100644 --- a/deep_causality_cfd/src/navigation/regime_switch.rs +++ b/deep_causality_cfd/src/navigation/regime_switch.rs @@ -62,7 +62,12 @@ pub struct RegimeSwitch { impl RegimeSwitch { /// A switch with the lower (`exit_direct`) and upper (`enter_direct`) g-load thresholds and an initial - /// regime. Requires `exit_direct ≤ enter_direct` (the hysteresis band). + /// regime. + /// + /// **`exit_direct ≤ enter_direct` is a stated precondition, not an enforced one.** This constructor + /// is infallible and does not reject an inverted band. Supplying `exit_direct > enter_direct` inverts + /// the Schmitt trigger, so instead of suppressing chatter the switch flips on every step inside the + /// band. Nothing reports it. Order the thresholds at the call site. pub fn new(exit_direct: R, enter_direct: R, initial: IntegratorRegime) -> Self { Self { exit_direct, diff --git a/deep_causality_cfd/src/solvers/dec/boundary/body_force_zone.rs b/deep_causality_cfd/src/solvers/dec/boundary/body_force_zone.rs index 4efeee8e7..b1e80720d 100644 --- a/deep_causality_cfd/src/solvers/dec/boundary/body_force_zone.rs +++ b/deep_causality_cfd/src/solvers/dec/boundary/body_force_zone.rs @@ -15,6 +15,12 @@ use super::boundary_zone::BoundaryZone; /// A body force on the velocity edges: the edge-integral cochain `g♭` (e.g. a streamwise pressure /// gradient `G·h` on the x-edges) added to the rate source. The carried tensor is the grade-1 /// edge cochain; the solver validates and wraps it as a `BodyForceOneForm` when assembling. +/// +/// **Units.** Each entry is the line integral `∫_e (f/ρ)·dl` over its edge — an *acceleration* line +/// integral, in m²/s², not a force. The solver's incompressible formulation takes `ρ = 1`, so the value +/// is numerically equal to the force-density line integral, and the distinction matters only when a +/// caller derives `f` from a dimensional force. The rate assembly adds this cochain directly to the +/// right-hand side; see `DecNsRate`. #[derive(Debug, Clone)] pub struct BodyForceZone { force: CausalTensor, diff --git a/deep_causality_cfd/src/solvers/dec/boundary/boundary_zone.rs b/deep_causality_cfd/src/solvers/dec/boundary/boundary_zone.rs index 71e30834e..dede0811c 100644 --- a/deep_causality_cfd/src/solvers/dec/boundary/boundary_zone.rs +++ b/deep_causality_cfd/src/solvers/dec/boundary/boundary_zone.rs @@ -21,8 +21,8 @@ use crate::solvers::dec::DecNsScalar; /// * `collect_rate_source` — adds a forcing term to the rate right-hand side (e.g. a body force). /// * `collect_constrained_edges` — edges pinned to zero in the constrained projection, unioned with /// the structural no-slip set. -/// * `collect_lift` — prescribed (inhomogeneous, possibly step-dependent) edge values, e.g. a -/// moving-wall tangential velocity. +/// * `collect_lift` — prescribed (inhomogeneous) edge values, e.g. a moving-wall tangential +/// velocity. Collected **once at construction** and static thereafter; see the method doc. /// * `collect_prescribed_edges` — inflow edges fixed at their field value, their flux counted in /// the open-boundary projection's divergence (`leray_project_open_opts`). /// * `collect_reference_vertices` — outflow pressure-reference vertices for the open-boundary @@ -64,6 +64,12 @@ pub trait BoundaryZone { } /// Add this zone's prescribed (inhomogeneous) edge values for march step `step`. + /// + /// **`step` is always `0` in the shipped solver.** The lift is collected **once, at construction** + /// (`DecNsSolver::with_zones` calls `collect_lift(manifold, 0, ..)`) and reused for every march + /// step, so a zone that varies its lift with `step` will have only its step-0 value applied. The + /// parameter exists for a future per-step re-collection, which would need `&mut self` or interior + /// mutability on the solver. Treat the lift as **static** until then. fn collect_lift( &self, _manifold: &Manifold, R>, diff --git a/deep_causality_cfd/src/solvers/dec/boundary/inflow.rs b/deep_causality_cfd/src/solvers/dec/boundary/inflow.rs index 542ecd692..9c2fa9fa9 100644 --- a/deep_causality_cfd/src/solvers/dec/boundary/inflow.rs +++ b/deep_causality_cfd/src/solvers/dec/boundary/inflow.rs @@ -20,6 +20,11 @@ use super::boundary_zone::BoundaryZone; /// face's normal edges as the prescribed (inflow) set — held at their lifted value with their flux /// counted in the open-boundary projection — and the lift that sets that value. Requires a /// matching [`Outflow`](super::outflow::Outflow) reference to balance the net flux. +/// +/// **The `Outflow` requirement is not checked at configuration time.** `with_zones` does not reject a +/// zone set that prescribes inflow edges without supplying any reference vertex. Without a reference the +/// open-boundary projection has no pressure gauge, so the failure surfaces later as a non-converging or +/// meaningless solve rather than as a rejected configuration. Pair every `Inflow` with an `Outflow`. #[derive(Debug, Clone, Copy)] pub struct Inflow { wall_axis: usize, diff --git a/deep_causality_cfd/src/solvers/dec/boundary/outflow.rs b/deep_causality_cfd/src/solvers/dec/boundary/outflow.rs index 282846f34..e2111473c 100644 --- a/deep_causality_cfd/src/solvers/dec/boundary/outflow.rs +++ b/deep_causality_cfd/src/solvers/dec/boundary/outflow.rs @@ -18,8 +18,13 @@ use super::boundary_zone::BoundaryZone; /// An outflow boundary: the face perpendicular to `wall_axis` (the `max_side` face when true, the /// zero face otherwise) is the open-boundary **pressure reference**. Its vertices pin `φ = 0` in /// the projection, so the outflow velocity is free and adjusts to balance the inflow flux (mass -/// conservation). It carries no prescribed velocity — the outflow is determined by incompressibility -/// (a zero-gradient / convective outflow; the boundary time-update lands with the outflow group). +/// conservation). It carries no prescribed velocity: the outflow velocity is whatever the projection +/// produces, with the face's tangential edges left free. +/// +/// This is a **pressure-reference** outflow, not a zero-gradient or convective one. No `∂u/∂n = 0` +/// condition and no boundary time-update `∂u/∂t + U_c·∂u/∂n = 0` is applied; the only thing imposed is +/// `φ = 0` on the face's vertices. That is sufficient to make the open-boundary Poisson problem +/// well-posed and to let the net flux balance, and it is what the code does. #[derive(Debug, Clone, Copy)] pub struct Outflow { wall_axis: usize, diff --git a/deep_causality_cfd/src/solvers/dec/dec_ns_rate.rs b/deep_causality_cfd/src/solvers/dec/dec_ns_rate.rs index b25e03398..0346b0175 100644 --- a/deep_causality_cfd/src/solvers/dec/dec_ns_rate.rs +++ b/deep_causality_cfd/src/solvers/dec/dec_ns_rate.rs @@ -4,7 +4,16 @@ */ //! The DEC right-hand side of incompressible Navier–Stokes in rotational -//! (Lamb) form under Leray projection: `P(−i_u(du♭) − ν Δ_dR u♭ + g♭)`. +//! (Lamb) form under Leray projection: +//! `P(−½[i_u(du♭) − G*_ω u] − ν Δ_dR u♭ + g♭)`. +//! +//! The convective term is **skew-symmetrized** (the dec-ns-stability fix): +//! `conv' = ½[G_ω u − G*_ω u]` with `G_ω : x ↦ i_x du♭` (so `G_ω u = i_u(du♭)`) +//! and `G*_ω` its M-adjoint, giving `⟨u, conv'⟩_M = 0` identically. The +//! uncorrected Lamb gather `i_u(du♭)` alone injects energy in under-resolved +//! turbulent regimes (measured 2026-06-12; see the fix-dec-convective-instability +//! change). Both the fused and generic assemblies march this skew form; the raw +//! gather is not a marched or exposed surface. //! //! The projector sits **inside** the rate (the governing equation of //! `cfd-gap.md` §2), so the ODE the integrator marches is exactly the @@ -32,18 +41,25 @@ use deep_causality_physics::BodyForceOneForm; use deep_causality_physics::PhysicsError; use deep_causality_physics::VelocityOneForm; -/// The rate field `u♭ ↦ −i_u(du♭) − ν Δ_dR u♭ + g♭` on a metric-bearing -/// periodic lattice manifold. +/// The rate field `u♭ ↦ −½[i_u(du♭) − G*_ω u] − ν Δ_dR u♭ + g♭` on a +/// metric-bearing periodic lattice manifold. The convective term is the +/// skew-symmetrized `conv' = ½[G_ω u − G*_ω u]` (the dec-ns-stability fix; +/// see the module doc), not the raw Lamb gather `i_u(du♭)`. /// /// Construction validates every operator precondition — metric present, /// lattice dimension at least 2 (the convective term needs grade-2 cells), /// body-force edge count matching the lattice, `ν` finite and -/// non-negative — so that [`eval_projected`](Self::eval_projected) is **infallible** -/// (`Fn(&S) -> S`) and composes directly with -/// `deep_causality_calculus::Rk4`. Internal operator `Result`s are +/// non-negative — so that [`eval_unprojected`](Self::eval_unprojected) is +/// **infallible** (`Fn(&S) -> S`). Internal operator `Result`s are /// unwrapped against these construction-time invariants; each unwrap /// documents the invariant that makes it unreachable. /// +/// [`eval_projected`](Self::eval_projected) stays fallible: the Leray projection +/// runs a CG solve that can exhaust its iteration budget. `DecNsSolver::step` +/// adapts it to the `Fn(&S) -> S` shape `deep_causality_calculus::Rk4` requires by +/// parking a stage failure in a deferred slot and short-circuiting at the step +/// boundary. +/// /// The viscous sign follows the Stage 0 pin: on a flat torus the /// Hodge–de Rham Laplacian satisfies `Δ_dR = −∇²`, so the physical /// diffusion `+ν∇²u` enters as `−ν Δ_dR u♭`. @@ -424,6 +440,13 @@ impl<'m, const D: usize, R: DecNsScalar> DecNsRate<'m, D, R> { /// periodic uniform lattices only). Off by default; the validation /// ladder gates any future default-on. /// + /// **Only the fused stencil path honours this.** The spectral Laplacian is + /// read inside the compiled-stencil assembly; the generic path evaluates + /// `manifold.laplacian_of` instead. So combining this with + /// [`Self::with_generic_assembly`] leaves the spectral choice **silently + /// unused** — the rate still evaluates, using the generic Hodge–de Rham + /// Laplacian. Pick one. + /// /// # Errors /// `PhysicsError::TopologyError` when the lattice is not fully /// periodic or the metric carries no per-axis Euclidean spacings. @@ -435,6 +458,11 @@ impl<'m, const D: usize, R: DecNsScalar> DecNsRate<'m, D, R> { /// Switch this rate to the generic compositional operator path — the /// equivalence oracle and the benchmark baseline. The default is the /// compiled stencil pipeline. + /// + /// **This discards any spectral viscous opt-in.** The generic path evaluates + /// the viscous term through `manifold.laplacian_of`, so a + /// [`Self::with_spectral_diffusion`] set earlier (or later) has no effect + /// here; see that method. pub fn with_generic_assembly(mut self) -> Self { self.engine = None; self @@ -454,8 +482,9 @@ impl<'m, const D: usize, R: DecNsScalar> DecNsRate<'m, D, R> { self.nu.set(nu); } - /// Evaluates `P(−i_u(du♭) − ν Δ_dR u♭ + g♭)`: the projected rate the - /// integrator marches. One gauge-fixed CG solve per evaluation. + /// Evaluates `P(−½[i_u(du♭) − G*_ω u] − ν Δ_dR u♭ + g♭)`: the projected + /// rate the integrator marches, with the skew-symmetrized convective term + /// (see the type doc). One gauge-fixed CG solve per evaluation. /// /// # Errors /// `PhysicsError::TopologyError` when the projection CG does not @@ -503,9 +532,9 @@ impl<'m, const D: usize, R: DecNsScalar> DecNsRate<'m, D, R> { ) -> Result, PhysicsError> { let u_slice = u.as_tensor().as_slice(); - // Per-term vectors through the configured assembly. `conv` is - // `i_u(du♭)` and `lap` is `Δ_dR u♭`; the rate carries them as - // `−conv` and `−ν·lap`. + // Per-term vectors through the configured assembly. `conv` is the + // skew-symmetrized convective term `½[i_u(du♭) − G*_ω u]` and `lap` + // is `Δ_dR u♭`; the rate carries them as `−conv` and `−ν·lap`. let (conv, lap): (Vec, Vec) = if let Some(engine) = &self.engine { let t = &engine.tables; let mut ws = engine.ws.borrow_mut(); @@ -717,7 +746,10 @@ impl<'m, const D: usize, R: DecNsScalar> DecNsRate<'m, D, R> { .collect() } - /// Evaluates the **unprojected** assembly `−i_u(du♭) − ν Δ_dR u♭ + g♭`. + /// Evaluates the **unprojected** assembly + /// `−½[i_u(du♭) − G*_ω u] − ν Δ_dR u♭ + g♭`. The convective term is the + /// skew-symmetrized one the marching rate uses (see the type doc), here + /// without the projector. /// /// Infallible by the construction-time validation; see the type doc. /// This is the cross-validation surface (the pointwise oracle has no diff --git a/deep_causality_cfd/src/solvers/dec/dec_ns_solver/pressure.rs b/deep_causality_cfd/src/solvers/dec/dec_ns_solver/pressure.rs index cdf1256a6..92db4fdb6 100644 --- a/deep_causality_cfd/src/solvers/dec/dec_ns_solver/pressure.rs +++ b/deep_causality_cfd/src/solvers/dec/dec_ns_solver/pressure.rs @@ -11,8 +11,12 @@ //! `∂u/∂t = rhs_unproj − ∇(p + ½|u|²)`, and `∂u/∂t = P(rhs_unproj)` — //! so the discarded gradient part satisfies `(I − P)rhs = +∇B`: the //! Bernoulli pressure **is** the grade-0 potential, and the static -//! pressure subtracts the kinetic 0-form. Both come back mean-zero-gauged through the projection's gauge -//! fixing; absolute pressure on a torus is defined only up to a constant. +//! pressure subtracts the kinetic 0-form. Absolute pressure on a torus is defined only up to a +//! constant, so a gauge must be picked, and the two forms do **not** share it: the **Bernoulli** form +//! comes back **mean-zero** from the projection's gauge fixing, and the **static** form inherits that +//! gauge shifted by `−mean(½|u|²)`, because it is the Bernoulli field minus the kinetic 0-form. So the +//! static field is mean-zero only for a field at rest. Compare either against its own mean, or re-gauge +//! before comparing with an external pressure. use alloc::format; use alloc::vec::Vec; diff --git a/deep_causality_cfd/src/solvers/dec/mod.rs b/deep_causality_cfd/src/solvers/dec/mod.rs index e2ae0458a..09fe2e681 100644 --- a/deep_causality_cfd/src/solvers/dec/mod.rs +++ b/deep_causality_cfd/src/solvers/dec/mod.rs @@ -3,40 +3,74 @@ * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved. */ -//! The periodic DEC-native incompressible Navier–Stokes solver. +//! The DEC-native incompressible Navier–Stokes solver. +//! +//! **Supported boundary configurations.** Fully periodic (the default, and the +//! only one the spectral viscous option supports); wall-bounded with no-slip and +//! a prescribed moving-wall lift; free-slip walls; immersed cut-cell bodies +//! (aperture-resolved by default, staircase as the fallback); and open +//! inflow/outflow with a pressure reference on the outflow face. The zones live +//! in [`boundary`] and are folded into the rate's constrained projection. //! //! Velocity is an edge 1-form for the entire solve. The governing //! formulation is the rotational (Lamb) form under Leray projection: //! //! ```text -//! ∂u♭/∂t = P( − i_u ω + ν Δ u♭ + g♭ ), ω = d u♭, Δ_dR = −∇² +//! ∂u♭/∂t = P( − ½[i_u ω − G*_ω u] − ν Δ_dR u♭ + g♭ ), ω = d u♭ //! ``` //! +//! Every symbol here is the operator the code applies. The viscous term is +//! written with the **same** `Δ_dR` the solver evaluates: on a flat torus the +//! Hodge–de Rham Laplacian satisfies `Δ_dR = −∇²`, so `− ν Δ_dR u♭` *is* the +//! physical diffusion `+ ν ∇² u♭`. The convective term is skew-symmetrized for +//! stability (`G*_ω` is the M-adjoint of `x ↦ i_x ω`; the dec-ns-stability +//! fix); see [`DecNsRate`]. +//! //! Pressure vanishes from the equations (the projector annihilates every //! gradient, including `∇(|u|²/2)` of the Lamb split), and //! incompressibility is exact by construction: the projected field's //! discrete divergence is zero to the CG tolerance — the projector *is* //! the equation. //! -//! The march uses the **Chorin placement**: an unprojected `Rk4` step over -//! the whole-field state, then one gauge-fixed Leray projection back into -//! the [`SolenoidalField`](deep_causality_physics::SolenoidalField) type-state, then the -//! CFL guard. The splitting at the projection is first order in time -//! regardless of the integrator's interior order; validation therefore -//! gates on spatial refinement at fixed CFL. +//! The march applies the Leray projector **inside each `Rk4` stage**: the +//! stage rate is the projected rate `P∘rhs`, so every increment is +//! divergence-free and the marched ODE is the projected dynamics with no +//! operator-splitting error. A near-free type-state re-entry projection +//! follows (its input is already divergence-free), restoring the +//! [`SolenoidalField`](deep_causality_physics::SolenoidalField) construction +//! contract; the CFL guard runs last. Time accuracy is the integrator's; the +//! spatial discretisation dominates the error, so validation gates on spatial +//! refinement at fixed CFL. //! //! Module layout: -//! - [`DecNsRate`]: the right-hand side `−i_u(du♭) − ν Δ_dR u♭ + g♭`, -//! validated at construction so per-step evaluation is infallible and -//! composes directly with `deep_causality_calculus::Rk4`. +//! - [`DecNsRate`]: the right-hand side `−½[i_u(du♭) − G*_ω u] − ν Δ_dR u♭ + g♭`, +//! with the skew-symmetrized convective term, validated at construction so +//! per-step evaluation is infallible and composes directly with +//! `deep_causality_calculus::Rk4`. //! - [`DecNsSolver`]: configuration, the projected step, run loops, //! initial-condition seeding, and the opt-in pressure diagnostic. //! - [`StepOutput`] / [`RunOutput`]: per-step and per-run results carrying //! the diagnostics the step already computed. //! - [`diagnostics`]: DEC-native integral observables (energy, enstrophy, //! helicity, max speed, divergence residual). +//! - [`boundary`]: the zone types listed above (no-slip and moving wall, +//! free-slip, inflow, outflow, body force) and the `BoundaryZone` hooks the +//! solver folds. +//! - [`surface_force`]: cut-cell surface observables (viscous and pressure +//! traction, wall heat flux). +//! - [`energy_budget`]: the per-term energy budget used by the stability +//! diagnostic. +//! - [`spectral_diffusion`]: the opt-in spectral viscous evaluation (fully +//! periodic lattices only). +//! - [`scalar_transport`]: passive-scalar advection–diffusion on the same path. +//! - [`dec_config`]: the owned configuration container and its builder. //! - [`wrappers`]: the `PropagatingEffect` surface in the crate's existing //! kernel-wrapper tradition. +//! +//! Method reference: Mohamed, Hirani & Samtaney, "Discrete exterior calculus discretization of +//! incompressible Navier–Stokes equations over surface simplicial meshes", Journal of Computational +//! Physics 312:175–191, 2016 (`deep_causality_cfd/papers/mohamed2016.pdf`). This solver follows that +//! DEC formulation on a periodic lattice complex rather than a surface simplicial mesh. use core::fmt::{Debug, Display}; use deep_causality_algebra::RealField; diff --git a/deep_causality_cfd/src/solvers/dec/surface_force.rs b/deep_causality_cfd/src/solvers/dec/surface_force.rs index 0f409664f..e5a166225 100644 --- a/deep_causality_cfd/src/solvers/dec/surface_force.rs +++ b/deep_causality_cfd/src/solvers/dec/surface_force.rs @@ -67,9 +67,21 @@ pub fn fragment_area_vector( /// The **viscous (friction)** surface force on an immersed cut body: /// `F_μ = ∮_S μ(∇u + ∇uᵀ)·n dA`, summed over every cut cell's fragments. /// +/// Reference: Kirkpatrick, M. P., Armfield, S. W. & Kent, J. H., "A representation of curved +/// boundaries for the solution of the Navier–Stokes equations on a staggered three-dimensional +/// Cartesian grid", Journal of Computational Physics **184**(1):1–36, 2003 +/// (`deep_causality_cfd/papers/kirkpatrick2003.pdf`). +/// +/// Two deliberate departures from that paper are worth stating. First, **`Δh` here is the cell +/// support width along `n`** — `Δh = Σᵢ |nᵢ|·dxᵢ`, the projection of the cell onto the normal — not +/// the paper's node-to-wall distance, so it is a grid-scale sampling offset rather than a measured +/// surface distance. Second, the traction below **retains the wall-normal component** that the +/// paper's shear-only form drops. Both are consistent choices for the cut-cell fragments this +/// crate carries, and both change the number, so they are named rather than implied. +/// /// The velocity field is the edge 1-cochain `edge_form` (pass `state.as_one_form()`), `sharp`- /// reconstructed to vertex vectors. The wall shear is evaluated with a **one-sided wall-normal -/// gradient to the true surface distance `Δh`** (Kirkpatrick et al. 2003): for each fragment the +/// gradient over `Δh`**: for each fragment the /// velocity is zero at the wall (no-slip, anchored at the fragment centroid `c`) and sampled by /// multilinear interpolation at `c + Δh·n` one cell out along the outward normal `n`, so /// `∂u/∂n ≈ u_sample / Δh`. The Kirkpatrick wall traction `t = μ S·n` with the rank-one wall-normal diff --git a/deep_causality_cfd/src/solvers/dec/uncertain_inflow/inflow_march.rs b/deep_causality_cfd/src/solvers/dec/uncertain_inflow/inflow_march.rs index 8ea0376fa..17bff01bb 100644 --- a/deep_causality_cfd/src/solvers/dec/uncertain_inflow/inflow_march.rs +++ b/deep_causality_cfd/src/solvers/dec/uncertain_inflow/inflow_march.rs @@ -284,10 +284,15 @@ where /// boundary reconfiguration cannot fail on a valid, finite stream. /// /// # Errors -/// * `PhysicsError::DimensionMismatch` when `wall_axis`/`flow_axis` are out of range, equal, or -/// the stream is shorter than `steps`. +/// * `PhysicsError::DimensionMismatch` when `flow_axis >= D`, or when the stream is shorter than +/// `steps`. These two are checked here, up front. /// * Every rejection of [`DecNsSolver::with_moving_wall`] for the prescribed wall (periodic axis, -/// non-finite or wall-normal velocity). +/// non-finite or wall-normal velocity). `wall_axis` is range-checked there rather than here. +/// +/// **Not rejected: `flow_axis == wall_axis`.** Nothing here refuses a zone whose inflow direction is +/// the wall normal. Whether it is caught downstream depends on the probe value: the probe is built +/// from `default_inflow()`, so when that is zero the wall-normal guard in `with_moving_wall` sees a +/// zero velocity and passes, and the misconfiguration proceeds silently. Supply distinct axes. pub fn march_inflow<'m, const D: usize, R>( solver: DecNsSolver<'m, D, R>, field: SolenoidalField, diff --git a/deep_causality_cfd/src/solvers/dec/uncertain_inflow/uncertain_boundary_source.rs b/deep_causality_cfd/src/solvers/dec/uncertain_inflow/uncertain_boundary_source.rs index 367ab53f3..7245c46b1 100644 --- a/deep_causality_cfd/src/solvers/dec/uncertain_inflow/uncertain_boundary_source.rs +++ b/deep_causality_cfd/src/solvers/dec/uncertain_inflow/uncertain_boundary_source.rs @@ -88,10 +88,17 @@ where /// Opt into a **Quasi-Monte-Carlo collapse**: a present sample's mean is estimated with /// `Uncertain::expected_value_qmc` (low-discrepancy Sobol + inverse-CDF) instead of the default /// Monte-Carlo `expected_value`, cutting the estimator variance at equal sample count. The - /// per-sample Sobol digital shift is `base_seed ⊕ present.id()`, so every step is an independent, + /// per-sample Sobol shift is `base_seed.wrapping_add(present.id())` (wrapping addition mod + /// 2^64, **not** the conventional XOR digital shift), so every step is an independent, /// reproducible randomized-QMC realization. The presence gate is **unaffected** — it stays on the /// SPRT/Monte-Carlo path (QMC is invalid for the sequential test; see the QMC follow-up note). /// + /// **Each stream element must be a distinct `Uncertain` node; do not clone one across steps.** + /// Sampling is memoized per node id, so a cloned node returns the *same* collapsed value at every + /// step it appears, silently freezing the boundary instead of drawing a fresh realization. The + /// per-sample shift above is keyed on `present.id()` for the same reason: distinct ids are what + /// make the per-step realizations independent. + /// /// The sensor's value channel must be QMC-eligible (a statically-structured `Uncertain` of at /// most [`MAX_SOBOL_DIM`](deep_causality_uncertain) leaves); otherwise the collapse returns the /// `UncertainError` from `expected_value_qmc`. @@ -135,7 +142,9 @@ where self.max_samples, ) { Ok(present) => { - // Opt-in QMC collapse uses a per-sample reproducible Sobol shift (base ⊕ id), so + // Opt-in QMC collapse uses a per-sample reproducible Sobol shift, `base + id` + // with wrapping addition (not an XOR digital shift), so each step is an + // independent randomized-QMC realization; default is the MC mean. // each step is an independent randomized-QMC realization; default is the MC mean. let collapsed = match self.qmc_collapse_seed { Some(base) => present.expected_value_qmc( diff --git a/deep_causality_cfd/src/solvers/qtt/compressible/euler_1d.rs b/deep_causality_cfd/src/solvers/qtt/compressible/euler_1d.rs index a63cc7b04..991f0c546 100644 --- a/deep_causality_cfd/src/solvers/qtt/compressible/euler_1d.rs +++ b/deep_causality_cfd/src/solvers/qtt/compressible/euler_1d.rs @@ -4,9 +4,9 @@ */ //! Tier-B Stage 2: a 1-D conservative compressible Euler marcher in quantized-tensor-train form, with -//! an ideal-gas EOS and a Rusanov (local Lax–Friedrichs) approximate Riemann flux. +//! an ideal-gas EOS and a global Lax–Friedrichs flux (Rusanov with a global wave-speed estimate). //! -//! The conservative state `U = (ρ, ρu, ρE)` is carried as three tensor trains. The Rusanov update +//! The conservative state `U = (ρ, ρu, ρE)` is carried as three tensor trains. The flux update //! `Uⁿ⁺¹ = Uⁿ − (Δt/Δx)(F_{i+½} − F_{i−½})` rearranges to a **conservative central flux difference plus //! a scalar artificial viscosity**, //! @@ -16,8 +16,9 @@ //! ``` //! //! so it is assembled from the §0 `gradient` / `laplacian` MPOs (conservative, telescoping) applied to -//! the flux and the state, recompressed each step. `s_max = max(|u| + c)` is the state-derived global -//! wave speed (the LLF estimate). The nonlinear flux / EOS are evaluated pointwise (dequantize → +//! the flux and the state, recompressed each step. `s_max = max(|u| + c)` is one maximum over the whole +//! state, applied uniformly to every cell; it is not a per-interface estimate, so the dissipation is +//! that of a global Lax–Friedrichs flux. The nonlinear flux / EOS are evaluated pointwise (dequantize → //! compute → requantize) — exact for the Sod gate; the rank-preserving TT-cross (`apply_nonlinear`) //! form is the large-`L` upgrade. @@ -38,7 +39,8 @@ pub fn ideal_gas_pressure(rho: R, mom: R, energy: R, gamma: R) -> (gamma - R::one()) * (energy - half * mom * mom / rho) } -/// The 1-D conservative compressible Euler marcher (ideal gas + Rusanov flux) in QTT form. +/// The 1-D conservative compressible Euler marcher (ideal gas + global Lax–Friedrichs flux) in QTT +/// form. pub struct CompressibleEuler1d where R: CfdScalar + ConjugateScalar, @@ -62,8 +64,14 @@ where /// Build the marcher for a periodic `2^L`-point grid of spacing `dx`, ratio of specific heats /// `gamma`, and CFL number `cfl` (≤ 1). /// + /// The numerical envelope is validated here, matching the pattern the shock-fitting constructor + /// and the QTT incompressible/immersed constructors already use: an out-of-envelope configuration + /// is refused at construction rather than producing numbers that look like a solve. + /// /// # Errors - /// Propagates operator-assembly errors. + /// * [`PhysicsError::PhysicalInvariantBroken`] when `dx` is not finite and positive, `gamma` is not + /// finite and greater than 1, or `cfl` is not finite and in `(0, 1]`. + /// * Propagates operator-assembly errors. pub fn new( l: usize, dx: R, @@ -71,6 +79,21 @@ where cfl: R, trunc: Truncation, ) -> Result { + if !dx.is_finite() || dx <= R::zero() { + return Err(PhysicsError::PhysicalInvariantBroken(format!( + "CompressibleEuler1d: grid spacing dx must be finite and positive, got {dx:?}" + ))); + } + if !gamma.is_finite() || gamma <= R::one() { + return Err(PhysicsError::PhysicalInvariantBroken(format!( + "CompressibleEuler1d: ratio of specific heats gamma must be finite and > 1, got {gamma:?}" + ))); + } + if !cfl.is_finite() || cfl <= R::zero() || cfl > R::one() { + return Err(PhysicsError::PhysicalInvariantBroken(format!( + "CompressibleEuler1d: CFL number must be finite and in (0, 1], got {cfl:?}" + ))); + } let grad = gradient::(l, dx, &trunc)?; let lap = laplacian::(l, dx, &trunc)?; Ok(Self { @@ -84,8 +107,8 @@ where }) } - /// The pointwise flux components `(ρu, ρu²+p, (E+p)u)` and the global LLF wave speed - /// `s_max = max(|u| + c)`, from the dense conservative state. + /// The pointwise flux components `(ρu, ρu²+p, (E+p)u)` from the dense conservative state, and the + /// global wave speed `s_max = max(|u| + c)`: one maximum over the whole grid. fn flux_and_speed( &self, rho: &[R], @@ -121,7 +144,7 @@ where Ok(((f1, f2, f3), s_max)) } - /// One Rusanov component update `U ← round(U + Δt·(−∂ₓF + ½·s·Δx·∂²ₓU))`. + /// One Lax–Friedrichs component update `U ← round(U + Δt·(−∂ₓF + ½·s·Δx·∂²ₓU))`. fn update_component( &self, u: &CausalTensorTrain, diff --git a/deep_causality_cfd/src/solvers/qtt/compressible/fitting.rs b/deep_causality_cfd/src/solvers/qtt/compressible/fitting.rs index daa6d887c..923968a45 100644 --- a/deep_causality_cfd/src/solvers/qtt/compressible/fitting.rs +++ b/deep_causality_cfd/src/solvers/qtt/compressible/fitting.rs @@ -366,6 +366,13 @@ where /// as a 1-D QTT field (the smooth post-shock zone). Returns `(max_bond, peak n_e)` — the bond witnesses /// the "each side `O(1)` rank" of task 4.1. /// + /// # Parameters + /// * `relax_length` — the e-folding length `L`, expressed as a **fraction of the sampled streamwise + /// extent**, not a physical length. The sample coordinate is `s = i / 2^l`, so `s` runs `0..1` over + /// the whole profile and `relax_length` is dimensionless: `0.1` means the profile e-folds over a + /// tenth of the sampled extent, whatever that extent is physically. `relax_fraction` would be the + /// accurate name. To use a physical length, divide it by the physical extent before passing it. + /// /// # Errors /// Propagates the ionization kernel / codec; numeric-conversion failures. pub fn relaxation_profile_bond( diff --git a/deep_causality_cfd/src/solvers/qtt/compressible/imex.rs b/deep_causality_cfd/src/solvers/qtt/compressible/imex.rs index ded459dde..f2294a289 100644 --- a/deep_causality_cfd/src/solvers/qtt/compressible/imex.rs +++ b/deep_causality_cfd/src/solvers/qtt/compressible/imex.rs @@ -18,10 +18,13 @@ //! so the implicit solve is always against the well-conditioned constant-coefficient core. That core is //! advanced by its **closed-form low-rank inverse** ([`AcousticCoreInverse`], design D10) — `A₀` factors //! exactly through the cyclic shift and its inverse is applied in `O(l)` shift-applies with no iterative -//! solve, so the step is unconditionally robust and **free-stream-exact** (an AMEn-per-step solve loses -//! free-stream to its residual tolerance). This is the isolated 1-D acoustic operator that task 3.1 gates -//! *first*, before the full system coupling in the marcher. The model equation is -//! `u_t = −a·u_x + κ·c²(x)·u_xx`: explicit advection, split-implicit acoustic/diffusion. +//! solve, so **the implicit core** is advanced unconditionally stably and **free-stream-exactly** (an +//! AMEn-per-step solve loses free-stream to its residual tolerance). The scheme as a whole is **not** +//! unconditionally stable: the variable remainder `A₁` is lagged explicitly, so it retains an explicit +//! diffusion-number bound of order `Δt·κ·max|c² − c̄²| / Δx²`, and the advection term `−a·u_x` retains its +//! own explicit CFL bound. Neither is checked here; the caller owns the step size. This is the isolated +//! 1-D acoustic operator that task 3.1 gates *first*, before the full system coupling in the marcher. The +//! model equation is `u_t = −a·u_x + κ·c²(x)·u_xx`: explicit advection, split-implicit acoustic/diffusion. use crate::CfdScalar; use crate::tensor_bridge::{AcousticCoreInverse, dequantize, gradient, laplacian, quantize}; @@ -158,10 +161,18 @@ where /// Conservation-preserving rounding (design D4): `round` minimizes Frobenius error, not the integral, and /// the implicit solve carries its own residual, so a marched conservative field drifts its total. Carry the /// conserved `target` total (the invariant from `t = 0`) and, after rounding, restore it with a **rank-1 -/// uniform fixup** (`δ = (target − ∫after)/N` added as a constant field). For a single conserved scalar -/// (mass on a periodic grid) this pins the total to `target` with no secular drift, projecting out both the +/// uniform fixup** (`δ = (target − ∫after)/N` added as a constant field), which projects out both the /// rounding error and the solver residual each step. /// +/// **Accuracy of the fixup.** The uniform offset is added and the sum is then re-rounded, so the total is +/// restored *to the truncation tolerance of that final round*, not pinned exactly. The offset is rank-1, so +/// it raises the bond by at most one and the final round is close to a no-op; the residual drift is +/// bounded by the round's own tolerance rather than accumulating secularly. +/// +/// **Not on a shipped path.** No marcher calls this; `step_component` in the 1-D/2-D/3-D marchers does not +/// use it. It is a building block exercised by `compressible_imex_tests.rs`, kept for the conservative +/// variant of the marched step, and it is exported so a caller can apply it explicitly. +/// /// # Errors /// Propagates codec / rounding errors. pub fn conservation_round( @@ -187,6 +198,19 @@ where /// → requantize). A pragmatic guard keeping `ρ, p > 0` through a strong rarefaction; the structural /// upgrade is entropy / log-variable evolution (deferred). /// +/// **This operation is not conservative.** Raising sub-floor cells to `floor` injects mass (or whatever the +/// clamped variable measures); the injected total is `Σ max(floor − uᵢ, 0)` over the clamped cells and is +/// **not** reported or compensated here. Pair it with [`conservation_round`] if the total must be held, or +/// use a Zhang–Shu conservative rescaling if the local profile matters too. +/// +/// **Choosing `floor`.** It is the caller's, and it should be tied to the initial state rather than picked +/// as a bare literal: a fixed small fraction of the initial minimum density (or pressure) keeps the clamp +/// inactive on a well-resolved solve and active only where the reconstruction would otherwise go negative. +/// A floor at or above the physical minimum silently rewrites the solution. +/// +/// **Not on a shipped path.** No marcher calls this; it is exported and exercised by +/// `compressible_imex_tests.rs` as a building block. +/// /// # Errors /// Propagates codec errors. pub fn positivity_floor( diff --git a/deep_causality_cfd/src/solvers/qtt/compressible/marcher_2d.rs b/deep_causality_cfd/src/solvers/qtt/compressible/marcher_2d.rs index 4cc3a96fe..1addd7b7c 100644 --- a/deep_causality_cfd/src/solvers/qtt/compressible/marcher_2d.rs +++ b/deep_causality_cfd/src/solvers/qtt/compressible/marcher_2d.rs @@ -11,6 +11,16 @@ //! `BodyFittedCoordinate` (the fitted case, `χ ~ O(10)`), so the Stage-5 rank-lever gate is a clean //! comparison with one solver. //! +//! **Conservation form, stated plainly.** The curvilinear flux divergence here is the **non-conservative +//! chain-rule form**: it applies the metric's `physical_gradient` to the Cartesian fluxes, rather than +//! differencing metric-weighted fluxes in strong-conservation form (`∂_ξ(J F·∇ξ) + …`). Discrete +//! conservation therefore holds **only for the Cartesian identity chart**, where the chain-rule factors +//! are unity. On a genuinely fitted chart the scheme is consistent but not discretely conservative, so a +//! **captured** shock's speed is not guaranteed by a discrete Rankine–Hugoniot balance. That is acceptable +//! here because the fitted use case puts the shock on a coordinate surface (fitted, not captured); it is +//! not acceptable for a captured shock in a fitted chart. Strong-conservation form would need the +//! currently-unused `jacobian()` and a discretely-satisfied geometric conservation law. +//! //! The flux divergence `∂ₓF + ∂ᵧG` is assembled from the metric's chain-rule `physical_gradient` and //! advanced **IMEX**: the convective flux is explicit, while the stabilizing acoustic dissipation is taken //! **implicitly** through the closed-form 2-D constant-coefficient inverse diff --git a/deep_causality_cfd/src/solvers/qtt/compressible/marcher_3d_fitted.rs b/deep_causality_cfd/src/solvers/qtt/compressible/marcher_3d_fitted.rs index 295b57036..9b14b83ad 100644 --- a/deep_causality_cfd/src/solvers/qtt/compressible/marcher_3d_fitted.rs +++ b/deep_causality_cfd/src/solvers/qtt/compressible/marcher_3d_fitted.rs @@ -18,6 +18,16 @@ //! the Cartesian marcher); a metric-weighted acoustic operator and the geometric conservation law for exact //! free-stream preservation are the named Stage-2 refinements. Directional physical derivatives (one apply //! per flux instead of three) are the perf follow-on. +//! +//! **Boundary caveat — every axis is periodic, including `ζ`.** The QTT operators are periodic by +//! construction, so the wall-normal `ζ` axis wraps: there is **no wall boundary condition** on the body +//! surface and no far-field/outflow treatment at the outer boundary. The nose region is meaningful because +//! the shock stands off inside the domain; the rows adjacent to the `ζ` seam are polluted by the wrap and +//! should not be read as a wall solution. This mirrors the note at `body_fitted_3d.rs` and applies equally +//! to `run_repinned`, which re-pins the chart but does not add a boundary condition. +//! +//! The same caveat governs the non-conservative chain-rule flux form used here; see +//! [`marcher_2d`](super::marcher_2d) for the conservation discussion, which applies unchanged in 3-D. use super::marcher_3d::{EulerState3d, EulerStateTt3d}; use crate::CfdScalar; @@ -326,8 +336,14 @@ where Ok(kstar) } -/// Cyclically roll a train by `shift` cells along `ζ` (a rank-preserving relabel) and re-encode — the -/// move that keeps a tracked front coordinate-stationary. +/// Cyclically roll a train by `shift` cells along `ζ` — the move that keeps a tracked front +/// coordinate-stationary. +/// +/// **A cyclic relabel, applied densely and recompressed.** The implementation dequantizes to a dense +/// buffer, permutes the `ζ` index, and re-encodes. A cyclic shift is rank-preserving *in principle* +/// (it composes from the bond-2 `shift_plus` powers), but that is not what runs here: the bond after +/// this call is whatever `quantize_3d` produces for the rolled field, so it is not guaranteed to equal +/// the bond before. Composing the existing binary shift operators would make the property structural. fn roll_zeta( u: &CausalTensorTrain, lx: usize, @@ -359,8 +375,9 @@ where R: CfdScalar + ConjugateScalar + RealField, { /// March with **Res-5 / D9 re-pinning**: each step, track the radial (density) front and, if it has - /// drifted off the fixed computational band `target`, roll the state back to it (a rank-preserving - /// relabel that keeps the feature coordinate-stationary) and slide the shell's inner radius `r0` so + /// drifted off the fixed computational band `target`, roll the state back to it (a cyclic relabel + /// that keeps the feature coordinate-stationary, applied densely and recompressed — see + /// [`roll_zeta`]) and slide the shell's inner radius `r0` so /// the front's physical radius maps to that band — rebuilding the fitted metric while reusing the /// invariant acoustic inverse. Returns the final dense state, the peak `max_bond`, and the re-pin count. /// diff --git a/deep_causality_cfd/src/solvers/qtt/compressible/mod.rs b/deep_causality_cfd/src/solvers/qtt/compressible/mod.rs index c46c7a786..d54030b47 100644 --- a/deep_causality_cfd/src/solvers/qtt/compressible/mod.rs +++ b/deep_causality_cfd/src/solvers/qtt/compressible/mod.rs @@ -4,8 +4,9 @@ */ //! Tier-B compressible shock-capturing QTT solver family. Stage 2 provides the 1-D conservative Euler -//! flux (ideal gas + Rusanov), gated by the Sod exact-Riemann solution; later stages add the -//! body-fitted coordinate coupling, IMEX time integration, and shock fitting. +//! flux (ideal gas + global Lax–Friedrichs, i.e. Rusanov with a global wave-speed estimate), gated by +//! the Sod exact-Riemann solution; later stages add the body-fitted coordinate coupling, IMEX time +//! integration, and shock fitting. mod euler_1d; mod fitting; @@ -32,8 +33,8 @@ use deep_causality_physics::PhysicsError; /// Reject a non-hyperbolic pressure before it enters the flux. /// /// The ideal-gas EOS is hyperbolic only for `p > 0`; a state with `E < ½ρ|u|²` yields `p ≤ 0`, at -/// which the acoustic wave speed `c = √(γp/ρ)` has no real value and the Rusanov flux computed from -/// `p` is not an approximation to the equations being solved. All four marchers +/// which the acoustic wave speed `c = √(γp/ρ)` has no real value and the Lax–Friedrichs flux computed +/// from `p` is not an approximation to the equations being solved. All four marchers /// (`euler_1d`, `marcher_2d`, `marcher_3d`, `marcher_3d_fitted`) call this so the check — and its /// diagnostic — stay identical across the family rather than drifting between four copies. /// diff --git a/deep_causality_cfd/src/solvers/qtt/immersed_2d.rs b/deep_causality_cfd/src/solvers/qtt/immersed_2d.rs index b2e395e19..7c557443c 100644 --- a/deep_causality_cfd/src/solvers/qtt/immersed_2d.rs +++ b/deep_causality_cfd/src/solvers/qtt/immersed_2d.rs @@ -12,6 +12,12 @@ //! power-of-two lattice the codec and operators assume. The convection, diffusion, recompression, and //! divergence-free projection are reused unchanged from [`QttIncompressible2d`]; the penalization is //! applied **before** the projection so the projection cleans the divergence the forcing introduces. +//! +//! References. The penalization method and its `η → 0` convergence (`O(η^{3/4})`) are due to Angot, +//! Bruneau & Fabrie, "A penalization method to take into account obstacles in incompressible viscous +//! flows", Numerische Mathematik 81(4):497–520, 1999. For the wider immersed-boundary method class this +//! belongs to, see Mittal & Iaccarino, "Immersed Boundary Methods", Annual Review of Fluid Mechanics +//! 37:239–261, 2005 (`deep_causality_cfd/papers/mittal2005.pdf`). use crate::CfdScalar; use crate::solvers::qtt::QttIncompressible2d; diff --git a/deep_causality_cfd/src/solvers/qtt/observe.rs b/deep_causality_cfd/src/solvers/qtt/observe.rs index 167ae7aaa..6cdc2a808 100644 --- a/deep_causality_cfd/src/solvers/qtt/observe.rs +++ b/deep_causality_cfd/src/solvers/qtt/observe.rs @@ -132,11 +132,23 @@ where /// The forebody-strip **pressure** contraction of an evolved compressible state: the pressure is /// recovered pointwise from the conserved components (`p = (γ−1)(E − ½|m|²/ρ)`, the ideal-gas /// closure), re-quantized, and contracted against the strip mask via the train `inner` product -/// and the cell volume — `F = ∫ χ_strip · p dV`, no cut-cell surface or boundary-fiber +/// and the cell area — `∫ χ_strip · p dA`, no cut-cell surface or boundary-fiber /// reconstruction. This is the *compressible* sibling of the incompressible penalization-force /// contraction: the integrand is the field's own pressure (the preserved aerodynamic drag the /// Jarvinen–Adams dataset measured), **not** the forcing deficit. /// +/// **Units, and why the name overstates the quantity.** The integrand is pressure (`Pa = N/m²`) and +/// the measure is the 2-D cell area `dx·dy` (`m²`), so the return carries `Pa·m² = N`. The dimensions +/// are those of a force; the quantity is not one. It is an isotropic scalar accumulated over a +/// *region* of cells, where a force is a traction integrated over a *surface*. No outward normal +/// enters, so the result has no direction, no axis to resolve along, and no meaning next to a force +/// from another configuration. Only the **ratio** of two such integrals over the *same* geometry is +/// meaningful, which is exactly how [`preserved_drag_fraction`] consumes it; the common area factor +/// cancels there. A true axial force is `∮ p n dS` over the interface: the pressure projected on the +/// strip's outward normal, integrated over the surface it acts on. `strip_pressure_integral` would be +/// the accurate name; renaming is a public-API change and is left as an owner decision, so what the +/// number is gets stated here instead. +/// /// # Errors /// [`PhysicsError::PhysicalInvariantBroken`] if the density leaves the positive cone; propagates /// codec / contraction errors. diff --git a/deep_causality_cfd/src/tensor_bridge/acoustic_inverse.rs b/deep_causality_cfd/src/tensor_bridge/acoustic_inverse.rs index 3667ce28a..b08671f9b 100644 --- a/deep_causality_cfd/src/tensor_bridge/acoustic_inverse.rs +++ b/deep_causality_cfd/src/tensor_bridge/acoustic_inverse.rs @@ -34,7 +34,9 @@ //! `Σ_{k( rhs: &[R], nx: usize, @@ -154,7 +172,9 @@ where // (the *consistent* operator, not the compact 5-point Laplacian) so div(project(u)) = 0 exactly. It // is singular at k in {0, N/2} per axis (constant + collocated checkerboard/Nyquist), all zeroed. let (half_x, half_y) = (nx / 2, ny / 2); - // λ_k = −(2 − 2cos(2πk/N))/Δ²; the periodic Laplacian eigenvalue (separable in 2-D). + // λ_k = −sin²(2πk/N)/dx² per axis: the consistent grad-of-grad eigenvalue named above + // (separable in 2-D), not the compact 5-point −(2−2cos(2πk/N))/Δ². `lamx`/`lamy` below + // hold the positive per-axis magnitudes sin²/dx². for kx in 0..nx { let sx = (tau * from_usize::(kx) / nxf).sin(); let lamx = sx * sx / dx2; @@ -166,7 +186,8 @@ where if is_null { spec[idx] = zero; } else { - // ∇²p = rhs with λ = −(lamx+lamy): p̂ = rhŝ / (−λ). + // ∇²p = rhs with λ = −(lamx+lamy): p̂ = rhs / λ = −rhs/(lamx+lamy), + // which is `rhs * inv` with `inv = 1/λ` below. let inv = R::zero() - R::one() / (lamx + lamy); spec[idx] = Complex::new(spec[idx].re * inv, spec[idx].im * inv); } diff --git a/deep_causality_cfd/src/theories/compressible_ns.rs b/deep_causality_cfd/src/theories/compressible_ns.rs index 6f70571ef..5228472d5 100644 --- a/deep_causality_cfd/src/theories/compressible_ns.rs +++ b/deep_causality_cfd/src/theories/compressible_ns.rs @@ -5,6 +5,14 @@ //! Compressible Newtonian Navier-Stokes regime evaluators. //! +//! **These are pointwise right-hand-side contributions only.** Each function evaluates the RHS of one +//! conservation law at a single sample point from divergences the caller supplies. No thermodynamic +//! closure is provided or checked here: the equation of state `p(ρ, e)` that ties pressure to the +//! conserved variables is the **caller's responsibility**, and nothing in this module verifies that the +//! `p` passed in is consistent with the `ρ` and `ρE` passed in. `deep_causality_physics` ships +//! `speed_of_sound_ideal_gas_kernel` and the ideal-gas pressure kernels if an ideal-gas closure is +//! wanted; a real-gas or reacting closure is the caller's to supply. +//! //! Three pointwise RHS kernels for the compressible NS system: //! //! ```text @@ -89,9 +97,13 @@ where /// `∂(ρE)/∂t = − ∇·(ρ u E) − ∇·(p u) + ∇·(τ·u) − ∇·q + ρ (u·g)` /// /// All four divergences are supplied by the caller at the sample point. -/// Sign of the heat-flux term follows the convention that `q` points along -/// `−∇T` (Fourier), so `−∇·q > 0` corresponds to net heat *deposited* at -/// the point. +/// +/// **`div_q` sign convention, which this function cannot check.** It takes `∇·q` where `q` is the +/// Fourier heat flux `q = −k∇T`, pointing down-gradient. The term enters as `−∇·q`, so `−∇·q > 0` is +/// net heat *deposited* at the point. The convention lives in this docstring rather than in the type: +/// `div_q` is a bare scalar, so passing `∇·(k∇T)` (the opposite sign) compiles and silently flips the +/// energy source. A `HeatFlux`/`HeatFluxDivergence` newtype would carry the convention in the type +/// instead; that is a follow-up, and until then the caller owns the sign. pub fn compressible_ns_energy_rhs( rho: &Density, u: &Velocity3, diff --git a/deep_causality_cfd/src/theories/incompressible_dec.rs b/deep_causality_cfd/src/theories/incompressible_dec.rs index 1fa374959..c23f1d73c 100644 --- a/deep_causality_cfd/src/theories/incompressible_dec.rs +++ b/deep_causality_cfd/src/theories/incompressible_dec.rs @@ -39,9 +39,14 @@ impl<'m, const D: usize, R: CfdScalar> FluidTheory for DecIncompressible<'m, type State = VelocityOneForm; type Ambient = Ambient; - /// `P(−i_u(du♭) − ν Δ_dR u♭ + g♭)` at the ambient `ν`. The ambient is read + /// `P(−½[i_u(du♭) − G*_ω u] − ν Δ_dR u♭ + g♭)` at the ambient `ν`, with the + /// skew-symmetrized convective term (see [`DecNsRate`]). The ambient is read /// once per call (between `Rk4` steps); with a constant ambient this is /// bit-identical to the construction-fixed rate. + /// + /// **Only `ν` is taken from the ambient.** `g♭` is the body force fixed on the rate kernel at + /// construction; `Ambient::set_body_force` is **not** consulted here, so a coupling stage that drives + /// the ambient body force will not change what this rate returns. See `Ambient::set_body_force`. fn rate( &self, state: &VelocityOneForm, diff --git a/deep_causality_cfd/src/theories/mod.rs b/deep_causality_cfd/src/theories/mod.rs index cde0f44bc..c5d4620f9 100644 --- a/deep_causality_cfd/src/theories/mod.rs +++ b/deep_causality_cfd/src/theories/mod.rs @@ -4,10 +4,21 @@ */ //! Fluid-dynamics theories: the Navier–Stokes regimes (incompressible, -//! compressible, Euler, Stokes) and the DEC-native incompressible rate, each a -//! `FluidTheory` realization reused across solvers. The pointwise regime -//! evaluators stay in `deep_causality_physics` and are reached through this layer -//! for verification solvers. +//! compressible, Euler, Stokes) and the DEC-native incompressible rate. +//! +//! What lives where, precisely: +//! +//! * **The four pointwise regime evaluators live here**, as free functions +//! (`incompressible_ns_rhs`, `compressible_ns_*_rhs`, `euler_*_rhs`, +//! `stokes_rhs`), each with a causal `PropagatingEffect` wrapper +//! (`*_rhs_effect`) in [`wrappers`]. +//! * **The shared sub-kernels stay in `deep_causality_physics`**: +//! `convective_acceleration_kernel`, `pressure_gradient_force_kernel`, +//! `viscous_diffusion_kernel` and `continuity_rhs_kernel`. The evaluators here +//! compose those kernels rather than reimplementing them. +//! * **`DecIncompressible` is the only `FluidTheory` realization in this module**; +//! it wraps the DEC rate kernel. The pointwise evaluators are free functions and +//! do not implement that trait. mod compressible_ns; mod euler; diff --git a/deep_causality_cfd/src/traits/metric_provider.rs b/deep_causality_cfd/src/traits/metric_provider.rs index fb7cb37af..aeb99add0 100644 --- a/deep_causality_cfd/src/traits/metric_provider.rs +++ b/deep_causality_cfd/src/traits/metric_provider.rs @@ -12,9 +12,19 @@ //! the fitted limit (this geometry, `O(10)` rank). Body-fittedness becomes a choice of impl, recovering //! generality at zero asymptotic rank cost — the result the `qtt_blend_metric` study measured. //! -//! The continuous body-fit blend parameter `λ` (a `BlendedMap` over two providers) is a follow-on: a -//! correct blended metric needs the *forward* Jacobians of both charts, which the present impls do not -//! expose. The blend itself is already validated numerically (`studies/qtt_blend_metric`). +//! The continuous body-fit blend parameter `λ` is supplied by +//! [`BlendedMap`](crate::coordinate::BlendedMap), which computes both charts' **forward** Jacobians +//! analytically and exposes the blended *inverse* metric through this trait. It carries a validity +//! precondition this trait cannot express: the blended map must stay invertible, i.e. `det J` one-signed +//! over the closed domain. `BlendedMap::new` scans for that and refuses a folding configuration, but a +//! hand-written `MetricProvider` impl is **not** checked, so a caller supplying its own must respect it. +//! The blend is validated numerically by `studies/qtt_blend_metric`. +//! +//! **Scope of the seam.** This trait carries the contravariant basis and the Jacobian volume factor, and +//! nothing else. That is enough for the first-order chain-rule gradient the compressible marchers use. +//! Second-order or genuinely covariant operators (a curvilinear Laplacian, covariant derivatives) need +//! the metric tensor `g` and the Christoffel symbols as well, which would extend this trait; a consumer +//! should not assume the present seam suffices for them. use crate::CfdScalar; use deep_causality_algebra::ConjugateScalar; diff --git a/deep_causality_cfd/src/types/ambient.rs b/deep_causality_cfd/src/types/ambient.rs index 03f8beb8b..388e7c2ca 100644 --- a/deep_causality_cfd/src/types/ambient.rs +++ b/deep_causality_cfd/src/types/ambient.rs @@ -56,6 +56,14 @@ impl Ambient { } /// Drive the body force from a coupling stage. + /// + /// **No shipped marcher consumes this.** Unlike [`Self::set_nu`], which `DecIncompressible::rate` + /// applies to the rate kernel each call, the ambient body force is **not** read by any rate: the DEC + /// solver takes its body force at construction (`DecNsRate`'s own `g♭`, supplied via the config or a + /// `BodyForceZone`), and the QTT marchers do not read `Ambient` at all. The only in-crate reader is + /// the snapshot writer, which records it. So setting it here changes what is serialized, not what is + /// marched. To drive a body force per step, the rate kernel needs a `set_body_force` mirroring + /// `set_nu`; that is a follow-up, not present today. pub fn set_body_force(&mut self, body_force: Option>) { self.body_force = body_force; } diff --git a/deep_causality_cfd/src/types/flow/blackout.rs b/deep_causality_cfd/src/types/flow/blackout.rs index 9a835e2d2..34ff161eb 100644 --- a/deep_causality_cfd/src/types/flow/blackout.rs +++ b/deep_causality_cfd/src/types/flow/blackout.rs @@ -433,10 +433,18 @@ impl PhysicsStage for IonizationStage { } } -/// A two-temperature ideal-gas pressure closure `p = n·k_B·T_tr` written into a -/// per-cell `"pressure"` scalar — the interface the Tier-B compressible marcher -/// reuses. On the incompressible Tier-A rollout the marcher does not read it, so the -/// in-scope ambient effect is intentionally limited. Reads `"T_tr"`, writes `"pressure"`. +/// A **single-temperature** ideal-gas pressure closure `p = n·k_B·T_tr` at the **configured** number +/// density, written into a per-cell `"pressure"` scalar. Despite sitting in the two-temperature stack, +/// the closure reads only the translational temperature `T_tr`; the vibrational temperature `T_ve` does +/// not enter, so this is not a two-temperature pressure. +/// +/// **No shipped consumer reads `"pressure"`.** It is written for the Tier-B compressible marcher +/// interface, and on the incompressible Tier-A rollout nothing consumes it, so the stage is currently +/// write-only. The number density is the one configured on the stage, not the evolved `"n_tot"` field +/// that `IonizationStage` and `VibrationalLagStage` can be pointed at through their density-field +/// accessors; add a matching accessor here if the evolved density is wanted. +/// +/// Reads `"T_tr"`, writes `"pressure"`. #[derive(Debug, Clone, Copy)] pub struct EosStage { t_tr_field: &'static str, diff --git a/deep_causality_cfd/src/types/flow/carrier.rs b/deep_causality_cfd/src/types/flow/carrier.rs index 6da015125..00521efd5 100644 --- a/deep_causality_cfd/src/types/flow/carrier.rs +++ b/deep_causality_cfd/src/types/flow/carrier.rs @@ -497,8 +497,23 @@ where } /// Export this pause as a resumable [`MarchState`]: the carried field plus the step reached. - /// The state resumes a continued march (in memory now, or from disk later after - /// [`save`](MarchState::save)) bit-identically to continuing this pause directly. + /// The state resumes a continued march in memory now, or from disk later after + /// [`save`](MarchState::save). + /// + /// **A leg boundary carries the coupled field, not the marched fluid layer.** What crosses the + /// seam is the [`CoupledField`] and a step index, nothing else. The incoming leg + /// ([`CoupledMarch::from`](crate::CoupledMarch::from)) rebuilds its carrier and re-quantizes + /// the world's uniform seed, so the evolved conserved state, the inflow strip, any + /// acoustic-envelope drift this leg earned, its rebuild count, and its plume-imprint budget are + /// all discarded. That is the design's accepted quasi-steady defense: the layer re-converges + /// within a few steps, and the seam is logged and counted on the field + /// ([`re_seeds`](Self::re_seeds)). + /// + /// A resumed leg is therefore **not** bit-identical to continuing this pause directly. + /// [`fork`](Self::fork) and [`continue_with`](Self::continue_with) are the paths that do + /// continue the marched trajectory: they share the evolved `Arc`. Any quantity + /// integrated across a `MarchState` seam (heat load, blackout dwell, delta-v) carries the + /// re-convergence transient. pub fn state(&self) -> MarchState { MarchState::at((*self.field).clone(), self.step) } @@ -517,8 +532,16 @@ where } } - /// Fork the pause: an **O(1)** branch sharing the paused state and field by `Arc` — no tensor - /// data is copied until (and unless) the branch writes. + /// Fork the pause: an **O(1)** branch sharing the paused state and field by `Arc`. The fork + /// itself is two `Arc::clone`s and copies nothing. + /// + /// The two halves then diverge in cost. The marched tensor state is never cloned: the + /// continued loop reads the shared state and replaces the `Arc` with each freshly produced next + /// state. The [`CoupledField`] is copy-on-write, and the branch's single clone is taken at its + /// first write, which [`continue_march`](CarrierFork::continue_march) always performs (it + /// appends the resume-log entry before the first step). So per-branch field cost is O(cells), + /// not O(1): a clone of the per-cell scalar vectors, the navigation engine, and the provenance + /// log. Size a large fan-out on that number. pub fn fork(&self) -> CarrierFork<'_, 'c, R, S, M, D> { CarrierFork { pause: self, @@ -836,7 +859,11 @@ where None => state, }; - // Field: the branch's one CoW clone happens at the first write (merging the audit log). + // Field: the branch's one copy-on-write clone happens here, at the first write (merging the + // audit log and appending the resume entry). The pause still holds its own `Arc`, so the strong + // count is > 1 and `make_mut` always copies: the field clone is unavoidable in practice, and it + // is O(cells), covering the per-cell scalar vectors, the nav engine, and the log. Only the fork + // itself is O(1). The marched tensor state above is never cloned. let mut field_arc = field; { let field = Arc::make_mut(&mut field_arc); diff --git a/deep_causality_cfd/src/types/flow/compressible_march_run.rs b/deep_causality_cfd/src/types/flow/compressible_march_run.rs index a86200539..b157617f5 100644 --- a/deep_causality_cfd/src/types/flow/compressible_march_run.rs +++ b/deep_causality_cfd/src/types/flow/compressible_march_run.rs @@ -76,9 +76,10 @@ where forcing: Option>, /// The current nondimensional conserved inflow `[ρ̂, m̂x, m̂y, Ê]` the strip enforces. inflow: Option<[R; 4]>, - /// Solver rebuilds performed while following the schedule. The `1.2x` re-pin against the - /// `(1 + rebuild_tol)` gate is a hysteresis ratchet bounding the rate; the schedule /// Solver rebuilds performed while following the schedule (logged; a re-pin gate caps it).apos;s optional - /// `max_rebuilds` bounds the count. Exposed through `CoupledCarrier::rebuilds`. + /// Solver rebuilds performed while following the schedule (each one logged). The `1.2x` re-pin + /// against the `(1 + rebuild_tol)` gate is a hysteresis ratchet bounding the rate; the + /// schedule's optional `max_rebuilds` bounds the count. Exposed through + /// `CoupledCarrier::rebuilds`. rebuilds: usize, /// The optional plume re-imprint spec: refresh `forcing` from stage-published plume geometry /// when the commanded throttle drifts. `None` leaves `forcing` exactly as configured. @@ -323,7 +324,11 @@ where let row = schedule.sample(altitude); let mach = speed / row.sound_speed; - // The exact RH jump when a shock stands; the freestream itself below Mach ~1. + // Apply the exact RH normal-shock jump only for a genuinely supersonic freestream; pass the + // freestream through unchanged below. The 1.05 floor is a 5% buffer above sonic (M = 1): a 1-D + // normal shock is not the right model in the transonic sliver M ∈ (1, 1.05], where the jump is + // within a few percent of the identity anyway (post-shock ratios → 1 as M → 1). The buffer is + // a modeling guard, not a measured constant. let shock_floor = Self::lift(1.05)?; let (t_post, n_post, u_post) = if mach > shock_floor { let shock = FittedNormalShock::new(schedule.gamma_eff)?; @@ -408,6 +413,22 @@ where /// `"pressure_atm"` from the equation of state, and `"n_tot"` (m⁻³) from the density. The /// carried scalar is relaxed in place by the coupling on this carrier (no train transport), /// so `kappa` is unused. + /// + /// **Two departures from the plain equation of state.** A non-positive or non-finite density is + /// **rejected**: the method returns `PhysicalInvariantBroken` rather than publishing a field + /// derived from it. The nondimensional pressure is **floored**, not rejected. The computed + /// `p̂ = (γ−1)·(Ê − ½·ρ̂·|û|²)` is replaced by `1e-12` whenever it does not exceed that value, + /// which happens exactly when a cell's internal energy has gone non-positive + /// (`Ê ≤ ½·ρ̂·|û|²`), and `T̂ = p̂/ρ̂` is taken from the floored value. Such a cell publishes + /// `T_tr = 1e-12·t_ref/ρ̂` and the matching `pressure_atm`: a small positive temperature that + /// reads downstream as a cold cell rather than an invalid one. A Park ionization surrogate fed + /// that temperature returns a near-zero ionization fraction, so a broken energy budget can + /// present as a benign "no plasma" result. + /// + /// The floor's activation count is **not** recorded: not in the log, not as a `Report` series. + /// A consumer cannot distinguish a clean solve from a floored one from the published fields. + /// `1e-12` is a bare literal on a nondimensional quantity, so what it means physically depends + /// on the caller's [`ReferenceScales`]. fn publish_and_transport( &self, state: &Self::State, @@ -449,14 +470,23 @@ where Ok(()) } - /// Final fields: the evolved translational temperature as the primary field, plus the final - /// density and speed series. /// The largest bond dimension across the four conserved tensor trains — the rank this state /// actually reached, which sits at or below the configured truncation cap. fn state_peak_bond(state: &Self::State) -> Option { state.iter().map(|t| t.max_bond()).max() } + /// Final fields: the evolved translational temperature as the primary field, plus the final + /// density and speed series. + /// + /// The same `1e-12` nondimensional pressure floor as + /// [`publish_and_transport`](Self::publish_and_transport) applies here, with the same trigger + /// (`Ê ≤ ½·ρ̂·|û|²`, a non-positive internal energy) and the same consequence: `final_field` + /// then carries a floor artifact, not an equation-of-state temperature, and nothing in the + /// `Report` says which. Unlike the publish path, `finish` performs **no** density check. It + /// normally runs on a state the preceding step already published, which is where positivity is + /// enforced; a zero-step march is the exception, since no step ran and the seed reaches `finish` + /// unchecked. fn finish(&self, state: &Self::State, report: &mut Report) -> Result<(), PhysicsError> { let dense = self.decode(state)?; let n = dense[0].len(); diff --git a/deep_causality_cfd/src/types/flow/corridor/envelope.rs b/deep_causality_cfd/src/types/flow/corridor/envelope.rs index 916b2449a..d832a53c5 100644 --- a/deep_causality_cfd/src/types/flow/corridor/envelope.rs +++ b/deep_causality_cfd/src/types/flow/corridor/envelope.rs @@ -32,6 +32,12 @@ pub struct BurnEnvelope { /// Minimum admissible propellant mass (kg); a positive throttle at or below it is a breach. pub propellant_floor: R, /// Maximum admissible descent rate (m/s). + /// + /// **Enforced only while a commanded-thrust channel is present.** Conceptually this is a + /// whole-profile state limit: descending too fast is a breach whether or not the engine is firing. + /// The gate evaluates it inside the commanded-thrust branch, so on a step with no commanded thrust + /// the limit is not checked. Read it as "descent-rate limit during commanded burn" until the check + /// is hoisted out of that branch. pub max_descent_rate: R, } diff --git a/deep_causality_cfd/src/types/flow/corridor/regime.rs b/deep_causality_cfd/src/types/flow/corridor/regime.rs index 14aa19451..2898416fe 100644 --- a/deep_causality_cfd/src/types/flow/corridor/regime.rs +++ b/deep_causality_cfd/src/types/flow/corridor/regime.rs @@ -138,8 +138,12 @@ impl RegimeClass { /// The governing-model selector (\[2\]/\[3\]). Reads the peak mean free path from a `"mean_free_path"` /// field and forms `Kn = λ / L` against the configured characteristic length, reads the peak /// electron density from `"n_e"` and maps it through a [`BlackoutTrigger`] to the GNSS-denial flag, -/// then records the [`RegimeClass`] on the field — logging a provenance entry whenever the regime -/// (governing model or comms-denial) changes. A no-op if `"mean_free_path"` is absent. +/// then records the [`RegimeClass`] on the field, logging a provenance entry whenever the regime +/// changes. A regime here is the full tuple **(governing model, comms-denial, Mach band, thrust state, +/// touchdown)**, not only the first two: a change in any component logs a transition. The last three +/// stay neutral unless [`Self::with_flight_axes`] is attached, which is why a corridor without flight +/// axes only ever logs model and comms-denial changes. The transition count is also published as a +/// typed field (`REGIME_TRANSITIONS_FIELD`). A no-op if `"mean_free_path"` is absent. #[derive(Debug, Clone, Copy)] pub struct RegimeClassify { mfp_field: &'static str, @@ -188,6 +192,11 @@ impl RegimeClassify { } /// Override the Knudsen band thresholds (`slip ≤ transitional ≤ free_molecular`). + /// + /// **The ordering is a stated precondition, not an enforced one.** This builder is infallible and + /// does not reject out-of-order edges. Supplied out of order, the band comparisons still run, so the + /// classifier silently reports a band the caller did not intend rather than refusing the + /// configuration. Since these are set once in example config, order them at the call site. pub fn with_thresholds(mut self, slip: R, transitional: R, free_molecular: R) -> Self { self.slip_threshold = slip; self.transitional_threshold = transitional; @@ -202,6 +211,10 @@ impl RegimeClassify { /// Without this call the three axes stay neutral **even though the compressible carrier /// publishes `"flight_mach"` every step**, so a corridor world's classification, regime key, and /// logged messages are exactly the pre-change ones. Only a burn-phase world opts in. + /// + /// **The band ordering is a stated precondition, not an enforced one**, on the same terms as + /// [`Self::with_thresholds`]: this builder is infallible, and out-of-order Mach edges produce an + /// unintended band rather than a rejected configuration. pub fn with_flight_axes( mut self, subsonic_ceiling: R, diff --git a/deep_causality_cfd/src/types/flow/corridor/trajectory_nav.rs b/deep_causality_cfd/src/types/flow/corridor/trajectory_nav.rs index 5502e0c31..ecb05900d 100644 --- a/deep_causality_cfd/src/types/flow/corridor/trajectory_nav.rs +++ b/deep_causality_cfd/src/types/flow/corridor/trajectory_nav.rs @@ -86,11 +86,16 @@ impl PhysicsStage for TrajectoryNav { // Predict: KS drift + the ④ aero acceleration as the Strang kick (zero if no producer // ran), sensed through the IMU when one is configured. let aero = field.aero_force().unwrap_or([R::zero(); 3]); - let sensed = match &self.imu { - Some(imu) => imu.sense_specific_force(aero), - None => aero, + let (sensed, omega) = match &self.imu { + // The point-mass model carries no true body rotation, so the sensed rate is the gyro bias + // alone (zero for the corridor/weather IMU); the nominal attitude stays at identity. + Some(imu) => ( + imu.sense_specific_force(aero), + imu.sense_angular_rate([R::zero(); 3]), + ), + None => (aero, [R::zero(); 3]), }; - if let Err(e) = engine.predict(ctx.dt(), sensed, self.process_noise) { + if let Err(e) = engine.predict(ctx.dt(), sensed, omega, self.process_noise) { // Thread the engine back before short-circuiting, so the pause/fork state stays whole. field.set_nav(engine); return Err(e); @@ -103,15 +108,28 @@ impl PhysicsStage for TrajectoryNav { // covariance). A denied-step GNSS fix is consumed unread — the broadcast the receiver // could not use is gone, not latched for reacquisition. let gnss = field.take_scalar("gnss_fix"); - let optical = field.take_scalar("optical_fix"); let denied = field.regime().map(|r| r.gnss_denied).unwrap_or(false); let mut aided = false; if !denied && let Some(fix) = fix3(gnss.as_deref()) { - engine.correct_position(fix, self.gnss_variance); + // A refused fix is a hard failure, not a silent no-op: thread the engine back (so the + // pause/fork state stays whole) and surface it, rather than continuing as if it folded. + if let Err(e) = engine.correct_position(fix, self.gnss_variance) { + field.set_nav(engine); + return Err(e); + } aided = true; } + // The optical fix is taken **after** the GNSS fold, not alongside it. Consuming both up front + // means a GNSS refusal returns with the optical measurement already out of the field and only + // held in a local, so it is dropped on the error path — a fix the vehicle paid for through the + // plasma, discarded because a different sensor's fold failed. Taking it here leaves it in the + // field for the caller's retry whenever the step short-circuits above. + let optical = field.take_scalar("optical_fix"); if let Some(fix) = fix3(optical.as_deref()) { - engine.correct_position(fix, self.optical_variance); + if let Err(e) = engine.correct_position(fix, self.optical_variance) { + field.set_nav(engine); + return Err(e); + } aided = true; } diff --git a/deep_causality_cfd/src/types/flow/coupling.rs b/deep_causality_cfd/src/types/flow/coupling.rs index 6d3f5de13..ebdc5f524 100644 --- a/deep_causality_cfd/src/types/flow/coupling.rs +++ b/deep_causality_cfd/src/types/flow/coupling.rs @@ -15,6 +15,14 @@ //! marcher reads). A stage that returns `Err` short-circuits the chain (errors propagate across the //! whole holistic coupling via `?`). Adding a coupled physics is a small `PhysicsStage` impl, not a //! change to the DSL core. +//! +//! **Ordering, and the stale-read rule it implies.** Within one host step the stages run in the order +//! written by `.then(...)`, left to right, over the same mutable [`CoupledField`]. So a stage sees the +//! named fields written by stages **earlier in the same chain**, at their current-step values. A stage +//! that reads a field written by a stage **later** in the chain reads the **previous step's** value, +//! because `CoupledField` persists across steps rather than being cleared between them. That is a stale +//! read, not an error, and nothing detects it. When a stage depends on another's output, order the chain +//! so the producer precedes the consumer. use crate::CfdScalar; use crate::navigation::ReentryNavEngine; @@ -132,8 +140,8 @@ impl<'a, const D: usize, R: CfdScalar> StepContext<'a, D, R> { /// stages read, and against which a regime *change* is detected), the onboard /// [`ReentryNavEngine`] a trajectory stage threads through the field (the nav *state* lives here, /// not in the stage — stages stay immutable), and an [`EffectLog`] of provenance entries (regime -/// transitions, bounded corrections, envelope breaches) — the auditable record the flagship -/// surfaces. All start empty, so existing couplings are unaffected. +/// transitions, bounded corrections, envelope breaches) — the auditable record the plasma-blackout +/// example surfaces. All start empty, so existing couplings are unaffected. #[derive(Debug, Clone)] pub struct CoupledField { ambient: Ambient, diff --git a/deep_causality_cfd/src/types/flow/duct_march_run.rs b/deep_causality_cfd/src/types/flow/duct_march_run.rs index c6ea431d0..de8583bbe 100644 --- a/deep_causality_cfd/src/types/flow/duct_march_run.rs +++ b/deep_causality_cfd/src/types/flow/duct_march_run.rs @@ -175,8 +175,10 @@ impl<'a, R: CfdScalar> DuctMarchRun<'a, R> { // Conservative update `u_i ← u_i − Δt/(Δx·A_i)·(F_{i+1/2} − F_{i−1/2}) // + Δt·s_i/A_i` with the pressure area-source - // `s_i = p_i·(A_{i+1/2} − A_{i−1/2})/Δx`; for a uniform state the - // source cancels the flux difference exactly (well-balanced). + // `s_i = p_i·(A_{i+1/2} − A_{i−1/2})/Δx`; for a **stagnant** uniform state (u = 0) the + // source cancels the flux difference exactly (well-balanced). The cancellation is exact + // only at rest: with u ≠ 0 the momentum flux difference is not a pure pressure term, so a + // uniform moving state is not preserved to round-off by this discretization. let mut new_cons = Vec::with_capacity(n); let mut max_delta = [R::zero(); 3]; let mut max_scale = [R::zero(); 3]; diff --git a/deep_causality_cfd/src/types/flow/gates.rs b/deep_causality_cfd/src/types/flow/gates.rs deleted file mode 100644 index 996ccc1ee..000000000 --- a/deep_causality_cfd/src/types/flow/gates.rs +++ /dev/null @@ -1,65 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved. - */ - -//! The acceptance-gate builder: the `[PASS]`/`[FAIL]` block every self-verifying program -//! prints, as one type. -//! -//! `Gates` accumulates labeled checks and prints them on [`finish`](Gates::finish), exactly -//! the lines the existing gate blocks print and nothing more: no process exit (the caller -//! keeps that), no number formatting (details arrive pre-formatted, so precision display -//! stays at the caller's boundary), no timing, no color. - -/// A titled set of acceptance gates. Build with [`new`](Self::new), add checks with -/// [`gate`](Self::gate), print and read the verdict with [`finish`](Self::finish). -#[derive(Debug)] -pub struct Gates { - title: String, - entries: Vec<(String, bool, String)>, -} - -impl Gates { - /// A new, empty gate set under `title`. - pub fn new(title: impl Into) -> Self { - Self { - title: title.into(), - entries: Vec::new(), - } - } - - /// Add one gate: a label, whether it passed, and the pre-formatted detail line. Consumes and - /// returns the builder, so the result must be kept — a bare `.gate(..);` would drop the entry. - #[must_use] - pub fn gate(mut self, label: impl Into, pass: bool, detail: impl Into) -> Self { - self.entries.push((label.into(), pass, detail.into())); - self - } - - /// Print the gate lines and the verdict; return true when every gate passed. An empty - /// gate set passes vacuously and says so in its verdict line. The returned pass/fail is the - /// block's primary outcome (the caller maps it to an exit code), so it must not be discarded. - #[must_use] - pub fn finish(self) -> bool { - println!("--- {} ---", self.title); - let mut all = true; - for (label, pass, detail) in &self.entries { - println!( - " [{}] {label}: {detail}", - if *pass { "PASS" } else { "FAIL" } - ); - all &= *pass; - } - if self.entries.is_empty() { - println!("=== {}: no gates registered. ===", self.title); - } else if all { - println!("=== All gates passed: {}. ===", self.title); - } else { - println!( - "=== Gate REGRESSION in {}: see the FAIL lines above. ===", - self.title - ); - } - all - } -} diff --git a/deep_causality_cfd/src/types/flow/mms.rs b/deep_causality_cfd/src/types/flow/mms.rs index a3b2bea2b..3c065ee8a 100644 --- a/deep_causality_cfd/src/types/flow/mms.rs +++ b/deep_causality_cfd/src/types/flow/mms.rs @@ -189,6 +189,13 @@ impl Solver for MmsCase { /// `u = (½, −½, 0)`, with the analytic Jacobian, Laplacian, and pressure gradient /// (`∇p = (ρ/2, ρ/2, 0)`). The single shared sample for the incompressible, Euler, and /// compressible references. +/// +/// **Two Taylor–Green conventions ship in this crate, and they are the same solution.** This sample +/// follows `u = sin(x)cos(y)`, `v = −cos(x)sin(y)`, giving `(½, −½)` here. The QTT harness +/// (`verification/qtt_taylor_green_verification`) follows `u = −cos(x)sin(y)`, `v = sin(x)cos(y)`, +/// which gives `(−½, ½)` at the same point. The two differ by a **π/2 shift in x and y**; neither is +/// more correct, and the pressure sign follows whichever velocity convention is chosen, so the +/// `∇p` above belongs with this form. Compare figures across the two only after accounting for it. fn taylor_green_sample( rho: R, ) -> (Velocity3, VelocityGradient, [R; 3], [R; 3]) { diff --git a/deep_causality_cfd/src/types/flow/mod.rs b/deep_causality_cfd/src/types/flow/mod.rs index 280416690..98f85b7c6 100644 --- a/deep_causality_cfd/src/types/flow/mod.rs +++ b/deep_causality_cfd/src/types/flow/mod.rs @@ -25,7 +25,6 @@ mod duct_march_run; mod finite_rate_ionization; mod flight_sensors; mod frequency; -mod gates; mod march_run; mod march_state; mod mms; @@ -68,7 +67,6 @@ pub use duct_march_run::DuctMarchRun; pub use finite_rate_ionization::FiniteRateIonizationStage; pub use flight_sensors::FlightSensors; pub use frequency::{dominant_frequency, strouhal_number}; -pub use gates::Gates; pub use march_run::{MarchPipeline, MarchRun, StepView}; pub use march_state::MarchState; pub use mms::{MmsBuilder, Regime}; diff --git a/deep_causality_cfd/src/types/flow/report.rs b/deep_causality_cfd/src/types/flow/report.rs index 8d8f0a6f2..7643a855d 100644 --- a/deep_causality_cfd/src/types/flow/report.rs +++ b/deep_causality_cfd/src/types/flow/report.rs @@ -15,13 +15,13 @@ use deep_causality_haft::LogSize; /// roster of N branches costs one paused state rather than N copies. These fields are that claim /// made checkable from a branch report, so a study can regress it instead of trusting it. /// -/// Recorded on every branch the carrier continues — [`CarrierPause::continue_with`], the fan-out -/// [`CarrierPause::continue_branches`] lowers onto it, and [`CarrierFork::continue_march`]. A report +/// Recorded on every branch the carrier continues: `CarrierPause::continue_with`, the fan-out +/// `CarrierPause::continue_branches` that lowers onto it, and `CarrierFork::continue_march`. A report /// from a plain (unforked) march carries `None`: nothing was forked, so there is nothing to claim. /// -/// [`CarrierPause::continue_with`]: crate::CarrierPause::continue_with -/// [`CarrierPause::continue_branches`]: crate::CarrierPause::continue_branches -/// [`CarrierFork::continue_march`]: crate::CarrierFork::continue_march +/// Those three are named as prose rather than linked. `CarrierPause` and `CarrierFork` are declared +/// `pub` inside the private `types::flow::carrier` module and are not re-exported, so they have no +/// path reachable from the crate root for an intra-doc link to resolve against. #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub struct ForkEconomics { shares_fluid: bool, diff --git a/deep_causality_cfd/src/types/flow/state_snapshot.rs b/deep_causality_cfd/src/types/flow/state_snapshot.rs index 028b8e0fe..a2de2252b 100644 --- a/deep_causality_cfd/src/types/flow/state_snapshot.rs +++ b/deep_causality_cfd/src/types/flow/state_snapshot.rs @@ -34,12 +34,30 @@ use deep_causality_file::{ }; use deep_causality_haft::{IoAction, LogAddEntry}; use deep_causality_num::FromPrimitive; +use deep_causality_num_complex::Quaternion; use deep_causality_physics::PhysicsError; use deep_causality_tensor::{CausalTensor, CausalTensorTrain}; /// Section layout version written by this build (bumped per section, not per container). const SECTION_V1: u8 = 1; +/// The `"nav"` section's layout version written by this build. +/// +/// **v1** packed `position(3), velocity(3), gm, tau, elapsed, state(17), cov(17×17)`. **v2** inserts +/// the four nominal-attitude floats `(w, x, y, z)` after `elapsed` and before the filter state, so the +/// resumed engine keeps its heading. +/// +/// The version byte is what keeps the two layouts apart, and it has to be read in both directions. +/// Without it a v1 package hits this build's reader four values short and fails as "truncated" at the +/// end of the covariance, naming the wrong cause; worse, a v2 package handed to a build that predates +/// the attitude reads the quaternion as the first four filter-state entries and shifts every value +/// after it, restoring a plausible-looking engine from misaligned data. Bumping the section closes both +/// directions: [`section`] already refuses a version it does not know, so an older build now rejects a +/// v2 package loudly instead of misparsing it, and the reader below decodes a v1 package correctly with +/// the identity attitude — which is exactly the attitude the writing build modelled (`C ≈ I`), so no +/// resumable state is thrown away. +const NAV_SECTION_V2: u8 = 2; + /// Named tensor-train fields, as a field-tier snapshot stores them. pub type NamedTtFields = Vec<(String, CausalTensorTrain)>; @@ -210,6 +228,12 @@ where write_value(&mut nav, &engine.gm()); write_value(&mut nav, &engine.carried_clock_offset()); write_value(&mut nav, &engine.elapsed_time()); + // The nominal body→nav attitude (w, x, y, z), so a resumed engine keeps its heading. + let q = engine.attitude(); + write_value(&mut nav, &q.w); + write_value(&mut nav, &q.x); + write_value(&mut nav, &q.y); + write_value(&mut nav, &q.z); for v in &engine.filter().state().to_array() { write_value(&mut nav, v); } @@ -242,24 +266,34 @@ where SnapshotSection::new("scalars", SECTION_V1, scalars), SnapshotSection::new("channels", SECTION_V1, channels), SnapshotSection::new("ambient", SECTION_V1, ambient), - SnapshotSection::new("nav", SECTION_V1, nav), + SnapshotSection::new("nav", NAV_SECTION_V2, nav), SnapshotSection::new("log", SECTION_V1, log), SnapshotSection::new("step", SECTION_V1, step_bytes), ], )) } -fn section<'a>(package: &'a SnapshotPackage, name: &str) -> Result<&'a [u8], PhysicsError> { +/// A named section's bytes together with its layout version, refusing a version this build does not +/// know how to decode. `accepted` lists the versions the caller can read, oldest first. +fn versioned_section<'a>( + package: &'a SnapshotPackage, + name: &str, + accepted: &[u8], +) -> Result<(&'a [u8], u8), PhysicsError> { let s = package.section(name).ok_or_else(|| { PhysicsError::CalculationError(format!("snapshot: missing section '{name}'")) })?; - if s.version() != SECTION_V1 { + if !accepted.contains(&s.version()) { return Err(PhysicsError::CalculationError(format!( "snapshot: section '{name}' has unsupported layout version {}", s.version() ))); } - Ok(s.bytes()) + Ok((s.bytes(), s.version())) +} + +fn section<'a>(package: &'a SnapshotPackage, name: &str) -> Result<&'a [u8], PhysicsError> { + versioned_section(package, name, &[SECTION_V1]).map(|(bytes, _)| bytes) } /// Unpack a full resume package into the coupled field and the suspended step index. @@ -320,8 +354,8 @@ where field.set_throttle_action(a); } - // "nav". - let bytes = section(package, "nav")?; + // "nav" — v2 carries the nominal attitude, v1 predates it (see `NAV_SECTION_V2`). + let (bytes, nav_version) = versioned_section(package, "nav", &[SECTION_V1, NAV_SECTION_V2])?; let mut o = 0; let nav_present = presence_flag(*bytes.first().ok_or_else(|| short("nav"))?, "nav")?; o += 1; @@ -331,6 +365,19 @@ where let gm: R = read_value(bytes, &mut o, "nav")?; let tau: R = read_value(bytes, &mut o, "nav")?; let elapsed: R = read_value(bytes, &mut o, "nav")?; + // Nominal attitude (w, x, y, z), in the order `pack_resume` wrote it. A v1 section has no + // attitude floats to read: the build that wrote it carried no nominal attitude and propagated + // the specific force under `C ≈ I`, which is the identity quaternion exactly, so resuming at + // identity reproduces the suspended engine rather than inventing a heading for it. + let attitude = if nav_version >= NAV_SECTION_V2 { + let qw: R = read_value(bytes, &mut o, "nav")?; + let qx: R = read_value(bytes, &mut o, "nav")?; + let qy: R = read_value(bytes, &mut o, "nav")?; + let qz: R = read_value(bytes, &mut o, "nav")?; + Quaternion::new(qw, qx, qy, qz) + } else { + Quaternion::identity() + }; let state_vec: Vec = read_values(bytes, &mut o, NAV_STATES, "nav")?; let mut state = [R::zero(); NAV_STATES]; state.copy_from_slice(&state_vec); @@ -339,12 +386,13 @@ where let r: Vec = read_values(bytes, &mut o, NAV_STATES, "nav")?; row.copy_from_slice(&r); } - let filter = NavFilter::restore(crate::navigation::InsErrorState::from_array(state), cov); + let filter = NavFilter::restore(crate::navigation::InsErrorState::from_array(state), cov)?; field.set_nav(ReentryNavEngine::restore( [p[0], p[1], p[2]], [v[0], v[1], v[2]], gm, filter, + attitude, tau, elapsed, )); diff --git a/deep_causality_cfd/src/types/flow/study/event_fork.rs b/deep_causality_cfd/src/types/flow/study/event_fork.rs index 54a85e8ec..0da94c66f 100644 --- a/deep_causality_cfd/src/types/flow/study/event_fork.rs +++ b/deep_causality_cfd/src/types/flow/study/event_fork.rs @@ -22,10 +22,20 @@ use super::*; impl StudyEffect> { /// Declare the shared fork point: a paused trajectory this study's branches continue from. The - /// case axis becomes the command that distinguishes the branches; every branch will resume - /// this pause's state bit-identically and O(1) copy-on-write. `fork` itself never fails — a - /// broken pause is carried through and surfaces as each branch's error at + /// case axis becomes the command that distinguishes the branches; every branch resumes this + /// pause's marched state bit-identically, shared in O(1), with the coupled field copy-on-write + /// (each branch takes its one clone at its first write). `fork` itself never fails — a broken + /// pause is carried through and surfaces as each branch's error at /// [`continue_for`](StudyEffect::continue_for). + /// + /// **The per-branch disk audit sink is not wired on this path.** A campaign-level + /// [`save_log`](crate::StudyDef::save_log) base path rides on [`Cases`] and is consumed only by + /// the coupled origin-fork `march_for` path, which lowers it onto a per-branch trajectory + /// `save_log`. This transition drops it: [`ForkStudy`] has no audit field, and + /// `CompressiblePause::continue_branches` runs its branches under the no-op sink. A + /// `save_log(..).cases(..).fork(..).branch(..).continue_for(..)` chain writes no files, and + /// reports no error for it. Each branch's provenance is still in its report's effect log; it is + /// only the disk flush that is missing. pub fn fork<'p, 'c, R, S>( self, pause: &'p CompressiblePause<'c, R, S>, diff --git a/deep_causality_cfd/src/types/flow_config/march_builder.rs b/deep_causality_cfd/src/types/flow_config/march_builder.rs index a8ed84c90..c605125cb 100644 --- a/deep_causality_cfd/src/types/flow_config/march_builder.rs +++ b/deep_causality_cfd/src/types/flow_config/march_builder.rs @@ -7,6 +7,17 @@ //! specs and validates at `build()` (the required mesh + solver). Started by //! [`CfdConfigBuilder::march`](crate::CfdConfigBuilder); the built config is composed and run by //! the [`CfdFlow`](crate::CfdFlow) DSL. +//! +//! **Where the type-state is, and where it is not.** The composition axes carry real type-state: +//! [`zones`](MarchConfigBuilder::zones) and [`couple`](MarchConfigBuilder::couple) each return a +//! builder of a *different* type (`Z` and `C` change), so the boundary-zone tuple and the coupling +//! stack are fixed in the type before the build. The required scalar sections are not. `mesh` and +//! `solver` are `Option` fields checked inside [`build`](MarchConfigBuilder::build), which is why +//! `build` returns a `Result`: a forgotten `.mesh(..)` is a runtime error, not a compile error. +//! [`DecNs::config`](crate::DecNs::config) in `src/solvers/` is the contrasting pattern. Its +//! `DecNsConfigNeedsViscosity` → `DecNsConfigNeedsTimeStep` → `DecNsConfigReady` chain makes the +//! terminal `build` reachable only once every required field is set, leaving `build` to validate +//! values rather than presence. use crate::CfdScalar; use crate::solvers::DecNsConfig; diff --git a/deep_causality_cfd/studies/README.md b/deep_causality_cfd/studies/README.md index 9b4d0ba7e..6013905b8 100644 --- a/deep_causality_cfd/studies/README.md +++ b/deep_causality_cfd/studies/README.md @@ -24,8 +24,8 @@ below are the one-line summaries. |---|---|---| | `qtt_rank_study` | Is a reentry flowfield low tensor-train rank? (the Tier-B make-or-break) | Not automatically. A *captured* misaligned shock is net-negative, at χ ≈ 151–394, larger than dense. It is **low rank by construction** in a shock-aligned or body-fitted coordinate, χ ≈ 5, roughly a 290× win. The driver is coordinate *alignment*, not curvature. | | `qtt_rank_dynamic` | Does a *marcher* keep the field low-rank over time? | Yes for linear transport. Fixed-tolerance rounding is rank-safe with no runaway, settling at the static rank (8/8/7 over 3000 steps). Nonlinear shock-*steepening* was left untested, since it needs a nonlinear marcher; see `qtt_rank_nonlinear`. | -| `qtt_rank_nonlinear` | Does a *forming* (nonlinear) shock stay low-rank? | In 1-D, yes: peak 8, cheap. A 2-D *curved* shock rises 7 → 20 dynamically, so the threat is **real**. Thickening is **not** the lever, because curvature sets the rank and naive over-thickening is diffusion-CFL-unstable, going to full rank. The levers are coordinate alignment plus an implicit/IMEX step (C3). | -| `qtt_rank_3d` | What is the **upper bound** of rank in 3-D (the avionics and space regime)? | A realistically-formed 3-D curved shock, via explicit Euler and central differences, has **χ ~ √side, unbounded**, running 45 → 135 over 16³ → 128³; flat and body-fitted stay **χ ~ 6, constant**. QTT storage still beats dense asymptotically, with a crossover near 64³, but the √side **solve** cost is what bites. A body-fitted coordinate is **mandatory** for 3-D tractability. | +| `qtt_rank_nonlinear` | Does a *forming* (nonlinear) shock stay low-rank? | In 1-D, yes: peak 8, cheap. A 2-D *curved* shock rises 7 → 20 dynamically, so the threat is **real**. Thickening could **not** be tested as a lever here: the explicit diffusion limit confines stable ν below 1.25 dx, so the scheme has no room to thicken, and the one over-thick run (ν = 6 dx) saturates to full rank because it violates that limit. That curvature sets the rank is `qtt_rank_study`'s finding, not this one. The candidate levers are coordinate alignment plus an implicit/IMEX step (C3). | +| `qtt_rank_3d` | What is the **upper bound** of rank in 3-D (the avionics and space regime)? | A realistically-formed 3-D curved shock, via explicit Euler and central differences, has **χ ~ √side, unbounded**, running 45 → 135 over 16³ → 128³. The flat and body-fitted references read **χ ~ 6**, but they were encoded at 64³ only and not swept, so their constancy in resolution is inferred, not measured here. QTT storage still beats dense asymptotically, with a crossover near 64³, but the √side **solve** cost is what bites. A body-fitted coordinate is **mandatory** for 3-D tractability. | These feed the Tier-B analysis in `openspec/notes/plasma-blackout/gap-2/`. The corresponding Tier-A deliverable (`add-park2t-blackout-tier-a`) does **not** depend on them; they de-risk the *Tier-B* @@ -41,7 +41,7 @@ Tier-B resolutions (`openspec/notes/plasma-blackout/gap-2/`, resolutions 4–9). | `qtt_rank_fitted_dynamic` | Does the rank lever survive *marching* (Res 5)? | Alignment bounds the bond dynamically. An axis-aligned front holds bond 7 at both 64² and 128², flat in resolution, while a misaligned curved shock grows 20 to 25. A **static** body-fitted coordinate is not enough: under Cartesian fluxes the marched front drifts off it and the bond grows 25 to 35, no better than the capture. Res-5 **feedback re-pinning (D9)** is therefore necessary, not optional. Alignment is the lever; maintaining it is the mechanism. | | `qtt_repin_marcher` | Does feedback re-pinning bound the marched rank (Res 5 / D9, the Stage-4 core)? | Two parts. Marching Cartesian fluxes *through* the curved front grows 25 → 35 with resolution, and re-pinning the coordinate to the live front, 18 re-pins at 128², does **not** curb it: the driver is the angular structure a flux-through-front march injects, not the front's drift. Aligning the transport with the coordinate instead, radial flux with the front as a tracked interface, holds the bond at 8, flat in resolution. So the Stage-4 lever is re-pin **and** treat the front as an exact Rankine–Hugoniot interface, smooth each side, rather than marching fluxes across it. | | `qtt_acoustic_precond` | Does the split preconditioner de-risk the implicit step (Res 6)? | The constant-coefficient core inverts at bond 8, flat from L=8 to L=10, so it is low-rank and resolution-stable. On a smooth interior the perturbation spectral radius ρ(A₀⁻¹A₁) = 0.59 < 1, so the preconditioned operator `I + A₀⁻¹A₁` contracts and the implicit solve converges geometrically. Across a captured 5× sound-speed jump ρ rises to 0.87, toward the divergence threshold at 1. The jump is the hard part, which is why fitting (Res 5), by keeping the interior smooth, keeps the implicit step cheap. | -| `qtt_blend_metric` | Is body-fit a valid, low-rank free parameter (Res 4)? | The position-blend `Tλ = (1−λ)·Cartesian + λ·fitted` stays a valid map, with det J holding one sign at min‖det J‖ ≈ 1.5 across the whole λ sweep, so no cell folds. A fixed physical shock sampled on the blended lattice runs monotonically from bond 114 at λ=0, the capture, to 5 at λ=1, fitted. λ is a clean rank dial. | +| `qtt_blend_metric` | Is body-fit a valid, low-rank free parameter (Res 4)? | The position-blend `Tλ = (1−λ)·Cartesian + λ·fitted` stays a valid map, with det J holding one sign at min‖det J‖ ≈ 1.5 across the whole λ sweep, so no cell folds. A fixed physical shock sampled on the blended lattice falls monotonically from bond 114 at λ=0, the capture, to 5 at λ=1, fitted, but the reduction concentrates above λ ≈ 0.75: three quarters of the dial buys 114 → 54, the last quarter buys 54 → 5. A partial blend therefore delivers little rank benefit. λ is monotone and so usable, with the useful range near λ=1. | Round-2 result: two make-or-break claims confirmed, since the alignment lever survives marching and the constant-coefficient preconditioner is low-rank and contracts on a smooth interior; one residual @@ -56,8 +56,9 @@ Rankine–Hugoniot interface, so fluxes are never marched across it and each sid The front-loaded risk milestone of the plasma-retropulsion descent (`openspec/notes/cfd-plasma-retropulsion/`; verdict in `derisk-verdict.md`). `qtt_rank_plume` measured fork economics and plume rank (roadmap M1 risks 2 and 3, both green). `srp_momentum_jet` is -the imprint-fidelity follow-up (risk 1); it supersedes the reverted -`verification/srp_drag_decrement/` pinned-envelope harness (see `reverted/README.md`). +the imprint-fidelity follow-up (risk 1); it supersedes the pinned-envelope harness now parked at +`reverted/srp_drag_decrement/`, which originally lived at `verification/srp_drag_decrement/` (see +`reverted/README.md`). | Study | Question | Finding | |---|---|---| @@ -90,3 +91,8 @@ wall-clock budget measurement rather than a physics probe. | Study | Question | Finding | |---|---|---| | `compressible_carrier_timing` | Can the body-fitted 3-D compressible marcher carry the plasma-blackout corridor inside the minutes-not-hours budget (200 steps in 600 s)? | **No for 3-D, yes for 2-D.** The 3-D fitted shell at its smallest candidate, 16³ at bond cap 16, runs 10.805 s/step and projects to 2161 s (36 min), over budget by more than 3×, so larger 3-D grids are a foregone conclusion. The 2-D fallback fits at every configuration swept, and the largest in-budget one, 64² at bond cap 32, runs 0.175 s/step for a 35 s corridor, a 17× margin. Assembly is free at this scale: ~10 rebuilds per run add 0.04 % to the march, so freestream-drift rebuilds need no rationing. **GO: the corridor carrier is 2-D at 64², bond cap 32.** | + +The bond cap in that GO is a **cost** parameter, carried forward untested for accuracy. The study +times caps 16 and 32; it does not compare either against an uncapped (`by_tol`) reference, so no +accuracy-versus-cap sweep exists and cap 32 is not established as adequate. The recommended +configuration reaches peak bond 32, so the cap binds and its truncation error is unmeasured. diff --git a/deep_causality_cfd/studies/compressible_carrier_timing/README.md b/deep_causality_cfd/studies/compressible_carrier_timing/README.md index 6b1cc7ff7..863e260c8 100644 --- a/deep_causality_cfd/studies/compressible_carrier_timing/README.md +++ b/deep_causality_cfd/studies/compressible_carrier_timing/README.md @@ -51,6 +51,9 @@ decision. **Caveats.** Wall-clock on one machine (Apple M3 Max, release), so re-measure on the target hardware. The projection is `per_step × 200` and excludes coupling overhead, making it a floor rather than a forecast. Five timed steps per case after one untimed warmup is a small sample, and -the 3-D verdict is extrapolated from a single grid by design. +the 3-D verdict is extrapolated from a single grid by design. The bond cap is a **cost** parameter, +not an accuracy one: it is timed at 16 and 32 and never compared against an uncapped (`by_tol`) +reference, nor across caps on any observable. Cap 32 is therefore established as affordable, not as +adequate. See `output.txt` for the recorded reference output. diff --git a/deep_causality_cfd/studies/compressible_carrier_timing/main.rs b/deep_causality_cfd/studies/compressible_carrier_timing/main.rs index 5d145ff74..af39d4095 100644 --- a/deep_causality_cfd/studies/compressible_carrier_timing/main.rs +++ b/deep_causality_cfd/studies/compressible_carrier_timing/main.rs @@ -21,6 +21,15 @@ //! fit, and the recommended configuration (the largest one inside the budget) is printed as the //! go/no-go record. A regression (no configuration fits) exits nonzero, which is the documented //! trigger for the `CompressibleMarcher2d` fallback decision. +//! +//! **What the bond cap in the GO record does and does not mean.** The cap is swept as a *cost* +//! parameter only. Every measurement here is wall-clock; nothing in this study compares a capped +//! run against an uncapped (`Truncation::by_tol`) reference, or against any other cap, on an +//! observable. So the cap the GO names is affordable and **not established as adequate**: no +//! accuracy-versus-cap sweep was run, and the truncation error the cap admits is unmeasured. In +//! the recorded run (`output.txt`) the recommended configuration reports a peak bond equal to its +//! cap of 32, so the cap binds rather than sitting idle. Treat it as a cost figure carried +//! forward, and establish adequacy separately before any accuracy claim rests on it. use deep_causality_cfd::{ BodyFittedCoordinate3d, CartesianIdentity, CompressibleMarcher2d, CompressibleMarcher3dFitted, @@ -57,7 +66,10 @@ fn main() { // decide the family (over budget by >3x), so larger grids are a foregone conclusion. report_case("3d-fitted", 4, 3, 16, measure_3d(4, 16), &mut results); // The 2-D compressible fallback: the corridor's stage stack is 2-D already, so this carrier - // is a like-for-like upgrade of the shipped incompressible corridor. + // is a like-for-like upgrade of the shipped incompressible corridor. The two bond caps are + // TIMED, not compared for accuracy: the observable at cap 16 is never differenced against the + // one at cap 32, nor against an uncapped by_tol run, so this sweep prices the cap and cannot + // qualify it. for (l, cap) in [(5usize, 16usize), (5, 32), (6, 16), (6, 32)] { report_case("2d", l, 2, cap, measure_2d(l, cap), &mut results); } @@ -79,6 +91,8 @@ fn main() { println!(); // The go/no-go record: the largest configuration inside the budget, 3-D preferred. + // "Largest" ranks by (dim, resolution, cap) on COST evidence alone. The cap that comes out of + // this ranking is affordable, not verified: see the caveat printed under the GO line. let pick = results .iter() .filter(|(_, _, _, _, _, fits)| *fits) @@ -91,6 +105,29 @@ fn main() { step = m.per_step_s, bond = m.peak_bond, ); + println!( + " Caveat on the cap: bond cap {cap} is a COST parameter, carried forward untested for" + ); + println!( + " accuracy. This study measures wall-clock only. No capped run is compared against an" + ); + println!( + " uncapped (by_tol) reference or against another cap on any observable, so cap {cap} is" + ); + println!(" affordable, not established as adequate."); + if m.peak_bond >= *cap { + println!( + " Peak bond {bond} reaches cap {cap}: the cap binds, so its truncation error is real", + bond = m.peak_bond, + ); + println!(" and unquantified."); + } else { + println!( + " Peak bond {bond} stays under cap {cap} on this smooth state, which says nothing about", + bond = m.peak_bond, + ); + println!(" a shocked one."); + } } None => { println!("=== NO-GO: no configuration fits the budget. ==="); diff --git a/deep_causality_cfd/studies/compressible_carrier_timing/output.txt b/deep_causality_cfd/studies/compressible_carrier_timing/output.txt index a5ca8f0c2..7db32603f 100644 --- a/deep_causality_cfd/studies/compressible_carrier_timing/output.txt +++ b/deep_causality_cfd/studies/compressible_carrier_timing/output.txt @@ -3,17 +3,23 @@ Budget: 200 corridor steps inside 600 s (10 min); 5 timed steps per case. case grid bond cap assembly per-step projected corridor verdict - 3d-fitted 16^3 16 0.004 s 10.805 s 2161.0 s ( 36.0 min) over budget - 2d 32^2 16 0.000 s 0.027 s 5.4 s ( 0.1 min) fits - 2d 32^2 32 0.000 s 0.042 s 8.3 s ( 0.1 min) fits - 2d 64^2 16 0.000 s 0.062 s 12.4 s ( 0.2 min) fits - 2d 64^2 32 0.001 s 0.175 s 35.0 s ( 0.6 min) fits + 3d-fitted 16^3 16 0.006 s 15.245 s 3049.0 s ( 50.8 min) over budget + 2d 32^2 16 0.000 s 0.037 s 7.4 s ( 0.1 min) fits + 2d 32^2 32 0.000 s 0.060 s 12.0 s ( 0.2 min) fits + 2d 64^2 16 0.001 s 0.088 s 17.6 s ( 0.3 min) fits + 2d 64^2 32 0.001 s 0.248 s 49.6 s ( 0.8 min) fits Rebuild guidance (assembly cost in equivalent steps -> freestream-drift tolerance): 3d-fitted 16^3 cap 16: one rebuild ~ 0.00 steps; ~10 rebuilds/run adds 0.00% to the march - 2d 32^2 cap 16: one rebuild ~ 0.01 steps; ~10 rebuilds/run adds 0.03% to the march - 2d 32^2 cap 32: one rebuild ~ 0.01 steps; ~10 rebuilds/run adds 0.03% to the march - 2d 64^2 cap 16: one rebuild ~ 0.01 steps; ~10 rebuilds/run adds 0.04% to the march + 2d 32^2 cap 16: one rebuild ~ 0.01 steps; ~10 rebuilds/run adds 0.04% to the march + 2d 32^2 cap 32: one rebuild ~ 0.00 steps; ~10 rebuilds/run adds 0.02% to the march + 2d 64^2 cap 16: one rebuild ~ 0.01 steps; ~10 rebuilds/run adds 0.03% to the march 2d 64^2 cap 32: one rebuild ~ 0.00 steps; ~10 rebuilds/run adds 0.02% to the march -=== GO: corridor carrier 2d at 64^2, bond cap 32 (0.175 s/step, peak bond 32). === +=== GO: corridor carrier 2d at 64^2, bond cap 32 (0.248 s/step, peak bond 32). === + Caveat on the cap: bond cap 32 is a COST parameter, carried forward untested for + accuracy. This study measures wall-clock only. No capped run is compared against an + uncapped (by_tol) reference or against another cap on any observable, so cap 32 is + affordable, not established as adequate. + Peak bond 32 reaches cap 32: the cap binds, so its truncation error is real + and unquantified. diff --git a/deep_causality_cfd/studies/qtt_blend_metric/README.md b/deep_causality_cfd/studies/qtt_blend_metric/README.md index 61ca9adac..bcc9d27ad 100644 --- a/deep_causality_cfd/studies/qtt_blend_metric/README.md +++ b/deep_causality_cfd/studies/qtt_blend_metric/README.md @@ -30,13 +30,20 @@ are compatibly oriented over the same `(ξ, η)` patch in front of the nose, on position-blend of two compatibly-oriented charts does not fold. That closes the one open residual Resolution 4 flagged; the guard it depends on, a bounded λ-gradient plus a positive Jacobian, is satisfied here by construction. -- **BM-B: λ is a clean rank dial.** A fixed *physical* curved shock, sampled on the blended - lattice, runs **114 → 5** monotonically as `λ` goes 0 to 1. Intermediate `λ` buys intermediate - rank. Body-fittedness is therefore a continuous free parameter, not an all-or-nothing commitment. - -**Conclusion.** The blend is valid and dialable, so D8 can treat the coordinate as a tunable -`MetricProvider` rather than a fixed choice. The Res-4 residual is closed. Analysis: -`openspec/notes/plasma-blackout/gap-2/`. +- **BM-B: λ moves the rank monotonically, but the reduction concentrates near λ = 1.** A fixed + *physical* curved shock, sampled on the blended lattice, falls **114 → 107 → 92 → 54 → 5** as `λ` + goes 0 to 1. No interval reverses, so the dial is monotone. The split across intervals is uneven: + three quarters of the dial buys a factor of 2.1 (114 → 54), and the last quarter buys the + remaining factor of 10.8 (54 → 5). A partial blend therefore delivers little rank benefit. At + `λ = 0.75` the bond is still about 11× the fitted value. Body-fittedness is a continuous free + parameter rather than an all-or-nothing commitment, but the operationally useful range sits above + `λ ≈ 0.75`. The knee is not located: only the five `λ` in the table were measured, and + intermediate points such as 0.85 and 0.95 were not run. + +**Conclusion.** The blend is valid and monotone in `λ`, so D8 can treat the coordinate as a tunable +`MetricProvider` rather than a fixed choice. The Res-4 residual is closed. A partial blend is not a +cheap middle ground, though: the rank payoff arrives above `λ ≈ 0.75`, so a tuner should expect to +run near full fit. Analysis: `openspec/notes/plasma-blackout/gap-2/`. **Caveats.** This measures the **static** representability of a frozen analytic shock on the blended lattice. It says nothing about whether marching holds the alignment; that is the question diff --git a/deep_causality_cfd/studies/qtt_blend_metric/main.rs b/deep_causality_cfd/studies/qtt_blend_metric/main.rs index 1766b973f..e469c240e 100644 --- a/deep_causality_cfd/studies/qtt_blend_metric/main.rs +++ b/deep_causality_cfd/studies/qtt_blend_metric/main.rs @@ -11,8 +11,8 @@ //! across the whole sweep `λ ∈ [0,1]`. This is the one open residual Res 4 flagged. //! BM-B **rank dial** — a fixed *physical* curved shock, sampled on the `λ`-blended lattice, runs //! monotonically from high rank (`λ=0`, the curved front on a square grid) to `O(10)` (`λ=1`, -//! the front aligned to the radial axis). So `λ` really is a rank knob, and intermediate `λ` -//! gives intermediate rank at zero asymptotic cost. +//! the front aligned to the radial axis). So `λ` really is a rank knob. It is not a linear +//! one: the measured reduction concentrates above `λ ≈ 0.75`, so a partial blend buys little. //! //! Here `T_cart` and `T_fit` are compatibly-oriented charts over the same `(ξ,η)` patch in front of the //! nose (η ≈ radial / across the shock, ξ ≈ transverse). Self-verifying: gates exit non-zero on @@ -142,8 +142,27 @@ fn main() { println!( " Rank dial: bond runs {bond_cart} (λ=0, Cartesian capture) -> {bond_fit} (λ=1, body-fitted)," ); + println!(" monotonically, so λ is a usable rank knob."); + // The reduction's *shape* is the reading, not just its endpoints, so report the last sweep + // point before λ=1: the concentration near the fitted end is otherwise hidden behind a + // 114 -> 5 headline. Pairing λ with a bond is only meaningful when every sweep point produced + // one, so read the knee from a complete sweep or say nothing. + let knee = if bonds.len() == lambdas.len() && bonds.len() >= 2 { + Some((lambdas[lambdas.len() - 2], bonds[bonds.len() - 2])) + } else { + None + }; + if let Some((knee_lam, knee_bond)) = knee { + println!( + " The reduction is not spread evenly: it concentrates above λ ~ {knee_lam:.2}. The dial up to" + ); + println!( + " λ={knee_lam:.2} buys {bond_cart} -> {knee_bond}; the last step to λ=1 buys {knee_bond} -> {bond_fit}. A partial" + ); + println!(" blend therefore delivers little rank benefit; the useful range sits near λ=1."); + } println!( - " monotonically — body-fittedness is a continuous low-rank free parameter, exactly as D8 claims." + " Body-fittedness is a continuous low-rank free parameter, as D8 claims, but not a linear one." ); if failures.is_empty() { diff --git a/deep_causality_cfd/studies/qtt_blend_metric/output.txt b/deep_causality_cfd/studies/qtt_blend_metric/output.txt index f7c5ee75a..b81d259b1 100644 --- a/deep_causality_cfd/studies/qtt_blend_metric/output.txt +++ b/deep_causality_cfd/studies/qtt_blend_metric/output.txt @@ -1,20 +1,28 @@ + Finished `release` profile [optimized] target(s) in 0.22s + Running `target/release/examples/qtt_blend_metric` === QTT blend-metric (Res 4 / D8): body-fit as a valid low-rank free parameter === T_lambda = (1-lambda)*Cartesian + lambda*BodyFitted, over a 256x256 (xi,eta) patch - lambda | min|detJ| detJ sign | shock-field bond - -------+----------------------+------------------ - 0.00 | 2.1213 - | 114 - 0.25 | 1.7809 - | 107 - 0.50 | 1.5757 - | 92 - 0.75 | 1.5057 - | 54 - 1.00 | 1.5708 - | 5 + lambda | min|detJ| floor margin | shock-field bond + -------+-----------------------------+------------------ + 0.00 | 2.1213 2.12e-6 1.0e6 | 114 + 0.25 | 1.7809 2.12e-6 8.4e5 | 107 + 0.50 | 1.5757 2.12e-6 7.4e5 | 92 + 0.75 | 1.5057 2.12e-6 7.1e5 | 54 + 1.00 | 1.5708 2.12e-6 7.4e5 | 5 --- reading --- - Validity: min|detJ| = 1.506 > 0 with one sign across the whole sweep — the - position-blend of two compatibly-oriented charts does NOT fold. The Res-4 residual holds - (with a bounded-λ-gradient + positive-Jacobian guard, which here is satisfied by construction). + Validity: min|detJ| = 1.506, which is 7.1e5x the floor that + BlendedMap::new accepts against — the position-blend of two compatibly-oriented charts + does NOT fold anywhere on this sweep. + Both numbers come from the shipped constructor's own scan, so the gate measures the map + the crate builds rather than a copy of its algebra. Rank dial: bond runs 114 (λ=0, Cartesian capture) -> 5 (λ=1, body-fitted), - monotonically — body-fittedness is a continuous low-rank free parameter, exactly as D8 claims. + monotonically, so λ is a usable rank knob. + The reduction is not spread evenly: it concentrates above λ ~ 0.75. The dial up to + λ=0.75 buys 114 -> 54; the last step to λ=1 buys 54 -> 5. A partial + blend therefore delivers little rank benefit; the useful range sits near λ=1. + Body-fittedness is a continuous low-rank free parameter, as D8 claims, but not a linear one. ALL GATES PASSED — the blend is valid and λ is a clean rank dial. diff --git a/deep_causality_cfd/studies/qtt_rank_3d/README.md b/deep_causality_cfd/studies/qtt_rank_3d/README.md index fa1e5f5d2..de6e25df0 100644 --- a/deep_causality_cfd/studies/qtt_rank_3d/README.md +++ b/deep_causality_cfd/studies/qtt_rank_3d/README.md @@ -23,16 +23,21 @@ rank. **Findings (gated, exit nonzero on regression).** Measured on an Apple M3 Max (release): -| side | formed-shock peak χ | flat / body-fitted χ | -|---|---|---| -| 16³ | 45 | | -| 32³ | 56 | | -| 64³ | 89 | flat 5, fitted 6 | -| 128³ | 135 | | +| side | formed-shock peak χ | +|---|---| +| 16³ | 45 | +| 32³ | 56 | +| 64³ | 89 | +| 128³ | 135 | + +Only the forming shock is swept. The references are a **single 64³ measurement**: a flat +axis-aligned plane reads χ = 5, a body-fitted shell reads χ = 6. No per-level reference sweep was +run, so their behaviour under resolution is inferred from alignment, not measured here. The 2-D +counterpart is measured in `qtt_rank_fitted_dynamic`, at 64² and 128². - **Upper bound: χ ~ side^0.53, roughly √side, and unbounded in resolution.** A captured 3-D curved - shock surface costs 45 → 135 over 16³ → 128³, while the flat and body-fitted references stay - **constant at 5 to 6**. + shock surface costs 45 → 135 over 16³ → 128³. The references sit at 5 and 6 at the one level where + they were encoded. - **QTT-versus-dense storage flips with resolution, a crossover rather than a wall.** The `dense/QTT` storage ratio runs 0.08× at 16³, then 0.35×, then 0.92× at the 64³ break-even, then 2.74× at 128³. Because dense grows as `side³` while `χ² ~ side^1.1`, QTT storage **always wins @@ -40,8 +45,8 @@ rank. - **The real result is the solve cost, not storage.** Tensor-train ops are `O(χ²)` to `O(χ³)` per core. `χ ~ √side` means that at a flight-relevant micrometre grid, `side ~ 10⁶`, a captured curved shock implies `χ ~ thousands`: bounded, but expensive enough to erode the practical advantage. The - **body-fitted shell holds χ ~ O(10) at any resolution**, and that gap is the Tier-B-deciding - result. + **body-fitted shell reads χ ~ O(10)** at the one level encoded, 64³, and that gap is the + Tier-B-deciding result. **Conclusion.** 3-D Tier-B is tractable **only** with a shock-aligned or body-fitted coordinate, which turns the curved surface into an axis-aligned one and replaces `χ ~ √side` with `χ ~ O(10)`. diff --git a/deep_causality_cfd/studies/qtt_rank_3d/main.rs b/deep_causality_cfd/studies/qtt_rank_3d/main.rs index d6f0bf316..7e26a742e 100644 --- a/deep_causality_cfd/studies/qtt_rank_3d/main.rs +++ b/deep_causality_cfd/studies/qtt_rank_3d/main.rs @@ -17,9 +17,11 @@ //! is dispersive and needs a little viscosity for stability; `ν` is kept inside the explicit diffusion //! CFL (the `qtt_rank_nonlinear` lesson). //! -//! Resolution is swept (16³ → 128³) to read the curved-shock rank growth law. A flat axis-aligned -//! shock and a body-fitted (function-of-r) shell are encoded as references: the best case and the -//! alignment fix, in 3-D. +//! Resolution is swept (16³ → 128³) to read the curved-shock rank growth law. Only the forming +//! shock is swept. A flat axis-aligned shock and a body-fitted (function-of-r) shell are encoded +//! once, at 64³, as **single-level references** for the best case and the alignment fix in 3-D. +//! They are not part of the sweep, so this study does not measure how they scale with resolution; +//! the growth law below is read from the forming shock alone. //! //! Codec note: block bit-ordering (all x bits, then y, then z) — the same mis-alignment-hostile //! ordering as `qtt_rank_study`. @@ -159,18 +161,24 @@ fn main() { } println!(" smooth-bump init rank: {init}; PEAK rank (formed curved shock): {peak}"); - // -- references: flat (best) and body-fitted (the fix) at 64^3 --- + // -- single-level references: flat (best) and body-fitted (the fix), at 64^3 only. + // These are encoded once, outside the resolution sweep below. They give the best-case and + // alignment-fix rank at one level; they are not swept, so nothing here measures their + // resolution scaling. The gates compare them against the 64^3 peak, same level. let d = 2.0 / side as f64; let flat = build_3d(side, &|x, _, _| smooth_step(x, 0.5, d)); let shell_fitted = build_3d(side, &|r_axis, _, _| smooth_step(r_axis * 0.7, 0.3, d)); let r_flat = rank_of_field(&flat, side, l, tol); let r_fit = rank_of_field(&shell_fitted, side, l, tol); - println!("\n references at {side}^3:"); + println!("\n single-level references, encoded at {side}^3 only (NOT swept below):"); println!(" flat plane (axis-aligned, fn of x) ....... {r_flat} (best case)"); println!(" curved shell, body-fitted (fn of r) ...... {r_fit} (alignment fix in 3-D)"); // -- scaling: peak forming-shock rank vs resolution -------------- - println!("\n upper-bound growth law (peak forming-shock rank vs resolution):"); + println!( + "\n upper-bound growth law (peak FORMING-SHOCK rank vs resolution; references above are" + ); + println!(" a single 64^3 point and are not columns of this sweep):"); println!( " {:>4} | {:>6} | {:>10} | {:>13}", "L", "side", "peak_bond", "ratio vs prev" @@ -222,9 +230,13 @@ fn main() { " (measured {c0} -> {c1} over {s0}^3 -> {s1}^3), i.e. roughly sqrt(side) — UNBOUNDED in resolution," ); println!( - " vs the flat / body-fitted references which stay ~{} (constant).", + " vs the flat / body-fitted references, which read ~{} at 64^3. Those are ONE level, not a sweep:", r_flat.max(r_fit) ); + println!( + " their constancy in resolution is inferred from alignment, not measured here (the 2-D counterpart" + ); + println!(" is measured in qtt_rank_fitted_dynamic, at 64^2 and 128^2)."); println!( " This is a LOWER bound on a live solver: marching carries operator products *before* rounding," ); @@ -251,8 +263,9 @@ fn main() { " — bounded, but expensive enough to erode the practical advantage. The body-fitted shell" ); println!( - " holds chi ~ O(10) at ANY resolution. THAT gap — not storage-vs-dense — is the real result." + " reads chi ~ O(10) at the one level encoded here, 64^3. THAT gap — not storage-vs-dense —" ); + println!(" is the real result."); println!(); println!( " => 3-D Tier-B is tractable ONLY with a shock-aligned / body-fitted coordinate: it turns the" diff --git a/deep_causality_cfd/studies/qtt_rank_3d/output.txt b/deep_causality_cfd/studies/qtt_rank_3d/output.txt index 86dcacf9a..ab089b3ad 100644 --- a/deep_causality_cfd/studies/qtt_rank_3d/output.txt +++ b/deep_causality_cfd/studies/qtt_rank_3d/output.txt @@ -13,11 +13,12 @@ 74 | 87 smooth-bump init rank: 8; PEAK rank (formed curved shock): 89 - references at 64^3: + single-level references, encoded at 64^3 only (NOT swept below): flat plane (axis-aligned, fn of x) ....... 5 (best case) curved shell, body-fitted (fn of r) ...... 6 (alignment fix in 3-D) - upper-bound growth law (peak forming-shock rank vs resolution): + upper-bound growth law (peak FORMING-SHOCK rank vs resolution; references above are + a single 64^3 point and are not columns of this sweep): L | side | peak_bond | ratio vs prev 4 | 16 | 45 | - 5 | 32 | 56 | 1.24x @@ -35,7 +36,9 @@ --- reading --- UPPER BOUND: a realistically-formed 3-D curved shock surface has bond chi ~ side^0.53 (measured 45 -> 135 over 16^3 -> 128^3), i.e. roughly sqrt(side) — UNBOUNDED in resolution, - vs the flat / body-fitted references which stay ~6 (constant). + vs the flat / body-fitted references, which read ~6 at 64^3. Those are ONE level, not a sweep: + their constancy in resolution is inferred from alignment, not measured here (the 2-D counterpart + is measured in qtt_rank_fitted_dynamic, at 64^2 and 128^2). This is a LOWER bound on a live solver: marching carries operator products *before* rounding, and explicit central differencing adds dispersive-oscillation rank atop the curvature floor. @@ -46,7 +49,8 @@ 2. SOLVE cost: tensor-train ops are O(chi^2)-O(chi^3) per core. chi ~ sqrt(side) means at a flight-relevant micrometre grid (side ~ 1e6) a captured curved shock implies chi ~ thousands — bounded, but expensive enough to erode the practical advantage. The body-fitted shell - holds chi ~ O(10) at ANY resolution. THAT gap — not storage-vs-dense — is the real result. + reads chi ~ O(10) at the one level encoded here, 64^3. THAT gap — not storage-vs-dense — + is the real result. => 3-D Tier-B is tractable ONLY with a shock-aligned / body-fitted coordinate: it turns the curved surface into an axis-aligned one, replacing chi ~ sqrt(side) with chi ~ O(10). diff --git a/deep_causality_cfd/studies/qtt_rank_nonlinear/README.md b/deep_causality_cfd/studies/qtt_rank_nonlinear/README.md index 94147ac82..1e8dd02c5 100644 --- a/deep_causality_cfd/studies/qtt_rank_nonlinear/README.md +++ b/deep_causality_cfd/studies/qtt_rank_nonlinear/README.md @@ -23,15 +23,19 @@ explicit Euler and per-step rounding, and measures the bond dimension as a shock - **A 2-D forming *curved* shock raises rank, so the threat is real and dynamic.** A smooth radial bump self-advects into a curved front and the bond climbs **7 → 20**, at only 64², and it grows with resolution. This is the dynamic confirmation of the static 2-D result. -- **Thickening is NOT the curved-shock lever, and the hypothesis was refuted by running it.** The - rank of a curved shock is set by its curvature and mis-alignment with the grid axes, which adding - viscosity cannot remove. Worse, **naive over-thickening is diffusion-CFL-unstable**: at `ν = 6 dx` - the diffusion number `ν·dt/dx² = 1.2`, far above 0.25, and the run blows up to **full rank (64)**. - You cannot simply crank artificial viscosity in an explicit scheme. - -**Conclusion.** The nonlinear 2-D rank threat is confirmed. The levers are **coordinate alignment**, -meaning a shock-aligned or body-fitted coordinate, which is the `qtt_rank_study` result, and an -**implicit / IMEX step** for stable dissipation within the diffusion CFL, which is gap **C3**. +- **Thickening could NOT be tested as a lever here.** The explicit 2-D diffusion limit + `ν·dt/dx² ≤ 0.25` at `dt = 0.2 dx` confines stable `ν` below `1.25 dx`, so this scheme has no room + to thicken. The two viscosities run are `ν = 1 dx`, stable, and `ν = 6 dx`, whose diffusion number + is 1.2 and which saturates to **full rank (64)**. That is a statement about the explicit scheme's + stable window, not about thickness as a rank lever. You cannot simply crank artificial viscosity + in an explicit scheme. +- **Curvature is not isolated here either.** No flat forming shock at the same `ν`, `dt` and front + width runs in this study. The controlled comparison that holds thickness fixed at 2 cells and + varies orientation is `qtt_rank_study`'s. + +**Conclusion.** The nonlinear 2-D rank threat is confirmed. The candidate levers are **coordinate +alignment**, meaning a shock-aligned or body-fitted coordinate, which is the `qtt_rank_study` result, +and an **implicit / IMEX step** for stable dissipation within the diffusion CFL, which is gap **C3**. Neither is exercised here, because this study *captures on a fixed Cartesian grid on purpose*, to measure the cost of doing so. The shock-aligned confinement test is the next study, and both levers are Tier-B design commitments. Analysis: `openspec/notes/plasma-blackout/gap-2/`. diff --git a/deep_causality_cfd/studies/qtt_rank_nonlinear/main.rs b/deep_causality_cfd/studies/qtt_rank_nonlinear/main.rs index 800a79c98..8aca95a91 100644 --- a/deep_causality_cfd/studies/qtt_rank_nonlinear/main.rs +++ b/deep_causality_cfd/studies/qtt_rank_nonlinear/main.rs @@ -20,11 +20,18 @@ //! misaligned 2-D structure the static study showed is expensive. Does the rank climb as the curved //! shock forms? //! -//! Finding (it refuted the naive "just thicken it" hypothesis): the forming 2-D curved shock DOES raise -//! rank, and thickening is NOT the lever — the rank is set by curvature/mis-alignment (which thickening -//! cannot remove), and naive over-thickening is diffusion-CFL-unstable (it blows up to full rank). The -//! real levers are coordinate alignment (static study) and an implicit/IMEX step (gap C3), neither -//! exercised here. So this study confirms the threat is real and dynamic, and scopes the fix. +//! Finding: the forming 2-D curved shock DOES raise rank, from bond 7 on the smooth bump to a peak +//! of 20 at 64x64. +//! +//! What this study does NOT establish. Thickening could not be tested as a lever here. The explicit +//! 2-D diffusion limit `nu*dt/dx^2 <= 0.25` at `dt = 0.2*dx` confines stable `nu` below `1.25*dx`, +//! leaving no room to sweep: the two viscosities run are `nu = 1*dx` (stable) and `nu = 6*dx`, which +//! violates the limit and saturates to full rank. That is a statement about the explicit scheme's +//! stable window, not about thickness as a rank lever. Curvature is not isolated either, because no +//! flat forming shock at the same `nu`, `dt` and front width runs in this file. The controlled +//! comparison that does hold thickness fixed (2 cells) and vary orientation is `qtt_rank_study`'s. +//! The candidate levers, coordinate alignment and an implicit/IMEX step (gap C3), are exercised in +//! neither study. //! //! Self-verifying: gates encode the findings; exit non-zero on regression. This is a *study*, so the //! headline is the measured magnitudes printed below, not a pass/fail number. @@ -126,6 +133,10 @@ fn main() { for &(st, r) in &s2 { println!(" {st:>6} | {r:>24}"); } + // Timing of the rise: for u0 = exp(-r^2/(2 sigma^2)) with sigma = 0.08, max|u_x| = e^(-1/2)/sigma, + // so inviscid steepening sets in near t* = sigma*e^(1/2) ~ 0.13. The peak equals the first sample + // (step 31, t = 0.097), so bond 20 is reached at or before t*, and the sampled series then falls + // monotonically to 15 by step 248. The 7 -> 20 rise is steepening, not the formed shock. println!(" smooth-bump init bond: {init_2d}"); println!(" STABLE peak bond: {p2} (grid-saturation cap = {side})"); println!( @@ -162,19 +173,20 @@ fn main() { " 2-D: a forming CURVED shock drives bond {init_2d} -> {p2} (stable) — the nonlinear 2-D rank" ); println!(" threat is REAL and DYNAMIC (and grows with resolution; this is only 64x64)."); + println!(" Thickening could NOT be tested as a lever here. The explicit 2-D diffusion limit"); println!( - " Thickening is NOT the curved-shock lever: the rank is set by CURVATURE/mis-alignment," - ); - println!( - " which thickening cannot remove — and naive over-thickening is diffusion-CFL-unstable" + " nu*dt/dx^2 <= 0.25 at dt = 0.2 dx confines stable nu below 1.25 dx, so this scheme" ); println!( - " (peak {p2_trap} = full rank). The lever is COORDINATE ALIGNMENT (static study) + an implicit/" + " has no room to thicken; nu = 6 dx already violates it and saturates (peak {p2_trap} =" ); + println!(" full rank). Curvature is not isolated here either: this file runs no flat forming"); + println!(" shock at the same nu, dt and front width. The controlled comparison that holds"); println!( - " IMEX step for stable dissipation (gap C3) — neither exercised here. The shock-aligned" + " thickness fixed at 2 cells and varies orientation is qtt_rank_study's. The candidate" ); - println!(" confinement test is the next study and the Tier-B design choice."); + println!(" levers, COORDINATE ALIGNMENT and an implicit/IMEX step for stable dissipation"); + println!(" (gap C3), are exercised in neither; the shock-aligned confinement test is next."); if failures.is_empty() { println!("\nALL GATES PASSED."); diff --git a/deep_causality_cfd/studies/qtt_rank_nonlinear/output.txt b/deep_causality_cfd/studies/qtt_rank_nonlinear/output.txt index 7fc39425b..2e4ae7f0a 100644 --- a/deep_causality_cfd/studies/qtt_rank_nonlinear/output.txt +++ b/deep_causality_cfd/studies/qtt_rank_nonlinear/output.txt @@ -34,10 +34,13 @@ 1-D: forming shock peak 8 — nonlinear steepening stays CHEAP in 1-D, as predicted. 2-D: a forming CURVED shock drives bond 7 -> 20 (stable) — the nonlinear 2-D rank threat is REAL and DYNAMIC (and grows with resolution; this is only 64x64). - Thickening is NOT the curved-shock lever: the rank is set by CURVATURE/mis-alignment, - which thickening cannot remove — and naive over-thickening is diffusion-CFL-unstable - (peak 64 = full rank). The lever is COORDINATE ALIGNMENT (static study) + an implicit/ - IMEX step for stable dissipation (gap C3) — neither exercised here. The shock-aligned - confinement test is the next study and the Tier-B design choice. + Thickening could NOT be tested as a lever here. The explicit 2-D diffusion limit + nu*dt/dx^2 <= 0.25 at dt = 0.2 dx confines stable nu below 1.25 dx, so this scheme + has no room to thicken; nu = 6 dx already violates it and saturates (peak 64 = + full rank). Curvature is not isolated here either: this file runs no flat forming + shock at the same nu, dt and front width. The controlled comparison that holds + thickness fixed at 2 cells and varies orientation is qtt_rank_study's. The candidate + levers, COORDINATE ALIGNMENT and an implicit/IMEX step for stable dissipation + (gap C3), are exercised in neither; the shock-aligned confinement test is next. ALL GATES PASSED. diff --git a/deep_causality_cfd/studies/qtt_rank_plume/README.md b/deep_causality_cfd/studies/qtt_rank_plume/README.md index cd85fc6b2..8c256e18d 100644 --- a/deep_causality_cfd/studies/qtt_rank_plume/README.md +++ b/deep_causality_cfd/studies/qtt_rank_plume/README.md @@ -25,7 +25,11 @@ fork it, and continue a purposeful throttle roster: coast, two sign-flip straddl high. Each branch carries its **own** forcing region derived from its own published `"commanded_throttle"`, so the intervention feeds back into that branch's flow through the model. -**Findings.** Grid 2⁵ × 2⁵, dt 4e-4, tol 1e-6 with rank floating free, rank ceiling 32. +**Findings.** A1 and Phase B march a 2⁵ × 2⁵ grid at dt 4e-4. Every encoding in the study, A1, A2 +and the mirror alike, uses `Truncation::by_tol(1e-6)`, which sets `max_bond = usize::MAX`: no bond +cap is applied anywhere, so every bond below is an unconstrained measurement at that tolerance. +`RANK_CEILING = 32` is a gate threshold, the saturation bond of a 2⁵ × 2⁵ field. It is compared +against A1's peak and against the mirrored branch peaks. It is not applied to A2. *A1, marched rank (Cartesian):* peak bond **16 at every C_T** tested (0.5, 1, 2, 4) and **16** for the no-plume body/shock baseline. The plume imprint costs nothing in rank over the baseline. @@ -39,9 +43,11 @@ the no-plume body/shock baseline. The plume imprint costs nothing in rank over t | 2.00 | 32 | 11 | | 4.00 | 32 | 12 | -The Cartesian capture pins at the ceiling. The fitted coordinate holds `O(10)` and grows only -weakly with thrust, so the blend-metric dial works on a plume-plus-shock field, not just on a clean -bow shock. +A2 samples on its own lattice, 2⁶ × 2⁶, whose saturation bond is 64. The Cartesian 32 is therefore +neither a cap nor a ceiling but an uncapped measurement at roughly half saturation. Why all four +λ=0 rows land on exactly 32 is not explained here and was not investigated. The fitted coordinate +holds `O(10)` and grows only weakly with thrust, so the blend-metric dial works on a +plume-plus-shock field, not just on a clean bow shock. *B, fork economics:* sharing is structural, with **shares fluid + field = true** at a setup cost of **42 ns**. Continuation cost against an unforked trunk is a ratio of **1.00 to 1.04** for every @@ -57,8 +63,12 @@ unforked march. Feeds the verdict in **Caveats.** Only structural breaks gate: fork sharing lost, rank saturating the representational ceiling, or an errored branch. Degraded-but-measured outcomes, such as a poor step-cost ratio or rank viable only under the blend metric, are printed as findings for the verdict note rather than -failed. A2 is an *analytic proxy* field, not a marched plume. A1's bond 16 is read under a rank -ceiling of 32, so it measures what the tolerance policy chose, not an unconstrained rank. The +failed. A2 is an *analytic proxy* field, not a marched plume. A1's bond 16 is read with no bond +cap at relative tolerance 1e-6, so it measures what that tolerance retains rather than the exact +rank; a tighter tolerance would admit a larger bond. The post-fork bond of 16 is read on the +bare-marcher mirror, not on the forked carrier: the mirror's pre-pause segment marches no plume +where the trunk world does, and it applies sponge and body every step where a carrier world applies +only its forcing region. No observable is compared between the two at the pause point. The continuation-time band was pinned from the first run on one machine. See `output.txt` for the recorded reference output. diff --git a/deep_causality_cfd/studies/qtt_rank_plume/main.rs b/deep_causality_cfd/studies/qtt_rank_plume/main.rs index 5009c3fcd..943940dfc 100644 --- a/deep_causality_cfd/studies/qtt_rank_plume/main.rs +++ b/deep_causality_cfd/studies/qtt_rank_plume/main.rs @@ -23,11 +23,18 @@ //! branch's flow through the model. Measured: (a) fork structure — every branch shares the //! paused fluid and field by reference (O(1) copy-on-write), a hard gate; (b) per-branch //! continuation wall-clock against an unforked trunk continuation (recorded; band pinned from -//! the first run); (c) post-fork bond growth on a **mirrored** continuation (the pause hides -//! its fluid tensors, so the mirror re-marches the identical deterministic path on the bare -//! marcher — same seed, same steps, same round policy — and reads the bond there); (d) the -//! branch flow observables spread across the roster (the corridor's branch-invariant flow -//! columns are the explicit foil). +//! the first run); (c) post-fork bond growth on a **mirrored** continuation; (d) the branch flow +//! observables spread across the roster (the corridor's branch-invariant flow columns are the +//! explicit foil). +//! +//! **What the mirror is, and is not.** The pause hides its fluid tensors, so measurement (c) is +//! read off a stand-in: a bare-marcher run that re-marches `K_PAUSE` steps from the freestream +//! seed at the same `dt`, tolerance and round policy, then continues each roster entry under that +//! branch's own plume region. It is deterministic, but it is not the carrier's trajectory. Its +//! pre-pause segment marches no plume where the carrier trunk (`CT_TRUNK` = 1) does, and it +//! applies the sponge and body regions every step where a `CompressibleMarchConfig` world applies +//! only its single optional forcing region. Nothing compares an observable between the mirror and +//! the pause before the bond is read, so the reported post-fork bond is the mirror's. //! //! Degraded-but-measured outcomes (a poor step-cost ratio, rank viable only under the blend //! metric) are printed as findings for the verdict note — only structural breaks (fork sharing @@ -255,7 +262,10 @@ fn main() { )); } - // (c) Post-fork bond growth, on the mirrored (bit-identical, deterministic) continuation. + // (c) Post-fork bond growth on the mirror. Deterministic under the fixed seed and step order, + // but not the carrier's path: the pre-pause segment below marches no plume where the trunk + // world does, it adds sponge and body every step, and no observable is compared against the + // pause before the bond is read. The bond printed here is the mirror's, not the fork's. println!("\n mirrored post-fork bond (bare marcher, same seed/steps/round policy):"); println!(" throttle | peak bond through continuation"); println!(" ---------+-------------------------------"); @@ -474,8 +484,9 @@ fn mirror_seed() -> [CausalTensor; 4] { } /// March `steps` on the bare marcher with sponge + body always on and an optional plume region; -/// return the final state and the peak bond. Deterministic: the Phase-B mirror re-runs the -/// carrier's exact path (same seed, same order of operations, same round policy). +/// return the final state and the peak bond. Deterministic under a fixed seed and step order. It +/// is not the carrier's operator sequence: a `CompressibleMarchConfig` world applies one optional +/// forcing region per step and carries neither a sponge nor a body. fn mirror_march( plume: Option<&ForcingRegion>, steps: usize, diff --git a/deep_causality_cfd/studies/qtt_rank_study/README.md b/deep_causality_cfd/studies/qtt_rank_study/README.md index 2f5ab6257..d8aedebc9 100644 --- a/deep_causality_cfd/studies/qtt_rank_study/README.md +++ b/deep_causality_cfd/studies/qtt_rank_study/README.md @@ -25,7 +25,9 @@ plus TT-SVD) and settles whether that assumption holds. bit-ordering, is the cost; straight or curved makes little difference. - **The fix collapses it, by construction.** The same bow shock in a body-fitted polar coordinate, where it is a function of `r` only, is χ ≈ 5, down from 151. The oblique in an aligned coordinate - is χ ≈ 5, down from 394, and stays near 5 across tolerances 1e-4 to 1e-12. + is χ ≈ 5, down from 394. Every χ in this study, 1-D and 2-D alike, is measured at the single + truncation tolerance 1e-8, the only one the program runs. Rank under an SVD truncation threshold + is a function of that threshold by construction; no tolerance sweep is run here. - **Cost verdict.** For 512², meaning 262 144 dense values: aligned χ = 5 is roughly 900 parameters and **291× smaller**; captured curved χ = 151 is **3.1× larger** than dense; captured oblique χ = 394 is **21× larger**. Capturing a misaligned shock makes QTT net-negative. Aligning it makes diff --git a/deep_causality_cfd/studies/srp_momentum_jet/README.md b/deep_causality_cfd/studies/srp_momentum_jet/README.md index 5296672d3..ed341913e 100644 --- a/deep_causality_cfd/studies/srp_momentum_jet/README.md +++ b/deep_causality_cfd/studies/srp_momentum_jet/README.md @@ -54,8 +54,13 @@ cap 24. - **The mechanism is the dissipation floor.** A jet-cell Péclet of roughly 1.3 to 1.8 freezes the stagnation interface at the face, x = 0.469 to 0.531 across a **32× thrust range**, so injected momentum reads as face pressure. That is the inverse of the J–A blanketing reorganization. -- **Compression is innocent.** Raising the bond cap 24 to 32, exact at 2⁵, leaves every observable - unchanged at displayed precision. The discretization is the limit, not the tensor-train truncation. +- **Compression is unmeasured here.** Every row above was marched at bond cap 24, the committed + `output.txt` configuration, and the peak bond reaches 24, so tensor-train truncation is active + throughout. The cap-32 companion, exact at 2⁵ because no bond exceeds its natural dimension, is a + separate `SRP_MJ_CAP=32` invocation. It was not run for this artifact and no cap-32 output is + committed, so the table supports no cross-cap comparison. Attributing the missing collapse to the + discretization rather than to the truncation rests on the frozen-interface and domain findings, + not on a two-cap sweep. Run the companion to close that gap. - **The domain is a limit too.** The upstream probe leaves freestream from C_T ≈ 0.25 at +6.5 % to +285 % at C_T 8, so the correlation's own transition variable, `p_e/p∞ ≈ 7`, is unreachable on this harness. diff --git a/deep_causality_cfd/studies/srp_momentum_jet/config.rs b/deep_causality_cfd/studies/srp_momentum_jet/config.rs index abcda71ae..b33f7c6a6 100644 --- a/deep_causality_cfd/studies/srp_momentum_jet/config.rs +++ b/deep_causality_cfd/studies/srp_momentum_jet/config.rs @@ -20,7 +20,8 @@ //! a longer settle with a time-averaged tail read (the committed harness reads a single //! terminal snapshot), a cap-32 run (exact at L = 5 — no bond exceeds its natural dimension, //! so tensor-train truncation is off), and an L = 6 point (halved numerical dissipation, -//! ν = ½·s_ref·Δx). +//! ν = ½·s_ref·Δx; the node-sampled jet patch changes height there too, see +//! [`JET_HALF_HEIGHT_L5_CELLS`]). /// Freestream static pressure, Pa (a supersonic-tunnel static condition). pub const P_INF: f64 = 1000.0; @@ -80,9 +81,15 @@ pub const TOP_ANNULUS_FRACTION_BAND: (f64, f64) = (3.2, 4.0); pub const INTERFACE_X_BAND: (f64, f64) = (0.44, 0.56); /// Jet exit patch half-height in **cells of the L = 5 grid** (patch spans `|ŷ − ŷ_c| ≤ h·Δx̂₅`, -/// one L-5 cell wide). Fixing the patch in physical units (0.25 m tall, r_jet/R_body = 0.25) -/// keeps the injected momentum flux identical across grid levels, so an L = 6 companion run -/// varies only the resolution, not the nozzle. +/// one L-5 cell wide). The *nominal* span is 0.25 m tall, r_jet/R_body = 0.25. That is not what +/// the marcher sees. The mask codec samples at grid nodes, so the realized patch is whatever +/// node-rows the predicate captures: 3 rows at L = 5, which is **0.375 m tall and +/// r_jet/R_body = 0.375** (the committed `output.txt` prints both), and 5 rows at L = 6, which is +/// 0.3125 m. The nozzle height therefore changes with the grid. An L = 6 companion run varies the +/// nozzle as well as the resolution; it is not a pure resolution comparison. Total injected thrust +/// per unit depth stays at `C_T·q̂∞·D̂` at either level because `jet_exit_state` sizes the exit +/// pressure to the realized height, so the two levels also sit at different exit-pressure ratios +/// for the same `C_T`. pub const JET_HALF_HEIGHT_L5_CELLS: f64 = 1.0; /// The L = 5 cell width the patch geometry is anchored to. pub const DX_L5: f64 = 1.0 / 32.0; diff --git a/deep_causality_cfd/studies/srp_momentum_jet/main.rs b/deep_causality_cfd/studies/srp_momentum_jet/main.rs index 930715155..c23abb2d1 100644 --- a/deep_causality_cfd/studies/srp_momentum_jet/main.rs +++ b/deep_causality_cfd/studies/srp_momentum_jet/main.rs @@ -343,8 +343,14 @@ fn main() { } /// The momentum-jet forcing region: one L5-cell-wide column flush against the body face, -/// 0.25 m tall (grid-independent physical geometry), hard-pinned (η = Δt) to the nozzle-exit -/// conserved state — a supersonic inflow patch; everything downstream forms in the march. +/// hard-pinned (η = Δt) to the nozzle-exit conserved state — a supersonic inflow patch; everything +/// downstream forms in the march. +/// +/// The patch height is **not** grid-independent. The predicate spans `|ŷ − ŷ_c| ≤ h` with +/// `h = Δx̂₅`, a nominal 0.25 m, but `mask_from_fn` samples at grid nodes, so the realized patch is +/// the node-rows that fall inside it: 3 rows at L = 5, which is 0.375 m, and 5 rows at L = 6, which +/// is 0.3125 m. `main` counts those rows and prints the realized height; `jet_exit_state` sizes the +/// exit pressure to it. See `JET_HALF_HEIGHT_L5_CELLS` in `config.rs`. fn jet_region(cfg: Cfg, target: [f64; 4]) -> Result, String> { let face_x = BODY_CX - x_hat(R_BODY); let trunc = Truncation::::by_bond(cfg.cap).map_err(|e| format!("trunc: {e:?}"))?; diff --git a/deep_causality_cfd/studies/traj_fs3_clock/README.md b/deep_causality_cfd/studies/traj_fs3_clock/README.md index fd2647155..7e1809c4d 100644 --- a/deep_causality_cfd/studies/traj_fs3_clock/README.md +++ b/deep_causality_cfd/studies/traj_fs3_clock/README.md @@ -20,24 +20,29 @@ numerical. checked against the textbook GPS relativistic split, the canonical falsifiable anchor. The forward clock rate offset has since been **promoted out of this study into a reusable physics -kernel** (`relativistic_clock_offset_kernel`, capability ⑤). The study now consumes the shipped -kernel rather than defining its own. +kernel** (`relativistic_clock_offset_kernel`, capability ⑤, itself the difference of two +`relativistic_clock_drift_rate_kernel` evaluations). The study consumes the shipped kernel for the +**net** rate only. The kernel returns a combined offset, not a split, so the gravitational and +velocity rows below are computed inline in `main.rs` from `EARTH_GM`, `SPEED_OF_LIGHT`, and the two +radii. They sum to the kernel net by construction; each of the three numbers is gated separately +against its textbook value, and no gate asserts the sum. **Findings (gated, exit nonzero on regression).** GPS satellite clock against a geoid clock, at an orbital speed of `v = 3874.0 m/s`: -| effect | measured | textbook | -|---|---|---| -| gravitational (higher potential, so faster) | **+45.65 µs/day** | +45.7 | -| velocity (time dilation, so slower) | **−7.21 µs/day** | −7.2 | -| net | **+38.44 µs/day** | +38.5 | +| effect | source | measured | textbook | +|---|---|---|---| +| gravitational (higher potential, so faster) | inline | **+45.65 µs/day** | +45.7 | +| velocity (time dilation, so slower) | inline | **−7.21 µs/day** | −7.2 | +| net | kernel | **+38.44 µs/day** | +38.5 | Reentry blackout carry, vehicle clock against surface over a 180 s denied window at `v = 7650 m/s` and 71 km altitude: the accumulated `τ − t` offset is **−57.2 ns**, which is **17.2 m** of ranging drift if uncorrected. -**Conclusion.** The forward `dτ/dt` kernel reproduces the textbook GPS split to sub-µs/day, so -ns-level onboard timing is feasible with the existing constants. The linearising `s` and the proper +**Conclusion.** The forward `dτ/dt` expression reproduces the textbook GPS split to sub-µs/day, the +kernel supplying the net and the two components computed inline, so ns-level onboard timing is +feasible with the existing constants. The linearising `s` and the proper time `τ` are **distinct clocks** and the spec must carry both, which is a conceptual fix to Resolution 1 rather than an implementation detail. Over a 3-minute reentry blackout the uncorrected clock drifts tens of metres, quantifying why the correction must be carried internally (B3). diff --git a/deep_causality_cfd/tests/navigation/closed_loop_tests.rs b/deep_causality_cfd/tests/navigation/closed_loop_tests.rs index 232daca6f..d3ea0f1e9 100644 --- a/deep_causality_cfd/tests/navigation/closed_loop_tests.rs +++ b/deep_causality_cfd/tests/navigation/closed_loop_tests.rs @@ -15,7 +15,7 @@ use deep_causality_physics::{EARTH_GM, KsPropagator}; fn setup() -> (ReentryNavEngine, KsPropagator, ImuModel) { let (r0, v0) = ([7.0e6, 1.0e6, 2.0e6], [-1.0e3, 6.5e3, 3.0e3]); let truth = KsPropagator::from_state(r0, v0, EARTH_GM).unwrap(); - let filter = NavFilter::new(InsErrorState::::zero(), [1.0; 17]); + let filter = NavFilter::new(InsErrorState::::zero(), [1.0; 17]).unwrap(); let eng = ReentryNavEngine::new(r0, v0, EARTH_GM, filter); // ~2 cm/s² accelerometer bias — the drift source; nav-grade process noise. let imu = ImuModel::new([2.0e-2, 0.0, 0.0], [0.0; 3], [1.0e-6; 17]); @@ -35,26 +35,41 @@ fn closed_loop_tracks_then_drifts_then_reacquires() { // Phase 1 — GNSS available (pre-blackout): a fix each step keeps the nominal on truth. for _ in 0..30 { - eng.predict(dt, imu.sense_specific_force(force), imu.process_noise()) - .unwrap(); + eng.predict( + dt, + imu.sense_specific_force(force), + imu.sense_angular_rate([0.0; 3]), + imu.process_noise(), + ) + .unwrap(); let (rt, _) = truth.propagate(eng.elapsed_time()).unwrap(); - eng.correct_position(rt, 0.01); // GNSS: 0.1 m 1σ + eng.correct_position(rt, 0.01).unwrap(); // GNSS: 0.1 m 1σ } let err_pre = err(&eng, &truth); // Phase 2 — blackout: GNSS denied (physics-gated by the ④ flag), INS-only dead-reckoning. for _ in 0..60 { - eng.predict(dt, imu.sense_specific_force(force), imu.process_noise()) - .unwrap(); + eng.predict( + dt, + imu.sense_specific_force(force), + imu.sense_angular_rate([0.0; 3]), + imu.process_noise(), + ) + .unwrap(); } let err_blackout = err(&eng, &truth); // Phase 3 — GNSS reacquired. for _ in 0..30 { - eng.predict(dt, imu.sense_specific_force(force), imu.process_noise()) - .unwrap(); + eng.predict( + dt, + imu.sense_specific_force(force), + imu.sense_angular_rate([0.0; 3]), + imu.process_noise(), + ) + .unwrap(); let (rt, _) = truth.propagate(eng.elapsed_time()).unwrap(); - eng.correct_position(rt, 0.01); + eng.correct_position(rt, 0.01).unwrap(); } let err_post = err(&eng, &truth); @@ -78,6 +93,7 @@ fn through_plasma_optical_aid_bounds_the_blackout_drift() { e1.predict( 1.0, imu1.sense_specific_force([0.0; 3]), + imu1.sense_angular_rate([0.0; 3]), imu1.process_noise(), ) .unwrap(); @@ -91,12 +107,13 @@ fn through_plasma_optical_aid_bounds_the_blackout_drift() { e2.predict( 1.0, imu2.sense_specific_force([0.0; 3]), + imu2.sense_angular_rate([0.0; 3]), imu2.process_noise(), ) .unwrap(); if k % 20 == 0 { let (rt, _) = truth2.propagate(e2.elapsed_time()).unwrap(); - e2.correct_position(rt, 2500.0); // optical: 50 m 1σ (variance 2500) + e2.correct_position(rt, 2500.0).unwrap(); // optical: 50 m 1σ (variance 2500) } max_aided = max_aided.max(err(&e2, &truth2)); } diff --git a/deep_causality_cfd/tests/navigation/eskf_tests.rs b/deep_causality_cfd/tests/navigation/eskf_tests.rs index 0ac8e334d..d1f662a76 100644 --- a/deep_causality_cfd/tests/navigation/eskf_tests.rs +++ b/deep_causality_cfd/tests/navigation/eskf_tests.rs @@ -8,7 +8,7 @@ //! shrinks it and pulls the estimate toward the fix, and the closed loop reacquires — the load-bearing //! filter behaviour the navigation gate rests on. -use deep_causality_cfd::{InsErrorState, NavFilter, nav_transition_matrix}; +use deep_causality_cfd::{InsErrorState, NAV_STATES, NavFilter, nav_transition_matrix}; #[test] fn f_matrix_matches_propagate() { @@ -30,11 +30,11 @@ fn f_matrix_matches_propagate() { #[test] fn predict_grows_position_uncertainty() { - let mut filter = NavFilter::new(InsErrorState::::zero(), [1.0; 17]); + let mut filter = NavFilter::new(InsErrorState::::zero(), [1.0; 17]).unwrap(); let before = filter.position_variance(); let q = [1e-6; 17]; for _ in 0..200 { - filter.predict(0.01, [9.81, 0.0, 0.0], q); + filter.predict(0.01, [9.81, 0.0, 0.0], q).unwrap(); } assert!( filter.position_variance() > before, @@ -47,12 +47,12 @@ fn predict_grows_position_uncertainty() { #[test] fn measurement_reduces_uncertainty_and_pulls_the_estimate() { // Large initial position-error uncertainty; a precise 3-component fix (δp_x = 5.0, δp_y = δp_z = 0). - let mut filter = NavFilter::new(InsErrorState::::zero(), [100.0; 17]); + let mut filter = NavFilter::new(InsErrorState::::zero(), [100.0; 17]).unwrap(); let before_var = filter.position_variance(); for (i, &z) in [5.0, 0.0, 0.0].iter().enumerate() { let mut h = [0.0f64; 17]; h[i] = 1.0; - filter.update_scalar(h, z, 0.01); + filter.update_scalar(h, z, 0.01).unwrap(); } assert!( (filter.state().position_error()[0] - 5.0).abs() < 0.1, @@ -71,7 +71,7 @@ fn covariance_trace_is_the_sum_of_the_diagonal_and_grows_under_predict() { // The full-covariance trace witnesses total filter uncertainty: it starts as the sum of the initial // diagonal and grows as predict adds process noise + propagates the covariance. let init = [2.0f64; 17]; - let mut filter = NavFilter::new(InsErrorState::::zero(), init); + let mut filter = NavFilter::new(InsErrorState::::zero(), init).unwrap(); let expected: f64 = init.iter().sum(); assert!( (filter.covariance_trace() - expected).abs() < 1e-12, @@ -81,7 +81,7 @@ fn covariance_trace_is_the_sum_of_the_diagonal_and_grows_under_predict() { let before = filter.covariance_trace(); let q = [1e-3; 17]; for _ in 0..50 { - filter.predict(0.01, [9.81, 0.0, 0.0], q); + filter.predict(0.01, [9.81, 0.0, 0.0], q).unwrap(); } assert!( filter.covariance_trace() > before, @@ -99,10 +99,10 @@ fn covariance_trace_is_the_sum_of_the_diagonal_and_grows_under_predict() { fn closed_loop_reacquires_after_a_blackout_coast() { // Predict-only through a "blackout" (uncertainty accumulates), then a returning GNSS position fix // (three scalar updates) collapses the position variance — the reacquisition the flagship needs. - let mut filter = NavFilter::new(InsErrorState::::zero(), [1.0; 17]); + let mut filter = NavFilter::new(InsErrorState::::zero(), [1.0; 17]).unwrap(); let q = [1e-6; 17]; for _ in 0..500 { - filter.predict(0.01, [9.81, 0.0, 0.0], q); + filter.predict(0.01, [9.81, 0.0, 0.0], q).unwrap(); } let var_blackout = filter.position_variance(); assert!( @@ -113,7 +113,7 @@ fn closed_loop_reacquires_after_a_blackout_coast() { for i in 0..3 { let mut h = [0.0f64; 17]; h[i] = 1.0; - filter.update_scalar(h, 0.0, 0.01); // GNSS position fix (0.1 m std) + filter.update_scalar(h, 0.0, 0.01).unwrap(); // GNSS position fix (0.1 m std) } let var_reacq = filter.position_variance(); assert!( @@ -121,3 +121,393 @@ fn closed_loop_reacquires_after_a_blackout_coast() { "reacquisition collapses the position variance: {var_blackout} -> {var_reacq}" ); } + +// ── Covariance validation at the entry points (design D3) ───────────────────────────────────────── + +#[test] +fn new_rejects_a_negative_variance() { + // A diagonal is a vector of variances; a negative one is not a covariance. + let mut diag = [1.0f64; NAV_STATES]; + diag[5] = -1.0; + assert!( + NavFilter::new(InsErrorState::::zero(), diag).is_err(), + "a negative variance must be refused at construction" + ); +} + +#[test] +fn new_rejects_a_non_finite_variance() { + let mut diag = [1.0f64; NAV_STATES]; + diag[0] = f64::NAN; + assert!(NavFilter::new(InsErrorState::::zero(), diag).is_err()); + let mut diag = [1.0f64; NAV_STATES]; + diag[2] = f64::INFINITY; + assert!(NavFilter::new(InsErrorState::::zero(), diag).is_err()); +} + +#[test] +fn new_accepts_a_zero_variance_on_the_boundary() { + // Zero is a non-negative variance: PSD includes the boundary, so `new` admits it. The degenerate + // *update* (s = 0) is what the guarded `update_scalar` refuses, not construction. + let diag = [0.0f64; NAV_STATES]; + assert!(NavFilter::new(InsErrorState::::zero(), diag).is_ok()); +} + +#[test] +fn restore_rejects_an_asymmetric_covariance() { + let mut cov = [[0.0f64; NAV_STATES]; NAV_STATES]; + for (i, row) in cov.iter_mut().enumerate() { + row[i] = 1.0; + } + // A single-sided cross-covariance: [0][3] set, [3][0] left zero — asymmetric beyond any tolerance. + cov[0][3] = 10.0; + assert!( + NavFilter::restore(InsErrorState::::zero(), cov).is_err(), + "an asymmetric matrix is not a covariance" + ); +} + +#[test] +fn restore_rejects_a_negative_diagonal() { + let mut cov = [[0.0f64; NAV_STATES]; NAV_STATES]; + for (i, row) in cov.iter_mut().enumerate() { + row[i] = 1.0; + } + cov[7][7] = -1.0; + assert!(NavFilter::restore(InsErrorState::::zero(), cov).is_err()); +} + +#[test] +fn restore_rejects_a_non_finite_entry() { + let mut cov = [[0.0f64; NAV_STATES]; NAV_STATES]; + for (i, row) in cov.iter_mut().enumerate() { + row[i] = 1.0; + } + cov[9][9] = f64::NAN; + assert!(NavFilter::restore(InsErrorState::::zero(), cov).is_err()); +} + +#[test] +fn restore_admits_float_level_asymmetry_within_tolerance() { + // A cross-covariance that is symmetric only to a float ULP must still restore: exact equality is + // the wrong test for a matrix that has round-tripped through serialisation. + let mut cov = [[0.0f64; NAV_STATES]; NAV_STATES]; + for (i, row) in cov.iter_mut().enumerate() { + row[i] = 2500.0; + } + cov[0][3] = 300.0; + cov[3][0] = 300.0 + 300.0 * f64::EPSILON; // one ULP of asymmetry at this scale + assert!( + NavFilter::restore(InsErrorState::::zero(), cov).is_ok(), + "float-level asymmetry within √ε must be admitted" + ); +} + +#[test] +fn a_valid_filter_snapshots_and_restores_exactly() { + // Build a filter, evolve it (predict + a fold), snapshot its state and covariance, and restore: + // the restored filter must be bit-identical to the suspended one. + let mut filter = NavFilter::new(InsErrorState::::zero(), [2500.0; NAV_STATES]).unwrap(); + let q = [1e-4; NAV_STATES]; + for _ in 0..25 { + filter.predict(0.1, [9.81, 0.1, -0.2], q).unwrap(); + } + for i in 0..3 { + let mut h = [0.0f64; NAV_STATES]; + h[i] = 1.0; + filter.update_scalar(h, 3.0, 1.0).unwrap(); + } + let state = *filter.state(); + let cov = *filter.covariance(); + let restored = NavFilter::restore(state, cov).expect("a valid snapshot must restore"); + assert_eq!( + restored.state(), + filter.state(), + "state must round-trip exactly" + ); + assert_eq!( + restored.covariance(), + filter.covariance(), + "covariance must round-trip exactly" + ); +} + +// ── The guarded measurement update (design D2) ──────────────────────────────────────────────────── + +#[test] +fn a_degenerate_update_is_refused_and_leaves_the_filter_untouched() { + // Reachable from the public API: a zero-variance position axis met with a zero-variance fix gives + // s = P[0][0] + r = 0. The update must refuse and leave state + covariance exactly as they were. + let mut diag = [1.0f64; NAV_STATES]; + diag[0] = 0.0; // zero variance on position axis x (admitted at the PSD boundary) + let mut filter = NavFilter::new(InsErrorState::::zero(), diag).unwrap(); + let state_before = *filter.state(); + let cov_before = *filter.covariance(); + let mut h = [0.0f64; NAV_STATES]; + h[0] = 1.0; + let result = filter.update_scalar(h, 3.0, 0.0); // r = 0 with P[0][0] = 0 → s = 0 → NaN gain + assert!( + result.is_err(), + "a degenerate update (s = 0) must be refused" + ); + assert_eq!( + filter.state(), + &state_before, + "state must be untouched after refusal" + ); + assert_eq!( + filter.covariance(), + &cov_before, + "covariance must be untouched after refusal" + ); +} + +#[test] +fn a_non_finite_measurement_is_refused_and_leaves_the_filter_untouched() { + // A garbage sensor fix (NaN or ∞) passes the r and s guards (neither reads z) and would write NaN + // into every state component via k·(z − h·x) — including the zero-gain ones (0·NaN = NaN) — while + // the covariance stays finite, an invisible poison. It must be refused atomically instead. + for z in [f64::NAN, f64::INFINITY, f64::NEG_INFINITY] { + let mut filter = NavFilter::new(InsErrorState::::zero(), [4.0; NAV_STATES]).unwrap(); + let state_before = *filter.state(); + let cov_before = *filter.covariance(); + let mut h = [0.0f64; NAV_STATES]; + h[0] = 1.0; + assert!( + filter.update_scalar(h, z, 1.0).is_err(), + "a non-finite measurement z = {z} must be refused" + ); + assert_eq!( + filter.state(), + &state_before, + "state untouched after refusal (z = {z})" + ); + assert_eq!( + filter.covariance(), + &cov_before, + "covariance untouched after refusal (z = {z})" + ); + } +} + +#[test] +fn update_scalar_refuses_a_negative_variance() { + let mut filter = NavFilter::new(InsErrorState::::zero(), [1.0; NAV_STATES]).unwrap(); + let state_before = *filter.state(); + let cov_before = *filter.covariance(); + let mut h = [0.0f64; NAV_STATES]; + h[0] = 1.0; + assert!( + filter.update_scalar(h, 1.0, -1.0).is_err(), + "a negative measurement variance must be refused" + ); + assert_eq!(filter.state(), &state_before); + assert_eq!(filter.covariance(), &cov_before); +} + +#[test] +fn a_refused_update_leaves_the_run_able_to_continue() { + // After a refusal, a subsequent well-posed fix still folds — the filter is not poisoned. + let mut filter = NavFilter::new(InsErrorState::::zero(), [4.0; NAV_STATES]).unwrap(); + let mut h = [0.0f64; NAV_STATES]; + h[0] = 1.0; + assert!(filter.update_scalar(h, 5.0, -1.0).is_err()); // refused (negative r) + filter.update_scalar(h, 5.0, 1.0).unwrap(); // valid fold still works + assert!( + (filter.state().position_error()[0] - 4.0).abs() < 1e-9, + "a valid fold after a refusal still pulls the estimate" + ); +} + +#[test] +fn a_valid_update_is_bit_identical_after_the_guard() { + // The guard is a pure early-return before the (unchanged) Joseph arithmetic, so a well-posed fold + // is byte-for-byte what it was before this change. Pinned as an exact-f64 regression: h = e_0, + // P = diag(4.0), z = 5.0, r = 1.0 → k_0 = 4/5, x_new_0 = 4.0, P[0][0] = (1−k_0)²·4 + k_0². + let mut filter = NavFilter::new(InsErrorState::::zero(), [4.0; NAV_STATES]).unwrap(); + let mut h = [0.0f64; NAV_STATES]; + h[0] = 1.0; + filter.update_scalar(h, 5.0, 1.0).unwrap(); + assert_eq!( + filter.state().position_error()[0], + 4.0, + "estimate pulled to the fix (exact)" + ); + // cov[0][0] = (1−4/5)²·4 + 1·(4/5)²; cov[1][1] = cov[2][2] = 4.0 (untouched diagonal). + assert_eq!(filter.covariance()[0][0], EXPECTED_COV00); + assert_eq!(filter.position_variance(), EXPECTED_COV00 + 8.0); +} + +// ── The process-noise discretisation (design D1): Q_d = Q_c·dt ──────────────────────────────────── + +#[test] +fn covariance_growth_is_invariant_under_step_refinement() { + // Over a fixed horizon T, with Q_d = Q_c·dt, the accumulated process noise is a function of elapsed + // time, not step count. The accelerometer-bias axis (index 9) is a *leaf* of the transition matrix + // (F row 9 = e_9, no incoming coupling), so its variance accumulates exactly T·Q_c; halving dt must + // leave it unchanged. Under the old per-step Q it would double. + let horizon = 1.0f64; + let qc = 3.0e-3; // spectral density on the accel-bias axis + let mut q = [0.0f64; NAV_STATES]; + q[9] = qc; + let run = |dt: f64| { + let n = (horizon / dt).round() as usize; + let mut filter = NavFilter::new(InsErrorState::::zero(), [0.0; NAV_STATES]).unwrap(); + for _ in 0..n { + filter.predict(dt, [0.0, 0.0, 0.0], q).unwrap(); + } + filter.covariance()[9][9] + }; + let coarse = run(0.01); // 100 steps + let fine = run(0.005); // 200 steps + let expected = horizon * qc; // T·Q_c + assert!( + (coarse - expected).abs() < 1e-12, + "leaf variance is T·Q_c (elapsed time, not step count): {coarse} vs {expected}" + ); + assert!( + (coarse - fine).abs() < 1e-12, + "terminal covariance is invariant under halving dt: {coarse} vs {fine}" + ); +} + +#[test] +fn changing_dt_alone_does_not_retune_the_filter() { + // The position witness the examples gate on. With only a position spectral density (no velocity + // noise, no seeded cross-covariance), the position block is also a leaf, so its terminal variance + // over a fixed horizon is T·Q_c regardless of the step size — the filter is not silently re-tuned by + // a change of dt. (Under the pre-fix per-step Q, halving dt doubled this.) + let horizon = 2.0f64; + let qc = 5.0e-4; + let mut q = [0.0f64; NAV_STATES]; + q[0] = qc; // position-x spectral density only + let run = |dt: f64| { + let n = (horizon / dt).round() as usize; + let mut filter = NavFilter::new(InsErrorState::::zero(), [0.0; NAV_STATES]).unwrap(); + for _ in 0..n { + filter.predict(dt, [0.0, 0.0, 0.0], q).unwrap(); + } + filter.covariance()[0][0] + }; + let coarse = run(0.02); + let fine = run(0.01); + assert!( + (coarse - fine).abs() < 1e-12, + "position variance over a fixed horizon is dt-invariant: {coarse} vs {fine}" + ); + assert!( + (coarse - horizon * qc).abs() < 1e-12, + "and equals T·Q_c: {coarse} vs {}", + horizon * qc + ); +} + +// ── The guarded predict: dt and the spectral density ────────────────────────────────────────────── + +#[test] +fn predict_refuses_a_non_positive_or_non_finite_step_and_leaves_the_filter_untouched() { + // `dt` reaches both `F` and the `Q_c·dt` discretisation. A NaN step writes NaN through the whole + // covariance; a negative step subtracts `|dt|·Q_c` from the diagonal, leaving negative variances + // behind a `predict` that reported success. Both must be refused, atomically. + for dt in [f64::NAN, f64::INFINITY, -0.01, 0.0] { + let mut filter = NavFilter::new(InsErrorState::::zero(), [4.0; NAV_STATES]).unwrap(); + let state_before = *filter.state(); + let cov_before = *filter.covariance(); + assert!( + filter + .predict(dt, [9.81, 0.0, 0.0], [1e-6; NAV_STATES]) + .is_err(), + "dt = {dt} must be refused" + ); + assert_eq!(filter.state(), &state_before, "state untouched (dt = {dt})"); + assert_eq!( + filter.covariance(), + &cov_before, + "covariance untouched (dt = {dt})" + ); + } +} + +#[test] +fn predict_refuses_a_negative_or_non_finite_spectral_density() { + // A variance rate is non-negative and finite. A negative one *shrinks* the covariance on a + // predict — uncertainty falling while dead-reckoning, the wrong direction to be wrong. + for bad in [f64::NAN, f64::INFINITY, -1e-6] { + let mut filter = NavFilter::new(InsErrorState::::zero(), [4.0; NAV_STATES]).unwrap(); + let cov_before = *filter.covariance(); + let mut q = [1e-6f64; NAV_STATES]; + q[11] = bad; + assert!( + filter.predict(0.01, [9.81, 0.0, 0.0], q).is_err(), + "a spectral density of {bad} must be refused" + ); + assert_eq!( + filter.covariance(), + &cov_before, + "covariance untouched (q = {bad})" + ); + } + // A zero spectral density is a valid (noiseless) axis, not a rejection. + let mut filter = NavFilter::new(InsErrorState::::zero(), [4.0; NAV_STATES]).unwrap(); + assert!( + filter + .predict(0.01, [9.81, 0.0, 0.0], [0.0; NAV_STATES]) + .is_ok(), + "a zero spectral density is admissible" + ); +} + +#[test] +fn a_refused_predict_leaves_the_run_able_to_continue() { + // After a refusal the filter is not poisoned: the next well-posed step still grows the variance. + let mut filter = NavFilter::new(InsErrorState::::zero(), [4.0; NAV_STATES]).unwrap(); + let before = filter.position_variance(); + assert!(filter.predict(-1.0, [0.0; 3], [1e-3; NAV_STATES]).is_err()); + filter.predict(0.1, [0.0; 3], [1e-3; NAV_STATES]).unwrap(); + assert!( + filter.position_variance() > before, + "a valid step after a refusal still propagates: {before} -> {}", + filter.position_variance() + ); +} + +#[test] +fn a_long_predict_only_run_stays_symmetric_enough_to_restore() { + // `predict` forms `F·P·Fᵀ + Q_d` and does not re-symmetrize, so the two triple products sum in + // different orders and float-level asymmetry re-enters every step. This pins how far that drifts + // against the `√ε` scale-relative band `restore` admits: over a long dead-reckoning coast the + // residual stays orders of magnitude inside it, so snapshot/resume after a predict-only run is not + // a rejection hazard. A change that made the asymmetry grow with step count would fail here first. + let mut filter = NavFilter::new(InsErrorState::::zero(), [2500.0; NAV_STATES]).unwrap(); + let q = [1e-4f64; NAV_STATES]; + for _ in 0..5000 { + filter.predict(0.01, [9.81, 0.1, -0.2], q).unwrap(); + } + let cov = *filter.covariance(); + let tol = f64::EPSILON.sqrt(); + let mut worst = 0.0f64; + for (i, row) in cov.iter().enumerate() { + for (j, &a) in row.iter().enumerate().skip(i + 1) { + let b = cov[j][i]; + let band = tol * (1.0 + a.abs().max(b.abs())); + worst = worst.max((a - b).abs() / band); + } + } + assert!( + worst < 1.0e-2, + "predict-only asymmetry stays far inside the restore band: {worst} of the admitted residual" + ); + assert!( + NavFilter::restore(*filter.state(), cov).is_ok(), + "a long predict-only run still restores" + ); +} + +/// Exact `f64` value of `cov[0][0]` after the fold, reproduced in the **same operation order** the +/// Joseph update uses (`((1−k0)·4)·(1−k0) + (1·k0)·k0`), so it is bit-identical to the implementation by +/// construction. Pins the valid-path arithmetic: any reordering or algebraic change is caught, and the +/// D2 guard — a pure early-return before this arithmetic — leaves it byte-unchanged. +const EXPECTED_COV00: f64 = { + let k0 = 4.0 / 5.0; + ((1.0 - k0) * 4.0) * (1.0 - k0) + (1.0 * k0) * k0 +}; diff --git a/deep_causality_cfd/tests/navigation/reentry_nav_tests.rs b/deep_causality_cfd/tests/navigation/reentry_nav_tests.rs index 86d93d9a5..60c32cb56 100644 --- a/deep_causality_cfd/tests/navigation/reentry_nav_tests.rs +++ b/deep_causality_cfd/tests/navigation/reentry_nav_tests.rs @@ -8,16 +8,24 @@ //! accumulates a `τ`-offset distinct from coordinate time (the two-clock separation); and a returning //! position fix reacquires while the trajectory stays a valid bound orbit. -use deep_causality_cfd::{InsErrorState, NavFilter, ReentryNavEngine}; +use deep_causality_cfd::{InsErrorState, NavFilter, Quaternion, ReentryNavEngine}; use deep_causality_physics::{EARTH_GM, KsPropagator}; +fn quat_norm(q: Quaternion) -> f64 { + (q.w * q.w + q.x * q.x + q.y * q.y + q.z * q.z).sqrt() +} + +fn vec_norm(v: [f64; 3]) -> f64 { + (v[0] * v[0] + v[1] * v[1] + v[2] * v[2]).sqrt() +} + fn state_3d() -> ([f64; 3], [f64; 3]) { ([7.0e6, 1.0e6, 2.0e6], [-1.0e3, 6.5e3, 3.0e3]) } fn engine() -> ReentryNavEngine { let (r0, v0) = state_3d(); - let filter = NavFilter::new(InsErrorState::::zero(), [1.0; 17]); + let filter = NavFilter::new(InsErrorState::::zero(), [1.0; 17]).unwrap(); ReentryNavEngine::new(r0, v0, EARTH_GM, filter) } @@ -36,7 +44,7 @@ fn coast_follows_kepler_and_stays_on_manifold() { let steps = 40usize; let q = [0.0; 17]; for _ in 0..steps { - eng.predict(dt, [0.0; 3], q).unwrap(); + eng.predict(dt, [0.0; 3], [0.0; 3], q).unwrap(); assert!( eng.is_on_orbit_manifold(), "stays on the KS constraint manifold" @@ -55,7 +63,7 @@ fn carried_clock_offset_is_relativistic_and_distinct_from_coordinate_time() { let mut eng = engine(); let dt = 1.0; for _ in 0..300 { - eng.predict(dt, [0.0; 3], [0.0; 17]).unwrap(); + eng.predict(dt, [0.0; 3], [0.0; 3], [0.0; 17]).unwrap(); } let tau = eng.carried_clock_offset(); let t = eng.elapsed_time(); @@ -83,7 +91,7 @@ fn velocity_and_filter_accessors_track_the_engine_state() { let dt = 2.0; for _ in 0..10 { - eng.predict(dt, [0.0; 3], [0.0; 17]).unwrap(); + eng.predict(dt, [0.0; 3], [0.0; 3], [0.0; 17]).unwrap(); } // Coasting on the KS orbit changes the velocity away from the seed. assert!( @@ -103,7 +111,7 @@ fn position_fix_reacquires_and_stays_on_orbit() { let dt = 1.0; let q = [1.0e-2; 17]; // inflate uncertainty during the coast for _ in 0..120 { - eng.predict(dt, [0.0; 3], q).unwrap(); + eng.predict(dt, [0.0; 3], [0.0; 3], q).unwrap(); } let var_before = eng.position_variance(); assert!( @@ -115,7 +123,7 @@ fn position_fix_reacquires_and_stays_on_orbit() { // so the nominal snaps toward the fix and the variance collapses. let p = eng.position(); let measured = [p[0] + 10.0, p[1], p[2]]; - eng.correct_position(measured, 0.01); + eng.correct_position(measured, 0.01).unwrap(); assert!( (eng.position()[0] - measured[0]).abs() < 1.0, @@ -133,3 +141,237 @@ fn position_fix_reacquires_and_stays_on_orbit() { "the corrected state is still a valid bound orbit (B2 projection holds)" ); } + +// ── The attitude-error lifecycle (design D4, option a): estimate → inject → reset ───────────────── + +#[test] +fn a_fix_injects_the_attitude_error_into_the_nominal_then_resets_it() { + // Seed a gyro bias so the coast grows a real attitude error while the nominal (sensed rate ω̂ = 0) + // stays at identity. A fix must inject that error into the nominal — the nominal rotates away from + // identity — and only then zero the attitude block. This is the invariant the spec states: the + // reset is legitimate because the estimate was transferred, not discarded. + let (r0, v0) = state_3d(); + let seeded = InsErrorState::::from_biases([0.0; 3], [2.0e-3, -1.0e-3, 5.0e-4]); + let filter = NavFilter::new(seeded, [1.0; 17]).unwrap(); + let mut eng = ReentryNavEngine::new(r0, v0, EARTH_GM, filter); + let dt = 1.0; + for _ in 0..50 { + eng.predict(dt, [0.0; 3], [0.0; 3], [1.0e-6; 17]).unwrap(); + } + let dpsi = eng.filter().state().attitude_error(); + assert!( + vec_norm(dpsi) > 1.0e-3, + "the coast grew a real attitude error: |δψ| = {}", + vec_norm(dpsi) + ); + assert_eq!( + eng.attitude(), + Quaternion::::identity(), + "the nominal stayed at identity through the coast (ω̂ = 0)" + ); + + let p = eng.position(); + eng.correct_position([p[0] + 5.0, p[1], p[2]], 1.0).unwrap(); + + assert_ne!( + eng.attitude(), + Quaternion::::identity(), + "the fix injected the attitude error into the nominal" + ); + assert_eq!( + eng.filter().state().attitude_error(), + [0.0; 3], + "the attitude error was reset only after it was injected" + ); +} + +#[test] +fn repeated_fixes_keep_correcting_the_nominal_rather_than_claiming_free_confidence() { + // With a standing gyro bias, every predict grows an attitude error and every fix injects it into the + // nominal before resetting. Over many cycles the nominal keeps being corrected (it rotates steadily + // away from identity), so the covariance reductions the fixes take are matched by applied + // corrections — not claimed for free, and the error never accumulates unbounded. + let (r0, v0) = state_3d(); + let seeded = InsErrorState::::from_biases([0.0; 3], [1.0e-3, 0.0, 0.0]); + let filter = NavFilter::new(seeded, [1.0; 17]).unwrap(); + let mut eng = ReentryNavEngine::new(r0, v0, EARTH_GM, filter); + let dt = 1.0; + let mut max_reset_error = 0.0f64; + for _ in 0..100 { + eng.predict(dt, [0.0; 3], [0.0; 3], [1.0e-6; 17]).unwrap(); + let p = eng.position(); + eng.correct_position([p[0], p[1], p[2]], 1.0).unwrap(); + // The attitude error is reset (bounded, not accumulating) after each injected fix. + max_reset_error = max_reset_error.max(vec_norm(eng.filter().state().attitude_error())); + } + assert!( + max_reset_error < 1.0e-9, + "the attitude error is reset after each fix, never accumulating: max {max_reset_error}" + ); + // The nominal has been steadily corrected — the injected corrections are real, not free confidence. + assert!( + quat_norm(eng.attitude()) > 0.0 && eng.attitude() != Quaternion::::identity(), + "the nominal attitude was corrected by the injected fixes" + ); + assert!( + (quat_norm(eng.attitude()) - 1.0).abs() < 1.0e-12, + "the corrected nominal stays a unit quaternion" + ); +} + +#[test] +fn a_zero_rate_leaves_the_nominal_exactly_at_identity() { + // No sensed rotation ⇒ the nominal attitude is exactly identity across the whole march, so C(q) = I + // and the numbers reduce to the Tier-A model (this is why the point-mass examples are unchanged). + let mut eng = engine(); + let dt = 0.5; + for _ in 0..1000 { + eng.predict(dt, [1.0, -2.0, 0.5], [0.0; 3], [1.0e-6; 17]) + .unwrap(); + } + assert_eq!( + eng.attitude(), + Quaternion::::identity(), + "a zero gyro input leaves the nominal exactly unchanged" + ); +} + +#[test] +fn a_nonzero_rate_integrates_and_stays_normalised_across_a_long_march() { + // A steady body rate rotates the nominal; over a long march the quaternion must stay unit — the one + // integration-drift hazard option (a) introduces, guarded by the per-step normalise. + let mut eng = engine(); + let dt = 0.01; + let omega = [0.3, -0.1, 0.2]; + for _ in 0..5000 { + eng.predict(dt, [0.0; 3], omega, [1.0e-9; 17]).unwrap(); + } + assert_ne!( + eng.attitude(), + Quaternion::::identity(), + "a nonzero sensed rate rotated the nominal" + ); + assert!( + (quat_norm(eng.attitude()) - 1.0).abs() < 1.0e-9, + "the quaternion stays normalised across a long rotating march: {}", + quat_norm(eng.attitude()) + ); +} + +// ── Predict atomicity: a failed step advances nothing ───────────────────────────────────────────── + +#[test] +fn a_failed_predict_advances_no_part_of_the_engine_and_never_double_integrates() { + // An unbound state (energy ≥ 0) makes `ks_strang_step` refuse: only ellipses lift onto the KS + // manifold. The attitude integration runs before that refusal, so it is the field at risk — a + // caller that retries the step would integrate the same gyro sample twice, and the nominal heading + // would walk forward once per failed attempt while position, velocity, filter and clock stood + // still. Every field must be exactly where it started, however many times the step is retried. + let filter = NavFilter::new(InsErrorState::::zero(), [1.0; 17]).unwrap(); + let mut eng = ReentryNavEngine::new([7.0e6, 0.0, 0.0], [0.0, 2.0e4, 0.0], EARTH_GM, filter); + let pos_before = eng.position(); + let vel_before = eng.velocity(); + let var_before = eng.position_variance(); + let omega = [0.4, -0.2, 0.1]; // a real body rate: a leaked integration is visible in the quaternion + + for attempt in 0..5 { + assert!( + eng.predict(0.5, [0.0; 3], omega, [1.0e-6; 17]).is_err(), + "an unbound nominal cannot be propagated (attempt {attempt})" + ); + assert_eq!( + eng.attitude(), + Quaternion::::identity(), + "the gyro was not integrated by the failed step (attempt {attempt})" + ); + assert_eq!(eng.position(), pos_before, "position untouched"); + assert_eq!(eng.velocity(), vel_before, "velocity untouched"); + assert_eq!(eng.position_variance(), var_before, "covariance untouched"); + assert_eq!(eng.elapsed_time(), 0.0, "no time elapsed on a failed step"); + assert_eq!(eng.carried_clock_offset(), 0.0, "no clock accumulated"); + } +} + +#[test] +fn a_predict_the_filter_refuses_leaves_the_nominal_untouched() { + // The other refusal on the predict path: a negative process-noise spectral density. The nominal + // and the clock must not advance behind a step the filter would not take. + let mut eng = engine(); + eng.predict(1.0, [0.0; 3], [0.0; 3], [1.0e-6; 17]).unwrap(); + let pos_before = eng.position(); + let vel_before = eng.velocity(); + let var_before = eng.position_variance(); + let tau_before = eng.carried_clock_offset(); + let elapsed_before = eng.elapsed_time(); + + let mut q = [1.0e-6f64; 17]; + q[4] = -1.0; + assert!( + eng.predict(1.0, [0.0; 3], [0.1, 0.0, 0.0], q).is_err(), + "a negative spectral density must be refused" + ); + assert_eq!( + eng.attitude(), + Quaternion::::identity(), + "the gyro was not integrated by the refused step" + ); + assert_eq!(eng.position(), pos_before); + assert_eq!(eng.velocity(), vel_before); + assert_eq!(eng.position_variance(), var_before); + assert_eq!(eng.carried_clock_offset(), tau_before); + assert_eq!(eng.elapsed_time(), elapsed_before); + + // And the engine still runs: the refusal was a rejection, not a corruption. + eng.predict(1.0, [0.0; 3], [0.0; 3], [1.0e-6; 17]).unwrap(); + assert!(eng.elapsed_time() > elapsed_before); +} + +#[test] +fn a_non_finite_fix_is_refused_and_rolls_the_engine_back() { + // A garbage sensor fix (a NaN axis) must be refused end-to-end: correct_position propagates the + // rejection and rolls the filter back, and the nominal position/velocity/attitude are left untouched + // — the caller learns the fix was not folded rather than being handed a NaN-poisoned state. + let mut eng = engine(); + let dt = 1.0; + for _ in 0..20 { + eng.predict(dt, [0.0; 3], [0.0; 3], [1.0e-4; 17]).unwrap(); + } + let pos_before = eng.position(); + let vel_before = eng.velocity(); + let att_before = eng.attitude(); + let var_before = eng.position_variance(); + + let p = eng.position(); + let bad = [f64::NAN, p[1], p[2]]; + assert!( + eng.correct_position(bad, 4.0).is_err(), + "a non-finite fix must be refused" + ); + assert_eq!( + eng.position(), + pos_before, + "position untouched after a refused fix" + ); + assert_eq!( + eng.velocity(), + vel_before, + "velocity untouched after a refused fix" + ); + assert_eq!( + eng.attitude(), + att_before, + "attitude untouched after a refused fix" + ); + assert_eq!( + eng.position_variance(), + var_before, + "covariance rolled back after a refused fix" + ); + // A subsequent valid fix still folds — the engine was not poisoned. + let p = eng.position(); + eng.correct_position([p[0] + 2.0, p[1], p[2]], 4.0).unwrap(); + assert!( + eng.position_variance() < var_before, + "a valid fix still collapses the variance" + ); +} diff --git a/deep_causality_cfd/tests/solvers/dec/dec_ns_rate_tests.rs b/deep_causality_cfd/tests/solvers/dec/dec_ns_rate_tests.rs index 310e26a4f..04a4a4ab2 100644 --- a/deep_causality_cfd/tests/solvers/dec/dec_ns_rate_tests.rs +++ b/deep_causality_cfd/tests/solvers/dec/dec_ns_rate_tests.rs @@ -4,10 +4,10 @@ */ //! `DecNsRate` tests: the assembled RHS against the Stage 0 pointwise -//! oracle at second order, the viscous-sign decay pin, exact body-force -//! additivity, all three precision backends, and every construction -//! rejection. The in-loop `expect`s of `eval` are documented coverage -//! exemptions (their invariants are construction-validated here). +//! oracle over a refinement ladder, the viscous-sign decay pin, exact +//! body-force additivity, all three precision backends, and every +//! construction rejection. The in-loop `expect`s of `eval` are documented +//! coverage exemptions (their invariants are construction-validated here). use deep_causality_algebra::RealField; use deep_causality_calculus::{DifferentiableField, DifferentiateFieldExt, Scalar}; @@ -132,9 +132,17 @@ fn oracle_rhs_component(k: f64, x: f64, y: f64, axis: usize) -> f64 { // RHS agreement with the oracle (task 1.4) // --------------------------------------------------------------------------- -/// The full assembled rate (`−i_u du − ν Δ u`) matches the pointwise -/// oracle at second observed order over the refinement ladder — the -/// Stage 0 capstone cross-check, now exercised through `DecNsRate::eval`. +/// The full assembled rate (`−i_u du − ν Δ u`) converges to the pointwise +/// oracle over the `n = 8, 16, 32` refinement ladder. This is the Stage 0 +/// capstone cross-check, exercised through `DecNsRate::eval_unprojected`. +/// +/// What is asserted is an error ratio, not an order: each refinement must +/// cut the relative error by more than a factor of 3, that is an observed +/// order above `log2(3) = 1.585`. The measured orders are 1.66 on 8 → 16 +/// and 1.91 on 16 → 32, so a uniform bound of 1.8 would fail on the first +/// pair. The n = 8 rung is pre-asymptotic: its relative error is 52 %, and +/// the order rises toward 2 as the ladder refines. Both observed orders are +/// reported in the failure message. #[test] fn rate_matches_pointwise_oracle_at_second_order() { let mut rel_errors = Vec::new(); @@ -165,13 +173,19 @@ fn rate_matches_pointwise_oracle_at_second_order() { rel_errors.push(max_err / max_ref); } + // Observed orders, reported so a failure says how far the convergence + // moved rather than only that a ratio was missed. + let p0 = (rel_errors[0] / rel_errors[1]).log2(); + let p1 = (rel_errors[1] / rel_errors[2]).log2(); assert!( rel_errors[1] < rel_errors[0] / 3.0, - "rate vs oracle not second order (first refinement): {rel_errors:?}" + "8 → 16 cut the error by less than 3x: observed order {p0} (expected > 1.585), \ + errors {rel_errors:?}" ); assert!( rel_errors[2] < rel_errors[1] / 3.0, - "rate vs oracle not second order (second refinement): {rel_errors:?}" + "16 → 32 cut the error by less than 3x: observed order {p1} (expected > 1.585), \ + errors {rel_errors:?}" ); } diff --git a/deep_causality_cfd/tests/solvers/qtt/compressible_tests.rs b/deep_causality_cfd/tests/solvers/qtt/compressible_tests.rs index 2529afeab..9ff6fbd03 100644 --- a/deep_causality_cfd/tests/solvers/qtt/compressible_tests.rs +++ b/deep_causality_cfd/tests/solvers/qtt/compressible_tests.rs @@ -226,3 +226,53 @@ fn a_valid_state_is_unaffected_by_the_guard() { let (rf, _mf, ef) = solver.run(&state, 0.05).unwrap(); assert!(rf.iter().all(|v| v.is_finite()) && ef.iter().all(|v| v.is_finite())); } + +// --- Numerical-envelope validation (reconcile-cfd-docs-and-traceability, item 13.9) -------------- + +#[test] +fn a_cfl_outside_the_unit_interval_is_refused_and_names_it() { + let dx = TAU / 64.0; + for bad in [0.0, -0.5, 1.5, f64::NAN, f64::INFINITY] { + let Err(err) = CompressibleEuler1d::new(6, dx, 1.4, bad, trunc()) else { + panic!("CFL {bad} is outside (0, 1] and must be refused"); + }; + let msg = format!("{err:?}"); + assert!( + matches!(err.0, PhysicsErrorEnum::PhysicalInvariantBroken(_)) && msg.contains("CFL"), + "the diagnostic must name the CFL number: {msg}" + ); + } +} + +#[test] +fn a_gamma_at_or_below_one_is_refused_and_names_it() { + let dx = TAU / 64.0; + for bad in [1.0, 0.5, -1.4, f64::NAN] { + let Err(err) = CompressibleEuler1d::new(6, dx, bad, 0.4, trunc()) else { + panic!("gamma {bad} is not > 1 and must be refused"); + }; + assert!( + format!("{err:?}").contains("gamma"), + "the diagnostic must name gamma: {err:?}" + ); + } +} + +#[test] +fn a_non_positive_spacing_is_refused_and_names_it() { + for bad in [0.0, -0.1, f64::NAN] { + let Err(err) = CompressibleEuler1d::new(6, bad, 1.4, 0.4, trunc()) else { + panic!("dx {bad} is not finite and positive and must be refused"); + }; + assert!( + format!("{err:?}").contains("dx"), + "the diagnostic must name dx: {err:?}" + ); + } +} + +#[test] +fn the_shipped_configuration_is_still_accepted() { + // The envelope check must not refuse what the qtt_sod harness runs. + assert!(CompressibleEuler1d::new(9, TAU / 512.0, 1.4, 0.4, trunc()).is_ok()); +} diff --git a/deep_causality_cfd/tests/solvers/qtt/incompressible_2d_tests.rs b/deep_causality_cfd/tests/solvers/qtt/incompressible_2d_tests.rs index a39dc46dd..770ee26d2 100644 --- a/deep_causality_cfd/tests/solvers/qtt/incompressible_2d_tests.rs +++ b/deep_causality_cfd/tests/solvers/qtt/incompressible_2d_tests.rs @@ -109,6 +109,59 @@ fn scalar_rate_diffuses_a_sinusoid() { assert!(max_err < 5e-3, "diffusion rate should be ≈ −κ·s: {max_err}"); } +#[test] +fn rate_pair_convection_matches_the_analytic_reference_with_nonzero_velocity() { + // The shipped convection path `rate_pair` — the one the immersed-body marcher rides — carries + // `(−(u·∇)u + ν∇²u, −(u·∇)v + ν∇²v)` with no projection, so a nonzero-velocity convection term + // survives here. The full-solver Taylor–Green test cannot check it: there the convection is a + // pure gradient the projection annihilates, so a sign flip in the shipped convection is invisible. + // + // Independent reference: u = sin(x), v = sin(y) on [0, 2π]². Then + // (u·∇)u = u·∂ₓu = ½sin(2x), ∇²u = −sin(x) ⇒ ru = −½sin(2x) − ν·sin(x); + // (u·∇)v = v·∂ᵧv = ½sin(2y), ∇²v = −sin(y) ⇒ rv = −½sin(2y) − ν·sin(y). + // The bound covers the centered-FD truncation at 64² (dx ≈ 0.098; the sin(2·) term carries the + // largest truncation, ≈ 0.2 % of its 0.5 amplitude). A sign flip in the shipped convection changes + // each rate by up to 1.0, far outside the bound, so this test bites on one. + const LC: usize = 6; + const NC: usize = 1 << LC; + let dx = TAU / NC as f64; + let nu = 0.05f64; + let trunc = Truncation::::by_tol(1e-12).unwrap(); + let solver = QttIncompressible2d::new(LC, LC, dx, dx, 0.001, nu, trunc).unwrap(); + + let mk = |f: fn(f64, f64) -> f64| { + let mut data = vec![0.0f64; NC * NC]; + for i in 0..NC { + for j in 0..NC { + data[i * NC + j] = f(i as f64 * dx, j as f64 * dx); + } + } + quantize_2d(&CausalTensor::new(data, vec![NC, NC]).unwrap(), &trunc).unwrap() + }; + let u = mk(|x, _y| x.sin()); + let v = mk(|_x, y| y.sin()); + + let (ru, rv) = solver.rate_pair(&u, &v).unwrap(); + let rud = dequantize_2d(&ru, LC, LC).unwrap(); + let rvd = dequantize_2d(&rv, LC, LC).unwrap(); + + let mut max_err = 0.0f64; + for i in 0..NC { + for j in 0..NC { + let (x, y) = (i as f64 * dx, j as f64 * dx); + let ru_ref = -0.5 * (2.0 * x).sin() - nu * x.sin(); + let rv_ref = -0.5 * (2.0 * y).sin() - nu * y.sin(); + max_err = max_err + .max((rud.as_slice()[i * NC + j] - ru_ref).abs()) + .max((rvd.as_slice()[i * NC + j] - rv_ref).abs()); + } + } + assert!( + max_err < 3e-3, + "rate_pair convection+diffusion vs the analytic reference: {max_err}" + ); +} + #[test] fn run_rejects_wrong_shape_fields() { let dx = TAU / N as f64; diff --git a/deep_causality_cfd/tests/theories/incompressible_ns_verification_tests.rs b/deep_causality_cfd/tests/theories/incompressible_ns_verification_tests.rs index 3c65ed1e0..fd8d1678d 100644 --- a/deep_causality_cfd/tests/theories/incompressible_ns_verification_tests.rs +++ b/deep_causality_cfd/tests/theories/incompressible_ns_verification_tests.rs @@ -17,8 +17,9 @@ //! (1937), pp. 499–521. //! - S. B. Pope, "Turbulent Flows" (Cambridge UP, 2000), §6.1.5. //! - Brachet et al., "Small-scale structure of the Taylor–Green vortex", -//! J. Fluid Mech. 130 (1983), pp. 411–452. [Standard reference for the -//! 2D form of the velocity / pressure fields used below.] +//! J. Fluid Mech. 130 (1983), pp. 411–452. [Background on the +//! three-dimensional Taylor–Green vortex. It is not the source of the +//! two-dimensional decaying fields used below.] use deep_causality_cfd::incompressible_ns_rhs; use deep_causality_physics::{ @@ -28,10 +29,10 @@ use deep_causality_physics::{ // ============================================================================= // Verification: 2D Taylor-Green vortex at t = 0 // -// Source: Taylor (1923), Phil. Mag. 46(274); Taylor & Green (1937), -// Proc. Roy. Soc. A 158, pp. 499–521. -// Closed-form fields as quoted in Pope (2000) §6.1.5 and -// Brachet et al. (1983): +// Source: Taylor (1923), Phil. Mag. 46(274), the decaying two-dimensional +// vortex; Taylor & Green (1937), Proc. Roy. Soc. A 158, pp. 499–521. +// Closed-form two-dimensional fields as quoted in Pope (2000) +// §6.1.5: // // u(x,y,t) = cos(x) sin(y) · exp(−2 ν t) // v(x,y,t) = − sin(x) cos(y) · exp(−2 ν t) diff --git a/deep_causality_cfd/tests/types/flow/corridor/navigation_tests.rs b/deep_causality_cfd/tests/types/flow/corridor/navigation_tests.rs index d1a3a9e57..2d9053acb 100644 --- a/deep_causality_cfd/tests/types/flow/corridor/navigation_tests.rs +++ b/deep_causality_cfd/tests/types/flow/corridor/navigation_tests.rs @@ -8,8 +8,8 @@ use super::{ctx, field}; use deep_causality_cfd::{ - GoverningModel, InsErrorState, MachRegime, NavFilter, PhysicsStage, ReentryNavEngine, - RegimeClass, ThrustState, TrajectoryNav, + GoverningModel, InsErrorState, MachRegime, NavFilter, PhysicsStage, Quaternion, + ReentryNavEngine, RegimeClass, ThrustState, TrajectoryNav, }; use deep_causality_haft::LogSize; use deep_causality_physics::EARTH_GM; @@ -17,7 +17,7 @@ use deep_causality_physics::EARTH_GM; fn nav_engine() -> ReentryNavEngine { // The bound LEO-ish state the nav module's own tests use. let (r0, v0) = ([7.0e6, 1.0e6, 2.0e6], [-1.0e3, 6.5e3, 3.0e3]); - let filter = NavFilter::new(InsErrorState::::zero(), [1.0; 17]); + let filter = NavFilter::new(InsErrorState::::zero(), [1.0; 17]).unwrap(); ReentryNavEngine::new(r0, v0, EARTH_GM, filter) } @@ -207,7 +207,7 @@ fn with_imu_senses_the_specific_force_through_the_bias() { #[test] fn nav_predict_failure_short_circuits_but_threads_the_engine_back() { // An unbound (hyperbolic) state cannot re-lift onto the KS manifold: predict fails. - let filter = NavFilter::new(InsErrorState::::zero(), [1.0; 17]); + let filter = NavFilter::new(InsErrorState::::zero(), [1.0; 17]).unwrap(); let unbound = ReentryNavEngine::new([7.0e6, 0.0, 0.0], [1.0e5, 0.0, 0.0], EARTH_GM, filter); let mut f = field(); @@ -218,4 +218,54 @@ fn nav_predict_failure_short_circuits_but_threads_the_engine_back() { f.nav().is_some(), "the engine threads back so a pause captures a whole state" ); + // The engine that threads back is the *unadvanced* one. The stage senses a body rate through the + // IMU before the predict, so a partially applied step would leave the nominal attitude rotated + // while nothing else moved, and the retry would integrate the same sample twice. + let engine = f.nav().expect("nav"); + assert_eq!( + engine.elapsed_time(), + 0.0, + "no time elapsed on a failed step" + ); + assert_eq!( + engine.attitude(), + Quaternion::::identity(), + "no attitude was integrated by the failed step" + ); +} + +#[test] +fn a_refused_gnss_fold_does_not_discard_the_unread_optical_fix() { + // A garbage GNSS broadcast (a NaN axis) is refused by the filter, so the step short-circuits. The + // optical fix published on the same step was never read — it must still be on the field for the + // retry, not consumed up front and dropped with the error. Losing it costs the run the one + // measurement that rides through the plasma, and it is lost silently: the caller sees the GNSS + // error, not the optical fix that went with it. + let mut f = field(); + f.set_nav(nav_engine()); + let optical = vec![7.0e6, 1.0e6, 2.0e6]; + f.set_scalar("gnss_fix", vec![f64::NAN, 1.0e6, 2.0e6]); + f.set_scalar("optical_fix", optical.clone()); + + let result = nav_stage().apply(&ctx(1), &mut f); + assert!(result.is_err(), "a NaN GNSS axis is refused"); + assert_eq!( + f.scalar("optical_fix").map(<[f64]>::to_vec), + Some(optical), + "the unread optical fix survives the GNSS refusal" + ); + + // And it is still a usable measurement, not just a leftover: the next step folds it. + nav_stage() + .apply(&ctx(2), &mut f) + .expect("the retry applies"); + assert_eq!( + f.scalar("nav_mode").unwrap()[0], + 1.0, + "the surviving optical fix folds on the retry" + ); + assert!( + f.scalar("optical_fix").is_none(), + "and is consumed once folded" + ); } diff --git a/deep_causality_cfd/tests/types/flow/finite_rate_ionization_tests.rs b/deep_causality_cfd/tests/types/flow/finite_rate_ionization_tests.rs index 1f0dac311..69aae5d68 100644 --- a/deep_causality_cfd/tests/types/flow/finite_rate_ionization_tests.rs +++ b/deep_causality_cfd/tests/types/flow/finite_rate_ionization_tests.rs @@ -4,12 +4,14 @@ */ //! The finite-rate ionization network stage: two-way relaxation toward the -//! uncalibrated network fixed point, the recombination exit mechanism, the -//! frozen limit, per-cell evolved inputs, and the renewal toggle. +//! uncalibrated network fixed point, the measured gap between that fixed +//! point and Saha equilibrium, the recombination exit mechanism, the frozen +//! limit, per-cell evolved inputs, and the renewal toggle. use deep_causality_cfd::{ Ambient, CoupledField, FiniteRateIonizationStage, PhysicsStage, StepContext, }; +use deep_causality_physics::{Temperature, park2t_ionization_surrogate_kernel}; fn ctx(step: usize) -> StepContext<'static, 2, f64> { StepContext::<2, f64>::qtt(2.0e-5, step) @@ -58,6 +60,51 @@ fn the_fixed_point_is_approached_from_both_sides() { ); } +#[test] +fn the_fixed_point_sits_a_stated_gap_below_saha_equilibrium() { + // Where the fixed point of the previous test actually lands, measured + // against the Saha equation. The reference is + // `park2t_ionization_surrogate_kernel`, the same full-equilibrium target + // `FittedNormalShock::stagnation_blackout` uses. + // + // Saha is the pathway-independent equilibrium of every ionization + // channel. This stage carries three (associative ionization, its + // dissociative-recombination reverse, thresholded electron impact) on a + // lagged atom pool and calibrates against none of them, so its fixed + // point is a partial equilibrium that sits below Saha. The band pinned + // here is the size of that gap, not agreement. + let t = 8_000.0_f64; + let stage = FiniteRateIonizationStage::new(N_PEAK); + let mut f = field_at(t, t); + f.set_scalar("alpha", vec![0.0_f64]); + // The fixed point is reached well inside this ladder: alpha is unchanged + // to every printed digit between 5_000 and 80_000 steps of 2e-5 s. + for s in 0..5_000 { + stage.apply(&ctx(s + 1), &mut f).expect("applies"); + } + let alpha_network = f.scalar("alpha").unwrap()[0]; + let alpha_saha = park2t_ionization_surrogate_kernel(Temperature::new(t).unwrap(), N_PEAK) + .unwrap() + .value(); + + assert!( + alpha_network < alpha_saha, + "a three-channel network cannot reach full equilibrium: {alpha_network:e} vs {alpha_saha:e}" + ); + // Measured at T_tr = T_ve = 8000 K, n_tot = 2.645e22 m^-3: the network + // fixed point is 2.08e-3 against Saha's 3.52e-1, so 0.59 % of full + // equilibrium. The band is one decade either side of that ratio, which + // also covers the sweep 6000-10000 K and 1e21-1e24 m^-3 (0.24 % to + // 2.7 %). It catches a rate-constant or unit regression that moves the + // fixed point by an order of magnitude; it does not certify the tier. + let ratio = alpha_network / alpha_saha; + assert!( + (1.0e-3..1.0e-1).contains(&ratio), + "the uncalibrated gap to Saha left its stated band: alpha {alpha_network:e}, \ + Saha {alpha_saha:e}, ratio {ratio:e}" + ); +} + #[test] fn recombination_decays_a_hot_fraction_in_a_cold_cell() { // The exit mechanism: a carried electron population entering cold dense diff --git a/deep_causality_cfd/tests/types/flow/gates_tests.rs b/deep_causality_cfd/tests/types/flow/gates_tests.rs deleted file mode 100644 index 5ba1e2f26..000000000 --- a/deep_causality_cfd/tests/types/flow/gates_tests.rs +++ /dev/null @@ -1,32 +0,0 @@ -/* - * SPDX-License-Identifier: MIT - * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved. - */ - -//! The gate builder: verdicts. The printed line format is exercised by every example's -//! recorded output; these tests pin the boolean contract. - -use deep_causality_cfd::Gates; - -#[test] -fn all_passing_gates_finish_true() { - let ok = Gates::new("unit") - .gate("first", true, "detail a".to_string()) - .gate("second", true, "detail b".to_string()) - .finish(); - assert!(ok); -} - -#[test] -fn one_failing_gate_finishes_false() { - let ok = Gates::new("unit") - .gate("first", true, "detail".to_string()) - .gate("broken", false, "detail".to_string()) - .finish(); - assert!(!ok); -} - -#[test] -fn an_empty_gate_set_passes_vacuously() { - assert!(Gates::new("unit").finish()); -} diff --git a/deep_causality_cfd/tests/types/flow/mod.rs b/deep_causality_cfd/tests/types/flow/mod.rs index 54b8342b6..7133ca000 100644 --- a/deep_causality_cfd/tests/types/flow/mod.rs +++ b/deep_causality_cfd/tests/types/flow/mod.rs @@ -39,8 +39,6 @@ mod flight_sensors_tests; #[cfg(test)] pub mod frequency_tests; #[cfg(test)] -pub mod gates_tests; -#[cfg(test)] pub mod inheritance_guard_tests; // IO operations are unsupported under MIRI. #[cfg(test)] diff --git a/deep_causality_cfd/tests/types/flow/state_snapshot_tests.rs b/deep_causality_cfd/tests/types/flow/state_snapshot_tests.rs index 6f3929275..6e201d0d7 100644 --- a/deep_causality_cfd/tests/types/flow/state_snapshot_tests.rs +++ b/deep_causality_cfd/tests/types/flow/state_snapshot_tests.rs @@ -8,8 +8,11 @@ use deep_causality_cfd::{ Ambient, CoupledField, FiniteRateIonizationStage, InsErrorState, NavFilter, PhysicsStage, - ReentryNavEngine, StepContext, load_resume_state, pack_resume, pack_tt_fields, quantize_2d, - save_resume_state, unpack_resume, unpack_tt_fields, + Quaternion, ReentryNavEngine, StepContext, load_resume_state, pack_resume, pack_tt_fields, + quantize_2d, save_resume_state, unpack_resume, unpack_tt_fields, +}; +use deep_causality_file::{ + BitCodec, SnapshotPackage, SnapshotSection, SnapshotTier, fingerprint64, }; use deep_causality_haft::LogAddEntry; use deep_causality_tensor::{CausalTensor, Truncation}; @@ -24,13 +27,27 @@ fn populated_field() -> CoupledField { field.set_aero_force([0.1, -0.2, 0.3]); field.set_control_action(0.25); field.set_throttle_action(0.6); - let filter = NavFilter::new(InsErrorState::::zero(), [2_500.0; 17]); - field.set_nav(ReentryNavEngine::new( + let filter = NavFilter::new(InsErrorState::::zero(), [2_500.0; 17]).unwrap(); + let mut engine = ReentryNavEngine::new( [6.45e6, 0.0, 0.0], [-1_300.0, 7_860.0, 0.0], 3.986e14, filter, - )); + ); + // Evolve the engine to a NON-identity attitude and nonzero clock/elapsed before snapshotting, so the + // round-trip test bites on a pack/unpack ordering regression of the four attitude floats (an identity + // quaternion (1,0,0,0) and zero clock would mask a w/x/y/z or tau/elapsed swap). + let omega = [0.03, -0.02, 0.05]; + for _ in 0..8 { + engine + .predict(0.5, [0.1, -0.2, 0.3], omega, [1.0e-6; 17]) + .expect("predict"); + } + let p = engine.position(); + engine + .correct_position([p[0] + 3.0, p[1] - 1.0, p[2] + 2.0], 4.0) + .expect("fix"); + field.set_nav(engine); field.log_mut().add_entry("regime -> slip (test)"); field.log_mut().add_entry("nav: aided (test)"); field @@ -67,6 +84,8 @@ fn a_resume_package_round_trips_through_disk_bit_exact() { // state would then fail here rather than pass silently). assert_eq!(nav_a.carried_clock_offset(), nav_b.carried_clock_offset()); assert_eq!(nav_a.elapsed_time(), nav_b.elapsed_time()); + // The nominal attitude round-trips too (serialized by `pack_resume`, restored by `restore`). + assert_eq!(nav_a.attitude(), nav_b.attitude()); assert_eq!( nav_a.filter().state().to_array(), nav_b.filter().state().to_array() @@ -136,6 +155,118 @@ fn the_tiers_do_not_cross() { ); } +// ── The "nav" section's layout version ──────────────────────────────────────────────────────────── + +/// The 17 filter-state values a hand-built section carries: distinct and non-zero, so a reader that +/// mistakes four attitude floats for the head of the state vector shifts every one of them. +fn probe_state() -> [f64; 17] { + core::array::from_fn(|i| 1.0 + (i as f64) * 0.25) +} + +/// A resume package whose `"nav"` section is written at `version` in the **pre-attitude v1 layout**: +/// `position(3), velocity(3), gm, tau, elapsed, state(17), cov(17×17)`, with no quaternion. This is +/// what a build older than the attitude work wrote. +fn nav_v1_package(version: u8) -> SnapshotPackage { + let mut nav = vec![1u8]; // presence flag + for v in [6.45e6_f64, 1.0e5, -2.0e5] { + v.write_bits(&mut nav); + } + for v in [-1_300.0_f64, 7_860.0, 12.5] { + v.write_bits(&mut nav); + } + 3.986e14_f64.write_bits(&mut nav); // gm + (-4.5e-9_f64).write_bits(&mut nav); // carried clock offset + 17.5_f64.write_bits(&mut nav); // elapsed + for v in probe_state() { + v.write_bits(&mut nav); + } + for i in 0..17 { + for j in 0..17 { + let entry = if i == j { 2_500.0_f64 } else { 0.0 }; + entry.write_bits(&mut nav); + } + } + + let mut ambient = Vec::new(); + 0.01_f64.write_bits(&mut ambient); + 0.0_f64.write_bits(&mut ambient); + let mut scalars = Vec::new(); + scalars.extend_from_slice(&0u32.to_le_bytes()); + let mut log = Vec::new(); + log.extend_from_slice(&0u32.to_le_bytes()); + let mut step = Vec::new(); + step.extend_from_slice(&23u64.to_le_bytes()); + + SnapshotPackage::new( + f64::SCALAR_TAG, + SnapshotTier::Resume, + fingerprint64(WORLD), + vec![ + SnapshotSection::new("scalars", 1, scalars), + SnapshotSection::new("channels", 1, vec![0u8, 0, 0]), + SnapshotSection::new("ambient", 1, ambient), + SnapshotSection::new("nav", version, nav), + SnapshotSection::new("log", 1, log), + SnapshotSection::new("step", 1, step), + ], + ) +} + +#[test] +fn a_v1_nav_section_resumes_with_the_identity_attitude_and_unshifted_filter_data() { + // The attitude work added four floats to the "nav" section. Read without the version byte, a v1 + // package feeds the first four filter-state entries to the quaternion and shifts everything after + // them — the whole covariance lands one row late. The version tells the reader which layout it is + // holding: no attitude floats to read, so the nominal resumes at identity, which is exactly the + // `C ≈ I` attitude the writing build modelled, and every other value lands where it belongs. + let (field, step) = unpack_resume::(&nav_v1_package(1)).expect("a v1 nav section resumes"); + let nav = field.nav().expect("nav restored"); + + assert_eq!(step, 23); + assert_eq!(nav.attitude(), Quaternion::::identity()); + assert_eq!(nav.position(), [6.45e6, 1.0e5, -2.0e5]); + assert_eq!(nav.velocity(), [-1_300.0, 7_860.0, 12.5]); + assert_eq!(nav.gm(), 3.986e14); + assert_eq!(nav.carried_clock_offset(), -4.5e-9); + assert_eq!(nav.elapsed_time(), 17.5); + assert_eq!( + nav.filter().state().to_array(), + probe_state(), + "the filter state is read unshifted, not four values late" + ); + assert_eq!(nav.filter().covariance()[0][0], 2_500.0); + assert_eq!(nav.filter().covariance()[16][16], 2_500.0); +} + +#[test] +fn a_nav_section_from_an_unknown_future_layout_is_refused() { + // The version byte has to refuse forward as well as decode backward: a layout this build does not + // know is a hard error naming the section, never a best-effort parse of whatever bytes are there. + let err = + unpack_resume::(&nav_v1_package(7)).expect_err("an unknown nav layout is refused"); + let text = err.to_string(); + assert!(text.contains("nav"), "{text}"); + assert!(text.contains("unsupported layout version"), "{text}"); +} + +#[test] +fn a_packed_nav_section_declares_the_attitude_layout_version() { + // What this build writes is v2 — the layout that carries the four attitude floats. A build that + // predates them rejects v2 on the version check instead of misreading the quaternion as filter + // state, which is the half of the compatibility problem an unversioned bump cannot fix in the past. + let package = pack_resume(&populated_field(), 5, WORLD).expect("packs"); + let nav = package.section("nav").expect("nav section"); + assert_eq!(nav.version(), 2, "the attitude-carrying nav layout is v2"); + // The sections that did not change keep their own version: the bump is per section, not global. + for name in ["scalars", "channels", "ambient", "log", "step"] { + assert_eq!( + package.section(name).expect(name).version(), + 1, + "section '{name}' is unchanged at v1" + ); + } +} + #[test] fn tt_fields_round_trip_with_bit_exact_cores() { let trunc = Truncation::::by_tol(1e-12).expect("truncation"); diff --git a/deep_causality_cfd/verification/README.md b/deep_causality_cfd/verification/README.md index 3aa08fa2b..1af947650 100644 --- a/deep_causality_cfd/verification/README.md +++ b/deep_causality_cfd/verification/README.md @@ -16,12 +16,13 @@ Every example **self-verifies** and **exits with a nonzero status** the moment i reference check fails — so the suite is usable as a gate, not just a demo. What each one checks, and how it fails, is in the per-example sections below. -**CI runs this suite.** `.github/workflows/cfd_verification.yml` executes the nine fast harnesses on -every pull request and the four slow ones nightly, failing the build on a non-zero exit. A -completeness check asserts that every `[[example]]` declared under `verification/` in `Cargo.toml` -appears in one of the two lists, so a newly added harness cannot silently never run. Until this -workflow existed, `cargo test` *compiled* these binaries and never ran them, which meant every -quantitative claim on this page was unenforced. +**CI runs this suite.** `.github/workflows/cfd_verification.yml` executes the ten `FAST_HARNESSES` on +every pull request and the three `SLOW_HARNESSES` nightly, failing the build on a non-zero exit. A +fourteenth, `qtt_cylinder_verification`, sits in `OFFLINE_HARNESSES` and no job runs it. A completeness +check asserts that every `[[example]]` declared under `verification/` in `Cargo.toml` appears in one of +those three lists, so a newly added harness cannot silently never run. Until this workflow existed, +`cargo test` *compiled* these binaries and never ran them, which meant every quantitative claim on this +page was unenforced. ## Convention: every gate declares its evidence class @@ -87,16 +88,16 @@ difference. Measured at `f64` on an Apple M3 Max (release). | `mms_taylor_green_verification` | RHS residual; amplitude error | 1.1e-16; 6.7e-16 | 0 (analytic) | ≈ machine-ε (~0 %) | default | ~1 s | | `dec_graded_mms_verification` | observed order (finest pair) | 1.98–2.00 | 2.00 | ≤ 0.02 (< 1 %) | 8²–64² | ~1 s | | `dec_taylor_green_re1600_verification` | peak dissipation ε; energy invariant | 0.0025 (E\*/E0 0.893, monotone) | ≈ 0.0124 (DNS) | **−80 %** (16³ under-resolved); invariant PASS | 16³, t\*=10 | <1 s | -| `dec_lid_cavity_re1000_verification` | primary vortex (x, y); centerline RMSE | (0.5312, 0.5625); RMSE 0.0617 | Ghia (0.5313, 0.5625) | Δ ≈ (1e-4, 0) — **primary vortex matches to 1e-4 in x, exactly in y** | 65², t=100 (default) | ~20 min | +| `dec_lid_cavity_re1000_verification` | primary vortex (x, y); centerline RMSE | (0.5312, 0.5625); RMSE 0.0617 | Ghia (0.5313, 0.5625) | Δ ≈ (1e-4, 0) — **primary vortex matches to 1e-4 in x, exactly in y** | 65², t=100 (the no-argument default, not the `trend` rung) | ~20 min | | `dec_cylinder_wake_verification` | max divergence residual; log count | 3.3e-15; 80 | 0; 80 (= 2×40) | ≈ machine-ε; exact | 2000 steps, 93×32 | ~155 s | -| `dec_cylinder_verification` | Strouhal St; drag C_d | 0.171; 1.345 | 0.164; 1.24–1.33 | **+4.3 %**; **+1.1 %** (over band top) | 96², Re=100, 1500 steps | ~510 s | +| `dec_cylinder_verification` | Strouhal St; drag C_d | 0.171; 1.345 | 0.164; 1.32–1.36 | **+4.3 %**; **−1.1 %** (inside band; friction share ~13 % vs the reference's ~25 %) | 96², Re=100, 1500 steps | ~510 s | | `qtt_taylor_green_verification` | TG decay error (32²); observed order; convection | 5.3e-5; 2.02–2.18; 3.2e-3 | 0 (analytic); 2.00; 0 (analytic) | converges 2nd-order; **+9 %** order; conv ≈ 0.6 % | 8²–32², t=0.2 | <1 s | | `qtt_cylinder_verification` ⚠ *(offline)* | drag convergence vs bond; no-slip interior; **η and mask-smoothing ladders** | env resolved at `L = 8` (η from 2.5 % wall-error target); acceptance run pending offline | — | penalization layer now resolved (`√(ην) ≈ dx`); gate red on **solver cost**, not parameters | 256², bond [24, 48] + 2 ladders | **~4-9 h (offline)** | -| `qtt_park2t_blackout` | 6 LER gates (stability, exactness, RH band, lag+Saha, path-dependence, n_e>0) | all 6 PASS; ω_p 5.6e12 ≫ band | all gates pass | Gap-2 Tier-A verified (cross-refs, Tier-A disclaimers) | 32², 40 steps | ~1 s | -| `qtt_sod` | Sod shock tube vs exact Riemann (L1 of ρ/u/p) | 0.018 / 0.027 / 0.015 | < 0.03 (1st-order Rusanov) | p\*=0.303 (exact), fan+contact+shock correct | 512 cells, t=0.2 | ~1 s | -| `qtt_ramc_stagline` | peak electron density `n_e` / blackout onset | 5.31e17 (Park-2T controller); 2.25e19 (uncalibrated network) | ~1e19 (RAM-C II, order-of-mag) | **−1.27 dec** Park-2T (reported, not re-admitted); **+0.35 dec** network (earned band ±0.70) | stagnation line | ~1 s | -| `qtt_blunt_body_2d` | rank lever: bow-shock χ, fitted vs Cartesian capture | fitted 3→5; capture 16→61 | structural (no √side growth, fitted) | fitted bounded; capture ~√side | 2^5–2^7 | ~2 s | -| `qtt_reentry_3d` | rank lever: 3-D forebody χ (wake out-of-scope) | fitted 2→4; Cartesian 10→59; wake 41 | structural (`qtt_rank_3d` bound) | fitted plateau; capture grows | 2^3–2^5 | ~3 s | +| `qtt_park2t_blackout` | 6 LER coupling gates (stability, kernel vs an independent sub-stepped integration, RH band, lag + rate grounding, path-dependence, n_e>0); peak `n_e` reported beside them | all 6 PASS; peak `n_e` 1.000e22 m⁻³ (α saturated at 1); ω_p 5.6e12 ≫ band | RAM-C II ≈ 1e19 m⁻³ (order-of-magnitude flight anchor) | **+3.0 dec** — Saha saturates at α = 1 at the perfect-gas `γ = 1.4` post-shock temperature. **Internal-invariant scope**: the six gates check the LER coupling, not agreement with RAM-C (see the Tier-A disclaimers) | 32², 40 steps, γ = 1.4 | ~4 s | +| `qtt_sod` | Sod shock tube vs exact Riemann (L1 of ρ/u/p) | 0.018 / 0.027 / 0.015 | < 0.03 (1st-order global Lax–Friedrichs: Rusanov with a global wave-speed estimate) | p\*=0.303 (exact), fan+contact+shock correct | 512 cells, t=0.2 | ~1 s | +| `qtt_ramc_stagline` | peak electron density `n_e` / blackout onset | 5.31e17 (Park-2T controller); 2.25e19 (uncalibrated network) | ~1e19 (RAM-C II, order-of-mag) | **−1.27 dec** Park-2T (reported, not re-admitted); **+0.35 dec** network (earned band ±0.70) | stagnation line, γ = 1.1 | <0.1 s | +| `qtt_blunt_body_2d` | rank lever: bow-shock χ, fitted vs Cartesian capture | fitted 3→5; capture 16→61 | structural (fitted χ bounded, ≤ +1 per refinement) | fitted flat 3→5; capture ≈ side/2 (16, 32, 61), not ~√side | 2^5–2^7 | <1 s | +| `qtt_reentry_3d` | rank lever: 3-D forebody χ (wake out-of-scope) | fitted 2→4; Cartesian 10→59; wake 41 | structural (`qtt_rank_3d` bound) | fitted plateau; capture grows | 2^3–2^5 | <1 s | > ⚠ **`qtt_cylinder_verification` is known-failing and runs nightly, not per-PR.** Its two parameter > ladders gate and both report `NOT CONVERGING`. This is a correct measurement, not a regression: @@ -118,26 +119,44 @@ difference. Measured at `f64` on an Apple M3 Max (release). > as a property of this configuration's blur width, not of a cylinder. > > Resolution (choose η from a wall-error target; refine to resolve the layer) is a solver and cost -> change tracked as Phase 2 item 10 of [`AUDIT-REPORT.md`](../../openspec/notes/cfd_audit/AUDIT-REPORT.md). +> change tracked as Phase 2 item 10 of [`AUDIT-REPORT.md`](../../openspec/audits/cfd_audit/AUDIT-REPORT.md). > The gate is kept rather than silenced: widening the bound until it passes is exactly the > back-fitting this suite is being cleaned of. -**Validation scope labels.** The QTT compressible gates verify at three distinct tiers. Read each gate for -what it actually proves. **Analytic** (`qtt_sod` vs the exact Riemann solution) is rigorous, the only -quantitative-accuracy gate. **Flight-data, order-of-magnitude** is the `qtt_ramc_stagline` network +**Validation scope labels.** The QTT reacting/compressible gates verify at four distinct tiers. Read each +gate for what it actually proves. **Analytic** (`qtt_sod` vs the exact Riemann solution) is rigorous, the +only quantitative-accuracy gate. **Flight-data, order-of-magnitude** is the `qtt_ramc_stagline` network prediction: its renewal arm lands +0.35 dec of the RAM-C II peak `n_e`, inside the ±0.70 chemistry-spread band. The Park-2T closed-form controller in the same harness lands −1.27 dec below the anchor after the `fix-ramc-vibrational-relaxation-pair` reduced-mass correction; that offset is **reported**, not presented as agreement (the former +0.0-dec headline was an artifact of an invalid `μ = 7.0`). **Structural / rank-lever** is `qtt_blunt_body_2d` and `qtt_reentry_3d`: the body-fitted coordinate *bounds* χ where the -Cartesian capture grows ~√side, so these gate **rank**, not physical accuracy. The **dynamic marched** rank +Cartesian capture grows with resolution, so these gate **rank**, not physical accuracy. Neither harness +measures a √side law. `qtt_blunt_body_2d`'s capture grows roughly linearly, χ ≈ side/2 (16, 32, 61 at +side 32, 64, 128; √side would give ≈ 6, 8, 11), and `qtt_reentry_3d`'s grows 10 → 59 over side 8 → 32. +The √side law is measured in `studies/qtt_rank_3d`: χ ~ side^0.53 over 16³ → 128³. The **dynamic marched** rank growth (flux-through-front) and the **wake** are *reported, never asserted*; bounding the marched χ needs re-pinning and an exact-RH interface (design D9), the named open remainder. +**Internal-invariant only** is the fourth tier, and `qtt_park2t_blackout` is its sole member. Its six gates +test the LER coupling itself: relaxation stability at `τ = Δt/1000`, the closed-form kernel against an +independently sub-stepped integration of `dx/dt = (x_eq − x)/τ`, a wide `10⁴–10⁵ K` Rankine–Hugoniot band, +that the ionization lag is real and `τ_ion` varies with `T`, counterfactual path-dependence, and `n_e > 0`. +Not one of them compares a marched quantity against flight data. The harness runs on the incompressible +rollout at perfect-gas `γ = 1.4`, the Saha surrogate saturates at `α = 1`, and its peak `n_e = 1.000e22 m⁻³` +therefore sits **+3.0 decades** above the RAM-C II anchor. That offset is a statement of scope, not a +result. `qtt_ramc_stagline` is the physical-accuracy arm: it runs the effective `γ = 1.1`, carries the exact +Rankine–Hugoniot post-shock state instead of a reconstruction, and gates against the anchor. The two +harnesses therefore disagree on `γ` (1.4 against 1.1) and their `n_e` figures are not comparable. Only the +`γ = 1.1` choice is justified at its definition site, as an effective-γ closure for strongly dissociated +air; the `γ = 1.4` in `qtt_park2t_blackout/config.rs` carries no such note, and raising it to 1.1 would be +a behaviour change, not a documentation one. + Reference papers per example are in the sections below and the [References](#references). The cavity -centerline RMSE (0.137) is itself a deviation-from-Ghia measure (no single reference value), so its -divergence is shown via the primary-vortex offset. `mms` and the `wake` divergence residual verify -against the *ideal* (analytic 0 / exact incompressibility), so their reference is 0. +centerline RMSE (**0.0617**, the 65²/t=100 default the row reports) is itself a deviation-from-Ghia +measure (no single reference value), so its divergence is shown via the primary-vortex offset. `mms` and +the `wake` divergence residual verify against the *ideal* (analytic 0 / exact incompressibility), so their +reference is 0. --- @@ -210,17 +229,23 @@ nonzero** unless the RMSE both clears a pinned bound and strictly decreases unde **Self-check.** `cargo run … --example dec_lid_cavity_re1000_verification trend` (exit nonzero on a broken refinement trend). The default single run reports the RMSE and vortex table. -**Measured (f64, default 65² grid, t=100, ~20 min — the configuration `baseline.txt` records).** -Centerline **RMSE 0.0617** vs Ghia; primary vortex at **(0.5312, 0.5625)** vs Ghia **(0.5313, 0.5625)** -— matching to **1e-4 in x and exactly in y**; bottom-right eddy at (0.8594, 0.1094), exactly Ghia's -value; bottom-left at (0.0781, 0.0781) vs (0.0859, 0.0781), one cell out in x. The reporting -**129²/t≥150** (hours, Ghia's own grid) tightens further. +**Measured (f64, default 65² grid, t=100, ~20 min — the configuration the summary row reports and the +first half of `baseline.txt` records; invoke it with no argument).** Centerline **RMSE 0.0617** vs Ghia; +primary vortex at **(0.5312, 0.5625)** vs Ghia **(0.5313, 0.5625)** — matching to **1e-4 in x and exactly +in y**; bottom-right eddy at (0.8594, 0.1094), exactly Ghia's value; bottom-left at (0.0781, 0.0781) vs +(0.0859, 0.0781), one cell out in x. The reporting **129²/t≥150** (hours, Ghia's own grid) tightens +further. + +**Measured (gated `trend` mode, `… --example dec_lid_cavity_re1000_verification trend`, ~1 min — the +second half of `baseline.txt`, under its labelled separator).** 17²/t=60 RMSE **0.2369**, 33²/t=60 RMSE +**0.1309**; all three tripwires PASS (pinned bounds 0.32 and 0.20, strict-decrease margin 0.04). These are +refinement-trend rungs at a coarser grid and a shorter horizon than the default, so they are not +comparable to the 0.0617 above and are not this harness's headline result. -*This row previously reported the coarse `33²/t=40` trend rung (RMSE 0.137, vortex (0.563, 0.594), a -"≈ 6 % of span" offset) while every other row reported its default — an inconsistent basis that -**understated** the solver by more than a factor of two on the RMSE. Those coarse numbers are still -what the `trend` subcommand's pinned bounds are set against; they are a refinement-trend rung, not -this harness's headline result.* +*This row previously reported a coarse `33²` rung (RMSE 0.137, vortex (0.563, 0.594)) while every other +row reported its default — an inconsistent basis that **understated** the solver by more than a factor of +two on the RMSE. It also described that vortex offset as "≈ 6 % of span"; the actual offset is +**3.1 % per axis**, which is one cell at 33² (Δx = Δy ≈ 0.0317 against a cell width of 1/32 = 0.03125).* **Reference.** Ghia, Ghia & Shin (1982). @@ -238,9 +263,11 @@ constrained Leray projector keeps the divergence residual at machine precision break. **Measured (f64, 2000 steps, 93×32, ~155 s).** Max divergence **3.33e-15** (machine precision); log -**80 = 2 × 40** dropouts — both **PASS**. Strouhal is reported but disclaimed (confined/periodic, not -the isolated-cylinder reference — see `dec_cylinder_verification` for that). The full wake-probe series -is written to `cylinder_wake.csv` via the IO effect. +**80 = 2 × 40** dropouts — both **PASS**. Strouhal is attempted and reports **no clear shedding**: the +confined periodic-x channel at 25 % blockage (`config::BLOCKAGE = 0.25`) damps the von-Kármán street at +this configuration, so the probe settles to a steady `v ≈ 2.70e-2` instead of oscillating. The estimate +is printed, never gated; `dec_cylinder_verification` is the harness that sheds. The full wake-probe +series is written to `cylinder_wake.csv` via the IO effect. **Reference.** None quantitative (internal-consistency exercise). @@ -250,9 +277,14 @@ is written to `cylinder_wake.csv` via the IO effect. **Verifies.** Flow past an *isolated* circular cylinder (Inflow / Outflow / far-field SlipWall + the immersed cut cylinder) against published laminar benchmarks: the shedding **Strouhal** `St = f·D/U` -(Williamson) and the cycle-mean **drag coefficient** `C_d` with its pressure/friction split -(Dröge–Verstappen; Lehmkuhl lineage). Case parameters (`RE_D`, `CELLS_PER_D`, `LX_D`, `LY_D`, `STEPS`, -`CFL`) are environment-overridable for the Reynolds ladder and grid refinement. +(Williamson) and the cycle-mean **drag coefficient** `C_d` with its pressure/friction split. The `C_d` +reference is the 2-D unconfined laminar consensus band **1.32–1.36** (Qu et al. 2013, Posdziech & +Grundmann 2007, Williamson, as compiled in arXiv:2303.09262); `main.rs` carries it as +`CD_REFERENCE_BAND`. Dröge & Verstappen (2005) is the secondary reference, for the split only: +their cut-cell `C_d = 1.24 = 0.93` pressure `+ 0.31` friction, i.e. friction ≈ 25 %. That 1.24 is a +single low-side cut-cell datum, no longer the band's lower edge. Case parameters (`RE_D`, +`CELLS_PER_D`, `LX_D`, `LY_D`, `STEPS`, `CFL`) are environment-overridable for the Reynolds ladder and +grid refinement. **Self-check.** Four gates, exit nonzero on break: shedding was detected at all, the developed window produced a cycle-mean drag, and `St` and `C_d` each sit inside a pinned band. A solver error now @@ -260,21 +292,26 @@ produced a cycle-mean drag, and `St` and `C_d` each sit inside a pinned band. A harness previously contained no assertion and no `process::exit` and returned 0 in that case, contradicting the suite convention above. -All four bounds are `[tripwire]`, not `[reference]`, and deliberately so: at the affordable 8 cells/D -default the measured values sit **outside** the published bands (below), so gating against Williamson -and Dröge–Verstappen directly would fail a correctly-working solver. The published values print beside +All four bounds are `[tripwire]`, not `[reference]`, and deliberately so. At the affordable 8 cells/D +default `St` sits **outside** the published value, and `C_d` sits **inside** the published band for the +wrong reason: friction is ≈ 13 % of `C_d` against the reference's ≈ 25 %, so the total agrees by +cancellation. Gating against the published values directly would fail a correctly-working solver on +`St` and would reward that cancellation on `C_d`. The published values print beside each measurement with the offset, so the gap stays visible and a `[PASS]` is never read as agreement. The `St`/`C_d` bands describe `Re = 100` only; a Reynolds-ladder run prints `[SKIP]` for them rather than passing against a band that does not describe it. **Measured (f64, default: Re=100, 96² @ 8 cells/D, 12×12 D domain, 1500 steps, ~510 s ≈ 8.5 min).** - **St ≈ 0.1710** vs Williamson Re=100 **≈ 0.164** → **+4.3 %**. -- **C_d ≈ 1.345** vs reference band **1.24–1.33** → **+1.1 %** above the top of the band (pressure - 1.173 + friction 0.172; `C_l ≈ −0.007`, C_d swing [1.338, 1.353]). -- Friction fraction ≈ 13 % vs the reference ≈ 25 % — under-resolved skin friction at 8 cells/D; a finer - grid (16–32 cells/D) and longer run bring both St and the friction split toward the references. - -**Reference.** Williamson (1996); Dröge & Verstappen (2005); Lehmkuhl, Rodríguez, Borrell & Oliva +- **C_d ≈ 1.345** vs the reference band **1.32–1.36** → **inside the band**, 1.1 % below its top + (pressure 1.173 + friction 0.172; `C_l ≈ −0.007`, C_d swing [1.338, 1.353]). +- Friction fraction ≈ 13 % vs the reference ≈ 25 %: skin friction is under-resolved at 8 cells/D. The + total `C_d` therefore lands in the band by cancellation of an over-predicted pressure force against + an under-predicted friction force, not because both parts are right. A finer grid (16–32 cells/D) + and a longer run bring both St and the friction split toward the references. + +**Reference.** Williamson (1996); the 2-D laminar consensus compilation arXiv:2303.09262 for the `C_d` +band; Dröge & Verstappen (2005) for the pressure/friction split; Lehmkuhl, Rodríguez, Borrell & Oliva (2013). --- @@ -288,13 +325,18 @@ vs. the analytic decay **strictly decreases under refinement** to a pinned bound (2) the nonlinear convection `u·∇u` matches the closed form `−½ sin 2x` — checked **directly**, because single-mode TG's convective term is a pure gradient the projection removes, so the marched decay alone cannot test it; (3) the post-projection divergence stays at the projection floor; (4) the MPS -compression (bond vs. dense) is reported. Driven through `CfdFlow::qtt_march`. +compression (bond vs. dense) is reported. Driven through `CfdFlow::march`. **Self-check.** `verify()` gates all four and **exits nonzero** on any break (error not converging, order < 1.8, convection wrong/zero, or divergence above 1e-6). **Measured (f64, 8²–32², t=0.2, <1 s).** Error `9.8e-4 → 2.4e-4 → 5.3e-5` (N=8→16→32), observed order -**2.02 → 2.18** — clean 2nd-order convergence to the analytic decay; finest-grid error **5.3e-5**. +**2.02 → 2.18**: 2nd-order in space (centered FD + spectral projection), first-order in time (explicit +Euler at fixed `dt`), so the ladder measures the spatial order; finest default-grid error **5.3e-5**. +The fixed-`dt` Euler error is a temporal floor of opposite sign, so extending the ladder is **not** +free: the signed error crosses zero near N=64–128 (`+5.9e-6 → −5.9e-6`), making the N=64 order of 3.16 +a cancellation artifact and collapsing the order to 0.02 by N=128. **`max_level = 5` is the maximum +usable length**; the documented `max_level 7` fails the order gate. See the harness README. Convection vs the closed form **3.2e-3** (≈ 0.6 % of the 0.5 signal) — the nonlinear term is real and correct. Divergence **~1e-14** (the spectral Leray projection is exact to machine precision). Bond `= N` on this smooth field → `N×` compression that grows with resolution. @@ -309,7 +351,7 @@ on this smooth field → `N×` compression that grows with resolution. **Verifies.** The immersed-body QTT solver (`QttImmersed2d`): a cylinder in a periodic free-stream enforced by **Brinkman volume penalization** (a smoothed mask, no cut cells), with drag read as a **tensor-train contraction** of the mask with the velocity deficit. Closes Gap 1 of the plasma-blackout -analysis (immersed body + surface observables). Driven through `CfdFlow::qtt_march`. +analysis (immersed body + surface observables). Driven through `CfdFlow::march`. **Self-check.** Three gates, **exit nonzero** on break: (a) no-slip — interior `max|u|` at the penalization floor; (b) accuracy-vs-bond — the drag coefficient **converges** as the round bond cap rises; @@ -327,6 +369,163 @@ immersed objects; DEC cross-reference `dec_cylinder_verification`. --- +## `qtt_park2t_blackout` — Park two-temperature blackout coupling (Tier-A) + +**Verifies.** *Internal consistency only.* The Lagging-Equilibrium Relaxation (LER) coupling hosted in +the QTT march (`QttMarchRun::run_coupled`) over a Brinkman-penalized blunt forebody: a +`RecoveryTemperatureStage` rebuilds `T_tr` from a mandatory Rankine–Hugoniot normal-shock jump plus +`½|u|²/c_p`, an `IonizationStage` relaxes the carried ionization fraction toward the Park-2T Saha +surrogate, and an `EosStage` closes the pressure. A `BlackoutTrigger` maps peak `n_e` to the plasma +frequency and compares it to the configured comms band. The gates test the coupling machinery. **None of +them compares a marched quantity against RAM-C II or any other flight measurement.** + +**Self-check.** Six gates, exit nonzero on break. (i) The relaxation stays bounded and monotone at +`τ = Δt/1000`, where a single explicit Euler rate step overshoots the equilibrium by ~10³× (the gate +demands at least 100×). (ii) `ler_step` agrees with a 10⁶-substep forward-Euler integration of +`dx/dt = (x_eq − x)/τ` to `1e-6` relative. That is the one `[reference]`-class gate here, because the +integration is a genuinely separate derivation; the tolerance is sized from the reference's own +truncation error, `a²/2N ≈ 4.5e-8`, not from the measurement. (iii) The RH jump lands `T_post` inside +`(1e4, 1e5) K`. (iv) The Arrhenius rate rises with `T` and the lagged `α` sits below `α_eq`. (v) Two +temperature histories reaching the same target carry different `α`. (vi) Marched `n_e > 0`. Gates (i) and +(iii)–(vi) are `[tripwire]`. + +**Measured (f64, 32², 40 steps, M = 25, γ = 1.4, n_tot = 1e22 m⁻³, ~4 s).** All six PASS. Peak +`n_e = 1.000e22 m⁻³`, i.e. `α = 1` exactly — the Saha surrogate **saturates** at the frozen RH post-shock +temperature, so the harness is measuring a ceiling, not a prediction. Peak `ω_p = 5.641e12 rad/s` against +the 9.4e9 rad/s comms band; blackout dwell 1.6e-1 s. Against the RAM-C II ≈ 1e19 m⁻³ anchor that peak is +**+3.0 decades high**. The over-prediction has three named parts: the incompressible carrier (`T_tr` is a +reconstruction, not a transported post-shock path), perfect-gas `γ = 1.4` (which ignores the dissociation +and vibration that absorb post-shock energy), and `T_ve = T_e` lumping (~2×, Farbar–Boyd–Martin 2013). The +operator split is first-order Lie. `qtt_ramc_stagline` is the harness that carries the physical claim. + +**Reference.** None quantitative. Reported as cross-references only: RAM-C II (Grantham 1970); +Park (1990, 1993); Millikan & White (1963); Farbar, Boyd & Martin (2013); Aiken, Carter & Boyd (2025). + +--- + +## `qtt_sod` — Sod shock tube against the exact Riemann solution + +**Verifies.** `CompressibleEuler1d`, the 1-D conservative compressible Euler marcher that carries +`U = (ρ, ρu, ρE)` as three tensor trains, against the **exact Riemann solution** on the classic Sod data +(`ρ,u,p`: `1,0,1` | `0.125,0,0.1`, `γ = 1.4`). The Rusanov update rearranges into a conservative central +flux difference plus a scalar artificial viscosity, `dU/dt = −∂ₓF + ½·s_max·Δx·∂²ₓU`, so it is assembled +from the `gradient` / `laplacian` MPOs and recompressed each step. The wave speed `s_max = max(|u| + c)` +is taken over the whole state, so this is the Rusanov/local-Lax–Friedrichs *form* driven by a **global** +speed estimate. The nonlinear flux and EOS are evaluated pointwise (dequantize → compute → requantize); +the rank-preserving TT-cross form is the named large-`L` upgrade. This is the **only quantitative +physical-accuracy gate** in the QTT compressible set. + +**Self-check.** L1 error of density, velocity and pressure against the exact solution over `|x| ≤ 0.5`, +each below the recorded tolerance `0.03`; exit nonzero on break. All three are `[reference]` class. The +domain is the wide `[−1, 1]` so the periodic boundary-jump waves stay outside the measurement window. + +**Measured (f64, 512 cells, CFL 0.4, t = 0.2, ~1 s).** Density **0.0175**, velocity **0.0274**, pressure +**0.0151** — all PASS. The star pressure comes out `p* = 0.3031`, the canonical Sod value, and the left +expansion fan, the contact and the right shock are at the correct positions and speeds. First-order +Rusanov smears the contact, which is what the L1 bound accommodates: the bound is on mean accuracy, not on +sharpness at the discontinuity. Companion unit tests in `tests/solvers/qtt/compressible_tests.rs` gate +conservation of `∫ρ`, `∫ρu`, `∫ρE` and free-stream preservation. + +**Reference.** Sod (1978); the exact solver follows Toro, ch. 4. + +--- + +## `qtt_ramc_stagline` — RAM-C II stagnation line (Tier-B Stage 4) + +**Verifies.** The stagnation streamline treated as a 1-D **fitted interface**: the freestream crosses the +bow shock and the exact Rankine–Hugoniot jump sets the post-shock state, so no flux is marched *through* +the front and each side stays smooth and `O(1)` rank. `T₂` is real transported energy, which retires the +Tier-A recovery-temperature reconstruction. The smooth post-shock relaxation zone then drives two +independent ionization paths against the RAM-C II peak-`n_e` anchor: the closed-form Park-2T controller, +and an **uncalibrated** three-channel RP-1232 finite-rate network with no Saha target anywhere in it. + +**Self-check.** Seven gates, exit nonzero on break: `T₂` in the ~10⁴ K band; peak `n_e` matches the +corrected Park-2T value; blackout onset (`ω_p >` comms band); the relaxation profile stays `O(1)` rank; +the network prediction sits inside its ±0.70-decade earned band; electron impact is a refinement rather +than the driver; the carried sheath arm self-limits at or below the renewal arm. All seven print as +`[tripwire]`, the two anchored ones included: the ±0.70-decade band is pinned from this harness's own +measurement, as its own gate text says, not derived from the flight data's stated uncertainty. + +**Measured (f64, M = 25, effective γ = 1.1, T∞ = 250 K, ~0.01 s).** All seven PASS. Exact RH post-shock +state: `T₂ = 8044 K`, `ρ₂/ρ₁ = 20.349`, `u₂/u₁ = 0.049`, `p₂/p₁ = 6.547e2`, post-shock +`n_tot = 2.645e22 m⁻³`; relaxation-profile bond **2**. Park-2T controller: `α = 2.007e-5`, peak +`n_e = 5.310e17 m⁻³`, **−1.27 decades** below the 1e19 anchor, `ω_p = 4.111e10 rad/s`. Uncalibrated +network: channel 1 plus the lagged atom pool `1.887e19` (+0.28 dec), full network `2.251e19` (+0.35 dec). +Sheath-renewal A/B: renewal `2.251e19` (+0.35 dec, kept), carried `1.768e18` (−0.75 dec, self-limiting). + +The −1.27-decade controller offset is **reported, not re-admitted**: it followed the +`fix-ramc-vibrational-relaxation-pair` correction of the reduced mass from an invalid `μ = 7.0` (the N–N +atomic pair, which has no vibrational mode) to the N₂–N₂ `μ = 14.007`, which lengthens `τ_vt` about 1.9× +and cools the Park rate-controlling temperature `Tₐ = √(T_tr·T_ve)`. The band was not widened to restore +the old +0.0-decade headline. Read the single-pair figure as a lower bound: the bath also holds lighter +partners whose shorter `τ_vt` a mixture-weighted closure would recover. Open levers: `T_e = T_ve` lumping +(~2×), the single associative-ionization channel, and the ~2–5× Millikan–White chemistry-model spread. +Note the effective `γ = 1.1`, an engineering closure for strongly dissociated hypersonic air. Its +definition site records that perfect-gas `γ = 1.4` over-predicts `T₂` at ≈30 000 K, because it ignores the +dissociation and vibration that absorb the post-shock energy. `qtt_park2t_blackout` runs at that +perfect-gas value. + +**Reference.** Grantham (1970), NASA TN D-6062 — the RAM-C II peak-`n_e` anchor; Gupta, Yos, Thompson & +Lee (1990), NASA RP-1232 — the Table II rate pairs; Park (1990, 1993); Millikan & White (1963). + +--- + +## `qtt_blunt_body_2d` — 2-D bow-shock rank lever (Tier-B Stage 5) + +**Verifies.** *Structural only: this gate bounds **rank**, not physical accuracy.* A blunt-body bow shock +stands off the nose at a constant *physical* radius `R`. In a body-fitted coordinate that surface is a +line `η = const`, a step in one axis, so its quantized-tensor-train bond `χ` is small and +resolution-independent. Sampled on a Cartesian lattice the identical physical shock is curved on the +grid, so `χ` grows with resolution. `BlendedMap` carries both coordinates as one blend parameter (`λ = 1` +body-fitted polar fan, `λ = 0` Cartesian capture) and the same `CompressibleMarcher2d` runs over both +through the `MetricProvider` seam, so the coordinate is the only variable. + +**Self-check.** Two gates, exit nonzero on break: **BB-A**, the fitted `χ` stays at 12 or below and grows +by at most 1 per refinement (no `√side` growth); **BB-B**, the Cartesian capture `χ` grows with resolution +and overtakes the fitted bond by at least 2×. Both are `[tripwire]`. + +**Measured (f64, `2^5 → 2^7` ladder, smoothed compression `ρ: 1 → 1.8`, `p: 1 → 3` at `R = 1.5`, +quantized at tolerance 1e-8, <1 s).** Fitted `χ` = 3, 4, 5; Cartesian capture `χ` = 16, 32, 61. Both PASS. +Fitted is flat; the capture cost grows roughly linearly in side, `χ ≈ side/2`, not as `√side`. At these +three resolutions `√side` would give ≈ 6, 8, 11. + +**Reported, never asserted.** The **dynamic marched** rank is the open remainder: a plain +flux-through-front marcher injects angular structure across the captured front and grows `χ` to **64** +over 6 steps, even in the fitted coordinate. Bounding it needs re-pinning plus an exact-RH interface with +no flux marched across the front. That is design D9 and the `qtt_repin_marcher` study. The harness prints +the datapoint and never gates on it. + +**Reference.** None. The quantitative accuracy gate for this solver is `qtt_sod`, against the exact +Riemann solution. The 3-D form of the same lever is `qtt_reentry_3d`. + +--- + +## `qtt_reentry_3d` — 3-D forebody sheath rank lever (Tier-B Stage 6) + +**Verifies.** *Structural only: this gate bounds **rank**, not physical accuracy.* The 3-D form of the +`qtt_blunt_body_2d` lever, on the crate's serial `x`-`y`-`z` codec (`quantize_3d`). A smoothed step at the +standoff radius `R = 1.5` is sampled three ways and quantized at tolerance 1e-8: **fitted** (the shell as +a function of the radial index alone), **Cartesian** (the same physical shell on a `[−2, 2]³` lattice, +curved on the grid), and **wake** (two off-axis lobes downstream, a multi-feature structure no single +fitted coordinate aligns). + +**Self-check.** Two gates, exit nonzero on break: **RE-A**, the fitted forebody `χ` stays at 8 or below +with a flat high-resolution tail (last refinement adds at most 1); **RE-B**, the Cartesian capture `χ` +grows with resolution and overtakes the fitted bond by at least 2×. Both are `[tripwire]`. + +**Measured (f64, `2^3 → 2^5` ladder, <1 s).** Fitted `χ` = 2, 4, 4; Cartesian `χ` = 10, 30, 59. Both PASS. +Fitted plateaus; the capture cost grows, following the `qtt_rank_3d` upper bound. + +**Reported, never asserted.** The **wake** is out of scope by design (a separated, unsteady wake needs +turbulence): `χ = 41` at `2^5`, comparable to the Cartesian capture and un-fittable by construction. It is +printed as a datapoint for the standing `qtt_rank_3d` question and never gated (design D9). The dynamic +marched forebody is likewise reported: there is no 3-D body-fit metric yet, so the marcher runs Cartesian +and grows `χ` to **16** over 6 steps. + +**Reference.** None. See `qtt_sod` for the quantitative accuracy gate on this solver. + +--- + ## References - **Taylor, G. I. & Green, A. E.** (1937). *Mechanism of the production of small eddies from large @@ -349,7 +548,12 @@ immersed objects; DEC cross-reference `dec_cylinder_verification`. - **Williamson, C. H. K.** (1996). *Vortex dynamics in the cylinder wake.* Annu. Rev. Fluid Mech. **28**, 477–539. - **Dröge, M. & Verstappen, R.** (2005). *A new symmetry-preserving Cartesian-grid method for computing - flow past arbitrarily shaped objects.* Int. J. Numer. Methods Fluids **47**, 979–985. + flow past arbitrarily shaped objects.* Int. J. Numer. Methods Fluids **47**, 979–985. Table II is the + secondary reference for the cylinder pressure/friction split, `C_d = 1.24 = 0.93 + 0.31`. +- **arXiv:2303.09262** — the compilation the 2-D unconfined laminar band `C_d(Re=100) ≈ 1.32–1.36` is + taken from (Qu et al. 2013, Posdziech & Grundmann 2007 and Williamson, as gathered there), cited at + `verification/dec_cylinder_verification/main.rs`. **Authors, title and venue are not recorded anywhere + in this repository**, so they are omitted here rather than supplied from recall. - **Lehmkuhl, O., Rodríguez, I., Borrell, R. & Oliva, A.** (2013). *Low-frequency unsteadiness in the vortex formation region of a circular cylinder.* Phys. Fluids **25**, 085109. - **Roache, P. J.** (2002). *Code verification by the method of manufactured solutions.* J. Fluids Eng. @@ -361,6 +565,32 @@ immersed objects; DEC cross-reference `dec_cylinder_verification`. - **Desbrun, M., Hirani, A. N., Leok, M. & Marsden, J. E.** (2005). *Discrete Exterior Calculus.* arXiv:math/0508341. - **Regge, T.** (1961). *General relativity without coordinates.* Nuovo Cimento **19**, 558–571. +- **Grantham, W. L.** (1970). *Flight Results of a 25,000-Foot-Per-Second Reentry Experiment Using + Microwave Reflectometers To Measure Plasma Electron Density and Standoff Distance.* NASA TN D-6062, + NASA Langley. The RAM-C II peak-`n_e` anchor. PDF: `deep_causality_physics/papers/ram_c_ii_nasa_tn_d6062.pdf`. +- **Gupta, R. N., Yos, J. M., Thompson, R. A. & Lee, K.-P.** (1990). *A Review of Reaction Rates and + Thermodynamic and Transport Properties for an 11-Species Air Model for Chemical and Thermal + Nonequilibrium Calculations to 30000 K.* NASA RP-1232. Table II supplies the finite-rate network. PDF: + `deep_causality_physics/papers/gupta_1990_nasa_rp1232.pdf`. +- **Park, C.** (1990). *Nonequilibrium Hypersonic Aerothermodynamics.* Wiley. The two-temperature model. +- **Park, C.** (1993). *Review of Chemical-Kinetic Problems of Future NASA Missions, I: Earth Entries.* + J. Thermophys. Heat Transfer **7**(3), 385. +- **Millikan, R. C. & White, D. R.** (1963). *Systematics of Vibrational Relaxation.* J. Chem. Phys. + **39**, 3209. The `τ_vt` correlation behind the lagging `T_ve`. +- **Aiken, Carter & Boyd** (2025). Plasma Sources Sci. Technol. **34**. Cited at + `deep_causality_physics/src/kernels/hypersonic/ionization.rs` for RAM-C sitting in the mixed + associative + electron-impact ionization band. **Title, initials and page are not recorded anywhere in + this repository**, so they are omitted here rather than supplied from recall. +- **Farbar, Boyd & Martin** (2013). Cited across the plasma-blackout corridor for the ~2× peak-`n_e` + over-prediction of `T_ve = T_e` lumping versus a separate electron-translational energy equation. + **Initials, title and venue are not recorded anywhere in this repository**; fill them in from the + published record before this page is used as a citation source. +- **Sod, G. A.** (1978). The shock-tube problem, cited at `verification/qtt_sod/print_utils.rs`. + **Title, venue, volume and pages are not recorded anywhere in this repository**, so they are omitted + here rather than supplied from recall. +- **Toro, E. F.** *Riemann Solvers and Numerical Methods for Fluid Dynamics*, ch. 4 — the construction the + harness's exact Riemann solver follows. **Edition, publisher and year are not recorded anywhere in this + repository.** > Divergence figures are single-machine measurements at the **affordable default** configuration; they > are dominated by spatial resolution, not the discretization's asymptotic accuracy. Reference-grid diff --git a/deep_causality_cfd/verification/dec_cylinder_verification/README.md b/deep_causality_cfd/verification/dec_cylinder_verification/README.md index 9335a0be1..430f779da 100644 --- a/deep_causality_cfd/verification/dec_cylinder_verification/README.md +++ b/deep_causality_cfd/verification/dec_cylinder_verification/README.md @@ -1,8 +1,8 @@ # Isolated-cylinder validation — CFD Stage 4 (tasks D2/D3) Flow past an isolated circular cylinder, assembled from the full Stage-4 boundary-zone stack. It -measures the shedding **Strouhal** number and the **drag coefficient** against the Williamson lineage -and Lehmkuhl et al. (2013). +measures the shedding **Strouhal** number against the Williamson lineage and the **drag +coefficient** against the 2-D unconfined laminar consensus band (see "What it reports" below). The domain is external flow: **west `Inflow`** (uniform `U`), **east `Outflow`** (pressure-reference, zero-gradient), **far-field `SlipWall`** top and bottom (so the lateral boundaries do not confine the @@ -23,9 +23,12 @@ to stderr. - **Drag** `C_d = F_x / (½ U² D)`, the **cycle mean** over the developed (second-half) window, split into the **pressure** force (`pressure_surface_force` over the static pressure from `pressure_diagnostic`) and the **viscous (friction)** force (`viscous_surface_force`); the lift - `C_l` and the `C_d` swing are reported alongside. Reference `C_d(Re=100) ≈ 1.24–1.33` - (Dröge–Verstappen 2005: 1.24 = 0.93 pressure + 0.31 friction; Lehmkuhl et al. 2013 lineage ≈ 1.33), - so friction is ≈ 25 % of `C_d`. + `C_l` and the `C_d` swing are reported alongside. Reference `C_d(Re=100) ≈ 1.32–1.36`, the 2-D + unconfined laminar consensus (Qu et al. 2013, Posdziech & Grundmann 2007, Williamson, as compiled + in arXiv:2303.09262); the gate-result section below quotes the same band. Dröge–Verstappen (2005), + Table II, is the secondary reference, for the pressure/friction split only: their cut-cell result + is `C_d = 1.24 = 0.93` pressure `+ 0.31` friction, so friction is ≈ 25 % of `C_d`. That `1.24` is + a single low-side cut-cell datum, not the lower edge of the band. ## Symmetry breaking diff --git a/deep_causality_cfd/verification/dec_cylinder_verification/main.rs b/deep_causality_cfd/verification/dec_cylinder_verification/main.rs index f206bbd7e..dc482c62e 100644 --- a/deep_causality_cfd/verification/dec_cylinder_verification/main.rs +++ b/deep_causality_cfd/verification/dec_cylinder_verification/main.rs @@ -31,9 +31,13 @@ //! - The **cycle-mean drag** `C_d = F_x / (½ U² D)`, averaged over the developed (second-half) //! window and split into the **pressure** force (`pressure_surface_force` over the static pressure //! from `pressure_diagnostic`) and the **viscous (friction)** force (`viscous_surface_force`), -//! with the lift `C_l` and the `C_d` swing. Reference: `C_d(Re=100) ≈ 1.24–1.33` -//! (Dröge–Verstappen 2005: 1.24 = 0.93 pressure + 0.31 friction; Lehmkuhl et al. 2013 lineage -//! ≈ 1.33), so friction is ≈ 25 % of `C_d`. +//! with the lift `C_l` and the `C_d` swing. Reference: `C_d(Re=100) ≈ 1.32–1.36`, the 2-D +//! unconfined laminar consensus (Qu et al. 2013, Posdziech & Grundmann 2007, Williamson, as +//! compiled in arXiv:2303.09262). The directory README's gate-result section quotes the same +//! band. Dröge & Verstappen (2005), Table II, is the secondary reference, for the +//! pressure/friction split only: their cut-cell result is `C_d = 1.24 = 0.93` pressure `+ 0.31` +//! friction, so friction is ≈ 25 % of `C_d`. That `1.24` is a single low-side cut-cell datum. It +//! is not the reference band and is no longer used as its lower edge. //! //! ## Scope //! @@ -70,11 +74,14 @@ const PERTURB_SIGMA: f64 = 0.75; // ── Acceptance bounds ───────────────────────────────────────────────────────────────────────── // // Evidence class: **tripwire**, not reference. The affordable default (8 cells/D) is below -// reference-grid quality and the measured values sit *outside* the published bands — St 0.1710 vs -// Williamson 0.164 (+4.3 %), C_d 1.345 vs the 1.24–1.33 band (+1.1 % over the top). Gating against -// the published bands at this resolution would fail a correctly-working solver, so these bounds are -// pinned around the measured default and detect regression only. The published values are printed -// next to the measurement so the offset stays visible and is never read as agreement. +// reference-grid quality. `St` sits outside the published value: 0.1710 vs Williamson 0.164, +// +4.3 %. `C_d` lands inside the published band, 1.345 in 1.32–1.36, but for the wrong reason: the +// split is pressure 1.173 + friction 0.172, so friction is ≈ 13 % of `C_d` against the ≈ 25 % of +// the reference, and the total agrees by cancellation. Gating against the published bands at this +// resolution would fail a correctly-working solver on `St` and would reward that cancellation on +// `C_d`, so these bounds are pinned around the measured default and detect regression only. The +// published values are printed next to the measurement so the offset stays visible and is never +// read as agreement. // // Width is set by cross-platform floating-point sensitivity of a 1500-step nonlinear march, not by // measurement precision (the run is deterministic on one machine). Provisional: tighten once the @@ -88,10 +95,13 @@ const REFERENCE_RE_D: f64 = 100.0; const ST_TRIPWIRE: (f64, f64) = (0.152, 0.190); /// Pinned drag-coefficient band (tripwire), ~±10 % around the measured 1.345. const CD_TRIPWIRE: (f64, f64) = (1.21, 1.48); -/// Published references, printed beside the measurement. Williamson (1996) for `St`; -/// Dröge & Verstappen (2005) / Lehmkuhl et al. (2013) for `C_d`. +/// Published references, printed beside the measurement. Williamson (1996) for `St`. For `C_d`, the +/// 2-D unconfined laminar consensus band (Qu et al. 2013, Posdziech & Grundmann 2007, Williamson, as +/// compiled in arXiv:2303.09262); the directory README's gate-result section quotes the same band. +/// Dröge & Verstappen (2005), Table II, is the secondary reference for the pressure/friction split +/// only: `C_d = 1.24 = 0.93 + 0.31`, i.e. friction ≈ 25 %. const ST_REFERENCE: f64 = 0.164; -const CD_REFERENCE_BAND: (f64, f64) = (1.24, 1.33); +const CD_REFERENCE_BAND: (f64, f64) = (1.32, 1.36); /// Read an `f64` case parameter from the environment, falling back to `default`. fn env_f64(key: &str, default: f64) -> f64 { @@ -367,8 +377,8 @@ fn verify(st: Option, cd: Option, re_d: f64, cells_per_d: usize) -> bo if let Some(v) = cd { let pass = v > CD_TRIPWIRE.0 && v < CD_TRIPWIRE.1; println!( - " [{}] [tripwire] C_d {v:.3} in [{}, {}] (reference band: Dröge–Verstappen / \ - Lehmkuhl {:.2}–{:.2}, measured is {:+.1} % relative to the band top)", + " [{}] [tripwire] C_d {v:.3} in [{}, {}] (reference band: 2-D laminar consensus \ + {:.2}–{:.2}, measured is {:+.1} % relative to the band top)", if pass { "PASS" } else { "FAIL" }, CD_TRIPWIRE.0, CD_TRIPWIRE.1, diff --git a/deep_causality_cfd/verification/dec_cylinder_verification/re100_16_resolved.txt b/deep_causality_cfd/verification/dec_cylinder_verification/re100_16_resolved.txt index 3a95c5684..b1675cf0e 100644 --- a/deep_causality_cfd/verification/dec_cylinder_verification/re100_16_resolved.txt +++ b/deep_causality_cfd/verification/dec_cylinder_verification/re100_16_resolved.txt @@ -1,10 +1,19 @@ -CELLS_PER_D=16 LX_D=16 LY_D=16 STEPS=4000 CFL=0.4 CG_TOL=1e-6 \ -> cargo run --release -p avionics_examples --example dec_cylinder_validation > re100_16_resolved.csv - Finished `release` profile [optimized] target(s) in 0.04s - Running `target/release/examples/dec_cylinder_validation` +# Reproduce (current crate and example names): +# +# CELLS_PER_D=16 LX_D=16 LY_D=16 STEPS=4000 CFL=0.4 CG_TOL=1e-6 \ +# cargo run --release -p deep_causality_cfd --example dec_cylinder_verification \ +# > re100_16_resolved.csv +# +# Provenance: this capture predates the harness moving into deep_causality_cfd. It was taken with +# `-p avionics_examples --example dec_cylinder_validation`, the former crate and example names of +# the same program, at an earlier revision. It has not been regenerated under the current names, so +# read it as the June-2026 record the directory README's gate-result table cites, not as output of +# the code in the tree today. The `ref C_d ≈ 1.24–1.33` label on the last line is the band the +# harness printed then; it now prints the 1.32–1.36 2-D laminar consensus band. + # isolated cylinder: grid 256×256 (16/D), domain 16×16 D, Re_D=100, nu=1.000e-2, dt=2.500e-2 # cut cells: 164 solid, 60 cut; no-slip aperture-resolved; merge floor 0.25; CFL 0.4; cg_tol Some(1e-6); cg_max_iter 15360 # trigger: transverse seed eps=0.3 sigma=0.75 D at (5.0,8.0) D # shedding: period 5.8354, St = f·D/U ≈ 0.1714 (Williamson Re=100 ≈ 0.164) -# drag (cycle mean over 40 samples): C_d ≈ 1.246 (pressure 1.078 + friction 0.167), C_l ≈ 0.010, C_d swing [1.238, 1.254] (ref C_d ≈ 1.24–1.33, friction ≈ 25%) \ No newline at end of file +# drag (cycle mean over 40 samples): C_d ≈ 1.246 (pressure 1.078 + friction 0.167), C_l ≈ 0.010, C_d swing [1.238, 1.254] (ref C_d ≈ 1.24–1.33, friction ≈ 25%) diff --git a/deep_causality_cfd/verification/dec_cylinder_verification/re100_16_staircase.txt b/deep_causality_cfd/verification/dec_cylinder_verification/re100_16_staircase.txt index c00ca86e7..e3f438def 100644 --- a/deep_causality_cfd/verification/dec_cylinder_verification/re100_16_staircase.txt +++ b/deep_causality_cfd/verification/dec_cylinder_verification/re100_16_staircase.txt @@ -1,7 +1,17 @@ -STAIRCASE=1 CELLS_PER_D=16 LX_D=16 LY_D=16 STEPS=4000 CFL=0.4 CG_TOL=1e-6 \ -> cargo run --release -p avionics_examples --example dec_cylinder_validation > re100_16_staircase.csv - Finished `release` profile [optimized] target(s) in 0.03s - Running `target/release/examples/dec_cylinder_validation` +# Reproduce (current crate and example names): +# +# STAIRCASE=1 CELLS_PER_D=16 LX_D=16 LY_D=16 STEPS=4000 CFL=0.4 CG_TOL=1e-6 \ +# cargo run --release -p deep_causality_cfd --example dec_cylinder_verification \ +# > re100_16_staircase.csv +# +# Provenance: this capture is the staircase half of the 16/D pair and predates the harness moving +# into deep_causality_cfd. It was taken with `-p avionics_examples --example +# dec_cylinder_validation`, the former crate and example names of the same program, at an earlier +# revision. It has not been regenerated under the current names, so read it as the June-2026 record +# the directory README's gate-result table cites, not as output of the code in the tree today. The +# `ref C_d ≈ 1.24–1.33` label on the last line is the band the harness printed then; it now prints +# the 1.32–1.36 2-D laminar consensus band. + # isolated cylinder: grid 256×256 (16/D), domain 16×16 D, Re_D=100, nu=1.000e-2, dt=2.500e-2 # cut cells: 164 solid, 60 cut; no-slip staircase; merge floor 0.25; CFL 0.4; cg_tol Some(1e-6); cg_max_iter 15360 # trigger: transverse seed eps=0.3 sigma=0.75 D at (5.0,8.0) D diff --git a/deep_causality_cfd/verification/dec_cylinder_wake_verification/README.md b/deep_causality_cfd/verification/dec_cylinder_wake_verification/README.md index 81b43b54b..757056b8c 100644 --- a/deep_causality_cfd/verification/dec_cylinder_wake_verification/README.md +++ b/deep_causality_cfd/verification/dec_cylinder_wake_verification/README.md @@ -74,8 +74,9 @@ example drives the march one bind at a time so the wake probe can be streamed; The DEC solver has **no inflow/outflow surface**. The sensor drives a **prescribed moving wall**, a Dirichlet boundary the solver already supports, confined in a **periodic-x channel** (periodic-x, -wall-y) containing the cylinder. This sheds a von-Kármán street and is a faithful exercise of the -cut-cell and uncertain-zone machinery. +wall-y) containing the cylinder. At 25 % blockage that confinement damps the von-Kármán street, so +no street is shed here. The run is a faithful exercise of the cut-cell and uncertain-zone machinery; +it is not a shedding case. `dec_cylinder_verification` is the harness that sheds. The quantitative **isolated-cylinder Reynolds ladder** against Lehmkuhl et al. (2013) and the Williamson lineage, tasks D2/D3 covering Strouhal and drag over Re 100–3900, needs a true diff --git a/deep_causality_cfd/verification/dec_cylinder_wake_verification/main.rs b/deep_causality_cfd/verification/dec_cylinder_wake_verification/main.rs index 03e4c08e2..a559bc2df 100644 --- a/deep_causality_cfd/verification/dec_cylinder_wake_verification/main.rs +++ b/deep_causality_cfd/verification/dec_cylinder_wake_verification/main.rs @@ -23,9 +23,18 @@ //! ## What this harness is (and is not) //! //! The DEC solver has no inflow/outflow surface; the sensor drives a **prescribed moving wall** (a -//! Dirichlet boundary), confined in a **periodic-x channel**. This sheds a von-Kármán street and is a -//! faithful exercise of the cut-cell + uncertain-zone machinery. The quantitative isolated-cylinder -//! Reynolds ladder (tasks D2/D3) needs that inflow/outflow surface; it is **not** claimed here. +//! Dirichlet boundary), confined in a **periodic-x channel**. At the committed configuration the +//! cylinder spans 25 % of the channel height (`config::BLOCKAGE = 0.25`), and that confinement +//! **damps the von-Kármán street**: the wake probe settles to a steady `v ≈ 2.70e-2` and the run +//! prints "no clear shedding detected in the developed signal". No street is shed here. What the +//! case exercises is the cut-cell and uncertain-zone machinery, end to end. The quantitative +//! isolated-cylinder Reynolds ladder (tasks D2/D3) needs the inflow/outflow surface; it is **not** +//! claimed here, and the Strouhal estimate is printed but never gated. `dec_cylinder_verification` +//! is the harness that sheds. +//! +//! The run is also not statistically stationary at 2000 steps: over the last recorded steps the +//! kinetic energy is still rising (2.4127e2 at step 1940 to 2.4155e2 at step 2000) and the probe is +//! still drifting. No gate checks stationarity. //! //! ## Reproducibility //! diff --git a/deep_causality_cfd/verification/dec_graded_mms_verification/README.md b/deep_causality_cfd/verification/dec_graded_mms_verification/README.md index b0d530b10..42ca5b4cc 100644 --- a/deep_causality_cfd/verification/dec_graded_mms_verification/README.md +++ b/deep_causality_cfd/verification/dec_graded_mms_verification/README.md @@ -29,15 +29,17 @@ but `O(ℓ)`-wrong on a graded one. | Operator | max-norm order (graded) | L2 order (graded) | Affected by grading? | |---|---|---|---| -| **Convective** `i_X ω` | ≈ 2 (to amp 0.5 = 3:1 ratio) | **≈ 2** | only the error *constant* grows mildly | +| **Convective** `i_X ω` | ≈ 2 (to amp 0.3 = 1.86:1 ratio) | **≈ 2** | only the error *constant* grows mildly | | **Viscous** `Δ₀ = δd` | ≈ 2 | **≈ 2** | only the error *constant* grows mildly | Two conclusions: -1. **Smooth grading retains second order — for both operators.** Even at strong grading - (a 3:1 spacing ratio) the order holds at ≈ 2; only the error constant grows. The R1 - promise — resolve walls cheaply *and* keep fast convergence — holds today, no follow-up - needed. +1. **Smooth grading retains second order — for both operators.** The sweep is + `a ∈ {0.0, 0.1, 0.2, 0.3}`. At the strongest grading measured, `a = 0.3`, `ℓ` runs from + 0.7 to 1.3: a **1.86:1 spacing ratio**, and the order holds at ≈ 2; only the error + constant grows. Amplitudes above 0.3 are not run, so a 3:1 ratio (`a = 0.5`) is untested. + The R1 promise — resolve walls cheaply *and* keep fast convergence — holds today, no + follow-up needed. 2. **Structure is metric-free and exact at any grading** — divergence-freeness of the Leray projection is combinatorial, pinned independently by the topology exactness test. diff --git a/deep_causality_cfd/verification/dec_graded_mms_verification/main.rs b/deep_causality_cfd/verification/dec_graded_mms_verification/main.rs index 43ed4c53c..6ef6eaa35 100644 --- a/deep_causality_cfd/verification/dec_graded_mms_verification/main.rs +++ b/deep_causality_cfd/verification/dec_graded_mms_verification/main.rs @@ -21,9 +21,13 @@ //! ## Result: smooth grading retains second order — for both operators //! //! Measured outcome: **both the convective and viscous operators are second order in both -//! norms at every grading amplitude**, even at strong grading (a 3:1 spacing ratio). The -//! error *constant* grows mildly with grading; the *order* holds at ≈ 2. So the R1 promise -//! ("graded meshes resolve walls cheaply and keep fast convergence") holds today. +//! norms at every grading amplitude the sweep covers**. The sweep is `a ∈ {0.0, 0.1, 0.2, +//! 0.3}`, so the strongest grading measured is `a = 0.3`, where `ℓ` runs from 0.7 to 1.3: a +//! **1.86:1 spacing ratio**. Finest-pair orders there are 1.979 (convective, max-norm) and +//! 2.001 (viscous, max-norm). The error *constant* grows mildly with grading; the *order* +//! holds at ≈ 2. Amplitudes above 0.3 are not run, so a 3:1 ratio (`a = 0.5`) is untested. +//! The R1 promise ("graded meshes resolve walls cheaply and keep fast convergence") holds +//! over the measured range. //! //! ### A correctness caveat this example exists to enforce //! diff --git a/deep_causality_cfd/verification/dec_taylor_green_re1600_verification/README.md b/deep_causality_cfd/verification/dec_taylor_green_re1600_verification/README.md index 35f466ada..470a2190f 100644 --- a/deep_causality_cfd/verification/dec_taylor_green_re1600_verification/README.md +++ b/deep_causality_cfd/verification/dec_taylor_green_re1600_verification/README.md @@ -7,22 +7,22 @@ structure-preservation test a new solver is judged by. Where the sibling [mms_taylor_green_verification](../mms_taylor_green_verification/README.md) example *verifies the pointwise right-hand side* by manufactured solutions, this example *runs the actual solver*: the periodic DEC-native incompressible Navier–Stokes march from -`deep_causality_physics::theories::fluid_dynamics::dec`. Three DeepCausality abstractions appear -together: +`deep_causality_cfd::solvers::dec`. Three DeepCausality abstractions appear together: - **The DEC solver.** Velocity is an edge 1-form on a cubical torus for the entire solve. Each `Rk4` stage evaluates the Leray-projected rate `P(−i_u ω − ν Δ_dR u♭)` — the projector *is* the incompressibility equation, so the march never approximates divergence-freeness; it enforces it to CG tolerance at every stage. The marching state is the `SolenoidalField` type-state, which only a projection can construct: an unprojected field cannot be time-stepped, by construction. -- **The causal flow.** The program is a two-stage `CausalFlow` chain — seed, then march — where - each stage is a plain `Value -> Result` composed with `try_step`. A CG - failure or CFL violation short-circuits the chain through the error channel with the failing - step in the message. -- **Precision as a parameter.** Every model struct is generic over `R: RealField`; the single - `FloatType` alias in `main.rs` selects the precision for the lattice metric, the de Rham - seeding, every projection CG solve, the `Rk4` march, and the energy series alike. Values are - cast to `f64` only at the display boundary, for CSV presentation. +- **The Flow DSL.** The case is declared as a `MarchConfig` through `CfdConfigBuilder` in + `config.rs`, then composed and run by `CfdFlow::march(&config).on(&manifold).run()`. Seeding and + marching happen inside that run, not as user-written stages. The run returns + `Result, PhysicsError>`; any solver failure aborts the march and surfaces as + that error, which `main` prints with its stage context before exiting non-zero. +- **Precision as a parameter.** The `deep_causality_cfd` config and flow types are generic over + `R: CfdScalar`; the single `FloatType` alias in `main.rs` picks the `R` for the lattice metric, + the de Rham seeding, every projection solve, the `Rk4` march, and the energy series alike. + Values are cast to `f64` only at the display boundary, for CSV presentation. ## The case @@ -77,20 +77,25 @@ t_star,kinetic_energy_per_vol,dissipation_rate ... ``` -with a human-readable summary (final `E*/E0`, peak dissipation and its time) on stderr, so -`> curve.csv` captures a clean plot input. +with a human-readable summary on stderr, so `> curve.csv` captures a clean plot input. The summary +reports the final `E*/E0` and the largest dissipation over the sampled horizon with its time. That +maximum is only the curve's peak when the curve turned over before the horizon; the summary says +which case it is. At the default 16³ / `t*_max = 10` it has not turned over, so the reported figure +is the last sample, still rising. -This is a code example, not a test host: CI never executes it, and correctness is gated by the -solver's own validation ladder in `deep_causality_physics` (Taylor–Green convergence tables, -inviscid invariants, the double shear layer). +CI runs this harness as a fast one (`.github/workflows/cfd_verification.yml`), and it exits +non-zero on a broken gate. The two gates are tripwires on the discretisation's own invariants: +kinetic energy never rises step to step, and the horizon ends below `E0`. The dissipation curve +itself is **not** gated. At the default 16³ it is grossly under-resolved, so the CSV is for +plotting against the DNS reference by eye, not for a pass/fail claim. ## File layout | File | Responsibility | | --- | --- | -| `main.rs` | The workflow: the `FloatType` alias, argument parsing, and the `CausalFlow` chain that sequences seed and march. | -| `model.rs` | The precision-generic model: the lattice manifold, the solver configuration (`ν` from Re at `R`), the two flow stages, and the `Sample`/`Report` carriers. | -| `print_utils.rs` | Presentation only: the CSV artifact and the stderr summary (the one place values are cast to `f64`). | +| `main.rs` | The workflow: the `FloatType` alias, argument parsing, geometry materialization, and the `CfdFlow::march` run. | +| `config.rs` | The case parameters (`RE`, `CFL_DT`, and the derived `wavenumber`/`viscosity`/`dt_star`/`volume`/`build_steps`), the `ft` precision lift, and `build_march_config`, which assembles the `MarchConfig` through `CfdConfigBuilder`. | +| `print_utils.rs` | The CSV artifact and the stderr summary (the one place values are cast to `f64`), plus `verify`: the two structure-preservation gates `main` exits non-zero on. | ## Precision as a parameter @@ -101,10 +106,10 @@ march, the energy series — re-runs at that precision: pub type FloatType = f64; // try f32, or Float106 (also add `use deep_causality_num::Float106;`) ``` -Exact `f64` specifications (`Re`, the CFL step, π) lift once into `R` through the `flt!` macro in -`model.rs` and never come back down; every computed quantity stays at `R`. The macro routes -through `FromPrimitive` rather than `From` so the same call sites serve `f32`, `f64`, and -`Float106` alike (std has no `f32: From`). +Exact `f64` specifications (`Re`, the CFL step, π) lift once into `FloatType` through the `ft` +function in `config.rs` and never come back down; every computed quantity stays at that precision. +`ft` routes through `FromPrimitive::from_f64` rather than `From`, so the same call sites serve +`f32`, `f64`, and `Float106` alike (std has no `f32: From`). ## Performance diff --git a/deep_causality_cfd/verification/dec_taylor_green_re1600_verification/baseline.txt b/deep_causality_cfd/verification/dec_taylor_green_re1600_verification/baseline.txt index 889f25635..5e853344a 100644 --- a/deep_causality_cfd/verification/dec_taylor_green_re1600_verification/baseline.txt +++ b/deep_causality_cfd/verification/dec_taylor_green_re1600_verification/baseline.txt @@ -1,3 +1,5 @@ + Finished `release` profile [optimized] target(s) in 0.07s + Running `target/release/examples/dec_taylor_green_re1600_verification` === DEC-native 3D Taylor-Green at Re 1600 === grid 16^3, horizon t* = 10, precision f64 @@ -132,7 +134,8 @@ t_star,kinetic_energy_per_vol,dissipation_rate 9.9746,0.10755346,0.00245426 10.0531,0.10735962,0.00246801 -marched to t* = 10.05: E*/E0 = 0.8929, peak dissipation 0.002468 at t* = 10.05 +marched to t* = 10.05: E*/E0 = 0.8929, max sampled dissipation 0.002468 at t* = 10.05 +the maximum is the last sample: the curve is still rising at the horizon, so that is an endpoint value, not the dissipation peak. Extend t*_max (or refine the grid) to reach it. compare the dissipation column against the published Re-1600 DNS curve (references.md). [PASS] [tripwire] kinetic energy monotonically non-increasing: max step-to-step rise 0.000e0 (tol 1.2e-10) [PASS] [tripwire] net dissipation over the horizon: E*/E0 = 0.8929 diff --git a/deep_causality_cfd/verification/dec_taylor_green_re1600_verification/print_utils.rs b/deep_causality_cfd/verification/dec_taylor_green_re1600_verification/print_utils.rs index d20718c80..d32e859da 100644 --- a/deep_causality_cfd/verification/dec_taylor_green_re1600_verification/print_utils.rs +++ b/deep_causality_cfd/verification/dec_taylor_green_re1600_verification/print_utils.rs @@ -15,8 +15,20 @@ use deep_causality_cfd::{EvidenceClass, Report}; use deep_causality_num::Zero; /// Render the dissipation curve: the CSV header + per-step rows on stdout, then the closing -/// summary (E\*/E0 and peak dissipation) on stderr. `n` pins the cell-volume normalization and the -/// convective time step. +/// summary on stderr. `n` pins the cell-volume normalization and the convective time step. +/// +/// The summary's dissipation figure is the **maximum over the sampled horizon**, not necessarily an +/// interior maximum of `−dE*/dt*`. Which of three cases holds is decided here from the first and the +/// last sample attaining that maximum, and the summary says which one it is: the maximum falls +/// strictly before the horizon (an interior peak), the last sample ties a maximum already reached +/// earlier (a terminal plateau, which does not establish a turnover), or the last sample alone holds +/// the maximum (an endpoint value on a still-rising curve). +/// +/// At the shipped 16³ / `t*_max = 10` configuration it does not turn over: the maximum lands on the +/// final sample at `t* ≈ 10.05` with the curve still rising, so that number is an endpoint value, +/// not a peak. Extending the same 16³ run to `t*_max = 40` does turn it over, at `t* ≈ 14.06` — +/// late against the `t* ≈ 9` the README quotes for the published DNS curve, because 16³ is grossly +/// under-resolved. Neither figure is gated; the two gates in [`verify`] are internal invariants. pub fn render(report: &Report, n: usize) { let energy = report .series("kinetic_energy") @@ -28,28 +40,56 @@ pub fn render(report: &Report, n: usize) { let mut t_star = FloatType::zero(); let mut e_prev = energy[0] / volume; let mut peak = (FloatType::zero(), FloatType::zero()); // (t_star, dissipation) + // Indices into the dissipation samples (the `t* = 0` row carries no dissipation and is not a + // candidate): the first and the last sample attaining `peak.1`, plus the final sample of the + // horizon. The two peak indices differ when the maximum recurs, which is what separates a + // terminal plateau from an interior peak. + let mut peak_first_idx = 0usize; + let mut peak_last_idx = 0usize; + let mut last_idx = 0usize; let e0 = e_prev; emit(t_star, e_prev, FloatType::zero()); - for &e_raw in &energy[1..] { + for (i, &e_raw) in energy[1..].iter().enumerate() { let e = e_raw / volume; t_star += dt_star; let dissipation = (e_prev - e) / dt_star; emit(t_star, e, dissipation); - if dissipation > peak.1 { + if i == 0 || dissipation > peak.1 { + // A strictly larger sample (or the first one, which seeds the maximum): the reported + // time is the earliest the maximum is reached. peak = (t_star, dissipation); + peak_first_idx = i; + peak_last_idx = i; + } else if dissipation >= peak.1 { + // A tie with the running maximum: keep the reported time, record the later occurrence. + peak_last_idx = i; } + last_idx = i; e_prev = e; } let e_t = e_prev; eprintln!( - "\nmarched to t* = {:.2}: E*/E0 = {:.4}, peak dissipation {:.6} at t* = {:.2}", + "\nmarched to t* = {:.2}: E*/E0 = {:.4}, max sampled dissipation {:.6} at t* = {:.2}", Into::::into(t_star), Into::::into(e_t / e0), Into::::into(peak.1), Into::::into(peak.0) ); + if peak_last_idx < last_idx { + eprintln!("the curve turned over inside the horizon, so that maximum is an interior peak."); + } else if peak_first_idx < peak_last_idx { + eprintln!( + "the last sample ties that maximum: the curve is back at its maximum at the horizon, so \ + the run does not establish a turnover. Extend t*_max (or refine the grid) to place the peak." + ); + } else { + eprintln!( + "the maximum is the last sample: the curve is still rising at the horizon, so that is an \ + endpoint value, not the dissipation peak. Extend t*_max (or refine the grid) to reach it." + ); + } eprintln!( "compare the dissipation column against the published Re-1600 DNS curve (references.md)." ); diff --git a/deep_causality_cfd/verification/mms_taylor_green_verification/baseline.txt b/deep_causality_cfd/verification/mms_taylor_green_verification/baseline.txt index 1c5b56d29..f7e566bf0 100644 --- a/deep_causality_cfd/verification/mms_taylor_green_verification/baseline.txt +++ b/deep_causality_cfd/verification/mms_taylor_green_verification/baseline.txt @@ -1,3 +1,5 @@ + Finished `release` profile [optimized] target(s) in 0.07s + Running `target/release/examples/mms_taylor_green_verification` === Avionics CFD verification: Taylor-Green via Manufactured Solutions === Stage 1: differentiate -> kernel @@ -13,7 +15,8 @@ Stage 2: Rk4 march of the amplitude, kernel in the loop abs error = 6.66e-16 Manufactured solution reproduced: exact AD derivatives drive the kernel, Rk4 tracks -the analytic decay, and the causal monad sequenced the two stages. +the analytic decay. CfdFlow::verify sequences the two stages directly; this is a +pointwise check and does not route through PropagatingEffect. --- manufactured-solution gates --- [PASS] [reference] stage 1: kernel vs exact du/dt: 1.110e-16 vs bound 2.220e-12 (closed form) diff --git a/deep_causality_cfd/verification/mms_taylor_green_verification/print_utils.rs b/deep_causality_cfd/verification/mms_taylor_green_verification/print_utils.rs index fb1c267bb..dd20c6695 100644 --- a/deep_causality_cfd/verification/mms_taylor_green_verification/print_utils.rs +++ b/deep_causality_cfd/verification/mms_taylor_green_verification/print_utils.rs @@ -40,7 +40,8 @@ pub fn render(r: &Report) { println!(" abs error = {:.2e}\n", (a_final - a_exact).abs()); println!("Manufactured solution reproduced: exact AD derivatives drive the kernel, Rk4 tracks"); - println!("the analytic decay, and the causal monad sequenced the two stages."); + println!("the analytic decay. CfdFlow::verify sequences the two stages directly; this is a"); + println!("pointwise check and does not route through PropagatingEffect."); } /// Precision-scaled bound on the MMS residuals. diff --git a/deep_causality_cfd/verification/qtt_blunt_body_2d/README.md b/deep_causality_cfd/verification/qtt_blunt_body_2d/README.md index 1582d3f95..156203f4e 100644 --- a/deep_causality_cfd/verification/qtt_blunt_body_2d/README.md +++ b/deep_causality_cfd/verification/qtt_blunt_body_2d/README.md @@ -26,14 +26,14 @@ is the only variable. ## What it verifies (exit nonzero on break) - **BB-A**: the fitted `χ` stays bounded at 12 or below and resolution-stable, growing by at most 1 - per refinement, so no `√side` growth. + per refinement. It does not track the Cartesian capture's `χ ≈ side/2`. - **BB-B**: the Cartesian capture `χ` grows with resolution and overtakes the fitted bond by at least 2×. Both gates are **structural**. They bound *rank*, not physical accuracy. The quantitative accuracy gate for the compressible solver is `qtt_sod`, against the exact Riemann solution. -## Measured (f64, 2^5–2^7, ~2 s) +## Measured (f64, 2^5–2^7, <1 s) | resolution | fitted `χ` (λ=1) | capture `χ` (λ=0) | |---|---|---| @@ -41,8 +41,8 @@ gate for the compressible solver is `qtt_sod`, against the exact Riemann solutio | 2^6 | 4 | 32 | | 2^7 | 5 | 61 | -Fitted runs 3 to 5 and is flat; the capture cost runs 16 to 61, growing roughly as `√side`. Both -gates **PASS**. +Fitted runs 3 to 5 and is flat. The capture cost runs 16 to 61: a 3.8× rise for a 4× refinement, +so `χ ≈ side/2`, roughly linear in `side`. A `√side` law would give 6, 8, 11. Both gates **PASS**. ## Reported, not gated diff --git a/deep_causality_cfd/verification/qtt_blunt_body_2d/baseline.txt b/deep_causality_cfd/verification/qtt_blunt_body_2d/baseline.txt index 801d8d342..cb28d5a12 100644 --- a/deep_causality_cfd/verification/qtt_blunt_body_2d/baseline.txt +++ b/deep_causality_cfd/verification/qtt_blunt_body_2d/baseline.txt @@ -1,3 +1,5 @@ + Finished `release` profile [optimized] target(s) in 0.07s + Running `target/release/examples/qtt_blunt_body_2d` === QTT blunt-body bow shock: the Stage-5 rank lever (fitted vs Cartesian capture) === resolution | fitted χ (λ=1) | capture χ (λ=0) @@ -5,11 +7,14 @@ 2^5 | 3 | 16 2^6 | 4 | 32 2^7 | 5 | 61 + [PASS] [tripwire] BB-A fitted χ bounded and resolution-stable: bonds [3, 4, 5] (max 5 <= 12) + [PASS] [tripwire] BB-B Cartesian capture is a growing rank cost: capture [16, 32, 61] vs fitted [3, 4, 5] --- reading --- STATIC rank lever (gated): the bow shock is a constant-physical-radius surface → a step in η in the fitted coordinate (χ 3 → 5, flat), but a curved front on the Cartesian capture - (χ 16 → 61, growing ~√side). Body-fittedness buys the bond reduction — the Stage-5 lever. + (χ 16 → 61, growing ~linearly in side: χ ≈ side/2, not ~√side). Body-fittedness buys the + bond reduction — the Stage-5 lever. DYNAMIC marched rank (reported, OPEN): a plain flux-through-front marcher in the fitted coordinate grows χ to 64 over 6 steps — re-pinning + an exact-RH interface (no flux marched across the front) is the open remainder (design D9 / `qtt_repin_marcher`), not gated here. diff --git a/deep_causality_cfd/verification/qtt_blunt_body_2d/main.rs b/deep_causality_cfd/verification/qtt_blunt_body_2d/main.rs index 941e87f09..e9983c589 100644 --- a/deep_causality_cfd/verification/qtt_blunt_body_2d/main.rs +++ b/deep_causality_cfd/verification/qtt_blunt_body_2d/main.rs @@ -9,7 +9,10 @@ //! coordinate (`BlendedMap` at `λ = 1`, the polar fan) that surface is a line `η = const` — a step in `η`, //! constant in `ξ` — so its quantized-tensor-train bond `χ` is `O(10)` and **resolution-independent**. In //! the Cartesian-capture coordinate (the same `BlendedMap` at `λ = 0`, a rectangle) the identical physical -//! shock is curved on the grid, so `χ` grows with resolution (`χ ~ √side`, the measured capture cost). +//! shock is curved on the grid, so `χ` grows with resolution. The measured capture cost over `2^5–2^7` is +//! `χ = 16, 32, 61` at `side = 32, 64, 128`: roughly **linear in `side`**, `χ ≈ side/2`, well above `√side` +//! (which would give 6, 8, 11). The 3-D `√side` law of `studies/qtt_rank_3d` does not describe this 2-D +//! construction, and the ladder stops at `2^7`, so no exponent is fitted here. //! //! The marcher (`CompressibleMarcher2d`) runs the **same solver** over both coordinates through the //! `MetricProvider` seam (design D8), so this is a clean one-solver comparison: marching in the fitted @@ -121,7 +124,8 @@ fn main() { println!(" 2^{l} | {f:>3} | {c:>3}"); } - // Gate BB-A: the fitted bond is O(10) and resolution-stable (does not grow like √side). + // Gate BB-A: the fitted bond is O(10) and resolution-stable (it does not grow with side the way the + // Cartesian capture's χ ≈ side/2 does; the gate allows at most +1 per refinement). // Evidence class: **tripwire**. These are structural rank claims about this construction, not // comparisons against a published value — verification/README.md classifies this harness as // "structural / rank-lever", gating rank rather than physical accuracy. @@ -174,9 +178,10 @@ fn main() { fitted[0], fitted[2] ); println!( - " (χ {} → {}, growing ~√side). Body-fittedness buys the bond reduction — the Stage-5 lever.", + " (χ {} → {}, growing ~linearly in side: χ ≈ side/2, not ~√side). Body-fittedness buys the", capture[0], capture[2] ); + println!(" bond reduction — the Stage-5 lever."); println!( " DYNAMIC marched rank (reported, OPEN): a plain flux-through-front marcher in the fitted" ); diff --git a/deep_causality_cfd/verification/qtt_cylinder_verification/README.md b/deep_causality_cfd/verification/qtt_cylinder_verification/README.md index c5fc9f215..1bd3e87a6 100644 --- a/deep_causality_cfd/verification/qtt_cylinder_verification/README.md +++ b/deep_causality_cfd/verification/qtt_cylinder_verification/README.md @@ -3,7 +3,7 @@ Verifies the immersed-body QTT solver (`QttImmersed2d`): a cylinder in a periodic free-stream, enforced by **Brinkman volume penalization**, with drag read as a **tensor-train contraction** of the body mask with the velocity deficit. This is the last piece of **Gap 1** of the plasma-blackout analysis (the -immersed body + surface observables). Driven through `CfdFlow::qtt_march`. +immersed body + surface observables). Driven through `CfdFlow::march`. ## The method @@ -13,14 +13,35 @@ rate, driving the velocity to zero inside the solid; the divergence-free project falls out as `F = (1/η) ∫ χ_body ⊙ (u − u_body) dV` — a single train `inner` product, no surface reconstruction — nondimensionalized to `C_d = F_x / (½ ρ U² D)`. -## What is verified (3 gates, exit nonzero on break) +The shipped `config.rs` constants are `ν = 0.05`, `U = 1`, `RADIUS_FRAC = 0.15` on a `[0, 2π]²` box, so +the diameter is `D = 2 · 0.15 · 2π = 1.8850` and the Reynolds number is `Re_D = U·D/ν = 37.7`. That is +the case this harness runs. Neither the program banner nor the gates print `Re`; it follows from the +constants above. -1. **No-slip** — the velocity inside the body (mask > 0.9) falls to the penalization floor. -2. **Accuracy vs bond** — the drag coefficient **converges** as the round bond cap is raised (the headline - QTT-CFD metric: accuracy traded against tensor-train rank). -3. **Physical drag** — the streamwise drag is positive and finite. +## What is verified (5 gates, exit nonzero on break) -## Measured (f64, Apple M3 Max, release, ~1 s) +1. **No-slip** — the velocity inside the body (mask > 0.9) falls to the penalization floor. Tripwire. +2. **Bond saturation** — the drag coefficient stops moving as the round bond cap is raised. Tripwire. + It says the tensor-train compression has converged; it says nothing about whether the compressed + quantity is the right one. +3. **Physical drag** — the streamwise drag is positive and below `DRAG_SANITY_MAX = 100`. Tripwire, a + wide blow-up guard, not an `O(1)` claim. +4. **η ladder** — whether the reported `C_d` settles as the Brinkman parameter is reduced. Reference + class: the `η → 0` limit is what would license calling the penalization integral a drag. +5. **Mask-smoothing ladder** — whether `C_d` settles as the mask skirt width is varied. Reference + class: a `C_d` that tracks the skirt width is reporting a numerical choice. + +Gates 4 and 5 are the ones that constrain the number. On the superseded `L = 5` configuration both +reported `NOT CONVERGING`, and the harness exited nonzero on them rather than passing them over. + +## Measured (superseded `L = 5` configuration, f64, Apple M3 Max, release, ~1 s) + +The table below is the last captured run of this harness. It was taken **before** `L` was raised from +5 (32²) to 8 (256²) and the bond ladder was changed from `[4, 8, 16, 24]` to `[24, 48]`, so it does not +describe the shipped configuration: its `ν = 0.05` is the same, but its `dt = 0.004`, `steps = 40`, and +`η = 0.016` are not. The `L = 8` acceptance run costs hours, not seconds; `verification/README.md` +carries this harness as ⚠ *(offline)* with a `~4-9 h` estimate and the acceptance run pending. +`baseline.txt` is the same superseded capture. ``` Accuracy vs bond: immersed cylinder, drag from the penalization contraction @@ -38,13 +59,19 @@ Accuracy vs bond: immersed cylinder, drag from the penalization contraction - **No-slip:** interior `max|u| ≈ 4.2e-2` vs the free-stream `1.0` — the penalization brakes the flow to a few-percent floor inside the body. +All three readings above are `L = 5` readings. Whether they carry over to `L = 8` is untested here. + ## Honest reading of the absolute C_d -The absolute `C_d ≈ 23.8` is **not** the isolated-cylinder value (DEC reports `C_d ≈ 1.345` at Re 100). -The difference is expected and disclaimed: +The absolute `C_d` reported here is **not** an isolated-cylinder value. The DEC harness reports +`C_d ≈ 1.345`, and that number is measured at `Re = 100`. The difference is expected and disclaimed: -- **~30 % blockage** — the cylinder spans a large fraction of the periodic box (a small body is - under-resolved at 32²), so the effective drag is far above the unconfined value. +- **Reynolds mismatch** — the shipped constants put this case at `Re_D = 37.7`, not at the `Re = 100` + of the DEC cross-reference. The two numbers therefore differ in Reynolds number as well as in + domain and force definition. No published `C_d` at `Re ≈ 37.7` is cited here, so the DEC value is + the only external number in the file and it describes a different flow. +- **~30 % blockage** — the cylinder spans a large fraction of the periodic box, so the effective drag + is far above the unconfined value. - **Penalization-integral force** — `F` counts the momentum sink over the whole *smoothed skirt*, not just pressure + friction on a sharp surface; with a 2-cell smoothing this inflates the magnitude. - **Transient** — a periodic box has no momentum source to hold the free-stream, so `C_d` is read at a @@ -52,8 +79,9 @@ The difference is expected and disclaimed: So the committed DEC `C_d` is a **cross-reference**, not a target: the verification claim is the *convergence trend* + no-slip + positivity, **not** the absolute number. Reproducing an absolute -isolated-cylinder `C_d` would need an inflow/outflow domain (the DEC solver's configuration), which is out -of scope for the periodic QTT solver. +isolated-cylinder `C_d` would need an inflow/outflow domain (the DEC solver's configuration) and a +retune of `ν`, `U`, or the radius onto the reference Reynolds number. Both are out of scope for the +periodic QTT solver as configured. ## Running it @@ -61,21 +89,23 @@ of scope for the periodic QTT solver. cargo run --release -p deep_causality_cfd --example qtt_cylinder_verification ``` -The accuracy-vs-bond table and the closing verdict are on stdout; the cross-reference and any `FAIL:` line -are on stderr (exit nonzero on a broken gate). +The accuracy-vs-bond table, the two parameter ladders, the five gate lines, and the closing verdict are +on stdout; the finest-bond summary and the DEC cross-reference are on stderr. Exit is nonzero on a +broken gate. At the shipped `L = 8` this is an hours-long run, not a smoke test. ## File layout | File | Responsibility | | --- | --- | -| `main.rs` | The `FloatType` alias, the accuracy-vs-bond ladder driven through `CfdFlow::qtt_march`, and the self-verify gate. | -| `config.rs` | Case parameters, the cylinder mask, and the `QttMarchConfig` body case builder. | -| `print_utils.rs` | The no-slip / drag measurement, the table, and the three gates. | -| `baseline.txt` | A captured reference run (f64). | +| `main.rs` | The `FloatType` alias, the grid level `L`, the bond ladder and the two parameter ladders driven through `CfdFlow::march`. | +| `config.rs` | Case parameters, the cylinder mask, the `η` and smoothing ladders, and the `QttMarchConfig` body case builder. | +| `print_utils.rs` | The no-slip / drag measurement, the tables, and the five gates. | +| `baseline.txt` | A captured reference run (f64) at the superseded `L = 5` configuration. | ## Reference - **Angot, P., Bruneau, C.-H. & Fabrie, P.** (1999). *A penalization method to take into account obstacles in incompressible viscous flows.* Numer. Math. **81**, 497–520 — the Brinkman volume-penalization method. - **Peddinti et al.** (2024), Commun. Phys. **7**, 135 — MPS incompressible NS around immersed objects. -- DEC isolated-cylinder cross-reference: `verification/dec_cylinder_verification` (`C_d ≈ 1.345`, Re 100). +- DEC isolated-cylinder cross-reference: `verification/dec_cylinder_verification` (`C_d ≈ 1.345` at + `Re = 100`). This QTT case runs at `Re_D = 37.7`, so the two are not the same flow. diff --git a/deep_causality_cfd/verification/qtt_cylinder_verification/config.rs b/deep_causality_cfd/verification/qtt_cylinder_verification/config.rs index 6ec6b3fc3..2b6436e27 100644 --- a/deep_causality_cfd/verification/qtt_cylinder_verification/config.rs +++ b/deep_causality_cfd/verification/qtt_cylinder_verification/config.rs @@ -9,6 +9,10 @@ //! A cylinder is immersed in a periodic free-stream by **Brinkman volume penalization** (a smoothed //! mask drives the velocity to zero inside the body). The drag falls out as a tensor-train contraction //! of the mask with the velocity deficit. The box is `[0, 2π]²`; precision enters once through [`ft`]. +//! +//! The penalization method and its `η → 0` convergence rate (`O(η^{3/4})`) are due to Angot, Bruneau & +//! Fabrie, "A penalization method to take into account obstacles in incompressible viscous flows", +//! Numerische Mathematik 81(4):497–520, 1999 (see `deep_causality_cfd/papers/`). use crate::FloatType; use deep_causality_cfd::{ @@ -40,7 +44,13 @@ pub const ETA: f64 = 0.012; pub const U_INF: f64 = 1.0; /// Cylinder radius as a fraction of the box length `2π`. pub const RADIUS_FRAC: f64 = 0.15; -/// Mask smoothing width in cells. +/// Mask smoothing width in cells: the `tanh` body mask transitions over `SMOOTH_CELLS·dx`. This is a +/// numerical regularization parameter, not a physical constant, and it has no external source. The +/// value 2.0 spreads the transition over more than one cell; a one-cell step aliases on the grid. +/// It is load-bearing where the penalization layer is under-resolved: §5b measured the reported `C_d` +/// moving 6.1× across 0.5→4 cells at the old `L = 5`. At the resolved envelope (`L = 8`, `η` at the +/// `dx²/ν` floor) the physical layer `√(ην) ≈ dx` sets the wall, so the 2-cell mask no longer +/// dominates the drag. See `close-qtt-solver-envelope` and AUDIT-REPORT §4b, §5b. pub const SMOOTH_CELLS: f64 = 2.0; /// Committed DEC isolated-cylinder drag at Re 100 (`dec_cylinder_verification`) — the **cross-reference** diff --git a/deep_causality_cfd/verification/qtt_cylinder_verification/main.rs b/deep_causality_cfd/verification/qtt_cylinder_verification/main.rs index ba447e87d..930dcdee9 100644 --- a/deep_causality_cfd/verification/qtt_cylinder_verification/main.rs +++ b/deep_causality_cfd/verification/qtt_cylinder_verification/main.rs @@ -10,17 +10,25 @@ //! body — no cut cells), with drag read as a **tensor-train contraction** of the mask with the velocity //! deficit. This closes Gap 1 of the plasma-blackout analysis (the immersed body + surface observables). //! -//! `main` runs the case through `CfdFlow::march` at a ladder of **bond caps** and self-verifies -//! (exit nonzero on break): +//! `main` runs the case through `CfdFlow::march` at a ladder of **bond caps**, then sweeps the +//! penalization parameter and the mask smoothing width, and self-verifies on five gates (exit +//! nonzero on break): //! //! 1. **No-slip** — the velocity inside the body falls to the penalization floor. -//! 2. **Accuracy vs bond** — the drag coefficient converges as the tensor-train is allowed more rank -//! (the headline QTT-CFD metric). -//! 3. **Physical drag** — the streamwise drag is positive and `O(1)`. +//! 2. **Bond saturation** — the drag coefficient stops moving as the tensor-train is allowed more +//! rank. This gates the *compression*, not the compressed quantity. +//! 3. **Physical drag** — the streamwise drag is positive and finite. A blow-up tripwire against a +//! wide guard (`DRAG_SANITY_MAX = 100`), not a claim that `C_d` is `O(1)`: the superseded `L = 5` +//! configuration reported `C_d ≈ 23.8`, inflated by the smoothing skirt and blockage. +//! 4. **η ladder** and 5. **mask-smoothing ladder** — whether the reported `C_d` settles at all as +//! the penalization parameter and the mask skirt width are swept. These are the two gates that +//! constrain the number, and both are reference class. //! //! The committed DEC isolated-cylinder `C_d` is reported as a **cross-reference**, disclaimed for the //! periodic-blockage difference (the periodic penalized box is not the DEC inflow/outflow configuration, -//! so an absolute match is not claimed). +//! so an absolute match is not claimed). It is also at a different Reynolds number: the shipped +//! `config.rs` constants give `Re_D = U·D/ν = 1.0 · 1.8850 / 0.05 = 37.7`, while the DEC harness +//! measures its `C_d ≈ 1.345` at `Re = 100`. `Re` is not printed anywhere in this program. //! //! Usage: //! @@ -44,6 +52,17 @@ pub type FloatType = f64; /// `L = 8` resolves four of the five η-ladder points (`η ≥ dx²/ν = 0.012`); the smallest, `η = 0.008`, /// is below that floor and is the under-resolved tail the ladder still carries (the full ladder is /// resolved only at `L = 9`). See the config `DT`/`ETA` derivations and `main`'s bond-cap note. +/// +/// The body is resolved by `2·RADIUS_FRAC·2^L = 76.8` cells across the diameter, and the nominal disc +/// covers `π·(D/2Δx)² ≈ 4.6e3` of the `65 536` cells (the `mask > 0.9` interior the no-slip +/// diagnostic counts is smaller, since the `tanh` skirt spans 2 cells). +/// +/// `L = 8` is a **cost** choice, stopped one level short of the `L = 9` the `η` ladder would need. +/// Even at `L = 8` the harness runs for hours, which is why `verification/README.md` carries it as +/// offline with a `~4-9 h` estimate. **No grid-convergence study was run.** The three ladders here +/// sweep the bond cap, `η`, and the mask smoothing width, all at fixed `L`, so nothing measured in +/// this harness shows the reported `C_d` to be grid-independent. That would need an `L` ladder, and +/// there is none. const L: usize = 8; fn main() { diff --git a/deep_causality_cfd/verification/qtt_cylinder_verification/print_utils.rs b/deep_causality_cfd/verification/qtt_cylinder_verification/print_utils.rs index 0c9f64c0d..7602905e5 100644 --- a/deep_causality_cfd/verification/qtt_cylinder_verification/print_utils.rs +++ b/deep_causality_cfd/verification/qtt_cylinder_verification/print_utils.rs @@ -14,24 +14,38 @@ use deep_causality_cfd::{EvidenceClass, LadderOutcome, Report, dequantize_2d}; /// Pinned no-slip floor: interior speed must fall below this fraction of the free-stream. /// -/// Evidence class: **tripwire**. Note it is invariant across the whole smoothing ladder (measured: -/// interior max|u| stays 4.19e-2–4.51e-2 while `C_d` moves 6.1×), so it constrains the wall -/// treatment but says nothing about the reported drag. That is why the ladders below exist. +/// Evidence class: **tripwire**. Note it is invariant across the whole smoothing ladder: at the +/// superseded `L = 5` configuration the interior max|u| stayed 4.19e-2–4.51e-2 while `C_d` moved +/// 6.1× (AUDIT-REPORT §5b). So it constrains the wall treatment and says nothing about the reported +/// drag. That is why the ladders below exist. const NO_SLIP_FLOOR: f64 = 0.15; /// Pinned bond-convergence bound on the relative change between the two finest bond caps. /// -/// Tightened from `0.10`. The measured successive change at the two finest caps is `~8e-13` -/// relative, so the old bound sat eleven orders of magnitude above the phenomenon it gated and -/// would have passed a solver that had not saturated in bond at all. `1e-6` is still ~6 orders -/// above the measurement, which absorbs cross-platform floating-point differences while actually -/// constraining saturation. +/// Tightened from `0.10`. The successive change at the two finest caps measured `7.9e-13` relative +/// (bond 16 vs 24, at the superseded `L = 5` configuration), so the old bound sat eleven orders of +/// magnitude above the phenomenon it gated and would have passed a solver that had not saturated in +/// bond at all. `1e-6` is still ~6 orders above that measurement, which absorbs cross-platform +/// floating-point differences while actually constraining saturation. The shipped `L = 8` ladder +/// (`[24, 48]`) has not been measured against this bound; that acceptance run is the pending offline +/// item recorded in `verification/README.md`. const CONVERGENCE_BOUND: f64 = 1.0e-6; -/// Pinned blow-up guard on the drag coefficient. +/// Pinned blow-up guard on the drag coefficient. A **wide non-divergence bracket**, not a physicality +/// bound. /// -/// This is a positivity / NaN / divergence tripwire, **not** a claim that the quantity is `O(1)`: -/// the configuration produces `C_d ≈ 23.8`, inflated by the smoothing skirt and blockage. The -/// former doc comment described it as an "O(1) drag coefficient" bound, which contradicted both the -/// value and the measurement. +/// What it catches: a negative, NaN, or diverged `C_d`. What it does not catch: any regression that +/// leaves the drag inside `(0, 100)`. The gap is wide on purpose and wide in fact. At the superseded +/// `L = 5` configuration the harness reported `C_d = 23.7577`, and the smoothing ladder alone moved +/// the reported value across `7.70 … 47.27` without ever leaving this bracket. +/// +/// The magnitude is not an isolated-cylinder `C_d`. It is inflated by the ~30 % blockage of the +/// periodic box and by the penalization integral counting the momentum sink over the whole smoothed +/// mask skirt rather than pressure plus friction on a sharp surface. The README's "Honest reading of +/// the absolute C_d" lists those causes plus the transient horizon and the Reynolds mismatch against +/// the DEC cross-reference. An earlier doc comment called this an "O(1) drag coefficient" bound; that +/// was wrong on both the value and the intent. +/// +/// Tightening it to bracket a measured value (for example `[20, 30]`) would make it discriminating, +/// and that is a gate-bound change, deliberately not made here. const DRAG_SANITY_MAX: f64 = 100.0; /// Relative bound for judging a parameter ladder as settled. /// diff --git a/deep_causality_cfd/verification/qtt_park2t_blackout/README.md b/deep_causality_cfd/verification/qtt_park2t_blackout/README.md index 2c656f312..b4d2737c3 100644 --- a/deep_causality_cfd/verification/qtt_park2t_blackout/README.md +++ b/deep_causality_cfd/verification/qtt_park2t_blackout/README.md @@ -31,16 +31,26 @@ configured comms band, raising the GNSS/comms-denied flag and accumulating the b ## What it verifies (exit nonzero on break) -The six LER acceptance gates: - -| Gate | Criterion | -|---|---| -| (i) | **Stability at stiffness** — `τ = Δt/1000` stays bounded/monotone where explicit Euler diverges | -| (ii) | **Exponential exactness** — the closed form equals `x_eq − (x_eq − x)·e^{−Δt/τ}` to round-off | -| (iii) | **Rankine–Hugoniot band** — peak `T_post` lands in the ~10⁴ K band at `M ≈ 25` (not the cold isentropic value) | -| (iv) | **Lag + Saha limit** — the ionization lag is real, `τ_ion` varies with `T` (grounded, not a constant), and `τ → 0` recovers Saha | -| (v) | **Counterfactual path-dependence** — two temperature histories reaching the same target carry different ionization (the LER memory) | -| (vi) | **Electrons produced** — the marched electron density is strictly positive | +The six LER acceptance gates, each printed with its evidence class (`verification/README.md` +defines the convention): + +| Gate | Class | Criterion | +|---|---|---| +| (i) | `[tripwire]` | **Stability at stiffness** — at `τ = Δt/1000` the relaxation stays monotone inside `[x, x_eq]` over 50 steps and settles to within 1.0 of `x_eq`, where a single explicit Euler rate step overshoots past `100·x_eq` | +| (ii) | `[reference]` | **Relaxation kernel vs an independent reference** — `ler_step` agrees with a 10⁶-substep forward-Euler integration of `dx/dt = (x_eq − x)/τ` to `1e-6` relative | +| (iii) | `[tripwire]` | **Rankine–Hugoniot band** — `T_post` at `M = 25` lands inside `(1e4, 1e5) K`, not the cold isentropic value | +| (iv) | `[tripwire]` | **Ionization lag real, rate grounded in `T`** — the associative-ionization Arrhenius rate is higher at 9000 K than at 6000 K, and a short step leaves `α` strictly below `α_eq` | +| (v) | `[tripwire]` | **Counterfactual path-dependence** — two temperature histories reaching the same target carry different ionization (the LER memory) | +| (vi) | `[tripwire]` | **Ionized species present** — the marched electron density is strictly positive | + +Gate (ii) is the only `[reference]` gate here: the sub-stepped integration is a derivation separate +from `ler_step`, and the `1e-6` tolerance is sized from that reference's own truncation error +(`a²/2N ≈ 4.5e-8`), not from the measurement. It replaced an earlier "exponential exactness to +round-off" check that compared `ler_step` against a re-transcription of its own body, which no input +could make fail. Gate (iv) lost its former "`τ → 0` recovers Saha" conjunct for the same reason: that +conjunct exercised an explicit `return x_eq` early exit and held for every input. The two surviving +conjuncts are falsifiable — invert the Arrhenius activation exponent and the rate check fails; make +`ler_step` jump straight to equilibrium and the lag check fails. ## Tier-A disclaimers (honest scope) diff --git a/deep_causality_cfd/verification/qtt_park2t_blackout/baseline.txt b/deep_causality_cfd/verification/qtt_park2t_blackout/baseline.txt index f9b172aea..7181af080 100644 --- a/deep_causality_cfd/verification/qtt_park2t_blackout/baseline.txt +++ b/deep_causality_cfd/verification/qtt_park2t_blackout/baseline.txt @@ -1,28 +1,30 @@ + Finished `release` profile [optimized] target(s) in 0.08s + Running `target/release/examples/qtt_park2t_blackout` === QTT Park-2T plasma blackout (Tier-A, LER on the incompressible rollout) === Case: M = 25, T_inf = 250 K, n_tot = 1.0e22 m^-3, steps = 40, grid 32^2, precision f64 + --- Blackout observables (Tier-A, incompressible rollout) --- peak electron density n_e : 1.000e22 m^-3 - peak plasma frequency w_p : 5.641e12 rad/s + peak plasma frequency ω_p : 5.641e12 rad/s comms band (config) : 9.400e9 rad/s blackout dwell : 1.6000e-1 s +--- Published reference cross-references (Tier-A disclaimers) --- + RAM-C II peak n_e (~71 km) : ~1.0e19 m^-3 [order-of-magnitude anchor] + DISCLAIMER: Tier-A rides the INCOMPRESSIBLE rollout; T_tr is a recovery-temperature + reconstruction (Rankine–Hugoniot jump + ½|u|²/c_p), NOT a true post-shock path. + Two-temperature (T_ve=T_e) lumping over-predicts peak n_e ~2x (Farbar–Boyd–Martin 2013); + the operator split is first-order Lie. No absolute coupled-CFD match is claimed. + Anchors: RAM-C II (NASA TN), Fluid Dynamics 2022, Aiken–Carter–Boyd 2025, Park 2-T, Saha. + --- LER acceptance gates --- - [PASS] (i) stability at stiffness (tau = dt/1000) - [PASS] (ii) closed-form exponential exactness - [PASS] (iii) RH jump peak T_post in ~10^4 K band - [PASS] (iv) ionization lag real + Saha limit - [PASS] (v) counterfactual path-dependence - [PASS] (vi) ionized species present (n_e > 0) + [PASS] [tripwire] (i) stability at stiffness (τ=Δt/1000) + [PASS] [reference] (ii) relaxation kernel vs independent sub-stepped reference + [PASS] [tripwire] (iii) RH jump peak T_post in ~10⁴ K band + [PASS] [tripwire] (iv) ionization lag real + rate grounded in T + [PASS] [tripwire] (v) counterfactual path-dependence + [PASS] [tripwire] (vi) ionized species present (n_e>0) === All six LER gates passed — Gap-2 Tier-A slice verified. === - -Notes (Tier-A disclaimers): - - Rides the INCOMPRESSIBLE QTT rollout; T_tr is a recovery-temperature reconstruction - (mandatory Rankine-Hugoniot jump + 1/2|u|^2/c_p), NOT a true post-shock thermodynamic path. - - Saha equilibrium at the frozen RH post-shock temperature drives near-full ionization here - (n_e ~ n_tot); the two-temperature (T_ve = T_e) lumping over-predicts peak n_e by ~2x - (Farbar-Boyd-Martin 2013), and real-gas dissociation caps the post-shock temperature lower, - so this peak n_e is an over-prediction relative to the RAM-C II ~1e19 m^-3 anchor. No absolute - coupled-CFD match is claimed; the published values are reported as cross-references. diff --git a/deep_causality_cfd/verification/qtt_park2t_blackout/config.rs b/deep_causality_cfd/verification/qtt_park2t_blackout/config.rs index 33ee20c54..500b82799 100644 --- a/deep_causality_cfd/verification/qtt_park2t_blackout/config.rs +++ b/deep_causality_cfd/verification/qtt_park2t_blackout/config.rs @@ -27,13 +27,21 @@ pub const NU: f64 = 0.05; pub const DT: f64 = 0.004; /// Marched relaxation steps (the LER ionization dwell). pub const STEPS: usize = 40; -/// Brinkman penalization parameter (small → hard wall). +/// Brinkman penalization parameter (small → hard wall). Pinned by the explicit-stability ratio +/// `dt/η = 0.25` (`dt = 0.004`), not a wall-error target. This harness gates the LER ionization +/// criteria (electron density, blackout), not drag, so the penalization-layer resolution `√(ην)` is +/// not a gated accuracy lever here. If a drag or wall-quantity gate is added, re-derive `η` from the +/// resolution constraint `η ≥ dx²/ν`, as `qtt_cylinder_verification` does (`close-qtt-solver-envelope`). pub const ETA: f64 = 0.016; /// Free-stream speed of the incompressible carrier (the reconstruction rides this field). pub const U_INF: f64 = 1.0; /// Forebody radius as a fraction of the box length `2π`. pub const RADIUS_FRAC: f64 = 0.18; -/// Mask smoothing width in cells. +/// Mask smoothing width in cells: the `tanh` forebody mask transitions over `SMOOTH_CELLS·dx`. This +/// is a numerical regularization parameter, not a physical constant. The value 2.0 spreads the +/// transition over more than one cell; a one-cell step aliases. This harness gates the LER ionization +/// criteria, not drag, so the mask width is not a gated accuracy lever here. See the +/// `qtt_cylinder_verification` `SMOOTH_CELLS` note and AUDIT-REPORT §4b, §5b for its drag sensitivity. pub const SMOOTH_CELLS: f64 = 2.0; // ── Flight condition (RAM-C-like reentry) ──────────────────────────────── diff --git a/deep_causality_cfd/verification/qtt_reentry_3d/README.md b/deep_causality_cfd/verification/qtt_reentry_3d/README.md index 60a705b42..01e2329fc 100644 --- a/deep_causality_cfd/verification/qtt_reentry_3d/README.md +++ b/deep_causality_cfd/verification/qtt_reentry_3d/README.md @@ -5,8 +5,8 @@ The 3-D form of the `qtt_blunt_body_2d` rank lever, on the crate's serial `x`-`y nose at a constant *physical* radius `R`. In a body-fitted spherical coordinate, with radial axis `ζ` across the shock, that surface is a step in `ζ` and therefore a function of one axis, so its bond `χ` is `O(1)` and resolution-independent. Sampled on a Cartesian `2^l × 2^l × 2^l` lattice the -identical physical shell is curved, so `χ` grows with resolution, following the `qtt_rank_3d` upper -bound. +identical physical shell is curved, so `χ` grows with resolution. How fast it grows is the standing +`studies/qtt_rank_3d` question; this harness gates that it grows, not the exponent. ```bash cargo run --release -p deep_causality_cfd --example qtt_reentry_3d @@ -38,7 +38,7 @@ body-fit metric yet and the marcher runs Cartesian. Both gates are **structural**. They bound *rank*, not physical accuracy. -## Measured (f64, 2^3–2^5, ~3 s) +## Measured (f64, 2^3–2^5, <1 s) | resolution | fitted `χ` (fn ζ) | Cartesian `χ` | |---|---|---| @@ -46,7 +46,10 @@ Both gates are **structural**. They bound *rank*, not physical accuracy. | 2^4 | 4 | 30 | | 2^5 | 4 | 59 | -Fitted runs 2 to 4 and plateaus; the capture cost runs 10 to 59. Both gates **PASS**. +Fitted runs 2 to 4 and plateaus. The capture cost runs 10 to 59: a 5.9× rise for a 4× refinement, +so `χ ~ side^1.3`, at or above linear in `side`. A `√side` law would give 3, 4, 6. The `side^0.53` +exponent `studies/qtt_rank_3d` fits comes from a different shock construction over a wider `16³–128³` +ladder; this ladder does not reproduce it. Both gates **PASS**. ## Reported, not gated diff --git a/deep_causality_cfd/verification/qtt_reentry_3d/baseline.txt b/deep_causality_cfd/verification/qtt_reentry_3d/baseline.txt index 5d5a43094..8d3378e5e 100644 --- a/deep_causality_cfd/verification/qtt_reentry_3d/baseline.txt +++ b/deep_causality_cfd/verification/qtt_reentry_3d/baseline.txt @@ -1,3 +1,5 @@ + Finished `release` profile [optimized] target(s) in 0.07s + Running `target/release/examples/qtt_reentry_3d` === QTT 3-D re-entry forebody sheath: the Stage-6 rank lever === resolution | fitted χ (fn ζ) | Cartesian χ @@ -5,6 +7,8 @@ 2^3 | 2 | 10 2^4 | 4 | 30 2^5 | 4 | 59 + [PASS] [tripwire] RE-A fitted forebody χ bounded and resolution-stable: bonds [2, 4, 4] (max 4 <= 8) + [PASS] [tripwire] RE-B Cartesian forebody capture is a growing rank cost: cart [10, 30, 59] vs fitted [2, 4, 4] --- reading --- FOREBODY (gated): the bow-shock sheath is a constant-radius surface → a step in the radial diff --git a/deep_causality_cfd/verification/qtt_sod/README.md b/deep_causality_cfd/verification/qtt_sod/README.md index e9c4bb6fb..a23dc60b1 100644 --- a/deep_causality_cfd/verification/qtt_sod/README.md +++ b/deep_causality_cfd/verification/qtt_sod/README.md @@ -11,17 +11,22 @@ cargo run --release -p deep_causality_cfd --example qtt_sod ## What it does `CompressibleEuler1d` carries the conservative state `U = (ρ, ρu, ρE)` as three tensor trains and -marches the Rusanov (local Lax–Friedrichs) update. The update rearranges to a **conservative central -flux difference plus a scalar artificial viscosity**, +marches a **global Lax–Friedrichs** update: Rusanov with a global wave-speed estimate. The +dissipation coefficient `s_max` is one maximum over the whole domain, not a per-face maximum over the +two states adjacent to a face, so the coefficient is uniform in space instead of varying face by +face. The update rearranges to a **conservative central flux difference plus a scalar artificial +viscosity**, ```text -dU/dt = −∂ₓF(U) + ½·s_max·Δx·∂²ₓU, s_max = max(|u| + c), +dU/dt = −∂ₓF(U) + ½·s_max·Δx·∂²ₓU, s_max = max over all cells of (|u| + c), ``` so it is assembled from the §0 `gradient` / `laplacian` MPOs (conservative, telescoping) applied to the flux and the state, recompressed each step. The ideal-gas EOS `p = (γ−1)(E − ½ρu²)` and the flux are evaluated pointwise (dequantize → compute → requantize); the rank-preserving TT-cross -(`apply_nonlinear`) form is the large-`L` upgrade. +(`apply_nonlinear`) form is the large-`L` upgrade. A per-face local wave speed, which is what makes a +scheme local Lax–Friedrichs, is the other named upgrade; it is not implemented, and the harness is +gated in its global form. The Sod initial data (`ρ,u,p`: `1,0,1` | `0.125,0,0.1`, `γ=1.4`) is marched to `t = 0.2` on the wide domain `[−1,1]` (so the periodic boundary-jump waves stay outside the measurement window `|x| ≤ 0.5`) @@ -30,9 +35,9 @@ and compared to the exact Riemann solution. ## What it verifies (exit nonzero on break) The L1 error of density / velocity / pressure against the **exact Riemann solution** over `|x| ≤ 0.5`, -within a recorded tolerance (`0.03`). First-order Rusanov smears the contact, so the bound is on mean -accuracy; the star pressure `p* = 0.3031` (the canonical Sod value), the left expansion fan, the -contact, and the right shock are all at the correct positions/speeds. +within a recorded tolerance (`0.03`). The first-order global Lax–Friedrichs update smears the contact, +so the bound is on mean accuracy; the star pressure `p* = 0.3031` (the canonical Sod value), the left +expansion fan, the contact, and the right shock are all at the correct positions/speeds. The companion unit tests (`tests/solvers/qtt/compressible_tests.rs`) gate **conservation** (`∫ρ`, `∫ρu`, `∫ρE` preserved to the rounding floor on a periodic smooth state), **free-stream preservation** (a diff --git a/deep_causality_cfd/verification/qtt_sod/baseline.txt b/deep_causality_cfd/verification/qtt_sod/baseline.txt index 308e3b1e6..5a716acb5 100644 --- a/deep_causality_cfd/verification/qtt_sod/baseline.txt +++ b/deep_causality_cfd/verification/qtt_sod/baseline.txt @@ -1,3 +1,5 @@ + Finished `release` profile [optimized] target(s) in 0.22s + Running `target/release/examples/qtt_sod` === QTT Sod shock tube: compressible Euler (Rusanov, tensor-train) === Case: gamma = 1.4, CFL = 0.4, t = 0.2, domain [-1, 1], 512 cells, precision f64 @@ -10,18 +12,9 @@ Profiles (numeric vs exact) at a few stations: 0.300 | 0.2656 / 0.2656 | 0.3033 / 0.3031 0.450 | 0.1250 / 0.1250 | 0.1000 / 0.1000 ---- Sod gate (L1 error over |x| <= 0.5, tol 0.03) --- - [PASS] density L1 error = 0.0175 - [PASS] velocity L1 error = 0.0274 - [PASS] pressure L1 error = 0.0151 +--- Sod gate (L1 error over |x| <= 0.5, tol 0.03; reference: exact Riemann solution) --- + [PASS] [reference] density L1 error = 0.0175 + [PASS] [reference] velocity L1 error = 0.0274 + [PASS] [reference] pressure L1 error = 0.0151 === Sod profiles match the exact Riemann solution — compressible flux verified. === - -Notes: - - 1-D conservative compressible Euler (rho, rho*u, rho*E) marched as three tensor trains. - - Ideal-gas EOS + Rusanov (local Lax-Friedrichs) flux; the Rusanov update is a conservative central - flux difference plus a scalar artificial viscosity, assembled from the gradient/laplacian MPOs. - - First-order Rusanov smears the contact discontinuity (the L1 tolerance reflects mean accuracy); - the star pressure p* = 0.3031 (the canonical Sod value) and all wave speeds are correct. - - The nonlinear flux/EOS are evaluated pointwise (dequantize -> compute -> requantize); the - rank-preserving TT-cross (apply_nonlinear) form is the large-L upgrade. diff --git a/deep_causality_cfd/verification/qtt_taylor_green_verification/README.md b/deep_causality_cfd/verification/qtt_taylor_green_verification/README.md index fbaa9beea..61abaaca5 100644 --- a/deep_causality_cfd/verification/qtt_taylor_green_verification/README.md +++ b/deep_causality_cfd/verification/qtt_taylor_green_verification/README.md @@ -4,7 +4,7 @@ Verifies the `QttIncompressible2d` solver — a 2-D incompressible Navier–Stok in, and evolves entirely as, a **tensor train** (the CFD ↔ tensor-network bridge) — against the closed-form 2-D **Taylor–Green vortex** (Taylor & Green, 1937), the standard analytic reference for a periodic incompressible solver. The whole rollout is driven through the **CfdFlow** DSL -(`CfdFlow::qtt_march`), so this also exercises the new DSL wiring and observable extraction. +(`CfdFlow::march`), so this also exercises the new DSL wiring and observable extraction. ## The reference @@ -25,14 +25,18 @@ and the decay rate is analytic. 1. **Convergence to the published reference.** A `2^L × 2^L` refinement ladder (`L = 3, 4, 5` → 8², 16², 32²) marches the seed to `t = 0.2` and compares the final field to `e^{-2νt}` × the analytic vortex. The max-norm error must **strictly decrease under refinement** to within a pinned bound, at the - expected **~2nd order** (centered finite differences + the spectral projection). + expected **~2nd order in space** (centered finite differences + the spectral projection). Time + integration is first-order (explicit Euler) and `dt` is held fixed across the ladder, so the + measured order is the spatial one. 2. **Correct nonlinear convection.** This is the subtle one. Because single-mode Taylor–Green's convective term is a *pure gradient the projection removes*, the marched decay is **insensitive to whether convection is computed correctly** — a solver with a broken (or zero) `u·∇u` would still pass - gate 1. So the nonlinear term is checked **directly**: the solver's `u·∇u` (`u⊙∂ₓu + v⊙∂ᵧu`, the fused - Hadamard the marcher uses) must reproduce the closed form `−½ sin(2x)`, with a small error and a - **non-zero** amplitude. + gate 1. So the nonlinear term is checked **directly**, through the **shipped** convection path: the + harness calls the solver's own `rate_pair` on a zero-viscosity instance, which returns the pure + convection `−(u·∇)u`, and that must reproduce the closed form `−½ sin(2x)` with a small error and a + **non-zero** amplitude. Calling the shipped path matters: a re-assembled copy of the operator would + pass even if the marcher's own convection were wrong. 3. **Incompressibility.** The post-projection divergence residual stays at the projection floor. @@ -46,11 +50,20 @@ Convergence: refinement ladder vs the analytic e^(-2 nu t) decay N = 8 max_err = 9.789e-4 l2_err = 4.894e-4 order = -- bond = 8 divergence = 1.06e-14 N = 16 max_err = 2.411e-4 l2_err = 1.206e-4 order = 2.02 bond = 16 divergence = 1.45e-14 N = 32 max_err = 5.316e-5 l2_err = 2.658e-5 order = 2.18 bond = 32 divergence = 4.14e-14 - observed order = 2.18 (centered FD + spectral projection -> 2) + observed order = 2.18 (2nd-order in space: centered FD + spectral projection; 1st-order in time: explicit Euler at fixed dt) ``` -- **Convergence:** error `9.8e-4 → 2.4e-4 → 5.3e-5`, observed order **2.02 → 2.18** — clean 2nd-order - convergence to the analytic decay. Finest-grid (32²) max error **5.3e-5**. +- **Convergence:** error `9.8e-4 → 2.4e-4 → 5.3e-5`, observed order **2.02 → 2.18**: 2nd-order in space + (centered FD + spectral projection), first-order in time (explicit Euler at fixed `dt`), so the + ladder measures the spatial order. Finest default-grid (32²) max error **5.3e-5**. +- **Temporal floor, and the ladder's maximum usable length.** Because `dt` is held fixed, the + first-order Euler error is a floor under the total error, and it has the **opposite sign** to the + spatial error. The signed error of the decay factor runs `+9.8e-4, +2.4e-4, +5.3e-5, +5.9e-6, + −5.9e-6, −8.8e-6` for `N = 8 … 256`: the two contributions **cancel** near `N = 64–128`. So the + `N = 64` observed order of **3.16 is a cancellation artifact, not super-convergence**, and by + `N = 128` the order collapses to **0.02**. **Use `max_level = 5` (the committed default);** at the + documented `max_level 7` the finest-pair order falls below `MIN_ORDER` and the harness **fails**. + Making the extended ladder honest needs a two-sided order gate or `dt` refined as `dt ∝ dx²`. - **Convection:** `u·∇u` vs `−½ sin(2x)` — max abs error **3.2e-3** at 32² (the centered-difference truncation of `∂ₓ` on the field), signal amplitude 0.5 → the nonlinear term is **real and correct**. - **Divergence:** **~1e-14** at every level — the spectral Leray projection is exact to machine @@ -84,9 +97,9 @@ gate breaks. | File | Responsibility | | --- | --- | -| `main.rs` | The `FloatType` alias, the refinement ladder driven through `CfdFlow::qtt_march`, and the self-verify gate. | -| `config.rs` | Case parameters, the `QttMarchConfigBuilder` case, the analytic-reference error/compression helpers, and the convection-operator check. | -| `print_utils.rs` | The CSV artifact, the stderr summary, and the four published-reference gates. | +| `main.rs` | The `FloatType` alias, the refinement ladder driven through `CfdFlow::march`, the convection-operator check (through the shipped `rate_pair`), and the call into the self-verify gate. | +| `config.rs` | Case parameters (`NU`, `DT`, `STEPS`, `MAX_BOND`), the `QttMarchConfigBuilder` case builder, and the analytic-field helpers (`ft`, `spacing`, `decay`, `tg_u`, `tg_v`, `trunc`). | +| `print_utils.rs` | The analytic-reference error and compression measurement (`measure`), the rendered ladder and summary, and the published-reference gates (`verify`). | | `baseline.txt` | A captured reference run (f64). | ## Precision as a parameter diff --git a/deep_causality_cfd/verification/qtt_taylor_green_verification/baseline.txt b/deep_causality_cfd/verification/qtt_taylor_green_verification/baseline.txt index 90887d06e..533fc9e68 100644 --- a/deep_causality_cfd/verification/qtt_taylor_green_verification/baseline.txt +++ b/deep_causality_cfd/verification/qtt_taylor_green_verification/baseline.txt @@ -6,7 +6,7 @@ Convergence: refinement ladder vs the analytic e^(-2 nu t) decay N = 8 max_err = 9.789e-4 l2_err = 4.894e-4 order = -- bond = 8 divergence = 1.06e-14 N = 16 max_err = 2.411e-4 l2_err = 1.206e-4 order = 2.02 bond = 16 divergence = 1.45e-14 N = 32 max_err = 5.316e-5 l2_err = 2.658e-5 order = 2.18 bond = 32 divergence = 4.14e-14 - observed order = 2.18 (centered FD + spectral projection -> 2) + observed order = 2.18 (2nd-order in space: centered FD + spectral projection; 1st-order in time: explicit Euler at fixed dt) Convection: nonlinear u.grad(u), u-component vs the closed form -1/2 sin(2x) max abs error = 3.207e-3 (computed amplitude 0.497 vs analytic 0.500) @@ -23,5 +23,5 @@ Compression: MPS bond vs dense storage at the finest grid [PASS] [reference] convection error within bound: 3.207e-3 vs bound 1.000e-2 (closed form -1/2 sin 2x) [PASS] [tripwire] post-projection divergence at the truncation floor: 4.140e-14 vs bound 1.000e-6 (projector identity; this measures TT truncation) -Taylor-Green vortex reproduced: 2nd-order convergence to the analytic e^(-2 nu t) decay, +Taylor-Green vortex reproduced: 2nd-order-in-space convergence (1st-order in time, explicit Euler) to the analytic e^(-2 nu t) decay, correct nonlinear convection, and divergence-free to machine precision. diff --git a/deep_causality_cfd/verification/qtt_taylor_green_verification/config.rs b/deep_causality_cfd/verification/qtt_taylor_green_verification/config.rs index 62b4a999b..b547699ae 100644 --- a/deep_causality_cfd/verification/qtt_taylor_green_verification/config.rs +++ b/deep_causality_cfd/verification/qtt_taylor_green_verification/config.rs @@ -24,9 +24,35 @@ use deep_causality_tensor::Truncation; /// Kinematic viscosity (exact specification). pub const NU: f64 = 0.05; -/// Explicit-Euler time step (exact specification). +/// Explicit-Euler time step (exact specification). Time integration is **first-order**, and the +/// convergence ladder refines only the spatial grid `N` at this fixed `dt`, so the measured order is +/// the **spatial** order (centered FD + spectral projection, formally 2). +/// +/// **The fixed-`dt` Euler error is a temporal floor, and it bounds how far the ladder may be +/// extended.** For mode-1 Taylor–Green the discrete decay factor is `(1 − 2ν·dt·s)^STEPS` with +/// `s = (2 − 2cos dx)/dx²`, against the exact `exp(−2νt)`. The *signed* error of that factor is: +/// +/// ```text +/// N = 8 +9.789e-4 +/// N = 16 +2.411e-4 order 2.02 +/// N = 32 +5.316e-5 order 2.18 +/// N = 64 +5.948e-6 order 3.16 <- spatial error now comparable to the temporal floor +/// N = 128 −5.868e-6 order 0.02 <- SIGN CHANGE: the two errors cancel +/// N = 256 −8.823e-6 order −0.59 <- settling onto the temporal floor (≈ −2e-5) +/// ``` +/// +/// The positive spatial error and the negative temporal error cancel near `N = 64–128`. So the +/// `N = 64` "order 3.16" is a **cancellation artifact, not super-convergence**, and beyond it the +/// observed order collapses. **Maximum usable ladder length: `max_level = 5` (the committed default, +/// `N = 32`)**, where the spatial error `5.3e-5` still sits well above the floor and the 2.02/2.18 +/// orders are a legitimate spatial-order measurement. Running the harness at the documented +/// `max_level 7` yields a finest-pair order of ~0.02 and **fails** the `MIN_ORDER` gate in +/// `print_utils` — a documented user action that produces a FAIL. Fixing that needs either a two-sided order +/// gate or `dt` refined with `dx` (`dt ∝ dx²`); both are code changes, recorded and not taken here. pub const DT: f64 = 0.01; -/// Number of marched steps (horizon `t = DT·STEPS = 0.2`). +/// Number of marched steps (horizon `t = DT·STEPS = 0.2`). Fixed across the ladder, so every level +/// carries the same first-order-in-time Euler error, which is the temporal floor described on +/// [`DT`]. pub const STEPS: usize = 20; /// Bond-dimension cap for the per-step round (large — let rounding find the true rank). pub const MAX_BOND: usize = 4096; @@ -47,6 +73,11 @@ pub fn decay() -> FloatType { } /// Taylor–Green `u`-velocity `u = −cos(x)sin(y)`. +/// +/// This is one of two Taylor–Green conventions in the crate. The MMS sample in +/// `src/types/flow/mms.rs` uses `u = sin(x)cos(y)`, `v = −cos(x)sin(y)` instead. The two are the same +/// vortex shifted by π/2 in x and y, and the pressure sign follows the velocity convention, so figures +/// are comparable across the two only after accounting for the shift. pub fn tg_u(x: f64, y: f64) -> f64 { -(x.cos() * y.sin()) } diff --git a/deep_causality_cfd/verification/qtt_taylor_green_verification/main.rs b/deep_causality_cfd/verification/qtt_taylor_green_verification/main.rs index a367ff8b4..e756f04c1 100644 --- a/deep_causality_cfd/verification/qtt_taylor_green_verification/main.rs +++ b/deep_causality_cfd/verification/qtt_taylor_green_verification/main.rs @@ -36,9 +36,9 @@ mod config; mod print_utils; use deep_causality_cfd::{ - CfdFlow, PhysicsError, Report, dequantize_2d, gradient_x, gradient_y, quantize_2d, + CfdFlow, PhysicsError, QttIncompressible2d, Report, dequantize_2d, quantize_2d, }; -use deep_causality_tensor::{CausalTensor, TensorTrain, TensorTrainOperator}; +use deep_causality_tensor::CausalTensor; /// The working precision for the whole computation. **This is the single alias to change** (`f32`, /// `f64`, or `Float106` with `use deep_causality_num::Float106;`). The configuration and display @@ -95,9 +95,10 @@ fn main() { } } -/// **Convection-operator computation.** Applies the solver's nonlinear convection `u·∇u = u⊙∂ₓu + -/// v⊙∂ᵧu` (the fused Hadamard the marcher uses) to the analytic Taylor–Green field, and compares its -/// `u`-component against the closed form `−½ sin(2x)`. Returns +/// **Convection-operator computation.** Runs the shipped solver's `rate_pair` on the analytic +/// Taylor–Green field and compares the `u`-component of its convection against the closed form +/// `−½ sin(2x)`. A zero-viscosity instance is used so `rate_pair` returns the pure convection +/// `−(u·∇)u`, isolating the same convection operator the `ν > 0` marcher runs. Returns /// `(max_abs_err, amp_computed, amp_analytic)` — a small error whose *computed* amplitude matches the /// analytic one proves the nonlinear term is real and correct. (Single-mode TG's convective term is a /// pure gradient the projection removes, so the marched decay cannot test it.) @@ -122,15 +123,15 @@ fn convection_operator_error(l: usize) -> Result<(f64, f64, f64), PhysicsError> let u = quantize_2d(&CausalTensor::new(ud, vec![n, n])?, &t)?; let v = quantize_2d(&CausalTensor::new(vd, vec![n, n])?, &t)?; - let gx = gradient_x::(l, l, dxf, &t)?; - let gy = gradient_y::(l, l, dxf, &t)?; - let dux = gx.apply(&u, &t)?; - let duy = gy.apply(&u, &t)?; - let conv_u = u - .hadamard_rounded(&dux, &t)? - .add(&v.hadamard_rounded(&duy, &t)?)? - .round(&t)?; - let cu = dequantize_2d(&conv_u, l, l)?; + // Route the convection through the shipped solver, not a `gradient_x`/`gradient_y` re-assembly: a + // re-assembly gates a copy of the operator rather than the one the marcher runs (the gate-BM-A + // lesson, AUDIT-REPORT §5c). A zero-viscosity instance makes `rate_pair` return the pure convection + // `−(u·∇)u` (the diffusion term vanishes), which is the same convection the ν > 0 marcher uses (ν + // only scales the diffusion). So `ru` holds `−(u·∇)u`; the loop below negates it to read `(u·∇)u`. + let solver = + QttIncompressible2d::new(l, l, dxf, dxf, config::ft(config::DT), config::ft(0.0), t)?; + let (ru, _rv) = solver.rate_pair(&u, &v)?; + let cu = dequantize_2d(&ru, l, l)?; let cs = cu.as_slice(); // `amp` must be read off `cs` — the solver's convection field — not off `analytic`. Taken from @@ -138,8 +139,9 @@ fn convection_operator_error(l: usize) -> Result<(f64, f64, f64), PhysicsError> // output, including an all-zero convection term. Reading it from `cs` is what makes the // "the nonlinear term is not a no-op" check falsifiable. // - // BREAKING CONDITION: replace `conv_u` with a zero train (or drop the `hadamard_rounded` terms) - // and `amp_computed` collapses to 0, failing the amplitude-ratio gate. + // BREAKING CONDITION: a zeroed convection in the shipped `rate_pair` collapses `amp_computed` to 0, + // failing the amplitude-ratio gate; a sign flip is caught by the `incompressible_2d` `rate_pair` + // unit test. let mut max_err = 0.0f64; let mut amp_computed = 0.0f64; let mut amp_analytic = 0.0f64; @@ -147,7 +149,8 @@ fn convection_operator_error(l: usize) -> Result<(f64, f64, f64), PhysicsError> let analytic = -0.5 * (2.0 * (i as f64 * dx)).sin(); amp_analytic = amp_analytic.max(analytic.abs()); for j in 0..n { - let computed = Into::::into(cs[i * n + j]); + // `ru = −(u·∇)u`, so negate to read the convection `(u·∇)u` the summary reports. + let computed = -Into::::into(cs[i * n + j]); max_err = max_err.max((computed - analytic).abs()); amp_computed = amp_computed.max(computed.abs()); } diff --git a/deep_causality_cfd/verification/qtt_taylor_green_verification/print_utils.rs b/deep_causality_cfd/verification/qtt_taylor_green_verification/print_utils.rs index 3abd7faf3..bfe34416b 100644 --- a/deep_causality_cfd/verification/qtt_taylor_green_verification/print_utils.rs +++ b/deep_causality_cfd/verification/qtt_taylor_green_verification/print_utils.rs @@ -111,7 +111,9 @@ pub fn render(results: &[LevelResult], convection: (f64, f64, f64)) { } if results.len() >= 2 { let order = observed_order(&results[results.len() - 2], finest); - println!(" observed order = {order:.2} (centered FD + spectral projection -> 2)\n"); + println!( + " observed order = {order:.2} (2nd-order in space: centered FD + spectral projection; 1st-order in time: explicit Euler at fixed dt)\n" + ); } else { println!(); } @@ -138,7 +140,7 @@ pub fn render(results: &[LevelResult], convection: (f64, f64, f64)) { /// verification examples' summaries. pub fn summary() { println!( - "\nTaylor-Green vortex reproduced: 2nd-order convergence to the analytic e^(-2 nu t) decay," + "\nTaylor-Green vortex reproduced: 2nd-order-in-space convergence (1st-order in time, explicit Euler) to the analytic e^(-2 nu t) decay," ); println!("correct nonlinear convection, and divergence-free to machine precision."); } diff --git a/deep_causality_haft/Cargo.toml b/deep_causality_haft/Cargo.toml index 6a8f7768e..f10971da1 100644 --- a/deep_causality_haft/Cargo.toml +++ b/deep_causality_haft/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "deep_causality_haft" -version = "0.4.1" +version = "0.4.2" edition = { workspace = true } rust-version = { workspace = true } license = { workspace = true } diff --git a/deep_causality_physics/src/constants/hypersonic.rs b/deep_causality_physics/src/constants/hypersonic.rs index f1968a8c0..aab1b5770 100644 --- a/deep_causality_physics/src/constants/hypersonic.rs +++ b/deep_causality_physics/src/constants/hypersonic.rs @@ -14,8 +14,9 @@ //! * Millikan & White, "Systematics of Vibrational Relaxation," J. Chem. Phys. //! 39, 3209 (1963) — the τ_vt correlation. //! * Park, "Nonequilibrium Hypersonic Aerothermodynamics," Wiley (1990) — the -//! two-temperature model and the high-temperature vibrational limiting -//! correction. +//! two-temperature model, and the high-temperature vibrational limiting +//! correction that this module carries constants for but does not apply (see +//! the `PARK_LIMITING_*` block below). //! * Park, "Review of Chemical-Kinetic Problems of Future NASA Missions, I: //! Earth Entries," J. Thermophys. Heat Transfer 7(3):385 (1993). //! @@ -50,10 +51,19 @@ pub const NO_IONIZATION_ENERGY_EV: f64 = 9.26; // ───────────────────────────────────────────────────────────────────────── // Millikan–White vibrational relaxation correlation: // τ_sr · P = exp[ A_sr · (T^(−1/3) − B · μ_sr^(1/4)) − C ] (P in atm, τ in s) -// with A_sr = MW_A_COEFFICIENT · μ_sr^(1/2) · θ_v^(4/3), μ_sr in amu, θ_v in K. -// The natural-log constants below are the base-10 originals (5.0e-4, 0.015, 8.00) -// converted via ×ln(10): 5.0e-4·ln10 = 1.16e-3 and 8.00·ln10 = 18.42. -// Source: Millikan & White (1963); Park (1990) rearrangement. +// with A_sr = MILLIKAN_WHITE_A_COEFFICIENT · μ_sr^(1/2) · θ_v^(4/3), μ_sr in +// amu, θ_v in K. +// +// The three constants below are stated in the natural-log form the exponential +// consumes. Only C is a clean rescaling of a base-10 original: 8.00 · ln 10 = +// 18.4207, which rounds to the shipped 18.42. A is not. 5.0e-4 · ln 10 = +// 1.1513e-3, while the shipped A is 1.16e-3; the base-10 equivalent of the +// shipped value is 1.16e-3 / ln 10 = 5.038e-4. Read A and C as independently +// rounded natural-log constants, not as one ×ln 10 conversion of a +// (5.0e-4, 8.00) pair. +// Source: Millikan & White (1963); Park (1990) rearrangement, both listed in +// the module header. Neither is present in `deep_causality_physics/papers/`, +// so no equation number is cited here. // ───────────────────────────────────────────────────────────────────────── /// Millikan–White `A_sr` prefactor coefficient (natural-log form). Combined with @@ -67,15 +77,35 @@ pub const MILLIKAN_WHITE_MU_OFFSET: f64 = 0.015; pub const MILLIKAN_WHITE_LOG_OFFSET: f64 = 18.42; // ───────────────────────────────────────────────────────────────────────── -// Park (1990) high-temperature limiting vibrational relaxation, applied as -// τ_park = 1 / (σ_v · c̄ · N), σ_v = σ_ref · (T_ref / T)² -// to correct the Millikan–White under-prediction above ~8000 K. +// Park (1990) high-temperature limiting vibrational relaxation, +// τ_park = 1 / (σ_v · c̄ · N), σ_v = σ_ref · (T_ref / T)², +// intended as the additive term τ_vt = τ_MW + τ_park that lifts the +// Millikan–White under-prediction of the relaxation time above ~8000 K. +// +// NOT APPLIED. `vibrational_relaxation_kernel` +// (`kernels/hypersonic/thermochemistry.rs`) computes `tau = exponent.exp() / +// pressure_atm` and nothing further; neither constant below has a call site +// anywhere in the workspace, and the mean thermal speed +// c̄ = sqrt(8·k_B·T / (π·m)) the term requires is never formed. The shipped +// τ_vt is the uncorrected Millikan–White value. Bias direction: τ_park is +// additive and positive, so omitting it makes τ_vt too short above ~8000 K, +// T_ve chases T_tr faster than the Park two-temperature model intends, and the +// downstream T_a = sqrt(T_tr · T_ve) and n_e come out high. Magnitude at the +// RAM-C post-shock state (T = 8044 K, n ≈ 2.6e22 m⁻³): σ_v ≈ 3.9e-20 m², +// c̄ ≈ 2.7e3 m/s, τ_park ≈ 3.6e-7 s against τ_MW ≈ 1.9e-5 s, about two +// percent. The ratio grows with temperature, since τ_MW falls exponentially in +// T^(−1/3) while τ_park rises with T at fixed number density. +// +// The two constants are retained as the reference values for the correction +// when it is implemented; they are dead today. // ───────────────────────────────────────────────────────────────────────── /// Park limiting vibrational cross-section reference `σ_ref`. Unit: m². +/// Unused: see the block comment above, the correction is not applied. pub const PARK_LIMITING_CROSS_SECTION: f64 = 1.0e-21; /// Park limiting-cross-section reference temperature `T_ref`. Unit: K. +/// Unused: see the block comment above, the correction is not applied. pub const PARK_LIMITING_REFERENCE_TEMP: f64 = 50_000.0; // ───────────────────────────────────────────────────────────────────────── diff --git a/deep_causality_physics/src/kernels/hypersonic/thermochemistry.rs b/deep_causality_physics/src/kernels/hypersonic/thermochemistry.rs index a13c295b9..aae1439bc 100644 --- a/deep_causality_physics/src/kernels/hypersonic/thermochemistry.rs +++ b/deep_causality_physics/src/kernels/hypersonic/thermochemistry.rs @@ -40,8 +40,11 @@ use deep_causality_num::FromPrimitive; /// * Millikan & White, "Systematics of Vibrational Relaxation," J. Chem. Phys. /// 39, 3209 (1963). /// * Park, "Nonequilibrium Hypersonic Aerothermodynamics," Wiley (1990). -/// (The `1.16e-3` / `18.42` natural-log constants are the base-10 `5.0e-4` / -/// `8.00` originals scaled by `ln 10`.) +/// (`A` and `C` are consumed here in natural-log form. Only `C` is a rescaling +/// of a base-10 original: `8.00 · ln 10 = 18.4207`, which rounds to the shipped +/// `18.42`. `A` is not: `5.0e-4 · ln 10 = 1.1513e-3`, while the shipped `A` is +/// `1.16e-3`, a separately rounded natural-log coefficient. See the constant +/// docs on `MILLIKAN_WHITE_A_COEFFICIENT` and `MILLIKAN_WHITE_LOG_OFFSET`.) pub fn vibrational_relaxation_kernel( t_ve: VibrationalTemperature, t_tr: Temperature, diff --git a/deep_causality_physics/src/quantities/fluid_dynamics/solenoidal_field.rs b/deep_causality_physics/src/quantities/fluid_dynamics/solenoidal_field.rs index 2f041efcf..770d54cc0 100644 --- a/deep_causality_physics/src/quantities/fluid_dynamics/solenoidal_field.rs +++ b/deep_causality_physics/src/quantities/fluid_dynamics/solenoidal_field.rs @@ -6,20 +6,38 @@ //! The divergence-free velocity type-state. //! //! `SolenoidalField` unifies the gap note's `ProjectedVelocityOneForm` and -//! `3DCausalFluidDynamics.md` B4's `SolenoidalField` into one type with -//! exactly two construction paths, both of which *are* projections: +//! `3DCausalFluidDynamics.md` B4's `SolenoidalField` into one type whose every +//! constructor *is* a projection: //! -//! 1. [`SolenoidalField::from_leray_projection`] — the per-step solver path -//! (`Manifold::leray_project`, one gauge-fixed CG solve). -//! 2. [`SolenoidalField::from_hodge_projection`] — the per-snapshot analysis +//! 1. [`SolenoidalField::from_leray_projection`] and its parameterized twin +//! [`SolenoidalField::from_leray_projection_opts`] — the per-step solver +//! path (`Manifold::leray_project`, one gauge-fixed CG solve). +//! 2. [`SolenoidalField::from_open_leray_projection_weighted_opts`] — the same +//! solve with open-boundary and weighted cut-face rows. +//! 3. [`SolenoidalField::from_hodge_projection`] — the per-snapshot analysis //! path (`δβ + h` of a grade-1 Hodge decomposition). //! -//! "You cannot time-step an unprojected field" is thereby a compile-time -//! fact: the type has no other constructor, and **no arithmetic** — the sum -//! of two discretely projected fields is not projected, so re-projection is -//! the only path back into the type. Read access is provided by -//! [`SolenoidalField::as_one_form`]; there is no path that re-wraps a -//! modified tensor. +//! The carrier is a private field and the type implements **no arithmetic**: +//! the sum of two discretely projected fields is not projected, so `a + b` +//! does not compile and re-projection is the only way to combine fields. Read +//! access is [`SolenoidalField::as_one_form`], which hands out a shared +//! reference and has no mutable counterpart. +//! +//! What the type-state does **not** enforce. +//! [`SolenoidalField::constrain_edges`] and [`SolenoidalField::with_lift`] are +//! `pub`, take `self`, and re-wrap a modified tensor. They are not +//! crate-internal and cannot be: the DEC solver that drives them lives in the +//! sibling crate `deep_causality_cfd` +//! (`solvers/dec/dec_ns_solver/step.rs:121-123` and `seed.rs:82-84`), so +//! `pub(crate)` would not reach it. That solver calls them only on the output +//! of a constrained projection that already pinned exactly those edges, which +//! is why the writes are invariant-preserving there. +//! +//! Off that path the caller carries the invariant. Writing a coefficient the +//! preceding projection did not fix leaves `‖δu‖ ≈ 0` broken while the value +//! keeps the type `SolenoidalField`, and `DecNsSolver::step` will accept it. +//! Re-project before time-stepping such a field. Both methods also index the +//! carrier by raw edge index and panic on an out-of-range index. use alloc::format; use core::fmt::{Debug, Display}; @@ -97,15 +115,6 @@ where Ok((Self { field: projected }, potential)) } - /// Crate-internal open-boundary path: the **open** Leray projection - /// (`Manifold::leray_project_open_opts`) admitting a prescribed inflow with a pressure - /// reference. `zeroed` edges are pinned to zero (no-slip), `prescribed` edges are fixed at - /// their field value with their flux counted, and `reference` vertices pin the outflow - /// pressure. Empty `prescribed`/`reference` reduce to the constrained projection - /// bit-identically (the closed path). - /// - /// # Errors - /// As [`Self::from_leray_projection`]. /// The **open-boundary** projection (`Manifold::leray_project_open_weighted_opts`) admitting a /// prescribed inflow with a pressure reference, optionally extended with the weighted cut-face /// no-slip rows of an immersed body so the body no-slip is enforced on the *state* (not only the @@ -186,15 +195,32 @@ where Ok(Self { field }) } - /// Crate-internal wall-bounded path: zero the given (wall-tangential) - /// edge coefficients — the homogeneous no-slip constraint `P_S` applied - /// as the step's final operation (design D8). The field stays - /// divergence-free at the solve's exactness: this last coordinate - /// projection perturbs the divergence only by the residual no-slip - /// violation the projection left behind, which the wall-bounded-ns spec - /// sanctions (no-slip exact, divergence at the solve's exactness). A - /// bit-exact no-op when `edges` is empty (fully periodic), so the - /// periodic construction path is preserved. + /// Wall-bounded path: zero the given (wall-tangential) edge coefficients, + /// the homogeneous no-slip constraint `P_S` applied as the step's final + /// operation (design D8). A bit-exact no-op when `edges` is empty (fully + /// periodic), so the periodic construction path is preserved. + /// + /// # Visibility and invariant + /// This is `pub`, not `pub(crate)`. It writes into the carrier and + /// re-wraps it, so it bypasses the projection that establishes + /// `‖δu‖ ≈ 0`; the type-state cannot enforce the invariant across it. The + /// intended caller is the DEC solver's per-step no-slip chain in the + /// sibling crate `deep_causality_cfd` + /// (`solvers/dec/dec_ns_solver/step.rs:121-123`, `seed.rs:82-84`), which a + /// `pub(crate)` seam would not reach. There the argument is exactly the + /// `zeroed` set the immediately preceding constrained projection pinned, + /// so this stage removes only the residual no-slip violation that solve + /// left behind. The wall-bounded-ns spec sanctions that trade: no-slip + /// exact, divergence at the solve's exactness. + /// + /// A caller off that path takes the invariant on itself. Zeroing edges the + /// preceding projection did not pin breaks divergence-freedom by the + /// amount those coefficients carried, and the result still types as + /// `SolenoidalField`. Re-project before time-stepping it. + /// + /// # Panics + /// Indexes the carrier directly: an edge index at or past + /// [`Self::len`] panics. pub fn constrain_edges(self, edges: &[usize]) -> Self { if edges.is_empty() { return self; @@ -210,12 +236,32 @@ where } } - /// Crate-internal wall-bounded path: set the prescribed tangential wall - /// values (the moving-wall lift — edge index → edge integral). Applied - /// after the constrained projection, whose output is exactly zero on - /// every constrained edge, so this is assignment onto zeros: the lift - /// edges carry their prescribed values exactly while the projection's - /// free-edge values are untouched. A no-op when `lift` is empty. + /// Wall-bounded path: set the prescribed tangential wall values (the + /// moving-wall lift, edge index → edge integral). Applied after the + /// constrained projection, whose output is exactly zero on every + /// constrained edge, so this is assignment onto zeros: the lift edges + /// carry their prescribed values exactly while the projection's free-edge + /// values are untouched. A no-op when `lift` is empty. + /// + /// # Visibility and invariant + /// This is `pub`, not `pub(crate)`. It writes caller-chosen values at + /// caller-chosen indices and re-wraps the carrier, so it is the widest + /// hole in the type-state: `field.with_lift(&[(0, 1e9)])` compiles, + /// returns a `SolenoidalField` with large divergence, and + /// `DecNsSolver::step` accepts it. The intended caller is the DEC solver's + /// per-step no-slip chain in the sibling crate `deep_causality_cfd` + /// (`solvers/dec/dec_ns_solver/step.rs:121-123`, `seed.rs:82-84`), which a + /// `pub(crate)` seam would not reach. There the lift edges are constrained + /// edges the preceding projection zeroed, and the projector ignores + /// constrained-edge input values (`P(u) = P(u − lift)`), so re-applying + /// the lift restores the boundary condition without disturbing the solve. + /// + /// A caller off that path takes the invariant on itself: re-project before + /// time-stepping any field this method has written to. + /// + /// # Panics + /// Indexes the carrier directly: an edge index at or past + /// [`Self::len`] panics. pub fn with_lift(self, lift: &[(usize, R)]) -> Self { if lift.is_empty() { return self; diff --git a/examples/avionics_examples/README.md b/examples/avionics_examples/README.md index 33f9612c8..30aa00cce 100644 --- a/examples/avionics_examples/README.md +++ b/examples/avionics_examples/README.md @@ -21,9 +21,9 @@ cargo run -p avionics_examples --example | [hypersonic_2t](control/hypersonic_2t/README.md) | Defense/Tracking | Tracking Hypersonic Glide Vehicles (HGV) using Dual-Time (2T) Physics in 6D phase space | | [flight_envelope_monitor](control/flight_envelope_monitor/README.md) | Health Monitoring | Three-stage stateful pipeline (sensor collection → bind chain → envelope hypergraph) demonstrating uniform composition through `PropagatingProcess<_, FlightState, AircraftConfig>` | | [turbulence_flow](cfd/turbulence_flow/README.md) | Turbulence / Chaos | Forecast horizon of a chaotic convective flow (Lorenz, the Rayleigh–Bénard 3-mode truncation): the same `Rk4` march at f32/f64/Float106 isolates roundoff growth and shows precision setting how far ahead a turbulent flow can be trusted | -| [plasma_blackout_corridor](cfd/plasma_blackout/corridor/README.md) | Multiphysics / GNC | One continuous Mach-25 descent through plasma blackout: a tensor-train compressed compressible carrier with a shock-fitted Rankine-Hugoniot inflow strip, evolved-state Park-2T ionization gated against the RAM-C II flight anchor, flow-resolved GNSS denial driving a 17-state ESKF, O(1) counterfactual bank branches with trajectory-derived misses, and a cybernetic envelope gate whose clamped command actually steers the 3-DOF lift. Thirteen self-verifying gates, one provenance log | +| [plasma_blackout_corridor](cfd/plasma_blackout/corridor/README.md) | Multiphysics / GNC | One continuous Mach-25 coupled descent through plasma blackout, where every leg boundary carries the navigation state, the truth trajectory, the evolved projections, and the provenance log across while the marched fluid layer re-seeds from the world seed: a tensor-train compressed compressible carrier with a shock-fitted Rankine-Hugoniot inflow strip, evolved-state Park-2T ionization gated against the RAM-C II flight anchor, flow-resolved GNSS denial driving a 17-state ESKF, O(1) counterfactual bank branches with trajectory-derived misses, and a cybernetic envelope gate whose clamped command actually steers the 3-DOF lift. Thirteen self-verifying gates, one provenance log | | [plasma_blackout_weather](cfd/plasma_blackout/weather/README.md) | Digital Twin / Dispersion | The table factory for the corridor: six weather conditions as counterfactual worlds alternated from one validated baseline, flown concurrently, reduced to a dispersion table that tracks navigation precision against weather (the blackout window and a tactical-grade IMU thermal departure both move the drift). Eight self-verifying gates, full provenance per row | -| [plasma_blackout_retropulsion](cfd/plasma_blackout/retropulsion/README.md) | Multiphysics / GNC | Closes the family loop: consumes the weather table **in flight** to size its ignition margin, commits an ignition inside the Jarvinen–Adams band, and forks the marched, plume-coupled state mid-burn (a *state* fork a parameter sweep cannot express) over a throttle roster carrying the supersonic-retropropulsion drag collapse. Coasts to the ignition altitude, then lands at 2.0 m/s. Sixteen self-verifying gates | +| [plasma_blackout_retropulsion](cfd/plasma_blackout/retropulsion/README.md) | Multiphysics / GNC | Closes the family loop: consumes the weather table **in flight** to size its ignition margin, commits an ignition inside the Jarvinen–Adams band, and forks the marched, burn-coupled state mid-burn (a *state* fork a parameter sweep cannot express) over a throttle roster carrying the supersonic-retropropulsion drag collapse. Coasts to the ignition altitude, then lands at 2.0 m/s. Sixteen self-verifying gates | | [flight_envelope_placard](cfd/flight_envelope_placard/README.md) | Certification / Placards | A Mach-altitude test matrix in, one placard table out: cited US-1976 freestream interpolation, dynamic pressure, exact Rankine–Hugoniot post-shock stagnation temperature (isentropic below Mach 1), and Sutton–Graves stagnation heating, each point gated against the stated placards and any out-of-envelope point named rather than averaged away. The pointwise study path: no march, no manifold | | [nozzle_operating_map](cfd/nozzle_operating_map/README.md) | Propulsion | A back-pressure sweep over a converging–diverging duct: choked with a normal shock in the diverging section, then choked with a supersonic exit. Where the shock sits and what thrust results at each point is the operating map, gated against gas-dynamics closed forms in one `CfdFlow::study` expression | | [viv_resonance_margin](cfd/viv_resonance_margin/README.md) | Structures / Aeroelasticity | Vortex-induced-vibration margin as a computed study rather than a handbook lookup: an airspeed schedule as the case axis, one validated isolated-cylinder wake case marched per airspeed, the shedding frequency extracted from each wake probe's developed tail, and the margin to the structural mode tabled and verdicted | diff --git a/examples/avionics_examples/cfd/flight_envelope_placard/README.md b/examples/avionics_examples/cfd/flight_envelope_placard/README.md index e48882fcc..31c738a3d 100644 --- a/examples/avionics_examples/cfd/flight_envelope_placard/README.md +++ b/examples/avionics_examples/cfd/flight_envelope_placard/README.md @@ -17,7 +17,7 @@ This is the pointwise study path on purpose. The matrix rows go through the same `sweep` combinator a solver study would use: the study shape (read a case table, compute per case, gate, write one result table) does not change when the per-case body is a closed form instead -of a full march. Besides `sweep`, the only DSL pieces touched are `Gates` and the group-1 +of a full march. Besides `sweep`, the only DSL pieces touched are `GateSeq` and the group-1 table reader and writer. ## How to Run @@ -27,7 +27,7 @@ cargo run --release -p avionics_examples --example flight_envelope_placard ``` The default matrix is `mach_alt_matrix.csv`, sixteen points along a supersonic climb corridor -from Mach 0.5 at 5 km to Mach 5 at 40 km. All three gates pass and the process exits 0. The +from Mach 0.5 at 5 km to Mach 5 at 40 km. Both gates pass and the process exits 0. The run completes in well under a second. The example accepts one optional argument, a path to a different matrix file. The recorded @@ -60,10 +60,11 @@ matrix restores the recorded green table. re-stagnation of the post-shock state) above Mach 1 and through the shock-free isentropic form below it, and the Sutton-Graves correlation gives the stagnation-point heating for the stated nose radius. All arithmetic runs in the example's `FloatType` alias. -3. **Gate.** Three gates: every point inside the q-max placard (detail names the max-q - point), every point inside the stagnation-temperature placard (detail names the hottest - point), and matrix integrity (every file row computed). Offending points are listed by - their Mach-altitude coordinates. +3. **Gate.** Two gates: every point inside the q-max placard (detail names the max-q point) + and every point inside the stagnation-temperature placard (detail names the hottest + point). Offending points are listed by their Mach-altitude coordinates. Neither gate + counts computed rows against the input file. Each fails on an empty row set and nothing + more, so a matrix that loses rows between the reader and the sweep is not caught here. 4. **Write.** The placard table lands in `placard_table.csv` through the group-1 writer, with named and unit-carrying columns: `mach(-)`, `alt(km)`, `q(kPa)`, `t0_post_shock(K)`, `qdot(W/cm2)`. The write is the one place the working precision downcasts to raw `f64`. @@ -76,8 +77,7 @@ The recorded default run peaks at q = 23.7 kPa (M 1.20 / 11 km) and T0 = 1502.1 | Gate | Check | Recorded detail | |---|---|---| | q-max placard | every point's q at or below 60 kPa | max q = 23.7 kPa at M 1.20 / 11.0 km | -| stagnation-temperature placard | every point's T0 at or below 1700 K | max T0 = 1502.1 K at M 5.00 / 40.0 km | -| matrix integrity | one computed row per file row | 16 of 16 matrix rows computed | +| stagnation temperature | every point's T0 at or below 1700 K | max T0 = 1502.1 K at M 5.00 / 40.0 km | A failing gate prints its `[FAIL]` line naming every out-of-envelope point and the example exits 1. Setup and usage failures (an unreadable matrix, a missing column, an altitude @@ -116,7 +116,7 @@ outside the atmosphere table) exit 2 with the file and the fix named. | `placard_table.csv` | The written placard table of the recorded default run | | `output.txt` | The recorded console output of the default run | -The machinery used: `sweep` and `Gates` from `deep_causality_cfd`, `FittedNormalShock` from +The machinery used: `sweep` and `GateSeq` from `deep_causality_cfd`, `FittedNormalShock` from the same crate's compressible solver, and `read_table`, `NumericTable::from_columns`, and `write_table` from `deep_causality_file`. diff --git a/examples/avionics_examples/cfd/nozzle_operating_map/output.txt b/examples/avionics_examples/cfd/nozzle_operating_map/output.txt index 9f4078c6a..d96959aec 100644 --- a/examples/avionics_examples/cfd/nozzle_operating_map/output.txt +++ b/examples/avionics_examples/cfd/nozzle_operating_map/output.txt @@ -10,12 +10,12 @@ schedule: 6 back pressures from back_pressures.csv 0.30 2.123 none 0.857 0.10 2.123 none 1.254 -operating map written to /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/nozzle_operating_map/operating_map.csv +operating map written to operating_map.csv analytic references: first critical p/p0 = 0.9372, exit-plane shock at p/p0 = 0.5134 --- nozzle operating map --- - [PASS] choking: every choked row crosses Mach 1 at the throat - [PASS] shock position: every internal-shock row matches the closed form - [PASS] shock-free profiles: every shock-free row tracks the area-Mach relation - [PASS] physical thrust: thrust coefficient finite and positive on every row + [PASS] [tripwire] choking: every choked row crosses Mach 1 at the throat + [PASS] [tripwire] shock position: every internal-shock row matches the closed form + [PASS] [tripwire] shock-free profiles: every shock-free row tracks the area-Mach relation + [PASS] [tripwire] physical thrust: thrust coefficient finite and positive on every row === All gates passed: nozzle operating map. === diff --git a/examples/avionics_examples/cfd/nozzle_operating_map/utils_print.rs b/examples/avionics_examples/cfd/nozzle_operating_map/utils_print.rs index d24349020..25f1f633c 100644 --- a/examples/avionics_examples/cfd/nozzle_operating_map/utils_print.rs +++ b/examples/avionics_examples/cfd/nozzle_operating_map/utils_print.rs @@ -15,13 +15,10 @@ pub fn print_intro(schedule_len: usize, schedule_path: &Path) { println!( "geometry: inlet {INLET_AREA_M2} / throat {THROAT_AREA_M2} / exit {EXIT_AREA_M2} m^2 over {LENGTH_M} m; reservoir {P0_PA} Pa, {T0_K} K" ); - // The file name only, not the absolute manifest path, so the recorded reference output is - // portable across machines and checkouts. - let schedule_name = schedule_path - .file_name() - .map(|n| n.to_string_lossy()) - .unwrap_or_default(); - println!("schedule: {schedule_len} back pressures from {schedule_name}\n"); + println!( + "schedule: {schedule_len} back pressures from {}\n", + file_name(schedule_path) + ); } pub fn print_rows(rows: &[MapRow]) { @@ -41,8 +38,16 @@ pub fn print_rows(rows: &[MapRow]) { pub fn print_footer(out_path: &Path) { let first_critical = model::subsonic_exit_pressure_ratio(); let shock_at_exit = model::exit_shock_back_pressure_ratio(); - println!("\noperating map written to {}", out_path.display()); + println!("\noperating map written to {}", file_name(out_path)); println!( "analytic references: first critical p/p0 = {first_critical:.4}, exit-plane shock at p/p0 = {shock_at_exit:.4}\n" ); } + +/// The file name of a path (not the absolute manifest path), so the recorded reference output is +/// portable across machines and checkouts. +fn file_name(p: &Path) -> std::borrow::Cow<'_, str> { + p.file_name() + .map(|n| n.to_string_lossy()) + .unwrap_or_default() +} diff --git a/examples/avionics_examples/cfd/plasma_blackout/corridor/README.md b/examples/avionics_examples/cfd/plasma_blackout/corridor/README.md index 2b13e0318..416c677e9 100644 --- a/examples/avionics_examples/cfd/plasma_blackout/corridor/README.md +++ b/examples/avionics_examples/cfd/plasma_blackout/corridor/README.md @@ -12,11 +12,21 @@ measured exactly this blackout in 1970. Through the dark the vehicle dead-reckon inertial navigation while a bounded-correction gate keeps the bank command inside the certified envelope. When the sheath clears, one position fix collapses the accumulated drift. -This example flies that corridor as **one continuous descent** in a single composed coupling: - compressible flow, nonequilibrium plasma chemistry, regime classification, +This example flies that corridor as **one continuous coupled descent** in a single composed +coupling: compressible flow, nonequilibrium plasma chemistry, regime classification, GNSS-denied navigation, counterfactual guidance, and a cybernetic safety gate, all stepping together and all writing into one auditable provenance log. Here they are one dynamic process. +Continuous here means the *coupled field*. The navigation state, the truth trajectory, the +evolved projections, and the provenance log cross every leg boundary intact. The marched fluid +layer does not. Resuming a leg through `.from(pause.state())` rebuilds that leg's carrier and +re-quantizes the world's uniform seed, so the evolved conserved state, the inflow strip, and any +acoustic-envelope drift the previous leg earned are discarded, and the layer re-converges over +the following steps. The descent crosses three such boundaries and logs each one: `leg re-seeded +from step N in world 'W': coupled field carried, marched fluid state re-seeded from the world +seed`. The quasi-steady closure (below) is what makes that acceptable at this fidelity. It is +not fluid continuity. + The run self-verifies against the RAM-C II flight anchor and exits nonzero on any regression. Wall-clock is about 40 seconds. @@ -43,7 +53,8 @@ the sequential run. The vehicle starts at 90 km at Mach 29, on a steep compressed trajectory sized so the 61 km passage is the calibrated Mach-25 station. Four legs and one branch -study follow, every boundary an *event the run finds*, not a scripted station switch: +study follow, every boundary an *event the run finds*, not a scripted station switch. Each of +the three leg boundaries carries the coupled field and re-seeds the marched layer: 1. **Descent to blackout onset.** The evolved sheath's electron density climbs as the air thickens; at 74.7 km it crosses the GPS L1 cutoff and the classifier flips the link to @@ -221,7 +232,9 @@ as transient; no spatially resolved reacting layer); 3) The marched layer is 2-D with the 3-D fitted marcher reserved for stagnation-line validation (a timing study showed it 3.6x over the minutes budget); -4) The flight corridor is a deterministic point-mass 3-DOF world with a fixed atmosphere. There are no winds, no aero-coefficient dispersions, and no density perturbations +4) The flight corridor is a deterministic point-mass 3-DOF world with a fixed atmosphere. There are no winds, no aero-coefficient dispersions, and no density perturbations; + +5) A leg boundary re-seeds the marched fluid layer. The coupled field is carried across it; the evolved conserved state, the inflow strip, the acoustic-envelope drift, and the leg's own rebuild count are not. The layer restarts from the world's uniform seed at each of the three boundaries and re-converges within a few steps, which the quasi-steady closure of (2) accepts The demonstrated counterfactual branches are exact because the world is deterministic partially because of those chosen limitations. For higher fidelity of the simulation, any step can be replaced with a different physics kernel, marcher, or coupling mechanism. For the ionized chemistry, the limitation has been [documented in a companion note](../../../../../openspec/notes/archive/cfd-plasma-blackout/finite-rate-ionization-chemistry.md). @@ -231,9 +244,9 @@ because of those chosen limitations. For higher fidelity of the simulation, any | File | Contents | |---|---| | [`main.rs`](main.rs) | The descent: four legs, the branch study, provenance, the gates | -| [`model.rs`](model.rs) | The descent worlds, the coupling stack, example-local stages, branch scoring | +| [`model.rs`](model.rs) | The descent worlds, the bank commands, branch scoring, the leg snapshots, and both gating sequences (4 campaign + 9 leg = thirteen gates) | | [`constants.rs`](constants.rs) | The corridor's own knobs: the horizon, the bank sweep, the gate thresholds | -| [`utils_print.rs`](utils_print.rs) | Console rendering and the thirteen validation gates | +| [`utils_print.rs`](utils_print.rs) | Console rendering: the intro, the legs, the branch tables, the provenance | The physics constants, the numeric helpers, the example-local stages, and the coupling stack are shared with the [weather-dispersion example](../weather/README.md) through the diff --git a/examples/avionics_examples/cfd/plasma_blackout/corridor/main.rs b/examples/avionics_examples/cfd/plasma_blackout/corridor/main.rs index 1cb89ae29..3176afc7b 100644 --- a/examples/avionics_examples/cfd/plasma_blackout/corridor/main.rs +++ b/examples/avionics_examples/cfd/plasma_blackout/corridor/main.rs @@ -3,14 +3,18 @@ * Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved. */ -//! # The plasma-blackout corridor: one continuous descent through flow, plasma, navigation, and control +//! # The plasma-blackout corridor: one continuous coupled descent through flow, plasma, navigation, and control //! //! A reentry vehicle punches into the atmosphere at Mach 25. The shock layer ionizes, and past a //! critical electron density the plasma sheath cuts every GNSS link; RAM-C II measured exactly //! this blackout. Through the dark the vehicle dead-reckons on its INS while a bounded-correction //! gate keeps the bank command inside the certified envelope. When the sheath clears, one fix -//! collapses the accumulated drift. This example flies that corridor as **one continuous -//! descent** on the compressible carrier, expressed in the CfdFlow grammar at both levels: +//! collapses the accumulated drift. This example flies that corridor as **one continuous coupled +//! descent** on the compressible carrier. Every leg boundary carries the coupled field forward, so +//! the navigation state, the truth trajectory, the evolved projections, and the provenance log +//! cross intact. The marched fluid layer does not cross: each leg rebuilds its carrier and +//! re-seeds that layer from the world's uniform seed, a quasi-steady restart the layer re-converges +//! from within a few steps. The corridor is expressed in the CfdFlow grammar at both levels: //! //! * **The trunk** is trajectory level — `CfdFlow::march(&nominal).couple(..).from(..).until(..)` — //! marching the coupled descent to the *flow-resolved* blackout onset, an event the run finds. @@ -170,7 +174,7 @@ fn main() -> ExitCode { leg2, leg3, leg4, - rebuilds: model::rebuild_count(&rendered_log), + rebuilds: onset.rebuilds() + peak.rebuilds() + exit_pause.rebuilds() + reacq.rebuilds(), elapsed_s: utils::ft(clock.elapsed().as_secs_f64()), regime_log: rendered_log, }]; diff --git a/examples/avionics_examples/cfd/plasma_blackout/corridor/model.rs b/examples/avionics_examples/cfd/plasma_blackout/corridor/model.rs index 3489385ac..6bf17ddbb 100644 --- a/examples/avionics_examples/cfd/plasma_blackout/corridor/model.rs +++ b/examples/avionics_examples/cfd/plasma_blackout/corridor/model.rs @@ -298,14 +298,6 @@ pub fn compression_witness(final_fields: &(Vec, Vec)) -> ( (bond, n * n) } -/// Count the carrier rebuilds recorded in a provenance log rendering. -pub fn rebuild_count(rendered: &str) -> usize { - rendered - .lines() - .filter(|l| l.contains("carrier rebuilt at step")) - .count() -} - // ── The per-leg witness the trajectory gates read ───────────────────────────────────────────── /// The per-leg witness the leg gates read, taken from a paused march's carried field. @@ -376,6 +368,9 @@ pub struct LegSet { pub leg2: LegSnapshot, pub leg3: LegSnapshot, pub leg4: LegSnapshot, + /// Carrier rebuilds over the whole descent: `CarrierPause::rebuilds()` summed over the four leg + /// pauses in `main`. The accessor counts per carrier, so each pause reports its own leg only and + /// the four have to be added; reading the last pause would report the final leg's rebuilds. pub rebuilds: usize, pub elapsed_s: FloatType, /// The rendered provenance log of the full descent (the regime-transition witness). diff --git a/examples/avionics_examples/cfd/plasma_blackout/corridor/output.txt b/examples/avionics_examples/cfd/plasma_blackout/corridor/output.txt index 7fcc301b5..25348fae6 100644 --- a/examples/avionics_examples/cfd/plasma_blackout/corridor/output.txt +++ b/examples/avionics_examples/cfd/plasma_blackout/corridor/output.txt @@ -39,7 +39,7 @@ Precision: f64 --- Leg: peak passage 61 km (committed dwell) --- marched 96 steps to 60.9 km, Mach 24.9 | regime: continuum (Kn = 3.83e-3) | link: GNSS DENIED n_e peak = 2.600e19 m^-3 | w_p = 2.876e11 rad/s | q = 1.828e6 W/m^2 | 1.3 g - nav error vs truth = 1.5637 m | position variance = 2.6711e1 m^2 | log entries: 9 + nav error vs truth = 1.5637 m | position variance = 2.6710e1 m^2 | log entries: 9 --- Leg: flow-resolved exit --- marched 463 steps to 46.8 km, Mach 8.6 | regime: continuum (Kn = 2.55e-4) | link: GNSS available @@ -49,7 +49,7 @@ Precision: f64 --- Leg: reacquisition --- marched 30 steps to 47.4 km, Mach 8.4 | regime: continuum (Kn = 2.67e-4) | link: GNSS available n_e peak = 6.972e-9 m^-3 | w_p = 4.711e-3 rad/s | q = 2.862e5 W/m^2 | 2.3 g - nav error vs truth = 0.2802 m | position variance = 3.1840e-1 m^2 | log entries: 16 + nav error vs truth = 0.2804 m | position variance = 3.1840e-1 m^2 | log entries: 16 --- Provenance (the carried EffectLog, the whole descent) --- 16 entries total (0 bank-correction boundings by the cybernetic gate, omitted below): @@ -80,7 +80,7 @@ Precision: f64 [PASS] [tripwire] (1) flow-resolved blackout window: onset at step 131 (73.2 km), denied through the peak, exit at 46.8 km after a 55.9 s dwell [PASS] [tripwire] (2) peak n_e vs the RAM-C II anchor: n_e = 2.600e19 m^-3 at the 60.9 km passage, in [2.0e18, 5.0e19] around the flight anchor 1e19 m^-3 (evolved state, uncalibrated finite-rate network; the stagline-earned ±0.7-decade band) [PASS] [tripwire] (2b) blackout window altitudes: flow-resolved exit at 46.8 km (pinned band [40, 50] km) vs the RAM-C II 25-30 km flight window: the probe's light ballistic bundle decelerates it below the ionization threshold higher, so the offset is ballistics, not chemistry; onset predicted at 73.2 km - [PASS] [tripwire] (3) real INS drift -> reacquisition: err 0.1823 m -> 1.5637 m dead-reckoning to the peak passage, 0.2802 m after reacquisition; variance 2.290e-1 -> 2.671e1 -> 3.184e-1 m^2 + [PASS] [tripwire] (3) real INS drift -> reacquisition: err 0.1823 m -> 1.5637 m dead-reckoning to the peak passage, 0.2804 m after reacquisition; variance 2.290e-1 -> 2.671e1 -> 3.184e-1 m^2 [PASS] [tripwire] (4a) regime change: the descent crossed a Knudsen band (slip -> continuum), logged as provenance events [PASS] [tripwire] (4b) multiphysics chain: evolved flow -> reacting plasma -> steered aero force -> loads -> navigation all live in one coupling [PASS] [tripwire] (5a) bounded schedule rebuilds: 0 carrier rebuild(s) while following the descent (cap 3) diff --git a/examples/avionics_examples/cfd/plasma_blackout/retropulsion/README.md b/examples/avionics_examples/cfd/plasma_blackout/retropulsion/README.md index cdbec1582..7dab69773 100644 --- a/examples/avionics_examples/cfd/plasma_blackout/retropulsion/README.md +++ b/examples/avionics_examples/cfd/plasma_blackout/retropulsion/README.md @@ -18,7 +18,7 @@ collapse in 1970; past a thrust coefficient near 3 the interaction goes unsteady lights its engine too hard arrives faster than one that coasts. This example flies that trade as a **counterfactual on a marched flow state**. Mid-burn, the -plume-coupled state is forked once per candidate throttle and each branch continues from the same +marched, burn-coupled state is forked once per candidate throttle and each branch continues from the same instant in its own alternated world. The run self-verifies through sixteen gates and exits nonzero on any regression. Wall-clock is about six minutes. @@ -60,7 +60,7 @@ vehicle coasts from 76 km down through the Jarvinen-Adams band and the ignition at 32.7 km, Mach 2.00, 2235 Pa: inside the Mach band, inside the dynamic-pressure window, on a post-fix navigation state within the table-sized margin. -**The fork.** The marched, plume-coupled state is forked in O(1) through copy-on-write, once per +**The fork.** The marched, burn-coupled state is forked through copy-on-write, once per candidate throttle: a coast branch, two straddling the drag sign-flip band, a nominal branch, and an engine-degraded contingency. The preserved-drag fraction collapses 1.000 → 0.217 across the roster. That is the cited A0 correlation, carried per branch through a genuinely forked flight. Five diff --git a/examples/avionics_examples/cfd/plasma_blackout/retropulsion/constants.rs b/examples/avionics_examples/cfd/plasma_blackout/retropulsion/constants.rs index 2075c0915..7499db718 100644 --- a/examples/avionics_examples/cfd/plasma_blackout/retropulsion/constants.rs +++ b/examples/avionics_examples/cfd/plasma_blackout/retropulsion/constants.rs @@ -112,7 +112,7 @@ pub const MAX_STEP_COST_RATIO: f64 = 3.0; pub const FLOW_SPREAD_MIN: f64 = 0.015; /// (4c) Minimum departure of the realized trajectory from the frozen-drag prediction, m·s⁻¹. /// -/// **Re-earned 2026-07-20: measured 147.3 m/s**, pinned here with margin. The quantity changed units +/// **Re-earned 2026-07-20: measured 139.38 m/s** on the committed run, pinned here with margin. The quantity changed units /// and meaning, so the superseded 0.5 does not carry over: it bounded a difference of two closed /// forms in m·s⁻² whose thrust terms cancelled identically, which restated the drag gate. This bounds /// the separation of two **velocity increments** accumulated step by step over the same continuation @@ -122,7 +122,8 @@ pub const FROZEN_DRAG_SEPARATION_MIN: f64 = 100.0; /// (4b) Minimum collapse of the preserved-drag fraction across the **burning** branches' realized /// throttles. /// -/// **Re-earned 2026-07-20: measured 0.178** (0.1310 at the 0.16 branch down to −0.0472 at 0.38), +/// **Re-earned 2026-07-20: measured 0.3121** on the committed run (preserved drag falls 0.2510 at the +/// low branch to −0.0611 at the high one, across the four burning branches), /// pinned here with margin. The earlier 0.5 is superseded by a correction rather than relaxed, and /// two corrections moved it: /// @@ -141,7 +142,8 @@ pub const DRAG_COLLAPSE_MIN: f64 = 0.10; /// (5) Minimum separation between the informed and uninformed guidances' **flown** landing /// decisions — the altitude each lights its stopping burn at, m. /// -/// **Re-earned 2026-07-20: measured 23.44 m** (149.35 m informed against 125.91 m uninformed), +/// **Re-earned 2026-07-20: measured 14.06 m** on the committed run (139.12 m informed against +/// 125.06 m uninformed), /// pinned here with margin. The quantity changed, so the superseded 1.0 does not carry over: it /// bounded the difference between two interpolations of one CSV, computed before any march and /// invariant to the entire descent. diff --git a/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.main.log b/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.main.log index c896c6a66..fc7677041 100644 --- a/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.main.log +++ b/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.main.log @@ -635,3 +635,199 @@ rejoin sweep-1: branch outcomes rejoin dense_day.draw-5: complete (alternated) rejoin dense_day.draw-6: complete (alternated) rejoin dense_day.draw-7: complete (alternated) +fan-out sweep-1: branches spawned + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-0.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-1.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-2.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-3.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-4.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-5.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-6.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-7.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-0.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-1.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-2.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-3.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-4.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-5.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-6.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-7.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-0.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-1.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-2.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-3.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-4.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-5.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-6.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-7.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-0.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-1.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-2.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-3.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-4.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-5.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-6.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-7.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-0.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-1.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-2.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-3.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-4.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-5.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-6.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-7.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-0.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-1.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-2.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-3.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-4.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-5.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-6.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-7.log +rejoin sweep-1: branch outcomes + rejoin standard_day.draw-0: complete (baseline) + rejoin standard_day.draw-1: complete (baseline) + rejoin standard_day.draw-2: complete (baseline) + rejoin standard_day.draw-3: complete (baseline) + rejoin standard_day.draw-4: complete (baseline) + rejoin standard_day.draw-5: complete (baseline) + rejoin standard_day.draw-6: complete (baseline) + rejoin standard_day.draw-7: complete (baseline) + rejoin hot_day.draw-0: complete (alternated) + rejoin hot_day.draw-1: complete (alternated) + rejoin hot_day.draw-2: complete (alternated) + rejoin hot_day.draw-3: complete (alternated) + rejoin hot_day.draw-4: complete (alternated) + rejoin hot_day.draw-5: complete (alternated) + rejoin hot_day.draw-6: complete (alternated) + rejoin hot_day.draw-7: complete (alternated) + rejoin cold_day.draw-0: complete (alternated) + rejoin cold_day.draw-1: complete (alternated) + rejoin cold_day.draw-2: complete (alternated) + rejoin cold_day.draw-3: complete (alternated) + rejoin cold_day.draw-4: complete (alternated) + rejoin cold_day.draw-5: complete (alternated) + rejoin cold_day.draw-6: complete (alternated) + rejoin cold_day.draw-7: complete (alternated) + rejoin polar_winter.draw-0: complete (alternated) + rejoin polar_winter.draw-1: complete (alternated) + rejoin polar_winter.draw-2: complete (alternated) + rejoin polar_winter.draw-3: complete (alternated) + rejoin polar_winter.draw-4: complete (alternated) + rejoin polar_winter.draw-5: complete (alternated) + rejoin polar_winter.draw-6: complete (alternated) + rejoin polar_winter.draw-7: complete (alternated) + rejoin thin_day.draw-0: complete (alternated) + rejoin thin_day.draw-1: complete (alternated) + rejoin thin_day.draw-2: complete (alternated) + rejoin thin_day.draw-3: complete (alternated) + rejoin thin_day.draw-4: complete (alternated) + rejoin thin_day.draw-5: complete (alternated) + rejoin thin_day.draw-6: complete (alternated) + rejoin thin_day.draw-7: complete (alternated) + rejoin dense_day.draw-0: complete (alternated) + rejoin dense_day.draw-1: complete (alternated) + rejoin dense_day.draw-2: complete (alternated) + rejoin dense_day.draw-3: complete (alternated) + rejoin dense_day.draw-4: complete (alternated) + rejoin dense_day.draw-5: complete (alternated) + rejoin dense_day.draw-6: complete (alternated) + rejoin dense_day.draw-7: complete (alternated) +fan-out sweep-1: branches spawned + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-0.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-1.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-2.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-3.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-4.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-5.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-6.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-00-standard_day.draw-7.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-0.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-1.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-2.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-3.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-4.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-5.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-6.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-01-hot_day.draw-7.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-0.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-1.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-2.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-3.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-4.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-5.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-6.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-02-cold_day.draw-7.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-0.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-1.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-2.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-3.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-4.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-5.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-6.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-03-polar_winter.draw-7.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-0.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-1.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-2.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-3.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-4.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-5.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-6.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-04-thin_day.draw-7.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-0.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-1.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-2.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-3.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-4.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-5.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-6.log + spawn /Users/marvin/RustroverProjects/dcl/deep_causality/examples/avionics_examples/cfd/plasma_blackout/weather/audit/weather.audit.sweep-1.case-05-dense_day.draw-7.log +rejoin sweep-1: branch outcomes + rejoin standard_day.draw-0: complete (baseline) + rejoin standard_day.draw-1: complete (baseline) + rejoin standard_day.draw-2: complete (baseline) + rejoin standard_day.draw-3: complete (baseline) + rejoin standard_day.draw-4: complete (baseline) + rejoin standard_day.draw-5: complete (baseline) + rejoin standard_day.draw-6: complete (baseline) + rejoin standard_day.draw-7: complete (baseline) + rejoin hot_day.draw-0: complete (alternated) + rejoin hot_day.draw-1: complete (alternated) + rejoin hot_day.draw-2: complete (alternated) + rejoin hot_day.draw-3: complete (alternated) + rejoin hot_day.draw-4: complete (alternated) + rejoin hot_day.draw-5: complete (alternated) + rejoin hot_day.draw-6: complete (alternated) + rejoin hot_day.draw-7: complete (alternated) + rejoin cold_day.draw-0: complete (alternated) + rejoin cold_day.draw-1: complete (alternated) + rejoin cold_day.draw-2: complete (alternated) + rejoin cold_day.draw-3: complete (alternated) + rejoin cold_day.draw-4: complete (alternated) + rejoin cold_day.draw-5: complete (alternated) + rejoin cold_day.draw-6: complete (alternated) + rejoin cold_day.draw-7: complete (alternated) + rejoin polar_winter.draw-0: complete (alternated) + rejoin polar_winter.draw-1: complete (alternated) + rejoin polar_winter.draw-2: complete (alternated) + rejoin polar_winter.draw-3: complete (alternated) + rejoin polar_winter.draw-4: complete (alternated) + rejoin polar_winter.draw-5: complete (alternated) + rejoin polar_winter.draw-6: complete (alternated) + rejoin polar_winter.draw-7: complete (alternated) + rejoin thin_day.draw-0: complete (alternated) + rejoin thin_day.draw-1: complete (alternated) + rejoin thin_day.draw-2: complete (alternated) + rejoin thin_day.draw-3: complete (alternated) + rejoin thin_day.draw-4: complete (alternated) + rejoin thin_day.draw-5: complete (alternated) + rejoin thin_day.draw-6: complete (alternated) + rejoin thin_day.draw-7: complete (alternated) + rejoin dense_day.draw-0: complete (alternated) + rejoin dense_day.draw-1: complete (alternated) + rejoin dense_day.draw-2: complete (alternated) + rejoin dense_day.draw-3: complete (alternated) + rejoin dense_day.draw-4: complete (alternated) + rejoin dense_day.draw-5: complete (alternated) + rejoin dense_day.draw-6: complete (alternated) + rejoin dense_day.draw-7: complete (alternated) diff --git a/examples/avionics_examples/cfd/plasma_blackout/weather/weather_table.csv b/examples/avionics_examples/cfd/plasma_blackout/weather/weather_table.csv index f490d9049..87536fac2 100644 --- a/examples/avionics_examples/cfd/plasma_blackout/weather/weather_table.csv +++ b/examples/avionics_examples/cfd/plasma_blackout/weather/weather_table.csv @@ -1,8 +1,8 @@ d_temp,rho_scale,bias_departure,onset,exit,dwell,ne_max,q_max,drift_mean,drift_sd,terminal_mean,terminal_max #units,K,-,-,s,s,s,m^-3,W/m2,m,m,m,m -0,1,1,13.100000000000001,68.7,55.70000000000052,473379664855268400000,4775192.027060186,41.601723871383115,1.973141550108337,0.1331964477024762,0.1948427188033436 -20,0.9,1.2,13.600000000000001,69,55.50000000000052,472049383321684100000,4773206.511247898,48.63592540128981,2.395017638167436,0.14131227555381962,0.21155046948770528 --25,1.1,1.25,12.8,68.60000000000001,55.900000000000524,473437102543209200000,4869937.750297608,50.68247557317101,2.932199884062607,0.1323833433988922,0.20637876470998276 --40,1.2,1.4,12.4,68.4,56.10000000000053,476506008399836200000,4956414.221541537,58.709800996504406,2.271501542211274,0.15078509865731313,0.21883894084621483 --5,0.75,1.05,14.600000000000001,69.5,55.00000000000051,453872130746872700000,5214946.9872479625,41.27518914247117,1.943451563626778,0.13629465922213013,0.18843125587471923 -5,1.3,1.05,12.100000000000001,68.10000000000001,56.10000000000053,494724867162922300000,5035656.220701893,43.05313923084944,1.710953256535808,0.1411124033241194,0.20666400859204723 +0,1,1,13.100000000000001,68.7,55.70000000000052,473379664855268400000,4775192.027060186,41.601742513703684,1.9731923342228972,0.1331770515200405,0.1947937256987552 +20,0.9,1.2,13.600000000000001,69,55.50000000000052,472049383321684100000,4773206.511247898,48.63607315038705,2.3950985453551334,0.1413268861656593,0.21157219893204607 +-25,1.1,1.25,12.8,68.60000000000001,55.900000000000524,473437102543209200000,4869937.750297608,50.6826083505661,2.9323273853977825,0.13237417050304937,0.20639125079484147 +-40,1.2,1.4,12.4,68.4,56.10000000000053,476506008399836200000,4956414.221541537,58.709922175933954,2.2714457178786884,0.15077638161792054,0.21885252510170508 +-5,0.75,1.05,14.600000000000001,69.5,55.00000000000051,453872130746872700000,5214946.9872479625,41.27525664464444,1.9434898169983168,0.13627367777818344,0.18840781945548205 +5,1.3,1.05,12.100000000000001,68.10000000000001,56.10000000000053,494724867162922300000,5035656.220701893,43.05316713807534,1.7109896606280117,0.14109974071654927,0.20671077497376938 diff --git a/examples/avionics_examples/cfd/turbulence_flow/README.md b/examples/avionics_examples/cfd/turbulence_flow/README.md index 4154d26fe..6ed979973 100644 --- a/examples/avionics_examples/cfd/turbulence_flow/README.md +++ b/examples/avionics_examples/cfd/turbulence_flow/README.md @@ -30,14 +30,21 @@ Run the same `Rk4` scheme at the same step `dt` at two precisions. The two compu identical discrete map and differ only by roundoff, of size machine epsilon `ε`. Because the scheme and step match, the truncation error is common to both and cancels in their difference, so the state-space distance between them is the roundoff growth alone. That seed of size `ε` grows like -`e^{λ t}` and reaches the scale of the attractor (`L ≈ 10`) at +`e^{λ t}` and reaches the separation `L` at which the forecast is declared lost at ``` t_horizon ≈ ln(L / ε) / λ ``` -Past that time the forecast has lost every correct digit. It is still a plausible turbulent state, -but no longer the one that follows from the initial condition. The horizon grows linearly in the +This example sets `L = 1`, the unit separation threshold in `main.rs`, and `Report::horizon_law` +evaluates the law at that value: `t ≈ −ln(ε)/λ`. The choice is conservative. The attractor is tens +of state-space units across (the divergence table below reaches `3.3e1`), so a forecast that has +drifted one unit is called dead while it still looks like the right flow. Declaring the loss at the +attractor scale instead would raise every horizon by `ln(L)/λ`, about 2.5 time units per decade, +and would not change their order. + +Past that time the forecast is no longer the trajectory that follows from the initial condition. It +is still a plausible turbulent state on the same attractor. The horizon grows linearly in the number of correct digits, so each step up in precision extends the trustworthy window by a fixed amount. @@ -47,31 +54,40 @@ amount. cargo run -p avionics_examples --example turbulence_flow ``` -Sample output (state-space distance to the Float106 forecast; truncation cancels, so this is -roundoff growth): +The divergence table and horizon summary from a run, verbatim (state-space distance to the Float106 +forecast; truncation cancels, so this is roundoff growth): ``` t | f32 vs F106 | f64 vs F106 --------+---------------+-------------- 5.0 | 2.69e-5 | 2.31e-14 10.0 | 1.48e-4 | 1.09e-13 + 15.0 | 4.49e-3 | 4.62e-12 20.0 | 1.94e-1 | 1.96e-10 25.0 | 1.99e1 | 4.01e-8 + 30.0 | 1.75e1 | 2.97e-6 + 35.0 | 2.49e1 | 2.21e-3 40.0 | 2.69e0 | 4.84e-3 45.0 | 1.71e1 | 2.00e0 + 50.0 | 1.17e1 | 1.55e1 + 55.0 | 3.31e1 | 1.67e1 -Forecast horizon (lead time before the state is off by one state-space unit): +Forecast horizon (lead time before the flow state is off by one state-space unit): f32 t ≈ 21.5 f64 t ≈ 44.5 - Float106 beyond T=60 here; the law puts it near t ≈ 81 + Float106 beyond T=60 here; the law below puts it near t ≈ 81 ``` +There is no committed `output.txt` for this example, so the block above is the only reference +record of what it prints; rerun it to diff. + ## Reading it **An f64 forecast of this flow is trustworthy to about `t ≈ 44`,** then becomes fiction. Its divergence starts near `1e-14` (the `~2e-16` roundoff seed, already amplified a little) and climbs -by roughly `e^{λ t}` until it saturates around the attractor diameter near `t ≈ 45`. No smaller -`dt` helps; the wall is roundoff, not truncation. +by roughly `e^{λ t}`. It crosses the unit threshold at `t = 44.5` and saturates at attractor scale, +order ten units, a few time units after that (`1.55e1` at `t = 50`). No smaller `dt` helps; the +wall is roundoff, not truncation. **f32 fails far sooner, at `t ≈ 21`,** because its seed (`~1e-7`) is nine orders larger. **Float106 reaches `t ≈ 81`** by the same law, roughly double f64. The measured spacing between the diff --git a/examples/avionics_examples/cfd/turbulence_flow/main.rs b/examples/avionics_examples/cfd/turbulence_flow/main.rs index 2471b250b..2b7ee6f18 100644 --- a/examples/avionics_examples/cfd/turbulence_flow/main.rs +++ b/examples/avionics_examples/cfd/turbulence_flow/main.rs @@ -39,11 +39,28 @@ fn main() { "=== Turbulence predictability: the forecast horizon of a chaotic convective flow ===\n" ); + // ── Study parameters. This example carries no `constants.rs`, so each value is justified here. + // + // `dt`: the Rk4 step. It is the same at every precision, which is the whole design of the + // measurement: an identical scheme at an identical step makes the truncation error common to + // the three runs, so it cancels in their difference and the distance that remains is roundoff + // growth alone. Its size therefore sets accuracy, not the reported horizons. + // + // `ic`: the initial state. Each component is exactly representable in f32, f64 and Float106, + // so all three forecasts start from the same point and every separation is generated by the + // march rather than by the conversion of the initial condition. + // + // `sample_dt`: snapshot spacing, two samples per time unit. Horizons are read off the samples, + // so this is also the quantum the reported horizon is resolved to (hence `t ≈ 21.5`, `44.5`). + // + // `samples`: 120 snapshots at 0.5 is `T = 60`. Long enough that f32 and f64 both cross the + // threshold inside the run; Float106's predicted crossing near `t ≈ 81` lies beyond it, which + // is why the report states that horizon from the law instead of measuring it. let params = ConvectionParams::default(); - let dt = 0.005_f64; // Rk4 step - let ic = [1.0_f64, 1.0, 1.0]; // exactly representable, so all precisions start identical - let sample_dt = 0.5_f64; // record the state twice per time unit - let samples = 120usize; // march to T = 60 + let dt = 0.005_f64; + let ic = [1.0_f64, 1.0, 1.0]; + let sample_dt = 0.5_f64; + let samples = 120usize; let steps_per_sample = (sample_dt / dt) as usize; // 100 steps between snapshots // The workflow is a causal-monad chain: forecast at three precisions, then (only if every @@ -87,6 +104,12 @@ fn simulate( /// Stage 2: measure each precision's forecast horizon (where it parts from the Float106 trajectory /// by more than one state-space unit) and tabulate the divergence over time. fn analyse(s: Forecasts, sample_dt: f64) -> PropagatingEffect { + // The separation at which a forecast is declared lost: one state-space unit. This is the `L` of + // the horizon law `t ≈ ln(L/ε)/λ` that `Report::horizon_law` evaluates, and it sets every + // horizon this example reports. The value is conservative against the flow it measures: the + // attractor is tens of units across, so a forecast is called dead while it is still a plausible + // state on the right attractor. Declaring the loss at attractor scale instead would raise all + // three horizons by `ln(L)/λ`, about 2.5 time units per decade, and leave their order alone. let threshold = 1.0; let h_f32 = model::forecast_horizon(&s.f32_106, &s.ref_106, sample_dt, threshold); let h_f64 = model::forecast_horizon(&s.f64_106, &s.ref_106, sample_dt, threshold); diff --git a/examples/avionics_examples/src/shared/constants.rs b/examples/avionics_examples/src/shared/constants.rs index 003c05455..344f804c3 100644 --- a/examples/avionics_examples/src/shared/constants.rs +++ b/examples/avionics_examples/src/shared/constants.rs @@ -45,8 +45,18 @@ pub const L: usize = 5; pub const CAP: usize = 16; /// Solver pseudo-time step (nondimensional; one per coupled step). pub const DT_SOLVER: f64 = 0.002; -/// Reference wave speed of the implicit acoustic envelope. Deliberately snug: the peak-station -/// inflow outgrows it once, so the rebuild-on-drift mechanism fires where the descent steepens. +/// Reference wave speed of the implicit acoustic envelope. +/// +/// The rebuild-on-drift mechanism does **not** fire on the corridor's current profile. The carrier +/// re-pins its envelope when the marched state needs more than it has, `û + √(γ·T̂) > s_ref·(1 + +/// tol)`; at 1.8 the descent never crosses that, so the corridor's gate (5a) reports 0 rebuilds and +/// its provenance log carries no `carrier rebuilt at step` entry. The weather example flies the same +/// value and also records none. Nothing here is out of tolerance; the envelope is simply wide enough +/// for the profiles these examples fly. +/// +/// The mechanism is exercised by the retropulsion example's terminal leg, which flies +/// [`S_REF_TERMINAL`] (1.4) into sea-level air and logs `carrier rebuilt at step 1: s_ref 1.4 -> +/// 2.7683613571273638 (rebuild 1)`. Read that example, not this constant, for the rebuild path. pub const S_REF: f64 = 1.8; /// Effective ratio of specific heats through the shock (reacting air, the calibrated recipe). pub const GAMMA_EFF: f64 = 1.1; @@ -169,15 +179,26 @@ pub const P0_DIAG: [f64; 17] = [ 1.0e-8, 1.0e-8, 1.0e-8, // gyro bias 1.0e-6, 1.0e-8, // clock bias, drift ]; -/// ESKF process-noise diagonal per coupled step, per block: modest position/velocity random -/// walk (integrator and gravity-gradient mismatch), near-constant biases. +/// ESKF process-noise **continuous-time spectral density** (units `state²/s`), per block: modest +/// position/velocity random walk (integrator and gravity-gradient mismatch), near-constant biases. +/// [`NavFilter::predict`](deep_causality_cfd::NavFilter::predict) discretises it onto each step as +/// `Q_d = Q_c·dt`. +/// +/// These are the previous per-step values re-expressed as a spectral density by the +/// `per-step → per-second` conversion `Q_c = Q_step / DT_FLIGHT` (i.e. ×10 at `DT_FLIGHT = 0.1 s`), so +/// that `Q_c·dt` at the configured step reproduces the calibrated per-step process noise while making the +/// tuning independent of the step size. The magnitudes therefore read 10× the pre-2026-07-24 per-step +/// diagonal. The round-trip `Q_step × 10 × 0.1` is bit-exact for the position, velocity, attitude, +/// accel-bias and clock-bias blocks; for the gyro-bias and clock-drift blocks (`1e-14`) it differs by +/// ≤1 ULP (`1e-13 × 0.1 ≠ 1e-14` in `f64`), far below any observable effect, so the filter's behaviour at +/// `DT_FLIGHT` is unchanged **at every displayed figure** (see the discretisation note on `NavFilter::predict`). pub const Q_DIAG: [f64; 17] = [ - 1.0e-4, 1.0e-4, 1.0e-4, // position - 1.0e-4, 1.0e-4, 1.0e-4, // velocity - 1.0e-12, 1.0e-12, 1.0e-12, // attitude - 1.0e-12, 1.0e-12, 1.0e-12, // accelerometer bias - 1.0e-14, 1.0e-14, 1.0e-14, // gyro bias - 1.0e-12, 1.0e-14, // clock bias, drift + 1.0e-3, 1.0e-3, 1.0e-3, // position + 1.0e-3, 1.0e-3, 1.0e-3, // velocity + 1.0e-11, 1.0e-11, 1.0e-11, // attitude + 1.0e-11, 1.0e-11, 1.0e-11, // accelerometer bias + 1.0e-13, 1.0e-13, 1.0e-13, // gyro bias + 1.0e-11, 1.0e-13, // clock bias, drift ]; /// GNSS fix variance, m²: a precise code-phase receiver at 1 m 1σ. The published fixes carry /// deterministic receiver noise with exactly this variance, so the filter's `R` matches the diff --git a/examples/avionics_examples/src/shared/world.rs b/examples/avionics_examples/src/shared/world.rs index 45473fe2f..0557a3d8e 100644 --- a/examples/avionics_examples/src/shared/world.rs +++ b/examples/avionics_examples/src/shared/world.rs @@ -232,7 +232,8 @@ pub fn initial_field() -> CoupledField { let filter = NavFilter::new( InsErrorState::::zero(), core::array::from_fn(|i| utils::ft(P0_DIAG[i])), - ); + ) + .expect("P0_DIAG is a valid covariance diagonal (finite, non-negative variances)"); field.set_nav(ReentryNavEngine::new( nav_r0, nav_v0, diff --git a/openspec/notes/cfd_audit/ACTION-LIST.md b/openspec/audits/cfd_audit/ACTION-LIST.md similarity index 100% rename from openspec/notes/cfd_audit/ACTION-LIST.md rename to openspec/audits/cfd_audit/ACTION-LIST.md diff --git a/openspec/notes/cfd_audit/AUDIT-REPORT.md b/openspec/audits/cfd_audit/AUDIT-REPORT.md similarity index 64% rename from openspec/notes/cfd_audit/AUDIT-REPORT.md rename to openspec/audits/cfd_audit/AUDIT-REPORT.md index fc29e0441..70662822d 100644 --- a/openspec/notes/cfd_audit/AUDIT-REPORT.md +++ b/openspec/audits/cfd_audit/AUDIT-REPORT.md @@ -6,15 +6,19 @@ Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Right # `deep_causality_cfd` — Pre-Certification Audit **Date:** 2026-07-21 -**Scope:** `deep_causality_cfd/` (src, tests, verification, studies, benches) and `examples/avionics_examples/cfd/` +**Scope:** `../../../deep_causality_cfd` (src, tests, verification, studies, benches) and `../../../examples/avionics_examples/cfd` **Purpose:** Establish whether the crate can be certified for avionics **R&D** use — whether an engineer can trust that each marcher and kernel computes what the specification and the reference formula say it computes. -> **Status: NOT YET CERTIFIABLE. Phase 1 complete; Phase 2 in progress (3 of 4 changes landed, -> plus one follow-up capability). All four certification blockers are resolved; B-1 closed with -> `fix-ramc-vibrational-relaxation-pair`. The remaining Phase-2 change is -> `fix-navigation-filter-correctness` (item 9).** +> **Status: Phases 1–4 complete. All four certification blockers are resolved.** Phase 2 closed +> 2026-07-24 with `fix-navigation-filter-correctness` (item 9). `reconcile-cfd-docs-and-traceability` +> (2026-07-26) closed Phases 3 and 4: items 17 and 19–23 in full, item 24 bar its broadest sweep, and +> **all 125 catalogued doc-overclaim and doc-gap rows** behind items 16 and 18 — 116 closed by that +> change, 9 already closed by Phases 1–2, **0 remaining**. §10's recommendation was to certify after +> Phases 1 and 2; every phase is now complete and the certify decision is the owner's. Two defects the +> documentation work surfaced are recorded and *not* fixed: the Taylor–Green harness fails at its own +> documented `max_level 7`, and the crate's public API leaks workspace types it does not re-export.** > > The crate is not broken. Its numerical core is, in every place checkable against a closed-form > reference, *exactly* right — including a lid-driven-cavity primary vortex matching Ghia (1982) to four @@ -27,8 +31,8 @@ computes. > ### Remediation status — updated 2026-07-21 > > **Phase 1 is implemented and archived** as -> [`openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/`](../../changes/archive/2026-07-21-make-cfd-evidence-enforceable/), -> 43/43 tasks. Its four capability specs are synced into `openspec/specs/`. +> [`../../changes/archive/2026-07-21-make-cfd-evidence-enforceable`](../../changes/archive/2026-07-21-make-cfd-evidence-enforceable/), +> 43/43 tasks. Its four capability specs are synced into `../../specs`. > > | Blocker | Status | > |---|---| @@ -38,8 +42,8 @@ computes. > | **B-4** `BlendedMap` documents an absent fold check | **RESOLVED** — Phase 2 change 4 | > > **Phase 2, change 4 is implemented and archived** as -> [`openspec/changes/archive/2026-07-21-resolve-cfd-contract-gaps/`](../../changes/archive/2026-07-21-resolve-cfd-contract-gaps/), -> closing items **8, 11 and 15**; its three capability specs are synced into `openspec/specs/`. +> [`../../changes/archive/2026-07-21-resolve-cfd-contract-gaps`](../../changes/archive/2026-07-21-resolve-cfd-contract-gaps/), +> closing items **8, 11 and 15**; its three capability specs are synced into `../../specs`. > One task is recorded as **skipped, not done** — see the note at the end of this block. What the > change found beyond this report: > @@ -191,6 +195,100 @@ computes. > `close-qtt-solver-envelope`: even the adversarial pass leaves a residue, and claiming otherwise is > itself the overclaim the audit exists to catch. > +> **Phase 2, change `fix-navigation-filter-correctness` is implemented and archived**, closing item +> **9** — the last Phase-2 change, and with it the whole of Phase 2. It gave the GNSS-denial ESKF the +> three things §4b found missing: the process noise is a stated first-order discretisation `Q_d = Q_c·dt` +> (covariance grows with elapsed time, not step count); the scalar update returns a `Result` and refuses a +> non-finite/negative variance or a non-positive innovation covariance *atomically*; and a covariance is +> validated (symmetric, non-negative diagonal, finite) at construction and restoration. The attitude-error +> lifecycle was closed by **option (a)** (owner decision): `ReentryNavEngine` now carries a nominal +> `Quaternion`, integrates the sensed body rate, injects the estimated `δψ` on a fix, and only then resets — +> so the reset is legitimate rather than a discarded estimate. The 17-state composition, `nav_transition_matrix` +> and the Joseph update — confirmed correct by the audit — are byte-unchanged. What it found beyond this report: +> +> - **The examples' figures move a little, and that is the correction working — not the `Q` re-tune.** The +> `÷dt` re-tune is calibration-preserving at the examples' fixed `dt`, so group 4 alone leaves every +> displayed figure unchanged (bit-exact bar a ≤1-ULP gyro-bias/clock-drift residue). The visible movement is +> option (a): a position fix folds a small `δψ` through the position↔attitude cross-covariance the `−[f]×` +> block builds, and injecting it tilts the nominal off identity, so `C(q) ≠ I` on later steps. Measured, +> deterministic, isolated: corridor reacquisition `0.2802 → 0.2804 m`, dead-reckoning variance +> `2.6711e1 → 2.6710e1 m²`; every other figure unchanged; all gates hold. The design had called (a) "a +> covariance-legitimacy fix, not a visible change to the mean" — true for *predict*, but the fix-injection +> path makes it visible. `corridor/output.txt` regenerated. +> - **`ins_gnss_blackout` is not a filter consumer.** The change's own artifacts named it (and `world.rs`) as +> `ReentryNavEngine::predict` call sites; against the tree neither is — `world.rs` only *builds* the engine, +> and `ins_gnss_blackout` is a standalone P-controller model that touches neither filter. The only in-crate +> `predict` caller is the `TrajectoryNav` stage. Corrected in the proposal, design and tasks. +> - **The adversarial pass over the finished diff caught a real defect and a cluster of overclaims — all +> mine — the same pattern as every prior Phase-2 change.** A six-dimension review (each finding +> independently verified, refute-by-default) confirmed **13**. One was a genuine **correctness gap**, in the +> same class the change exists to close: `update_scalar` guarded the variance `r` and the innovation `s` but +> **not the measurement `z`**, so a non-finite `z` (a garbage GNSS/optical fix, reachable through +> `correct_position` ← `TrajectoryNav` with no finiteness check on the fix cells) passed both guards and +> wrote `NaN` into every state component while the covariance stayed finite — an invisible poison that also +> defeated `correct_position`'s advertised atomicity. Fixed (guard `!z.is_finite()` before any mutation) with +> a test that a NaN/±∞ measurement is refused and the filter left untouched, and that `correct_position` +> rolls back. The rest were documentation/spec overclaims: "reproduces the per-step `Q` bit-for-bit" (false +> for the gyro-bias/clock-drift blocks by ≤1 ULP); "validation makes the degenerate path unreachable rather +> than merely guarded" (the zero-variance boundary is admitted by design, so it stays reachable and +> D2-guarded); a spec requirement asserting construction rejects any non-PSD covariance where the code checks +> only the necessary conditions (the update guard is the operational PSD backstop); rustdoc still saying the +> non-rotating examples' "numbers are unchanged"; a stale `ins_gnss_blackout` call-site line left in +> `design.md` after the others were corrected; and "weather drift unchanged" where the committed +> `weather_table.csv` moved at `f64` precision. All fixed. One **info**-level item is left open and recorded: +> the attitude-injection tests assert the nominal moves and stays unit, but not the **sign/axis** of the +> rotation — the point-mass examples do not rotate, so a flipped convention would pass; verifying it needs a +> 6-DOF known-answer reference, which the design lists as a Non-Goal (full attitude *observability*). So the +> honest tally is "one correctness gap found and fixed, a cluster of overclaims found and fixed, one info-level +> verification gap deferred" — **not "clean"**: the lesson holds a fourth time. +> +> **Phases 3–4, change `reconcile-cfd-docs-and-traceability` is implemented (2026-07-26)**, closing items +> **17 and 19–23** in full, **24** bar its broadest sweep, and **16/18 entirely**. It completes both +> phases. What it found beyond this report: +> +> - **The tally, enumerated rather than asserted: all 125 catalogued rows are accounted for — 116 closed +> by this change, 9 already closed by Phases 1–2, 0 remaining.** The doc-overclaim (86) and doc-gap (39) +> rows were enumerated mechanically from `ACTION-LIST.md`, and each closed row is listed by ref in the +> change's `tasks.md`, so completeness is checkable against the catalogue rather than trusted. The rows +> whose action was a **code** change (13.9 aside, which was implemented with tests) had their +> documentation arm taken and the code arm recorded: constructor validation elsewhere, `Result` +> returns, re-exports, and cross-crate visibility all remain open and need their own plan. +> - **Counting it correctly took three attempts, and the method is the lesson.** Two intermediate tallies +> were mutually inconsistent, and one batch of two rows was dropped from the work assignments +> altogether. None of that was caught by review; it was caught by re-running the count against the +> catalogue. A completeness claim that cannot be recomputed from the artifact is not evidence. +> - **Item 21 produced a real, previously unrecorded defect: the Taylor–Green harness fails at its own +> documented `max_level 7`.** Holding `dt` fixed makes the first-order Euler error a floor *of opposite +> sign* to the spatial error. Re-derived in closed form, the signed error runs `+9.8e-4, +2.4e-4, +> +5.3e-5, +5.9e-6, −5.9e-6, −8.8e-6` for `N = 8…256`: the two cancel near `N = 64–128`, so the +> `N = 64` order of **3.16 is a cancellation artifact, not super-convergence**, and by `N = 128` the +> observed order collapses to **0.02**, below the `MIN_ORDER = 1.8` gate. The maximum usable ladder +> length is therefore `max_level = 5`, the committed default, and that is now documented. **A documented +> user action still produces a FAIL**; fixing it needs a two-sided order gate (`1.8 ≤ p ≤ 2.2`) or `dt` +> refined as `dt ∝ dx²`. Both are code changes, recorded and deferred. +> - **A doc-overclaim was closed by correcting the code instead of softening the prose.** The README's +> "the DSL never exits or prints" was false only because the dead `Gates` type held the only five +> `println!` in `src/`. Retiring `Gates` (item 22, owner decision) made the claim true as written: +> `src/` now contains zero `println!`, `eprintln!`, `panic!` and `process::exit`. `Gates` was a parallel +> API no shipped program constructed — `Gates::new` appeared only in its own unit test. +> - **Item 18 needed no work, and the report of it being open was itself the defect.** All four named +> capabilities were already documented in the crate README. The pre-implementation scan that reported +> them missing used a **malformed grep** (unescaped `|`, so the shell piped instead of matching), and the +> empty result was read as absence. This is §5c lesson 5 landing on the remediation's own reconnaissance: +> *a negative asserted from an unstated search is worth nothing.* +> - **The adversarial pass over the finished diff found four defects, all mine, and the worst was a +> conclusion published without its confirming measurement.** I ran the ladder to `N = 64`, saw order +> 3.16, and wrote into a source docstring and two READMEs that the temporal floor "is not observed" and +> the ladder was "still converging". The `N = 128` run that would have refuted it had **timed out**, and +> I wrote the conclusion anyway; I also read a super-convergent order as good news rather than as the +> classic cancellation signature. Also found: a Kazeev–Khoromskij citation whose year, venue, volume and +> pages I supplied **from recall** when the repository records only author and title — an unverifiable +> claim introduced by the change whose purpose is removing unverifiable claims; a row (16.9) recorded as +> closed when only half of it was done; and a catalogue count that contradicted itself across two tasks. +> All four fixed. So the honest tally at that point was "four defects found and fixed" — **not "clean"**: the lesson holds +> a **fifth** time, and this time the failure was treating an unfinished measurement as a finished one. +> The catalogue tail was closed afterwards, in the same change. +> > What Phase 1 changed, and what it found beyond this report: > > - CI now runs the suite: nine fast harnesses per PR (12.7 s), four nightly, with a completeness @@ -398,7 +496,7 @@ rather than re-admitted; the finite-rate network's renewal arm survives at +0.35 block at the top of this report. ### B-2 — No CI or Bazel target executes the verification suite -`.github/workflows/run_tests.yml` — no `cargo run --example` anywhere +`../../../.github/workflows/run_tests.yml` — no `cargo run --example` anywhere Every external-reference comparison in the crate (exact Riemann, Ghia cavity, Williamson cylinder, RAM-C flight nₑ) lives in `verification/` binaries that CI compiles and never runs. @@ -461,7 +559,12 @@ findings compose: tracks step count rather than elapsed time; and `update_scalar` divides by an unguarded innovation covariance with no validation of the measurement variance, reachable from the public API (`P[i][i]=0, r_var=0` → `k = NaN` written into state and covariance). To the code's credit the same -function uses a correct Joseph-form update citing Groves (2013) §3.4.3. +function uses a correct Joseph-form update citing Groves (2013) §3.4.3. — ✅ **RESOLVED (2026-07-24, +`fix-navigation-filter-correctness`, item 9):** `Q` is now the first-order discretisation `Q_d = Q_c·dt`; +`update_scalar` returns `Result` and refuses a non-positive/non-finite `s`, a negative/non-finite `r`, **and** +(caught by the adversarial pass) a non-finite measurement `z`, atomically; construction/restoration validate +the covariance. The attitude-error lifecycle was closed by option (a) — a nominal `Quaternion` that `δψ` is +injected into before the reset. The Joseph update the audit praised is byte-unchanged. **`wall_heat_flux` is not a flux** — it is a temperature-weighted volumetric rate with no gradient, conductivity or surface normal, and the production path hardcodes `t_wall = 0` with no way to configure @@ -540,7 +643,7 @@ resolves the smoothing skirt rather than the penalization layer. merges. **Update (`close-qtt-solver-envelope`):** item 10 resolved the *configuration* (η from a wall-error target, `L = 8` resolving the layer), but the acceptance harness then cost ~4-9 h to run, so the harness was **reclassified from nightly `KNOWN-FAILING` to `OFFLINE_HARNESSES`** in -`.github/workflows/cfd_verification.yml` — still accounted for by the completeness check, run manually, +`../../../.github/workflows/cfd_verification.yml` — still accounted for by the completeness check, run manually, not in CI. The failure it recorded (`C_d` tracks blur width, no η→0 limit) was a *resolution* finding; the current blocker is *solver performance* at the resolution the physics needs (§9 item 10). @@ -618,27 +721,48 @@ matters** before claiming a change is verified. Ranking reflects **assurance**, not elegance. Critical counts are post-review. -| Rank | Module | Readiness | Crit | Basis | +**How to read this table after remediation (2026-07-26).** The ranking was produced by the 16 module +auditors at as-found state. Re-ranking a module is a re-audit, and **no re-audit has been run**, so the +readiness column keeps its as-found value and the Basis column records what has since closed, with the +evidence. Two distinctions matter when reading it: + +- **The 24-item remediation plan (Phases 1–4) is complete.** That plan is what §9 tracks. +- **The 290 raw findings are not all closed row-by-row.** The two documentation axes are: all **125** + `doc-overclaim` and `doc-gap` rows are closed individually and the count is recomputable from + `ACTION-LIST.md`. The other **165** (`tautology-circular` 72, `physics-math` 48, `magic-number` 45) + were addressed through the consolidated Phase-1/2 items — gates repaired and demonstrated falsifiable, + CI execution, the physics-constant corrections, the solver envelopes — **not** one row at a time. A + module whose remaining exposure sits in those axes therefore stays `needs-work` until someone re-audits + it, even where the phase items covering it are done. + +| Rank | Module | Readiness | Crit | Basis, and what has closed | |---|---|---|---|---| -| 1 | Pointwise theories | `needs-work` | 0 | Governing equations check out; issues are doc parity and constant traceability | -| 2 | DEC NS rate kernel | `needs-work` | 0 | RK4 tableau exact; Δ = dδ+δd correctly ordered; δ = M⁻¹BM is the true discrete adjoint, so −νΔ provably dissipates; Leray projection inside every RK4 stage. Docs describe a different convective operator than the code marches | -| 3 | DEC solver driver | `needs-work` | 0 | Projection consistent; issues in diagnostics and tolerance justification | -| 4 | QTT compressible marchers | `needs-work` | 0 | RH exact (hand-verified); Sod matches exact Riemann; ✅ non-positive pressure now rejected before the flux across all four marchers (item 12) | -| 5 | CfdFlow DSL | `needs-work` | 0 | CoW fork and determinism largely as advertised; doc overclaims | -| 6 | Docs-vs-code parity | `needs-work` | 0 | 87 doc-overclaim + 39 doc-gap findings crate-wide | -| 7 | DEC boundary zones | `needs-work` | 0 | ✅ hook wired (union composition) and all six fold sites now covered behaviourally; remaining items are doc parity | -| 8 | Examples | `needs-work` | 0 | Reproducible and well-structured; two gates cannot fail | -| 9 | Crate-wide constants sweep | `needs-work` | 0 | ✅ negative-pressure flux and the f32 pressure-floor collapse fixed (item 12/12b); Mach-1.05 shock floor remains | -| 10 | Studies | `needs-work` | 0 | Several headline findings not supported by what the code measures | -| 11 | Test suite & build health | `needs-work` | 0 | Change-detector tests; verification suite absent from CI (rolled into B-2) | -| 12 | Coordinate + tensor bridge | `needs-work` | 0 | ✅ B-4 resolved — invertibility enforced over the closed domain, gate BM-A now measures the shipped constructor | -| 13 | Verification harnesses | `needs-work` | 1 | B-3; the layer that must be strongest is among the weakest | -| 14 | Plasma / blackout physics | **`needs-work`** | 0 | B-1 resolved; headline retired and re-derived (Park-2T −1.27 dec reported, network +0.35 dec survives). Open levers remain (T_e=T_ve lumping, single-pair τ, mixture-weighting follow-up) | -| 15 | Navigation / ESKF | **`not-ready`** | 0 | Two compounding filter defects (§4b); unguarded public API | -| 16 | QTT incompressible / immersed | **`not-ready`** | 0 | ✅ constructor envelope validated (item 13), mask `[0,1]` enforced (item 14), Brinkman envelope resolved in config (item 10); cylinder drag gate now offline (solver cost), so headline drag still unverified | - -Modules 15 and 16 carry **zero criticals** yet remain `not-ready`. That is deliberate: their defects are -individually major but jointly remove the basis for trusting the module's headline output. +| 1 | Pointwise theories | `needs-work` | 0 | Governing equations check out. ✅ Doc parity closed (item 17 + the catalogue): `theories/mod.rs` now states which evaluators live here and which kernels stay in `deep_causality_physics`; `compressible_ns.rs` states that these are pointwise RHS contributions with the EOS closure left to the caller, and carries the `div_q` Fourier sign convention. ✅ Constant traceability closed (item 23) | +| 2 | DEC NS rate kernel | `needs-work` | 0 | RK4 tableau exact; Δ = dδ+δd correctly ordered; δ = M⁻¹BM is the true discrete adjoint, so −νΔ provably dissipates; Leray projection inside every RK4 stage. ✅ The convective-operator doc defect is closed (item 17): every docstring now names the skew-symmetrised `½[G_ω u − G*_ω u]` the code marches, verified across all four assembly paths, and the module doc no longer describes a Chorin split | +| 3 | DEC solver driver | `needs-work` | 0 | Projection consistent. ✅ Diagnostics doc closed: the pressure diagnostic now states its gauge (Bernoulli mean-zero, static shifted by −mean(½\|u\|²)), and the boundary-zone hooks state that the lift is collected once at construction. Tolerance justification remains open | +| 4 | QTT compressible marchers | `needs-work` | 0 | RH exact (hand-verified); Sod matches exact Riemann; ✅ non-positive pressure rejected before the flux across all four marchers (item 12); ✅ `CompressibleEuler1d::new` now validates its envelope with falsifiability tests. ✅ The conservation-form limitation is now stated rather than implied: the curvilinear flux is the non-conservative chain-rule form, so discrete conservation holds only on the Cartesian identity chart. That limitation is documented, not removed | +| 5 | CfdFlow DSL | `needs-work` | 0 | CoW fork and determinism largely as advertised. ✅ The doc overclaims are closed: the fork shares the marched tensor state in O(1) and never copies it, while the coupled field is copy-on-write at O(cells) per branch; a leg boundary carries the coupled field and re-seeds the marched fluid layer; the per-branch audit sink is not wired on the event-fork path; stage ordering and its stale-read rule are stated | +| 6 | Docs-vs-code parity | ✅ `ready` | 0 | ✅ **All 125 catalogued rows closed** (116 by `reconcile-cfd-docs-and-traceability` 2026-07-26, 9 by Phases 1–2), each verified against the code before rewriting, with the count recomputable from `ACTION-LIST.md`. This is the one module whose entire finding set is closed row-by-row. What remains are the **code** arms those rows offered and this change deferred (constructor validation elsewhere, `Result` returns, re-exports, cross-crate visibility); they are recorded per row and need their own plan | +| 7 | DEC boundary zones | `needs-work` | 0 | ✅ hook wired (union composition) and all six fold sites covered behaviourally; ✅ the remaining doc-parity items are closed: `BodyForceZone`'s cochain units (an acceleration line integral, ρ = 1), the outflow zone as a pressure reference rather than a zero-gradient condition, and the unchecked `Inflow`-needs-`Outflow` pairing | +| 8 | Examples | `needs-work` | 0 | Reproducible and well-structured; ✅ the seven unfalsifiable gates were repaired and demonstrated failing by fault injection (Phase 1); ✅ the placard README no longer lists a third gate the model does not implement, and the corridor's "one continuous descent" is now stated as one continuous *coupled* descent with a re-seeded fluid layer | +| 9 | Crate-wide constants sweep | `needs-work` | 0 | ✅ negative-pressure flux and the f32 pressure-floor collapse fixed (item 12/12b); ✅ the Mach-1.05 shock floor now carries its justification (a 5 % buffer above sonic, a modelling guard rather than a measured constant), and `SMOOTH_CELLS` / the park2t `ETA` carry source, units and sensitivity (item 23). The remaining exposure is the `magic-number` axis at large, not individually cleared | +| 10 | Studies | `needs-work` | 0 | ✅ The headline claims are now scoped to what each study measured: the thickening lever was not testable inside the explicit scheme's stable window, the blend's rank reduction is concentrated above λ ≈ 0.75, the mirror march is no longer called bit-identical, and the bond cap is named as timed-but-not-accuracy-checked. The underlying experiments are unchanged | +| 11 | Test suite & build health | `needs-work` | 0 | ✅ CI executes the suite (B-2); ✅ the shipped QTT convection path is now exercised with `u,v ≠ 0` against an analytic reference and demonstrated falsifiable, and the Taylor–Green harness gates the shipped `rate_pair` instead of a re-assembly (item 24). The broader change-detector→reference sweep across other load-bearing modules is not done | +| 12 | Coordinate + tensor bridge | `needs-work` | 0 | ✅ B-4 resolved — invertibility enforced over the closed domain, gate BM-A measures the shipped constructor; ✅ the `BlendedMap` θ₀ frame precondition and the `MetricProvider` seam's scope are now stated, and the tensor-bridge construction references are given in full | +| 13 | Verification harnesses | `needs-work` | **0** (was 1) | ✅ B-3 resolved in Phase 1 (the sole critical): `dec_cylinder_verification` gates St and C_d and exits nonzero on solver error, and two further ungated harnesses were found and gated. ✅ Every gate declares its evidence class; ✅ five harnesses that had no per-example section now have one, with their gate predicates read from source. **New, open:** the Taylor–Green harness fails at its own documented `max_level 7` (item 21) | +| 14 | Plasma / blackout physics | **`needs-work`** | 0 | B-1 resolved; headline retired and re-derived (Park-2T −1.27 dec reported, network +0.35 dec survives). ✅ The `qtt_park2t_blackout` scope is now labelled internal-invariant with its +3.0-dec divergence and Saha saturation stated. Open levers remain (T_e=T_ve lumping, single-pair τ, mixture-weighting follow-up) | +| 15 | Navigation / ESKF | `needs-work` | 0 | ✅ Both filter defects resolved (§4b, item 9): `Q_d = Q_c·dt`, guarded+atomic `update_scalar` (incl. non-finite `z`), validated covariance, attitude lifecycle closed by option (a). ✅ Doc parity closed: the canonical 17-state ordering is stated at each `[R; 17]` boundary, the `t³` gyro law is marked as a model property the translational engine does not exercise, and the trajectory-nav spec matches the implementation | +| 16 | QTT incompressible / immersed | **`not-ready`** | 0 | ✅ constructor envelope validated (item 13), mask `[0,1]` enforced (item 14), Brinkman envelope resolved in config (item 10); ✅ the Reynolds mismatch and the absent grid-convergence study are now stated in the harness docs. **Unchanged:** the cylinder drag gate is offline on solver cost, so the headline drag is still unverified | + +Module 16 carries **zero criticals** yet remains `not-ready`. That is deliberate: its defects are +individually major but jointly remove the basis for trusting the module's headline output, and the one +thing that would settle it — the η-ladder acceptance run — costs 4–9 hours and cannot run in CI. Module 15 +(Navigation / ESKF) was in the same position until item 9 resolved both filter defects. + +Module 6 is the only entry moved to `ready`, and only because its finding set is the one that was closed +**row-by-row with a recomputable count**. The other fifteen keep their as-found readiness: their +documentation exposure is closed, but re-rating them would need a re-audit of the tautology, physics-math +and magic-number axes that no one has run. --- @@ -646,21 +770,23 @@ individually major but jointly remove the basis for trusting the module's headli | Axis | Count | Pattern | |---|---|---| -| doc-overclaim | 87 | Prose describes intended design; code implements a subset. Recurring shape: a doc asserts a property holds "by construction" where no check exists. B-4 was the sharpest case and is now closed — instructively, its "by construction" argument was not merely unchecked but **false**, so the pattern is worth treating as a claim to disprove rather than a claim to enforce. | +| doc-overclaim | 86 actionable, **all closed** (87 was an estimate; 91 raw) | Prose describes intended design; code implements a subset. Recurring shape: a doc asserts a property holds "by construction" where no check exists. B-4 was the sharpest case and is now closed — instructively, its "by construction" argument was not merely unchecked but **false**, so the pattern is worth treating as a claim to disprove rather than a claim to enforce. **All closed 2026-07-26**, which added a second shape to the pattern: prose naming an API that *does not exist* (`CfdFlow::qtt_march`, six sites), a wiring that was never done (`RegimeSwitch` has no call site), and a units error carried in a name (`strip_pressure_force` returns Pa·m³, not a force). | | tautology-circular | 72 | Gates restating the implementation, folding over hardcoded constants, or comparing a value to a bound pinned from that same value. | | physics-math | 50 | Genuine formula/constant defects — concentrated in plasma chemistry, navigation and penalization, **not** in the core DEC/QTT marchers. | | magic-number | 46 | Load-bearing literals without traceable provenance. | -| doc-gap | 39 | Real capabilities (`DuctMarchRun`, `IgnitionCorridor`, snapshot/resume, `AcousticCoreInverse`) absent from docs. | +| doc-gap | 39 | Scattered docstring gaps (units, boundary configs, non-conservative notes) plus a few README sections. **The four headline capabilities named here — `DuctMarchRun`, `IgnitionCorridor`, snapshot/resume, `AcousticCoreInverse` — were in fact already documented in the crate README;** the finding rested on an unstated search (§5c lesson 5). **All 39 closed** (37 in 2026-07-26, 2 by Phases 1–2). | Three structural observations: - **Back-fitted bounds are disclosed, not hidden.** `qtt_ramc_stagline` states in its own gate text that its ±0.70-decade band is "pinned from the measurement". Preserve that honesty — but such gates must be **labelled regression tests**, not presented as validation against flight data. -- **`Gates` is dead, printing, duplicate API.** Exported from `lib.rs`, documented as "the `[PASS]`/`[FAIL]` - block every self-verifying program prints" — yet **no** program uses it; every harness goes through - `Verdict`'s `Display` impl. It holds the only 5 `println!` in `src/`, making it the sole violator of the - README's "the DSL never exits or prints", and `Gates::finish()` returns `true` for an empty gate set. +- **`Gates` was a dead, printing, duplicate API — ✅ now retired** (item 22, owner decision 2026-07-26). + Exported from `lib.rs`, documented as "the `[PASS]`/`[FAIL]` block every self-verifying program prints", + yet **no** program used it; every harness goes through `GateSeq` or `Verdict`'s `Display` impl. It held + the only 5 `println!` in `src/`, making it the sole violator of the README's "the DSL never exits or + prints", and `Gates::finish()` returned `true` for an empty gate set. Removing it made the README claim + true rather than requiring the prose to be weakened; `src/` now has zero print, panic and exit calls. - **The DEC family validates its envelope; the QTT family did not — ✅ now closed.** As found, `dec_ns_solver/step.rs` rejected CFL and diffusive-limit violations while `QttImmersed2d::new` and `QttIncompressible2d::new` validated nothing. `close-qtt-solver-envelope` gave the QTT constructors the @@ -704,10 +830,10 @@ Three structural observations: **Phase 1 — Make the evidence bite (highest value, lowest effort) — ✅ COMPLETE (2026-07-21)** Implemented and archived as `2026-07-21-make-cfd-evidence-enforceable`, 43/43 tasks; four capability -specs synced into `openspec/specs/`. +specs synced into `../../specs`. 1. ✅ Add CI execution of the verification suite (fast on PR, slow nightly). — **B-2 resolved.** - `.github/workflows/cfd_verification.yml`: 9 fast per PR (12.7 s), 4 nightly, plus a + `../../../.github/workflows/cfd_verification.yml`: 9 fast per PR (12.7 s), 4 nightly, plus a `verification-suite-complete` job that fails if a declared harness is in neither list. 2. ✅ Add a real gate to `dec_cylinder_verification`. — **B-3 resolved.** Four gates; a solver error now exits 1 instead of reporting `St`/`C_d` from the truncated series. @@ -730,13 +856,15 @@ order-of-magnitude framing naming the ±0.70-decade band as pinned; the lid-cavi reports the 65² default (RMSE **0.0617**, primary vortex matching Ghia to 1e-4) instead of the coarse 33² trend rung that understated the solver by more than 2×. -**Phase 2 — Close the physics defects — ⬅ IN PROGRESS** +**Phase 2 — Close the physics defects — ✅ COMPLETE (2026-07-24)** -Specified as four openspec changes. **Three are implemented and archived:** change 4 +Specified as four openspec changes, **all four now implemented and archived:** change 4 (`resolve-cfd-contract-gaps`, items 8 / 11 / 15), `close-qtt-solver-envelope` (items 12 / 13 / 14, and -item 10 resolved in configuration), and `fix-ramc-vibrational-relaxation-pair` (item 7 / B-1, the last -certification blocker). The remaining one is **`fix-navigation-filter-correctness` (item 9)**, specified -and not started. +item 10 resolved in configuration), `fix-ramc-vibrational-relaxation-pair` (item 7 / B-1, the last +certification blocker), and `fix-navigation-filter-correctness` (item 9, the ESKF defects). One item +carries a residual openly recorded at its entry: item 10's acceptance harness is offline/manual on +solver cost (not a parameter fix). The remaining path to certification is Phases 3–4 (documentation +truth-up + traceability). The `close-qtt-solver-envelope` group turned up the one place where "detectable" was not enough: item 10's acceptance test — the η ladder converging — needs `L = 8`, at which the harness costs hours, so it @@ -752,8 +880,15 @@ for real is a solver-acceleration follow-up, not a Phase-2 parameter fix (item 1 Scan covers the **closed** domain against a floor relative to `dr·span_y`; a fold is reachable (275 configurations) so the sign check is falsifiable; gate BM-A rebuilt on the shipped constructor and its duplicate `jacobian_scan` deleted, retiring a latent `span_y` mismatch. -9. Scale ESKF `Q` by `dt`; guard the innovation covariance and validate measurement variance; add a - horizon-invariance test; fix `correct_position` attitude handling. — §4b +9. ✅ **DONE** (`fix-navigation-filter-correctness`) — `Q_d = Q_c·dt` (first-order, cited), with a + leaf-state horizon-invariance test; `update_scalar` returns `Result` and refuses a non-positive/non-finite + `s`, a negative/non-finite `r`, and a non-finite measurement `z` (the last found by the adversarial pass), + atomically, with `correct_position` rolling back across its three folds; construction/restoration validate + the covariance (necessary conditions; the update guard is the operational PSD backstop). `correct_position`'s + attitude handling fixed by option (a): a nominal `Quaternion` that `δψ` is injected into before the reset. + 897 cfd tests pass; the applied attitude correction shifts the corridor reacquisition figure `0.2802 → 0.2804 m` + (deterministic, gate-safe). Two artifact overclaims corrected against the tree (`ins_gnss_blackout` is not a + filter consumer; the `Q` re-tune is bit-exact bar ≤1 ULP on two blocks). — §4b 10. Resolve the Brinkman envelope: choose η from a wall-error target, document the `η ≥ dx²/ν` resolution constraint, and state that it is currently violated 48×. — §4b, §5b. ⚙️ **PARTIALLY DONE (`close-qtt-solver-envelope`, implemented + archived): resolved in configuration, @@ -790,31 +925,81 @@ for real is a solver-acceleration follow-up, not a Phase-2 parameter fix (item 1 free-slip un-pin); the intended consumer `aperture-resolved-noslip` is recorded at the hook. All six fold sites are covered behaviourally and demonstrated falsifiable by fault injection. -**Phase 3 — Documentation truth-up (bidirectional)** -16. Reconcile the 87 doc-overclaims. Where prose describes intent, mark it intent. -17. Correct the DEC kernel docs to describe the skew-symmetrized operator the code actually marches, and - the two spectral-projector comments that contradict correct code. -18. Document the 39 undocumented capabilities. -19. Restate the RAM-C claim consistently — the crate README says "validate against flight data"; the - verification README correctly says order-of-magnitude. Use the accurate phrasing in both. -20. Fix the lid-cavity summary row to report the default configuration (§3.5). -21. Qualify "clean 2nd-order convergence" as second-order in space, first-order in time, and document the - TG ladder's temporal-error floor and maximum usable length. -22. Resolve `Gates`: adopt it everywhere, or retire it. *(Owner decision — no deletion without approval.)* - -**Phase 4 — Traceability** -23. Give every load-bearing constant a source, units, and a `papers/` entry — starting with - `SMOOTH_CELLS`, `ETA`, and the Mach-1.05 shock floor. Add an Angot/Kevlahan penalization reference to - `papers/`, which currently has none. -24. Replace change-detector tests with independent-reference tests in load-bearing modules; add a test - that exercises the shipped QTT convection path with `u, v ≠ 0`. +**Phase 3 — Documentation truth-up (bidirectional) — ✅ COMPLETE (`reconcile-cfd-docs-and-traceability`, +2026-07-26)** + +16. ✅ **DONE.** Reconcile the doc-overclaims. Where prose describes intent, mark it intent. + The catalogue is **86** actionable `doc-overclaim` rows in `ACTION-LIST.md` (the "87" here was a + category estimate; the raw module total is 91). **17 closed, enumerated by ref in the change's + `tasks.md`.** Highlights: `CfdFlow::qtt_march` was named at six documentation sites and **does not + exist**; `RegimeSwitch`/`aero_gravity_ratio` have **no call site**, so the README's claim that the + navigation engine switches integrators was false; `regime()` returns seven fields, not four; and + `chi^2*L` is *storage*, not runtime (item 10 measured runtime rising far faster at flat bond). The + remaining rows were closed by a 13-agent fan-out over `verification/`, `studies/`, `../../../examples` and + `tests/`, each agent verifying the claim against the code before rewriting; **86 of 86 closed**. +17. ✅ **DONE.** DEC kernel docs now name the skew-symmetrized operator `conv' = ½[G_ω u − G*_ω u]` the + code marches, verified across all four assembly paths; the module prose describes the **in-stage** + projection (no Chorin split, no splitting error) the code performs; the governing equation writes the + viscous term with the same `Δ_dR` the solver evaluates; and both spectral-projector comments now give + the consistent `−sin²(2πk/N)/dx²` eigenvalue and the correct sign. +18. ✅ **DONE, and the item was overstated as written.** The four named capabilities (`DuctMarchRun`, + `IgnitionCorridor`, snapshot/resume, `AcousticCoreInverse`) were **already documented** in the crate + README; the report that they were missing came from a malformed grep. The "39" is the `doc-gap` + category total, a mix of README sections and scattered docstring gaps: **all 39 closed** (37 here, + 2 by Phases 1–2). The substantive additions were five missing per-example sections in + `verification/README.md`, each with its gate predicates read from the harness source. +19. ✅ **DONE** (Phase 1, re-verified 2026-07-26). RAM-C is framed as order-of-magnitude with the + ±0.70-decade pinned band in both READMEs. +20. ✅ **DONE** (Phase 1, re-verified 2026-07-26). The lid-cavity row reports the 65² default, RMSE 0.0617. +21. ✅ **DONE, and it surfaced a live defect.** The claim is now "second-order in space, first-order in + time", and the temporal floor and maximum usable ladder length are documented with the measured + signed-error table. **The floor is real and the ladder cannot be extended:** the temporal error is + opposite in sign to the spatial error, the two cancel near `N = 64–128`, the `N = 64` order of 3.16 is + a **cancellation artifact**, and at the documented `max_level 7` the observed order collapses to 0.02 + and the harness **fails its own gate**. `max_level = 5` is the maximum usable length. **Open:** add a + two-sided order gate (`1.8 ≤ p ≤ 2.2`) or refine `dt ∝ dx²`; both are code changes, deferred. +22. ✅ **DONE — retired** (owner decision, 2026-07-26). `Gates` was a parallel gate-reporting API that no + shipped program constructed; every self-verifying program uses `GateSeq`/`Verdict`. Removing it closed + a doc-overclaim **by correcting the code rather than weakening the prose**: it held the only five + `println!` in `src/`, which made the README's "the DSL never exits or prints" false. `src/` now has + zero `println!`, `eprintln!`, `panic!` and `process::exit`. + +**Phase 4 — Traceability — ✅ COMPLETE; 23 done, 24 done bar its broadest sweep** + +23. ✅ **DONE.** `SMOOTH_CELLS`, the `qtt_park2t_blackout` `ETA` and the Mach-1.05 shock floor now carry a + source, units, and the reason for the value; each is recorded honestly as a numerical or modelling + parameter with **no external source**, which is what they are, and `SMOOTH_CELLS` carries its 6.1× + drag sensitivity. The cylinder `ETA` already had its wall-error-target derivation from + `close-qtt-solver-envelope`. Added `../../../deep_causality_cfd/papers/README.md` indexing every PDF to its citing code: the two + PDFs carried **uncited** were read, confirmed on topic and cited — Mohamed, Hirani & Samtaney (2016) + at the DEC solver, Mittal & Iaccarino (2005) at the immersed body. References cited in code whose PDF + is absent (Angot/Bruneau/Fabrie, Peddinti, Kazeev–Khoromskij) are listed as such rather than implied + to be present. +24. ⚙️ **MOSTLY DONE.** The shipped QTT convection path `rate_pair` is now exercised with `u, v ≠ 0` + against a hand-derived reference, closing the gap where the only tests passed `u = v = 0` and the + solver test's convection was annihilated by the projection. It is demonstrated falsifiable: flipping + the shipped convection sign fails it at `max_err = 0.999` against a `3e-3` bound. The Taylor–Green + harness's convection check now runs **through `rate_pair`** instead of a `gradient_x`/`gradient_y` + re-assembly, so it gates the shipped operator rather than a copy (the gate-BM-A failure mode, §5c + lesson 3); its reported error is unchanged at `3.207e-3`. **Open:** the broader "replace change-detector + tests with independent-reference tests" sweep across other load-bearing modules. --- ## 10. Recommendation -**Do not certify yet.** Certify after Phases 1 and 2 — a bounded, mechanical workstream with no solver -rewrites. +**Certify after Phases 1 and 2 — a bounded, mechanical workstream with no solver rewrites.** +**Update 2026-07-24: Phases 1 and 2 are now complete** (all four certification blockers and all four +Phase-2 changes landed; item 10's acceptance harness is offline/manual on solver cost, recorded openly). +The certify decision is now the owner's. + +**Update 2026-07-26: Phases 3 and 4 are complete** (`reconcile-cfd-docs-and-traceability`). Items 17 and +19–23 are closed, item 24 bar its broadest sweep, and all 125 catalogued doc-overclaim/doc-gap rows +behind items 16 and 18. Neither phase gated correctness, so neither blocked the certify decision; what +they change is that the crate's prose can now be read as evidence rather than as intent. Two things from that work are worth the owner's attention: the +Taylor–Green harness **fails at its own documented `max_level 7`** (a cancellation-driven order +collapse, item 21), and the crate's public API surface leaks workspace types it does not re-export +(row 15.7). Both are recorded rather than fixed, and both are small. The distinction that matters for an avionics R&D lab: this crate's **numerics** are in materially better shape than its **assurance case**. The risk is not that an engineer gets a wrong answer from the DEC or @@ -831,4 +1016,4 @@ Phase 1 removes that risk directly. - [`MODULE-INDEX.md`](MODULE-INDEX.md) — per-module readiness table - [`ACTION-LIST.md`](ACTION-LIST.md) — all 290 surviving findings, severity-ordered and actionable - [`RUN-LEDGER.md`](RUN-LEDGER.md) — execution ledger with exit codes and gate counts -- [`modules/`](modules/) — 16 per-module reports with code evidence and adversarial verdicts +- [`modules`](modules/) — 16 per-module reports with code evidence and adversarial verdicts diff --git a/openspec/notes/cfd_audit/MODULE-INDEX.md b/openspec/audits/cfd_audit/MODULE-INDEX.md similarity index 100% rename from openspec/notes/cfd_audit/MODULE-INDEX.md rename to openspec/audits/cfd_audit/MODULE-INDEX.md diff --git a/openspec/notes/cfd_audit/README.md b/openspec/audits/cfd_audit/README.md similarity index 96% rename from openspec/notes/cfd_audit/README.md rename to openspec/audits/cfd_audit/README.md index f1fefe195..2d915c990 100644 --- a/openspec/notes/cfd_audit/README.md +++ b/openspec/audits/cfd_audit/README.md @@ -16,7 +16,7 @@ could not discriminate, and none of them ran in CI. **Phase 1 is implemented and archived** as [`2026-07-21-make-cfd-evidence-enforceable`](../../changes/archive/2026-07-21-make-cfd-evidence-enforceable/), -43/43 tasks, with its four capability specs synced into `openspec/specs/`. +43/43 tasks, with its four capability specs synced into `../../specs`. | Blocker | Status | |---|---| @@ -46,7 +46,7 @@ the energy-budget gate is not a tautology (§5), and the correct action was to c | [`ACTION-LIST.md`](ACTION-LIST.md) | Every surviving finding as a severity-ordered, actionable table. The input for the follow-up specification. | | [`MODULE-INDEX.md`](MODULE-INDEX.md) | Per-module readiness at a glance. | | [`RUN-LEDGER.md`](RUN-LEDGER.md) | What was executed, exit codes, gate counts, reproducibility check. | -| [`modules/`](modules/) | 16 per-module reports: findings with quoted code evidence, reference forms, and adversarial verdicts. | +| [`modules`](modules/) | 16 per-module reports: findings with quoted code evidence, reference forms, and adversarial verdicts. | ## Headline numbers @@ -76,7 +76,7 @@ the energy-budget gate is not a tautology (§5), and the correct action was to c | | Finding | Location | |---|---|---| | B-1 | Millikan–White reduced mass is 7.0 amu for a pair documented as N₂–N₂ (correct: 14). Duplicated in two places; propagates into all three plasma-blackout examples. Correcting it likely removes the headline RAM-C agreement. | `fitting.rs:72`, `config.rs:37`, `constants.rs:128` | -| B-2 | No CI or Bazel target executes the verification suite. | `.github/workflows/` | +| B-2 | No CI or Bazel target executes the verification suite. | `../../../.github/workflows` | | B-3 | `dec_cylinder_verification` has zero gates and exits 0 after a solver error. | `dec_cylinder_verification/main.rs` | | B-4 | `BlendedMap` documents a fold check it does not perform; unguarded ÷det J. | `coordinate/blended.rs:17,171` | diff --git a/openspec/notes/cfd_audit/RUN-LEDGER.md b/openspec/audits/cfd_audit/RUN-LEDGER.md similarity index 100% rename from openspec/notes/cfd_audit/RUN-LEDGER.md rename to openspec/audits/cfd_audit/RUN-LEDGER.md diff --git a/openspec/notes/cfd_audit/modules/cfdflow-dsl-semantics-counterfactual-machinery-src-types-flo.md b/openspec/audits/cfd_audit/modules/cfdflow-dsl-semantics-counterfactual-machinery-src-types-flo.md similarity index 100% rename from openspec/notes/cfd_audit/modules/cfdflow-dsl-semantics-counterfactual-machinery-src-types-flo.md rename to openspec/audits/cfd_audit/modules/cfdflow-dsl-semantics-counterfactual-machinery-src-types-flo.md diff --git a/openspec/notes/cfd_audit/modules/dec-native-incompressible-navier-stokes-rate-kernel-solvers-.md b/openspec/audits/cfd_audit/modules/dec-native-incompressible-navier-stokes-rate-kernel-solvers-.md similarity index 99% rename from openspec/notes/cfd_audit/modules/dec-native-incompressible-navier-stokes-rate-kernel-solvers-.md rename to openspec/audits/cfd_audit/modules/dec-native-incompressible-navier-stokes-rate-kernel-solvers-.md index 26ff758ac..c56bcc24e 100644 --- a/openspec/notes/cfd_audit/modules/dec-native-incompressible-navier-stokes-rate-kernel-solvers-.md +++ b/openspec/audits/cfd_audit/modules/dec-native-incompressible-navier-stokes-rate-kernel-solvers-.md @@ -507,7 +507,7 @@ A repo-wide grep for `body_force()` in deep_causality_cfd/src returns exactly on **Reference form.** Docs-vs-code parity: an API documented as a per-step driver of the marched dynamics must actually reach the marched dynamics. `Ambient::freestream` has the same shape — I did not trace whether it reaches the DEC path either. -**Impact.** A coupling stage implementing, say, a time-varying thrust or buoyancy term via `ambient.set_body_force(...)` compiles, runs, and produces a march in which the forcing never appears — silently, with no error. The result would be wrong and the cause invisible from the call site. UNCERTAIN whether some non-DEC marcher family consumes `Ambient::body_force`; the grep covers `body_force()` accessor calls in `deep_causality_cfd/src` and found only the snapshot guard, but a destructuring or field-level access in another family would not match. Settle by grepping for `\.body_force` (field and method) across all crates and confirming no marcher family consumes it. +**Impact.** A coupling stage implementing, say, a time-varying thrust or buoyancy term via `ambient.set_body_force(...)` compiles, runs, and produces a march in which the forcing never appears — silently, with no error. The result would be wrong and the cause invisible from the call site. UNCERTAIN whether some non-DEC marcher family consumes `Ambient::body_force`; the grep covers `body_force()` accessor calls in `../../../../deep_causality_cfd/src` and found only the snapshot guard, but a destructuring or field-level access in another family would not match. Settle by grepping for `\.body_force` (field and method) across all crates and confirming no marcher family consumes it. **Recommended fix.** Either wire the ambient body force into the rate — add a `DecNsRate::set_body_force` mirroring `set_nu` and call it from `DecIncompressible::rate` and `Marcher::advance` — or document on `Ambient::set_body_force` and in the `Ambient` module doc which marcher families actually consume the field and which ignore it. Add a test that a body force driven through the ambient changes the projected rate. diff --git a/openspec/notes/cfd_audit/modules/deep-causality-cfd-breadth-sweep-across-src-verification-stu.md b/openspec/audits/cfd_audit/modules/deep-causality-cfd-breadth-sweep-across-src-verification-stu.md similarity index 100% rename from openspec/notes/cfd_audit/modules/deep-causality-cfd-breadth-sweep-across-src-verification-stu.md rename to openspec/audits/cfd_audit/modules/deep-causality-cfd-breadth-sweep-across-src-verification-stu.md diff --git a/openspec/notes/cfd_audit/modules/deep-causality-cfd-dec-boundary-condition-zones-src-solvers-.md b/openspec/audits/cfd_audit/modules/deep-causality-cfd-dec-boundary-condition-zones-src-solvers-.md similarity index 100% rename from openspec/notes/cfd_audit/modules/deep-causality-cfd-dec-boundary-condition-zones-src-solvers-.md rename to openspec/audits/cfd_audit/modules/deep-causality-cfd-dec-boundary-condition-zones-src-solvers-.md diff --git a/openspec/notes/cfd_audit/modules/deep-causality-cfd-dec-navier-stokes-solver-driver-and-diagn.md b/openspec/audits/cfd_audit/modules/deep-causality-cfd-dec-navier-stokes-solver-driver-and-diagn.md similarity index 100% rename from openspec/notes/cfd_audit/modules/deep-causality-cfd-dec-navier-stokes-solver-driver-and-diagn.md rename to openspec/audits/cfd_audit/modules/deep-causality-cfd-dec-navier-stokes-solver-driver-and-diagn.md diff --git a/openspec/notes/cfd_audit/modules/deep-causality-cfd-documentation-vs-code-parity-crate-readme.md b/openspec/audits/cfd_audit/modules/deep-causality-cfd-documentation-vs-code-parity-crate-readme.md similarity index 98% rename from openspec/notes/cfd_audit/modules/deep-causality-cfd-documentation-vs-code-parity-crate-readme.md rename to openspec/audits/cfd_audit/modules/deep-causality-cfd-documentation-vs-code-parity-crate-readme.md index 2f3b21b00..87974440b 100644 --- a/openspec/notes/cfd_audit/modules/deep-causality-cfd-documentation-vs-code-parity-crate-readme.md +++ b/openspec/audits/cfd_audit/modules/deep-causality-cfd-documentation-vs-code-parity-crate-readme.md @@ -2,7 +2,7 @@ **Production readiness: `needs-work`** -Item-level rustdoc is genuinely complete: every one of the ~200 names re-exported from `src/lib.rs` resolves to a definition with a preceding `///` block, and the substantive DSL claims I could mechanically check hold up — the O(1) copy-on-write fork is `Arc::clone` with measured (not asserted) `ForkEconomics` at carrier.rs:625-631, concurrent-vs-sequential bit-identity is a real test at fork_tests.rs:71-81, `verdict()` returns data with no print or exit (reduce.rs:171-175), `NAV_STATES = 17` (eskf.rs:25), and the Couette/Poiseuille validations the README cites do exist as runnable tests. Against that, the shipped prose fails an avionics traceability bar in several concrete ways. `verification/README.md` twice tells a reader to drive the QTT solvers through `CfdFlow::qtt_march`, a method that does not exist anywhere in the workspace. The crate README's headline precision result ("at 106-bit Float106 every gate is identical") exists only as prose, and its own source — `corridor/README.md:199` — labels it as measured on a superseded "surrogate-era build". `parallel` is a *default* feature in Cargo.toml:38 while `src/lib.rs:22` and the Cargo.toml comment itself both say it is opt-in and serial by default, and `benches/PERFORMANCE.md` measures that default configuration as 1.4×–3.2× *slower* below 256². Traceability artifacts are thin: `papers/` holds four PDFs against roughly twenty cited works, and five of thirteen verification programs — including the RAM-C II flight-data comparison — have no per-example section and no entry in the References list that the same README promises. Finally, an entire powered-descent/retropulsion subsystem, the duct marcher, the snapshot/resume surface, and the `AcousticCoreInverse` family are public and undocumented outside their own source files. None of these are wrong physics; they are reproducibility and traceability defects, and they are all cheap to fix. +Item-level rustdoc is genuinely complete: every one of the ~200 names re-exported from `src/lib.rs` resolves to a definition with a preceding `///` block, and the substantive DSL claims I could mechanically check hold up — the O(1) copy-on-write fork is `Arc::clone` with measured (not asserted) `ForkEconomics` at carrier.rs:625-631, concurrent-vs-sequential bit-identity is a real test at fork_tests.rs:71-81, `verdict()` returns data with no print or exit (reduce.rs:171-175), `NAV_STATES = 17` (eskf.rs:25), and the Couette/Poiseuille validations the README cites do exist as runnable tests. Against that, the shipped prose fails an avionics traceability bar in several concrete ways. `verification/README.md` twice tells a reader to drive the QTT solvers through `CfdFlow::qtt_march`, a method that does not exist anywhere in the workspace. The crate README's headline precision result ("at 106-bit Float106 every gate is identical") exists only as prose, and its own source — `corridor/README.md:199` — labels it as measured on a superseded "surrogate-era build". `parallel` is a *default* feature in Cargo.toml:38 while `src/lib.rs:22` and the Cargo.toml comment itself both say it is opt-in and serial by default, and `benches/PERFORMANCE.md` measures that default configuration as 1.4×–3.2× *slower* below 256². Traceability artifacts are thin: `../../../../papers` holds four PDFs against roughly twenty cited works, and five of thirteen verification programs — including the RAM-C II flight-data comparison — have no per-example section and no entry in the References list that the same README promises. Finally, an entire powered-descent/retropulsion subsystem, the duct marcher, the snapshot/resume surface, and the `AcousticCoreInverse` family are public and undocumented outside their own source files. None of these are wrong physics; they are reproducibility and traceability defects, and they are all cheap to fix. - Files read: **52** - Findings raised: **16** — surviving adversarial verification: **16** (refuted: 0) @@ -415,7 +415,7 @@ Note the Couette/Poiseuille validations the README cites at line 42 live in test **Impact.** For a pre-certification audit, papers/ is the crate's declared traceability mechanism, and it covers roughly one in five cited works and none of the constants an auditor would most want to trace — Park's ionization rates, the Millikan-White fit, and the RAM-C II dataset. The Cargo exclude compounds it: if the crate is ever published (currently `publish = false` at Cargo.toml:32, pending this audit), a downstream consumer receives neither the papers nor the tests that hold the Couette and Poiseuille validations, while the README tells them the crate ships its evidence. -**Recommended fix.** Either add the missing PDFs (at minimum Park, RAM-C II, Millikan-White, RP-1232, Ghia 1982, Taylor-Green 1937, Sod 1978) or restate README.md:260 to describe what is actually there, e.g. "| `papers/` | Source PDFs for the immersed-boundary and DEC-operator closures (Droege 2005, Kirkpatrick 2003, Mittal 2005, Mohamed 2016). Other cited works are listed in verification/README.md. |". Before flipping `publish = true`, remove `papers/*` from the exclude list, or amend README.md:213 to say the evidence lives in the git repository rather than the published package. +**Recommended fix.** Either add the missing PDFs (at minimum Park, RAM-C II, Millikan-White, RP-1232, Ghia 1982, Taylor-Green 1937, Sod 1978) or restate README.md:260 to describe what is actually there, e.g. "| `../../../../papers` | Source PDFs for the immersed-boundary and DEC-operator closures (Droege 2005, Kirkpatrick 2003, Mittal 2005, Mohamed 2016). Other cited works are listed in verification/README.md. |". Before flipping `publish = true`, remove `papers/*` from the exclude list, or amend README.md:213 to say the evidence lives in the git repository rather than the published package. **Adversarial check.** The counts are right: `ls papers/` returns exactly Droege2005, kirkpatrick2003, mittal2005, mohamed2016 against 16 works in verification/README.md:231-264, and Cargo.toml:18-29 does exclude both `tests/**/*` and `papers/*` while README.md:213 says 'The crate ships its evidence'. The Couette/Poiseuille validations the README cites at line 42 do live under the excluded tests/ (tests/solvers/dec/poiseuille_tests.rs, tests/theories/incompressible_ns_verification_tests.rs). But the auditor's claim that 'none of [the four PDFs] are the sources behind the crate's headline constants or closures' is REFUTED: kirkpatrick2003 is precisely the source for the wall-traction closure, cited in the kernel docstring at src/solvers/dec/surface_force.rs:72-75 ('the Kirkpatrick wall traction t = mu S.n') and again at the implementation line 166 — this is the repo's stated cite-in-docstring + PDF-in-papers convention working as designed. Droege2005 likewise backs the cylinder drag reference (verification/dec_cylinder_verification/main.rs:35). mittal2005 and mohamed2016 have no matching citation in cfd src/ or verification/, so 2 of 4 PDFs are orphaned. diff --git a/openspec/notes/cfd_audit/modules/deep-causality-cfd-gnss-denial-navigation-and-estimation-lay.md b/openspec/audits/cfd_audit/modules/deep-causality-cfd-gnss-denial-navigation-and-estimation-lay.md similarity index 100% rename from openspec/notes/cfd_audit/modules/deep-causality-cfd-gnss-denial-navigation-and-estimation-lay.md rename to openspec/audits/cfd_audit/modules/deep-causality-cfd-gnss-denial-navigation-and-estimation-lay.md diff --git a/openspec/notes/cfd_audit/modules/deep-causality-cfd-qtt-compressible-marchers-solvers-qtt-com.md b/openspec/audits/cfd_audit/modules/deep-causality-cfd-qtt-compressible-marchers-solvers-qtt-com.md similarity index 100% rename from openspec/notes/cfd_audit/modules/deep-causality-cfd-qtt-compressible-marchers-solvers-qtt-com.md rename to openspec/audits/cfd_audit/modules/deep-causality-cfd-qtt-compressible-marchers-solvers-qtt-com.md diff --git a/openspec/notes/cfd_audit/modules/deep-causality-cfd-qtt-incompressible-immersed-body-solvers-.md b/openspec/audits/cfd_audit/modules/deep-causality-cfd-qtt-incompressible-immersed-body-solvers-.md similarity index 100% rename from openspec/notes/cfd_audit/modules/deep-causality-cfd-qtt-incompressible-immersed-body-solvers-.md rename to openspec/audits/cfd_audit/modules/deep-causality-cfd-qtt-incompressible-immersed-body-solvers-.md diff --git a/openspec/notes/cfd_audit/modules/deep-causality-cfd-reacting-plasma-blackout-physics-blackout.md b/openspec/audits/cfd_audit/modules/deep-causality-cfd-reacting-plasma-blackout-physics-blackout.md similarity index 100% rename from openspec/notes/cfd_audit/modules/deep-causality-cfd-reacting-plasma-blackout-physics-blackout.md rename to openspec/audits/cfd_audit/modules/deep-causality-cfd-reacting-plasma-blackout-physics-blackout.md diff --git a/openspec/notes/cfd_audit/modules/deep-causality-cfd-src-coordinate-src-tensor-bridge-coordina.md b/openspec/audits/cfd_audit/modules/deep-causality-cfd-src-coordinate-src-tensor-bridge-coordina.md similarity index 100% rename from openspec/notes/cfd_audit/modules/deep-causality-cfd-src-coordinate-src-tensor-bridge-coordina.md rename to openspec/audits/cfd_audit/modules/deep-causality-cfd-src-coordinate-src-tensor-bridge-coordina.md diff --git a/openspec/notes/cfd_audit/modules/deep-causality-cfd-studies-all-14-study-programs-the-studies.md b/openspec/audits/cfd_audit/modules/deep-causality-cfd-studies-all-14-study-programs-the-studies.md similarity index 100% rename from openspec/notes/cfd_audit/modules/deep-causality-cfd-studies-all-14-study-programs-the-studies.md rename to openspec/audits/cfd_audit/modules/deep-causality-cfd-studies-all-14-study-programs-the-studies.md diff --git a/openspec/notes/cfd_audit/modules/deep-causality-cfd-test-suite-efficacy-coverage-mapping-and-.md b/openspec/audits/cfd_audit/modules/deep-causality-cfd-test-suite-efficacy-coverage-mapping-and-.md similarity index 100% rename from openspec/notes/cfd_audit/modules/deep-causality-cfd-test-suite-efficacy-coverage-mapping-and-.md rename to openspec/audits/cfd_audit/modules/deep-causality-cfd-test-suite-efficacy-coverage-mapping-and-.md diff --git a/openspec/notes/cfd_audit/modules/deep-causality-cfd-theories-pointwise-governing-equation-eva.md b/openspec/audits/cfd_audit/modules/deep-causality-cfd-theories-pointwise-governing-equation-eva.md similarity index 100% rename from openspec/notes/cfd_audit/modules/deep-causality-cfd-theories-pointwise-governing-equation-eva.md rename to openspec/audits/cfd_audit/modules/deep-causality-cfd-theories-pointwise-governing-equation-eva.md diff --git a/openspec/notes/cfd_audit/modules/deep-causality-cfd-verification-all-13-verification-programs.md b/openspec/audits/cfd_audit/modules/deep-causality-cfd-verification-all-13-verification-programs.md similarity index 100% rename from openspec/notes/cfd_audit/modules/deep-causality-cfd-verification-all-13-verification-programs.md rename to openspec/audits/cfd_audit/modules/deep-causality-cfd-verification-all-13-verification-programs.md diff --git a/openspec/notes/cfd_audit/modules/examples-avionics-examples-cfd-engineer-facing-cfd-demonstra.md b/openspec/audits/cfd_audit/modules/examples-avionics-examples-cfd-engineer-facing-cfd-demonstra.md similarity index 100% rename from openspec/notes/cfd_audit/modules/examples-avionics-examples-cfd-engineer-facing-cfd-demonstra.md rename to openspec/audits/cfd_audit/modules/examples-avionics-examples-cfd-engineer-facing-cfd-demonstra.md diff --git a/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/baseline.md b/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/baseline.md index 7fe980044..c88b45dd2 100644 --- a/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/baseline.md +++ b/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/baseline.md @@ -44,7 +44,7 @@ zero exits come from gates that cannot fail, and `dec_cylinder_verification` has exits 0 even after a solver error. So a harness that starts failing during this change has not regressed; it has become capable of failing for the first time. -Any such failure is triaged against `openspec/notes/cfd_audit/ACTION-LIST.md` before a bound is moved +Any such failure is triaged against `../../../audits/cfd_audit/ACTION-LIST.md` before a bound is moved (task 7.8). ## Unit-test baseline diff --git a/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/design.md b/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/design.md index 05dbf5c03..aad05650c 100644 --- a/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/design.md +++ b/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/design.md @@ -145,7 +145,7 @@ baseline artifact is internally consistent. ## Risks / Trade-offs - **Gates will fail on first wiring.** → Intended. Triage each failure against the per-finding evidence in - `openspec/notes/cfd_audit/ACTION-LIST.md` before moving any bound. Moving a bound to restore a pass, + `../../../audits/cfd_audit/ACTION-LIST.md` before moving any bound. Moving a bound to restore a pass, without evidence, reintroduces exactly the back-fitting this change exists to remove. - **Tightening `CONVERGENCE_BOUND` and adding ladders may show the QTT cylinder drag has no converged value.** → Accepted, and handled by D6: report non-convergence as the result. Do not widen the bound. diff --git a/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/proposal.md b/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/proposal.md index ad03f050f..baedb68e6 100644 --- a/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/proposal.md +++ b/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/proposal.md @@ -2,7 +2,7 @@ ## Why -The pre-certification audit ([`openspec/notes/cfd_audit/AUDIT-REPORT.md`](../../notes/cfd_audit/AUDIT-REPORT.md)) +The pre-certification audit ([`../../../audits/cfd_audit/AUDIT-REPORT.md`](../../../audits/cfd_audit/AUDIT-REPORT.md)) found the `deep_causality_cfd` numerical core sound — Rankine–Hugoniot exact, the Ghia lid-cavity primary vortex matched to four decimal places, Sod against the exact Riemann solution — but the **assurance layer** unable to support it. Two facts decide this change: @@ -97,7 +97,7 @@ a tripwire rather than pre-empting the physics decision. dominated by `dec_cylinder`. - Some gates will fail on first wiring — that is the intended outcome, not a regression. Any harness whose measured value sits outside a corrected bound is triaged against the audit's per-finding evidence in - [`ACTION-LIST.md`](../../notes/cfd_audit/ACTION-LIST.md) before the bound is moved. + [`ACTION-LIST.md`](../../../audits/cfd_audit/ACTION-LIST.md) before the bound is moved. **Risk** - Tightening `CONVERGENCE_BOUND` and adding η/smoothing ladders may surface that the QTT cylinder drag has diff --git a/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/tasks.md b/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/tasks.md index fa195f2fa..dea2456c7 100644 --- a/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/tasks.md +++ b/openspec/changes/archive/2026-07-21-make-cfd-evidence-enforceable/tasks.md @@ -71,4 +71,4 @@ forcing a pass/fail on an absolute value. - [x] 7.5 Run `cargo test -p deep_causality_cfd --release` and confirm no regression against the 813-pass baseline — **828 passed, 0 failed, 1 ignored** (+15 from the two new type test files; no pre-existing test lost) - [x] 7.6 Run `make format && make fix` and confirm clippy is clean without new `#[allow]` suppressions — `cargo fmt` + `cargo clippy --all-targets` clean on both `deep_causality_cfd` and `avionics_examples` (0 warnings, 0 errors); **0 new `#[allow]` attributes** in the diff. - [x] 7.7 Confirm the diff touches no file under `src/solvers/`, `src/navigation/` or `src/coordinate/` — the Phase 2 boundary, with `src/types/flow/mms.rs` the single permitted gate-logic exception — **confirmed, no files under those paths are modified.** The only `src/` changes are `types/evidence_class.rs` and `types/ladder_outcome.rs` (new), `types/mod.rs`, `lib.rs`, `types/flow/study/{verdict,gate_seq}.rs` (evidence-class plumbing), and `types/flow/mms.rs` (the permitted exception). -- [x] 7.8 Record any gate that now fails, with its triage against `openspec/notes/cfd_audit/ACTION-LIST.md`, so no bound was moved without evidence — **one harness now fails: `qtt_cylinder_verification`.** Triage: both new parameter ladders report `NOT CONVERGING` — η (0.128→0.008) gives C_d 17.39, 24.02, 26.25, 23.76, 21.40 (reverses direction, no η→0 limit) and mask smoothing (0.5→4 cells) gives 7.70→47.27 (6.1× on a numerical parameter). Both reproduce the audit's measured values exactly. Root cause is the audit's own finding: the Brinkman layer `√(ην) = 0.144·dx` is ~7× thinner than a cell and `η ≥ dx²/ν = 0.771` is violated 48×. **No bound was widened.** Per owner decision the gate is kept and the harness moved to the nightly cadence; routed to AUDIT-REPORT §9 Phase 2 item 10 and documented under `KNOWN-FAILING` in the workflow. All other harnesses pass. +- [x] 7.8 Record any gate that now fails, with its triage against `../../../audits/cfd_audit/ACTION-LIST.md`, so no bound was moved without evidence — **one harness now fails: `qtt_cylinder_verification`.** Triage: both new parameter ladders report `NOT CONVERGING` — η (0.128→0.008) gives C_d 17.39, 24.02, 26.25, 23.76, 21.40 (reverses direction, no η→0 limit) and mask smoothing (0.5→4 cells) gives 7.70→47.27 (6.1× on a numerical parameter). Both reproduce the audit's measured values exactly. Root cause is the audit's own finding: the Brinkman layer `√(ην) = 0.144·dx` is ~7× thinner than a cell and `η ≥ dx²/ν = 0.771` is violated 48×. **No bound was widened.** Per owner decision the gate is kept and the harness moved to the nightly cadence; routed to AUDIT-REPORT §9 Phase 2 item 10 and documented under `KNOWN-FAILING` in the workflow. All other harnesses pass. diff --git a/openspec/changes/archive/2026-07-23-close-qtt-solver-envelope/tasks.md b/openspec/changes/archive/2026-07-23-close-qtt-solver-envelope/tasks.md index 41979232e..b5401ee6b 100644 --- a/openspec/changes/archive/2026-07-23-close-qtt-solver-envelope/tasks.md +++ b/openspec/changes/archive/2026-07-23-close-qtt-solver-envelope/tasks.md @@ -73,7 +73,7 @@ Only once group 5 has actually converged the ladder — not before. "a failing baseline is committed as failing" note and the ⚠ row in the harness table, which is where that README records the failure - [x] 6.4 Update the summary-table row: runtime, measured values, and what the gates now constrain -- [x] 6.5 Update `openspec/notes/cfd_audit/AUDIT-REPORT.md` §5b and the remediation table to record the outcome +- [x] 6.5 Update `../../../audits/cfd_audit/AUDIT-REPORT.md` §5b and the remediation table to record the outcome - [x] 6.6 The ladder did not converge (could not be run); the known-failing status is **left in place** and reclassified as offline/manual with the cost measurement recorded — not retired. diff --git a/openspec/changes/fix-navigation-filter-correctness/.openspec.yaml b/openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/.openspec.yaml similarity index 100% rename from openspec/changes/fix-navigation-filter-correctness/.openspec.yaml rename to openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/.openspec.yaml diff --git a/openspec/changes/fix-navigation-filter-correctness/design.md b/openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/design.md similarity index 62% rename from openspec/changes/fix-navigation-filter-correctness/design.md rename to openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/design.md index ca2fff325..688521a51 100644 --- a/openspec/changes/fix-navigation-filter-correctness/design.md +++ b/openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/design.md @@ -7,8 +7,11 @@ gate on. The audit confirmed the parts that are right, which bounds this change usefully: -- the 17-state composition and `nav_transition_matrix`, including the skew-symmetric `−[ω]×` and - `−[f]×` coupling blocks, match the standard ESKF form; +- the 17-state composition and `nav_transition_matrix` match the standard ESKF form: `δp ← δv`, the + `−[f]×` block coupling attitude error into velocity error, and the `−I·dt` accel-bias→velocity and + gyro-bias→attitude couplings. (The Tier-A model omits the transport/`−[ω]×` self-coupling on the + attitude block, consistent with its stated `C ≈ I`, no-Earth-rotation assumption — verified 2026-07-24; + an earlier draft of this note mentioned a `−[ω]×` block that the code does not carry.) - `update_scalar`'s covariance update is a correct **Joseph form** with re-symmetrisation, citing Groves (2013) §3.4.3 — PSD-preserving where the simple form is not. @@ -20,10 +23,23 @@ Three things around that core are wrong, and they are independent: | 9b | `eskf.rs::update_scalar` | divides by unvalidated `s = h·P·hᵀ + r`; returns `()`, so cannot reject | | 9c | `reentry_nav.rs::correct_position` | zeroes the attitude error it never injected | -9c is deeper than a missing line. `ReentryNavEngine` has fields `position`, `velocity`, `filter`, -`tau_offset`, `elapsed` — **no nominal attitude** — and `attitude_error` is read nowhere in the crate. -So the attitude error state is estimated, credited in the covariance through cross-covariance with the -position update, and then discarded. There is currently nowhere to put it. +9c is deeper than a missing line. `ReentryNavEngine` has fields `gm`, `position`, `velocity`, `filter`, +`tau_offset`, `elapsed` — **no nominal attitude** — and `attitude_error` is read nowhere in the crate's +`src` or examples (only one test reads it, asserting it is zero). So the attitude error state is +estimated, credited in the covariance through cross-covariance with the position update, and then +discarded. There is currently nowhere to put it. + +A subtlety that bounds what 9c *means for the shipped examples*: they are point-mass 3-DOF with no true +angular rate, and the corridor's `IMU_GYRO_BIAS = [0,0,0]`, so the *predict* path leaves the nominal +attitude exactly at identity. The defect is therefore **mostly** about the **covariance** — the position +fix shrinks the attitude block through cross-covariance, leaving the filter overconfident about an +attitude it never corrected. Option (a) fixes this by giving the reduction a real correction to attribute +to (a nominal attitude that is injected into). But note the correction is **small, not zero**: the same +`−[f]×` cross-covariance the fix rides on folds a small nonzero `δψ`, and injecting it nudges the nominal +off identity, so `C(q) ≠ I` on later steps. Measured, this shifts the corridor's leg4 error +`0.2802 → 0.2804 m` and leg2 variance `2.6711e1 → 2.6710e1 m²` (≲0.07%, deterministic, all gates hold) — +the reduction is now not merely *justified* but *applied*, and the applied part is visible. This is the +correction working, and it confirms the proposal's "figures move" via (a) rather than the `Q` re-tune. That the attitude block still *couples* is not a mistake: the transition matrix's `−[f]×` term is what lets an attitude error grow a velocity error, and removing it would change the position/velocity error @@ -42,12 +58,19 @@ the loop that is missing. **Non-Goals:** -- **The 17-state composition and the transition matrix.** Confirmed correct by the audit. -- **The Joseph update.** Confirmed correct and cited. +- **The structure of `nav_transition_matrix`, the 17-state composition, and the Joseph update.** + Confirmed correct by the audit; their code is not altered. **Documented exception (option a):** the + specific force fed to the `−[f]×` coupling changes from the Tier-A `C ≈ I` value to `C(q)·f_body`, + where `C(q)` is the nominal attitude's DCM. This changes the error-dynamics *behaviour*, not the + matrix's structure — `nav_transition_matrix` and `propagate` already take the specific force as an + argument, so the rotation happens in the caller (`ReentryNavEngine::predict`), not inside those + functions. Recorded here so the change is a deliberate departure from `C ≈ I`, not an accidental one. - **The Encke/Cowell integrator switch, the IMU noise model, the relativistic clock.** Separate concerns; the clock and the integrator were confirmed or are untouched by this change. -- **Making the filter estimate attitude well.** This change closes an inconsistency; it does not set - out to add attitude observability the engine does not have. +- **Full attitude *observability*.** Option (a) carries and corrects a nominal attitude so the ESKF + loop is closed and the reset is legitimate, but it does not add an attitude *measurement*. In the + point-mass examples the nominal stays ≈ identity; making the filter *estimate attitude well* under a + real rotational profile (6-DOF, an attitude sensor) is out of scope and would be its own work. ## Decisions @@ -80,12 +103,18 @@ rejection on the second axis must not leave the first axis's fold applied and th ### D3 — Validate the covariance at its entry points, not at every use -`NavFilter::new` and `restore` check symmetry, non-negativity of the diagonal and finiteness. +`NavFilter::new` and `restore` check symmetry, non-negativity of the diagonal and finiteness — the +*necessary* covariance conditions, deliberately not a full PSD/LDLᵀ test (see the correction below). *Why:* it is the same argument as the QTT constructor validation in the sibling change — the entry -point is the chokepoint, and validating there makes the degenerate-update path unreachable rather than -merely guarded. The guard in D2 remains as defence in depth, since `P` can in principle lose PSD-ness -through accumulated round-off even from a valid start. +point is the chokepoint, and validating there **narrows** the degenerate-update path rather than merely +guarding it downstream. It does **not** make that path unreachable: a **zero** variance is a valid +covariance entry (PSD includes the boundary) and is admitted, so `P[i][i] = 0` with `r = 0` still +produces `s = 0`. The **D2 update guard is the real backstop** for that case and for a `P` that loses +PSD-ness through accumulated round-off from a valid start; D3 removes the grosser inputs (negative +variance, asymmetry, non-finite) at construction. *(Corrected 2026-07-24 after the adversarial review +caught the original "unreachable rather than merely guarded" as an overclaim — the zero-variance +boundary is admitted by design, so it stays reachable and D2-guarded.)* ### D4 — State the attitude invariant; leave the resolution to the owner @@ -136,15 +165,35 @@ distinction is the whole point, so (a) is where this ends. Three reasons it is t | the DCM the `−[f]×` coupling wants | `to_rotation_matrix()` | | initialisation / interpolation | `from_euler_angles`, `slerp` | -So (a) is a field on `ReentryNavEngine` (which today holds `position`, `velocity`, `filter`, -`tau_offset`, `elapsed` and no attitude) plus two call sites: integrate the gyro into the nominal, and -apply a rotation correction in `correct_position`. That is not a feature; it is the size of (b) plus a -constructor call. - -**Therefore (a) lands in this change, and (b) is dropped.** (b) was only ever justified by (a)'s cost, -and it carried a real price — retaining the attitude error means that block is no longer an error -*about the current nominal* in the textbook ESKF sense, a departure that would have had to be -documented and later undone. With (a) affordable there is no reason to pay it. +So (a) is a field on `ReentryNavEngine` (which today holds `gm`, `position`, `velocity`, `filter`, +`tau_offset`, `elapsed` and no attitude) plus the call sites to integrate the gyro into the nominal and +apply a rotation correction in `correct_position`. + +**Correction, checked again against the tree on 2026-07-24.** The 2026-07-22 revision was right that the +`Quaternion` *representation* ships, but it under-counted (a) a second time — the same failure mode this +change's B-1 sibling recorded. Two things the representation does not supply: + +1. **There is no angular-rate input to integrate.** `ReentryNavEngine::predict` and `NavFilter::predict` + carry no `ω̂`. Integrating a nominal attitude forces a **`predict` signature change** and a new argument + at its call sites. **Corrected against the tree (2026-07-24):** those sites are the `TrajectoryNav` + stage (which the corridor/weather examples drive) and the `reentry_nav`/`closed_loop` tests — **not** + `world.rs` (it only *builds* the engine via `new`) and **not** `ins_gnss_blackout` (a standalone + P-controller model that uses neither filter). So (a) is "a field plus call sites" *plus a new sensing + argument* (`ImuModel::sense_angular_rate`) threaded through the engine and the stage. +2. **The examples do not rotate under predict.** Point-mass 3-DOF, `IMU_GYRO_BIAS = [0,0,0]`, so the + *predict* path leaves the nominal at identity. But a **fix** injects the small `δψ` the position↔attitude + cross-covariance carries, so `δψ` is *not* exactly zero: (a) is primarily a covariance-legitimacy fix, + yet it also shifts the corridor's reacquisition figure a hair (`0.2802 → 0.2804 m`) — the applied + correction, visible (see Context). + +**(a) is still the decision (owner, 2026-07-24), and (b) is dropped.** (b) is not merely costly — it +does not satisfy this change's own spec: retaining the attitude error while the position fix keeps +shrinking the attitude covariance fails the "attitude confidence is not claimed without a correction" +and "repeated fixes do not accumulate unjustified confidence" scenarios. Of the honest options only (a) +(apply the correction) and (c) (reset the covariance so no reduction is retained) satisfy the spec; the +owner chose (a) so the ESKF loop is genuinely closed. The cost above is accepted and documented, not +waved away — that is the lesson of the two prior changes, applied to this one *before* implementation +rather than after. (a) also fixes the original defect properly rather than working around it: `reset_navigation` may then zero the attitude block **because the correction was actually injected**, which is the invariant the @@ -183,7 +232,7 @@ corrected filter is a measurement. No runtime migration; `publish = false`, no downstream consumers. -1. **Covariance validation** (D3) — smallest, and makes the degenerate path unreachable, so it lands +1. **Covariance validation** (D3) — smallest, and narrows the degenerate path (the D2 guard is its backstop), so it lands before the guard that defends against it. 2. **The update guard and its rejection channel** (D2) — touches one caller. 3. **The process-noise discretisation** (D1) — the change that moves numbers, landed alone so its diff --git a/openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/proposal.md b/openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/proposal.md new file mode 100644 index 000000000..e1e4ba06c --- /dev/null +++ b/openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/proposal.md @@ -0,0 +1,152 @@ +# Fix the error-state Kalman filter's correctness defects + +## Why + +The GNSS-denial navigation stack is the crate's estimation layer — the thing that decides how far a +vehicle drifts through a comms blackout and how well it reacquires. Three defects in it are +independent of each other and all three affect what the filter reports. + +**The process noise is not a discretisation of anything.** `NavFilter::predict` takes `dt`, uses it to +propagate the state and build the transition matrix, then adds `Q` with no `dt` factor at all: + +```rust +self.cov = mat_add(&fpft, &diag(&process_noise_diag)); +``` + +Covariance therefore grows with **step count, not elapsed time**. Halving `dt` over a fixed horizon +doubles the accumulated process noise. The supplied diagonal is not a continuous-time spectral density +(`Q_d ≈ Q_c·dt`) nor any other stated discretisation, so the filter's tuning is silently bound to one +step size and any change of `dt` re-tunes the filter as a side effect. + +**The innovation covariance is divided by unguarded.** `update_scalar` computes +`s = h·P·hᵀ + r` and then `k[i] = ph[i] / s` with no positivity check, and it returns `()` — it has no +channel through which to reject. The path is reachable from the public API: `NavFilter::new` accepts an +arbitrary covariance diagonal with no validation, `NavFilter::restore` accepts an arbitrary matrix, and +`ReentryNavEngine::correct_position` passes `r_var` straight through. With `P[i][i] = 0` and +`r_var = 0`, `s = 0`, `k = 0/0 = NaN`, and the NaN is written into both the state and every entry of +the covariance. + +**An error state is zeroed without ever being injected.** `correct_position` runs three sequential +scalar updates on the position axes. Each one shrinks the *whole* covariance through the Joseph form, +including the attitude block, via the position↔attitude cross-covariance — so the filter becomes more +confident about attitude. It then injects only `δp` and `δv` into the nominal and calls +`reset_navigation_error()`, which zeroes position, velocity **and attitude** error. + +The attitude correction is therefore estimated, credited in the covariance, and discarded. And it +cannot be applied: **`ReentryNavEngine` carries no nominal attitude** — its fields are `position`, +`velocity`, `filter`, `tau_offset`, `elapsed` — and `attitude_error` is read nowhere in the crate. In a +correct ESKF, resetting the error state after injection is sound precisely *because* the error was +transferred to the nominal. Zeroing an error that was never transferred discards the estimate while +keeping the covariance reduction it justified, leaving the filter permanently overconfident in +attitude. + +To the code's credit, `update_scalar`'s covariance update is a correct **Joseph form** with +re-symmetrisation, citing Groves (2013) §3.4.3 — the audit confirmed this positively. The defects are +around it, not in it. + +Audit `AUDIT-REPORT.md` §4b and §9 Phase 2 item 9. The navigation module is one of three rated +`not-ready`. + +## What Changes + +- **Give the process noise a stated discretisation.** `Q` becomes a documented continuous-time + spectral density scaled by `dt` (or another explicitly stated and cited discretisation), so + covariance growth tracks elapsed time and the filter's tuning survives a change of step size. + Every currently-tuned `q_diag` changes *meaning* — but the examples run at a single fixed `dt`, and the + re-tune is the dimensionally-correct `÷dt` conversion, so `Q_c·dt` reproduces the calibrated per-step + `Q` to floating-point rounding (bit-exact for most blocks; a ≤1-ULP residue on the gyro-bias and + clock-drift blocks, below any displayed digit). This change alone therefore does not move the example + figures (measured); it would for a filter run at a different step size, which is the point. +- **Guard the innovation covariance** and validate the inputs that reach it, so a degenerate + measurement cannot poison the state and covariance with `NaN`. +- **Resolve the attitude-error inconsistency**: an error state is injected before it is reset, or it is + not reset. The invariant is the requirement; the resolution is **option (a), decided 2026-07-24** — + carry a nominal attitude, integrate the sensed angular rate into it, inject `δψ` on a fix, and only + then zero the attitude error. This makes the reset legitimate rather than working around it, and it is + larger than a bug fix (see the design's D4 and the Impact/Risk below). +- **Validate filter construction.** `NavFilter::new` and `restore` accept arbitrary covariance today; + a covariance must be at least symmetric and positive-semidefinite to be one. + +Explicitly **not** in scope: the 17-state composition and the transition matrix (the audit confirmed +the skew-symmetric coupling blocks against the standard ESKF form), the Joseph update itself, the +Encke/Cowell integrator switch, the IMU noise model, and the relativistic clock. Those are separate +findings or were confirmed correct. + +## Capabilities + +### New Capabilities + +- `eskf-filter-correctness`: the error-state Kalman filter's numerical and structural contract — the + process-noise discretisation is stated rather than implied, the update is guarded against degenerate + inputs, the covariance is a covariance, and the error-state lifecycle (estimate → inject → reset) is + closed. This capability exists because all three defects share one root: the filter's *contracts* + were never written down, so nothing distinguished a tuned constant from a discretisation, or an + injected error from a discarded one. + +### Modified Capabilities + +None. The navigation stack has no existing capability spec — which is itself part of why these defects +persisted. This change introduces the first one rather than modifying prose that does not exist. + +## Impact + +**Code** +- `deep_causality_cfd/src/navigation/eskf.rs` — `predict` (Q scaling), `update_scalar` (innovation + guard + `Result` return), `new` / `restore` (covariance validation). +- `deep_causality_cfd/src/navigation/reentry_nav.rs` — `predict` (gains an angular-rate argument, and + computes `C(q)·f_body` for the filter's specific force), `correct_position` (propagates the update + rejection; injects `δψ` into the nominal attitude), and a **new nominal-attitude `Quaternion` + field** on `ReentryNavEngine` (which today carries `gm`, `position`, `velocity`, `filter`, + `tau_offset`, `elapsed` and no attitude). +- `deep_causality_cfd/src/navigation/ins_error_state.rs` — `reset_navigation` stays as-is; zeroing the + attitude block is now legitimate because `δψ` was injected first. +- `deep_causality_cfd/src/types/flow/corridor/trajectory_nav.rs` — the `TrajectoryNav` stage is the + **only** in-crate `ReentryNavEngine::predict` caller (the corridor and weather examples drive it); it + gains the new angular-rate argument, sourced from `ImuModel::sense_angular_rate`. + **CORRECTED against the tree during implementation:** the earlier draft named `world.rs` and the + `ins_gnss_blackout` example as `predict` call sites. Neither is: `world.rs` only *builds* the engine + (`ReentryNavEngine::new`), and `ins_gnss_blackout` is a **standalone P-controller model** that never + uses `NavFilter`/`ReentryNavEngine` at all. `examples/avionics_examples/navigation/magnav` uses a + **different** 2-D filter (`predict(vel_x, vel_y, dt)`), also unaffected. The test call sites + (`reentry_nav_tests`, `closed_loop_tests`) take the new argument. + +**Evidence** +- `examples/avionics_examples/cfd/plasma_blackout/{corridor,weather}` — every navigation figure: + dead-reckoning drift through blackout, terminal reacquisition error, and the variance witnesses. Both + examples gate on these. +- `examples/avionics_examples/navigation/ins_gnss_blackout` — **not affected**: it is a standalone + P-controller model that uses neither `NavFilter` nor `ReentryNavEngine` (confirmed against the tree). +- Any tuned `q_diag` in those examples, which changes meaning under a stated discretisation. + +**Risk** +- Re-tuning is required for the *contract*, but at the examples' fixed `dt` the dimensionally-correct + `÷dt` re-tune is calibration-preserving, so group 4 alone leaves every displayed figure unchanged on the + examples (measured; bit-exact bar a ≤1-ULP gyro-bias/clock-drift residue below display precision). + The numbers that do move come from the attitude correction (a), not the `Q` re-tune. +- The attitude resolution (a) is larger than a bug fix, and the tree makes it larger than the design's + 2026-07-22 revision assumed. Two things beyond "carry a `Quaternion`" were found by verifying against + the source before implementation: + - **`predict` has no angular-rate input.** `ReentryNavEngine::predict` and `NavFilter::predict` carry + no `ω̂`, so integrating a nominal attitude (6.1a) forces a signature change on `ReentryNavEngine::predict` + and a new argument at its call sites. **CORRECTED against the tree:** those call sites are the + `TrajectoryNav` stage (which the corridor/weather examples drive) and the `reentry_nav`/`closed_loop` + tests — **not** `world.rs` (it only builds the engine) and **not** `ins_gnss_blackout` (standalone model). + The `Quaternion` type ships; the *sensing path* did not exist and was added (`ImuModel::sense_angular_rate`). + - **The examples are point-mass 3-DOF with no true angular rate** (`IMU_GYRO_BIAS = [0,0,0]`), so the + *predict* path leaves the nominal exactly at identity. (a) is therefore **primarily** a + covariance-legitimacy fix — it stops the position fix claiming an attitude-covariance reduction with no + correction behind it. It is **not purely** a covariance fix, though: a position fix folds a small `δψ` + through the position↔attitude cross-covariance and (a) injects it, which nudges the nominal off identity + and shifts the corridor's leg4 error `0.2802 → 0.2804 m` and leg2 variance `2.6711e1 → 2.6710e1 m²` + (≲0.07%, deterministic, gate-safe — the applied correction doing exactly its job). Everything else is + bit-identical; the weather shift is below display precision. +- **Public API signatures do change.** `update_scalar` gains a rejection channel (returns a `Result` + instead of `()`), and `predict` gains the sensed angular rate for (a). Both are in-crate only + (`publish = false`), and `update_scalar`'s only caller is `correct_position`. +- **`correct_position` computes the nav-frame specific force from the nominal DCM** (`C(q)·f_body`) + rather than assuming `C ≈ I`. This changes the *value* fed to the `−[f]×` coupling but **not** + `nav_transition_matrix` or `propagate` themselves, which already take the specific force as an + argument — so task 7.9's "does not alter `nav_transition_matrix` / the 17-state composition / the + Joseph update" still holds at the function level, while the error-dynamics *behaviour* changes by + design. This is a deliberate, documented departure from the Tier-A `C ≈ I` model, recorded as an + exception in the design's Non-Goals. diff --git a/openspec/changes/fix-navigation-filter-correctness/specs/eskf-filter-correctness/spec.md b/openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/specs/eskf-filter-correctness/spec.md similarity index 87% rename from openspec/changes/fix-navigation-filter-correctness/specs/eskf-filter-correctness/spec.md rename to openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/specs/eskf-filter-correctness/spec.md index 0872bce4c..f6ce4eedf 100644 --- a/openspec/changes/fix-navigation-filter-correctness/specs/eskf-filter-correctness/spec.md +++ b/openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/specs/eskf-filter-correctness/spec.md @@ -69,13 +69,19 @@ and a negative one can drive `s` through zero from either side. ### Requirement: A covariance is validated as a covariance -Filter construction and restoration SHALL reject a covariance that is not symmetric and positive -semidefinite, rather than accepting arbitrary values and discovering the consequences during an -update. - -`NavFilter::new` accepts an arbitrary diagonal and `restore` an arbitrary matrix; neither checks -symmetry, non-negativity, or finiteness. A zero or negative variance admitted here is what makes the -degenerate-update path above reachable. +Filter construction and restoration SHALL reject a covariance that fails the *necessary* covariance +conditions — a non-finite entry, an asymmetry beyond tolerance, or a negative variance on the diagonal — +rather than accepting arbitrary values and discovering the consequences during an update. A full +positive-semidefinite test (an LDLᵀ pivot scan) is deliberately **not** performed at the entry points: a +covariance produced by the Joseph update can carry a round-off-negative eigenvalue that a strict PSD test +would wrongly reject, so the operational PSD backstop is the guarded measurement update above (which +refuses the degenerate innovation a non-PSD matrix would produce), not a construction-time eigenvalue +check. + +`NavFilter::new` accepts an arbitrary diagonal and `restore` an arbitrary matrix; neither previously +checked symmetry, non-negativity, or finiteness. A **negative** variance admitted here is what made the +grosser corrupt-covariance inputs reachable; a **zero** variance is a valid entry (PSD includes the +boundary) and remains admitted, its degenerate `s = 0` caught by the update guard. #### Scenario: A non-PSD covariance is refused at construction diff --git a/openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/tasks.md b/openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/tasks.md new file mode 100644 index 000000000..55b2b2dd7 --- /dev/null +++ b/openspec/changes/archive/2026-07-24-fix-navigation-filter-correctness/tasks.md @@ -0,0 +1,195 @@ +## 1. Baseline the navigation figures before touching the filter + +Design D5: measure first, so every later movement is attributable and no gate is re-derived from a +number nobody recorded. + +- [x] 1.1 Record the corridor example's navigation figures: dead-reckoning drift through blackout, terminal reacquisition error, and the variance witnesses. Current post-`fix-ramc` baseline (the μ correction moved the blackout window, so these are **not** the older 0.3467 → 2.5448 → 0.2775): `err → drift → post-reacquisition` = **0.1823 → 1.5637 → 0.2802 m**, variance **2.290e-1 → 2.671e1 → 3.184e-1 m²**. Re-run to confirm before touching the filter. + **MEASURED 2026-07-24** (fresh `--release` run, 39.7 s): `0.1823 → 1.5637 → 0.2802 m`, variance + `2.2897e-1 → 2.6711e1 → 3.1840e-1 m²` — exact match to the committed `output.txt`. All gates PASS. +- [x] 1.2 Record the weather example's per-case drift mean/σ and terminal mean/max over its draw ensemble. + **MEASURED** (committed `output.txt`, 6 worlds × 8 draws, 184 s): drift(dark) mean±sd / terminal mean(max), m — + standard `41.60 ± 1.97 / 0.133 (0.195)`; hot `48.64 ± 2.40 / 0.141 (0.212)`; cold `50.68 ± 2.93 / 0.132 (0.206)`; + polar `58.71 ± 2.27 / 0.151 (0.219)`; thin `41.28 ± 1.94 / 0.136 (0.188)`; dense `43.05 ± 1.71 / 0.141 (0.207)`. + Gates: (4) cold factor 1.41× (≥1.2×); (4b) polar−standard 17.11 m at 5.7σ (≥2σ); (5) worst-draw terminal <1.0 m across 48 descents. +- [x] 1.3 Record `ins_gnss_blackout`'s reported figures. **MEASURED** (fresh `--release` run): open-loop 374544 m; + closed-loop pre-outage 0.0 m / peak-in-outage 3 m / post-reacquire 0.0 m; clock carry 3532.3 ns (relativistic) vs + 3663.3 ns (naive); 264 fixes, 2 regime changes; all 5 gates PASS. + **FINDING — outside this change's reach:** `ins_gnss_blackout` is a **standalone P-controller model** + (`ins_vel_err`, `ins_residual_bias`, `gnss_gain`); it uses **neither `NavFilter` nor `ReentryNavEngine`** and never calls + `predict`/`update_scalar`/`correct_position`. The proposal/design/tasks name it as a `predict` call site — that is + incorrect and is corrected in group 6 (task 6.1a0). Its figures cannot move under this change; 5.3 will confirm they are unchanged. +- [x] 1.4 Record every tuned `q_diag` in the examples, with the `dt` it was tuned at — these values change meaning under a stated discretisation. + **MEASURED:** one tuned diagonal, `Q_DIAG` (`avionics_examples/src/shared/constants.rs:174`), fed to **both** the + `ImuModel` and `TrajectoryNav` in `world.rs` (the IMU's copy wins via `.with_imu`), tuned **per coupled step at the + fixed `DT_FLIGHT = 0.1 s`** (`world.rs:105,477 .flight_dt(DT_FLIGHT)`). Values (per block): pos `1e-4`, vel `1e-4`, + att `1e-12`, accel-bias `1e-12`, gyro-bias `1e-14`, clock-bias `1e-12`, clock-drift `1e-14`. `P0_DIAG` is the initial + covariance, **not** process noise — it is not a `dt`-scaled quantity and is left untouched. Test-local `q` values + (`[1.0;17]`, `[100.0;17]`, IMU grades in `closed_loop_tests`) are recorded where each test asserts a covariance. + +## 2. Validate the covariance at its entry points (D3) + +Lands first: it narrows the degenerate-update path (removes negative-variance / asymmetric / non-finite +inputs at the chokepoint); the D2 update guard is the backstop for the zero-variance boundary it admits. + +- [x] 2.1 Reject a non-finite, negative-variance or asymmetric covariance in `NavFilter::new`. Returns + `Result`; a pure diagonal is symmetric by construction, so `new` checks finiteness + and non-negativity via the shared `validate_covariance` (`eskf.rs`). +- [x] 2.2 Same in `NavFilter::restore`, so a snapshot cannot reintroduce one — full-matrix finiteness, symmetry, and diagonal non-negativity. +- [x] 2.3 Choose and document the symmetry tolerance — `|cov[i][j] − cov[j][i]| ≤ √ε · (1 + max(|cov[i][j]|, |cov[j][i]|))`. + `√ε` (≈1.5e-8 f64 / 3.4e-4 f32) is scale-relative with a unit absolute floor; documented on `validate_covariance`. The + `restore_admits_float_level_asymmetry_within_tolerance` test pins a one-ULP asymmetry as admitted. +- [x] 2.4 Add tests for each rejection, and a snapshot round-trip test proving a valid filter restores exactly. + Added to `eskf_tests.rs`: `new_rejects_a_negative_variance`, `new_rejects_a_non_finite_variance`, + `new_accepts_a_zero_variance_on_the_boundary`, `restore_rejects_an_asymmetric_covariance`, + `restore_rejects_a_negative_diagonal`, `restore_rejects_a_non_finite_entry`, + `restore_admits_float_level_asymmetry_within_tolerance`, `a_valid_filter_snapshots_and_restores_exactly` — all pass. +- [x] 2.5 Confirm no shipped configuration is now refused. The only shipped covariances are `P0_DIAG` (all-positive, + finite → valid; `world.rs` uses `.expect` on it) and snapshot round-trips (exactly symmetric by the Joseph averaging → + valid). Neither is refused; corridor/weather re-run in group 5 confirms end-to-end. + **NOTE (D3 scope):** validation is the necessary conditions (finiteness, symmetry, non-negative diagonal) per design D3, + not a full-matrix LDLᵀ PSD test; the sufficient PSD guarantee against run-time round-off is the guarded update (group 3). + +## 3. Guard the measurement update (D2) + +- [x] 3.1 Give `update_scalar` a rejection channel; it now returns `Result<(), PhysicsError>` (was `()`). +- [x] 3.2 Reject a zero, negative or non-finite innovation covariance `s = h·P·hᵀ + r` before dividing — + `if s <= R::zero() || !s.is_finite()` (written `<=`/`!finite`, not `!(s > 0)`, to keep `neg_cmp_op_on_partial_ord` clean). +- [x] 3.3 Reject a negative measurement variance `r` — `if r < R::zero() || !r.is_finite()`, before it enters `s`. +- [x] 3.4 Rejection is **atomic**: both guards precede any mutation in `update_scalar`, so a refused single + update leaves state+covariance untouched. Across the three per-axis folds, `correct_position` snapshots the + filter (`self.filter.clone()`) and rolls back on any rejection, so a refusal on axis 2 never leaves axis 1 applied. +- [x] 3.5 Propagate the rejection through `ReentryNavEngine::correct_position` (now returns `Result`); the + `TrajectoryNav` stage threads the engine back and surfaces the error rather than continuing as if the fix folded. +- [x] 3.6 `a_degenerate_update_is_refused_and_leaves_the_filter_untouched` (`P[0][0]=0`, `r=0` → `s=0`) asserts + `is_err()` and that state+covariance are `assert_eq!`-unchanged. `a_refused_update_leaves_the_run_able_to_continue` + confirms a later valid fold still folds. +- [x] 3.7 `a_valid_update_is_bit_identical_after_the_guard` pins `cov[0][0]` and the position variance to exact + `f64` values reproduced in the Joseph update's own operation order (`EXPECTED_COV00` const) — the guard is a pure + early-return before that arithmetic, so a valid fold is byte-unchanged. + +## 4. Give the process noise a discretisation (D1) + +Landed alone so its effect on the examples is attributable. +**FINDING (measured in group 5, isolated to group 4):** group 4 **on its own leaves every displayed +figure unchanged** on the examples — because they run at a **single fixed `dt = 0.1 s`** and the re-tune +(4.5) is the dimensionally-correct `÷dt` conversion, `Q_c·dt` reproduces the calibrated per-step `Q` to +floating-point rounding (bit-exact for the position/velocity/attitude/accel-bias/clock-bias blocks; a +≤1-ULP residue on the gyro-bias and clock-drift blocks — `1e-13 × 0.1 ≠ 1e-14` in `f64` — far below any +displayed digit). So +the process-noise discretisation is *not* what moves the numbers here (it would, for a filter run at a +different `dt` — the proposal's general statement holds). What actually moves them is **group 6's +attitude injection** (see group 6): the proposal's "figures move" is confirmed, just via the applied +attitude correction rather than the `Q` re-tune. Recorded honestly per D5. + +- [x] 4.1 Scale the process noise by `dt` in `NavFilter::predict` (`Q_d = Q_c·dt`) — `q_d[i] = process_noise_diag[i] * dt`. +- [x] 4.2 Document at the API boundary that the supplied diagonal is a continuous-time spectral density + (units `state²/s`), with the discretisation named (first-order / Euler–Maruyama) and cited (Groves 2013 §14.2.4), + and the Van Loan within-step coupling explicitly declined. Done on `NavFilter::predict`. +- [x] 4.3 `covariance_growth_is_invariant_under_step_refinement`: a leaf-state (accel-bias) variance over a + fixed horizon at `dt` and `dt/2` agrees to `1e-12` and equals `T·Q_c` — exact, not merely to O(dt), because a + leaf accumulates `P += Q_c·dt` with no propagation. Would double under the old per-step `Q`. +- [x] 4.4 `changing_dt_alone_does_not_retune_the_filter`: the position witness (position-only spectral density, + a leaf) is `dt`-invariant to `1e-12` over a fixed horizon and equals `T·Q_c`. +- [x] 4.5 Re-tune `Q_DIAG` from per-step to per-second: `Q_c = Q_step / DT_FLIGHT` (×10 at `DT_FLIGHT = 0.1 s`), + stated in the `Q_DIAG` doc. Magnitudes now read 10× the pre-fix per-step diagonal; `Q_c·dt` at the configured step + reproduces the calibrated per-step process noise. No test-local `q` needed re-tuning (all qualitative; the group-3 + golden uses `update_scalar`, not `predict`). + +## 5. Measure, then re-derive the gates (D5) + +Do not edit a navigation gate before this group's measurements are written down. + +- [x] 5.1 Re-ran the corridor (`--release`). Measured **at end of group 4** (attitude not yet in): identical + to the 1.1 baseline **at every displayed figure** (`0.1823 → 1.5637 → 0.2802 m`, var `2.2897e-1 → 2.6711e1 → 3.1840e-1 m²`; the ≤1-ULP gyro/clock-drift re-tune residue is below display precision). **Final, after group 6** + (the migration plan puts attitude last): leg4 error `0.2802 → 0.2804 m` and leg2 variance `2.6711e1 → 2.6710e1 m²` + (see the group-6 finding — an applied attitude correction). Everything else (all CFD/plasma/miss figures) bit-identical. + Gate (3) PASS; all 13 corridor gates PASS. `corridor/output.txt` regenerated to `0.2804 / 2.6710e1`. +- [x] 5.2 Re-ran the weather example. **Identical at every displayed figure** vs 1.2 baseline in every world + (standard `41.60 ± 1.97 / 0.133`, polar `58.71 ± 2.27 / 0.151`, …), all 7 gates PASS, `weather/output.txt` unchanged. + **CORRECTION (review):** the committed `weather_table.csv` shows `drift_mean`/`drift_sd` moved at **f64 precision** in + all six worlds — the same group-6 attitude injection (fixes before/after the dark carry a small `δψ` into the + dead-reckoned leg, plus the ≤1-ULP `Q` re-tune residue); the shift is sub-mm, below every displayed digit. Earlier + "exactly unchanged" for `drift(dark)` was an overclaim; it is unchanged *at display precision*, not at `f64`. +- [x] 5.3 `ins_gnss_blackout` is causally independent of the filter (group-1 finding); no code it uses changed, + so its figures are unchanged by construction (open 374544 m; closed 0.0/3/0.0 m; clock 3532.3 vs 3663.3 ns; 5 gates PASS). +- [x] 5.4 **No navigation gate fails.** The corridor gate is relational (drift up through blackout, collapse on + reacquisition) and the weather gates are ratio/σ-based; the tiny group-6 shift leaves all of them PASS. +- [x] 5.5 **Nothing to re-derive** — no gate bound was touched. The corridor gate remains satisfied by the relational + pattern (`0.1823 → 1.5637 → 0.2804`, collapse on reacquisition); no bound was widened to restore a figure (D5 honoured). +- [x] 5.6 The corrected filter does **not** report worse drift — the dead-reckoned drift (leg2 error `1.5637 m`) is + unchanged at display precision (deterministic, driven by the accel bias, not the covariance). Group 4's `÷dt` re-tune is + calibration-preserving at the fixed `dt` (identical to display precision; ≤1-ULP gyro/clock-drift residue); the visible + movement is group 6's applied attitude correction (leg4/leg2-var, ≲0.07%), recorded as the honest result — the + proposal's "figures move" is confirmed via that correction, not the `Q` re-tune. + +## 6. Resolve the attitude-error inconsistency (D4) + +Last, because it needs an owner decision and the options differ greatly in size. + +**FINDING — (a) does move the example numbers a little, and that is the correction working.** The design +called (a) "primarily a covariance-legitimacy fix" for the point-mass examples on the reasoning that the +attitude *mean* stays ≈ 0 (`IMU_GYRO_BIAS = 0`, no true rotation). That is right for the **predict** path +(ω̂ = 0 ⇒ the nominal integrates to *exactly* identity — pinned by `a_zero_rate_leaves_the_nominal_exactly_at_identity`), +but it missed a second path: a **position fix** folds a small nonzero `δψ` through the position↔attitude +cross-covariance the `−[f]×` block builds over the descent, and (a) now **injects** that `δψ` into the +nominal. So after the first fix the nominal is no longer exactly identity, `C(q) ≠ I`, and the specific +force fed to the filter shifts by a hair. Measured, deterministic (two runs identical), fully isolated: +corridor leg4 `0.2802 → 0.2804 m`, leg2 variance `2.6711e1 → 2.6710e1 m²`; **every other figure +bit-identical**; weather changes below display precision (its `drift(dark)` has no fixes). All gates hold. +This is exactly the applied correction (a) exists to deliver, and it confirms the proposal's "figures move". + +Resolution revised 2026-07-22 after testing the deferral against the tree: **(a) here; (b) dropped.** +`Quaternion` with `from_axis_angle`, `to_rotation_matrix`, `normalize` and `slerp` already ships in +`deep_causality_num_complex`, an existing `deep_causality_cfd` dependency, so (a) is a field plus two +call sites rather than a feature. (b) was justified solely by (a)'s cost and carried a real price — an +attitude block that is no longer an error about the current nominal. + +- [x] 6.1 Added a nominal attitude `Quaternion` field to `ReentryNavEngine`; `new` initialises it to + identity, `restore` takes it as an argument (and it round-trips through the snapshot). Re-exported `Quaternion` + from `deep_causality_cfd` since it is now in the engine's public API. +- [x] 6.1a0 **Added the angular-rate input.** `ReentryNavEngine::predict` gains `angular_rate: [R; 3]` (`ω̂`). + **CALL-SITE CORRECTION (found against the tree):** the artifacts named `world.rs` and the `ins_gnss_blackout` + example as `predict` call sites — **both wrong**. `world.rs` builds the engine via `ReentryNavEngine::new` (no + `predict`); the only in-crate `predict` caller is the **`TrajectoryNav` stage**, which the corridor/weather examples + drive. `ins_gnss_blackout` is a **standalone P-controller model** that never touches the engine. Actual call sites + updated: `TrajectoryNav::apply`, `reentry_nav_tests`, `closed_loop_tests`. `magnav` (2-D filter) untouched. + `ω̂` supplied by the examples = `imu.sense_angular_rate([0;3])` = gyro bias = **`[0,0,0]`** (`IMU_GYRO_BIAS = 0`, + no true rotation), so the *predict* path leaves the nominal exactly at identity — but a **fix** still injects a + small `δψ` from the position↔attitude cross-covariance (see the group-6 FINDING above), which is why the corridor + numbers shift a hair. +- [x] 6.1a Integrate the gyro each step: `self.attitude = (self.attitude * Quaternion::from_axis_angle(ω̂, |ω̂|·dt)).normalize()`. + `from_axis_angle` returns identity for a zero-length axis, so `ω̂ = 0` leaves the nominal exactly at identity (⊗ identity + and normalise are both exact on the unit quaternion). +- [x] 6.1b Inject `δψ` in `correct_position`: `self.attitude = (Quaternion::from_axis_angle(δψ, |δψ|) * self.attitude).normalize()` + **before** `reset_navigation_error()`. The reset is now legitimate — proven by `a_fix_injects_the_attitude_error_into_the_nominal_then_resets_it`. +- [x] 6.1c Feed `C(q)·f_body` (via `attitude.to_rotation_matrix()` and the new `mat3_vec` helper) to `filter.predict`, + replacing `C ≈ I`. Computed in the caller (`ReentryNavEngine::predict`); `nav_transition_matrix`/`propagate` byte-unchanged (task 7.9). +- [x] 6.2 No interim departure to document: `δψ` is injected, so the attitude block *is* an error about the + current nominal — textbook ESKF bookkeeping holds, (b)'s caveat is not incurred. (Recorded in the design D4.) +- [x] 6.3 `repeated_fixes_keep_correcting_the_nominal_rather_than_claiming_free_confidence`: 100 predict+fix cycles + with a standing gyro bias — the nominal keeps being corrected (rotates away from identity) and the attitude error is + reset (`< 1e-9`) after every fix, so the covariance reductions are matched by applied corrections, not claimed for free. +- [x] 6.4 The `−[f]×` coupling is unchanged in structure (task 7.9); the coast/reacquire tests + (`closed_loop_tracks_then_drifts_then_reacquires`, `position_fix_reacquires_and_stays_on_orbit`) confirm the + propagation stays stable and the attitude error still couples into velocity error as intended. +- [x] 6.5 `a_nonzero_rate_integrates_and_stays_normalised_across_a_long_march` (5000 steps, unit to `1e-9`) and + `a_zero_rate_leaves_the_nominal_exactly_at_identity` (exact `assert_eq!`) cover normalisation and the zero-input identity. + +## 7. Verify + +- [x] 7.1 `covariance_growth_is_invariant_under_step_refinement` — leaf-state variance agrees to `1e-12` at `dt` and `dt/2`. +- [x] 7.2 `a_degenerate_update_is_refused_and_leaves_the_filter_untouched` — `is_err()` + state/covariance `assert_eq!`-unchanged. +- [x] 7.3 `new_rejects_*` / `restore_rejects_*` — negative variance, asymmetry, non-finite refused at both entry points. +- [x] 7.4 `a_fix_injects_the_attitude_error_into_the_nominal_then_resets_it` — a nonzero `δψ` is injected (nominal ≠ identity) before the block is zeroed. +- [x] 7.5 `a_valid_update_is_bit_identical_after_the_guard` (exact `f64`) + `a_resume_package_round_trips_through_disk_bit_exact` — valid path byte-unchanged. +- [x] 7.6 `cargo test -p deep_causality_cfd --release` → **895 passed, 0 failed, 1 ignored** (was 828 baseline + the new tests). No regression. +- [x] 7.7 `cargo clippy -p deep_causality_cfd -p avionics_examples --all-targets --all-features -- -D warnings` clean + (one `needless_range_loop` was fixed by rewriting to iterators, not suppressed); `cargo fmt` applied; **no new `#[allow]`** (diff-verified). +- [x] 7.8 The only gate whose *witness* moved is the corridor drift/reacquire gate (`0.2802 → 0.2804 m`), traceable to + group 6's applied attitude correction. It is a **relational** gate (no numeric bound), so nothing was widened; it still PASSES. + No bound anywhere was changed to restore a pre-correction figure (D5 honoured). +- [x] 7.9 **Verified byte-unchanged:** `ins_error_state.rs` (propagate + 17-state composition) has an empty diff; + `nav_transition_matrix`'s body is unchanged (the eskf.rs hunk is only the *added* `validate_covariance`/`max_abs`); + the Joseph arithmetic has no added/removed lines (guards precede it, `Ok(())` follows). The sole error-dynamics + behaviour change is `ReentryNavEngine::predict` feeding `C(q)·f_body` to `filter.predict` — the caller, matching the + design's documented Non-Goal exception. diff --git a/openspec/changes/archive/2026-07-24-fix-ramc-vibrational-relaxation-pair/proposal.md b/openspec/changes/archive/2026-07-24-fix-ramc-vibrational-relaxation-pair/proposal.md index ea36e7117..b06862f97 100644 --- a/openspec/changes/archive/2026-07-24-fix-ramc-vibrational-relaxation-pair/proposal.md +++ b/openspec/changes/archive/2026-07-24-fix-ramc-vibrational-relaxation-pair/proposal.md @@ -36,7 +36,7 @@ expected to **remove** the crate's headline agreement (`peak nₑ = 1.08e19`, "+ II anchor"), not preserve it. The audit is explicit that the gates must be re-derived from the corrected physics rather than re-tuned to restore the previous number. -Audit blocker **B-1**, `openspec/notes/cfd_audit/AUDIT-REPORT.md` §4 and §9 Phase 2 item 7. +Audit blocker **B-1**, `../../../audits/cfd_audit/AUDIT-REPORT.md` §4 and §9 Phase 2 item 7. ## What Changes diff --git a/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/.openspec.yaml b/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/.openspec.yaml new file mode 100644 index 000000000..5e6d53a3f --- /dev/null +++ b/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/.openspec.yaml @@ -0,0 +1,2 @@ +schema: spec-driven +created: 2026-07-24 diff --git a/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/design.md b/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/design.md new file mode 100644 index 000000000..9c26fa86d --- /dev/null +++ b/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/design.md @@ -0,0 +1,202 @@ +## Context + +This is the last change in the `deep_causality_cfd` audit. Phases 1 and 2 made the evidence bite and +closed the physics defects; the numerics are confirmed right against every closed-form reference the +audit could apply. What remains is the assurance the crate offers a reader: its prose, its load-bearing +constants, and its load-bearing tests. `AUDIT-REPORT.md` §9 items 16–24, systemic themes §7. + +The audit's two largest themes by count survive here: 87 doc-overclaims and 39 doc-gaps. Both are the +same failure in opposite directions — prose that says more than the code does, and code that does more +than the prose says. Phase 3 is bidirectional truth-up across both. Phase 4 (traceability) is the +adjacent theme: a load-bearing constant with no source, and a test that pins the code's own prior output +instead of an independent reference. + +Ground state, verified against the tree before planning (the §5c lesson: a claim about the tree is only +as good as the search behind it): + +| Item | State | Anchor | +|---|---|---| +| 16 — doc-overclaims | OPEN, ~86 actionable rows; a minority closed by Phases 1–2 | `ACTION-LIST.md` (86 `doc-overclaim` rows); `blended.rs` fold, `boundary_zone` hook, `penalization_heat_integral` closed | +| 17 — DEC kernel + spectral comments | OPEN | `dec_ns_rate.rs:7,35` vs code `:621-652`; `projection.rs:157,169` vs `:158-163`; `mod.rs:21-26` vs `step.rs:6-13` | +| 18 — doc-gaps | OPEN; types exist with rustdoc, absent from README | `DuctMarchRun` `duct_march_run.rs:56`; `IgnitionCorridor` `throttle_guidance.rs:107`; `AcousticCoreInverse` `acoustic_inverse.rs:52`; resume `state_snapshot.rs` | +| 19 — RAM-C consistency | **DONE** (Phase 1) | `README.md:224`, `verification/README.md:127` both order-of-magnitude | +| 20 — lid-cavity row | **DONE** (Phase 1) | `verification/README.md:90,213` report the 65² default, RMSE 0.0617 | +| 21 — convergence qualification | OPEN | "clean 2nd-order" unqualified `qtt_taylor_green_verification/README.md:52`; temporal floor undocumented | +| 22 — `Gates` | OPEN, decision item | `Gates::new` only in `gates_tests.rs`; live code uses `GateSeq`/`Verdict`; sole `println!` in `src/`; empty `finish()`→true | +| 23 — constant provenance | PARTIAL; cylinder `ETA` DONE | `SMOOTH_CELLS=2.0` (2 sites, no source); park2t `ETA=0.016` no source; Mach-1.05 no justification; no penalization PDF | +| 24 — change-detector / QTT convection test | OPEN, needs new test | no test drives `rate_pair` with `u,v≠0`; TG harness re-assembles via `gradient_*` not `rate_pair` | + +Items 19, 20, and the cylinder site of 23 are already delivered. They are re-verified here and captured +in the spec so they cannot silently rot, but they are not re-implemented. + +## Goals / Non-Goals + +**Goals:** + +- Every doc-overclaim in the ACTION-LIST catalogue reconciled: the prose describes the code, or marks + intent as intent. +- Every kernel docstring and comment names the operator the code marches; no comment contradicts the code + beneath it. +- Every load-bearing public capability documented where a user looks for it. +- Every convergence claim states the order it holds in and the regime it holds over. +- Every load-bearing constant carries a source, its units, and a `papers/` entry where a publication + backs it. +- One load-bearing test references an independent truth: the shipped QTT convection path exercised with + `u,v ≠ 0` against an analytic reference. +- `Gates` resolved per the owner's decision. + +**Non-Goals:** + +- **Any change to a marcher, kernel, or gate bound.** The behaviour is confirmed correct; this change + corrects the prose, constants, and tests that describe it. `Gates::finish()` refusing an empty set and + the new convection test are the only code touched, and neither changes a marched number. +- **The physics-math and magic-number *value* corrections.** Those were Phase 2 (`REDUCED_MASS_AMU`, + the pressure floor, the mask clamp). This change traces the *provenance* of constants whose values + stand, not their values. +- **Replacing every `[tripwire]` gate with a reference gate.** A back-fitted bound is legitimate when + disclosed and labelled (§7); Phase 1 labelled them. This change converts a tripwire to a reference gate + only where an independent reference exists — the QTT convection path is the concrete one — and leaves + the honestly-labelled regression tripwires as they are. +- **The tautology-circular gate theme.** Owned by `verification-gate-integrity` (Phase 1); not reopened. + +## Decisions + +### D1 — Two cross-cutting capabilities, not edits threaded through every behavioural spec + +The doc-overclaims sit across many capabilities — `dec-ns-rate`, `qtt-surface-observables`, +`boundary-zone-abstraction`, and more — whose behaviour is confirmed correct and unchanged. Two new +cross-cutting capabilities own the discipline: `documentation-code-parity` (Phase 3) and +`constant-and-test-traceability` (Phase 4). + +*Why:* it is the pattern Phase 1 used. `verification-gate-integrity` owns the gate repairs across +`studies/` and `examples/` that no behavioural spec mandates, rather than editing each behavioural spec to +say "and its gate must bite". Prose parity and constant provenance are the same shape of cross-cutting +contract. Threading a prose edit through `dec-ns-rate`'s behavioural spec would imply the behaviour +changed; it does not. + +### D2 — Work the catalogue, record the true count; disprove each claim before rewriting it + +The unit of work is the ACTION-LIST row, not the audit's headline number. "87" is 86 actionable rows and +91 raw occurrences; "39" is the doc-gap category total, a mix of README sections and docstring gaps. The +change reconciles the catalogue and records the count it actually closed. + +*Why:* the §5c lessons apply directly. Lesson 1 — a "by construction" claim may be false, not merely +unchecked (B-4 was: 275 configurations folded). So each overclaim is checked against the code before its +prose is rewritten. If a claim is false *and* the property it asserts is unenforced, that is a +Phase-2-class correctness finding, not a doc edit — it is escalated and recorded, not papered over by +softening the prose. Rewriting prose to match broken code would bury a defect under honest-sounding +words. + +### D3 — Truth-up is bidirectional + +Item 16 corrects prose that claims more than the code delivers. Item 18 documents code that delivers more +than the prose admits. Both are in scope and both are "make the document tell the truth about the code". + +*Why:* the audit's own Phase 3 title is "Documentation truth-up (bidirectional)". A doc-gap +(`AcousticCoreInverse` shipping unmentioned in the README) misleads as surely as an overclaim — a reader +concludes the capability is absent. Ship-more-than-you-say is the safer direction but still a parity +defect. + +### D4 — `Gates` is the owner's decision; the default path deletes nothing + +Item 22 is a decision, not a mechanical fix, and one arm of it — retirement — is a deletion. The golden +rule holds: no deletion without owner approval. + +The options: + +**(a) Adopt `Gates`** across the self-verifying programs so the README's claim becomes true and the type +earns its export. Cost: every program migrates from `GateSeq`/`Verdict` to `Gates`, and `Gates` gains the +`EvidenceClass` labelling Phase 1 built into the live path — otherwise adoption would regress the +evidence-class discipline. + +**(b) Retire `Gates`** — remove the dead type and its five `println!`, the sole `println!` in `src/`. +Cost: a deletion, so owner approval; and the README/`flight_envelope_placard` prose that names `Gates` +must move to `GateSeq`. + +Independent of (a)/(b), and taken now: correct the README to name the type the programs use, and make +`Gates::finish()` refuse an empty gate set (it returns success for one today — a gate harness that +registered nothing should not report pass). These are non-deleting and true under either resolution. + +*Recommendation:* retire. `GateSeq` is what the crate uses, carries the evidence-class labelling, and is +the live contract; `Gates` is a parallel API that has never been exercised outside its own test. But that +is a deletion, so it waits on the owner. The change lands the non-deleting corrections and records the +decision as open. + +### D5 — Constant provenance follows the crate's paper convention; orphans are indexed, not deleted + +A load-bearing constant gets a source, its units, and — where a publication fixes it — the PDF in +`papers/` with a full author-year citation at the definition, the convention the crate already follows +for Kirkpatrick (2003) and Dröge & Verstappen (2005). The penalization method the immersed-body harness +rests on gets Angot / Bruneau & Fabrie (1999) added to `papers/` and cited from the harness. + +Two PDFs in `papers/` — `mittal2005.pdf`, `mohamed2016.pdf` — are cited by author name nowhere in the +crate. They are either the sources for constants this change is tracing (in which case they get cited) or +orphans. Removing an orphan PDF is a deletion and waits on the owner; the default is to index `papers/` +(a short README mapping each PDF to what cites it) so an orphan is visible rather than silently carried. + +### D6 — The test references an independent truth, through the public API, and the harness calls the shipped path + +Item 24 has two halves. The new test drives `rate_pair` with `u,v ≠ 0` against an analytic convection +reference chosen so the projection does not annihilate it — the reason the existing tests are blind is +that Taylor–Green's convection is a pure gradient the projection removes. The harness re-route points the +Taylor–Green convection check at the shipped `rate_pair` instead of a `gradient_x`/`gradient_y` +re-assembly. + +*Why:* the standing rule from §5c — no test may assert on source text; behavioural coverage through the +public API only, verified under `bazel test //...` (the sandbox that caught the `include_str!` regression +`cargo test` hid). And the gate-BM-A lesson — a gate that re-implements the code it checks verifies the +copy, not the code; the harness must call the shipped convection, not a look-alike. + +### D7 — Run the adversarial pass over the finished diff + +Every Phase-2 change found its own overclaims when a refute-by-default review was run over the completed +diff — a correctness gap in one, a cluster of doc/spec overclaims in each. A documentation truth-up change +is the most exposed to this failure of all: its deliverable *is* prose, and prose claiming "all +reconciled" is itself an overclaim if a catalogue row was missed. The finished diff gets the same +multi-dimension refute-by-default review, and its residue is recorded honestly — "N reconciled, M +deferred", never "clean". + +## Risks / Trade-offs + +- **The change's own prose overclaims.** → D7. The one deliverable most able to claim more than it did is + a truth-up change. The count is recorded from the catalogue, not asserted; the adversarial pass is + mandatory; a deferred tail is stated, not hidden. +- **Reconciling an overclaim surfaces a real defect.** → D2. If a "by construction" claim is false and + unenforced, it is escalated as a correctness finding, not softened into honest-sounding prose. This is + the good outcome — it is what caught B-4 — but it means the change may spawn a small Phase-2-style + follow-up rather than close cleanly. +- **High count, low individual risk, easy to leave a tail.** → Work the catalogue row by row and record + the closed count against it; the completeness is checkable against the ACTION-LIST, not against memory. +- **The analytic reference for `rate_pair` is annihilated by the projection.** → D6. The reference is + chosen pre-projection (a convection field whose gradient is not pure), which is the specific reason the + existing tests miss the shipped path. +- **`Gates` and orphan-PDF deletions.** → D4, D5. Deletions wait on the owner; the change lands only the + non-deleting corrections unless directed otherwise. + +## Migration Plan + +No runtime migration; `publish = false`, no downstream consumers, no marched number moves. + +1. **Doc-overclaim reconciliation** (items 16, 17, 21) — independent prose edits, each revertible; work + the ACTION-LIST catalogue, escalating any false-and-unenforced claim per D2. +2. **Doc-gap closure** (item 18) — document the undocumented capabilities in the README. +3. **Constant provenance** (item 23) — sources, units, the penalization PDF, the `papers/` index. +4. **The convection test and harness re-route** (item 24) — the only behavioural work; verified under + `bazel test //...`. +5. **`Gates`** (item 22) — land the non-deleting corrections; surface the adopt/retire decision to the + owner. +6. **Re-verify** items 19, 20, and the cylinder `ETA` are still correct (Phases 1–2 delivered them). +7. **Adversarial pass** over the finished diff (D7); record the residue. + +## Open Questions + +- **Adopt or retire `Gates`?** Owner decision (D4). Recommendation: retire, since `GateSeq` is the live + contract — but retirement is a deletion. +- **The orphan PDFs (`mittal2005`, `mohamed2016`) — cite, index, or remove?** Owner decision (D5). + Default: index; removal is a deletion. +- **How many `[tripwire]` gates have an independent reference available to convert?** Unknown until the + gate inventory is surveyed against available references. The QTT convection path is the one this change + commits to; others are recorded, not promised. +- **Does reconciling the doc-overclaim catalogue surface a false-and-unenforced claim** (a B-4 repeat)? + Unknown until each is checked against the code (D2). If it does, it becomes a follow-up correctness + change, not a silent prose softening. diff --git a/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/proposal.md b/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/proposal.md new file mode 100644 index 000000000..e15bad9a1 --- /dev/null +++ b/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/proposal.md @@ -0,0 +1,148 @@ +# Reconcile the CFD crate's documentation and constant/test traceability + +## Why + +The `deep_causality_cfd` pre-certification audit closed its two correctness phases and left two: Phase 3 +(documentation truth-up) and Phase 4 (traceability). `AUDIT-REPORT.md` §9 items 16–24. Neither gates +correctness — the numerics are confirmed right against every closed-form reference available — but both +are what an engineer reads before trusting the crate, and both are the audit's largest surviving themes +by count: 87 doc-overclaims and 39 doc-gaps (§7). The risk the audit names is precise: an engineer reads +a docstring, a constant, or a green test and concludes something was established that was not. + +This is the final audit change. It folds Phase 3 and Phase 4 into one workstream because they share a +root — a claim the crate makes about itself that nothing checks against an independent source: prose +against the code beneath it, a load-bearing constant against a publication, a test against a reference +other than the code's own prior output. + +**The prose describes intent where the code marches a subset.** The DEC NS rate kernel's public +docstrings state the un-symmetrised convective operator `−i_u(du♭)` +(`src/solvers/dec/dec_ns_rate.rs:7,35`), while the code marches the skew-symmetrised +`½[G_ω u − G*_ω u]` introduced to stabilise it (`dec_ns_rate.rs:621-652`). Two spectral-projector +comments name the compact 5-point Laplacian eigenvalue `−(2−2cos(2πk/N))/Δ²` +(`src/tensor_bridge/projection.rs:157,169`) where the code applies the consistent `sin²(2πk/N)/dx²` +(`:158-163`). The DEC solver's module prose describes a first-order Chorin split (`src/solvers/dec/mod.rs:21-26`) +where the code projects inside each RK4 stage with no splitting error (`dec_ns_solver/step.rs:6-13`). +Each is a doc that would mislead a reader into distrusting correct code, or trusting the wrong reason for +it. + +**Load-bearing constants carry no provenance.** `SMOOTH_CELLS = 2.0` sets the mask width that moves the +reported immersed-cylinder `C_d` by 6.1× (§4b) and carries only "Mask smoothing width in cells." +(`verification/qtt_cylinder_verification/config.rs:44`, and a duplicate at `qtt_park2t_blackout/config.rs:37`). +The Mach-1.05 shock floor (`src/types/flow/compressible_march_run.rs:326-327`) explains its branch but +not the 0.05 buffer above sonic. The `papers/` folder holds four PDFs and none for the penalization +method the immersed-body harness rests on — Angot / Bruneau & Fabrie (1999) is cited in harness text only +(`verification/qtt_cylinder_verification/print_utils.rs:122`). + +**Load-bearing tests reference the code's own output, not an independent truth.** No test drives the +shipped QTT convection path (`rate_pair`, `src/solvers/qtt/incompressible_2d.rs:105`) with a nonzero +velocity: the two `scalar_rate` unit tests pass `u = v = 0`, and the full-solver Taylor–Green test drives +convection but the projection annihilates it, so a sign flip in the shipped convection would be invisible. +The Taylor–Green verification harness does check convection with `u,v ≠ 0` — but it re-assembles the +operator from `gradient_x`/`gradient_y` rather than calling the shipped `rate_pair`, so it gates a copy +(the pattern Phase 2 caught in gate BM-A, §5c). + +**`Gates` is a dead, duplicate API.** It is exported from `lib.rs` and documented as the `[PASS]`/`[FAIL]` +block every self-verifying program prints, yet `Gates::new` is constructed only in its own unit test — +every shipped program uses `GateSeq` or `Verdict`'s `Display` (`Gates` finding, §7). It holds the only +five `println!` in `src/` (`src/types/flow/gates.rs:44-58`), and `Gates::finish()` returns success for an +empty gate set. + +## What Changes + +- **Reconcile the doc-overclaims against the code.** Where prose describes intent, mark it intent; where + it asserts a property "by construction" that no check enforces, describe what the code does. Work the + ACTION-LIST catalogue (86 actionable `doc-overclaim` rows), not a round number — the audit's "87" is a + category estimate. A minority are already closed by Phases 1–2 (the `blended.rs` fold claim by B-4, the + `boundary_zone` hook by item 15, the `penalization_heat_integral` rename by item 11) and are excluded. +- **Correct the DEC kernel and spectral-projector docs** to name the operator the code marches: the + skew-symmetrised convective term, the consistent `sin²` projector eigenvalue, and the in-stage (no + splitting) projection. +- **Document the undocumented capabilities** the audit lists as absent from the crate README — + `DuctMarchRun`, `IgnitionCorridor`, snapshot/resume, `AcousticCoreInverse`, and the rest of the doc-gap + catalogue — where a user looks for them, not only in rustdoc where they already exist. +- **Qualify the convergence claim.** State the QTT Taylor–Green order as second-order in space, + first-order in time, and document the ladder's temporal-error floor (~1e-5 at fixed `dt`) and maximum + usable length. +- **Resolve `Gates`** (owner decision, item 22): adopt it across the self-verifying programs so the + README's claim becomes true, or retire it. Retirement is a deletion and needs owner approval. Until it + is resolved, correct the README to name the type the programs use and make `Gates::finish()` refuse an + empty gate set. +- **Give every load-bearing constant a source, units, and — where a publication backs it — a `papers/` + entry.** `SMOOTH_CELLS`, the `qtt_park2t_blackout` `ETA`, and the Mach-1.05 floor gain provenance; the + penalization reference (Angot / Bruneau & Fabrie 1999) is added to `papers/` and cited from the harness. +- **Give a load-bearing test an independent reference.** Add a test that drives the shipped `rate_pair` + convection path with `u,v ≠ 0` against an analytic reference, and route the Taylor–Green harness's + convection check through the shipped path rather than a re-assembly. + +Explicitly **not** in scope: any change to a marcher, kernel, or gate *bound* — this change corrects prose, +constant provenance, and test references, and adds one behavioural test; it does not alter what the code +computes. The three items Phases 1–2 already delivered are excluded and re-verified, not re-done: the +RAM-C order-of-magnitude framing (item 19), the lid-cavity 65²-default summary row (item 20), and the +cylinder `ETA` re-derivation (item 23, cylinder site). + +## Capabilities + +### New Capabilities + +- `documentation-code-parity`: the cross-cutting contract that the crate's prose describes the code that + ships — a kernel docstring names the operator the kernel marches, a comment does not contradict the + code beneath it, a "by construction" claim names an enforcing check or is marked as intent, every + load-bearing public capability is documented where a user looks for it, a convergence claim states its + order and regime, and the crate ships no dead duplicate gate API. This capability owns the doc-overclaim + and doc-gap repairs across `src/`, the READMEs, `verification/`, and `studies/` that no behavioural spec + mandates, mirroring how `verification-gate-integrity` owns the gate repairs. +- `constant-and-test-traceability`: the contract that a load-bearing constant carries a source, its units, + and a `papers/` entry where a publication backs it, and that a load-bearing test references an + independent truth rather than a value pinned from the code's own prior output. + +### Modified Capabilities + +None. The doc-overclaims sit across many behavioural capabilities whose *behaviour* is confirmed correct +and unchanged — this change corrects the prose, constants, and tests that describe that behaviour, not the +behaviour. Threading the edits through every existing spec would sprawl the change across dozens of specs +for prose that no single one owns; two cross-cutting capabilities own it instead, as Phase 1 did for the +gate theme. + +## Impact + +**Docs / prose (the bulk — mechanical, low-risk)** +- `deep_causality_cfd/src/solvers/dec/{dec_ns_rate.rs,mod.rs}`, `src/theories/incompressible_dec.rs` — the + convective-operator docstrings (item 17a) and the Chorin/in-stage contradiction (`mod.rs:21-26`). +- `deep_causality_cfd/src/tensor_bridge/projection.rs:157,169` — the two spectral-projector comments (item 17b). +- `deep_causality_cfd/README.md` and per-module docstrings — the ~86 ACTION-LIST doc-overclaim rows + (item 16) and the doc-gap capability sections (item 18: `DuctMarchRun`, `IgnitionCorridor`, + snapshot/resume, `AcousticCoreInverse`, …). +- `deep_causality_cfd/verification/qtt_taylor_green_verification/{README.md,print_utils.rs}`, + `verification/README.md` — the convergence-order qualification and the temporal floor/max-length note + (item 21). + +**Constants / traceability** +- `verification/qtt_cylinder_verification/config.rs`, `verification/qtt_park2t_blackout/config.rs` — + `SMOOTH_CELLS` provenance (item 23a). +- `src/types/flow/compressible_march_run.rs:326-327` — the Mach-1.05 floor justification (item 23c). +- `deep_causality_cfd/papers/` — add the Angot / Bruneau & Fabrie (1999) penalization reference; cite it + from the immersed-body harness (item 23d). Note the two orphan PDFs (`mittal2005.pdf`, `mohamed2016.pdf`, + cited by author name nowhere) — index or cite, do not delete without owner approval. + +**Code (small, and one new test)** +- `deep_causality_cfd/src/types/flow/gates.rs` — `Gates::finish()` refuses an empty set; adoption or + retirement per the owner's item-22 decision. +- `deep_causality_cfd/tests/solvers/qtt/incompressible_2d_tests.rs` — a new behavioural test driving + `rate_pair` with `u,v ≠ 0` against an analytic reference (item 24). Public-API behavioural only — no + source-text scraping, per the standing rule (§5c). +- `verification/qtt_taylor_green_verification/main.rs` — route the convection check through the shipped + `rate_pair` rather than a `gradient_x`/`gradient_y` re-assembly (item 24). + +**Evidence** +- No example figure moves — this change touches no marcher, kernel, or gate bound. The one behavioural + addition (item 24) is a new test, verified by `bazel test //...`; the harness re-route (item 24) is + checked to leave the harness's reported convection error unchanged. + +**Risk** +- **Deletion sensitivities.** Retiring `Gates` (item 22) and removing an orphan PDF (item 23) are + deletions; both are owner decisions and neither is taken without approval. The change proceeds on the + no-deletion path (correct the README, adopt or defer) unless the owner directs otherwise. +- **The audit's counts are estimates, not manifests.** "87 doc-overclaims" is 86 actionable rows in the + ACTION-LIST and 91 raw occurrences across the module reports; "39 undocumented capabilities" is the + doc-gap category total, a mix of README capability sections and scattered docstring gaps. The change + works the catalogue and records the true count it reconciled, rather than asserting a round number. diff --git a/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/specs/constant-and-test-traceability/spec.md b/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/specs/constant-and-test-traceability/spec.md new file mode 100644 index 000000000..4aaf97172 --- /dev/null +++ b/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/specs/constant-and-test-traceability/spec.md @@ -0,0 +1,61 @@ +## ADDED Requirements + +### Requirement: A load-bearing constant carries a source, its units, and a papers entry + +A load-bearing constant SHALL carry, at its definition, a source, its units, and — where a publication +fixes its value — a `papers/` entry with a full author-year citation. A constant is load-bearing when the +reported result depends materially on its value; such a constant SHALL NOT stand as a bare literal with no +provenance. + +The mask-smoothing width `SMOOTH_CELLS = 2.0` moves the reported immersed-cylinder `C_d` by 6.1× +(`AUDIT-REPORT.md` §4b) and carries only "Mask smoothing width in cells." at both definitions +(`verification/qtt_cylinder_verification/config.rs:44`, `qtt_park2t_blackout/config.rs:37`). The +`qtt_park2t_blackout` `ETA = 0.016` (`config.rs:31`) carries no source, while the cylinder site +(`qtt_cylinder_verification/config.rs:32-38`) already carries a wall-error-target derivation from +`close-qtt-solver-envelope`. The Mach-1.05 shock floor +(`src/types/flow/compressible_march_run.rs:326-327`) explains its branch but not the 0.05 buffer above +sonic. The `papers/` folder holds no penalization reference; Angot / Bruneau & Fabrie (1999) is cited in +harness text only (`verification/qtt_cylinder_verification/print_utils.rs:122`). + +#### Scenario: A load-bearing constant states its source and units at the definition + +- **WHEN** a reviewer reads a load-bearing constant's definition +- **THEN** its source, units, and — where a publication backs it — a `papers/` citation are present there + +#### Scenario: The penalization method is cited from a papers entry + +- **WHEN** the immersed-body penalization method is described in the harness +- **THEN** its reference (Angot / Bruneau & Fabrie 1999) is present in `papers/` and cited at the site, not + named in text alone + +#### Scenario: Every papers PDF is accounted for + +- **WHEN** the `papers/` folder is inventoried +- **THEN** each PDF is cited by author-year from the code it supports, or is flagged for the owner — none + is removed without owner approval + +### Requirement: A load-bearing test references an independent truth + +A load-bearing test SHALL check the shipped code path against a reference derived independently of that +path — an analytic solution, a published value, or a hand-derivation — not against a value pinned from the +code's own prior output, and not against a re-implementation of the code under test. The shipped path SHALL +be the path the test drives. + +No test drives the shipped QTT convection path `rate_pair` (`src/solvers/qtt/incompressible_2d.rs:105`) +with a nonzero velocity: the two `scalar_rate` unit tests pass `u = v = 0`, and the full-solver +Taylor–Green test's convection is a pure gradient the projection annihilates, so a sign flip in the shipped +convection is invisible. The Taylor–Green verification harness checks convection with `u,v ≠ 0` but +re-assembles the operator from `gradient_x`/`gradient_y` (`verification/qtt_taylor_green_verification/main.rs:83-126`) +rather than calling `rate_pair`, so it gates a copy. + +#### Scenario: The shipped convection path is exercised with a nonzero velocity + +- **WHEN** the QTT convection path is tested +- **THEN** a test drives the shipped `rate_pair` with `u,v ≠ 0` against an analytic reference the + projection does not annihilate, and the test fails under a sign flip in the shipped convection + +#### Scenario: A gate drives the shipped path, not a re-implementation + +- **WHEN** the Taylor–Green harness checks the convection operator +- **THEN** it routes the check through the shipped `rate_pair`, not a `gradient_x`/`gradient_y` re-assembly, + and its reported convection error is unchanged by the re-route diff --git a/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/specs/documentation-code-parity/spec.md b/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/specs/documentation-code-parity/spec.md new file mode 100644 index 000000000..ceae4135e --- /dev/null +++ b/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/specs/documentation-code-parity/spec.md @@ -0,0 +1,152 @@ +## ADDED Requirements + +### Requirement: A kernel docstring names the operator the kernel marches + +A kernel's public docstring SHALL describe the operator the code actually evaluates, not an earlier or +intended form of it. Where the shipped operator differs from a textbook or historical form — because it +was stabilised, symmetrised, or otherwise transformed — the docstring SHALL name the shipped form and may +cite the change that introduced it. + +The DEC Navier–Stokes rate kernel marches the skew-symmetrised convective operator +`conv' = ½[G_ω u − G*_ω u]` (`src/solvers/dec/dec_ns_rate.rs:621-652`), introduced to stabilise the +un-symmetrised advection. Its public docstrings still state `−i_u(du♭)` (`dec_ns_rate.rs:7,35,457`, +`src/solvers/dec/mod.rs:11-12,29-30`, `src/theories/incompressible_dec.rs:44`). The code is correct; the +prose describes a different operator. + +#### Scenario: The convective docstring matches the marched operator + +- **WHEN** the DEC rate kernel's module, type, and method docstrings are read against the implementation +- **THEN** the convective term they state is the skew-symmetrised operator the code evaluates, and the + stabilisation that introduced it is cited + +#### Scenario: A reader is not sent to distrust correct code + +- **WHEN** a reader compares any kernel docstring to the operator the kernel marches +- **THEN** the two agree, so the reader has no false discrepancy to resolve + +### Requirement: A comment does not contradict the code beneath it + +A comment SHALL describe the code it annotates. A comment that states a different formula, eigenvalue, +sign, or algorithm than the code below it SHALL be corrected to match the code, where the code is +confirmed correct. + +Two spectral-projector comments name the compact 5-point Laplacian eigenvalue `−(2−2cos(2πk/N))/Δ²` and a +sign/form the code does not use (`src/tensor_bridge/projection.rs:157,169`), while the code applies the +consistent `sin²(2πk/N)/dx²` (`:158-163`). The DEC solver's module prose describes a first-order Chorin +split (`src/solvers/dec/mod.rs:21-26`) where the code projects inside each RK4 stage with no splitting +error (`dec_ns_solver/step.rs:6-13`). + +#### Scenario: The spectral-projector comments match the applied eigenvalue + +- **WHEN** the projection comments are read against the operator the code applies +- **THEN** they describe `sin²(2πk/N)/dx²` and the sign the code uses, not the compact 5-point form + +#### Scenario: The projection-placement prose matches the code + +- **WHEN** the DEC solver's projection-placement prose is read against the step implementation +- **THEN** it describes the in-stage projection the code performs, not a first-order Chorin split + +### Requirement: Prose describes the shipped code, not the intended design + +Documentation prose SHALL describe what the code does. Where prose describes an intended design the code +implements only in part, it SHALL be marked as intent or corrected to the implemented subset. A prose +claim that a property holds "by construction" SHALL name the check that enforces it or be reconciled — and +where the property is both asserted and unenforced, the discrepancy SHALL be raised as a correctness +finding rather than resolved by softening the prose. + +The audit catalogues ~86 actionable `doc-overclaim` rows in `../../../../../audits/cfd_audit/ACTION-LIST.md`. A +minority are already closed by Phases 1–2 (the `blended.rs` fold claim, the `boundary_zone` hook, the +`penalization_heat_integral` rename); the remainder are reconciled here. + +#### Scenario: A "by construction" claim names its check or is marked intent + +- **WHEN** a doc asserts a property holds "by construction" +- **THEN** the doc names the check that enforces it, or the claim is marked as intended design, or — + where the property is unenforced and the claim is false — it is raised as a correctness finding + +#### Scenario: The catalogue is reconciled and the count recorded + +- **WHEN** the `doc-overclaim` catalogue is worked +- **THEN** each surviving row is reconciled against the code, and the count reconciled and the count + escalated are recorded against the catalogue so completeness is checkable + +### Requirement: Every load-bearing public capability is documented where a user looks for it + +A shipped public capability SHALL be documented where a user discovers capabilities — the crate README and +architecture docs — not only in rustdoc. A capability present in the code and absent from the user-facing +documentation misleads a reader into concluding it does not exist. + +The audit lists capabilities present with rustdoc but absent from the crate README: `DuctMarchRun` +(`src/types/flow/duct_march_run.rs:56`), `IgnitionCorridor` (`src/types/flow/throttle_guidance.rs:107`), +snapshot/resume (`src/types/flow/state_snapshot.rs`), and `AcousticCoreInverse`/`2d`/`3d` +(`src/tensor_bridge/acoustic_inverse.rs:52,175,249`), among the `doc-gap` category. + +#### Scenario: A shipped capability appears in the user-facing documentation + +- **WHEN** a user reads the crate README for the capabilities the crate provides +- **THEN** the load-bearing public capabilities appear there, not only in rustdoc + +### Requirement: A convergence claim states the order it holds in and the regime it holds over + +A convergence claim SHALL state the order it holds in each independent variable and the regime over which +it holds. A claim of "n-th order convergence" that is n-th order in space and a lower order in time SHALL +state both, and SHALL document any error floor and the maximum problem size over which the order is +observed. + +The QTT Taylor–Green harness reports "clean 2nd-order convergence" +(`verification/qtt_taylor_green_verification/README.md:52`, `print_utils.rs:141`, `verification/README.md:297`) +without qualifying it as second-order in space and first-order in time, and without documenting the +temporal-error floor (~1e-5 at fixed `dt`) or the ladder's maximum usable length. + +#### Scenario: The Taylor–Green order claim is qualified + +- **WHEN** the QTT Taylor–Green convergence claim is read +- **THEN** it states second-order in space and first-order in time, and documents the measured temporal + floor and the maximum usable ladder length + +### Requirement: Headline accuracy claims are consistent across the documents that state them + +An accuracy claim stated in more than one document SHALL use the same framing in each. A validation claim +SHALL name what it validates against and at what fidelity, and SHALL NOT read as a stronger claim in one +document than in another. + +This requirement is satisfied by Phases 1–2 for the two claims the audit flagged — the RAM-C anchor is +framed as order-of-magnitude in both the crate README (`README.md:224`) and the verification README +(`verification/README.md:127`), and the lid-cavity summary row reports the 65² default (RMSE 0.0617, +`verification/README.md:90`). It is captured here so a regression is caught rather than silently +reintroduced. + +#### Scenario: The RAM-C claim reads the same in both READMEs + +- **WHEN** the RAM-C anchor claim is read in the crate README and the verification README +- **THEN** both frame it as an order-of-magnitude prediction naming the ±0.70-decade pinned band, neither + as a per-point accuracy claim + +#### Scenario: A quantitative summary row reports the configuration it measures + +- **WHEN** a summary row reports a measured accuracy figure +- **THEN** it names the configuration that produced it, and that configuration is the default the reader + would run + +### Requirement: The crate ships no dead, duplicate gate API + +A public API exported as the mechanism a program uses SHALL be the mechanism that program uses, or SHALL +be retired. A gate-reporting type documented as the block every self-verifying program prints, but +constructed by none of them, SHALL be adopted across those programs or removed, and a gate harness SHALL +NOT report success for an empty gate set. + +`Gates` is exported from `lib.rs` and documented as the `[PASS]`/`[FAIL]` block every self-verifying +program prints, yet `Gates::new` is constructed only in its own unit test — the programs use `GateSeq` or +`Verdict`'s `Display`. It holds the only five `println!` in `src/` (`src/types/flow/gates.rs:44-58`), and +`Gates::finish()` returns success for an empty gate set. Retiring `Gates` is a deletion and requires owner +approval; the non-deleting corrections are unconditional. + +#### Scenario: The empty gate set does not report success + +- **WHEN** a gate harness finishes having registered no gate +- **THEN** it does not report pass + +#### Scenario: Documentation names the gate mechanism the programs use + +- **WHEN** a document describes how a self-verifying program reports its gates +- **THEN** it names the type the program actually uses, not a parallel API no program constructs diff --git a/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/tasks.md b/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/tasks.md new file mode 100644 index 000000000..51f2d4798 --- /dev/null +++ b/openspec/changes/archive/2026-07-26-reconcile-cfd-docs-and-traceability/tasks.md @@ -0,0 +1,251 @@ +## 1. Reconcile the DEC kernel and spectral-projector docs (item 17) + +Concrete, high-value, and self-contained — the code is confirmed correct, so every edit here is prose +describing the operator the code already marches. + +- [x] 1.1 Corrected the DEC NS rate kernel docstrings to the skew-symmetrized `conv' = ½[G_ω u − G*_ω u]` + (with `G_ω : x ↦ i_x du♭`, `G*_ω` its M-adjoint), citing the fix-dec-convective-instability change: + module doc + type doc + `eval_projected` doc + `eval_unprojected` doc + the `energy_budget` comment in + `dec_ns_rate.rs`; the governing block, the placement paragraph, and the module-layout line in + `src/solvers/dec/mod.rs`; and the `rate` docstring in `src/theories/incompressible_dec.rs`. **Found + against the tree:** `eval_unprojected` also marches the skew form (`convective_skew_generic`), so the + raw `−i_u(du♭)` is not a marched or exposed surface; the docstrings that named it were all wrong, not + only the projected ones. +- [x] 1.2 Corrected both spectral-projector comments in `src/tensor_bridge/projection.rs`: the eigenvalue + comment now names the consistent `−sin²(2πk/N)/dx²` the code applies (was the compact 5-point + `−(2−2cos)/Δ²`, which also contradicted the correct comment three lines above), and the solve comment + now reads `p̂ = rhs/λ = −rhs/(lamx+lamy)`, matching `inv = 1/λ` (was `rhs/(−λ)`, the wrong sign). +- [x] 1.3 Corrected `src/solvers/dec/mod.rs`: the placement paragraph now describes the in-stage projection + (`P∘rhs` per `Rk4` stage, no splitting error), replacing the "Chorin placement / first order in time" + prose. **Confirmed against the code first** (step.rs:65-69 runs `Rk4` over `eval_projected`; line 47 + states there is no unprojected marching path), so the doc was the misstatement, not the code. +- [x] 1.4 Verified each edit against the implementation, not the prior comment: read + `fill_convective_skew_fused`, `convective_skew_generic`, `eval_unprojected`, and the `step.rs` RK4 + closure. The skew form and in-stage projection are what the code marches. + +## 2. Qualify the convergence claim (item 21) + +- [x] 2.1 Qualified the order claim as **2nd-order in space, 1st-order in time (explicit Euler at fixed + `dt`)** at the printed `render()`/`summary()` in `print_utils.rs`, the TG `README.md`, and + `verification/README.md`; regenerated `baseline.txt` (2 lines changed, gates still PASS). +- [x] 2.2 Documented the temporal floor and the maximum usable ladder length on `DT`/`STEPS` and in both + READMEs, with the signed-error table and the `max_level = 5` cap. + **CORRECTED DURING THE D7 PASS — my first conclusion here was wrong.** I ran the ladder to N=64, + measured `5.9e-6` at observed order `3.16`, and concluded "the audit's ~1e-5 temporal floor is not + observed; still converging at ≥2nd order". That is false, and I shipped it into a source docstring + and two READMEs. My N=128 confirmation run had timed out, and I wrote the conclusion without it. + The audit's module report had already re-derived the truth, and I re-derived it independently in + closed form: the signed error runs `+9.8e-4, +2.4e-4, +5.3e-5, +5.9e-6, −5.9e-6, −8.8e-6` for + `N = 8…256`. The temporal error has the **opposite sign** to the spatial error, the two **cancel** + near N=64–128, the `3.16` is a **cancellation artifact**, and the order collapses to **0.02** at + N=128 — so the documented `max_level 7` **fails** the order gate. The floor is real (≈1e-5, + asymptotically ≈2e-5); the committed 8²–32² ladder is legitimate precisely *because* it stops + below it. All four sites rewritten to state this. + **Lesson (the audit's own, landing on me): I treated an unfinished measurement as a completed one, + and read a super-convergent order as good news rather than as the classic cancellation signature.** + +## 3. Reconcile the doc-overclaim catalogue (item 16) + +The unit of work is the ACTION-LIST row, not the number. Disprove each claim against the code before +rewriting it (D2): a false *and* unenforced "by construction" claim is a correctness finding, not a doc +edit — escalate it. + +- [x] 3.1 Enumerated the catalogue mechanically (script over `ACTION-LIST.md`): **86 `doc-overclaim` + + 39 `doc-gap` = 125 rows**, grouped by file. Working list kept in the session scratchpad. Confirmed + closed by Phases 1–2 and excluded: 7.1 (`blended.rs` fold / B-4), 8.1 (`boundary_zone` hook / + item 15), 4.14 (`observe.rs` rename / item 11), 1.1 + 12.1 + 1.6 (Phase-1 gates and CI), 10.1 + (`REDUCED_MASS_AMU`), 6.18 + 12.4 (ESKF, item 9), 15.4 (RAM-C framing, item 19). +- [x] 3.2 Worked the rows by file, checking each claim against the code before rewriting. Closed this + session (site → what was wrong): + **DEC/spectral (Group 1):** 9.3 + 16.1 + 16.9 (`dec/mod.rs` Chorin split and symbols), 9.4 + (`dec_ns_rate` convective operator, 6 sites), 9.8 (`eval_projected` documented "infallible" but + returns `Result`; `eval_unprojected` is the infallible one), 7.6 + 4.16 (`projection.rs` eigenvalue + and sign comments). + **Crate README:** 15.14 (χ²·L is *storage*, not runtime — item 10 measured runtime rising far + faster at flat bond), 15.5 (shock-fitting scoped to the descent-schedule case), 11.3 (Knudsen + classifies and logs; no slip/transitional/free-molecular closure exists — verified: `GoverningModel` + has no consumer outside `regime.rs`), 6.3 (`RegimeSwitch`/`aero_gravity_ratio` are public API with + **no call site** in `src/`; the engine does not switch integrators), 15.10 + 10.13 (`regime()` returns + `Option>` with **7** fields, not `&RegimeClass` with 4), 15.15 (corridor block now + byte-matches `output.txt`), 15.2 (Float106 claim caveated as pre-re-baseline), 15.8 (`papers/` row + now points at the index). + **Verification docs:** 15.1 (`CfdFlow::qtt_march` **does not exist**; corrected to `CfdFlow::march` + at 6 sites across 3 READMEs), 4.19 (TG file-layout table assigned responsibilities to the wrong + files), plus the TG gate-1/gate-2 text (order qualification; gate 2 now names the shipped path). + **Other:** 7.9 (acoustic-inverse test pointer "Resolution 6, gate 1" → real test names), 7.15 + (`tensor_bridge` references given in full + serial-per-axis mode layout stated), 14.15 + 15.12 + (`Gates` "never exits or prints" — see 7.3: **resolved by retiring `Gates`**, so the README claim is + now literally true; `src/` holds **0** `println!`). + Also corrected two "flagship" usages to the plasma-blackout example (standing naming preference). +- [x] 3.3 **No B-4 repeat found so far.** Every claim checked this session was a doc that overstated or + misnamed working code, not a false claim over broken code. Two findings worth recording: + **(a)** 6.3's claim was false in the strong sense (no call site at all), fixed by restating the + README, since wiring the switch is a feature, not a doc fix. + **(b)** The audit's own item-21 estimate (~1e-5 temporal floor) was **not reproducible** — see 2.2. +- [x] 3.4 **The catalogue is fully accounted for: 125 of 125 rows.** Counted mechanically against + `ACTION-LIST.md`, not from memory. + **Closed by this change — 116.** Worked in three passes: 22 by hand (the crate README, the DEC + kernel and spectral-projector docs, the `CfdFlow::march` naming); 40 by hand across the rest of + `src/`; 52 by a 13-agent fan-out over `verification/`, `studies/`, `examples/`, `tests/` and the + two sibling crates, each agent owning a disjoint file set; then 2 more (5.7, 5.16) that I had + listed while planning and **left out of the agent assignments** — a bookkeeping miss on my part, + caught by re-running the count rather than by review. + **Confirmed already closed by Phases 1–2 — 9:** 1.1, 1.6, 4.14, 6.9, 6.18, 7.1, 8.1, 15.4, 15.9. + **Remaining — 0.** + *(Two earlier drafts of this line were wrong and are recorded rather than quietly replaced. The + first claimed "24 of 125 closed / 101 open" here while 9.3 claimed "24 + 6 closed / 101 of 125 + open", which cannot both hold; the D7 pass caught it and re-enumerated to 22. A later statement of + "54 remaining" was also an arithmetic slip: the true figure was 52.)* + Most remaining rows are single-site docstring corrections in `src/solvers/qtt/compressible/`, + `src/solvers/dec/boundary/`, `studies/`, and the example READMEs; a subset (13.9, 8.17, 6.14, 15.7, + 9.5) asks for **code** changes (constructor validation, `Result` returns, re-exports, visibility) + that are outside this change's stated no-code-change scope and should be planned separately. + +## 4. Close the doc-gaps (item 18) + +- [x] 4.1 **Already satisfied before this change — nothing was added.** The crate README's "Selected + Capabilities" section already documents all four: suspend/resume + (`save_resume_state`/`load_resume_state`), `DuctMarchRun`, `IgnitionCorridor` (via + `ThrottleGuidance`), and `AcousticCoreInverse` (2-D/3-D). Verified with `grep -E` against + `README.md:260-270`. + **FINDING (method, recorded per D2):** the pre-implementation reconnaissance reported these as + absent from the README. That negative came from a **malformed grep** — unescaped `|` alternation, + so the shell piped between processes instead of matching alternatives — and the empty result was + read as evidence of absence. This is §5c's lesson landing on this change's own scouting: *a claim + resting on "X does not exist" is only as good as the search behind it, and the search must be + stated so it can be checked.* An earlier draft of this task recorded the section as added by this + change; that was an overclaim and is corrected here. +- [x] 4.2 **All 39 doc-gap rows closed** (37 by this change, 2 already closed by Phases 1–2: 6.18 and + 15.9). The work ran from units and conventions in `src/` (the `BodyForceZone` acceleration line + integral, the `relax_length` fraction, the `coupling.rs` stage-ordering and stale-read rule, the + `marcher_3d_fitted` periodic-`ζ` boundary caveat, the projection's Nyquist kernel) out to the + harness and study documentation (five missing per-example sections in `verification/README.md` + with their gate predicates read from source, corrected file-layout tables, the `papers/` index). + Counted against the catalogue, not asserted. + +## 5. Give load-bearing constants provenance (item 23) + +Follow the crate's paper convention (full author-year citation at the definition, PDF in `papers/`). + +- [x] 5.1 Added provenance to `SMOOTH_CELLS = 2.0` at both sites: numerical mask-regularization width + (`tanh` over `SMOOTH_CELLS·dx`), not a physical constant and no external source; the 6.1× `C_d` + sensitivity (§5b) and the resolved-envelope caveat are stated. +- [x] 5.2 Added provenance to `qtt_park2t_blackout` `ETA = 0.016`: pinned by the explicit-stability + ratio `dt/η = 0.25`, not a wall-error target; this harness gates the LER ionization criteria, not + drag, so the layer resolution is not a gated lever here (cross-references the cylinder derivation). +- [x] 5.3 Justified the Mach-1.05 floor: a 5% buffer above sonic; a 1-D normal shock is not the model in + the transonic sliver `M ∈ (1, 1.05]`, where the jump is within a few percent of the identity. A + modeling guard, not a measured constant. +- [x] 5.4 Added the full Angot / Bruneau & Fabrie (1999) citation to the cylinder config docstring (was + text-only in `print_utils.rs`). **BLOCKED (owner):** the PDF file itself cannot be fetched here; + the `papers/` index records it as cited-but-missing for the owner to add. +- [x] 5.5 Created `deep_causality_cfd/papers/README.md` mapping each PDF to its citing code. Flagged the + two orphans (`mittal2005.pdf`, `mohamed2016.pdf`, cited by author name nowhere) for the owner to + confirm-and-cite or remove. **No PDF deleted** (golden rule). + +## 6. Give a load-bearing test an independent reference (item 24) + +Public-API behavioural only — no source-text scraping (§5c standing rule). Verified under `bazel test //...`. + +- [x] 6.1 Added `rate_pair_convection_matches_the_analytic_reference_with_nonzero_velocity` to + `incompressible_2d_tests.rs`: drives `rate_pair` with `u = sin(x)`, `v = sin(y)` (both nonzero) on + 64², comparing against the hand-derived `ru = −½sin(2x) − ν·sin(x)`, `rv = −½sin(2y) − ν·sin(y)`; + passes at `max_err ≈ 8e-4 < 3e-3` (bound covers centered-FD truncation). `rate_pair` applies no + projection, so convection survives (unlike the projection-annihilated solver tests). +- [x] 6.2 Demonstrated the bite: flipping the shipped convection sign (`conv.scale(neg)` → + `conv.scale(R::one())`) fails the test at `max_err = 0.999` (≈ 1.0, as predicted), far outside the + bound. Fault injection reverted. +- [x] 6.3 Routed the TG harness convection check through the shipped `rate_pair` (zero-viscosity + instance → pure convection `−(u·∇)u`), deleting the `gradient_x`/`gradient_y` re-assembly and its + now-unused imports. Reported convection error **unchanged** (`3.207e-3`, amp `0.497`), confirming + the re-route is behavior-preserving; `baseline.txt` regenerated. + +## 7. Resolve `Gates` (item 22) + +Owner decision on adopt-vs-retire; the non-deleting corrections land now. + +- [x] 7.1 **Superseded by the retirement (7.3).** The empty-set fix landed first (`finish()` returning + `false` instead of a vacuous `true`), then became moot when the owner approved retiring the type; + the file and its tests are now removed. +- [x] 7.2 Corrected the prose: the `gates.rs` module doc no longer claims `Gates` is "the block every + self-verifying program prints" (it names `GateSeq`/`Verdict` as what the programs use); the + `flight_envelope_placard` README's two `Gates` type references corrected to `GateSeq` (the type + `model.rs:161` returns). The `verification/README.md:237` "Gates" is a verb, left as-is. +- [x] 7.3 **RETIRED — owner decision, 2026-07-26.** `Gates` was a parallel API no shipped program + constructed (`Gates::new` appeared only in its own unit test); `GateSeq`/`Verdict` is the live, + evidence-class-labelled contract. Removed with `git rm`: `src/types/flow/gates.rs` and + `tests/types/flow/gates_tests.rs`, plus the `mod gates;` / `pub use gates::Gates;` wiring in + `types/flow/mod.rs`, the `Gates` re-export in `lib.rs`, and the `pub mod gates_tests;` + registration. + **Consequence worth recording: a doc-overclaim was fixed by correcting the code rather than + weakening the prose.** `Gates` held the only five `println!` in `src/`, which made the crate + README's "the DSL never exits or prints" false (rows 14.15 / 15.12). After the retirement `src/` + contains **0** `println!`, so the README claim is now literally true and needed no softening. + +## 8. Re-verify the items Phases 1–2 already delivered (items 19, 20, 23-cylinder) + +Confirm still-correct; captured in the spec so they cannot silently rot. No re-implementation. + +- [x] 8.1 Item 19 confirmed: RAM-C is order-of-magnitude / ±0.70-decade in both `README.md:224` and + `verification/README.md:127,97`. Unchanged. +- [x] 8.2 Item 20 confirmed: the lid-cavity row reports the 65² default (RMSE 0.0617) at + `verification/README.md:90,213`. Unchanged. +- [x] 8.3 Item 23 (cylinder) confirmed: `ETA = 0.012` carries its wall-error-target provenance + (`qtt_cylinder_verification/config.rs:36-40`). Unchanged. + +## 9. Verify + +- [x] 9.1 `cargo clippy -p deep_causality_cfd -p avionics_examples --all-targets --all-features -D warnings` + clean (exit 0); `cargo fmt` applied; no new `#[allow]`. **`bazel test //...` → 1153/1153 pass** + (the workspace check that matters, per §5c). `bazel test //deep_causality_cfd/...` 15/15 PASSED. + `cargo test -p deep_causality_cfd --release` → **895 passed, 0 failed, 2 ignored** (897 + before, minus the 3 retired `Gates` tests, plus the new `rate_pair` convection test). + `cargo doc -p deep_causality_cfd` introduces **no new** rustdoc warning; the 12 that remain are + pre-existing and are catalogue row 12.6. +- [x] 9.2 **No example figure moved.** The `plasma_blackout_corridor` example reproduces its committed + `output.txt` exactly (diff empty once cargo's stderr build lines and the wall-clock line are + excluded). The TG harness convection error is unchanged at `3.207e-3` (amp `0.497`) after the + `rate_pair` re-route, so the re-route is behaviour-preserving; the only `baseline.txt` movement is + the two Group-2 wording lines. All TG gates PASS. +- [x] 9.3 Counts recorded and **enumerated by ref** in 3.4 and 4.2: **all 125 catalogued rows accounted + for — 116 closed by this change, 9 already closed by Phases 1–2, 0 remaining.** The code arms those + rows offered are recorded as deferred with their reasons. Listing the refs makes the count + recomputable from `ACTION-LIST.md` instead of asserted from memory, which is how three earlier + drafts of this line went wrong (see 3.4). +- [x] 9.4 **Adversarial pass over the finished diff (D7) — run, refute-by-default, over six dimensions: + (1) factual accuracy of every new prose claim, (2) code correctness of the changes, (3) doc–code + parity of the rewritten docstrings, (4) overclaims in this change's own artifacts, (5) regression + risk from the `Gates` removal, (6) completeness and honesty of the task records. Four defects + confirmed, all mine, all fixed:** + + **(a) MAJOR — a wrong conclusion shipped into a source docstring and two READMEs (item 21).** + I concluded the temporal floor "is not observed" and that the ladder was "still converging at ≥2nd + order" at N=64. Both false. The N=128 confirmation run had **timed out** and I wrote the conclusion + anyway. Re-derived in closed form: the temporal error is **opposite in sign** to the spatial error, + they **cancel** near N=64–128 (`+5.9e-6 → −5.9e-6 → −8.8e-6`), the `3.16` is a **cancellation + artifact**, and the order collapses to **0.02** at N=128, so the documented `max_level 7` + **fails** the order gate. All four sites rewritten; the maximum usable ladder length (`max_level = 5`) + is now stated, which is what item 21 actually asked for. See 2.2. + **(b) MAJOR — an unverifiable citation added by a change about removing unverifiable claims.** + The Kazeev–Khoromskij reference: this repository records only author and title, but I wrote year, + venue, volume and pages into a source docstring from recall. Reduced to what the repo confirms, with + the gap stated explicitly in `papers/README.md`. (Peddinti was checked and *is* repo-verified.) + **(c) MODERATE — row 16.9 recorded as closed when it was not.** The governing equation still mixed + an unsubscripted `Δ` with the `Δ_dR` defined beneath it; I had fixed only the convective half. + Now written as `− ν Δ_dR u♭`, the operator the code applies. + **(d) MODERATE — the count in 3.4/9.3 was internally inconsistent** ("24 of 125 / 101 open" vs + "24 + 6 closed / 101 open", which cannot both hold) and was written from memory in the very task + meant to make completeness checkable. Recounted and **enumerated by ref**: 22 closed, 9 already + closed, 94 remaining at the time of that pass. (The tail was closed later in the same change; the + final figure is 116 closed, 9 already closed, 0 remaining.) + + Also checked and **refuted** (no change needed): the `src/` print-macro claim is stronger than + stated (0 `println!`/`eprintln!`/`panic!`/`process::exit`); all four convective call sites do march + the skew form; no dangling `Gates` reference survives; ν = 0 is an explicitly supported + configuration, so the harness re-route is legitimate; the convection test's measured `8.31e-4` + matches the `≈8e-4` claimed. `MIN_ORDER` intra-doc link downgraded to plain text (private item). + + **Residue, stated plainly: 4 defects found and fixed, 94 catalogue rows deferred, and 2 code-arm + items recorded but not taken** (the TG two-sided order gate / `dt ∝ dx²` refinement, and the + `max_level` cap). **Not "clean" — the lesson holds a fifth time.** +- [x] 9.5 `openspec validate reconcile-cfd-docs-and-traceability --strict`: valid. diff --git a/openspec/changes/fix-navigation-filter-correctness/proposal.md b/openspec/changes/fix-navigation-filter-correctness/proposal.md deleted file mode 100644 index 4bc036998..000000000 --- a/openspec/changes/fix-navigation-filter-correctness/proposal.md +++ /dev/null @@ -1,111 +0,0 @@ -# Fix the error-state Kalman filter's correctness defects - -## Why - -The GNSS-denial navigation stack is the crate's estimation layer — the thing that decides how far a -vehicle drifts through a comms blackout and how well it reacquires. Three defects in it are -independent of each other and all three affect what the filter reports. - -**The process noise is not a discretisation of anything.** `NavFilter::predict` takes `dt`, uses it to -propagate the state and build the transition matrix, then adds `Q` with no `dt` factor at all: - -```rust -self.cov = mat_add(&fpft, &diag(&process_noise_diag)); -``` - -Covariance therefore grows with **step count, not elapsed time**. Halving `dt` over a fixed horizon -doubles the accumulated process noise. The supplied diagonal is not a continuous-time spectral density -(`Q_d ≈ Q_c·dt`) nor any other stated discretisation, so the filter's tuning is silently bound to one -step size and any change of `dt` re-tunes the filter as a side effect. - -**The innovation covariance is divided by unguarded.** `update_scalar` computes -`s = h·P·hᵀ + r` and then `k[i] = ph[i] / s` with no positivity check, and it returns `()` — it has no -channel through which to reject. The path is reachable from the public API: `NavFilter::new` accepts an -arbitrary covariance diagonal with no validation, `NavFilter::restore` accepts an arbitrary matrix, and -`ReentryNavEngine::correct_position` passes `r_var` straight through. With `P[i][i] = 0` and -`r_var = 0`, `s = 0`, `k = 0/0 = NaN`, and the NaN is written into both the state and every entry of -the covariance. - -**An error state is zeroed without ever being injected.** `correct_position` runs three sequential -scalar updates on the position axes. Each one shrinks the *whole* covariance through the Joseph form, -including the attitude block, via the position↔attitude cross-covariance — so the filter becomes more -confident about attitude. It then injects only `δp` and `δv` into the nominal and calls -`reset_navigation_error()`, which zeroes position, velocity **and attitude** error. - -The attitude correction is therefore estimated, credited in the covariance, and discarded. And it -cannot be applied: **`ReentryNavEngine` carries no nominal attitude** — its fields are `position`, -`velocity`, `filter`, `tau_offset`, `elapsed` — and `attitude_error` is read nowhere in the crate. In a -correct ESKF, resetting the error state after injection is sound precisely *because* the error was -transferred to the nominal. Zeroing an error that was never transferred discards the estimate while -keeping the covariance reduction it justified, leaving the filter permanently overconfident in -attitude. - -To the code's credit, `update_scalar`'s covariance update is a correct **Joseph form** with -re-symmetrisation, citing Groves (2013) §3.4.3 — the audit confirmed this positively. The defects are -around it, not in it. - -Audit `AUDIT-REPORT.md` §4b and §9 Phase 2 item 9. The navigation module is one of three rated -`not-ready`. - -## What Changes - -- **Give the process noise a stated discretisation.** `Q` becomes a documented continuous-time - spectral density scaled by `dt` (or another explicitly stated and cited discretisation), so - covariance growth tracks elapsed time and the filter's tuning survives a change of step size. - **BREAKING (result-level):** every currently-tuned `q_diag` changes meaning, so the corridor and - weather examples' navigation figures move. -- **Guard the innovation covariance** and validate the inputs that reach it, so a degenerate - measurement cannot poison the state and covariance with `NaN`. -- **Resolve the attitude-error inconsistency**: an error state is injected before it is reset, or it is - not reset. Which of those is achieved is a design decision (see below), but the invariant is the - requirement. -- **Validate filter construction.** `NavFilter::new` and `restore` accept arbitrary covariance today; - a covariance must be at least symmetric and positive-semidefinite to be one. - -Explicitly **not** in scope: the 17-state composition and the transition matrix (the audit confirmed -the skew-symmetric coupling blocks against the standard ESKF form), the Joseph update itself, the -Encke/Cowell integrator switch, the IMU noise model, and the relativistic clock. Those are separate -findings or were confirmed correct. - -## Capabilities - -### New Capabilities - -- `eskf-filter-correctness`: the error-state Kalman filter's numerical and structural contract — the - process-noise discretisation is stated rather than implied, the update is guarded against degenerate - inputs, the covariance is a covariance, and the error-state lifecycle (estimate → inject → reset) is - closed. This capability exists because all three defects share one root: the filter's *contracts* - were never written down, so nothing distinguished a tuned constant from a discretisation, or an - injected error from a discarded one. - -### Modified Capabilities - -None. The navigation stack has no existing capability spec — which is itself part of why these defects -persisted. This change introduces the first one rather than modifying prose that does not exist. - -## Impact - -**Code** -- `deep_causality_cfd/src/navigation/eskf.rs` — `predict` (Q scaling), `update_scalar` (innovation - guard), `new` / `restore` (covariance validation). -- `deep_causality_cfd/src/navigation/reentry_nav.rs` — `correct_position` (the injection/reset gap). -- `deep_causality_cfd/src/navigation/ins_error_state.rs` — `reset_navigation`, which currently zeroes - the attitude block unconditionally. -- Possibly the engine's state: resolving the attitude gap by injection requires a nominal attitude, - which `ReentryNavEngine` does not currently carry. - -**Evidence** -- `examples/avionics_examples/cfd/plasma_blackout/{corridor,weather}` — every navigation figure: - dead-reckoning drift through blackout, terminal reacquisition error, and the variance witnesses. Both - examples gate on these. -- `examples/avionics_examples/navigation/ins_gnss_blackout` — the dedicated navigation example. -- Any tuned `q_diag` in those examples, which changes meaning under a stated discretisation. - -**Risk** -- Re-tuning is required, not optional: with `Q` scaled by `dt` the existing diagonals produce different - covariance growth, so the examples' drift and reacquisition numbers move and their gates must be - re-derived from the corrected filter rather than restored. -- The attitude resolution may be larger than a bug fix. Injecting `δψ` needs a nominal attitude the - engine does not have; the alternatives are narrower but each has a cost. See the design. -- No public API signature change is forced, though `update_scalar` returning `()` is what prevents it - from rejecting bad input today. diff --git a/openspec/changes/fix-navigation-filter-correctness/tasks.md b/openspec/changes/fix-navigation-filter-correctness/tasks.md deleted file mode 100644 index b5107d143..000000000 --- a/openspec/changes/fix-navigation-filter-correctness/tasks.md +++ /dev/null @@ -1,88 +0,0 @@ -## 1. Baseline the navigation figures before touching the filter - -Design D5: measure first, so every later movement is attributable and no gate is re-derived from a -number nobody recorded. - -- [ ] 1.1 Record the corridor example's navigation figures: dead-reckoning drift through blackout, terminal reacquisition error, and the variance witnesses (`err → drift → post-reacquisition`, currently 0.3467 → 2.5448 → 0.2775 m) -- [ ] 1.2 Record the weather example's per-case drift mean/σ and terminal mean/max over its draw ensemble -- [ ] 1.3 Record `ins_gnss_blackout`'s reported figures -- [ ] 1.4 Record every tuned `q_diag` in the examples, with the `dt` it was tuned at — these values change meaning under a stated discretisation - -## 2. Validate the covariance at its entry points (D3) - -Lands first: it makes the degenerate-update path unreachable rather than merely guarded. - -- [ ] 2.1 Reject a non-finite, negative-variance or asymmetric covariance in `NavFilter::new` -- [ ] 2.2 Same in `NavFilter::restore`, so a snapshot cannot reintroduce one -- [ ] 2.3 Choose and document the symmetry tolerance — exact equality is wrong for a restored float matrix -- [ ] 2.4 Add tests for each rejection, and a snapshot round-trip test proving a valid filter restores exactly -- [ ] 2.5 Confirm no shipped configuration is now refused; if one is, it was already carrying an invalid covariance — record it - -## 3. Guard the measurement update (D2) - -- [ ] 3.1 Give `update_scalar` a rejection channel; it currently returns `()` and so cannot refuse -- [ ] 3.2 Reject a zero, negative or non-finite innovation covariance `s = h·P·hᵀ + r` before dividing -- [ ] 3.3 Reject a negative measurement variance `r` -- [ ] 3.4 Make rejection **atomic**: state and covariance unchanged, not half-applied. This matters concretely — `correct_position` folds three sequential per-axis updates, and a rejection on the second must not leave the first applied -- [ ] 3.5 Propagate the rejection through `ReentryNavEngine::correct_position` so a caller learns a fix was not folded -- [ ] 3.6 Add a test for the reachable `NaN` path (`P[i][i] = 0`, `r_var = 0`), asserting the filter is untouched afterwards -- [ ] 3.7 Add a test that a valid measurement produces bit-identical results to before the guard - -## 4. Give the process noise a discretisation (D1) - -The change that moves numbers. Landed alone so its effect on the examples is attributable. - -- [ ] 4.1 Scale the process noise by `dt` in `NavFilter::predict` (`Q_d = Q_c·dt`) -- [ ] 4.2 Document at the API boundary that the supplied diagonal is a continuous-time spectral density, with the discretisation named and cited -- [ ] 4.3 Add the horizon-invariance test: propagate a fixed horizon at `dt` and at `dt/2` with no measurements, and assert the terminal covariance agrees to the discretisation's order -- [ ] 4.4 Add a test that changing `dt` alone does not change filter behaviour over a fixed horizon -- [ ] 4.5 Re-tune each `q_diag` recorded in 1.4 from per-step to per-second, stating the conversion - -## 5. Measure, then re-derive the gates (D5) - -Do not edit a navigation gate before this group's measurements are written down. - -- [ ] 5.1 Re-run the corridor example and record every navigation figure against the 1.1 baseline -- [ ] 5.2 Re-run the weather example and record its ensemble statistics against 1.2 -- [ ] 5.3 Re-run `ins_gnss_blackout` against 1.3 -- [ ] 5.4 Note which navigation gates now fail, before deciding what to do about any of them -- [ ] 5.5 Re-derive each failing gate's bound from the corrected filter, with its evidence class — never widen a bound to restore a pre-correction figure -- [ ] 5.6 If the corrected filter reports worse drift than before, record that as the result; the previous figures came from a filter whose covariance grew per step - -## 6. Resolve the attitude-error inconsistency (D4) - -Last, because it needs an owner decision and the options differ greatly in size. - -Resolution revised 2026-07-22 after testing the deferral against the tree: **(a) here; (b) dropped.** -`Quaternion` with `from_axis_angle`, `to_rotation_matrix`, `normalize` and `slerp` already ships in -`deep_causality_num_complex`, an existing `deep_causality_cfd` dependency, so (a) is a field plus two -call sites rather than a feature. (b) was justified solely by (a)'s cost and carried a real price — an -attitude block that is no longer an error about the current nominal. - -- [ ] 6.1 Add a nominal attitude `Quaternion` to `ReentryNavEngine`, which today carries - `position`, `velocity`, `filter`, `tau_offset`, `elapsed` and no attitude at all -- [ ] 6.1a Integrate the gyro into the nominal each step (`q ← normalize(q ⊗ from_axis_angle(ω̂, |ω|·dt))`) -- [ ] 6.1b Inject the estimated `δψ` into the nominal in `correct_position`, then zero the attitude - error block — which is now legitimate **because it was injected**, satisfying the spec's - "reset only if injected" invariant rather than working around it -- [ ] 6.1c Use `to_rotation_matrix()` where the transition matrix needs the DCM, so the `−[f]×` - coupling reads the nominal rather than an implied identity -- [ ] 6.2 Confirm no departure needs documenting: with `δψ` injected, the attitude block *is* an error - about the current nominal, so the textbook ESKF bookkeeping holds and (b)'s interim caveat is - not incurred -- [ ] 6.3 Add a test that many position-only fixes do not shrink the attitude covariance monotonically toward zero on the strength of corrections never applied -- [ ] 6.4 Confirm the retained attitude error still couples into velocity error through `−[f]×` as the transition matrix intends, and that retaining it does not destabilise the propagation -- [ ] 6.5 Verify the quaternion stays normalised across a long march (integration drift is the one - real hazard (a) introduces), and that a zero gyro input leaves the nominal exactly unchanged - -## 7. Verify - -- [ ] 7.1 Covariance growth over a fixed horizon is invariant under halving `dt` (spec: stated discretisation) -- [ ] 7.2 The reachable degenerate update leaves the filter untouched and reports rejection (spec: degenerate inputs refused) -- [ ] 7.3 A non-PSD covariance is refused at both construction and restoration (spec: a covariance is validated) -- [ ] 7.4 Every error-state component zeroed by a reset was first injected (spec: reset only if injected) -- [ ] 7.5 Valid inputs produce bit-identical results to before, for the guards added in groups 2 and 3 -- [ ] 7.6 `cargo test -p deep_causality_cfd --release` — no regression against the 828-pass baseline -- [ ] 7.7 `make format && make fix` clean, no new `#[allow]` -- [ ] 7.8 Every navigation gate that moved is traceable to a measurement from group 5, and no bound was widened to restore a pre-correction figure -- [ ] 7.9 Confirm the diff does not alter `nav_transition_matrix`, the 17-state composition, or the Joseph update — all confirmed correct by the audit and out of scope diff --git a/openspec/specs/constant-and-test-traceability/spec.md b/openspec/specs/constant-and-test-traceability/spec.md new file mode 100644 index 000000000..16bb71414 --- /dev/null +++ b/openspec/specs/constant-and-test-traceability/spec.md @@ -0,0 +1,66 @@ +# constant-and-test-traceability Specification + +## Purpose +TBD - created by archiving change reconcile-cfd-docs-and-traceability. Update Purpose after archive. +## Requirements +### Requirement: A load-bearing constant carries a source, its units, and a papers entry + +A load-bearing constant SHALL carry, at its definition, a source, its units, and — where a publication +fixes its value — a `papers/` entry with a full author-year citation. A constant is load-bearing when the +reported result depends materially on its value; such a constant SHALL NOT stand as a bare literal with no +provenance. + +The mask-smoothing width `SMOOTH_CELLS = 2.0` moves the reported immersed-cylinder `C_d` by 6.1× +(`AUDIT-REPORT.md` §4b) and carries only "Mask smoothing width in cells." at both definitions +(the `SMOOTH_CELLS` constants in `verification/qtt_cylinder_verification/config.rs` and +`verification/qtt_park2t_blackout/config.rs`). The `qtt_park2t_blackout` `ETA = 0.016` (the `ETA` +constant in the same file) carries no source, while the cylinder site (`ETA` in +`verification/qtt_cylinder_verification/config.rs`) already carries a wall-error-target derivation from +`close-qtt-solver-envelope`. The Mach-1.05 shock floor (the `shock_floor` branch in +`src/types/flow/compressible_march_run.rs`) explains its branch but not the 0.05 buffer above +sonic. The `papers/` folder holds no penalization reference; Angot / Bruneau & Fabrie (1999) is cited in +harness text only (`render_ladders` in `verification/qtt_cylinder_verification/print_utils.rs`). + +#### Scenario: A load-bearing constant states its source and units at the definition + +- **WHEN** a reviewer reads a load-bearing constant's definition +- **THEN** its source, units, and — where a publication backs it — a `papers/` citation are present there + +#### Scenario: The penalization method is cited from a papers entry + +- **WHEN** the immersed-body penalization method is described in the harness +- **THEN** its reference (Angot / Bruneau & Fabrie 1999) is present in `papers/` and cited at the site, not + named in text alone + +#### Scenario: Every papers PDF is accounted for + +- **WHEN** the `papers/` folder is inventoried +- **THEN** each PDF is cited by author-year from the code it supports, or is flagged for the owner — none + is removed without owner approval + +### Requirement: A load-bearing test references an independent truth + +A load-bearing test SHALL check the shipped code path against a reference derived independently of that +path — an analytic solution, a published value, or a hand-derivation — not against a value pinned from the +code's own prior output, and not against a re-implementation of the code under test. The shipped path SHALL +be the path the test drives. + +No test drives the shipped QTT convection path `rate_pair` (`src/solvers/qtt/incompressible_2d.rs:105`) +with a nonzero velocity: the two `scalar_rate` unit tests pass `u = v = 0`, and the full-solver +Taylor–Green test's convection is a pure gradient the projection annihilates, so a sign flip in the shipped +convection is invisible. The Taylor–Green verification harness checks convection with `u,v ≠ 0` but +re-assembles the operator from `gradient_x`/`gradient_y` (`verification/qtt_taylor_green_verification/main.rs:83-126`) +rather than calling `rate_pair`, so it gates a copy. + +#### Scenario: The shipped convection path is exercised with a nonzero velocity + +- **WHEN** the QTT convection path is tested +- **THEN** a test drives the shipped `rate_pair` with `u,v ≠ 0` against an analytic reference the + projection does not annihilate, and the test fails under a sign flip in the shipped convection + +#### Scenario: A gate drives the shipped path, not a re-implementation + +- **WHEN** the Taylor–Green harness checks the convection operator +- **THEN** it routes the check through the shipped `rate_pair`, not a `gradient_x`/`gradient_y` re-assembly, + and its reported convection error is unchanged by the re-route + diff --git a/openspec/specs/documentation-code-parity/spec.md b/openspec/specs/documentation-code-parity/spec.md new file mode 100644 index 000000000..6bb355900 --- /dev/null +++ b/openspec/specs/documentation-code-parity/spec.md @@ -0,0 +1,160 @@ +# documentation-code-parity Specification + +## Purpose +TBD - created by archiving change reconcile-cfd-docs-and-traceability. Update Purpose after archive. +## Requirements +### Requirement: A kernel docstring names the operator the kernel marches + +A kernel's public docstring SHALL describe the operator the code actually evaluates, not an earlier or +intended form of it. Where the shipped operator differs from a textbook or historical form — because it +was stabilised, symmetrised, or otherwise transformed — the docstring SHALL name the shipped form and may +cite the change that introduced it. + +The DEC Navier–Stokes rate kernel marches the skew-symmetrised convective operator +`conv' = ½[G_ω u − G*_ω u]` (`src/solvers/dec/dec_ns_rate.rs:621-652`), introduced to stabilise the +un-symmetrised advection. Its public docstrings still state `−i_u(du♭)` (`dec_ns_rate.rs:7,35,457`, +`src/solvers/dec/mod.rs:11-12,29-30`, `src/theories/incompressible_dec.rs:44`). The code is correct; the +prose describes a different operator. + +#### Scenario: The convective docstring matches the marched operator + +- **WHEN** the DEC rate kernel's module, type, and method docstrings are read against the implementation +- **THEN** the convective term they state is the skew-symmetrised operator the code evaluates, and the + stabilisation that introduced it is cited + +#### Scenario: A reader is not sent to distrust correct code + +- **WHEN** a reader compares any kernel docstring to the operator the kernel marches +- **THEN** the two agree, so the reader has no false discrepancy to resolve + +### Requirement: A comment does not contradict the code beneath it + +A comment SHALL describe the code it annotates. A comment that states a different formula, eigenvalue, +sign, or algorithm than the code below it SHALL be corrected to match the code, where the code is +confirmed correct. + +Two spectral-projector comments name the compact 5-point Laplacian eigenvalue `−(2−2cos(2πk/N))/Δ²` and a +sign/form the code does not use (`src/tensor_bridge/projection.rs:157,169`), while the code applies the +consistent `sin²(2πk/N)/dx²` (`:158-163`). The DEC solver's module prose describes a first-order Chorin +split (`src/solvers/dec/mod.rs:21-26`) where the code projects inside each RK4 stage with no splitting +error (`dec_ns_solver/step.rs:6-13`). + +#### Scenario: The spectral-projector comments match the applied eigenvalue + +- **WHEN** the projection comments are read against the operator the code applies +- **THEN** they describe `sin²(2πk/N)/dx²` and the sign the code uses, not the compact 5-point form + +#### Scenario: The projection-placement prose matches the code + +- **WHEN** the DEC solver's projection-placement prose is read against the step implementation +- **THEN** it describes the in-stage projection the code performs, not a first-order Chorin split + +### Requirement: Prose describes the shipped code, not the intended design + +Documentation prose SHALL describe what the code does. Where prose describes an intended design the code +implements only in part, it SHALL be marked as intent or corrected to the implemented subset. A prose +claim that a property holds "by construction" SHALL name the check that enforces it or be reconciled — and +where the property is both asserted and unenforced, the discrepancy SHALL be raised as a correctness +finding rather than resolved by softening the prose. + +The audit catalogues ~86 actionable `doc-overclaim` rows in `../../audits/cfd_audit/ACTION-LIST.md`. A +minority are already closed by Phases 1–2 (the `blended.rs` fold claim, the `boundary_zone` hook, the +`penalization_heat_integral` rename); the remainder are reconciled here. + +#### Scenario: A "by construction" claim names its check or is marked intent + +- **WHEN** a doc asserts a property holds "by construction" +- **THEN** the doc names the check that enforces it, or the claim is marked as intended design, or — + where the property is unenforced and the claim is false — it is raised as a correctness finding + +#### Scenario: The catalogue is reconciled and the count recorded + +- **WHEN** the `doc-overclaim` catalogue is worked +- **THEN** each surviving row is reconciled against the code, and the count reconciled and the count + escalated are recorded against the catalogue so completeness is checkable + +### Requirement: Every load-bearing public capability is documented where a user looks for it + +A shipped public capability SHALL be documented where a user discovers capabilities — the crate README and +architecture docs — not only in rustdoc. A capability present in the code and absent from the user-facing +documentation misleads a reader into concluding it does not exist. + +The audit lists capabilities present with rustdoc but absent from the crate README: `DuctMarchRun` +(`src/types/flow/duct_march_run.rs:56`), `IgnitionCorridor` (`src/types/flow/throttle_guidance.rs:107`), +snapshot/resume (`src/types/flow/state_snapshot.rs`), and `AcousticCoreInverse`/`2d`/`3d` +(`src/tensor_bridge/acoustic_inverse.rs:52,175,249`), among the `doc-gap` category. + +#### Scenario: A shipped capability appears in the user-facing documentation + +- **WHEN** a user reads the crate README for the capabilities the crate provides +- **THEN** the load-bearing public capabilities appear there, not only in rustdoc + +### Requirement: A convergence claim states the order it holds in and the regime it holds over + +A convergence claim SHALL state the order it holds in each independent variable and the regime over which +it holds. A claim of "n-th order convergence" that is n-th order in space and a lower order in time SHALL +state both, and SHALL document any error floor and the maximum problem size over which the order is +observed. + +The QTT Taylor–Green harness reports "clean 2nd-order convergence" (the "Measured" section of +`verification/qtt_taylor_green_verification/README.md`, `summary()` in +`verification/qtt_taylor_green_verification/print_utils.rs`, and the `qtt_taylor_green_verification` +section of `verification/README.md`) without qualifying it as second-order in space and first-order in +time, and without documenting the temporal-error floor (~1e-5 at fixed `dt`) or the ladder's maximum +usable length. + +#### Scenario: The Taylor–Green order claim is qualified + +- **WHEN** the QTT Taylor–Green convergence claim is read +- **THEN** it states second-order in space and first-order in time, and documents the measured temporal + floor and the maximum usable ladder length + +### Requirement: Headline accuracy claims are consistent across the documents that state them + +An accuracy claim stated in more than one document SHALL use the same framing in each. A validation claim +SHALL name what it validates against and at what fidelity, and SHALL NOT read as a stronger claim in one +document than in another. + +This requirement is satisfied by Phases 1–2 for the two claims the audit flagged — the RAM-C anchor is +framed as order-of-magnitude in both the crate README (`README.md:224`) and the verification README +(`verification/README.md:127`), and the lid-cavity summary row reports the 65² default (RMSE 0.0617, +`verification/README.md:90`). It is captured here so a regression is caught rather than silently +reintroduced. + +#### Scenario: The RAM-C claim reads the same in both READMEs + +- **WHEN** the RAM-C anchor claim is read in the crate README and the verification README +- **THEN** both frame it as an order-of-magnitude prediction naming the ±0.70-decade pinned band, neither + as a per-point accuracy claim + +#### Scenario: A quantitative summary row reports the configuration it measures + +- **WHEN** a summary row reports a measured accuracy figure +- **THEN** it names the configuration that produced it, and that configuration is the default the reader + would run + +### Requirement: The crate ships no dead, duplicate gate API + +A public API exported as the mechanism a program uses SHALL be the mechanism that program uses, or SHALL +be retired. A gate-reporting type documented as the block every self-verifying program prints, but +constructed by none of them, SHALL be adopted across those programs or removed, and a gate harness SHALL +NOT report success for an empty gate set. + +`Gates` was exported from `lib.rs` and documented as the `[PASS]`/`[FAIL]` block every self-verifying +program prints, yet `Gates::new` was constructed only in its own unit test — the programs used `GateSeq` +or `Verdict`'s `Display`. It held the only five `println!` in `src/`, and `Gates::finish()` returned +success for an empty gate set. `2026-07-26-reconcile-cfd-docs-and-traceability` retired the type on an +owner decision: `src/types/flow/gates.rs` and its tests are gone, the `lib.rs` re-export with them, `src/` +now holds no `println!`, and `GateSeq` is the mechanism the self-verifying programs use. The evidence is +historical; the requirement stands as the contract that keeps the duplicate API from returning. + +#### Scenario: The empty gate set does not report success + +- **WHEN** a gate harness finishes having registered no gate +- **THEN** it does not report pass + +#### Scenario: Documentation names the gate mechanism the programs use + +- **WHEN** a document describes how a self-verifying program reports its gates +- **THEN** it names the type the program actually uses, not a parallel API no program constructs + diff --git a/openspec/specs/eskf-filter-correctness/spec.md b/openspec/specs/eskf-filter-correctness/spec.md new file mode 100644 index 000000000..9837bec23 --- /dev/null +++ b/openspec/specs/eskf-filter-correctness/spec.md @@ -0,0 +1,148 @@ +# eskf-filter-correctness Specification + +## Purpose +The numerical and structural contract of the GNSS-denial error-state Kalman filter (`NavFilter` / +`ReentryNavEngine`) — the estimation layer that decides how far a vehicle drifts through a comms blackout +and how well it reacquires afterward. The contract makes explicit what a tuned constant did not: the +process noise is a *stated* discretisation of a continuous-time model (covariance grows with elapsed time, +not step count); the scalar measurement update refuses a degenerate input (a non-finite measurement, a +negative variance, a non-positive innovation covariance) atomically rather than writing `NaN`; a covariance +is validated as one (symmetric, non-negative diagonal, finite) at construction and restoration; and the +error-state lifecycle is closed — an error state is reset only after it has been injected into a nominal. +These requirements exist because the filter's contracts were never written down, so nothing distinguished +a tuned constant from a discretisation, or an injected error from a discarded one. +## Requirements +### Requirement: The process noise carries a stated discretisation + +The process noise SHALL be applied under a documented discretisation of a continuous-time noise +model, so that accumulated covariance depends on **elapsed time** and not on the number of steps taken +to cover it. The supplied quantity's units SHALL be stated at the API boundary — a spectral density +if the discretisation is `Q_d = Q_c·dt`, and correspondingly for any other cited form (Van Loan, or a +first-order-hold equivalent). + +`NavFilter::predict` currently takes `dt`, uses it for the state propagation and the transition +matrix, and then adds the caller's diagonal unscaled: `self.cov = mat_add(&fpft, &diag(&q))`. The +diagonal is therefore not a discretisation of any continuous model — halving `dt` over a fixed horizon +doubles the accumulated process noise — and the filter's tuning is silently bound to one step size. + +#### Scenario: Covariance growth is invariant under step refinement + +- **WHEN** the filter propagates over a fixed horizon at `dt` and again at `dt/2`, with the same + continuous-time noise input and no measurements +- **THEN** the terminal covariance agrees between the two runs to the discretisation's stated order + +#### Scenario: The supplied quantity's units are stated + +- **WHEN** a caller supplies the process-noise input +- **THEN** the API documents whether it is a spectral density or an already-discretised covariance, + and the discretisation applied to it is named and cited + +#### Scenario: A step-size change does not silently re-tune the filter + +- **WHEN** an existing configuration's `dt` is changed without changing its noise input +- **THEN** the filter's behaviour over a fixed horizon is unchanged to the discretisation's order + +### Requirement: The measurement update rejects degenerate inputs + +The scalar measurement update SHALL NOT divide by an unvalidated innovation covariance, and SHALL +reject a measurement it cannot fold rather than propagating a non-finite value into the state or the +covariance. + +`update_scalar` computes `s = h·P·hᵀ + r` and then `k[i] = ph[i] / s` with no positivity check, and +returns `()` — it has no channel through which to reject. The path is reachable from the public API: +`NavFilter::new` and `NavFilter::restore` accept an arbitrary covariance with no validation, and +`ReentryNavEngine::correct_position` passes the caller's `r_var` straight through. With `P[i][i] = 0` +and `r_var = 0` the gain is `0/0 = NaN`, which is then written into the state and into every entry of +the Joseph-form covariance, destroying the filter silently. + +A negative measurement variance SHALL likewise be rejected: a variance is non-negative by definition, +and a negative one can drive `s` through zero from either side. + +#### Scenario: A degenerate innovation covariance is refused + +- **WHEN** an update would divide by an innovation covariance that is zero, negative or non-finite +- **THEN** the update is refused and neither the state nor the covariance is modified + +#### Scenario: A negative measurement variance is refused + +- **WHEN** a measurement is offered with a negative variance +- **THEN** it is rejected rather than folded + +#### Scenario: The filter survives a refused measurement + +- **WHEN** a degenerate measurement is refused mid-run +- **THEN** the filter's state and covariance are exactly what they were before the attempt, and the + run can continue folding subsequent valid measurements + +#### Scenario: Valid measurements are unaffected + +- **WHEN** a well-posed measurement is folded +- **THEN** the resulting state and covariance are identical to those produced before this requirement + +### Requirement: A covariance is validated as a covariance + +Filter construction and restoration SHALL reject a covariance that fails the *necessary* covariance +conditions — a non-finite entry, an asymmetry beyond tolerance, or a negative variance on the diagonal — +rather than accepting arbitrary values and discovering the consequences during an update. A full +positive-semidefinite test (an LDLᵀ pivot scan) is deliberately **not** performed at the entry points: a +covariance produced by the Joseph update can carry a round-off-negative eigenvalue that a strict PSD test +would wrongly reject, so the operational PSD backstop is the guarded measurement update above (which +refuses the degenerate innovation a non-PSD matrix would produce), not a construction-time eigenvalue +check. + +`NavFilter::new` accepts an arbitrary diagonal and `restore` an arbitrary matrix; neither previously +checked symmetry, non-negativity, or finiteness. A **negative** variance admitted here is what made the +grosser corrupt-covariance inputs reachable; a **zero** variance is a valid entry (PSD includes the +boundary) and remains admitted, its degenerate `s = 0` caught by the update guard. + +#### Scenario: A non-PSD covariance is refused at construction + +- **WHEN** a filter is constructed or restored with a covariance carrying a negative variance, an + asymmetry beyond tolerance, or a non-finite entry +- **THEN** construction fails with an error naming the offending property + +#### Scenario: A restored snapshot round-trips + +- **WHEN** a valid filter's covariance is snapshotted and restored +- **THEN** restoration succeeds and reproduces the filter exactly + +### Requirement: An error state is reset only if it was injected + +An error-state component SHALL NOT be zeroed unless the estimate it carried was applied to a +corresponding nominal. Where a component has no nominal to correct, the filter SHALL NOT claim the +covariance reduction that an applied correction would justify. + +`ReentryNavEngine::correct_position` runs three scalar updates on the position axes. Each shrinks the +whole covariance through the Joseph form — including the attitude block, via the position↔attitude +cross-covariance — so the filter grows more confident about attitude. It then injects only `δp` and +`δv` into the nominal and calls `reset_navigation_error()`, which zeroes position, velocity **and +attitude**. The attitude estimate is credited in the covariance and then discarded. + +It cannot currently be applied: `ReentryNavEngine` carries no nominal attitude — its fields are +`position`, `velocity`, `filter`, `tau_offset`, `elapsed` — and `attitude_error` is read nowhere in the +crate. Resetting an error state after injection is sound precisely because the error was transferred to +the nominal; zeroing one that was never transferred leaves the filter permanently overconfident. + +This requirement states the invariant, not the resolution. Injecting the attitude error into a nominal +attitude, retaining the error rather than zeroing it, and applying the corresponding covariance reset +transform are all admissible ways to satisfy it; silently discarding an estimated error while keeping +its covariance credit is not. + +#### Scenario: Every zeroed component was applied + +- **WHEN** the navigation error is reset after a measurement fold +- **THEN** each component zeroed was first injected into a nominal, and no component is zeroed that had + no nominal to receive it + +#### Scenario: Attitude confidence is not claimed without an attitude correction + +- **WHEN** a position-only fix reduces the attitude block's covariance through cross-covariance +- **THEN** either the resulting attitude correction is applied, or the covariance does not retain a + reduction the filter cannot justify + +#### Scenario: Repeated fixes do not accumulate unjustified confidence + +- **WHEN** many position-only fixes are folded over a long run +- **THEN** the attitude covariance does not shrink monotonically toward zero on the strength of + corrections that were never applied + diff --git a/openspec/specs/trajectory-nav-engine/spec.md b/openspec/specs/trajectory-nav-engine/spec.md index e25c19778..d28d70b60 100644 --- a/openspec/specs/trajectory-nav-engine/spec.md +++ b/openspec/specs/trajectory-nav-engine/spec.md @@ -8,12 +8,19 @@ TBD - created by archiving change add-plasma-blackout-corridor. Update Purpose a Stage 2 SHALL provide the onboard trajectory + navigation engine composed from the Stage-0 primitives: predict = the KS conformal propagator with the between-step aero kick taken **from the `blackout-coupling-interface` force -channel**; correct = a **17-state tightly-coupled ESKF** (position 3, velocity 3, attitude-error 3, gyro bias 3, -accel bias 3, clock bias + drift 2) followed by the Sp(2,R)/KS constraint projection; and a **two-clock** carry +channel**; correct = a **17-state tightly-coupled ESKF** in the canonical ordering `[position 3, velocity 3, +attitude-error 3, accelerometer bias 3, gyro bias 3, clock bias, clock drift]`, followed by the Sp(2,R)/KS +constraint projection; and a **two-clock** carry (the KS fictitious time `s` distinct from proper time `τ`). Because the aero force arrives through the interface, there SHALL be **no mock/real split** in the engine — the Stage-0 stub and the Stage-1 marcher are interchangeable behind the contract. The ESKF is example-level; the reusable math is the Stage-0 library. +That ordering is the interface contract for every `[R; 17]` the engine exchanges: the covariance and process-noise +diagonals, the measurement row `h`, and the packed error state. Accelerometer bias sits at indices 9-11 and gyro +bias at 12-14, as `InsErrorState::to_array` / `from_array` pack them. The blocks are not interchangeable: the +shipped priors differ by six orders of magnitude (accel bias `1e-2`, gyro bias `1e-8`), and nothing validates the +ordering of a caller-supplied `[R; 17]`, so a transposed diagonal is accepted and silently mis-tunes the filter. + #### Scenario: Coast exactness and dynamic timing - **WHEN** the engine runs with a zero aero force and monopole gravity - **THEN** the trajectory matches the analytic Kepler orbit to round-off, and the carried `dτ/dt = 1 + Φ/c² − diff --git a/thirdparty/crates/BUILD.bazel b/thirdparty/crates/BUILD.bazel index 24044111a..47c75677a 100644 --- a/thirdparty/crates/BUILD.bazel +++ b/thirdparty/crates/BUILD.bazel @@ -68,14 +68,14 @@ alias( ) alias( - name = "parquet-59.1.0", - actual = "//thirdparty/crates/parquet-59.1.0:parquet", + name = "parquet-59.2.0", + actual = "//thirdparty/crates/parquet-59.2.0:parquet", tags = ["manual"], ) alias( name = "parquet", - actual = "//thirdparty/crates/parquet-59.1.0:parquet", + actual = "//thirdparty/crates/parquet-59.2.0:parquet", tags = ["manual"], ) diff --git a/thirdparty/crates/ahash-0.8.12/BUILD.bazel b/thirdparty/crates/ahash-0.8.12/BUILD.bazel index 1d3792543..546afc1b9 100644 --- a/thirdparty/crates/ahash-0.8.12/BUILD.bazel +++ b/thirdparty/crates/ahash-0.8.12/BUILD.bazel @@ -333,7 +333,7 @@ rust_library( deps = [ "//thirdparty/crates/ahash-0.8.12:build_script_build", "//thirdparty/crates/cfg-if-1.0.4:cfg_if", - "//thirdparty/crates/zerocopy-0.8.54:zerocopy", + "//thirdparty/crates/zerocopy-0.8.56:zerocopy", ] + select({ "@rules_rust//rust/platform:aarch64-apple-darwin": [ "//thirdparty/crates/getrandom-0.3.4:getrandom", # aarch64-apple-darwin diff --git a/thirdparty/crates/android_system_properties-0.1.5/.cargo-checksum.json b/thirdparty/crates/android_system_properties-0.1.5/.cargo-checksum.json deleted file mode 100644 index 04b65684b..000000000 --- a/thirdparty/crates/android_system_properties-0.1.5/.cargo-checksum.json +++ /dev/null @@ -1 +0,0 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"86f505a9258ea3098b18bb2b6c02cb45a2e0c368a9bef6814ee8865a3f169797","CONTRIBUTING.md":"0834cb3b5e092977688d73d219a05bed23ae0ecb54b6d6e5d866ce07f6583b5e","Cargo.lock":"37ffc00dbbbec58fd27b4f4cb597e5402d6cf615ce0458f62a73a7f0d987e5bd","Cargo.toml":"e9e8c037cdef7adc9794b17c13e5a014421524d67ea5048bc09cf70ef13c782c","Cargo.toml.orig":"749ab935be1cb6485115a677e36d680c2be95dcea8eb00c7b115006224ff926a","LICENSE-APACHE":"216486f29671a4262efe32af6d84a75bef398127f8c5f369b5c8305983887a06","LICENSE-MIT":"80f275e90d799911ed3830a7f242a2ef5a4ade2092fe0aa07bfb2d2cf2f2b95e","README.md":"aba8ff5dbd0712326d97d32bc6a3b66b24d1980a446c238f7e14b96784766cd1","examples/time_zone.rs":"8edb32a946ef2680146ba9ac16c233dd94391ac9f98464e9fb6f87d3954b72a9","src/lib.rs":"0004133d6c3805bf449e7183d2931e9640167511bea6cd12b400805073c4305d"},"package":"819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311"} \ No newline at end of file diff --git a/thirdparty/crates/android_system_properties-0.1.5/.cargo_vcs_info.json b/thirdparty/crates/android_system_properties-0.1.5/.cargo_vcs_info.json deleted file mode 100644 index fba558d26..000000000 --- a/thirdparty/crates/android_system_properties-0.1.5/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "fb87625f1807dff7623db2d80df682a199358515" - }, - "path_in_vcs": "" -} \ No newline at end of file diff --git a/thirdparty/crates/android_system_properties-0.1.6/.cargo-checksum.json b/thirdparty/crates/android_system_properties-0.1.6/.cargo-checksum.json new file mode 100644 index 000000000..c86632fcb --- /dev/null +++ b/thirdparty/crates/android_system_properties-0.1.6/.cargo-checksum.json @@ -0,0 +1 @@ +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"6033a5157b00f2f2a754b145d6a0b55235eb2f4d9c70c60e54c4202f28af1b15","CONTRIBUTING.md":"0834cb3b5e092977688d73d219a05bed23ae0ecb54b6d6e5d866ce07f6583b5e","Cargo.lock":"547a8491b064e2878b214be141b380ef562fc2adc7f3eca7b876153cb7887d9b","Cargo.toml":"0c52534057878bdffb8edf8c142bdf2e78eaeb954dc50a85fe1e11e82c539f61","Cargo.toml.orig":"be5a4bec8652554458c695ae321fda7fbbd8062a90fb66bdc56070f7650caaaa","LICENSE-APACHE":"216486f29671a4262efe32af6d84a75bef398127f8c5f369b5c8305983887a06","LICENSE-MIT":"80f275e90d799911ed3830a7f242a2ef5a4ade2092fe0aa07bfb2d2cf2f2b95e","README.md":"aba8ff5dbd0712326d97d32bc6a3b66b24d1980a446c238f7e14b96784766cd1","examples/time_zone.rs":"8edb32a946ef2680146ba9ac16c233dd94391ac9f98464e9fb6f87d3954b72a9","src/lib.rs":"486f66c7e22f932ab4fe7f90bbcf8deb97015244d20f8505d008107c35cd704e"},"package":"ae221649c9976a6f6c56ae1facf410f3ddb33cc661c4b7b61020a912d4237fbc"} \ No newline at end of file diff --git a/thirdparty/crates/android_system_properties-0.1.6/.cargo_vcs_info.json b/thirdparty/crates/android_system_properties-0.1.6/.cargo_vcs_info.json new file mode 100644 index 000000000..b2fb79c56 --- /dev/null +++ b/thirdparty/crates/android_system_properties-0.1.6/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "f859a346ba256d92ef047e7a49d6a2f59972257b" + }, + "path_in_vcs": "" +} \ No newline at end of file diff --git a/thirdparty/crates/android_system_properties-0.1.5/BUILD.bazel b/thirdparty/crates/android_system_properties-0.1.6/BUILD.bazel similarity index 98% rename from thirdparty/crates/android_system_properties-0.1.5/BUILD.bazel rename to thirdparty/crates/android_system_properties-0.1.6/BUILD.bazel index e038f4e7d..a8b3ae32e 100644 --- a/thirdparty/crates/android_system_properties-0.1.5/BUILD.bazel +++ b/thirdparty/crates/android_system_properties-0.1.6/BUILD.bazel @@ -106,8 +106,8 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.1.5", + version = "0.1.6", deps = [ - "//thirdparty/crates/libc-0.2.186:libc", + "//thirdparty/crates/libc-0.2.189:libc", ], ) diff --git a/thirdparty/crates/android_system_properties-0.1.5/CONTRIBUTING.md b/thirdparty/crates/android_system_properties-0.1.6/CONTRIBUTING.md similarity index 100% rename from thirdparty/crates/android_system_properties-0.1.5/CONTRIBUTING.md rename to thirdparty/crates/android_system_properties-0.1.6/CONTRIBUTING.md diff --git a/thirdparty/crates/android_system_properties-0.1.5/Cargo.lock b/thirdparty/crates/android_system_properties-0.1.6/Cargo.lock similarity index 66% rename from thirdparty/crates/android_system_properties-0.1.5/Cargo.lock rename to thirdparty/crates/android_system_properties-0.1.6/Cargo.lock index 9ee6e3d29..08a106a7a 100644 --- a/thirdparty/crates/android_system_properties-0.1.5/Cargo.lock +++ b/thirdparty/crates/android_system_properties-0.1.6/Cargo.lock @@ -1,16 +1,16 @@ # This file is automatically @generated by Cargo. # It is not intended for manual editing. -version = 3 +version = 4 [[package]] name = "android_system_properties" -version = "0.1.5" +version = "0.1.6" dependencies = [ "libc", ] [[package]] name = "libc" -version = "0.2.126" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "349d5a591cd28b49e1d1037471617a32ddcda5731b99419008085f72d5a53836" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" diff --git a/thirdparty/crates/android_system_properties-0.1.5/Cargo.toml b/thirdparty/crates/android_system_properties-0.1.6/Cargo.toml similarity index 80% rename from thirdparty/crates/android_system_properties-0.1.5/Cargo.toml rename to thirdparty/crates/android_system_properties-0.1.6/Cargo.toml index 79e4ea0d2..59adbbc47 100644 --- a/thirdparty/crates/android_system_properties-0.1.5/Cargo.toml +++ b/thirdparty/crates/android_system_properties-0.1.6/Cargo.toml @@ -12,14 +12,20 @@ [package] edition = "2018" name = "android_system_properties" -version = "0.1.5" +version = "0.1.6" authors = ["Nicolas Silva "] +build = false +autolib = false +autobins = false +autoexamples = false +autotests = false +autobenches = false description = "Minimal Android system properties wrapper" homepage = "https://github.com/nical/android_system_properties" documentation = "https://docs.rs/android_system_properties" readme = "README.md" keywords = ["android"] -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" repository = "https://github.com/nical/android_system_properties" [package.metadata.docs.rs] @@ -32,5 +38,13 @@ targets = [ "x86_64-unknown-linux-gnu", ] +[lib] +name = "android_system_properties" +path = "src/lib.rs" + +[[example]] +name = "time_zone" +path = "examples/time_zone.rs" + [dependencies.libc] version = "0.2.126" diff --git a/thirdparty/crates/android_system_properties-0.1.5/Cargo.toml.orig b/thirdparty/crates/android_system_properties-0.1.6/Cargo.toml.orig similarity index 92% rename from thirdparty/crates/android_system_properties-0.1.5/Cargo.toml.orig rename to thirdparty/crates/android_system_properties-0.1.6/Cargo.toml.orig index ca6994629..e69e18db9 100644 --- a/thirdparty/crates/android_system_properties-0.1.5/Cargo.toml.orig +++ b/thirdparty/crates/android_system_properties-0.1.6/Cargo.toml.orig @@ -1,10 +1,10 @@ [package] name = "android_system_properties" description = "Minimal Android system properties wrapper" -version = "0.1.5" +version = "0.1.6" authors = ["Nicolas Silva "] edition = "2018" -license = "MIT/Apache-2.0" +license = "MIT OR Apache-2.0" repository = "https://github.com/nical/android_system_properties" homepage = "https://github.com/nical/android_system_properties" documentation = "https://docs.rs/android_system_properties" diff --git a/thirdparty/crates/android_system_properties-0.1.5/LICENSE-APACHE b/thirdparty/crates/android_system_properties-0.1.6/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/android_system_properties-0.1.5/LICENSE-APACHE rename to thirdparty/crates/android_system_properties-0.1.6/LICENSE-APACHE diff --git a/thirdparty/crates/android_system_properties-0.1.5/LICENSE-MIT b/thirdparty/crates/android_system_properties-0.1.6/LICENSE-MIT similarity index 100% rename from thirdparty/crates/android_system_properties-0.1.5/LICENSE-MIT rename to thirdparty/crates/android_system_properties-0.1.6/LICENSE-MIT diff --git a/thirdparty/crates/android_system_properties-0.1.5/README.md b/thirdparty/crates/android_system_properties-0.1.6/README.md similarity index 100% rename from thirdparty/crates/android_system_properties-0.1.5/README.md rename to thirdparty/crates/android_system_properties-0.1.6/README.md diff --git a/thirdparty/crates/android_system_properties-0.1.5/examples/time_zone.rs b/thirdparty/crates/android_system_properties-0.1.6/examples/time_zone.rs similarity index 100% rename from thirdparty/crates/android_system_properties-0.1.5/examples/time_zone.rs rename to thirdparty/crates/android_system_properties-0.1.6/examples/time_zone.rs diff --git a/thirdparty/crates/android_system_properties-0.1.5/src/lib.rs b/thirdparty/crates/android_system_properties-0.1.6/src/lib.rs similarity index 86% rename from thirdparty/crates/android_system_properties-0.1.5/src/lib.rs rename to thirdparty/crates/android_system_properties-0.1.6/src/lib.rs index 9cd9d4916..fb650b01d 100644 --- a/thirdparty/crates/android_system_properties-0.1.5/src/lib.rs +++ b/thirdparty/crates/android_system_properties-0.1.6/src/lib.rs @@ -44,16 +44,26 @@ use std::{ #[cfg(target_os = "android")] use std::mem; -unsafe fn property_callback(payload: *mut String, _name: *const c_char, value: *const c_char, _serial: u32) { +/// Invoked by `__system_property_read_callback` with the `payload` pointer that +/// was handed to it as the opaque cookie. +/// +/// # Safety +/// +/// `payload` must point to a live, initialized `Option` and `value` must +/// be a valid nul-terminated string. +/// +/// Must not unwind: it is called from C. Values that are not valid UTF-8 are +/// reported as `None` rather than panicking. +unsafe extern "C" fn property_callback(payload: *mut Option, _name: *const c_char, value: *const c_char, _serial: u32) { let cvalue = CStr::from_ptr(value); - (*payload) = cvalue.to_str().unwrap().to_string(); + (*payload) = cvalue.to_str().ok().map(|s| s.to_string()); } -type Callback = unsafe fn(*mut String, *const c_char, *const c_char, u32); +type Callback = unsafe extern "C" fn(*mut Option, *const c_char, *const c_char, u32); type SystemPropertyGetFn = unsafe extern "C" fn(*const c_char, *mut c_char) -> c_int; type SystemPropertyFindFn = unsafe extern "C" fn(*const c_char) -> *const c_void; -type SystemPropertyReadCallbackFn = unsafe extern "C" fn(*const c_void, Callback, *mut String) -> *const c_void; +type SystemPropertyReadCallbackFn = unsafe extern "C" fn(*const c_void, Callback, *mut Option); #[derive(Debug)] /// An object that can retrieve android system properties. @@ -179,13 +189,15 @@ impl AndroidSystemProperties { return None; } - let mut result = String::new(); + // `property_callback` writes the value into `result`. It is left as + // `None` if the property's value is not valid UTF-8. + let mut result = None; unsafe { (read_callback_fn)(info, property_callback, &mut result); } - return Some(result); + return result; } // Fall back to the older approach. @@ -199,6 +211,8 @@ impl AndroidSystemProperties { if len > 0 { assert!(len as usize <= buffer.capacity()); + // `__system_property_get` returned `len`, so it initialized that + // many bytes of the buffer (excluding the nul terminator). unsafe { buffer.set_len(len as usize); } String::from_utf8(buffer).ok() } else { diff --git a/thirdparty/crates/cc-1.3.0/.cargo-checksum.json b/thirdparty/crates/cc-1.3.0/.cargo-checksum.json deleted file mode 100644 index a5f585d84..000000000 --- a/thirdparty/crates/cc-1.3.0/.cargo-checksum.json +++ /dev/null @@ -1 +0,0 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"95f12adccaa71cb980378bb8fd00753765613539b8676fb050ca81e50f94d277","CHANGELOG.md":"fee87cddc6f035de88a9da2e3292e3e93cc4aed164a6fbff840015f6ff91e927","Cargo.lock":"1e9c03c39c7654b322924beb58381d00585c7d4bf4f6e95d7b29fa6208898e34","Cargo.toml":"8fab8954a1689745e11fcbe0ef34ae96a993d211fb981f165000f8f9c43c4d52","Cargo.toml.orig":"ccfe80961216e795744eb5db93843d573945316f931d1018bca9113626ae7bea","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"cc952a506dc726eed3e128d47d62defbac4470bbb0e465f6a043ae8bf0c96d19","clippy.toml":"cf46251b0953d1a3c7a4f8f8941a08d8a416d5fc348dfe3f3c520eb93fcc18ea","src/command_helpers.rs":"650c9682edc3d7732249e327c1026c7cc733f3702f4867b9580223e97522d3c6","src/detect_compiler_family.c":"97ca4b021495611e828becea6187add37414186a16dfedd26c2947cbce6e8b2f","src/flags.rs":"11f22aa9741b0d445b19ab29ea1076cc32a4143316a74855b6bd682004217543","src/lib.rs":"f6551f8e4d4b5586bd6456fc358596b197c7da0b279269a5a00bfd9e8b6952a3","src/parallel/async_executor.rs":"4ce24435fff6b6555b43fee042c16bd65d4150d0346567f246b9190d85b45983","src/parallel/command_runner.rs":"1d17d9a037de93b31cc7ee6a914a1e1f6c1ac156cf8619f0014dcbaca6a0b215","src/parallel/job_token.rs":"1aa1ecc639e09845eea0f1e11a76c39ad2604eaac3268059652f56add8890089","src/parallel/mod.rs":"bf156170790d40a76015a8c78cc2a391cbe1b60bb96c1fac1d047d26e342386a","src/parallel/stderr.rs":"840fe8d0ba613c98fa92cbebc374a028a3212ba7dcea58285483223a31acc7eb","src/target.rs":"a9d2d347a3a08015531f00b32bc8a7478f5636822cc8e0237ea9efa3f07d4cd4","src/target/apple.rs":"da9411b2c4db419e0fa39f765ee53b8665b3837fb39827679a53238734a4a1c1","src/target/generated.rs":"74af61aa7b73356d5476b03e646d97105c42d973736b2a20dcc41129b147ce90","src/target/llvm.rs":"06d6351653e23314de3e0ebe3125ddea7a2617303bff639dbbef787b16691e2a","src/target/parser.rs":"26b064a952858635ac38531874c0aa6db2c4a99bef8dd55f36a761370c3ac270","src/tempfile.rs":"3d9a4bd894862a345aa230a61ec266f0c68f4ef9713d1d9c727482e61f1ea7c3","src/tool.rs":"5e9311452c8db954d5bebdcb6cc0595fe5eeeb5b4af53566b144e39dd4b29c48","src/utilities.rs":"ebb59ac01fb9588bcea0d0ee786e5d5a5696b4284a1245657625db03e830b72e"},"package":"c89588d05638b5b4594a3348a2d6c20277e43a7f5c5202b05cc56888475a47b8"} \ No newline at end of file diff --git a/thirdparty/crates/cc-1.3.0/.cargo_vcs_info.json b/thirdparty/crates/cc-1.3.0/.cargo_vcs_info.json deleted file mode 100644 index 9e8fa391f..000000000 --- a/thirdparty/crates/cc-1.3.0/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "095401693030850351da26cd63cb6307592c4f3a" - }, - "path_in_vcs": "" -} \ No newline at end of file diff --git a/thirdparty/crates/cc-1.4.2/.cargo-checksum.json b/thirdparty/crates/cc-1.4.2/.cargo-checksum.json new file mode 100644 index 000000000..7ad9a1850 --- /dev/null +++ b/thirdparty/crates/cc-1.4.2/.cargo-checksum.json @@ -0,0 +1 @@ +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"59a1013ecf35f7479fe8abe2101c2169b4ac414bd77ccbd2958bed6ae616cce8",".tombi.toml":"93f57361f60b03b6c14ede301446e5e2658abaa98cac39a4a96be0966b6b851a","CHANGELOG.md":"a0fd46f400678c3bfd53d6b1dbe82311e32899e9116a6e89e6410fea6884f4b0","Cargo.lock":"47a1bac7b0741f5f8d726c3219625951787947f77db86f9c89c772dc5fcfaeee","Cargo.toml":"c83f257d917efb5068ad7b2bd68c1e5d8dc50e2f1065a87c3407bdbef34605ef","Cargo.toml.orig":"b2534382cd610284b24b85f5063f83e2b8d9dcbe155129c2a34d7f6094c7e510","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"cc952a506dc726eed3e128d47d62defbac4470bbb0e465f6a043ae8bf0c96d19","clippy.toml":"cf46251b0953d1a3c7a4f8f8941a08d8a416d5fc348dfe3f3c520eb93fcc18ea","src/command_helpers.rs":"650c9682edc3d7732249e327c1026c7cc733f3702f4867b9580223e97522d3c6","src/detect_compiler_family.c":"97ca4b021495611e828becea6187add37414186a16dfedd26c2947cbce6e8b2f","src/flags.rs":"1a80855f51db6808cdcb5c0e6bd1c0973e86463014082ef7ed1d0fbe7b89cf93","src/lib.rs":"e884b6dacee5d4e30e963ac023f74c270ddd0355570313534c9d74106b178fa4","src/parallel/async_executor.rs":"4ce24435fff6b6555b43fee042c16bd65d4150d0346567f246b9190d85b45983","src/parallel/command_runner.rs":"1d17d9a037de93b31cc7ee6a914a1e1f6c1ac156cf8619f0014dcbaca6a0b215","src/parallel/job_token.rs":"1aa1ecc639e09845eea0f1e11a76c39ad2604eaac3268059652f56add8890089","src/parallel/mod.rs":"bf156170790d40a76015a8c78cc2a391cbe1b60bb96c1fac1d047d26e342386a","src/parallel/stderr.rs":"b68d728087667fd568921d61cd40d0dc6b56c59bde6e671cb50cb0c43dcdf56d","src/target.rs":"a9d2d347a3a08015531f00b32bc8a7478f5636822cc8e0237ea9efa3f07d4cd4","src/target/apple.rs":"da9411b2c4db419e0fa39f765ee53b8665b3837fb39827679a53238734a4a1c1","src/target/generated.rs":"15435cd9ef65f545504193783f6ae6b4f8255d946d7785723e58da63ca67f5b0","src/target/llvm.rs":"9140ec2da669599e74262237e5148a893adb2a3c4e7481ed91a848d1b970ca60","src/target/parser.rs":"6345ea5cc7c1dd2d81377bd5f76f90bdf1f7fca1fe1ddb05e00f36231ecc9f0d","src/tempfile.rs":"77963fe55b63d3a30cccae46f763b8d61ed722247fe208e8485858770f6a67f7","src/tool.rs":"52a7bc134154fde7fecb1ef691f0179eb617e2f17a10d71dfa71afbcb061555b","src/utilities.rs":"ebb59ac01fb9588bcea0d0ee786e5d5a5696b4284a1245657625db03e830b72e"},"package":"5d262e149917187838d5b42777c8253bcb64500067342904e7d429499a6f277e"} \ No newline at end of file diff --git a/thirdparty/crates/cc-1.4.2/.cargo_vcs_info.json b/thirdparty/crates/cc-1.4.2/.cargo_vcs_info.json new file mode 100644 index 000000000..bea81062a --- /dev/null +++ b/thirdparty/crates/cc-1.4.2/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "a91e05ec40f26d4637d4bff9e9764221d0a59dd8" + }, + "path_in_vcs": "" +} \ No newline at end of file diff --git a/thirdparty/crates/cc-1.4.2/.tombi.toml b/thirdparty/crates/cc-1.4.2/.tombi.toml new file mode 100644 index 000000000..e2557d383 --- /dev/null +++ b/thirdparty/crates/cc-1.4.2/.tombi.toml @@ -0,0 +1,8 @@ +[format.rules] +indent-width = 4 +string-quote-style = "preserve" + +[[schemas]] +toml-version = "v1.0.0" +path = "tombi://www.schemastore.org/cargo.json" +include = ["Cargo.toml"] diff --git a/thirdparty/crates/cc-1.3.0/BUILD.bazel b/thirdparty/crates/cc-1.4.2/BUILD.bazel similarity index 97% rename from thirdparty/crates/cc-1.3.0/BUILD.bazel rename to thirdparty/crates/cc-1.4.2/BUILD.bazel index 4d86213fb..e6d27857e 100644 --- a/thirdparty/crates/cc-1.3.0/BUILD.bazel +++ b/thirdparty/crates/cc-1.4.2/BUILD.bazel @@ -35,7 +35,7 @@ rust_library( ], ), crate_root = "src/lib.rs", - edition = "2018", + edition = "2021", rustc_env_files = [ ":cargo_toml_env_vars", ], @@ -106,9 +106,9 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "1.3.0", + version = "1.4.2", deps = [ - "//thirdparty/crates/find-msvc-tools-0.1.9:find_msvc_tools", + "//thirdparty/crates/find-msvc-tools-0.1.10:find_msvc_tools", "//thirdparty/crates/shlex-2.0.1:shlex", ], ) diff --git a/thirdparty/crates/cc-1.3.0/CHANGELOG.md b/thirdparty/crates/cc-1.4.2/CHANGELOG.md similarity index 96% rename from thirdparty/crates/cc-1.3.0/CHANGELOG.md rename to thirdparty/crates/cc-1.4.2/CHANGELOG.md index beff3dd6b..3211e21e3 100644 --- a/thirdparty/crates/cc-1.3.0/CHANGELOG.md +++ b/thirdparty/crates/cc-1.4.2/CHANGELOG.md @@ -7,6 +7,35 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [1.4.2](https://github.com/rust-lang/cc-rs/compare/cc-v1.4.1...cc-v1.4.2) - 2026-08-08 + +### Fixed + +- Infer NEON, not VFPv4, from `neon` in the target name ([#1843](https://github.com/rust-lang/cc-rs/pull/1843)) +- do not emit `-mno-omit-leaf-frame-pointer` if unsupported ([#1845](https://github.com/rust-lang/cc-rs/pull/1845)) + +## [1.4.1](https://github.com/rust-lang/cc-rs/compare/cc-v1.4.0...cc-v1.4.1) - 2026-08-07 + +### Fixed + +- Fix `-Cforce-frame-pointers`'s corresponding `CFLAGS` ([#1814](https://github.com/rust-lang/cc-rs/pull/1814)) +- Fix parsing of thumbv7a-vex-v5 ([#1840](https://github.com/rust-lang/cc-rs/pull/1840)) + +### Other + +- Regenerate target info ([#1839](https://github.com/rust-lang/cc-rs/pull/1839)) +- Add `aarch64_be` to `prefix_for_target` ([#1835](https://github.com/rust-lang/cc-rs/pull/1835)) +- Use lp64d ABI for Managarm riscv64 ([#1829](https://github.com/rust-lang/cc-rs/pull/1829)) +- Make cc work on Motor OS ([#1822](https://github.com/rust-lang/cc-rs/pull/1822)) +- Update edition to 2021 ([#1811](https://github.com/rust-lang/cc-rs/pull/1811)) +- Update MSRV to 1.64 ([#1808](https://github.com/rust-lang/cc-rs/pull/1808)) + +## [1.4.0](https://github.com/rust-lang/cc-rs/compare/cc-v1.3.0...cc-v1.4.0) - 2026-07-24 + +### Added + +- support trim paths with clang-cl.exe ([#1799](https://github.com/rust-lang/cc-rs/pull/1799)) + ## [1.3.0](https://github.com/rust-lang/cc-rs/compare/cc-v1.2.67...cc-v1.3.0) - 2026-07-18 ### Added diff --git a/thirdparty/crates/cc-1.3.0/Cargo.lock b/thirdparty/crates/cc-1.4.2/Cargo.lock similarity index 91% rename from thirdparty/crates/cc-1.3.0/Cargo.lock rename to thirdparty/crates/cc-1.4.2/Cargo.lock index 3663dbbb0..395c5c636 100644 --- a/thirdparty/crates/cc-1.3.0/Cargo.lock +++ b/thirdparty/crates/cc-1.4.2/Cargo.lock @@ -10,7 +10,7 @@ checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" [[package]] name = "cc" -version = "1.3.0" +version = "1.4.2" dependencies = [ "find-msvc-tools", "jobserver", @@ -37,15 +37,15 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" [[package]] name = "find-msvc-tools" -version = "0.1.9" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582" +checksum = "26b73573e6edcd2af0cdf47bd6cb58f0b3839491263c314eaad1ccf24430e1de" [[package]] name = "getrandom" @@ -70,9 +70,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.186" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] name = "linux-raw-sys" diff --git a/thirdparty/crates/cc-1.3.0/Cargo.toml b/thirdparty/crates/cc-1.4.2/Cargo.toml similarity index 91% rename from thirdparty/crates/cc-1.3.0/Cargo.toml rename to thirdparty/crates/cc-1.4.2/Cargo.toml index bd9097106..96402d528 100644 --- a/thirdparty/crates/cc-1.3.0/Cargo.toml +++ b/thirdparty/crates/cc-1.4.2/Cargo.toml @@ -10,16 +10,15 @@ # See Cargo.toml.orig for the original contents. [package] -edition = "2018" -rust-version = "1.63" +edition = "2021" +rust-version = "1.64.0" name = "cc" -version = "1.3.0" -authors = ["Alex Crichton "] +version = "1.4.2" build = false exclude = [ "/.github", - "tests", "src/bin", + "tests", ] autolib = false autobins = false @@ -42,8 +41,8 @@ repository = "https://github.com/rust-lang/cc-rs" [features] jobserver = [] parallel = [ - "dep:libc", "dep:jobserver", + "dep:libc", ] [lib] @@ -51,7 +50,7 @@ name = "cc" path = "src/lib.rs" [dependencies.find-msvc-tools] -version = "0.1.9" +version = "0.1.10" [dependencies.jobserver] version = "0.1.30" @@ -65,7 +64,7 @@ version = "2.0.1" version = "3" [target."cfg(unix)".dependencies.libc] -version = "0.2.62" +version = "0.2.168" optional = true default-features = false diff --git a/thirdparty/crates/cc-1.3.0/Cargo.toml.orig b/thirdparty/crates/cc-1.4.2/Cargo.toml.orig similarity index 76% rename from thirdparty/crates/cc-1.3.0/Cargo.toml.orig rename to thirdparty/crates/cc-1.4.2/Cargo.toml.orig index 1515a5c65..6caea7f9f 100644 --- a/thirdparty/crates/cc-1.3.0/Cargo.toml.orig +++ b/thirdparty/crates/cc-1.4.2/Cargo.toml.orig @@ -1,59 +1,61 @@ [package] name = "cc" -version = "1.3.0" -authors = ["Alex Crichton "] -license = "MIT OR Apache-2.0" -repository = "https://github.com/rust-lang/cc-rs" -homepage = "https://github.com/rust-lang/cc-rs" -documentation = "https://docs.rs/cc" +version = "1.4.2" +edition.workspace = true +rust-version.workspace = true description = """ A build-time dependency for Cargo build scripts to assist in invoking the native C compiler to compile native C code into a static archive to be linked into Rust code. """ -keywords = ["build-dependencies"] +documentation = "https://docs.rs/cc" readme = "README.md" +homepage = "https://github.com/rust-lang/cc-rs" +repository = "https://github.com/rust-lang/cc-rs" +license = "MIT OR Apache-2.0" +keywords = ["build-dependencies"] categories = ["development-tools::build-utils"] # The binary target is only used by tests. -exclude = ["/.github", "tests", "src/bin"] -edition = "2018" -rust-version = "1.63" +exclude = ["/.github", "src/bin", "tests"] + +[workspace] +members = [ + "dev-tools/cc-test", + "dev-tools/gen-target-info", + "dev-tools/gen-windows-sys-binding", + "dev-tools/wasi-test", + "find-msvc-tools", +] + +[workspace.package] +edition = "2021" +rust-version = "1.64.0" [dependencies] +find-msvc-tools = { path = "find-msvc-tools", version = "0.1.10" } jobserver = { version = "0.1.30", default-features = false, optional = true } shlex = "2.0.1" -find-msvc-tools = { version = "0.1.9", path = "find-msvc-tools" } + +[dev-dependencies] +tempfile = "3" [target.'cfg(unix)'.dependencies] # Don't turn on the feature "std" for this, see https://github.com/rust-lang/cargo/issues/4866 # which is still an issue with `resolver = "1"`. -libc = { version = "0.2.62", default-features = false, optional = true } +libc = { version = "0.2.168", default-features = false, optional = true } [features] -parallel = ["dep:libc", "dep:jobserver"] # This is a placeholder feature for people who incorrectly used `cc` with `features = ["jobserver"]` # so that they aren't broken. This has never enabled `parallel`, so we won't do that. jobserver = [] +parallel = ["dep:jobserver", "dep:libc"] -[dev-dependencies] -tempfile = "3" - -[workspace] -members = [ - "find-msvc-tools", - "dev-tools/cc-test", - "dev-tools/gen-target-info", - "dev-tools/gen-windows-sys-binding", - "dev-tools/wasi-test", -] +[lints.rust] +unexpected_cfgs = { level = "allow", check-cfg = ['cfg(disable_clang_cl_tests)'] } [patch.crates-io] cc = { path = "." } -[lints.rust] -unexpected_cfgs = { level = "allow", check-cfg = ['cfg(disable_clang_cl_tests)'] } - [profile.release] -opt-level = 3 # Or "s" or "z" for different optimization goals +opt-level = 3 # Or "s" or "z" for different optimization goals lto = true - diff --git a/thirdparty/crates/cc-1.3.0/LICENSE-APACHE b/thirdparty/crates/cc-1.4.2/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/cc-1.3.0/LICENSE-APACHE rename to thirdparty/crates/cc-1.4.2/LICENSE-APACHE diff --git a/thirdparty/crates/cc-1.3.0/LICENSE-MIT b/thirdparty/crates/cc-1.4.2/LICENSE-MIT similarity index 100% rename from thirdparty/crates/cc-1.3.0/LICENSE-MIT rename to thirdparty/crates/cc-1.4.2/LICENSE-MIT diff --git a/thirdparty/crates/cc-1.3.0/README.md b/thirdparty/crates/cc-1.4.2/README.md similarity index 100% rename from thirdparty/crates/cc-1.3.0/README.md rename to thirdparty/crates/cc-1.4.2/README.md diff --git a/thirdparty/crates/cc-1.3.0/clippy.toml b/thirdparty/crates/cc-1.4.2/clippy.toml similarity index 100% rename from thirdparty/crates/cc-1.3.0/clippy.toml rename to thirdparty/crates/cc-1.4.2/clippy.toml diff --git a/thirdparty/crates/cc-1.3.0/src/command_helpers.rs b/thirdparty/crates/cc-1.4.2/src/command_helpers.rs similarity index 100% rename from thirdparty/crates/cc-1.3.0/src/command_helpers.rs rename to thirdparty/crates/cc-1.4.2/src/command_helpers.rs diff --git a/thirdparty/crates/cc-1.3.0/src/detect_compiler_family.c b/thirdparty/crates/cc-1.4.2/src/detect_compiler_family.c similarity index 100% rename from thirdparty/crates/cc-1.3.0/src/detect_compiler_family.c rename to thirdparty/crates/cc-1.4.2/src/detect_compiler_family.c diff --git a/thirdparty/crates/cc-1.3.0/src/flags.rs b/thirdparty/crates/cc-1.4.2/src/flags.rs similarity index 98% rename from thirdparty/crates/cc-1.3.0/src/flags.rs rename to thirdparty/crates/cc-1.4.2/src/flags.rs index f3830212f..015977cb9 100644 --- a/thirdparty/crates/cc-1.3.0/src/flags.rs +++ b/thirdparty/crates/cc-1.4.2/src/flags.rs @@ -244,15 +244,13 @@ impl<'this> RustcCodegenFlags<'this> { } } // https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fno-omit-frame-pointer - // https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-fomit-frame-pointer + // https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-momit-leaf-frame-pointer // https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html#index-fomit-frame-pointer if let Some(value) = self.force_frame_pointers { - let cc_flag = if value { - "-fno-omit-frame-pointer" - } else { - "-fomit-frame-pointer" - }; - push_if_supported(cc_flag.into()); + if value { + push_if_supported("-fno-omit-frame-pointer".into()); + push_if_supported("-mno-omit-leaf-frame-pointer".into()); + } } // https://clang.llvm.org/docs/ClangCommandLineReference.html#cmdoption-clang-mno-red-zone // https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-mno-red-zone diff --git a/thirdparty/crates/cc-1.3.0/src/lib.rs b/thirdparty/crates/cc-1.4.2/src/lib.rs similarity index 99% rename from thirdparty/crates/cc-1.3.0/src/lib.rs rename to thirdparty/crates/cc-1.4.2/src/lib.rs index 38b6137d7..6b77203a3 100644 --- a/thirdparty/crates/cc-1.3.0/src/lib.rs +++ b/thirdparty/crates/cc-1.4.2/src/lib.rs @@ -2264,7 +2264,16 @@ impl Build { if self.get_force_frame_pointer() { let family = cmd.family; - family.add_force_frame_pointer(cmd); + if let ToolFamily::Gnu | ToolFamily::Clang { .. } = family { + cmd.push_cc_arg("-fno-omit-frame-pointer".into()); + let flag = OsString::from("-mno-omit-leaf-frame-pointer"); + if self + .is_flag_supported_inner(&flag, cmd, target) + .unwrap_or(false) + { + cmd.push_cc_arg(flag); + } + } } if !cmd.is_like_msvc() { @@ -2478,7 +2487,7 @@ impl Build { } if target.full_arch.contains("neon") { - cmd.args.push("-mfpu=neon-vfpv4".into()); + cmd.args.push("-mfpu=neon".into()); } if target.full_arch == "armv4t" && target.os == "linux" { @@ -2614,7 +2623,7 @@ impl Build { // get the 32i/32imac/32imc/64gc/64imac/... part let arch = &target.full_arch[5..]; if arch.starts_with("64") { - if matches!(target.os, "linux" | "freebsd" | "netbsd") { + if matches!(target.os, "linux" | "freebsd" | "netbsd" | "managarm") { cmd.args.push(("-march=rv64gc").into()); cmd.args.push("-mabi=lp64d".into()); } else { @@ -2708,9 +2717,9 @@ impl Build { /// /// [`trim-paths`]: https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#profile-trim-paths-option fn add_trim_paths_flags(&self, cmd: &mut Tool, target: &TargetInfo<'_>) -> Result<(), Error> { - // MSVC has no equivalent of the `-f*-prefix-map` flag family. - // Left out until there is demand for it. - if cmd.is_like_msvc() { + // Native MSVC has no documented equivalent of the `-f*-prefix-map` flag family. + // clang-cl parses Clang driver options when wrapped in `/clang:`. + if cmd.is_like_msvc() && !cmd.is_like_clang_cl() { return Ok(()); } let scope = match cargo_env_var_os("CARGO_TRIM_PATHS_SCOPE") { @@ -2759,18 +2768,28 @@ impl Build { return Ok(()); } + // clang-cl parses Clang driver options when wrapped in `/clang:`. + // + let clang_driver = if cmd.is_like_clang_cl() { + "/clang:" + } else { + "" + }; + for pair in env::split_paths(&remap) { let pair = pair.as_os_str(); if pair.is_empty() { continue; } if macro_scope { - let mut flag = OsString::from("-fmacro-prefix-map="); + let mut flag = OsString::from(clang_driver); + flag.push("-fmacro-prefix-map="); flag.push(pair); cmd.push_cc_arg(flag); } if object_scope { - let mut flag = OsString::from("-fdebug-prefix-map="); + let mut flag = OsString::from(clang_driver); + flag.push("-fdebug-prefix-map="); flag.push(pair); cmd.push_cc_arg(flag); } @@ -2802,6 +2821,13 @@ impl Build { "paths embedded in debug info will not be remapped", ), }; + // clang-cl parses Clang driver options when wrapped in `/clang:`. + // + let flag = if cmd.is_like_clang_cl() { + format!("/clang:{flag}") + } else { + flag.to_owned() + }; let probe = format!("{flag}=/probe=/probe"); let supported = self .is_flag_supported_inner(OsStr::new(&probe), cmd, target) @@ -3842,6 +3868,7 @@ impl Build { "aarch64-uwp-windows-gnu" => Some("aarch64-w64-mingw32"), "aarch64-unknown-helenos" => Some("aarch64-helenos"), "aarch64-unknown-linux-gnu" => Some("aarch64-linux-gnu"), + "aarch64_be-unknown-linux-gnu" => Some("aarch64_be-linux-gnu"), "aarch64-unknown-linux-musl" => Some("aarch64-linux-musl"), "aarch64-unknown-linux-relibc" => Some("aarch64-linux-relibc"), "aarch64-unknown-netbsd" => Some("aarch64--netbsd"), diff --git a/thirdparty/crates/cc-1.3.0/src/parallel/async_executor.rs b/thirdparty/crates/cc-1.4.2/src/parallel/async_executor.rs similarity index 100% rename from thirdparty/crates/cc-1.3.0/src/parallel/async_executor.rs rename to thirdparty/crates/cc-1.4.2/src/parallel/async_executor.rs diff --git a/thirdparty/crates/cc-1.3.0/src/parallel/command_runner.rs b/thirdparty/crates/cc-1.4.2/src/parallel/command_runner.rs similarity index 100% rename from thirdparty/crates/cc-1.3.0/src/parallel/command_runner.rs rename to thirdparty/crates/cc-1.4.2/src/parallel/command_runner.rs diff --git a/thirdparty/crates/cc-1.3.0/src/parallel/job_token.rs b/thirdparty/crates/cc-1.4.2/src/parallel/job_token.rs similarity index 100% rename from thirdparty/crates/cc-1.3.0/src/parallel/job_token.rs rename to thirdparty/crates/cc-1.4.2/src/parallel/job_token.rs diff --git a/thirdparty/crates/cc-1.3.0/src/parallel/mod.rs b/thirdparty/crates/cc-1.4.2/src/parallel/mod.rs similarity index 100% rename from thirdparty/crates/cc-1.3.0/src/parallel/mod.rs rename to thirdparty/crates/cc-1.4.2/src/parallel/mod.rs diff --git a/thirdparty/crates/cc-1.3.0/src/parallel/stderr.rs b/thirdparty/crates/cc-1.4.2/src/parallel/stderr.rs similarity index 96% rename from thirdparty/crates/cc-1.3.0/src/parallel/stderr.rs rename to thirdparty/crates/cc-1.4.2/src/parallel/stderr.rs index 8533fec9a..fca528d25 100644 --- a/thirdparty/crates/cc-1.3.0/src/parallel/stderr.rs +++ b/thirdparty/crates/cc-1.4.2/src/parallel/stderr.rs @@ -25,7 +25,7 @@ fn get_flags(fd: std::os::unix::io::RawFd) -> Result { } #[cfg(unix)] -fn set_flags(fd: std::os::unix::io::RawFd, flags: std::os::raw::c_int) -> Result<(), Error> { +fn set_flags(fd: std::os::unix::io::RawFd, flags: core::ffi::c_int) -> Result<(), Error> { if unsafe { libc::fcntl(fd, libc::F_SETFL, flags) } == -1 { Err(Error::new( ErrorKind::IOError, diff --git a/thirdparty/crates/cc-1.3.0/src/target.rs b/thirdparty/crates/cc-1.4.2/src/target.rs similarity index 100% rename from thirdparty/crates/cc-1.3.0/src/target.rs rename to thirdparty/crates/cc-1.4.2/src/target.rs diff --git a/thirdparty/crates/cc-1.3.0/src/target/apple.rs b/thirdparty/crates/cc-1.4.2/src/target/apple.rs similarity index 100% rename from thirdparty/crates/cc-1.3.0/src/target/apple.rs rename to thirdparty/crates/cc-1.4.2/src/target/apple.rs diff --git a/thirdparty/crates/cc-1.3.0/src/target/generated.rs b/thirdparty/crates/cc-1.4.2/src/target/generated.rs similarity index 99% rename from thirdparty/crates/cc-1.3.0/src/target/generated.rs rename to thirdparty/crates/cc-1.4.2/src/target/generated.rs index 98bed9fad..b5f950a35 100644 --- a/thirdparty/crates/cc-1.3.0/src/target/generated.rs +++ b/thirdparty/crates/cc-1.4.2/src/target/generated.rs @@ -102,7 +102,6 @@ pub(crate) const LLVM_TARGETS: &[(&str, &str)] = &[ ("armv7a-none-eabihf", "armv7a-none-eabihf"), ("armv7a-nuttx-eabi", "armv7a-none-eabi"), ("armv7a-nuttx-eabihf", "armv7a-none-eabihf"), - ("armv7a-vex-v5", "armv7a-none-eabihf"), ("armv7k-apple-watchos", "armv7k-apple-watchos"), ("armv7r-none-eabi", "armv7r-none-eabi"), ("armv7r-none-eabihf", "armv7r-none-eabihf"), @@ -257,6 +256,7 @@ pub(crate) const LLVM_TARGETS: &[(&str, &str)] = &[ ("thumbv7a-nuttx-eabihf", "thumbv7a-none-eabihf"), ("thumbv7a-pc-windows-msvc", "thumbv7a-pc-windows-msvc"), ("thumbv7a-uwp-windows-msvc", "thumbv7a-pc-windows-msvc"), + ("thumbv7a-vex-v5", "thumbv7a-none-eabihf"), ("thumbv7em-none-eabi", "thumbv7em-none-eabi"), ("thumbv7em-none-eabihf", "thumbv7em-none-eabihf"), ("thumbv7em-nuttx-eabi", "thumbv7em-none-eabi"), diff --git a/thirdparty/crates/cc-1.3.0/src/target/llvm.rs b/thirdparty/crates/cc-1.4.2/src/target/llvm.rs similarity index 99% rename from thirdparty/crates/cc-1.3.0/src/target/llvm.rs rename to thirdparty/crates/cc-1.4.2/src/target/llvm.rs index 2bc3e1b92..a18d79dfc 100644 --- a/thirdparty/crates/cc-1.3.0/src/target/llvm.rs +++ b/thirdparty/crates/cc-1.4.2/src/target/llvm.rs @@ -118,6 +118,7 @@ impl TargetInfo<'_> { } #[cfg(test)] +#[allow(clippy::disallowed_methods)] mod tests { use std::process::Command; diff --git a/thirdparty/crates/cc-1.3.0/src/target/parser.rs b/thirdparty/crates/cc-1.4.2/src/target/parser.rs similarity index 99% rename from thirdparty/crates/cc-1.3.0/src/target/parser.rs rename to thirdparty/crates/cc-1.4.2/src/target/parser.rs index 472b3134b..0ac9c27d5 100644 --- a/thirdparty/crates/cc-1.3.0/src/target/parser.rs +++ b/thirdparty/crates/cc-1.4.2/src/target/parser.rs @@ -275,9 +275,17 @@ impl<'a> TargetInfo<'a> { }); } - if target == "armv7a-vex-v5" { + let mut components = target.split('-'); + + // Insist that the target name contains at least a valid architecture. + let full_arch = components.next().ok_or(Error::new( + ErrorKind::InvalidTarget, + "target was empty".to_string(), + ))?; + + if target == "armv7a-vex-v5" || target == "thumbv7a-vex-v5" { return Ok(Self { - full_arch: "armv7a", + full_arch, arch: "arm", vendor: "vex", os: "vexos", @@ -286,13 +294,6 @@ impl<'a> TargetInfo<'a> { }); } - let mut components = target.split('-'); - - // Insist that the target name contains at least a valid architecture. - let full_arch = components.next().ok_or(Error::new( - ErrorKind::InvalidTarget, - "target was empty".to_string(), - ))?; let arch = parse_arch(full_arch).ok_or_else(|| { Error::new( ErrorKind::UnknownTarget, @@ -460,6 +461,7 @@ impl<'a> TargetInfo<'a> { #[cfg(test)] #[allow(unexpected_cfgs)] +#[allow(clippy::disallowed_methods)] mod tests { use std::process::Command; diff --git a/thirdparty/crates/cc-1.3.0/src/tempfile.rs b/thirdparty/crates/cc-1.4.2/src/tempfile.rs similarity index 93% rename from thirdparty/crates/cc-1.3.0/src/tempfile.rs rename to thirdparty/crates/cc-1.4.2/src/tempfile.rs index 310c91b0a..bc832a731 100644 --- a/thirdparty/crates/cc-1.3.0/src/tempfile.rs +++ b/thirdparty/crates/cc-1.4.2/src/tempfile.rs @@ -1,14 +1,17 @@ #![cfg_attr(target_family = "wasm", allow(unused))] +#[cfg(any(all(unix, not(target_os = "wasi")), windows))] +use std::os; + use std::{ collections::hash_map::RandomState, fs::{remove_file, File, OpenOptions}, hash::{BuildHasher, Hasher}, - io, os, + io, path::{Path, PathBuf}, }; -#[cfg(not(any(unix, target_family = "wasm", windows)))] +#[cfg(not(any(unix, target_family = "wasm", windows, target_os = "motor")))] compile_error!("Your system is not supported since cc cannot create named tempfile"); fn rand() -> u64 { diff --git a/thirdparty/crates/cc-1.3.0/src/tool.rs b/thirdparty/crates/cc-1.4.2/src/tool.rs similarity index 98% rename from thirdparty/crates/cc-1.3.0/src/tool.rs rename to thirdparty/crates/cc-1.4.2/src/tool.rs index 9450088d4..026f29ff7 100644 --- a/thirdparty/crates/cc-1.3.0/src/tool.rs +++ b/thirdparty/crates/cc-1.4.2/src/tool.rs @@ -548,16 +548,6 @@ impl ToolFamily { } } - /// What the flag to force frame pointers. - pub(crate) fn add_force_frame_pointer(&self, cmd: &mut Tool) { - match *self { - ToolFamily::Gnu | ToolFamily::Clang { .. } => { - cmd.push_cc_arg("-fno-omit-frame-pointer".into()); - } - _ => (), - } - } - /// What the flags to enable all warnings pub(crate) fn warnings_flags(&self) -> &'static str { match *self { diff --git a/thirdparty/crates/cc-1.3.0/src/utilities.rs b/thirdparty/crates/cc-1.4.2/src/utilities.rs similarity index 100% rename from thirdparty/crates/cc-1.3.0/src/utilities.rs rename to thirdparty/crates/cc-1.4.2/src/utilities.rs diff --git a/thirdparty/crates/crates.bzl b/thirdparty/crates/crates.bzl index b3c0ef3ea..0b4b289ca 100644 --- a/thirdparty/crates/crates.bzl +++ b/thirdparty/crates/crates.bzl @@ -319,7 +319,7 @@ _NORMAL_DEPENDENCIES = { "chrono": Label("//thirdparty/crates/chrono-0.4.45:chrono"), "csv": Label("//thirdparty/crates/csv-1.4.0:csv"), "libm": Label("//thirdparty/crates/libm-0.2.16:libm"), - "parquet": Label("//thirdparty/crates/parquet-59.1.0:parquet"), + "parquet": Label("//thirdparty/crates/parquet-59.2.0:parquet"), "rusty-fork": Label("//thirdparty/crates/rusty-fork-0.3.1:rusty_fork"), "tempfile": Label("//thirdparty/crates/tempfile-3.27.0:tempfile"), }, diff --git a/thirdparty/crates/errno-0.3.14/BUILD.bazel b/thirdparty/crates/errno-0.3.14/BUILD.bazel index 46fa5e0ab..71788cf48 100644 --- a/thirdparty/crates/errno-0.3.14/BUILD.bazel +++ b/thirdparty/crates/errno-0.3.14/BUILD.bazel @@ -112,124 +112,124 @@ rust_library( version = "0.3.14", deps = select({ "@rules_rust//rust/platform:aarch64-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-apple-ios": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-apple-ios-macabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ "//thirdparty/crates/windows-sys-0.61.2:windows_sys", # cfg(windows) ], "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:arm-unknown-linux-musleabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:armv7-linux-androideabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:i686-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:i686-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:i686-pc-windows-msvc": [ "//thirdparty/crates/windows-sys-0.61.2:windows_sys", # cfg(windows) ], "@rules_rust//rust/platform:i686-unknown-freebsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:loongarch64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:mips-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:sparc64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:sparc64-unknown-netbsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:sparc64-unknown-openbsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:wasm32-unknown-emscripten": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:wasm32-wasip1": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(target_os = "wasi") + "//thirdparty/crates/libc-0.2.189:libc", # cfg(target_os = "wasi") ], "@rules_rust//rust/platform:wasm32-wasip1-threads": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(target_os = "wasi") + "//thirdparty/crates/libc-0.2.189:libc", # cfg(target_os = "wasi") ], "@rules_rust//rust/platform:wasm32-wasip2": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(target_os = "wasi") + "//thirdparty/crates/libc-0.2.189:libc", # cfg(target_os = "wasi") ], "@rules_rust//rust/platform:x86_64-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-apple-ios": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-apple-ios-macabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "//thirdparty/crates/windows-sys-0.61.2:windows_sys", # cfg(windows) ], "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "//conditions:default": [], }), diff --git a/thirdparty/crates/fastrand-2.4.1/.cargo-checksum.json b/thirdparty/crates/fastrand-2.4.1/.cargo-checksum.json deleted file mode 100644 index 1975f0e8e..000000000 --- a/thirdparty/crates/fastrand-2.4.1/.cargo-checksum.json +++ /dev/null @@ -1 +0,0 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"31a126d13cdd7527cbf0c2de18b355bee7319eb3a21f94345071961e1574acbc","CHANGELOG.md":"74c8a6042d0d5a07640352f141581f25969ff25503ca048be64b4b84a5fa9097","Cargo.lock":"2c68a74e05abb45892471556e90f7ab74166efac8b33489fb3698809cc4be2ff","Cargo.toml":"ddcc0b1f1d0e93ae66a584509e180edab478b934de68dc675044f0950a91cf7e","Cargo.toml.orig":"baffab45f9f399986628f728ea90cce014129a416a90b503e1fcd8953db764f4","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"ea448b5f285766fff63cfcfdb851408ee2fe561f86b821f16d23fe004a4403ca","benches/bench.rs":"3e66f598806befa335fcf080494367a5dcbd115be7fdc30258be1e09a279a8e3","src/global_rng.rs":"1d57ec2be086420738ee563784bc7d05bc91f345490eb192507984cc4ab4b137","src/lib.rs":"af525e57558ee69d4c59947aec1eb5a9354f031b3eaef80aa9d71d68875ffefc","tests/char.rs":"a530b41837f5bf43701d983ef0267d9b44779d455f24cbf30b881cd348de9ee1","tests/smoke.rs":"0f40e5fd5f382de66cf8ddb7f7e0b3e968d979de75d3658a185d22b11e8e5fc2"},"package":"9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"} \ No newline at end of file diff --git a/thirdparty/crates/fastrand-2.4.1/.cargo_vcs_info.json b/thirdparty/crates/fastrand-2.4.1/.cargo_vcs_info.json deleted file mode 100644 index 47a09a4b1..000000000 --- a/thirdparty/crates/fastrand-2.4.1/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "728a5b503ff233098d9808d572295c4c4f652cd7" - }, - "path_in_vcs": "" -} \ No newline at end of file diff --git a/thirdparty/crates/fastrand-2.5.0/.cargo-checksum.json b/thirdparty/crates/fastrand-2.5.0/.cargo-checksum.json new file mode 100644 index 000000000..4aca1289b --- /dev/null +++ b/thirdparty/crates/fastrand-2.5.0/.cargo-checksum.json @@ -0,0 +1 @@ +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"bf0436c95d52c5d45ee6c6e1b9c37397d8fca2e5af42189fea0fc42e0504d9c4","CHANGELOG.md":"d0ecc653658392738be0daccc920a5c3ffe6996c328a9aa8f26ce897a5db7293","Cargo.lock":"55c915e89c3bc7efbd674353556d3922d9e26248d8cd949a0e14fa8f5ccd3477","Cargo.toml":"3f01725ad91d1a1705762821e9231ea15ddfa62648143516e68d64021ae31e08","Cargo.toml.orig":"3a9268695b7ade18e1a6feda9eeee58ef9e29a4c0911fb6b1fc8f25160bacf13","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"5f3d251d8bc1c793284f4cc720453b280c1c04f968a70b7b36b78d6c1e5c9973","benches/bench.rs":"9613f3e9f893ef0c227c158be2c91d766e60b80ce11faf226ac490057ee38546","src/global_rng.rs":"f14c504601f9273bf6fa49621cc9dad2329092fd87d35fe8963e55d99f597de2","src/lib.rs":"858da6a3831589762ec2214df3f8e8b09a1262708fb08072f1cf13c1260d6ce1","tests/char.rs":"a530b41837f5bf43701d983ef0267d9b44779d455f24cbf30b881cd348de9ee1","tests/smoke.rs":"0f40e5fd5f382de66cf8ddb7f7e0b3e968d979de75d3658a185d22b11e8e5fc2"},"package":"da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223"} \ No newline at end of file diff --git a/thirdparty/crates/fastrand-2.5.0/.cargo_vcs_info.json b/thirdparty/crates/fastrand-2.5.0/.cargo_vcs_info.json new file mode 100644 index 000000000..3024deba0 --- /dev/null +++ b/thirdparty/crates/fastrand-2.5.0/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "7a1cc2c69ebde6cb3442809213db3fe19a2cb0ba" + }, + "path_in_vcs": "" +} \ No newline at end of file diff --git a/thirdparty/crates/fastrand-2.4.1/BUILD.bazel b/thirdparty/crates/fastrand-2.5.0/BUILD.bazel similarity index 99% rename from thirdparty/crates/fastrand-2.4.1/BUILD.bazel rename to thirdparty/crates/fastrand-2.5.0/BUILD.bazel index a73ace307..8c1bd32dc 100644 --- a/thirdparty/crates/fastrand-2.4.1/BUILD.bazel +++ b/thirdparty/crates/fastrand-2.5.0/BUILD.bazel @@ -111,5 +111,5 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "2.4.1", + version = "2.5.0", ) diff --git a/thirdparty/crates/fastrand-2.4.1/CHANGELOG.md b/thirdparty/crates/fastrand-2.5.0/CHANGELOG.md similarity index 98% rename from thirdparty/crates/fastrand-2.4.1/CHANGELOG.md rename to thirdparty/crates/fastrand-2.5.0/CHANGELOG.md index 125aa906a..455730fda 100644 --- a/thirdparty/crates/fastrand-2.4.1/CHANGELOG.md +++ b/thirdparty/crates/fastrand-2.5.0/CHANGELOG.md @@ -1,3 +1,7 @@ +# Version 2.5.0 + +- Update `getrandom` to 0.4. (#131) + # Version 2.4.1 - Fix build failure with `js` feature. (#125) diff --git a/thirdparty/crates/fastrand-2.4.1/Cargo.lock b/thirdparty/crates/fastrand-2.5.0/Cargo.lock similarity index 89% rename from thirdparty/crates/fastrand-2.4.1/Cargo.lock rename to thirdparty/crates/fastrand-2.5.0/Cargo.lock index 077a09f85..041e97d64 100644 --- a/thirdparty/crates/fastrand-2.4.1/Cargo.lock +++ b/thirdparty/crates/fastrand-2.5.0/Cargo.lock @@ -47,9 +47,29 @@ version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" +[[package]] +name = "chacha20" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d524456ba66e72eb8b115ff89e01e497f8e6d11d78b70b1aa13c0fbd97540a81" +dependencies = [ + "cfg-if", + "cpufeatures", + "rand_core 0.10.1", +] + +[[package]] +name = "cpufeatures" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8b2a41393f66f16b0823bb79094d54ac5fbd34ab292ddafb9a0456ac9f87d201" +dependencies = [ + "libc", +] + [[package]] name = "fastrand" -version = "2.4.1" +version = "2.5.0" dependencies = [ "getrandom", "rand", @@ -90,15 +110,15 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.3.4" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if", "js-sys", "libc", "r-efi", - "wasip2", + "rand_core 0.10.1", "wasm-bindgen", ] @@ -189,15 +209,6 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" -[[package]] -name = "ppv-lite86" -version = "0.2.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" -dependencies = [ - "zerocopy", -] - [[package]] name = "proc-macro2" version = "1.0.105" @@ -218,38 +229,32 @@ dependencies = [ [[package]] name = "r-efi" -version = "5.3.0" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" +checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "rand" -version = "0.9.2" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6db2770f06117d490610c7488547d543617b21bfa07796d7a12f6f1bd53850d1" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" dependencies = [ - "rand_chacha", - "rand_core", + "chacha20", + "getrandom", + "rand_core 0.10.1", ] [[package]] -name = "rand_chacha" -version = "0.9.0" +name = "rand_core" +version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" -dependencies = [ - "ppv-lite86", - "rand_core", -] +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" [[package]] name = "rand_core" -version = "0.9.5" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" -dependencies = [ - "getrandom", -] +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" [[package]] name = "rustversion" @@ -348,15 +353,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasip2" -version = "1.0.2+wasi-0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5" -dependencies = [ - "wit-bindgen", -] - [[package]] name = "wasm-bindgen" version = "0.2.108" @@ -489,39 +485,13 @@ dependencies = [ "windows-link", ] -[[package]] -name = "wit-bindgen" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" - [[package]] name = "wyhash" version = "0.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca4d373340c479fd1e779f7a763acee85da3e423b1a9a9acccf97babcc92edbb" dependencies = [ - "rand_core", -] - -[[package]] -name = "zerocopy" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "668f5168d10b9ee831de31933dc111a459c97ec93225beb307aed970d1372dfd" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c7962b26b0a8685668b671ee4b54d007a67d4eaf05fda79ac0ecf41e32270f1" -dependencies = [ - "proc-macro2", - "quote", - "syn", + "rand_core 0.9.5", ] [[package]] diff --git a/thirdparty/crates/fastrand-2.4.1/Cargo.toml b/thirdparty/crates/fastrand-2.5.0/Cargo.toml similarity index 95% rename from thirdparty/crates/fastrand-2.4.1/Cargo.toml rename to thirdparty/crates/fastrand-2.5.0/Cargo.toml index ccf438e4e..b6705e0a2 100644 --- a/thirdparty/crates/fastrand-2.4.1/Cargo.toml +++ b/thirdparty/crates/fastrand-2.5.0/Cargo.toml @@ -13,7 +13,7 @@ edition = "2018" rust-version = "1.63" name = "fastrand" -version = "2.4.1" +version = "2.5.0" authors = ["Stjepan Glavina "] build = false exclude = ["/.*"] @@ -68,21 +68,21 @@ name = "bench" path = "benches/bench.rs" [dev-dependencies.getrandom] -version = "0.3.4" +version = "0.4" [dev-dependencies.rand] -version = "0.9" +version = "0.10" [dev-dependencies.wyhash] version = "0.6" [target.'cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))'.dependencies.getrandom] -version = "0.3.4" +version = "0.4" features = ["wasm_js"] optional = true [target.'cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))'.dev-dependencies.getrandom] -version = "0.3.4" +version = "0.4" features = ["wasm_js"] [target.'cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))'.dev-dependencies.wasm-bindgen-test] diff --git a/thirdparty/crates/fastrand-2.4.1/Cargo.toml.orig b/thirdparty/crates/fastrand-2.5.0/Cargo.toml.orig similarity index 82% rename from thirdparty/crates/fastrand-2.4.1/Cargo.toml.orig rename to thirdparty/crates/fastrand-2.5.0/Cargo.toml.orig index 5e625d7b5..39472276a 100644 --- a/thirdparty/crates/fastrand-2.4.1/Cargo.toml.orig +++ b/thirdparty/crates/fastrand-2.5.0/Cargo.toml.orig @@ -3,7 +3,7 @@ name = "fastrand" # When publishing a new version: # - Update CHANGELOG.md # - Create "v2.x.y" git tag -version = "2.4.1" +version = "2.5.0" authors = ["Stjepan Glavina "] edition = "2018" rust-version = "1.63" @@ -21,16 +21,16 @@ std = ["alloc"] js = ["std", "getrandom"] [target.'cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))'.dependencies] -getrandom = { version = "0.3.4", features = ["wasm_js"], optional = true } +getrandom = { version = "0.4", features = ["wasm_js"], optional = true } [target.'cfg(all(any(target_arch = "wasm32", target_arch = "wasm64"), target_os = "unknown"))'.dev-dependencies] wasm-bindgen-test = "0.3" -getrandom = { version = "0.3.4", features = ["wasm_js"] } +getrandom = { version = "0.4", features = ["wasm_js"] } [dev-dependencies] -rand = "0.9" +rand = "0.10" wyhash = "0.6" -getrandom = "0.3.4" +getrandom = "0.4" [package.metadata.docs.rs] all-features = true diff --git a/thirdparty/crates/fastrand-2.4.1/LICENSE-APACHE b/thirdparty/crates/fastrand-2.5.0/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/fastrand-2.4.1/LICENSE-APACHE rename to thirdparty/crates/fastrand-2.5.0/LICENSE-APACHE diff --git a/thirdparty/crates/fastrand-2.4.1/LICENSE-MIT b/thirdparty/crates/fastrand-2.5.0/LICENSE-MIT similarity index 100% rename from thirdparty/crates/fastrand-2.4.1/LICENSE-MIT rename to thirdparty/crates/fastrand-2.5.0/LICENSE-MIT diff --git a/thirdparty/crates/fastrand-2.4.1/README.md b/thirdparty/crates/fastrand-2.5.0/README.md similarity index 91% rename from thirdparty/crates/fastrand-2.4.1/README.md rename to thirdparty/crates/fastrand-2.5.0/README.md index cb05f6cb5..f478b421a 100644 --- a/thirdparty/crates/fastrand-2.4.1/README.md +++ b/thirdparty/crates/fastrand-2.5.0/README.md @@ -1,6 +1,6 @@ # fastrand -[![Build](https://github.com/smol-rs/fastrand/workflows/CI/badge.svg)]( +[![Build](https://github.com/smol-rs/fastrand/actions/workflows/ci.yml/badge.svg)]( https://github.com/smol-rs/fastrand/actions) [![License](https://img.shields.io/badge/license-Apache--2.0_OR_MIT-blue.svg)]( https://github.com/smol-rs/fastrand) @@ -40,7 +40,7 @@ let i = fastrand::usize(..v.len()); let elem = v[i]; ``` -Sample values from an array with `O(n)` complexity (`n` is the length of array): +Sample values from an array with `O(n)` complexity (`n` is the length of the array): ```rust fastrand::choose_multiple([1, 4, 5], 2); @@ -79,7 +79,7 @@ generator: ```rust use std::iter::repeat_with; -let rng = fastrand::Rng::new(); +let mut rng = fastrand::Rng::new(); let mut bytes: Vec = repeat_with(|| rng.u8(..)).take(10_000).collect(); ``` @@ -98,8 +98,8 @@ This crate aims to expose a core set of useful randomness primitives. For more n Licensed under either of - * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0) - * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT) + * Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or https://www.apache.org/licenses/LICENSE-2.0) + * MIT license ([LICENSE-MIT](LICENSE-MIT) or https://opensource.org/license/mit) at your option. diff --git a/thirdparty/crates/fastrand-2.4.1/benches/bench.rs b/thirdparty/crates/fastrand-2.5.0/benches/bench.rs similarity index 75% rename from thirdparty/crates/fastrand-2.4.1/benches/bench.rs rename to thirdparty/crates/fastrand-2.5.0/benches/bench.rs index 1e2d200c2..4789e806e 100644 --- a/thirdparty/crates/fastrand-2.4.1/benches/bench.rs +++ b/thirdparty/crates/fastrand-2.5.0/benches/bench.rs @@ -4,11 +4,37 @@ extern crate test; use rand::prelude::*; use test::Bencher; -use wyhash::WyRng; + +/// Exposes wyhash's RNG through the rand traits +struct WyRng(u64); + +impl rand::TryRng for WyRng { + type Error = std::convert::Infallible; + + fn try_next_u32(&mut self) -> Result { + Ok(wyhash::wyrng(&mut self.0) as u32) + } + + fn try_next_u64(&mut self) -> Result { + Ok(wyhash::wyrng(&mut self.0)) + } + + fn try_fill_bytes(&mut self, dst: &mut [u8]) -> Result<(), Self::Error> { + for chunk in dst.chunks_mut(8) { + let bytes = wyhash::wyrng(&mut self.0).to_le_bytes(); + chunk.copy_from_slice(&bytes[..chunk.len()]); + } + Ok(()) + } +} + +fn wyrng() -> WyRng { + WyRng(rand::random()) +} #[bench] fn shuffle_wyhash(b: &mut Bencher) { - let mut rng = WyRng::from_rng(&mut rand::rng()); + let mut rng = wyrng(); let mut x = (0..100).collect::>(); b.iter(|| { x.shuffle(&mut rng); @@ -28,7 +54,7 @@ fn shuffle_fastrand(b: &mut Bencher) { #[bench] fn u8_wyhash(b: &mut Bencher) { - let mut rng = WyRng::from_rng(&mut rand::rng()); + let mut rng = wyrng(); b.iter(|| { let mut sum = 0u8; for _ in 0..10_000 { @@ -52,7 +78,7 @@ fn u8_fastrand(b: &mut Bencher) { #[bench] fn u32_wyhash(b: &mut Bencher) { - let mut rng = WyRng::from_rng(&mut rand::rng()); + let mut rng = wyrng(); b.iter(|| { let mut sum = 0u32; for _ in 0..10_000 { diff --git a/thirdparty/crates/fastrand-2.4.1/src/global_rng.rs b/thirdparty/crates/fastrand-2.5.0/src/global_rng.rs similarity index 97% rename from thirdparty/crates/fastrand-2.4.1/src/global_rng.rs rename to thirdparty/crates/fastrand-2.5.0/src/global_rng.rs index 1274d85da..bfece0a74 100644 --- a/thirdparty/crates/fastrand-2.4.1/src/global_rng.rs +++ b/thirdparty/crates/fastrand-2.5.0/src/global_rng.rs @@ -85,13 +85,13 @@ pub fn bool() -> bool { with_rng(|r| r.bool()) } -/// Generates a random `char` in ranges a-z and A-Z. +/// Generates a random `char` in range a-z and A-Z. #[inline] pub fn alphabetic() -> char { with_rng(|r| r.alphabetic()) } -/// Generates a random `char` in ranges a-z, A-Z and 0-9. +/// Generates a random `char` in range a-z, A-Z and 0-9. #[inline] pub fn alphanumeric() -> char { with_rng(|r| r.alphanumeric()) @@ -125,7 +125,7 @@ where /// Generates a random digit in the given `base`. /// -/// Digits are represented by `char`s in ranges 0-9 and a-z. +/// Digits are represented by `char`s in range 0-9 and a-z. /// /// Panics if the base is zero or greater than 36. #[inline] diff --git a/thirdparty/crates/fastrand-2.4.1/src/lib.rs b/thirdparty/crates/fastrand-2.5.0/src/lib.rs similarity index 99% rename from thirdparty/crates/fastrand-2.4.1/src/lib.rs rename to thirdparty/crates/fastrand-2.5.0/src/lib.rs index 1ff2d29f7..a75311032 100644 --- a/thirdparty/crates/fastrand-2.4.1/src/lib.rs +++ b/thirdparty/crates/fastrand-2.5.0/src/lib.rs @@ -29,7 +29,7 @@ //! let elem = v[i]; //! ``` //! -//! Sample values from an array with `O(n)` complexity (`n` is the length of array): +//! Sample values from an array with `O(n)` complexity (`n` is the length of the array): //! //! ``` //! fastrand::choose_multiple([1, 4, 5], 2); @@ -322,14 +322,14 @@ impl Rng { Rng::with_seed(self.gen_u64()) } - /// Generates a random `char` in ranges a-z and A-Z. + /// Generates a random `char` in range a-z and A-Z. #[inline] pub fn alphabetic(&mut self) -> char { const CHARS: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; *self.choice(CHARS).unwrap() as char } - /// Generates a random `char` in ranges a-z, A-Z and 0-9. + /// Generates a random `char` in range a-z, A-Z and 0-9. #[inline] pub fn alphanumeric(&mut self) -> char { const CHARS: &[u8] = b"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"; @@ -344,7 +344,7 @@ impl Rng { /// Generates a random digit in the given `base`. /// - /// Digits are represented by `char`s in ranges 0-9 and a-z. + /// Digits are represented by `char`s in range 0-9 and a-z. /// /// Panics if the base is zero or greater than 36. #[inline] diff --git a/thirdparty/crates/fastrand-2.4.1/tests/char.rs b/thirdparty/crates/fastrand-2.5.0/tests/char.rs similarity index 100% rename from thirdparty/crates/fastrand-2.4.1/tests/char.rs rename to thirdparty/crates/fastrand-2.5.0/tests/char.rs diff --git a/thirdparty/crates/fastrand-2.4.1/tests/smoke.rs b/thirdparty/crates/fastrand-2.5.0/tests/smoke.rs similarity index 100% rename from thirdparty/crates/fastrand-2.4.1/tests/smoke.rs rename to thirdparty/crates/fastrand-2.5.0/tests/smoke.rs diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/.cargo-checksum.json b/thirdparty/crates/find-msvc-tools-0.1.10/.cargo-checksum.json similarity index 51% rename from thirdparty/crates/find-msvc-tools-0.1.9/.cargo-checksum.json rename to thirdparty/crates/find-msvc-tools-0.1.10/.cargo-checksum.json index 92e7d9991..5e651582c 100644 --- a/thirdparty/crates/find-msvc-tools-0.1.9/.cargo-checksum.json +++ b/thirdparty/crates/find-msvc-tools-0.1.10/.cargo-checksum.json @@ -1 +1 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"a6a00e4fc7a085688fcd4550501bc164e55a5f6b84225a5a744d4124dd493e3d","CHANGELOG.md":"d8241689c2a2901c42c6c2284659915ed85e4c36216c1d5d771fa0be9c64a4a9","Cargo.lock":"ee3c45e2461f086b0122abd500f2c55bf9d05876ea6323b951578080cd158838","Cargo.toml":"1162710613011a622ba62b035b570cc13584516082f9cf579cfaf2f144a77a76","Cargo.toml.orig":"3941ba1194442678125b6ca4221a07ac27ac64f7dadd7467490e55e39cc205f9","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"5e7b2b1f5ffc1da7695d3e151a2d4d0b8f681e65a24ddf85a353d4bcfa81967a","src/com.rs":"d71a248866e04a19c62221999f7f120890cb98bc74ea7fd0b714f766d3e0dd81","src/find_tools.rs":"4b97e6f518943d4754ac73c77bc5932025bd1b48d10ed310694ed7d7449ae256","src/lib.rs":"56b0350126ad84accee5fd3d160c6a04a32d17012013fc6f687caf4b59a76ce8","src/registry.rs":"ccbb665b60517a62d249dbe708675ea915c423c14bea786e17efee27453afd41","src/setup_config.rs":"5fee84b80d089ae4a92f10080b072ea2bb32c2edbcdc759cb9072e380404fc46","src/tool.rs":"83e805a8354278837c474c0907b8dd80c496ae4812b2f777f2b2e4266ba68032","src/vs_instances.rs":"10a4433ff6799b11dc01da568ba20af9153aa645d9dc4154cf1c0da15308577c","src/winapi.rs":"d486d80ebe222f3bf61bba50038cf63b258585325b29b89d149de8b5a489c2b5","src/windows_link.rs":"5b4648ebc22b028caca9f4b4bf8881fe2d094b7bec217264ba2e6e2c49d1ccee","src/windows_sys.rs":"c3c803c6408795eb3a2bb3feaf3dc83a8d3049d76f026a4d25d21162fdb890dd"},"package":"5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"} \ No newline at end of file +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"be279434557bf7bbcd08f70569447e3237f1650ad6cc7050c6d320a1bff5d418","CHANGELOG.md":"85f9edf48b38e5564f6bbfbb99af63e4dcec5bc5496ae89ef6f8ea9d03ab33ee","Cargo.lock":"474d6dd15feca9ff76b8012a4f8c727b918852ae7abf420cc4ce01253e6f42c9","Cargo.toml":"eb34d67cf9399420e42952e6f9d8b5ded44c2c00a18539e4e3a97ecebb48040b","Cargo.toml.orig":"f200c563c19e6d8c7d0a67bcb9f969731be1c226c9e5f1be8ed5db51025ba13b","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"5e7b2b1f5ffc1da7695d3e151a2d4d0b8f681e65a24ddf85a353d4bcfa81967a","src/com.rs":"d71a248866e04a19c62221999f7f120890cb98bc74ea7fd0b714f766d3e0dd81","src/find_tools.rs":"b06efb1eed063c4350d1aef7d2a6cce6c30c3f43ddef06554e7d15f45f3fc1ed","src/lib.rs":"56b0350126ad84accee5fd3d160c6a04a32d17012013fc6f687caf4b59a76ce8","src/registry.rs":"ccbb665b60517a62d249dbe708675ea915c423c14bea786e17efee27453afd41","src/setup_config.rs":"5fee84b80d089ae4a92f10080b072ea2bb32c2edbcdc759cb9072e380404fc46","src/tool.rs":"83e805a8354278837c474c0907b8dd80c496ae4812b2f777f2b2e4266ba68032","src/vs_instances.rs":"4eb906d0ac2970afc03aa42c630ca20e4b9a10250b75677f8f4a59bcc0fb8c9a","src/winapi.rs":"388a7039db9381b3f038097883979480381fbfd395eb45a75359c70efe499a9a","src/windows_link.rs":"5b4648ebc22b028caca9f4b4bf8881fe2d094b7bec217264ba2e6e2c49d1ccee","src/windows_sys.rs":"c3c803c6408795eb3a2bb3feaf3dc83a8d3049d76f026a4d25d21162fdb890dd"},"package":"26b73573e6edcd2af0cdf47bd6cb58f0b3839491263c314eaad1ccf24430e1de"} \ No newline at end of file diff --git a/thirdparty/crates/find-msvc-tools-0.1.10/.cargo_vcs_info.json b/thirdparty/crates/find-msvc-tools-0.1.10/.cargo_vcs_info.json new file mode 100644 index 000000000..2b2d74ab7 --- /dev/null +++ b/thirdparty/crates/find-msvc-tools-0.1.10/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "b27570c6644e4f5a43ea4561878a80ea334c5a14" + }, + "path_in_vcs": "find-msvc-tools" +} \ No newline at end of file diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/BUILD.bazel b/thirdparty/crates/find-msvc-tools-0.1.10/BUILD.bazel similarity index 99% rename from thirdparty/crates/find-msvc-tools-0.1.9/BUILD.bazel rename to thirdparty/crates/find-msvc-tools-0.1.10/BUILD.bazel index e39af8a04..456cdd354 100644 --- a/thirdparty/crates/find-msvc-tools-0.1.9/BUILD.bazel +++ b/thirdparty/crates/find-msvc-tools-0.1.10/BUILD.bazel @@ -35,7 +35,7 @@ rust_library( ], ), crate_root = "src/lib.rs", - edition = "2018", + edition = "2021", rustc_env_files = [ ":cargo_toml_env_vars", ], @@ -106,5 +106,5 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.1.9", + version = "0.1.10", ) diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/CHANGELOG.md b/thirdparty/crates/find-msvc-tools-0.1.10/CHANGELOG.md similarity index 89% rename from thirdparty/crates/find-msvc-tools-0.1.9/CHANGELOG.md rename to thirdparty/crates/find-msvc-tools-0.1.10/CHANGELOG.md index 27dcec914..cc7b5bfcd 100644 --- a/thirdparty/crates/find-msvc-tools-0.1.9/CHANGELOG.md +++ b/thirdparty/crates/find-msvc-tools-0.1.10/CHANGELOG.md @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [0.1.10](https://github.com/rust-lang/cc-rs/compare/find-msvc-tools-v0.1.9...find-msvc-tools-v0.1.10) - 2026-08-07 + +### Other + +- Update edition to 2021 ([#1811](https://github.com/rust-lang/cc-rs/pull/1811)) +- Update MSRV to 1.64 ([#1808](https://github.com/rust-lang/cc-rs/pull/1808)) + ## [0.1.9](https://github.com/rust-lang/cc-rs/compare/find-msvc-tools-v0.1.8...find-msvc-tools-v0.1.9) - 2026-01-30 ### Other diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/Cargo.lock b/thirdparty/crates/find-msvc-tools-0.1.10/Cargo.lock similarity index 88% rename from thirdparty/crates/find-msvc-tools-0.1.9/Cargo.lock rename to thirdparty/crates/find-msvc-tools-0.1.10/Cargo.lock index b292c60e8..558d1586b 100644 --- a/thirdparty/crates/find-msvc-tools-0.1.9/Cargo.lock +++ b/thirdparty/crates/find-msvc-tools-0.1.10/Cargo.lock @@ -4,4 +4,4 @@ version = 3 [[package]] name = "find-msvc-tools" -version = "0.1.9" +version = "0.1.10" diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/Cargo.toml b/thirdparty/crates/find-msvc-tools-0.1.10/Cargo.toml similarity index 93% rename from thirdparty/crates/find-msvc-tools-0.1.9/Cargo.toml rename to thirdparty/crates/find-msvc-tools-0.1.10/Cargo.toml index 34ddf3045..a0e9487c6 100644 --- a/thirdparty/crates/find-msvc-tools-0.1.9/Cargo.toml +++ b/thirdparty/crates/find-msvc-tools-0.1.10/Cargo.toml @@ -10,10 +10,10 @@ # See Cargo.toml.orig for the original contents. [package] -edition = "2018" -rust-version = "1.63" +edition = "2021" +rust-version = "1.64.0" name = "find-msvc-tools" -version = "0.1.9" +version = "0.1.10" build = false autolib = false autobins = false @@ -32,8 +32,6 @@ repository = "https://github.com/rust-lang/cc-rs" name = "find_msvc_tools" path = "src/lib.rs" -[dependencies] - [lints.rust.unexpected_cfgs] level = "allow" priority = 0 diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/Cargo.toml.orig b/thirdparty/crates/find-msvc-tools-0.1.10/Cargo.toml.orig similarity index 85% rename from thirdparty/crates/find-msvc-tools-0.1.9/Cargo.toml.orig rename to thirdparty/crates/find-msvc-tools-0.1.10/Cargo.toml.orig index 0834c694b..c3f7b4abc 100644 --- a/thirdparty/crates/find-msvc-tools-0.1.9/Cargo.toml.orig +++ b/thirdparty/crates/find-msvc-tools-0.1.10/Cargo.toml.orig @@ -1,18 +1,14 @@ [package] name = "find-msvc-tools" -version = "0.1.9" -edition = "2018" -license = "MIT OR Apache-2.0" -repository = "https://github.com/rust-lang/cc-rs" -documentation = "https://docs.rs/find-msvc-tools" +version = "0.1.10" +edition.workspace = true +rust-version.workspace = true description = "Find windows-specific tools, read MSVC versions from the registry and from COM interfaces" +documentation = "https://docs.rs/find-msvc-tools" +repository = "https://github.com/rust-lang/cc-rs" +license = "MIT OR Apache-2.0" keywords = ["build-dependencies"] categories = ["development-tools::build-utils"] -rust-version = "1.63" - - -[dependencies] [lints.rust] unexpected_cfgs = { level = "allow", check-cfg = ['cfg(disable_clang_cl_tests)'] } - diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/LICENSE-APACHE b/thirdparty/crates/find-msvc-tools-0.1.10/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/find-msvc-tools-0.1.9/LICENSE-APACHE rename to thirdparty/crates/find-msvc-tools-0.1.10/LICENSE-APACHE diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/LICENSE-MIT b/thirdparty/crates/find-msvc-tools-0.1.10/LICENSE-MIT similarity index 100% rename from thirdparty/crates/find-msvc-tools-0.1.9/LICENSE-MIT rename to thirdparty/crates/find-msvc-tools-0.1.10/LICENSE-MIT diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/README.md b/thirdparty/crates/find-msvc-tools-0.1.10/README.md similarity index 100% rename from thirdparty/crates/find-msvc-tools-0.1.9/README.md rename to thirdparty/crates/find-msvc-tools-0.1.10/README.md diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/src/com.rs b/thirdparty/crates/find-msvc-tools-0.1.10/src/com.rs similarity index 100% rename from thirdparty/crates/find-msvc-tools-0.1.9/src/com.rs rename to thirdparty/crates/find-msvc-tools-0.1.10/src/com.rs diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/src/find_tools.rs b/thirdparty/crates/find-msvc-tools-0.1.10/src/find_tools.rs similarity index 96% rename from thirdparty/crates/find-msvc-tools-0.1.9/src/find_tools.rs rename to thirdparty/crates/find-msvc-tools-0.1.10/src/find_tools.rs index 0546bc9bf..b4ae764c7 100644 --- a/thirdparty/crates/find-msvc-tools-0.1.9/src/find_tools.rs +++ b/thirdparty/crates/find-msvc-tools-0.1.10/src/find_tools.rs @@ -560,7 +560,7 @@ mod impl_ { target: TargetArch, version: &'static str, env_getter: &dyn EnvGetter, - ) -> Box> { + ) -> Box> { let instances = if let Some(instances) = vs15plus_instances(target, env_getter) { instances } else { @@ -636,7 +636,7 @@ mod impl_ { AARCH64 => "ARM64", _ => return None, }; - if host_folder != "" { + if !host_folder.is_empty() { // E.g. C:\...\VC\Tools\LLVM\x64 base_path.push(host_folder); } @@ -753,7 +753,7 @@ mod impl_ { let tool = tool_from_vs15plus_instance(tool, target, &instance_path, env_getter)?; Some((version, tool)) }) - .max_by(|(a_version, _), (b_version, _)| a_version.cmp(b_version)) + .max_by_key(|(version, _)| *version) .map(|(_version, tool)| tool) } @@ -785,7 +785,7 @@ mod impl_ { .ok() .and_then(|key| key.query_str("15.0").ok()) .map(|path| PathBuf::from(path).join(tool)) - .and_then(|path| if path.is_file() { Some(path) } else { None }); + .filter(|path| path.is_file()); } path.map(|path| { @@ -941,8 +941,8 @@ mod impl_ { (name, version) }) }) - .max_by(|(_, a), (_, b)| a.cmp(b)) - .map(|(version, _)| version); + .max_by_key(|(_, version)| *version) + .map(|(name, _)| name); } version_path.push(version_file); File::open(version_path).ok()? @@ -1105,13 +1105,13 @@ mod impl_ { .map(|dir| dir.path()) .filter(|dir| { dir.components() - .last() + .next_back() .and_then(|c| c.as_os_str().to_str()) .map(|c| c.starts_with("10.") && dir.join("ucrt").is_dir()) .unwrap_or(false) }) .max()?; - let version = max_libdir.components().last().unwrap(); + let version = max_libdir.components().next_back().unwrap(); let version = version.as_os_str().to_str().unwrap().to_string(); Some((root.into(), version)) } @@ -1154,7 +1154,7 @@ mod impl_ { .into_iter() .rev() .find(|dir| dir.join("um").join("x64").join("kernel32.lib").is_file())?; - let version = dir.components().last().unwrap(); + let version = dir.components().next_back().unwrap(); let version = version.as_os_str().to_str().unwrap().to_string(); Some((root.into(), version)) } @@ -1244,6 +1244,115 @@ mod impl_ { } } + // Given a registry key, look at all the sub keys and find the one which has + // the maximal numeric value. + // + // Returns the name of the maximal key as well as the opened maximal key. + fn max_version(key: &RegistryKey) -> Option<(OsString, RegistryKey)> { + let mut max_vers = 0; + let mut max_key = None; + for subkey in key.iter().filter_map(|k| k.ok()) { + let val = subkey + .to_str() + .and_then(|s| s.trim_start_matches('v').replace('.', "").parse().ok()); + let val = match val { + Some(s) => s, + None => continue, + }; + if val > max_vers { + if let Ok(k) = key.open(&subkey) { + max_vers = val; + max_key = Some((subkey, k)); + } + } + } + max_key + } + + #[inline(always)] + pub(super) fn has_msbuild_version(version: &str, env_getter: &dyn EnvGetter) -> bool { + match version { + "18.0" => { + find_msbuild_vs18(TargetArch::X64, env_getter).is_some() + || find_msbuild_vs18(TargetArch::X86, env_getter).is_some() + || find_msbuild_vs18(TargetArch::Arm64, env_getter).is_some() + } + "17.0" => { + find_msbuild_vs17(TargetArch::X64, env_getter).is_some() + || find_msbuild_vs17(TargetArch::X86, env_getter).is_some() + || find_msbuild_vs17(TargetArch::Arm64, env_getter).is_some() + } + "16.0" => { + find_msbuild_vs16(TargetArch::X64, env_getter).is_some() + || find_msbuild_vs16(TargetArch::X86, env_getter).is_some() + || find_msbuild_vs16(TargetArch::Arm64, env_getter).is_some() + } + "15.0" => { + find_msbuild_vs15(TargetArch::X64, env_getter).is_some() + || find_msbuild_vs15(TargetArch::X86, env_getter).is_some() + || find_msbuild_vs15(TargetArch::Arm64, env_getter).is_some() + } + "14.0" => LOCAL_MACHINE + .open(&OsString::from(format!( + "SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\{}", + version + ))) + .is_ok(), + _ => false, + } + } + + pub(super) fn find_devenv(target: TargetArch, env_getter: &dyn EnvGetter) -> Option { + find_devenv_vs15(target, env_getter) + } + + fn find_devenv_vs15(target: TargetArch, env_getter: &dyn EnvGetter) -> Option { + find_tool_in_vs15_path(r"Common7\IDE\devenv.exe", target, env_getter) + } + + // see http://stackoverflow.com/questions/328017/path-to-msbuild + pub(super) fn find_msbuild(target: TargetArch, env_getter: &dyn EnvGetter) -> Option { + // VS 15 (2017) changed how to locate msbuild + if let Some(r) = find_msbuild_vs18(target, env_getter) { + Some(r) + } else if let Some(r) = find_msbuild_vs17(target, env_getter) { + Some(r) + } else if let Some(r) = find_msbuild_vs16(target, env_getter) { + Some(r) + } else if let Some(r) = find_msbuild_vs15(target, env_getter) { + Some(r) + } else { + find_old_msbuild(target) + } + } + + fn find_msbuild_vs15(target: TargetArch, env_getter: &dyn EnvGetter) -> Option { + find_tool_in_vs15_path(r"MSBuild\15.0\Bin\MSBuild.exe", target, env_getter) + } + + fn find_old_msbuild(target: TargetArch) -> Option { + let key = r"SOFTWARE\Microsoft\MSBuild\ToolsVersions"; + LOCAL_MACHINE + .open(key.as_ref()) + .ok() + .and_then(|key| { + max_version(&key).and_then(|(_vers, key)| key.query_str("MSBuildToolsPath").ok()) + }) + .map(|path| { + let mut path = PathBuf::from(path); + path.push("MSBuild.exe"); + let mut tool = Tool { + tool: path, + is_clang_cl: false, + env: Vec::new(), + }; + if target == TargetArch::X64 { + tool.env.push(("Platform".into(), "X64".into())); + } + tool + }) + } + #[cfg(test)] mod tests { use super::*; @@ -1341,44 +1450,41 @@ mod impl_ { let env_getter = StdEnvGetter; let result = find_llvm_tool(tool, target_arch, &env_getter); - match result { - Some(found_tool) => { - found_tools_count += 1; - - // Verify the found tool has a valid, non-empty path - assert!( - !found_tool.path().as_os_str().is_empty(), - "Found LLVM tool '{}' should have a non-empty path", - tool - ); - - // Verify the tool path actually exists on filesystem - assert!( - found_tool.path().exists(), - "LLVM tool '{}' path should exist: {:?}", - tool, - found_tool.path() - ); - - // Verify the tool path contains the expected tool name - let path_str = found_tool.path().to_string_lossy(); - assert!( - path_str.contains(tool.trim_end_matches(".exe")), - "Tool path '{}' should contain tool name '{}'", - path_str, - tool - ); - - // Verify it's in the correct host-specific VS LLVM directory - assert!( - path_str.contains(expected_host_path) || path_str.contains(&expected_host_path.replace("\\", "/")), - "LLVM tool should be in host-specific VS LLVM directory '{}' for {} host, but found: {}", - expected_host_path, - host_name, - path_str - ); - } - None => {} + if let Some(found_tool) = result { + found_tools_count += 1; + + // Verify the found tool has a valid, non-empty path + assert!( + !found_tool.path().as_os_str().is_empty(), + "Found LLVM tool '{}' should have a non-empty path", + tool + ); + + // Verify the tool path actually exists on filesystem + assert!( + found_tool.path().exists(), + "LLVM tool '{}' path should exist: {:?}", + tool, + found_tool.path() + ); + + // Verify the tool path contains the expected tool name + let path_str = found_tool.path().to_string_lossy(); + assert!( + path_str.contains(tool.trim_end_matches(".exe")), + "Tool path '{}' should contain tool name '{}'", + path_str, + tool + ); + + // Verify it's in the correct host-specific VS LLVM directory + assert!( + path_str.contains(expected_host_path) || path_str.contains(&expected_host_path.replace("\\", "/")), + "LLVM tool should be in host-specific VS LLVM directory '{}' for {} host, but found: {}", + expected_host_path, + host_name, + path_str + ); } } @@ -1391,115 +1497,6 @@ mod impl_ { ); } } - - // Given a registry key, look at all the sub keys and find the one which has - // the maximal numeric value. - // - // Returns the name of the maximal key as well as the opened maximal key. - fn max_version(key: &RegistryKey) -> Option<(OsString, RegistryKey)> { - let mut max_vers = 0; - let mut max_key = None; - for subkey in key.iter().filter_map(|k| k.ok()) { - let val = subkey - .to_str() - .and_then(|s| s.trim_start_matches('v').replace('.', "").parse().ok()); - let val = match val { - Some(s) => s, - None => continue, - }; - if val > max_vers { - if let Ok(k) = key.open(&subkey) { - max_vers = val; - max_key = Some((subkey, k)); - } - } - } - max_key - } - - #[inline(always)] - pub(super) fn has_msbuild_version(version: &str, env_getter: &dyn EnvGetter) -> bool { - match version { - "18.0" => { - find_msbuild_vs18(TargetArch::X64, env_getter).is_some() - || find_msbuild_vs18(TargetArch::X86, env_getter).is_some() - || find_msbuild_vs18(TargetArch::Arm64, env_getter).is_some() - } - "17.0" => { - find_msbuild_vs17(TargetArch::X64, env_getter).is_some() - || find_msbuild_vs17(TargetArch::X86, env_getter).is_some() - || find_msbuild_vs17(TargetArch::Arm64, env_getter).is_some() - } - "16.0" => { - find_msbuild_vs16(TargetArch::X64, env_getter).is_some() - || find_msbuild_vs16(TargetArch::X86, env_getter).is_some() - || find_msbuild_vs16(TargetArch::Arm64, env_getter).is_some() - } - "15.0" => { - find_msbuild_vs15(TargetArch::X64, env_getter).is_some() - || find_msbuild_vs15(TargetArch::X86, env_getter).is_some() - || find_msbuild_vs15(TargetArch::Arm64, env_getter).is_some() - } - "14.0" => LOCAL_MACHINE - .open(&OsString::from(format!( - "SOFTWARE\\Microsoft\\MSBuild\\ToolsVersions\\{}", - version - ))) - .is_ok(), - _ => false, - } - } - - pub(super) fn find_devenv(target: TargetArch, env_getter: &dyn EnvGetter) -> Option { - find_devenv_vs15(target, env_getter) - } - - fn find_devenv_vs15(target: TargetArch, env_getter: &dyn EnvGetter) -> Option { - find_tool_in_vs15_path(r"Common7\IDE\devenv.exe", target, env_getter) - } - - // see http://stackoverflow.com/questions/328017/path-to-msbuild - pub(super) fn find_msbuild(target: TargetArch, env_getter: &dyn EnvGetter) -> Option { - // VS 15 (2017) changed how to locate msbuild - if let Some(r) = find_msbuild_vs18(target, env_getter) { - Some(r) - } else if let Some(r) = find_msbuild_vs17(target, env_getter) { - Some(r) - } else if let Some(r) = find_msbuild_vs16(target, env_getter) { - return Some(r); - } else if let Some(r) = find_msbuild_vs15(target, env_getter) { - return Some(r); - } else { - find_old_msbuild(target) - } - } - - fn find_msbuild_vs15(target: TargetArch, env_getter: &dyn EnvGetter) -> Option { - find_tool_in_vs15_path(r"MSBuild\15.0\Bin\MSBuild.exe", target, env_getter) - } - - fn find_old_msbuild(target: TargetArch) -> Option { - let key = r"SOFTWARE\Microsoft\MSBuild\ToolsVersions"; - LOCAL_MACHINE - .open(key.as_ref()) - .ok() - .and_then(|key| { - max_version(&key).and_then(|(_vers, key)| key.query_str("MSBuildToolsPath").ok()) - }) - .map(|path| { - let mut path = PathBuf::from(path); - path.push("MSBuild.exe"); - let mut tool = Tool { - tool: path, - is_clang_cl: false, - env: Vec::new(), - }; - if target == TargetArch::X64 { - tool.env.push(("Platform".into(), "X64".into())); - } - tool - }) - } } /// Non-Windows Implementation. diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/src/lib.rs b/thirdparty/crates/find-msvc-tools-0.1.10/src/lib.rs similarity index 100% rename from thirdparty/crates/find-msvc-tools-0.1.9/src/lib.rs rename to thirdparty/crates/find-msvc-tools-0.1.10/src/lib.rs diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/src/registry.rs b/thirdparty/crates/find-msvc-tools-0.1.10/src/registry.rs similarity index 100% rename from thirdparty/crates/find-msvc-tools-0.1.9/src/registry.rs rename to thirdparty/crates/find-msvc-tools-0.1.10/src/registry.rs diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/src/setup_config.rs b/thirdparty/crates/find-msvc-tools-0.1.10/src/setup_config.rs similarity index 100% rename from thirdparty/crates/find-msvc-tools-0.1.9/src/setup_config.rs rename to thirdparty/crates/find-msvc-tools-0.1.10/src/setup_config.rs diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/src/tool.rs b/thirdparty/crates/find-msvc-tools-0.1.10/src/tool.rs similarity index 100% rename from thirdparty/crates/find-msvc-tools-0.1.9/src/tool.rs rename to thirdparty/crates/find-msvc-tools-0.1.10/src/tool.rs diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/src/vs_instances.rs b/thirdparty/crates/find-msvc-tools-0.1.10/src/vs_instances.rs similarity index 99% rename from thirdparty/crates/find-msvc-tools-0.1.9/src/vs_instances.rs rename to thirdparty/crates/find-msvc-tools-0.1.10/src/vs_instances.rs index 23089c77e..3fd13760b 100644 --- a/thirdparty/crates/find-msvc-tools-0.1.9/src/vs_instances.rs +++ b/thirdparty/crates/find-msvc-tools-0.1.10/src/vs_instances.rs @@ -50,7 +50,7 @@ pub enum VsInstances { impl IntoIterator for VsInstances { type Item = VsInstance; #[allow(bare_trait_objects)] - type IntoIter = Box>; + type IntoIter = Box>; fn into_iter(self) -> Self::IntoIter { match self { diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/src/winapi.rs b/thirdparty/crates/find-msvc-tools-0.1.10/src/winapi.rs similarity index 97% rename from thirdparty/crates/find-msvc-tools-0.1.9/src/winapi.rs rename to thirdparty/crates/find-msvc-tools-0.1.10/src/winapi.rs index 52790a585..0b03a3cc4 100644 --- a/thirdparty/crates/find-msvc-tools-0.1.9/src/winapi.rs +++ b/thirdparty/crates/find-msvc-tools-0.1.10/src/winapi.rs @@ -7,15 +7,13 @@ #![allow(bad_style, clippy::upper_case_acronyms)] -use std::os::raw; - pub type wchar_t = u16; pub use crate::windows_sys::{FILETIME, GUID, HRESULT, SAFEARRAY}; pub type REFIID = *const IID; pub type IID = GUID; -pub type ULONG = raw::c_ulong; +pub type ULONG = core::ffi::c_ulong; pub type DWORD = u32; pub type LPFILETIME = *mut FILETIME; pub type OLECHAR = WCHAR; @@ -139,7 +137,7 @@ RIDL! {#[uuid(0x00000000, 0x0000, 0x0000, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x interface IUnknown(IUnknownVtbl) { fn QueryInterface( riid: REFIID, - ppvObject: *mut *mut raw::c_void, + ppvObject: *mut *mut core::ffi::c_void, ) -> HRESULT, fn AddRef() -> ULONG, fn Release() -> ULONG, diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/src/windows_link.rs b/thirdparty/crates/find-msvc-tools-0.1.10/src/windows_link.rs similarity index 100% rename from thirdparty/crates/find-msvc-tools-0.1.9/src/windows_link.rs rename to thirdparty/crates/find-msvc-tools-0.1.10/src/windows_link.rs diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/src/windows_sys.rs b/thirdparty/crates/find-msvc-tools-0.1.10/src/windows_sys.rs similarity index 100% rename from thirdparty/crates/find-msvc-tools-0.1.9/src/windows_sys.rs rename to thirdparty/crates/find-msvc-tools-0.1.10/src/windows_sys.rs diff --git a/thirdparty/crates/find-msvc-tools-0.1.9/.cargo_vcs_info.json b/thirdparty/crates/find-msvc-tools-0.1.9/.cargo_vcs_info.json deleted file mode 100644 index 626ad41fe..000000000 --- a/thirdparty/crates/find-msvc-tools-0.1.9/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "0767349e1d1253e6849b4c2af2059db661f54343" - }, - "path_in_vcs": "find-msvc-tools" -} \ No newline at end of file diff --git a/thirdparty/crates/getrandom-0.2.17/BUILD.bazel b/thirdparty/crates/getrandom-0.2.17/BUILD.bazel index bf09515a6..9424dc58a 100644 --- a/thirdparty/crates/getrandom-0.2.17/BUILD.bazel +++ b/thirdparty/crates/getrandom-0.2.17/BUILD.bazel @@ -111,82 +111,82 @@ rust_library( "//thirdparty/crates/cfg-if-1.0.4:cfg_if", ] + select({ "@rules_rust//rust/platform:aarch64-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-apple-ios": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-apple-ios-macabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:arm-unknown-linux-musleabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:armv7-linux-androideabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:i686-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:i686-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:i686-unknown-freebsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:loongarch64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:mips-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:sparc64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:sparc64-unknown-netbsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:sparc64-unknown-openbsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:wasm32-unknown-emscripten": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:wasm32-wasip1": [ "//thirdparty/crates/wasi-0.11.1-wasi-snapshot-preview1:wasi", # cfg(target_os = "wasi") @@ -198,28 +198,28 @@ rust_library( "//thirdparty/crates/wasi-0.11.1-wasi-snapshot-preview1:wasi", # cfg(target_os = "wasi") ], "@rules_rust//rust/platform:x86_64-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-apple-ios": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-apple-ios-macabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "//conditions:default": [], }), diff --git a/thirdparty/crates/getrandom-0.3.4/BUILD.bazel b/thirdparty/crates/getrandom-0.3.4/BUILD.bazel index 815c9483a..252ee5427 100644 --- a/thirdparty/crates/getrandom-0.3.4/BUILD.bazel +++ b/thirdparty/crates/getrandom-0.3.4/BUILD.bazel @@ -116,103 +116,103 @@ rust_library( "//thirdparty/crates/getrandom-0.3.4:build_script_build", ] + select({ "@rules_rust//rust/platform:aarch64-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) ], "@rules_rust//rust/platform:aarch64-apple-ios": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) ], "@rules_rust//rust/platform:aarch64-apple-ios-macabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) ], "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) ], "@rules_rust//rust/platform:aarch64-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "haiku", target_os = "redox", target_os = "nto", target_os = "aix")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "haiku", target_os = "redox", target_os = "nto", target_os = "aix")) ], "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:arm-unknown-linux-musleabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:armv7-linux-androideabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:i686-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) ], "@rules_rust//rust/platform:i686-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:i686-unknown-freebsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "hurd", target_os = "illumos", target_os = "cygwin", all(target_os = "horizon", target_arch = "arm"))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "hurd", target_os = "illumos", target_os = "cygwin", all(target_os = "horizon", target_arch = "arm"))) ], "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:loongarch64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:mips-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:sparc64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:sparc64-unknown-netbsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(target_os = "netbsd") + "//thirdparty/crates/libc-0.2.189:libc", # cfg(target_os = "netbsd") ], "@rules_rust//rust/platform:sparc64-unknown-openbsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) ], "@rules_rust//rust/platform:wasm32-unknown-emscripten": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) ], "@rules_rust//rust/platform:wasm32-wasip2": [ "//thirdparty/crates/wasip2-1.0.4-wasi-0.2.12:wasip2", # cfg(all(target_arch = "wasm32", target_os = "wasi", target_env = "p2")) ], "@rules_rust//rust/platform:x86_64-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) ], "@rules_rust//rust/platform:x86_64-apple-ios": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) ], "@rules_rust//rust/platform:x86_64-apple-ios-macabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) ], "@rules_rust//rust/platform:x86_64-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "hurd", target_os = "illumos", target_os = "cygwin", all(target_os = "horizon", target_arch = "arm"))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "hurd", target_os = "illumos", target_os = "cygwin", all(target_os = "horizon", target_arch = "arm"))) ], "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "//conditions:default": [], }), diff --git a/thirdparty/crates/getrandom-0.4.3/BUILD.bazel b/thirdparty/crates/getrandom-0.4.3/BUILD.bazel index 51477256e..dd3e56988 100644 --- a/thirdparty/crates/getrandom-0.4.3/BUILD.bazel +++ b/thirdparty/crates/getrandom-0.4.3/BUILD.bazel @@ -116,100 +116,100 @@ rust_library( "//thirdparty/crates/getrandom-0.4.3:build_script_build", ] + select({ "@rules_rust//rust/platform:aarch64-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) ], "@rules_rust//rust/platform:aarch64-apple-ios": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) ], "@rules_rust//rust/platform:aarch64-apple-ios-macabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) ], "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) ], "@rules_rust//rust/platform:aarch64-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "haiku", target_os = "redox", target_os = "nto", target_os = "aix")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "haiku", target_os = "redox", target_os = "nto", target_os = "aix")) ], "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:arm-unknown-linux-musleabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:armv7-linux-androideabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:i686-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) ], "@rules_rust//rust/platform:i686-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:i686-unknown-freebsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "hurd", target_os = "illumos", target_os = "cygwin", all(target_os = "horizon", target_arch = "arm"))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "hurd", target_os = "illumos", target_os = "cygwin", all(target_os = "horizon", target_arch = "arm"))) ], "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:loongarch64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:mips-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:sparc64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:sparc64-unknown-netbsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(target_os = "netbsd") + "//thirdparty/crates/libc-0.2.189:libc", # cfg(target_os = "netbsd") ], "@rules_rust//rust/platform:sparc64-unknown-openbsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) ], "@rules_rust//rust/platform:wasm32-unknown-emscripten": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) ], "@rules_rust//rust/platform:x86_64-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "macos", target_os = "openbsd", target_os = "vita", target_os = "emscripten")) ], "@rules_rust//rust/platform:x86_64-apple-ios": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) ], "@rules_rust//rust/platform:x86_64-apple-ios-macabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "ios", target_os = "visionos", target_os = "watchos", target_os = "tvos")) ], "@rules_rust//rust/platform:x86_64-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "hurd", target_os = "illumos", target_os = "cygwin", all(target_os = "horizon", target_arch = "arm"))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "hurd", target_os = "illumos", target_os = "cygwin", all(target_os = "horizon", target_arch = "arm"))) ], "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(any(target_os = "linux", target_os = "android"), not(any(all(target_os = "linux", target_env = ""), getrandom_backend = "custom", getrandom_backend = "linux_raw", getrandom_backend = "rdrand", getrandom_backend = "rndr")))) ], "//conditions:default": [], }), diff --git a/thirdparty/crates/half-2.7.1/BUILD.bazel b/thirdparty/crates/half-2.7.1/BUILD.bazel index f68bc4056..ed2210d6e 100644 --- a/thirdparty/crates/half-2.7.1/BUILD.bazel +++ b/thirdparty/crates/half-2.7.1/BUILD.bazel @@ -113,6 +113,6 @@ rust_library( deps = [ "//thirdparty/crates/cfg-if-1.0.4:cfg_if", "//thirdparty/crates/num-traits-0.2.19:num_traits", - "//thirdparty/crates/zerocopy-0.8.54:zerocopy", + "//thirdparty/crates/zerocopy-0.8.56:zerocopy", ], ) diff --git a/thirdparty/crates/iana-time-zone-0.1.65/BUILD.bazel b/thirdparty/crates/iana-time-zone-0.1.65/BUILD.bazel index 3e6afbcae..04a04d66c 100644 --- a/thirdparty/crates/iana-time-zone-0.1.65/BUILD.bazel +++ b/thirdparty/crates/iana-time-zone-0.1.65/BUILD.bazel @@ -124,27 +124,27 @@ rust_library( "//thirdparty/crates/core-foundation-sys-0.8.7:core_foundation_sys", # cfg(target_vendor = "apple") ], "@rules_rust//rust/platform:aarch64-linux-android": [ - "//thirdparty/crates/android_system_properties-0.1.5:android_system_properties", # cfg(target_os = "android") + "//thirdparty/crates/android_system_properties-0.1.6:android_system_properties", # cfg(target_os = "android") ], "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ "//thirdparty/crates/windows-core-0.62.2:windows_core", # cfg(target_os = "windows") ], "@rules_rust//rust/platform:armv7-linux-androideabi": [ - "//thirdparty/crates/android_system_properties-0.1.5:android_system_properties", # cfg(target_os = "android") + "//thirdparty/crates/android_system_properties-0.1.6:android_system_properties", # cfg(target_os = "android") ], "@rules_rust//rust/platform:i686-apple-darwin": [ "//thirdparty/crates/core-foundation-sys-0.8.7:core_foundation_sys", # cfg(target_vendor = "apple") ], "@rules_rust//rust/platform:i686-linux-android": [ - "//thirdparty/crates/android_system_properties-0.1.5:android_system_properties", # cfg(target_os = "android") + "//thirdparty/crates/android_system_properties-0.1.6:android_system_properties", # cfg(target_os = "android") ], "@rules_rust//rust/platform:i686-pc-windows-msvc": [ "//thirdparty/crates/windows-core-0.62.2:windows_core", # cfg(target_os = "windows") ], "@rules_rust//rust/platform:wasm32-unknown-unknown": [ - "//thirdparty/crates/js-sys-0.3.103:js_sys", # cfg(all(target_arch = "wasm32", target_os = "unknown")) + "//thirdparty/crates/js-sys-0.3.104:js_sys", # cfg(all(target_arch = "wasm32", target_os = "unknown")) "//thirdparty/crates/log-0.4.33:log", # cfg(all(target_arch = "wasm32", target_os = "unknown")) - "//thirdparty/crates/wasm-bindgen-0.2.126:wasm_bindgen", # cfg(all(target_arch = "wasm32", target_os = "unknown")) + "//thirdparty/crates/wasm-bindgen-0.2.127:wasm_bindgen", # cfg(all(target_arch = "wasm32", target_os = "unknown")) ], "@rules_rust//rust/platform:x86_64-apple-darwin": [ "//thirdparty/crates/core-foundation-sys-0.8.7:core_foundation_sys", # cfg(target_vendor = "apple") @@ -156,7 +156,7 @@ rust_library( "//thirdparty/crates/core-foundation-sys-0.8.7:core_foundation_sys", # cfg(target_vendor = "apple") ], "@rules_rust//rust/platform:x86_64-linux-android": [ - "//thirdparty/crates/android_system_properties-0.1.5:android_system_properties", # cfg(target_os = "android") + "//thirdparty/crates/android_system_properties-0.1.6:android_system_properties", # cfg(target_os = "android") ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ "//thirdparty/crates/windows-core-0.62.2:windows_core", # cfg(target_os = "windows") diff --git a/thirdparty/crates/iana-time-zone-haiku-0.1.2/BUILD.bazel b/thirdparty/crates/iana-time-zone-haiku-0.1.2/BUILD.bazel index b1e960417..29ba3f736 100644 --- a/thirdparty/crates/iana-time-zone-haiku-0.1.2/BUILD.bazel +++ b/thirdparty/crates/iana-time-zone-haiku-0.1.2/BUILD.bazel @@ -168,7 +168,7 @@ cargo_build_script( version = "0.1.2", visibility = ["//visibility:private"], deps = [ - "//thirdparty/crates/cc-1.3.0:cc", + "//thirdparty/crates/cc-1.4.2:cc", ], ) diff --git a/thirdparty/crates/js-sys-0.3.103/.cargo_vcs_info.json b/thirdparty/crates/js-sys-0.3.103/.cargo_vcs_info.json deleted file mode 100644 index 233aad956..000000000 --- a/thirdparty/crates/js-sys-0.3.103/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "21ac804a96c0c5c5d6459084686a9a17a8a3c865" - }, - "path_in_vcs": "crates/js-sys" -} \ No newline at end of file diff --git a/thirdparty/crates/js-sys-0.3.103/.cargo-checksum.json b/thirdparty/crates/js-sys-0.3.104/.cargo-checksum.json similarity index 58% rename from thirdparty/crates/js-sys-0.3.103/.cargo-checksum.json rename to thirdparty/crates/js-sys-0.3.104/.cargo-checksum.json index 4d5219a8b..656edbbad 100644 --- a/thirdparty/crates/js-sys-0.3.103/.cargo-checksum.json +++ b/thirdparty/crates/js-sys-0.3.104/.cargo-checksum.json @@ -1 +1 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"ef67ff58c0368550633a5a124332ba4b4cf45498d7a74d58064bdecc19b94a11","Cargo.lock":"6f81a445030ace013f7ea93eb5815dcbcc5053ccb00566d7842fa0195ac2fbf8","Cargo.toml":"c4268bc3487f52e4f6b5b582f0c981651fda8e14ad5ff835620a34ee0318e0e7","Cargo.toml.orig":"61b293a2d08a7262ce76402c09455c5ac87c932b3677a4700a0b1c5e06a4bfd7","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"ada8f33d7201e841c1fb1f007b8232afd50bf1194ae38e5e6b1e7274a6b4c447","src/Temporal.rs":"83dff27662620878df37b152dc35f7e4eaebbf04c7ab40b760d5631ef864dc97","src/futures/mod.rs":"af4aff4947359f7db9ceb6a971eb1b087b715251f5009d9bce864e4ce7127b2d","src/futures/queue.rs":"c2b3d2bc715773126fe2a53814ad93464305ed381f2d651d6c01975efaf8cafb","src/futures/stream.rs":"71432e8401092d42e5d57a885c5bb63b3706adb43a4d2c4bce20a290a0cd3cb0","src/futures/task/mod.rs":"eadd65ff4397eff6aedafe712f4e04a64694f9dbc30bf928a18bb87477d9a644","src/futures/task/multithread.rs":"19da8da771b5e11d9aa0fc1c4f4baf2a39a3b7353bb790b1c895ec9a2c5699d1","src/futures/task/singlethread.rs":"8a47d877ee03fb172c9dd1fb82494620418570180ea2b3f2493fa3fc3c3fe97e","src/futures/task/wait_async_polyfill.rs":"a4b4f5caf80f7d73dc268baee32eca34c6b140d92ee2ce4ea3b4fc25c99a8011","src/futures/task/worker.js":"1f1b207b7f45925d8c50f51538d3c23caf14073080bfe6e6bc64a3689b93db78","src/lib.rs":"b92a3820e99d0a88895be2d1fe17f80a420c9d25ca988490c7a16e5ef0659683"},"package":"53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102"} \ No newline at end of file +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"0336c32ba016928e000ceb0c9ef53c572b8d27cde76ea4cf86a4db9645ff37f9","Cargo.lock":"b6a5225b2d3f18ecf92f9a6cfb14997a412c921a85fac1585db6467fbedc69cf","Cargo.toml":"515829d5e4a58ba31fcd98462a8a35ba2bdb258300ac5e3a0eaec792c02518cb","Cargo.toml.orig":"c8dfa9a3f601f37c9c4711bd1a685f8b21f0588373659c9cac3ac60091a751de","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"ada8f33d7201e841c1fb1f007b8232afd50bf1194ae38e5e6b1e7274a6b4c447","src/Temporal.rs":"83dff27662620878df37b152dc35f7e4eaebbf04c7ab40b760d5631ef864dc97","src/futures/mod.rs":"af4aff4947359f7db9ceb6a971eb1b087b715251f5009d9bce864e4ce7127b2d","src/futures/queue.rs":"c2b3d2bc715773126fe2a53814ad93464305ed381f2d651d6c01975efaf8cafb","src/futures/stream.rs":"71432e8401092d42e5d57a885c5bb63b3706adb43a4d2c4bce20a290a0cd3cb0","src/futures/task/mod.rs":"eadd65ff4397eff6aedafe712f4e04a64694f9dbc30bf928a18bb87477d9a644","src/futures/task/multithread.rs":"55f1694192e6327663c054b7abdd00534ceaec7266e54993c72865399f93c453","src/futures/task/singlethread.rs":"a487dbadfe7d12d3d6de59e363b4c6485612df71982a2b9750ac8b93ba71c7cf","src/futures/task/wait_async_polyfill.rs":"a4b4f5caf80f7d73dc268baee32eca34c6b140d92ee2ce4ea3b4fc25c99a8011","src/futures/task/worker.js":"1f1b207b7f45925d8c50f51538d3c23caf14073080bfe6e6bc64a3689b93db78","src/lib.rs":"b5508f4d52f6fb474b89ec1d184361bd8fa80ece9e1d11f5fcd48d0fbe242d5e"},"package":"0e0c1080212aad755ea003d18543e8768dd432c48819efd73a7bf1e39b7a5a3a"} \ No newline at end of file diff --git a/thirdparty/crates/js-sys-0.3.104/.cargo_vcs_info.json b/thirdparty/crates/js-sys-0.3.104/.cargo_vcs_info.json new file mode 100644 index 000000000..28b49d4df --- /dev/null +++ b/thirdparty/crates/js-sys-0.3.104/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "a579ee62b631fd1fa96c7740b52a2952b07c0219" + }, + "path_in_vcs": "crates/js-sys" +} \ No newline at end of file diff --git a/thirdparty/crates/js-sys-0.3.103/BUILD.bazel b/thirdparty/crates/js-sys-0.3.104/BUILD.bazel similarity index 98% rename from thirdparty/crates/js-sys-0.3.103/BUILD.bazel rename to thirdparty/crates/js-sys-0.3.104/BUILD.bazel index 04eaf8162..fac9ba322 100644 --- a/thirdparty/crates/js-sys-0.3.103/BUILD.bazel +++ b/thirdparty/crates/js-sys-0.3.104/BUILD.bazel @@ -106,9 +106,9 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.3.103", + version = "0.3.104", deps = [ "//thirdparty/crates/cfg-if-1.0.4:cfg_if", - "//thirdparty/crates/wasm-bindgen-0.2.126:wasm_bindgen", + "//thirdparty/crates/wasm-bindgen-0.2.127:wasm_bindgen", ], ) diff --git a/thirdparty/crates/js-sys-0.3.103/Cargo.lock b/thirdparty/crates/js-sys-0.3.104/Cargo.lock similarity index 75% rename from thirdparty/crates/js-sys-0.3.103/Cargo.lock rename to thirdparty/crates/js-sys-0.3.104/Cargo.lock index 6c54c4215..1f8d0b035 100644 --- a/thirdparty/crates/js-sys-0.3.103/Cargo.lock +++ b/thirdparty/crates/js-sys-0.3.104/Cargo.lock @@ -22,18 +22,18 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5" [[package]] name = "futures-channel" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" dependencies = [ "futures-core", ] [[package]] name = "futures-core" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" +checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" [[package]] name = "futures-lite" @@ -47,15 +47,15 @@ dependencies = [ [[package]] name = "futures-task" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" +checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" [[package]] name = "futures-util" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" dependencies = [ "futures-core", "futures-task", @@ -76,7 +76,7 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.103" +version = "0.3.104" dependencies = [ "cfg-if", "futures-channel", @@ -101,27 +101,27 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] [[package]] name = "rustversion" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "slab" @@ -131,9 +131,9 @@ checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" [[package]] name = "syn" -version = "2.0.118" +version = "2.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" dependencies = [ "proc-macro2", "quote", @@ -148,9 +148,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "wasm-bindgen" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" +checksum = "1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70" dependencies = [ "cfg-if", "once_cell", @@ -161,9 +161,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" +checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -171,9 +171,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" +checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" dependencies = [ "bumpalo", "proc-macro2", @@ -184,27 +184,27 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" +checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" dependencies = [ "unicode-ident", ] [[package]] name = "zerocopy" -version = "0.8.52" +version = "0.8.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" +checksum = "556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.52" +version = "0.8.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" +checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1" dependencies = [ "proc-macro2", "quote", diff --git a/thirdparty/crates/js-sys-0.3.103/Cargo.toml b/thirdparty/crates/js-sys-0.3.104/Cargo.toml similarity index 98% rename from thirdparty/crates/js-sys-0.3.103/Cargo.toml rename to thirdparty/crates/js-sys-0.3.104/Cargo.toml index 3dd3f7ead..5e0e067e2 100644 --- a/thirdparty/crates/js-sys-0.3.103/Cargo.toml +++ b/thirdparty/crates/js-sys-0.3.104/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.77" name = "js-sys" -version = "0.3.103" +version = "0.3.104" authors = ["The wasm-bindgen Developers"] build = false include = [ @@ -72,7 +72,7 @@ optional = true default-features = false [dependencies.wasm-bindgen] -version = "=0.2.126" +version = "=0.2.127" default-features = false [target.'cfg(target_arch = "wasm32")'.dev-dependencies.futures-channel] diff --git a/thirdparty/crates/js-sys-0.3.103/Cargo.toml.orig b/thirdparty/crates/js-sys-0.3.104/Cargo.toml.orig similarity index 95% rename from thirdparty/crates/js-sys-0.3.103/Cargo.toml.orig rename to thirdparty/crates/js-sys-0.3.104/Cargo.toml.orig index ade1d096a..87c54d6ca 100644 --- a/thirdparty/crates/js-sys-0.3.103/Cargo.toml.orig +++ b/thirdparty/crates/js-sys-0.3.104/Cargo.toml.orig @@ -14,7 +14,7 @@ name = "js-sys" readme = "./README.md" repository = "https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/js-sys" rust-version = "1.77" -version = "0.3.103" +version = "0.3.104" [lib] doctest = false @@ -36,7 +36,7 @@ futures-core-03-stream = ["dep:futures-util", "dep:futures-core"] cfg-if = "1.0.0" futures-core = { version = "0.3.8", default-features = false, optional = true } futures-util = { version = "0.3.31", default-features = false, features = ["std"], optional = true } -wasm-bindgen = { path = "../..", version = "=0.2.126", default-features = false } +wasm-bindgen = { path = "../..", version = "=0.2.127", default-features = false } [target.'cfg(target_arch = "wasm32")'.dev-dependencies] futures-channel = "0.3" diff --git a/thirdparty/crates/js-sys-0.3.103/LICENSE-APACHE b/thirdparty/crates/js-sys-0.3.104/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/js-sys-0.3.103/LICENSE-APACHE rename to thirdparty/crates/js-sys-0.3.104/LICENSE-APACHE diff --git a/thirdparty/crates/js-sys-0.3.103/LICENSE-MIT b/thirdparty/crates/js-sys-0.3.104/LICENSE-MIT similarity index 100% rename from thirdparty/crates/js-sys-0.3.103/LICENSE-MIT rename to thirdparty/crates/js-sys-0.3.104/LICENSE-MIT diff --git a/thirdparty/crates/js-sys-0.3.103/README.md b/thirdparty/crates/js-sys-0.3.104/README.md similarity index 100% rename from thirdparty/crates/js-sys-0.3.103/README.md rename to thirdparty/crates/js-sys-0.3.104/README.md diff --git a/thirdparty/crates/js-sys-0.3.103/src/Temporal.rs b/thirdparty/crates/js-sys-0.3.104/src/Temporal.rs similarity index 100% rename from thirdparty/crates/js-sys-0.3.103/src/Temporal.rs rename to thirdparty/crates/js-sys-0.3.104/src/Temporal.rs diff --git a/thirdparty/crates/js-sys-0.3.103/src/futures/mod.rs b/thirdparty/crates/js-sys-0.3.104/src/futures/mod.rs similarity index 100% rename from thirdparty/crates/js-sys-0.3.103/src/futures/mod.rs rename to thirdparty/crates/js-sys-0.3.104/src/futures/mod.rs diff --git a/thirdparty/crates/js-sys-0.3.103/src/futures/queue.rs b/thirdparty/crates/js-sys-0.3.104/src/futures/queue.rs similarity index 100% rename from thirdparty/crates/js-sys-0.3.103/src/futures/queue.rs rename to thirdparty/crates/js-sys-0.3.104/src/futures/queue.rs diff --git a/thirdparty/crates/js-sys-0.3.103/src/futures/stream.rs b/thirdparty/crates/js-sys-0.3.104/src/futures/stream.rs similarity index 100% rename from thirdparty/crates/js-sys-0.3.103/src/futures/stream.rs rename to thirdparty/crates/js-sys-0.3.104/src/futures/stream.rs diff --git a/thirdparty/crates/js-sys-0.3.103/src/futures/task/mod.rs b/thirdparty/crates/js-sys-0.3.104/src/futures/task/mod.rs similarity index 100% rename from thirdparty/crates/js-sys-0.3.103/src/futures/task/mod.rs rename to thirdparty/crates/js-sys-0.3.104/src/futures/task/mod.rs diff --git a/thirdparty/crates/js-sys-0.3.103/src/futures/task/multithread.rs b/thirdparty/crates/js-sys-0.3.104/src/futures/task/multithread.rs similarity index 86% rename from thirdparty/crates/js-sys-0.3.103/src/futures/task/multithread.rs rename to thirdparty/crates/js-sys-0.3.104/src/futures/task/multithread.rs index 52e36293b..1e23a2d5b 100644 --- a/thirdparty/crates/js-sys-0.3.103/src/futures/task/multithread.rs +++ b/thirdparty/crates/js-sys-0.3.104/src/futures/task/multithread.rs @@ -99,7 +99,11 @@ impl Task { let closure = { let this = Rc::clone(&this); - Closure::new(move |_| { + + // `own_assert_unwind_safe` is required because the closure captures + // `Rc`, which isn't `UnwindSafe`. A poll unwinding out of + // `run` frees the `Task` via a drop guard to avoid a leak. + Closure::own_assert_unwind_safe(move |_| { // The promise resolution acts like a wake, so ensure the state // transitions to AWAKE before entering `run`. this.atomic.wake_by_ref(); @@ -116,13 +120,30 @@ impl Task { } pub(crate) fn run(&self) { + // A poll can unwind via either a Rust panic or a JS + // exception. `catch_unwind` only catches the former, but both run + // drops, so a drop guard covers both: if a poll unwinds we drop + // `Inner`, releasing the future and breaking the + // `Inner -> closure -> Rc` cycle that would otherwise leak the + // `Task`. The guard is forgotten on a normal return. + struct ClearOnUnwind<'a>(&'a RefCell>); + impl Drop for ClearOnUnwind<'_> { + fn drop(&mut self) { + *self.0.borrow_mut() = None; + } + } + let clear_on_unwind = ClearOnUnwind(&self.inner); + let mut borrow = self.inner.borrow_mut(); // Same as `singlethread.rs`, handle spurious wakeups happening after we // finished. let inner = match borrow.as_mut() { Some(inner) => inner, - None => return, + None => { + core::mem::forget(clear_on_unwind); + return; + } }; loop { @@ -170,6 +191,8 @@ impl Task { } break; } + + core::mem::forget(clear_on_unwind); } } diff --git a/thirdparty/crates/js-sys-0.3.103/src/futures/task/singlethread.rs b/thirdparty/crates/js-sys-0.3.104/src/futures/task/singlethread.rs similarity index 86% rename from thirdparty/crates/js-sys-0.3.103/src/futures/task/singlethread.rs rename to thirdparty/crates/js-sys-0.3.104/src/futures/task/singlethread.rs index e6225d6e3..f05b3b1a8 100644 --- a/thirdparty/crates/js-sys-0.3.103/src/futures/task/singlethread.rs +++ b/thirdparty/crates/js-sys-0.3.104/src/futures/task/singlethread.rs @@ -139,13 +139,30 @@ impl Task { } pub(crate) fn run(&self) { + // A poll can unwind via either a Rust panic or a foreign (JS) + // exception. `catch_unwind` only catches the former, but both run + // drops, so a drop guard covers both: if a poll unwinds we drop + // `Inner`, releasing the future and breaking the + // `Inner -> Waker -> Rc` cycle that would otherwise leak the + // `Task`. The guard is disarmed (forgotten) on a normal return. + struct ClearOnUnwind<'a>(&'a RefCell>); + impl Drop for ClearOnUnwind<'_> { + fn drop(&mut self) { + *self.0.borrow_mut() = None; + } + } + let clear_on_unwind = ClearOnUnwind(&self.inner); + let mut borrow = self.inner.borrow_mut(); // Wakeups can come in after a Future has finished and been destroyed, // so handle this gracefully by just ignoring the request to run. let inner = match borrow.as_mut() { Some(inner) => inner, - None => return, + None => { + core::mem::forget(clear_on_unwind); + return; + } }; // Ensure that if poll calls `waker.wake()` we can get enqueued back on @@ -158,7 +175,8 @@ impl Task { let is_ready = match self.console.as_ref() { // Wrap `inner` in AssertUnwindSafe before capturing it, so the closure // satisfies MaybeUnwindSafe (required when panic=unwind). This is safe: - // console.run's poll callback is not invoked inside a panic-catching context. + // a panic from `is_ready` propagates as usual and is handled by the + // `ClearOnUnwind` guard above. Some(console) => { let mut inner = core::panic::AssertUnwindSafe(inner); console.run(&mut move || inner.is_ready()) @@ -180,5 +198,7 @@ impl Task { if is_ready { *borrow = None; } + + core::mem::forget(clear_on_unwind); } } diff --git a/thirdparty/crates/js-sys-0.3.103/src/futures/task/wait_async_polyfill.rs b/thirdparty/crates/js-sys-0.3.104/src/futures/task/wait_async_polyfill.rs similarity index 100% rename from thirdparty/crates/js-sys-0.3.103/src/futures/task/wait_async_polyfill.rs rename to thirdparty/crates/js-sys-0.3.104/src/futures/task/wait_async_polyfill.rs diff --git a/thirdparty/crates/js-sys-0.3.103/src/futures/task/worker.js b/thirdparty/crates/js-sys-0.3.104/src/futures/task/worker.js similarity index 100% rename from thirdparty/crates/js-sys-0.3.103/src/futures/task/worker.js rename to thirdparty/crates/js-sys-0.3.104/src/futures/task/worker.js diff --git a/thirdparty/crates/js-sys-0.3.103/src/lib.rs b/thirdparty/crates/js-sys-0.3.104/src/lib.rs similarity index 99% rename from thirdparty/crates/js-sys-0.3.103/src/lib.rs rename to thirdparty/crates/js-sys-0.3.104/src/lib.rs index 9c90ca7b8..d66e3027e 100644 --- a/thirdparty/crates/js-sys-0.3.103/src/lib.rs +++ b/thirdparty/crates/js-sys-0.3.104/src/lib.rs @@ -52,7 +52,7 @@ use wasm_bindgen::prelude::*; use wasm_bindgen::JsError; // Re-export sys types as js-sys types -pub use wasm_bindgen::sys::{JsOption, Null, Promising, Undefined}; +pub use wasm_bindgen::sys::{JsNullable, JsOption, Null, Promising, Undefined}; pub use wasm_bindgen::{IntoJsGeneric, JsGeneric}; // When adding new imports: @@ -1816,6 +1816,10 @@ macro_rules! impl_tuple_covariance { where $(Target: UpcastFrom<$T>,)+ {} + impl<$($T,)+ Target> UpcastFrom> for JsNullable> + where + $(Target: UpcastFrom<$T>,)+ + {} }; } @@ -1832,6 +1836,7 @@ impl_tuple_covariance!([T1 T2 T3 T4 T5 T6 T7 T8] [Target1 Target2 Target3 Target impl UpcastFrom> for ArrayTuple where U: UpcastFrom {} impl UpcastFrom> for JsValue {} impl UpcastFrom> for JsOption {} +impl UpcastFrom> for JsNullable {} /// Iterator returned by `Array::into_iter` #[derive(Debug, Clone)] @@ -4578,8 +4583,10 @@ extern "C" { // Basic UpcastFrom impls for Function impl UpcastFrom> for JsValue {} impl UpcastFrom> for JsOption {} +impl UpcastFrom> for JsNullable {} impl UpcastFrom> for Object {} impl UpcastFrom> for JsOption {} +impl UpcastFrom> for JsNullable {} // Blanket trait for Function upcast // Function upcasts to Function when the underlying fn type T upcasts to U. diff --git a/thirdparty/crates/libc-0.2.186/.cargo-checksum.json b/thirdparty/crates/libc-0.2.186/.cargo-checksum.json deleted file mode 100644 index d51c35d68..000000000 --- a/thirdparty/crates/libc-0.2.186/.cargo-checksum.json +++ /dev/null @@ -1 +0,0 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"79f4e131fdc5bb4c9e7e0bd24728a9988a8c5d41a0aac106f906a181d3b6e52f",".editorconfig":"e57fecd6b82cd69640ca1bc4e44f0c7acfe5fc12f641f14af9536e323b4159db",".git-blame-ignore-revs":"761aa385c661241fa77c15b502c361398cf500bbb9f8c3a4579b412c4c6249d7",".release-plz.toml":"fcf2d382c4a2abd96caf9cc391b63e0c94d5832f5c48e9ab9eb4b2c847c0887c",".rustfmt.toml":"c88d9ba0e884291a2904d43cc7b940fafcb1ab443cdb7bcfca7117809c4f2816","CHANGELOG.md":"4a8d73789fafa25546de9333d49eed4a1a2e99075fd323b556bc1f65feb19f53","CONTRIBUTING.md":"a79d97a32ebab59a5d7b360f9f9bd5b8e98b58cd83a7c0853059347f1f81cb53","Cargo.lock":"f73065fee2180d2c25908eb5dadd8a152a7906095b1f2bca0f1da26087d67775","Cargo.toml":"9a45433b9dc5f1dcd397062608a320c2ab472319e79566ea4646dfff3ca67821","Cargo.toml.orig":"1aa1b972f961d26c76f62db1292be9d7fc4d24ccccbe8a3c22ffd3a6fc1c2c8d","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"123a331b5dbf04c30097fa43b8f858bc85df671fe776de498d01f3d6b7c1f69e","README.md":"cc560a2a9ab2a264fe78ec49fe5e5aed8cffdb8ad011a7dfeaaccbf161696bd8","build.rs":"4b348c53d0a0cd0067ef9887b50f60a1fffdc5d00dda5c0e27fae6aa0ce3dee8","src/fuchsia/aarch64.rs":"34105478e20e9ce40b9e484eea6494e2408fead17c13500da90a2d44d996ce63","src/fuchsia/mod.rs":"b4fc067b8408844fb80be9d017896e41763e2595fcd3526c4fcfed809dd90459","src/fuchsia/riscv64.rs":"a91ae8276df139f6181591be7209f9a68e9f3de5eec881c2e1c9768c53c4e292","src/fuchsia/x86_64.rs":"543ea567b29d646afc026956ee5e652c10e87256789058e7e39f91bf2fe8bf14","src/hermit.rs":"b8e56d680321459a27740aa95fe6576ee6d4e223abce74c0a4795fe998c6c30f","src/lib.rs":"cc2d16d6a06b312913276cb785d637d0755e3afbafc92f18376692dc31e1dc77","src/macros.rs":"e1a7439f50a1d7a47a3268b625e36e7c9a916909f5b3a7fae35217e454e5680c","src/new/aix/mod.rs":"df0de5d8e452a8abb27727b8451b2ceff3bb856f7e5d9e9306df5177e4c6326f","src/new/aix/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/apple/libc/signal.rs":"a960b6153775d791055b278534f79e21f8ff76c2c0c2891271e7abdf26e193d3","src/new/apple/libc/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/apple/libpthread/mod.rs":"1e99efe513b0ee1fa6e53daf5950fc027380b1d71d793eca9e5b22af7b331b5b","src/new/apple/libpthread/pthread_/introspection.rs":"3c797ded6d1a55670f9537a997407cf2267e6c7e7dbfa360d32474e2432979af","src/new/apple/libpthread/pthread_/pthread.rs":"c2b680120ec8db839e702c4340bc39748ac34c806b5fc08acea0a4593131a015","src/new/apple/libpthread/pthread_/pthread_impl.rs":"57a9925a75b79d092c65288b8a8eb21bfb6c7de4c70d37a49018b4eb8b32a646","src/new/apple/libpthread/pthread_/pthread_spis.rs":"1ba51c251249822fae222db6a19e17278ffffc424fc6eea30282a6171491edbe","src/new/apple/libpthread/pthread_/qos.rs":"40f816fb6cebd19ead21197671e5425b454144515ee4b966d00db32ba6b0dfe5","src/new/apple/libpthread/pthread_/sched.rs":"7b22a3204e72d5013ebac7b830235d50883aefca86d720f1f38b93d54e309477","src/new/apple/libpthread/pthread_/spawn.rs":"daef8af8ed0b3d16922c2f5a511a67f57f69b5f80dfe37362bd0b410213f95ca","src/new/apple/libpthread/pthread_/stack_np.rs":"d1b6e2eab1850c303f8eec4059b3e8ec57d69eb47c216243f6b4b7523761fc29","src/new/apple/libpthread/sys/_pthread/_pthread_types.rs":"a7a4307d7c3f91a6b03f76599fac5f40de556e5652123c6bc3b95df2bfa685de","src/new/apple/libpthread/sys/mod.rs":"337265fe49d77a7dcc879cd23e4f5baedcffab4808433dfb6ab9deb4ab490380","src/new/apple/libpthread/sys/qos.rs":"a6297cbab4089b330416bfcbe13b6d7aa8e75352299295046429b2e9d3bada42","src/new/apple/mod.rs":"45464bc6661b88e55856acb6ce4c47467a9aba44083e42b0e0d87d80ca3c11fd","src/new/apple/xnu/arm/_mcontext.rs":"63f1c62b47e7d7181c2b85f3cd3833c69a29eb0cad37a5754bfa6b5954ae7f6f","src/new/apple/xnu/i386/_mcontext.rs":"50543eaa5cf1d87f900b0c3e531dbfefd7586e1be2be3406223b2319edfcb7f2","src/new/apple/xnu/mach/arm/_structs.rs":"8e4af554170cef61c9143f92a283fd7eef66ad78824f194bbc89b098c6049a43","src/new/apple/xnu/mach/i386/_structs.rs":"d7316b7d3fa5e55a5818cfd8a1977921bb14e07133648cffa8f4d9da2e31a604","src/new/apple/xnu/mach/machine/_structs.rs":"82f5a7f751897c882ed4c378d6282976ff21cf0c9cdf7f3be3cecd369a63b6f8","src/new/apple/xnu/mach/mod.rs":"46aad5c7197df2cc57c4392d9019034236233f0240bc7975f9e22ac33c9d40ed","src/new/apple/xnu/machine/_mcontext.rs":"166b0a450b730e2a943ca08a0c70061effb77ff9eff6f41c7b0c51b2d4215db9","src/new/apple/xnu/mod.rs":"b35c4301d54dd2a207c32750f09f989dcc2de6e470a5cfa936de69c550555c7e","src/new/apple/xnu/sys/_types/_ucontext.rs":"1651132d39042f0fc8cca7a23c890da0031b74359472189f851fb3458f2fde3e","src/new/apple/xnu/sys/mod.rs":"734e1803a311320fd6f0b7b10929fe90a0b27322e792c95d42c620cc59b25563","src/new/apple/xnu/sys/signal.rs":"a03cb64ec19326657c87ff8a5a31c2e6bc1deb55f9a7343ab1b2420819ed72bf","src/new/bionic_libc/mod.rs":"5b2b375123095ae59617ffc1b5e13970ae685c823e3cecf014a173d56162d77c","src/new/bionic_libc/pthread.rs":"d40b7f8421cf78d61f23224c3bda17407e40a1c85dd8122ca4f290624b21d8a1","src/new/bionic_libc/sys/mod.rs":"570e7c97f7c1efb14e167a3f0688547fbc907ed9dca93ad6d90dc719289cb6f1","src/new/bionic_libc/sys/socket.rs":"19877b1de0e235a01734f9aebf20fc1ff1a01fd17302ed1a7d7b520a9fa68edb","src/new/bionic_libc/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/common/bsd.rs":"8282cc2b87ca3afc6b01216fe3c3fe1818a3d57e95aa8d1e1a36cc5af1660609","src/new/common/freebsd_like.rs":"156dce9baa6b0ac57d483ffb582a913b9e4944cf10bbb5711a64da5f496a55c2","src/new/common/linux_like/mod.rs":"d42e65b3d6fccd5ba85a8397abb28267a96bfb76b6b47754000fbe9332c03fe4","src/new/common/linux_like/pthread.rs":"a1a33b1e27cd159ab1035c73e72fa8b0c266dd5a28f1079ad74d3c370857f097","src/new/common/mod.rs":"5bcbce2960ff0840ab67a1ba5011009fa1f0f7697cff745d1461bf2b1460ddc6","src/new/common/netbsd_like.rs":"4327dd28d929f2c7b316f9241c44da6f6069d3db4381fb82700ec6d70d749041","src/new/common/posix/mod.rs":"f64b9d7f78e924529c62f2cd78199075eb334e0db9479cb59787f2740bd82d51","src/new/common/posix/pthread.rs":"7bd380ac6cda7940f5e160b6f9d1cf45885f2ba1d7e96014828b13e830eaf230","src/new/common/posix/unistd.rs":"3f633a8c6776d1442f014717785fea3f068d1d3edbfad545d445f8076cb58447","src/new/common/solarish.rs":"ac208e1ad95d07b7528419fd9c573612d58af3d50766816b81667570ccb8b3b3","src/new/cygwin/mod.rs":"9de4cba157252e7731256d60192468f5a759ebd33ab2b509819ffc7557adced5","src/new/cygwin/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/dragonfly/mod.rs":"7b96df7e566874a736d0c33ffc9e75a5f80e674da990cb664556728769ff25f9","src/new/dragonfly/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/emscripten/mod.rs":"d0ec81b919d9d078bb7d66d9429c08b609e2b0fab512be30aa22cc00fa620660","src/new/emscripten/pthread.rs":"65b51deca94ba18d81608191a5523c37f9508a87a76934006d1173869996531c","src/new/emscripten/sched.rs":"6f0a5b3cefb42bb01feabf34ad92d4bdbe5743263d4cd7b754baf921da81a127","src/new/emscripten/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/espidf/mod.rs":"c89c7d3b96583d84888aae0c463dc49b5af61b34a97e9cde52fb9b62d301a023","src/new/freebsd/mod.rs":"cca5cd6815abcaf276799618b748117eee7a6484bc48c629773eaed622188ccc","src/new/freebsd/sys/file.rs":"4dffceca36eaa53c3ace434e4fed1309009448c67ea6684a067a2cf362235e02","src/new/freebsd/sys/mod.rs":"1b064e41914b6e434be2b0c9d3f21f0365eaeeb358a231010c9b817bbd8f730e","src/new/freebsd/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/fuchsia/mod.rs":"c15b2da96c52281e86d4f114522999e6e713723f4950d62c2d544be641b28722","src/new/fuchsia/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/glibc/mod.rs":"1867ccaee8fe486b3723d683db23b40b2ff0c029c9d6281fd63d6de9de77d4fd","src/new/glibc/posix/unistd.rs":"b8528999ecab0a4883c0d89b1cb3c585a666255ab4a4bf5bfc705f7613edd8f4","src/new/glibc/sysdeps/nptl/mod.rs":"36c75e15c94efdc9db1ff8747cc557b5a314e0e3fdb006581f4a96b322ccde9d","src/new/glibc/sysdeps/nptl/pthread.rs":"b3bb630c736ffbe99081f5bec4c99f50cc36fe159b8059594b1d6965d178936c","src/new/glibc/sysdeps/unix/linux/mod.rs":"9a7c4d5c62c37166b35d2daa69a3dc8f5b4548ef49955463ae41393e260a4cb5","src/new/glibc/sysdeps/unix/linux/net/route.rs":"d8ec70bbaa919692430fdd608b70db11dbfe86b202760727dfd474a4b25b35c2","src/new/glibc/sysdeps/unix/mod.rs":"aa6d2fb4c32f5e1139cae14bcf7cee5935657aeff97df9c064ae9acd67620d04","src/new/haiku/mod.rs":"b3863768692c6da24fc28fdcf0c29a9dd9e3a84f301d4bee6ccc4f802befc4f8","src/new/haiku/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/hermit_abi/mod.rs":"25e5d698f292b95057f18dfe203fa96316326e0ca103da532190bb17c29cfdcf","src/new/horizon/mod.rs":"44b47e15d429026d369adfc16a4e9783cdda1be3d0a04f17c283da06573df886","src/new/hurd/mod.rs":"190a149192c237634df3e49c4834d05299aee91a3d399f356d97c36d35571a59","src/new/illumos/mod.rs":"eb5dd158844f63375a6fbb881d63279b12865342d1bb0da221216b7aa9c474b5","src/new/illumos/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/l4re/mod.rs":"d0cd277d7c0b32cd5d3619f7a188f3e646da8f71ae07012dccd921b3fb2b2300","src/new/linux_uapi/linux/can.rs":"b30565ca3a98f76f98a6410fdd0649336270aa1ae4c677d1ce0d67a9be8803ee","src/new/linux_uapi/linux/can/bcm.rs":"1718a1c3aae686d18ec83dff1560439d61de244bfaf332256cc2b42b85fe5249","src/new/linux_uapi/linux/can/error.rs":"5c5ef6d7c2b9432ebbf6147f96cd260e10686f449f879e64db4757670a6ec638","src/new/linux_uapi/linux/can/j1939.rs":"ab2a330c3d3cca3ac6a693b381661772036e10a6dc0004db3809a4f42cf724ba","src/new/linux_uapi/linux/can/netlink.rs":"2d90a0cb5dc9a15365c99c5101db1698f2da2df66704cfefdafd06252bcabe3e","src/new/linux_uapi/linux/can/raw.rs":"933ed151ce976b869b239abc031bb626dd3fa48ec3dd63d2c2b1b891c7bedf1c","src/new/linux_uapi/linux/keyctl.rs":"c25ee20a54a14d56de2c886c32f718b7a403b18152cc81bd7726f974cdf5b3a3","src/new/linux_uapi/linux/membarrier.rs":"5d6b55b1f7410aeb24ce6bcdbac0d33144b14dc048641ebccb5adc697ea7de2f","src/new/linux_uapi/linux/mod.rs":"c17b121acb9e3bd807ab58e532a19bf76f7a19a38ae94e7812beb14ddc3362b0","src/new/linux_uapi/linux/netlink.rs":"1ee00c018a23cac0ade157d6c725b3e6f0b69b23b46b9690c5ab398c889527b7","src/new/linux_uapi/linux/pidfd.rs":"6500c63d1ccaf4b7e14a36f225fd309bce9de80a50b81bca14bc6bded6ebd04e","src/new/linux_uapi/mod.rs":"76cc081d46d008fe05fbb3d7f007fb62374d4efd9464916bbeb9b20c288c6416","src/new/mod.rs":"360bd97f6f1cc19143289c05c0f9e3b86029918f6d9ed78d09c752c81a53ae6c","src/new/musl/arch/generic/mod.rs":"106383ed35cb7526bbbb0e16ce3521ddb2a9e61fb533687922fc9b43cd654af7","src/new/musl/arch/mips/bits/socket.rs":"eb4dff2ab581eb893e0e6547ae7a7d86453caa069b61272a818256280a23ca71","src/new/musl/arch/mips/mod.rs":"cc6c0a24ef77b7c404887fb5b7a7fd15c2a79e2a3396531ea0058636cacb3018","src/new/musl/arch/mips64/bits/socket.rs":"eb4dff2ab581eb893e0e6547ae7a7d86453caa069b61272a818256280a23ca71","src/new/musl/arch/mips64/mod.rs":"40242447a56ed21249f0417f87a7ccd074a366f19eb1353d94e904f370e0f20f","src/new/musl/arch/mod.rs":"31a73fedfd8606e04352425fb4917181f2d7376f445cb61a5460bd682ce29ed4","src/new/musl/mod.rs":"6b2e092bdc907d2d236a5f6ad977d931e13e99425a3738a62769220697cc13de","src/new/musl/pthread.rs":"e76e8f71cba55b45e4aa954970f939142595b828fd7e83586fc9145299a3b1cb","src/new/musl/sched.rs":"6f0a5b3cefb42bb01feabf34ad92d4bdbe5743263d4cd7b754baf921da81a127","src/new/musl/sys/socket.rs":"ed9de77a5937115aada325ce3d68b31e24e7ac21691dc2cb52c4e4695aa1e1dd","src/new/musl/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/netbsd/mod.rs":"d7bddddf98b09188a6fe541feaaaecdee85eb55fee2aa3cf670f7e6afa4ac342","src/new/netbsd/net/if_.rs":"5083d0f9d84de47c8b6fae60c9bb74d7c0586a80ccb8d625e5e2b4876e7f9444","src/new/netbsd/sys/file.rs":"a30095d85a4f8af49494f9b38114415f5c30e1d96a8c882eb7efd83a1cb6816a","src/new/netbsd/sys/ipc.rs":"91af85c26b3dca2a0661c820871d176baf29c00d53540f4807b9b28f9f3dfae4","src/new/netbsd/sys/mod.rs":"2dfbbf18e7585b64acfeb2f39d0495b50c142caec680db64bb4655e182347262","src/new/netbsd/sys/socket.rs":"a926087991d4cd7ebe31a3f626b5a196047c20955e9e3c99f5abe50b899b1ef3","src/new/netbsd/sys/statvfs.rs":"875c73a2c18ef78c7363b2196282579b88beca2d42ed24bda4fe8e7800db9bd4","src/new/netbsd/sys/time.rs":"7d420d5384e13ca361aaf9a7fc9faafe29a55b216988c8252a891d2232407a0c","src/new/netbsd/sys/timex.rs":"1b476328c16ce06e316485bd9dc751f31e51f63d0c07e438bf3227e66da07768","src/new/netbsd/sys/types.rs":"a0ec3ac038f0026c285ebfd869a8ae062117b1ff29855cbcf570f7f55860c854","src/new/netbsd/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/netbsd/utmp_.rs":"cbd35108f4ad7fd3c4fc65b888ba7813a29e3ed4af7920604df8085345f81973","src/new/netbsd/utmpx_.rs":"27171f826d6d2bf962a1d973a3427477ae960ad5dccc947c481d45f17ae645f0","src/new/newlib/mod.rs":"046372b698393e20436c85b28dac6f02b5cc7d599d134637bbdaa89f2530d1a6","src/new/newlib/unistd.rs":"15e74fb2c22e2343faa06a7a61baca198d7867cd70f8a4ead6cdc1f4fae24905","src/new/nto/mod.rs":"2e80a71385d3344a5f0b95b8d509148b52ea1a253d87e8f27345956d119f7e58","src/new/nto/net/bpf.rs":"1ee0b92315fb2926085777a024cb92d7c1f71328eca1af09a3db0417f180d263","src/new/nto/net/if_.rs":"cdea96569bb155c7372da481dbf00630aadfadb68ef07bfe94d258a6c600b82b","src/new/nto/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/nuttx/mod.rs":"7dbbf039987cb5ca17d2a1a562dc967de1c31b970568f728339cd5b9c8e05e25","src/new/nuttx/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/openbsd/mod.rs":"7d86ff099ddfdc8c383f49a1f6fa9c1169810cbe0c1c57d0e86dc14cb1d87320","src/new/openbsd/sys/ipc.rs":"dd37c821138dbf723d637319ad0849e9ed0b2fce1d498e7e38627a8b0a8bf142","src/new/openbsd/sys/mod.rs":"a8fd8f1cb50bffb34db04d1040048e7c23043fea834c1915453b5d539034a845","src/new/openbsd/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/qurt/dlfcn.rs":"8bfec94f78786e2eee9d4306efbf9ad977cf2b3f0d930f8cc65186e922371a9a","src/new/qurt/errno.rs":"2456f7f7557e4716f8b65b1ef67281f795c70ad1d5515d6b001d26c07b943af3","src/new/qurt/fcntl.rs":"ce176e0c9fb6799004cfc9f1fe5eb20ab7226cf8d304bf8ae9cfe4e3f37ad680","src/new/qurt/limits.rs":"5c76ea0d9560d5da65fe7ecaba8e45766dd56b203523979359e5436062306359","src/new/qurt/mod.rs":"6325ef45b6ad49aaba335a52b85a90eceaf5b2d782c06210edefc1999c1fcf99","src/new/qurt/pthread.rs":"8e64d22f2c73ea8559bd7c4de5d21b077969638e1e12c979c1d77c1a2ea2aaf2","src/new/qurt/semaphore.rs":"eb995a92cdead52ee61c3f498c7e408430b8430cd6cb6be74b47e6728c6773ae","src/new/qurt/signal.rs":"3d9b0cdba135af86fed0846b710fef48edba54a034e14147c7e7785db282a335","src/new/qurt/stdio.rs":"280e1faa29c7e2749469a9f9c4b0fa4ba8e0cee42a6e53d9376be6b8e3b8c2ff","src/new/qurt/stdlib.rs":"7d2aad4837a4be08083be8153ecf3e95d8c70469598fbad25793c4cfed1939d8","src/new/qurt/sys/mman.rs":"c0b862bf262564507796b1cdda967c601d265e6a1f1abfe1a5b6d45aa0742df6","src/new/qurt/sys/mod.rs":"e8585c4d447d02d1f4b72183e3d8b8c0d57301ca7099534ce2086a7a3d384b7d","src/new/qurt/sys/sched.rs":"12dfe86d5bb8c96a8624b3a408df7bc1595dfc71ca870e9ea586f68a32bc67f6","src/new/qurt/sys/stat.rs":"bbd98cd523dfc7e34c163bc2d397be8ed08401fe24d85d617b581d31e5bdb708","src/new/qurt/sys/types.rs":"c23c7f02eaa198f04991f0dede9e55279effd49ec4a341fb13064f68c19f24ca","src/new/qurt/time.rs":"598e21d7205714c2f8c92e7dd1f6f7162d5552c453ac68aeb3d38346cff52e4a","src/new/qurt/unistd.rs":"49b2b023a1276f9de2e093f03609e8cb5b0cefa9f0ea96b5bf3009d159b0dcd8","src/new/redox/mod.rs":"aaeaa40c0bffde42973cd1809c1c845075f92fac95a074fe3d01d4fb02dc0992","src/new/relibc/mod.rs":"5c6955e052d8b7ead97179e356c369ffcc435e09fcca4def3e100568845e7296","src/new/relibc/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/rtems/mod.rs":"8ad621434ced0a9d1c0ed5d68514f59b0c8bd4c77fdad81eb09e671e7a42cf1d","src/new/sgx/mod.rs":"c500dc72eff5cbf99c9d7e0e3f1faa3c680bfd7f6ac0166fa1a35fd0d7e69f41","src/new/sgx/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/solaris/mod.rs":"ce8a152ebacb9e8e0d87829d166e3ead64222ead397371bd557e18eefdcafe3d","src/new/solaris/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/solid/mod.rs":"dc5c3c8a627972865ef0a968125e74b2f87636dc89dd2df0f7cea9a40d7c6beb","src/new/teeos/mod.rs":"1d69f212e2a848a32292eef9ad16a44a8d5cf80c7d43db5f445dbd1a49400e3b","src/new/trusty/mod.rs":"3f009fef70cbe062126c82f1f9274cba60b12d3766b825d66326666a1f240fc2","src/new/uclibc/mod.rs":"c3f988f3eb289ba6bc3b2535b82163a7ff160288b7494c156f0fba62143cf2d5","src/new/uclibc/pthread.rs":"ab235319003806c5f20aef5f851af472480e88ff13d2a5f730870efb95e7982e","src/new/uclibc/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/ucrt/mod.rs":"4fd3a973de4c4c6349e76320e09b13701ac284e7ae03c671054b1eeebb86215d","src/new/vita/mod.rs":"196d6ca5c9b1ccc602a6270c3cf0b0bdbd39246066d1a8385df03ba45b31d368","src/new/vxworks/mod.rs":"fa569763957eb87e7e1ce5fa07293116c66661ff0c21d277fda5b30c61451176","src/new/vxworks/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/wasi/mod.rs":"2a74140697bc528193214aad11edc632923bd0cf8350d24f6d600f849dd19e19","src/new/xous/mod.rs":"69016c5c153d9a14003b15558cab96b4691a927586c20ca493fc8d3bb65594eb","src/primitives.rs":"af323402fee13278461bcaec6a06a15dfca24a02d48b0570c88e2746288d7078","src/psp.rs":"081cf4e5127ba10ebb62a9a5f8f849dd92742693db443db429d446ee472b5d41","src/qurt/mod.rs":"5af8edfb34f5431586b7ae00b341daa4312737c1e39c16348b1fff1d1cb8c642","src/sgx.rs":"964d6af358f5c85f948275090e5a7854e0169c43b5c338070b6a4cd156ebc9e6","src/solid/aarch64.rs":"4d4236500f98858fc249f3b6858af5009851c8c582031926b8195b2646f7da5e","src/solid/arm.rs":"4d4236500f98858fc249f3b6858af5009851c8c582031926b8195b2646f7da5e","src/solid/mod.rs":"0b5a07cf7df8227fecc13ea5b7ddf0bb9520c8be44bfb8c15f9449715911dfa0","src/switch.rs":"5db5be2d9c235c00f74b25cceabdf2ce5ec9e1936f991815513e4edf5dec0d56","src/teeos/mod.rs":"ad18343da08ebb6c1fba77fb8efe9ce4551519bea617c1a000aa92f3e50b8565","src/trusty.rs":"cc90bf6b35a515021a3155aa3cc5fcab33457b8fbb2ac7259f0b694d33625fd8","src/types.rs":"5d7831b60664bbe955e00b9b8c75cf834e27295ad36f249f9aee534f533571bc","src/unix/aix/mod.rs":"89a4848c84c15b827021da8b92770d73505bb2edf3ca2429dbcfd007dec02721","src/unix/aix/powerpc64.rs":"724b02ca3afb2722930de172b3144a6bffb70792612a7fbe53553cac58bd2ccc","src/unix/bsd/apple/b32/mod.rs":"30a6d351260806e98666ee4ba64b783d1fe1d8b1d32c3ba7766bd5d638dab2dd","src/unix/bsd/apple/b64/aarch64/mod.rs":"bf2e39a80c8d768c2969197b80fafa50608ac0186b4f4aea53e7fa8bf40d2214","src/unix/bsd/apple/b64/mod.rs":"2619b6afd99e938157753c436e969aa1703b0404b913e456e469df5c6d69538f","src/unix/bsd/apple/b64/x86_64/mod.rs":"ff16a360cb478a4c2e912b9779a806d0e3439e4c5110e0325c82af5ee8429591","src/unix/bsd/apple/mod.rs":"8f3299d0de1c3f39aad406c7955760168734300d62850bdcc862611fc25a199b","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"3ec640c35a0b5c0dfdf3fb981e6c3ac74e33781941ecca67390d076b167b5564","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"f13a68b825a58596b5d3339378b0812b778481a291aeacb41de74cb65ad66d3f","src/unix/bsd/freebsdlike/freebsd/arm.rs":"d627ed0bf17932ec0e3226944a4f9714805b27a953778b309d914545cf21b82a","src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs":"316e70938d2b050fd67e5aaf0bcdd0a70d55f195b26ce4ad6055cdf05cea2e61","src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs":"811c3f1aeb70dfd051abc9d3357e8eca9564c08b85d3ea6f81caacfa559e3060","src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs":"87fdf9253ff788b9b66d0bd26b1e7e401e80d165bb4278833dfb80046ee06064","src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs":"7153ee461d9c41e5b849603561dd118091af53a7c990d94a171a4e1412381ec8","src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs":"64c4bd82eaf30a2681417f982fce28de7d1b0743bfaa14004692a56cee44be21","src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs":"bee7fcbb5ff8d1a011b56afa025bcab87bff3e3f90d5d4e0bbbb5349f5bc6b5f","src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs":"64c4bd82eaf30a2681417f982fce28de7d1b0743bfaa14004692a56cee44be21","src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs":"4dbfaa01fce15bcaaab3d70f9f8da3b2e34a93cb2ca0d380b582926bbe43c2ce","src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs":"d6e66809e109dc779efe5584b79d34fcd6fdba91973a415d64ae66f481f45940","src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs":"55c0ce55e6c140d9c0c8b3fce76b23e975eff6c4d5eeb14c9581f8e51638e34a","src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs":"d6e66809e109dc779efe5584b79d34fcd6fdba91973a415d64ae66f481f45940","src/unix/bsd/freebsdlike/freebsd/mod.rs":"ab3734f8aa742fe5c3b5e31c29f0a99e7522abe28b3f7560ccf01f7c64305ca8","src/unix/bsd/freebsdlike/freebsd/powerpc.rs":"af7a43826e3ca9e5e7c3d7c1b50defa482074fd9909de3ee2e52cd0109c1a950","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"f7be922bddd7a4b7da863d6aba057aab2d27f500c7101596bbaaccf075133451","src/unix/bsd/freebsdlike/freebsd/riscv64.rs":"69242a001ab21b6e06b7442c37a89dbc5a67660c7c3cade1d46b65adf32a5669","src/unix/bsd/freebsdlike/freebsd/x86.rs":"5165242f0c82040898dbf711294ba45c5ab2635d39d0bbf9cc899b816415e2a4","src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs":"84044f397dbf13a1c517885c7b234efa2900d116324a4cca626d2f8df398d655","src/unix/bsd/freebsdlike/mod.rs":"c183016e0d192bd490958e4aeb5022dd203ca288abe8f1f502b2d1215b47e30c","src/unix/bsd/mod.rs":"a51588c418deaa58acecddc08c3578cd45659af7a6aec055447ec05143534b0d","src/unix/bsd/netbsdlike/mod.rs":"78f8873b9b91362253031ad6d3d6ee61640496b1c24b75b3ab9186e1eb35a545","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"ba2425edbf025f13ab3c3534d1671d310392df3a7d237539817d9cfa675971c8","src/unix/bsd/netbsdlike/netbsd/arm.rs":"8dd57613695dec1b2104ec35839f0b9b6d234c6cc80365e9fef9ca977c1865a0","src/unix/bsd/netbsdlike/netbsd/mips.rs":"20cdd8d1427c986ecc3fcf7960d337917a13cfd8386dd2d54f8693a23d60892f","src/unix/bsd/netbsdlike/netbsd/mod.rs":"12d1e288aa3c351000721502e3cbd7115d7d5584ffc5c37f5c00e9c56f657385","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"c19c4edbc73b5a97b51e3e2ad39b9fee02ad15e80c70ceb3a1abfe977e5c0ead","src/unix/bsd/netbsdlike/netbsd/riscv64.rs":"f446c996f00e4d15fd25461a30c767c05d083df9e047b0da497ce7c545acfa96","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"d50816e830225779ac9e9a55a7e3e097882153d72987061d76a96ee736c8af9c","src/unix/bsd/netbsdlike/netbsd/x86.rs":"3006b6a086c0241f5383ca101e7b9357368d713f9c38400633491656d110798e","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"13dd36a0db740930155b5f28fedfac606c7291c0276bbf2c2b3fe03a4dbd2a51","src/unix/bsd/netbsdlike/openbsd/aarch64.rs":"13c91b304dfb5c3c26777863827c7b3707fe245fcf50da32caab641aff998c63","src/unix/bsd/netbsdlike/openbsd/arm.rs":"f064d935f416ca9f7e5e767b9b46da2250c997d667c0c7f4b4c7dfe02d0258c3","src/unix/bsd/netbsdlike/openbsd/mips64.rs":"bee7664d88f8451ae22552fc0721b6b6a6dee2493cc42bcb9829c1e47e4b05f5","src/unix/bsd/netbsdlike/openbsd/mod.rs":"9943458aaf3a35ce0d3b259b0b666d29347b04cb1a1722e6450073e71f894398","src/unix/bsd/netbsdlike/openbsd/powerpc.rs":"f064d935f416ca9f7e5e767b9b46da2250c997d667c0c7f4b4c7dfe02d0258c3","src/unix/bsd/netbsdlike/openbsd/powerpc64.rs":"1f62a42e2970c42de9e3492fbf3cd5b45410889f033743579266342d1a9e2a00","src/unix/bsd/netbsdlike/openbsd/riscv64.rs":"b2cf3778bfb51d1c0277f0e92963a04f734be3e29879c6c09a25bad2d9b5ab6a","src/unix/bsd/netbsdlike/openbsd/sparc64.rs":"8d4c5a4cae63e09e1c156164ddc82e0fc77926841d4d4e419dd2e7a7b7145f58","src/unix/bsd/netbsdlike/openbsd/x86.rs":"e6da2fdff7706fd3eac147d3aaf16afdd8542f231f502660d1d89c79b5eca21b","src/unix/bsd/netbsdlike/openbsd/x86_64.rs":"bc7ed75ce66059aafa7a86986aefff267b2c951e47558453fe13ce1bdb48dc0b","src/unix/cygwin/mod.rs":"0da02791aefa8c45531abbea9a9f55b3c3d0d7e8d9af0c250d969ce22b48ee95","src/unix/haiku/b32.rs":"c3f8678ceee65a3094d8133b0d1a94470860e0b1867977f0569c52c5a20e039f","src/unix/haiku/b64.rs":"f97ce9225f4710893dab03ab3e13bc62152cc84f90c597ec88f6dc1f4c27d242","src/unix/haiku/bsd.rs":"4d9af31fdac2561ee5f942dca97dd2f48139ca74660d40b854b307fa5679d1c8","src/unix/haiku/mod.rs":"5a619d44c8e1205ada8f4bf67cf94b8f133949d15d505cba5dceb65557eaa736","src/unix/haiku/native.rs":"85836b1063ddc01c176c61cff8c006cf6f5dc4b1f465f41b5c330aa372a44ab6","src/unix/haiku/x86_64.rs":"def40c16609b5d62c3cdbba6a38340720a96b326ad98d53838554e4b6878d2ee","src/unix/hurd/b32.rs":"501f426f7aeb60acf4119064100dd94bbdfebff2cec785428708059d853dc123","src/unix/hurd/b64.rs":"b9b2082e721a5ec89ba55fd5a16bbffcc8a05ca7cef6dbfbd78aff0806cb931f","src/unix/hurd/mod.rs":"287a2fdd2065fc8a13c4932b3f241d1453607e74829b6d2012a44b6f5f36f654","src/unix/linux_like/android/b32/arm.rs":"5c6ad12746052b86846f9d7c3bd484d15bd3e2113785a19220186ab2a9bb31ba","src/unix/linux_like/android/b32/mod.rs":"04edc73374218c6b854929cae4bc5171ad5066f3636f87235640ec20a49f1559","src/unix/linux_like/android/b32/x86/mod.rs":"72cd0fb5a067170e7409359b6c0114f5472e313060b9642e2e48dc9fabfd4614","src/unix/linux_like/android/b64/aarch64/mod.rs":"66def5f0af9594af50535eba7501bce89620010a7d7aa769ef401235b03efa88","src/unix/linux_like/android/b64/mod.rs":"5afe4dc379ae30ddab9295e5ab8ac89f39f5129f519612d7528bfbfeb0a1d934","src/unix/linux_like/android/b64/riscv64/mod.rs":"47c97eeb221c48bd08c2fc2ddf5f9f4d20c185df76681fe14e3a0950fb37ecbf","src/unix/linux_like/android/b64/x86_64/mod.rs":"4d6eb98fd17e821d0e05755ccb3f4f2b6e37bfbab533894ed444138b750e6b08","src/unix/linux_like/android/mod.rs":"9f0cce22a507e263c4a9bf3501fbd85e14b2e7e9a71c6fe1e046ee051470a1eb","src/unix/linux_like/emscripten/lfs64.rs":"486f987bc39653a48e6538ab0e8263cd2c1bd3d4732a2c573f89f7a037936c38","src/unix/linux_like/emscripten/mod.rs":"538dbcd492324f0254c1ed1f66ad8e7bc9e367cdd70a004cb0183b6fb368e64a","src/unix/linux_like/l4re/mod.rs":"47c07dc3c5e368ec9a64b33af9a314f51e5ed6c7fc6456bfba919d661a812275","src/unix/linux_like/l4re/uclibc/aarch64/mod.rs":"3111d03e5f43dfe1639fe7189903044cb980591c0580a62e8b511de4943201e2","src/unix/linux_like/l4re/uclibc/mod.rs":"3678301a89b80f638ea90b4ec2e3d225bb186eaba3d07f324969e46b81a1955a","src/unix/linux_like/l4re/uclibc/x86_64/mod.rs":"89bb7c67398c836c7f17727338c6032e7667307f02ef0f5d0121031fea1aa358","src/unix/linux_like/linux/arch/generic/mod.rs":"f531e877d712eb30cddf97c76273b7ba7fef19cf8eaafd60ca9ac26019b49adf","src/unix/linux_like/linux/arch/mips/mod.rs":"dcc1d2e85dd2087f61635c753d1781ec70dcba5c95aee285255f09216ea1e0f8","src/unix/linux_like/linux/arch/mod.rs":"8bc5898b03760a95dd4f124ac76ad92e5ae36b2d0644203d752ef2b37e487c3a","src/unix/linux_like/linux/arch/powerpc/mod.rs":"77b286fce4ac755ec840b9c70824a648314b3a5ed2a385d291138589647fdbaf","src/unix/linux_like/linux/arch/sparc/mod.rs":"46f3bd08ec01147af43c93a22c21956af038fa5f6e56643f8e39ca30721bf8cd","src/unix/linux_like/linux/gnu/b32/arm/mod.rs":"60d5c7667d81db0ad9faf65edc79420b2100cab27699e03de4d415de931e9f58","src/unix/linux_like/linux/gnu/b32/csky/mod.rs":"627e61997c33fc12fca9e337d248d8531ef0751f21f70110b65631a0e481b66d","src/unix/linux_like/linux/gnu/b32/m68k/mod.rs":"2ea8f649fc9f01829de439ffe0fdbf9566602ed6ec0088128167af1080c3a1b2","src/unix/linux_like/linux/gnu/b32/mips/mod.rs":"8b3254b47401cde6118f9eea7e98319af8174d99feac451949e673a28ed4ff6e","src/unix/linux_like/linux/gnu/b32/mod.rs":"5ff89d834a09550c9393965bfd2b74e0f9ab6059bc76f2a827faed631afe10a7","src/unix/linux_like/linux/gnu/b32/powerpc.rs":"585983c6617a590ee0ac5217280d03642efcf721bd80fdabd6b9477031574fee","src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs":"a5e6c931ca8da568626233f2aa5ee0dd0b8e4e1e8905d52ab9dd0ea618376c2f","src/unix/linux_like/linux/gnu/b32/sparc/mod.rs":"0ddd77054079d7f7ee7aede95552e6494f67fc3db332ec1f5f83a9d09e1a9710","src/unix/linux_like/linux/gnu/b32/x86/mod.rs":"e370a80bfdec000347c384f080b30c6f537dc51e17e715c2dd8a360e6a1407f3","src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs":"638b2d717dcf5b59a0058c3dabab43edd84de9d1d7da6e16ad0c58e863000417","src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs":"28c11e70467b2f00735d3a04c369e96e04fd44d0587ee33359f38328b0677ee6","src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs":"7948baae6e8dfbbba78caaea27a2ef059dbe5f0a2b533bd89cc5d6c5dd7f7f1d","src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs":"242cd513eca13d14fbcc326369bb54006782260a558f0c2367102471d4081631","src/unix/linux_like/linux/gnu/b64/mips64/mod.rs":"007809bca7493eab4ac99a30b4495f73b544d7c882b81b5ca719c1b70761e0bf","src/unix/linux_like/linux/gnu/b64/mod.rs":"64d4182c10180692d381d8eea3d9ce8a6d47289b9c1218070241c5a445d9f1a0","src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs":"4dafacc390ff02ae3c34591a1605e1ac380c13338928a7e2e1ce748fc1e46323","src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs":"f1a54e0bc0d791ad642e07df5f8d4eda1b4d497059c0e5d20b52e094ed635b19","src/unix/linux_like/linux/gnu/b64/s390x.rs":"741d95cf29b65a9fa5c7316b888f8c79f944376b308c7929eb21054b5a16a83d","src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs":"adc09bb20980ee2d5892a2f68949505bed2fa00954b837aa0a15eeb04edd53cb","src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs":"d72ae5556347be715e3fdfc084e7e95a184504f1575230f163ab7a72a405cb24","src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs":"07240332eaf44996d86e37b12d71b519b499c9c9b57898441c58ac2e8c0cb6f7","src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs":"914898b781dfe6b2f755730d6000223d1beea177731e180ccbfdd84a0b8b3bd9","src/unix/linux_like/linux/gnu/mod.rs":"0ff72f74b015bc9ef4d1732fc5594945fdb5ca388e4aa0be71260fecb90e6f1f","src/unix/linux_like/linux/mod.rs":"3d293f05bfb6f9605e238399e404bf77ca91f4f7def6596f77f404c71b80b572","src/unix/linux_like/linux/musl/b32/arm/mod.rs":"7dc4b9a4d723d6868a84e81dbd5953b234c4540db3edd5a4a7ea0e154b101d91","src/unix/linux_like/linux/musl/b32/hexagon.rs":"17063ab52334500ec67d9f1f706bfcd493092d7a7f28f3b5558915cce756885e","src/unix/linux_like/linux/musl/b32/mips/mod.rs":"64f6b834d3d98db1c2d95d40371c644f71170d7710fcdd933f1ff51c3fbe2c70","src/unix/linux_like/linux/musl/b32/mod.rs":"6630c3ae8e27eb2bae6309bef4c96be9a21ebb877ce281b881a73589b7264a7a","src/unix/linux_like/linux/musl/b32/powerpc.rs":"a946612120ed9700ff1e4e729b0f8107a40f9ed7f5b320357552d5475441042d","src/unix/linux_like/linux/musl/b32/riscv32/mod.rs":"df3e3bbd2f69420b6de3a1d9aa242402f0bf26c77c573b2debea53af964f07d7","src/unix/linux_like/linux/musl/b32/x86/mod.rs":"83e340712e8acd89cefcb5eef0e826da79f47a7a42784699df90604c4e9a8712","src/unix/linux_like/linux/musl/b64/aarch64/mod.rs":"b165f81469b144a9c6d60486c3a8b4770fce5f4ad67958aad3c0b0ee85fde117","src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs":"9885dd43e46d3f34156b2871c3c08a88775efecb9eab0b4ed9bf396c1cb509d3","src/unix/linux_like/linux/musl/b64/mips64.rs":"24dd0c412ae02b84552a1803b4369dcc0fa3b989f9b6a406f404690c757fbc8b","src/unix/linux_like/linux/musl/b64/mod.rs":"1ce1eee49b1c7c5c02fe04b1539a0316becf0295763e3e18b1088895ed937373","src/unix/linux_like/linux/musl/b64/powerpc64.rs":"5f2a8d0a5b6a4d044c75ba433b4f69e27d475cbd5ba81e659e756757b5c36111","src/unix/linux_like/linux/musl/b64/riscv64/mod.rs":"d5298d224be38474d05c53ffda6384fdb24771774e5c19f84898c23e4603459c","src/unix/linux_like/linux/musl/b64/s390x.rs":"77079b262e2fda7b569c19236f264f460c157051bac349928306a07c4cb61195","src/unix/linux_like/linux/musl/b64/wasm32/mod.rs":"bd65c06c4e422cb859be803e0dc7404513c13e9d9c3c672f5462f0bbd3dc8ef2","src/unix/linux_like/linux/musl/b64/wasm32/wali.rs":"006149b7af0145dc40123fc7991d853c7f2c5c77bbc9c8a44c276be0d99a1343","src/unix/linux_like/linux/musl/b64/x86_64/mod.rs":"4535e44cfc85c66253c4cda347366d54c3ffa8e0b47b4b89cd87d96fb4005b1e","src/unix/linux_like/linux/musl/lfs64.rs":"61b1eae698d93dbd7c665e920ef685fd6eea0c4a2d96acc1d5f111d87b88ef38","src/unix/linux_like/linux/musl/mod.rs":"56c79797cafb7949f639f84a5a34676b34d776c843f0ad49ddca0684092580f4","src/unix/linux_like/linux/uclibc/arm/mod.rs":"9eb48a19e49cd2a989f6daae9552dd477d645bc2540a8bae5ac71894565375b0","src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs":"0b3c063ff6510c68577f8789ff87c1b630dc1c219611070fa91aa2b5b5ec595f","src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs":"3a3b90f896a07f5d17e3440bbff7b3153aed564732ef2e468167c7a425922ea8","src/unix/linux_like/linux/uclibc/mips/mod.rs":"e552f579a8dc9e690891113aa6360607ad962bd84cbb60c370b5c5f7c7d1d8c0","src/unix/linux_like/linux/uclibc/mod.rs":"413b7cc1cd88580162836dc8b1cf1fa569b3431248c13e030a1f50519ddaa875","src/unix/linux_like/linux/uclibc/x86_64/mod.rs":"53937263439095a4af0e5d583eb6cc621dd07a41aaa154b2f4cd1ec799dd7187","src/unix/linux_like/linux_l4re_shared.rs":"c21e27065fb45df318fe76366f8250cf1e6bb0a15394f4d6bc69686d774a780c","src/unix/linux_like/mod.rs":"399dc67be0898f73946145b26e12bf23beeb9048fb86b69affdc56be5622bf19","src/unix/mod.rs":"32699be951ec02142e7de59f34ae0f6162620576a4bd88ae372d39d2027421ea","src/unix/newlib/aarch64/mod.rs":"d72d067a433bf24ee6b6255c4d04ea7c966518b8d064560c593f1ab23c025962","src/unix/newlib/arm/mod.rs":"95b6e4b3cd1eeb0386d4867e9e4c3438305aa3e8ae75697e06720aa06540a666","src/unix/newlib/espidf/mod.rs":"cbaf10ccdb429719003cac3f3cd4aa0aa63a12a383afc5bd88a4ab3abaef9e2e","src/unix/newlib/generic.rs":"c435a955d72878a71ea0719a75a4579818da6a2e01635f9fe1073d9a0d67352f","src/unix/newlib/horizon/mod.rs":"7c4680766b9986a379fc354a183f4072c1c70d643307edd1a0ca8e0f2c34d5a8","src/unix/newlib/mod.rs":"1aac15b55a852732174bcfee52f3b1452c3e491461a87b70a7ee4c97a458785f","src/unix/newlib/powerpc/mod.rs":"4d6dca09ea5dc000cbd39fb939a9b1a743d819931dfca3c896659e919a07a7da","src/unix/newlib/rtems/mod.rs":"7d06863f1942a90c9a6dd412637b93c18df00e7397cb1289176b9a2a19004b7c","src/unix/newlib/vita/mod.rs":"2f9bf66b40c2aa611033faf3ade5510dc9789af7302571fade40a1715398f06c","src/unix/nto/aarch64.rs":"73ad54ebca13454a75c7b0815e853175070a8ac2eefa338012a03e8b59f01e0c","src/unix/nto/mod.rs":"ddcb98afedf905c0af8819af1591a0c7df629a187ceb35108aeaa467c4879746","src/unix/nto/neutrino.rs":"bb9d24ccee3b9e53af6d028f04ecb646e216ac1a9e2b2ade54bc06135ce3ac59","src/unix/nto/x86_64.rs":"c2e46c6ab4c02c8f773298ec1e90eeccac43c09fa111ac9ae63408abc6eff584","src/unix/nuttx/mod.rs":"4083559d825d2af9ade2c3f14e29802315c9a79091ce8d480c438c3242c7ba80","src/unix/redox/mod.rs":"40dbff61515612a7275ca1454a912ddc08f1b6f73bc084f4b563213bd46fde94","src/unix/solarish/compat.rs":"3d120a056208c03215cfbe3eef1584105160d133c0aa4557bb38018c177640b0","src/unix/solarish/illumos.rs":"74fa022e2799fed83ddeefecfdf559fff63e315ba36304845d65c9721b3ce3b7","src/unix/solarish/mod.rs":"03d1a75ecb758dde3c9ae3c3300c6d241e5e2481329724e32cfca6ffd5882cb3","src/unix/solarish/solaris.rs":"2be39ce5f464823359e7e2e4bae94c9acac9245042570df11a0ed75d49f8acad","src/unix/solarish/x86.rs":"44261c1f1b300dac9fa0dab93ec85d0c3b3c48b15bc4515b9820c9421cff7427","src/unix/solarish/x86_64.rs":"eec1602998dbd3b3aeb2d9a5bd66fc53a6fbbcd7967ed0bb2dd61a8c176023e4","src/unix/solarish/x86_common.rs":"4ae02d88622f7f080f5e8cd328f13187edbc5e124fb3e05e4cf212597f6cce48","src/vxworks/aarch64.rs":"4d4236500f98858fc249f3b6858af5009851c8c582031926b8195b2646f7da5e","src/vxworks/arm.rs":"4d4236500f98858fc249f3b6858af5009851c8c582031926b8195b2646f7da5e","src/vxworks/mod.rs":"e687423e39c07ca03d735f464537f40cc6d45407eaf6bbcfcead4a26a2e68881","src/vxworks/powerpc.rs":"4d4236500f98858fc249f3b6858af5009851c8c582031926b8195b2646f7da5e","src/vxworks/powerpc64.rs":"4d4236500f98858fc249f3b6858af5009851c8c582031926b8195b2646f7da5e","src/vxworks/riscv32.rs":"b1f933205800f0da00f975d53b18fe0035e075cc4613acf110a09a277dc3302a","src/vxworks/riscv64.rs":"b1f933205800f0da00f975d53b18fe0035e075cc4613acf110a09a277dc3302a","src/vxworks/x86.rs":"b1f933205800f0da00f975d53b18fe0035e075cc4613acf110a09a277dc3302a","src/vxworks/x86_64.rs":"b1f933205800f0da00f975d53b18fe0035e075cc4613acf110a09a277dc3302a","src/wasi/mod.rs":"bf128fa1c53277185b638eb953c5b8d503ae7a182780470b40b06f7c29331f38","src/wasi/p2.rs":"feecc0485eabd2c32bc5d800df6ad1b9b4d282741342fb08792f2635204e1e08","src/windows/gnu/mod.rs":"6422acc5c5a82122c11efb84882778e30888c0693c0993fbf7f3baa59e4cbbb5","src/windows/mod.rs":"01da11840df8118ad12f40dc38e921b4ecfd1045badc700d456f549789df24d4","src/windows/msvc/mod.rs":"40410b26b606d1b59b0742b2632f3cd0a28a5429f784f9693fae0a78c15b3889","src/xous.rs":"1a83621c40248ad4d0c08e1fd4c1107d5efcbc2f4f0169538b7b4a885abedbfa","tests/const_fn.rs":"8ac3171d7bced3576a4e93f48570b3e00c553d7510ab85a7473ae3b716a812dc"},"package":"68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"} \ No newline at end of file diff --git a/thirdparty/crates/libc-0.2.186/.cargo_vcs_info.json b/thirdparty/crates/libc-0.2.186/.cargo_vcs_info.json deleted file mode 100644 index 2e53efb9b..000000000 --- a/thirdparty/crates/libc-0.2.186/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "42620ffc4109dc32e02f1cae9e63a3f4311b4b71" - }, - "path_in_vcs": "" -} \ No newline at end of file diff --git a/thirdparty/crates/libc-0.2.186/CONTRIBUTING.md b/thirdparty/crates/libc-0.2.186/CONTRIBUTING.md deleted file mode 100644 index f43cda673..000000000 --- a/thirdparty/crates/libc-0.2.186/CONTRIBUTING.md +++ /dev/null @@ -1,126 +0,0 @@ -# Contributing to `libc` - -Welcome! If you are reading this document, it means you are interested in -contributing to the `libc` crate. - -## v1.0 Roadmap - -`libc` has two active branches: `main` and `libc-0.2`. `main` is for active -development of the upcoming v1.0 release, and should be the target of all pull -requests. `libc-0.2` is for updates to the currently released version. - -If a pull request to `main` is a good candidate for inclusion in an `0.2.x` -release, include `@rustbot label stable-nominated` in a comment to propose this. -Good candidates will usually meet the following: - -1. The included changes are non-breaking. -2. The change applies cleanly to both branches. -3. There is a usecase that justifies inclusion in a stable release (all - additions should always have a usecase, hopefully). - -Once a `stable-nominated` PR targeting `main` has merged, it can be cherry -picked to the `libc-0.2` branch. A maintainer will likely do these cherry picks -in a batch. - -Alternatively, you can start this process yourself by creating a new branch -based on `libc-0.2` and running `git cherry-pick -xe commit-sha-on-main` -(`git -cherry-pick -xe start-sha^..end-sha` if a range of commits is needed). -`git` will automatically add the "cherry picked from commit" note, but try to -add a backport note so the original PR gets crosslinked: - -``` -# ... original commit message ... - -(backport ) # add manually -(cherry picked from commit 104b6a4ae31c726814c36318dc718470cc96e167) # added by git -``` - -Once the cherry-pick is complete, open a PR targeting `libc-0.2`. - -See the [tracking issue](https://github.com/rust-lang/libc/issues/3248) for -details. - -## Adding an API - -Want to use an API which currently isn't bound in `libc`? It's quite easy to add -one! - -The internal structure of this crate is designed to minimize the number of -`#[cfg]` attributes in order to easily be able to add new items which apply to -all platforms in the future. As a result, the crate is organized hierarchically -based on platform. Each module has a number of `#[cfg]`'d children, but only one -is ever actually compiled. Each module then reexports all the contents of its -children. - -This means that for each platform that libc supports, the path from a leaf -module to the root will contain all bindings for the platform in question. -Consequently, this indicates where an API should be added! Adding an API at a -particular level in the hierarchy means that it is supported on all the child -platforms of that level. For example, when adding a Unix API it should be added -to `src/unix/mod.rs`, but when adding a Linux-only API it should be added to -`src/unix/linux_like/linux/mod.rs`. - -If you're not 100% sure at what level of the hierarchy an API should be added -at, fear not! This crate has CI support which tests any binding against all -platforms supported, so you'll see failures if an API is added at the wrong -level or has different signatures across platforms. - -New symbol(s) (i.e. functions, constants etc.) should also be added to the -symbols list(s) found in the `libc-test/semver` directory. These lists keep -track of what symbols are public in the libc crate and ensures they remain -available between changes to the crate. If the new symbol(s) are available on -all supported Unixes it should be added to `unix.txt` list1, -otherwise they should be added to the OS specific list(s). - -With that in mind, the steps for adding a new API are: - -1. Determine where in the module hierarchy your API should be added. -2. Add the API, including adding new symbol(s) to the semver lists. -3. Send a PR to this repo. -4. Wait for CI to pass, fixing errors. -5. Wait for a merge! - -1: Note that this list has nothing to do with any Unix or Posix -standard, it's just a list shared among all OSs that declare `#[cfg(unix)]`. - -## Test before you commit - -We have two automated tests running on -[GitHub Actions](https://github.com/rust-lang/libc/actions): - -1. `libc-test` - - `cd libc-test && cargo test` - - Use the `skip_*()` functions in `build.rs` if you really need a workaround. -2. Style checker - - [`./ci/style.py`](https://github.com/rust-lang/libc/blob/main/ci/style.py) - -## Breaking change policy - -Sometimes an upstream adds a breaking change to their API e.g. removing outdated -items, changing the type signature, etc. And we probably should follow that -change to build the `libc` crate successfully. It's annoying to do the -equivalent of semver-major versioning for each such change. Instead, we mark the -item as deprecated and do the actual change after a certain period. The steps -are: - -1. Add `#[deprecated(since = "", note="")]` attribute to the item. - - The `since` field should have a next version of `libc` (e.g., if the current - version is `0.2.1`, it should be `0.2.2`). - - The `note` field should have a reason to deprecate and a tracking issue to - call for comments (e.g., "We consider removing this as the upstream removed - it. If you're using it, please comment on #XXX"). -2. If we don't see any concerns for a while, do the change actually. - -## Supported target policy - -When Rust removes a support for a target, the libc crate also may remove the -support at any time. - -## Releasing your change to crates.io - -This repository uses [release-plz] to handle releases. Once your pull request -has been merged, a maintainer just needs to verify the generated changelog, then -merge the bot's release PR. This will automatically publish to crates.io! - -[release-plz]: https://github.com/MarcoIeni/release-plz diff --git a/thirdparty/crates/libc-0.2.186/src/lib.rs b/thirdparty/crates/libc-0.2.186/src/lib.rs deleted file mode 100644 index a00de4e2e..000000000 --- a/thirdparty/crates/libc-0.2.186/src/lib.rs +++ /dev/null @@ -1,168 +0,0 @@ -//! libc - Raw FFI bindings to platforms' system libraries -#![crate_name = "libc"] -#![crate_type = "rlib"] -#![allow( - renamed_and_removed_lints, // Keep this order. - unknown_lints, // Keep this order. - nonstandard_style, - overflowing_literals, - unused_macros, - unused_macro_rules, -)] -#![warn( - missing_copy_implementations, - missing_debug_implementations, - safe_packed_borrows -)] -// Prepare for a future upgrade -#![warn(rust_2024_compatibility)] -// Things missing for 2024 that are blocked on MSRV or breakage -#![allow( - missing_unsafe_on_extern, - edition_2024_expr_fragment_specifier, - // Allowed globally, the warning is enabled in individual modules as we work through them - unsafe_op_in_unsafe_fn -)] -#![cfg_attr(libc_deny_warnings, deny(warnings))] -// Attributes needed when building as part of the standard library -#![cfg_attr(feature = "rustc-dep-of-std", feature(link_cfg, no_core))] -#![cfg_attr(feature = "rustc-dep-of-std", allow(internal_features))] -// Some targets don't need `link_cfg` and emit a warning. -#![cfg_attr(feature = "rustc-dep-of-std", allow(unused_features))] -// DIFF(1.0): The thread local references that raise this lint were removed in 1.0 -#![cfg_attr(feature = "rustc-dep-of-std", allow(static_mut_refs))] -#![cfg_attr(not(feature = "rustc-dep-of-std"), no_std)] -#![cfg_attr(feature = "rustc-dep-of-std", no_core)] - -#[macro_use] -mod macros; -mod new; - -cfg_if! { - if #[cfg(feature = "rustc-dep-of-std")] { - extern crate rustc_std_workspace_core as core; - } -} - -pub use core::ffi::c_void; - -#[allow(unused_imports)] // needed while the module is empty on some platforms -pub use new::*; - -cfg_if! { - if #[cfg(windows)] { - mod primitives; - pub use crate::primitives::*; - - mod windows; - pub use crate::windows::*; - - prelude!(); - } else if #[cfg(target_os = "fuchsia")] { - mod primitives; - pub use crate::primitives::*; - - mod fuchsia; - pub use crate::fuchsia::*; - - prelude!(); - } else if #[cfg(target_os = "switch")] { - mod primitives; - pub use primitives::*; - - mod switch; - pub use switch::*; - - prelude!(); - } else if #[cfg(target_os = "psp")] { - mod primitives; - pub use primitives::*; - - mod psp; - pub use crate::psp::*; - - prelude!(); - } else if #[cfg(target_os = "vxworks")] { - mod primitives; - pub use crate::primitives::*; - - mod vxworks; - pub use crate::vxworks::*; - - prelude!(); - } else if #[cfg(target_os = "qurt")] { - mod primitives; - pub use crate::primitives::*; - - mod qurt; - pub use crate::qurt::*; - - prelude!(); - } else if #[cfg(target_os = "solid_asp3")] { - mod primitives; - pub use crate::primitives::*; - - mod solid; - pub use crate::solid::*; - - prelude!(); - } else if #[cfg(unix)] { - mod primitives; - pub use crate::primitives::*; - - mod unix; - pub use crate::unix::*; - - prelude!(); - } else if #[cfg(target_os = "hermit")] { - mod primitives; - pub use crate::primitives::*; - - mod hermit; - pub use crate::hermit::*; - - prelude!(); - } else if #[cfg(target_os = "teeos")] { - mod primitives; - pub use primitives::*; - - mod teeos; - pub use teeos::*; - - prelude!(); - } else if #[cfg(target_os = "trusty")] { - mod primitives; - pub use crate::primitives::*; - - mod trusty; - pub use crate::trusty::*; - - prelude!(); - } else if #[cfg(all(target_env = "sgx", target_vendor = "fortanix"))] { - mod primitives; - pub use crate::primitives::*; - - mod sgx; - pub use crate::sgx::*; - - prelude!(); - } else if #[cfg(any(target_env = "wasi", target_os = "wasi"))] { - mod primitives; - pub use crate::primitives::*; - - mod wasi; - pub use crate::wasi::*; - - prelude!(); - } else if #[cfg(target_os = "xous")] { - mod primitives; - pub use crate::primitives::*; - - mod xous; - pub use crate::xous::*; - - prelude!(); - } else { - // non-supported targets: empty... - } -} diff --git a/thirdparty/crates/libc-0.2.186/src/new/bionic_libc/mod.rs b/thirdparty/crates/libc-0.2.186/src/new/bionic_libc/mod.rs deleted file mode 100644 index 1dd186e4f..000000000 --- a/thirdparty/crates/libc-0.2.186/src/new/bionic_libc/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -//! This directory maps to `bionic/libc/include` in the Android source. -//! -//! - -pub(crate) mod pthread; -pub(crate) mod sys; -pub(crate) mod unistd; diff --git a/thirdparty/crates/libc-0.2.186/src/new/glibc/sysdeps/nptl/mod.rs b/thirdparty/crates/libc-0.2.186/src/new/glibc/sysdeps/nptl/mod.rs deleted file mode 100644 index 18e82e48b..000000000 --- a/thirdparty/crates/libc-0.2.186/src/new/glibc/sysdeps/nptl/mod.rs +++ /dev/null @@ -1,7 +0,0 @@ -//! Source directory: `sysdeps/nptl/`o -//! -//! Native POSIX threading library. -//! -//! - -pub(crate) mod pthread; diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/pthread.rs b/thirdparty/crates/libc-0.2.186/src/new/qurt/pthread.rs deleted file mode 100644 index 543f7874c..000000000 --- a/thirdparty/crates/libc-0.2.186/src/new/qurt/pthread.rs +++ /dev/null @@ -1,129 +0,0 @@ -//! Header: `pthread.h` -//! -//! QuRT provides a subset of POSIX pthread functionality optimized for real-time systems. - -use super::*; -use crate::prelude::*; - -// Thread creation attributes -pub const PTHREAD_CREATE_JOINABLE: c_int = 0; -pub const PTHREAD_CREATE_DETACHED: c_int = 1; - -// Mutex types -pub const PTHREAD_MUTEX_NORMAL: c_int = 0; -pub const PTHREAD_MUTEX_RECURSIVE: c_int = 1; -pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 2; -pub const PTHREAD_MUTEX_DEFAULT: c_int = PTHREAD_MUTEX_NORMAL; - -// Mutex protocol -pub const PTHREAD_PRIO_NONE: c_int = 0; -pub const PTHREAD_PRIO_INHERIT: c_int = 1; -pub const PTHREAD_PRIO_PROTECT: c_int = 2; - -// Thread priority constants -pub const PTHREAD_MIN_PRIORITY: c_int = 0; -pub const PTHREAD_MAX_PRIORITY: c_int = 255; - -// Initializer constants -pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0xFFFFFFFF; -pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0xFFFFFFFF; -pub const PTHREAD_ONCE_INIT: pthread_once_t = 0; - -// Stack size -pub const PTHREAD_STACK_MIN: size_t = 8192; - -// Additional pthread types and attributes -pub const PTHREAD_SCOPE_SYSTEM: c_int = 0; -pub const PTHREAD_SCOPE_PROCESS: c_int = 1; - -pub const PTHREAD_INHERIT_SCHED: c_int = 0; -pub const PTHREAD_EXPLICIT_SCHED: c_int = 1; - -extern "C" { - // Thread management - pub fn pthread_create( - thread: *mut pthread_t, - attr: *const pthread_attr_t, - start_routine: extern "C" fn(*mut c_void) -> *mut c_void, - arg: *mut c_void, - ) -> c_int; - pub fn pthread_join(thread: pthread_t, retval: *mut *mut c_void) -> c_int; - pub fn pthread_detach(thread: pthread_t) -> c_int; - pub fn pthread_exit(retval: *mut c_void) -> !; - pub fn pthread_self() -> pthread_t; - pub fn pthread_equal(t1: pthread_t, t2: pthread_t) -> c_int; - - // Thread attributes - pub fn pthread_attr_init(attr: *mut pthread_attr_t) -> c_int; - pub fn pthread_attr_destroy(attr: *mut pthread_attr_t) -> c_int; - pub fn pthread_attr_setstacksize(attr: *mut pthread_attr_t, stacksize: size_t) -> c_int; - pub fn pthread_attr_getstacksize(attr: *const pthread_attr_t, stacksize: *mut size_t) -> c_int; - pub fn pthread_attr_setdetachstate(attr: *mut pthread_attr_t, detachstate: c_int) -> c_int; - pub fn pthread_attr_getdetachstate( - attr: *const pthread_attr_t, - detachstate: *mut c_int, - ) -> c_int; - - // Mutex operations - pub fn pthread_mutex_init( - mutex: *mut pthread_mutex_t, - attr: *const pthread_mutexattr_t, - ) -> c_int; - pub fn pthread_mutex_destroy(mutex: *mut pthread_mutex_t) -> c_int; - pub fn pthread_mutex_lock(mutex: *mut pthread_mutex_t) -> c_int; - pub fn pthread_mutex_trylock(mutex: *mut pthread_mutex_t) -> c_int; - pub fn pthread_mutex_unlock(mutex: *mut pthread_mutex_t) -> c_int; - - // Mutex attributes - pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> c_int; - pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> c_int; - pub fn pthread_mutexattr_settype(attr: *mut pthread_mutexattr_t, kind: c_int) -> c_int; - pub fn pthread_mutexattr_gettype(attr: *const pthread_mutexattr_t, kind: *mut c_int) -> c_int; - - // Condition variables - pub fn pthread_cond_init(cond: *mut pthread_cond_t, attr: *const pthread_condattr_t) -> c_int; - pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> c_int; - pub fn pthread_cond_wait(cond: *mut pthread_cond_t, mutex: *mut pthread_mutex_t) -> c_int; - pub fn pthread_cond_timedwait( - cond: *mut pthread_cond_t, - mutex: *mut pthread_mutex_t, - abstime: *const timespec, - ) -> c_int; - pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> c_int; - pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> c_int; - - // Condition variable attributes - pub fn pthread_condattr_init(attr: *mut pthread_condattr_t) -> c_int; - pub fn pthread_condattr_destroy(attr: *mut pthread_condattr_t) -> c_int; - pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t, clock_id: clockid_t) -> c_int; - - // Thread-local storage - pub fn pthread_key_create( - key: *mut pthread_key_t, - destructor: Option, - ) -> c_int; - pub fn pthread_key_delete(key: pthread_key_t) -> c_int; - pub fn pthread_getspecific(key: pthread_key_t) -> *mut c_void; - pub fn pthread_setspecific(key: pthread_key_t, value: *const c_void) -> c_int; - - // One-time initialization - pub fn pthread_once(once_control: *mut pthread_once_t, init_routine: extern "C" fn()) -> c_int; - - // GNU extensions - pub fn pthread_getname_np(thread: pthread_t, name: *mut c_char, len: size_t) -> c_int; - - pub fn pthread_attr_setaffinity_np( - attr: *mut pthread_attr_t, - cpusetsize: size_t, - cpuset: *const cpu_set_t, - ) -> c_int; - - pub fn pthread_attr_getaffinity_np( - attr: *mut pthread_attr_t, - cpusetsize: size_t, - cpuset: *mut cpu_set_t, - ) -> c_int; - - // POSIX standard - pub fn posix_memalign(memptr: *mut *mut c_void, alignment: size_t, size: size_t) -> c_int; -} diff --git a/thirdparty/crates/libc-0.2.186/src/new/vxworks/mod.rs b/thirdparty/crates/libc-0.2.186/src/new/vxworks/mod.rs deleted file mode 100644 index 65630565e..000000000 --- a/thirdparty/crates/libc-0.2.186/src/new/vxworks/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -//! VxWorks libc. -// FIXME(vxworks): link to headers needed. - -pub(crate) mod unistd; diff --git a/thirdparty/crates/libc-0.2.186/src/types.rs b/thirdparty/crates/libc-0.2.186/src/types.rs deleted file mode 100644 index d786d2ccb..000000000 --- a/thirdparty/crates/libc-0.2.186/src/types.rs +++ /dev/null @@ -1,67 +0,0 @@ -//! Platform-agnostic support types. - -#[cfg(feature = "extra_traits")] -use core::hash::Hash; -use core::mem::MaybeUninit; - -use crate::prelude::*; - -/// A transparent wrapper over `MaybeUninit` to represent uninitialized padding -/// while providing `Default`. -// This is restricted to `Copy` types since that's a loose indicator that zeros is actually -// a valid bitpattern. There is no technical reason this is required, though, so it could be -// lifted in the future if it becomes a problem. -#[allow(dead_code)] -#[repr(transparent)] -#[derive(Clone, Copy)] -pub(crate) struct Padding(MaybeUninit); - -impl Default for Padding { - fn default() -> Self { - Self(MaybeUninit::zeroed()) - } -} - -impl Padding { - /// Create a `Padding` initialized with the given value. - #[allow(dead_code)] - pub(crate) const fn new(val: T) -> Self { - Self(MaybeUninit::new(val)) - } -} - -impl fmt::Debug for Padding { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - // Taken from `MaybeUninit`'s debug implementation - // NB: there is no `.pad_fmt` so we can't use a simpler `format_args!("Padding<{..}>"). - let full_name = core::any::type_name::(); - let prefix_len = full_name.find("Padding").unwrap(); - f.pad(&full_name[prefix_len..]) - } -} - -/// Do nothing when hashing to ignore the existence of padding fields. -#[cfg(feature = "extra_traits")] -impl Hash for Padding { - fn hash(&self, _state: &mut H) {} -} - -/// Padding fields are all equal, regardless of what is inside them, so they do not affect anything. -#[cfg(feature = "extra_traits")] -impl PartialEq for Padding { - fn eq(&self, _other: &Self) -> bool { - true - } -} - -/// Mark that `Padding` implements `Eq` so that it can be used in types that implement it. -#[cfg(feature = "extra_traits")] -impl Eq for Padding {} - -/// The default repr type used for C style enums in Rust. -#[cfg(target_env = "msvc")] -#[allow(unused)] -pub(crate) type CEnumRepr = c_int; -#[cfg(not(target_env = "msvc"))] -#[allow(unused)] -pub(crate) type CEnumRepr = c_uint; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs b/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs deleted file mode 100644 index f808ff31f..000000000 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs +++ /dev/null @@ -1,54 +0,0 @@ -use crate::prelude::*; -use crate::pthread_mutex_t; - -pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; -pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 32; -pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; -pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 48; -pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; -pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 20; - -#[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, - ], -}; - -pub const SYS_sync_file_range2: c_long = 84; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs b/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs deleted file mode 100644 index 960e51278..000000000 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs +++ /dev/null @@ -1,57 +0,0 @@ -use crate::prelude::*; -use crate::pthread_mutex_t; - -pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 8; -pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 48; -pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 8; -pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; -pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 8; -pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; - -#[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; - -pub const SYS_renameat: c_long = 38; -pub const SYS_sync_file_range: c_long = 84; -pub const SYS_getrlimit: c_long = 163; -pub const SYS_setrlimit: c_long = 164; diff --git a/thirdparty/crates/libc-0.2.189/.cargo-checksum.json b/thirdparty/crates/libc-0.2.189/.cargo-checksum.json new file mode 100644 index 000000000..69f96bdc2 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/.cargo-checksum.json @@ -0,0 +1 @@ +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"3ae25e402263c1d372a9c6a0b09d4f63d6744a1f8d7912108191c3b6276ceb4f",".editorconfig":"e57fecd6b82cd69640ca1bc4e44f0c7acfe5fc12f641f14af9536e323b4159db",".git-blame-ignore-revs":"761aa385c661241fa77c15b502c361398cf500bbb9f8c3a4579b412c4c6249d7",".release-plz.toml":"fcf2d382c4a2abd96caf9cc391b63e0c94d5832f5c48e9ab9eb4b2c847c0887c",".rustfmt.toml":"c88d9ba0e884291a2904d43cc7b940fafcb1ab443cdb7bcfca7117809c4f2816","CHANGELOG.md":"1629ffb688b6f2ea0c1720ba1f768904ef9f27da4e9e7f32b76d6d52cd1940d1","CONTRIBUTING.md":"ed7177a16e331da75244df3232c4e34f70bf58d2b31cffffd9b769a4745de567","Cargo.lock":"7b23220c994971e1ef93c3a13c78476fb35043e701a2e9c3f80567af3d94a9c3","Cargo.toml":"95159789ef9c9aaee8230b13be5c89594833a7bf2db299e61eb23b512cb67144","Cargo.toml.orig":"cba73b06128539455a57f7432e466ba583358ecb83ef8eda60731751b8a9f5cc","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"123a331b5dbf04c30097fa43b8f858bc85df671fe776de498d01f3d6b7c1f69e","README.md":"5af805465cb8cfa4186cb75df07f4aebd35a3d88f497ed71d189b74ecf8cbcdc","build.rs":"e47f4a6762799b6e69cefc7acdb3291df828010e4de20609f7378f9c94ea29e6","etc/libc-util.py":"a99fdefe6354c28c52eeac9c1e851041b69dad25b8a3b521d4f57b761517c798","src/fuchsia/aarch64.rs":"34105478e20e9ce40b9e484eea6494e2408fead17c13500da90a2d44d996ce63","src/fuchsia/mod.rs":"3b17821b3ceaf3430b6503965f5337b033817077e289e3cce29c80bf3960770f","src/fuchsia/riscv64.rs":"a91ae8276df139f6181591be7209f9a68e9f3de5eec881c2e1c9768c53c4e292","src/fuchsia/x86_64.rs":"543ea567b29d646afc026956ee5e652c10e87256789058e7e39f91bf2fe8bf14","src/hermit.rs":"ebfe4d68e8f0323dc97d7e3165f7b315e4058ee9f5ced3e76f181f0a492e75e1","src/lib.rs":"0701ce9606a01448c3229517fab308d49d160cccfca02ed6ebd8edfd8bb37d66","src/macros.rs":"6d534c7b511cd19217ba205a4a30e289f7243ba3706645d6ec5cb417b7bdac7c","src/new/aix/mod.rs":"df0de5d8e452a8abb27727b8451b2ceff3bb856f7e5d9e9306df5177e4c6326f","src/new/aix/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/apple/libc/signal.rs":"a960b6153775d791055b278534f79e21f8ff76c2c0c2891271e7abdf26e193d3","src/new/apple/libc/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/apple/libpthread/mod.rs":"1e99efe513b0ee1fa6e53daf5950fc027380b1d71d793eca9e5b22af7b331b5b","src/new/apple/libpthread/pthread_/introspection.rs":"3c797ded6d1a55670f9537a997407cf2267e6c7e7dbfa360d32474e2432979af","src/new/apple/libpthread/pthread_/pthread.rs":"c2b680120ec8db839e702c4340bc39748ac34c806b5fc08acea0a4593131a015","src/new/apple/libpthread/pthread_/pthread_impl.rs":"57a9925a75b79d092c65288b8a8eb21bfb6c7de4c70d37a49018b4eb8b32a646","src/new/apple/libpthread/pthread_/pthread_spis.rs":"1ba51c251249822fae222db6a19e17278ffffc424fc6eea30282a6171491edbe","src/new/apple/libpthread/pthread_/qos.rs":"40f816fb6cebd19ead21197671e5425b454144515ee4b966d00db32ba6b0dfe5","src/new/apple/libpthread/pthread_/sched.rs":"7b22a3204e72d5013ebac7b830235d50883aefca86d720f1f38b93d54e309477","src/new/apple/libpthread/pthread_/spawn.rs":"daef8af8ed0b3d16922c2f5a511a67f57f69b5f80dfe37362bd0b410213f95ca","src/new/apple/libpthread/pthread_/stack_np.rs":"d1b6e2eab1850c303f8eec4059b3e8ec57d69eb47c216243f6b4b7523761fc29","src/new/apple/libpthread/sys/_pthread/_pthread_types.rs":"a7a4307d7c3f91a6b03f76599fac5f40de556e5652123c6bc3b95df2bfa685de","src/new/apple/libpthread/sys/mod.rs":"337265fe49d77a7dcc879cd23e4f5baedcffab4808433dfb6ab9deb4ab490380","src/new/apple/libpthread/sys/qos.rs":"a6297cbab4089b330416bfcbe13b6d7aa8e75352299295046429b2e9d3bada42","src/new/apple/mod.rs":"96e4f2300247b8b587f312aeb8de991c65afd6a1693bbe0dc25610b9574d66db","src/new/apple/xnu/arm/_mcontext.rs":"63f1c62b47e7d7181c2b85f3cd3833c69a29eb0cad37a5754bfa6b5954ae7f6f","src/new/apple/xnu/i386/_mcontext.rs":"50543eaa5cf1d87f900b0c3e531dbfefd7586e1be2be3406223b2319edfcb7f2","src/new/apple/xnu/mach/arm/_structs.rs":"8e4af554170cef61c9143f92a283fd7eef66ad78824f194bbc89b098c6049a43","src/new/apple/xnu/mach/i386/_structs.rs":"d7316b7d3fa5e55a5818cfd8a1977921bb14e07133648cffa8f4d9da2e31a604","src/new/apple/xnu/mach/machine/_structs.rs":"82f5a7f751897c882ed4c378d6282976ff21cf0c9cdf7f3be3cecd369a63b6f8","src/new/apple/xnu/mach/mod.rs":"46aad5c7197df2cc57c4392d9019034236233f0240bc7975f9e22ac33c9d40ed","src/new/apple/xnu/machine/_mcontext.rs":"166b0a450b730e2a943ca08a0c70061effb77ff9eff6f41c7b0c51b2d4215db9","src/new/apple/xnu/mod.rs":"9359b08f58f8cd88ade250166850202daa6e3278d387c072ac51e8f0c0cced19","src/new/apple/xnu/net/bpf.rs":"0b6477e4ff541fbabe66ac2729524fc38c1e4be52a2f9e34c4155be732643318","src/new/apple/xnu/net/mod.rs":"7868b2b0065e01776ec4badaf166cac4ccb68ed98bf9bc284dbaffbf33e367b5","src/new/apple/xnu/netinet6/in6_var.rs":"61d6fc1ed1bbff8b0aa7de219b181aa68cc870ef290a6c39f5f3703eab955608","src/new/apple/xnu/netinet6/mod.rs":"dd1b80a3a57ffe7b48c60639a003d6e293646eb7a2cf209bf3673b043edbe611","src/new/apple/xnu/sys/_types/_ucontext.rs":"1651132d39042f0fc8cca7a23c890da0031b74359472189f851fb3458f2fde3e","src/new/apple/xnu/sys/ioccom.rs":"dab00d14e36566c21be6cc7063ce4542c5c7fe9d9d3d27b1069a4c523e5125cd","src/new/apple/xnu/sys/mod.rs":"9f1013ae8b269add421f0d4a52b0baba841e1909dee5076fd1e76639a024e379","src/new/apple/xnu/sys/signal.rs":"a03cb64ec19326657c87ff8a5a31c2e6bc1deb55f9a7343ab1b2420819ed72bf","src/new/apple/xnu/sys/sockio.rs":"1f298340a2d7b17b23aeacb87d1af829a142f6c8bb82d2237d7e0bee3b4c053e","src/new/apple/xnu/sys/ttycom.rs":"da3bc0f95f4e7ded2e399fe977a39751b248c8a807cd37b3c6fdf41d15478d18","src/new/bionic_libc/kernel_uapi/linux/mod.rs":"b33dff424c9841a9037e31dddb90d7bd74de451e8509d7abc7dda636ec2646e7","src/new/bionic_libc/kernel_uapi/linux/types.rs":"10860921059eb04c5f0f159becfc415021f501ae33dc374872861b9a339af25b","src/new/bionic_libc/kernel_uapi/mod.rs":"d7808294eeb095d0298e8a9837d597f80f7c2629aa5e3281547f7ae00392f17b","src/new/bionic_libc/mod.rs":"23fdadb2e6d9823b8d37436abf5ba01629006fd5310977d2035802e5ca9a0c1c","src/new/bionic_libc/pthread.rs":"d40b7f8421cf78d61f23224c3bda17407e40a1c85dd8122ca4f290624b21d8a1","src/new/bionic_libc/sys/mod.rs":"570e7c97f7c1efb14e167a3f0688547fbc907ed9dca93ad6d90dc719289cb6f1","src/new/bionic_libc/sys/socket.rs":"19877b1de0e235a01734f9aebf20fc1ff1a01fd17302ed1a7d7b520a9fa68edb","src/new/bionic_libc/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/common/bsd.rs":"8282cc2b87ca3afc6b01216fe3c3fe1818a3d57e95aa8d1e1a36cc5af1660609","src/new/common/freebsd_like.rs":"156dce9baa6b0ac57d483ffb582a913b9e4944cf10bbb5711a64da5f496a55c2","src/new/common/linux_like/mod.rs":"d42e65b3d6fccd5ba85a8397abb28267a96bfb76b6b47754000fbe9332c03fe4","src/new/common/linux_like/pthread.rs":"a1a33b1e27cd159ab1035c73e72fa8b0c266dd5a28f1079ad74d3c370857f097","src/new/common/mod.rs":"5bcbce2960ff0840ab67a1ba5011009fa1f0f7697cff745d1461bf2b1460ddc6","src/new/common/netbsd_like.rs":"4327dd28d929f2c7b316f9241c44da6f6069d3db4381fb82700ec6d70d749041","src/new/common/posix/mod.rs":"f64b9d7f78e924529c62f2cd78199075eb334e0db9479cb59787f2740bd82d51","src/new/common/posix/pthread.rs":"912f3d6bfc4b1e3ec90754d021ead243a5cdc96666b053bec5718edf5fbe6b92","src/new/common/posix/unistd.rs":"3f633a8c6776d1442f014717785fea3f068d1d3edbfad545d445f8076cb58447","src/new/common/solarish.rs":"ac208e1ad95d07b7528419fd9c573612d58af3d50766816b81667570ccb8b3b3","src/new/cygwin/mod.rs":"9de4cba157252e7731256d60192468f5a759ebd33ab2b509819ffc7557adced5","src/new/cygwin/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/dragonfly/mod.rs":"7b96df7e566874a736d0c33ffc9e75a5f80e674da990cb664556728769ff25f9","src/new/dragonfly/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/emscripten/mod.rs":"d0ec81b919d9d078bb7d66d9429c08b609e2b0fab512be30aa22cc00fa620660","src/new/emscripten/pthread.rs":"f14720341515da443cad49d61bf27a3d156b9fe7d7ccdf51651f1fdf4cb15c7f","src/new/emscripten/sched.rs":"6f0a5b3cefb42bb01feabf34ad92d4bdbe5743263d4cd7b754baf921da81a127","src/new/emscripten/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/espidf/mod.rs":"c89c7d3b96583d84888aae0c463dc49b5af61b34a97e9cde52fb9b62d301a023","src/new/freebsd/mod.rs":"d686733e28252ecb6e3100265c2f8c9d7b8ef1c0683504483f097882f195df12","src/new/freebsd/net/dlt.rs":"bf5e1dc8da836253b2a00e14e590d95611d73ac9136fe96af8ac42541905ff9d","src/new/freebsd/net/mod.rs":"68225681a4f1a024f91185088a430a4324dfed6a290ba26cca9c4dd93d0b32c9","src/new/freebsd/netinet6/in6_var.rs":"858763ada9b7d549d0ad95478f40c380e46c2f9ca8af1a35ec86f3ca0545ee74","src/new/freebsd/netinet6/mod.rs":"f6fcf32012b48840525df6e684c83cdbcafe69b8148f540bbc9dfe9f36ce0356","src/new/freebsd/sys/file.rs":"4dffceca36eaa53c3ace434e4fed1309009448c67ea6684a067a2cf362235e02","src/new/freebsd/sys/ioccom.rs":"7b842ee1a6688a6d38ededc8aa69dd991b9d2e31d796fd0b8f9ce982ec8d1867","src/new/freebsd/sys/mod.rs":"3f2a2b60db73753dc32a06cf50914767eb567338ce21d8b18ddf53473688f9c5","src/new/freebsd/sys/socket.rs":"fc0b459bc6f0ae2c5d359b0bcb28d0d5f68ac492e4b7ba06654932e9b72fbe03","src/new/freebsd/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/fuchsia/mod.rs":"c15b2da96c52281e86d4f114522999e6e713723f4950d62c2d544be641b28722","src/new/fuchsia/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/glibc/mod.rs":"fdec8f6272dbb2e084f6f4a87ebf30d479c0f66e7b0677796db8ae5b6c9df3e7","src/new/glibc/posix/unistd.rs":"b8528999ecab0a4883c0d89b1cb3c585a666255ab4a4bf5bfc705f7613edd8f4","src/new/glibc/sysdeps/mips/mod.rs":"4ee7bbd51acb0822e15b0b2e367aeb9c17b8514ec0e30c48f49664d6fda58030","src/new/glibc/sysdeps/mips/nptl/bits/mod.rs":"04b4ad0d30f3909c758eb5f20856289063d40af62a219e458dfe5b395ce46f7d","src/new/glibc/sysdeps/mips/nptl/bits/struct_mutex.rs":"dea882605b6d2bb7ece9f464350a5e08fe60b2269da1e743500862000fff0aa0","src/new/glibc/sysdeps/nptl/bits/struct_mutex.rs":"3eb21d2dca785c486c42cf27f1826d703b93dd68b162b60f27496b759244b55c","src/new/glibc/sysdeps/nptl/mod.rs":"80241727cf97fd683fd142516c8785ff65d5610af46c4d328f7b189968822055","src/new/glibc/sysdeps/nptl/pthread.rs":"2a70703f299597f77969f3c221a8588036f668415fe3c8d7b4cadbb0613b9b84","src/new/glibc/sysdeps/powerpc/mod.rs":"a4ace6198d60e936cf9f9c6c91142de0504deea7e75d956fd87d8616ee9d8ca5","src/new/glibc/sysdeps/powerpc/nptl/bits/mod.rs":"22902d28b252dc2bc895039f35f73b9bd0820901f279c52ea68886dfa3e01bb4","src/new/glibc/sysdeps/powerpc/nptl/bits/struct_mutex.rs":"cabb41afb4bd7a8530381f333cdf5ac10b1e5efa3d8a0b0e5eabb4992fa2dd59","src/new/glibc/sysdeps/s390/mod.rs":"14b77d79c4d6a9c6317de05fcd7abde4ce96d3205d51f122155d97469a3ee3d6","src/new/glibc/sysdeps/s390/nptl/bits/mod.rs":"9917ffcb24f1b3176ef8893b63d62db6e0a1739d127791d57ab747f632d96575","src/new/glibc/sysdeps/s390/nptl/bits/struct_mutex.rs":"d03e09f593df8db6e3c4ea38a0500adef7a55835f8eec094e16d38a65bd65af9","src/new/glibc/sysdeps/unix/linux/mod.rs":"9a7c4d5c62c37166b35d2daa69a3dc8f5b4548ef49955463ae41393e260a4cb5","src/new/glibc/sysdeps/unix/linux/net/route.rs":"d8ec70bbaa919692430fdd608b70db11dbfe86b202760727dfd474a4b25b35c2","src/new/glibc/sysdeps/unix/mod.rs":"aa6d2fb4c32f5e1139cae14bcf7cee5935657aeff97df9c064ae9acd67620d04","src/new/glibc/sysdeps/x86/mod.rs":"3b10a1317ab9a91b525b14072c7a18bd19d03dbfbd7d9c21a67e88677485815d","src/new/glibc/sysdeps/x86/nptl/bits/mod.rs":"ffe722e02d262533f5f1ecdfa972492465ddc8585dd1c586c8ec00c68e59c50e","src/new/glibc/sysdeps/x86/nptl/bits/struct_mutex.rs":"ed725f7e076ebe1ef7ce856d819434f918911f99a9f1541cd1da3d6f8075770c","src/new/haiku/mod.rs":"b3863768692c6da24fc28fdcf0c29a9dd9e3a84f301d4bee6ccc4f802befc4f8","src/new/haiku/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/hermit_abi/mod.rs":"25e5d698f292b95057f18dfe203fa96316326e0ca103da532190bb17c29cfdcf","src/new/horizon/mod.rs":"44b47e15d429026d369adfc16a4e9783cdda1be3d0a04f17c283da06573df886","src/new/hurd/mod.rs":"190a149192c237634df3e49c4834d05299aee91a3d399f356d97c36d35571a59","src/new/illumos/mod.rs":"eb5dd158844f63375a6fbb881d63279b12865342d1bb0da221216b7aa9c474b5","src/new/illumos/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/l4re/mod.rs":"5fe9a1660accdaa5df8c1837b04001cea818620eca4d46d3a9cde81682cc59cb","src/new/l4re/packet.rs":"7f3ddbd9121e2029cdebede7890cf812e16da43bd7f9a0fb3b6cf224fdd318ce","src/new/linux_uapi/linux/can.rs":"b30565ca3a98f76f98a6410fdd0649336270aa1ae4c677d1ce0d67a9be8803ee","src/new/linux_uapi/linux/can/bcm.rs":"1718a1c3aae686d18ec83dff1560439d61de244bfaf332256cc2b42b85fe5249","src/new/linux_uapi/linux/can/error.rs":"5c5ef6d7c2b9432ebbf6147f96cd260e10686f449f879e64db4757670a6ec638","src/new/linux_uapi/linux/can/j1939.rs":"8976b51496d3f4aeb8eeec68558cb0298ad1fa4a879a9b4fda56ce2572f61d18","src/new/linux_uapi/linux/can/netlink.rs":"2d90a0cb5dc9a15365c99c5101db1698f2da2df66704cfefdafd06252bcabe3e","src/new/linux_uapi/linux/can/raw.rs":"669f39f228820f8c76db846322dd4aa7599fcdf90a2f2f17d841294924bc094c","src/new/linux_uapi/linux/futex.rs":"5168f5be61449a3a6d81bc52bbc28f1c006c3c1ee2ae4005800d89d6ff2e1296","src/new/linux_uapi/linux/if_addr.rs":"997e2be333fced6a65698ed07cd0c894c38ccf82ee15e85f46aba3b1956a3e49","src/new/linux_uapi/linux/if_link.rs":"11d7773f787f6eab32e66795d315cc96f72c7fc38bc6a32bcfab3d8465d90ed2","src/new/linux_uapi/linux/if_packet.rs":"27b1f41f897c0ab33809dbcdc53b55e29cf3ba0c542da855f8c871f1c4527b44","src/new/linux_uapi/linux/keyctl.rs":"c25ee20a54a14d56de2c886c32f718b7a403b18152cc81bd7726f974cdf5b3a3","src/new/linux_uapi/linux/membarrier.rs":"5d6b55b1f7410aeb24ce6bcdbac0d33144b14dc048641ebccb5adc697ea7de2f","src/new/linux_uapi/linux/mod.rs":"1ac1404725b699c36f4981f39f0b33f71659fd1d41d2a98527fcff668c72f854","src/new/linux_uapi/linux/mount.rs":"be5bdf14fcab637b86feab3888d4faf4cfbb0b48078af1f5c64a4cc0192bb112","src/new/linux_uapi/linux/netlink.rs":"f662fc63c460e4927874c8143fcc826f9f97da6a878c86db3653b7004a3285fd","src/new/linux_uapi/linux/pidfd.rs":"6500c63d1ccaf4b7e14a36f225fd309bce9de80a50b81bca14bc6bded6ebd04e","src/new/linux_uapi/linux/sctp.rs":"065a53c3d4b6ece8976424eefeb1e1d1a6f0ac842999c58b905631dffdd2a6cc","src/new/linux_uapi/linux/tls.rs":"de59d2e2dd5b9939594874fad5453603ce4d59587d1affad6931616c9e9884bc","src/new/linux_uapi/linux/types.rs":"834f7e361d08bf1dec5c4761011b8df780e14feb69b6e2a6717fc0d3c6a6a12e","src/new/linux_uapi/mod.rs":"76cc081d46d008fe05fbb3d7f007fb62374d4efd9464916bbeb9b20c288c6416","src/new/mod.rs":"7b2d0abc1797d27b8d5d18eba44e722e032cef54e1c9a0110db40422784bd3e5","src/new/musl/arch/generic/mod.rs":"106383ed35cb7526bbbb0e16ce3521ddb2a9e61fb533687922fc9b43cd654af7","src/new/musl/arch/mips/bits/socket.rs":"eb4dff2ab581eb893e0e6547ae7a7d86453caa069b61272a818256280a23ca71","src/new/musl/arch/mips/mod.rs":"cc6c0a24ef77b7c404887fb5b7a7fd15c2a79e2a3396531ea0058636cacb3018","src/new/musl/arch/mips64/bits/socket.rs":"eb4dff2ab581eb893e0e6547ae7a7d86453caa069b61272a818256280a23ca71","src/new/musl/arch/mips64/mod.rs":"40242447a56ed21249f0417f87a7ccd074a366f19eb1353d94e904f370e0f20f","src/new/musl/arch/mod.rs":"31a73fedfd8606e04352425fb4917181f2d7376f445cb61a5460bd682ce29ed4","src/new/musl/mod.rs":"6b2e092bdc907d2d236a5f6ad977d931e13e99425a3738a62769220697cc13de","src/new/musl/pthread.rs":"e76e8f71cba55b45e4aa954970f939142595b828fd7e83586fc9145299a3b1cb","src/new/musl/sched.rs":"6f0a5b3cefb42bb01feabf34ad92d4bdbe5743263d4cd7b754baf921da81a127","src/new/musl/sys/socket.rs":"ed9de77a5937115aada325ce3d68b31e24e7ac21691dc2cb52c4e4695aa1e1dd","src/new/musl/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/netbsd/mod.rs":"d7bddddf98b09188a6fe541feaaaecdee85eb55fee2aa3cf670f7e6afa4ac342","src/new/netbsd/net/if_.rs":"5083d0f9d84de47c8b6fae60c9bb74d7c0586a80ccb8d625e5e2b4876e7f9444","src/new/netbsd/sys/file.rs":"a30095d85a4f8af49494f9b38114415f5c30e1d96a8c882eb7efd83a1cb6816a","src/new/netbsd/sys/ipc.rs":"91af85c26b3dca2a0661c820871d176baf29c00d53540f4807b9b28f9f3dfae4","src/new/netbsd/sys/mod.rs":"2dfbbf18e7585b64acfeb2f39d0495b50c142caec680db64bb4655e182347262","src/new/netbsd/sys/socket.rs":"a926087991d4cd7ebe31a3f626b5a196047c20955e9e3c99f5abe50b899b1ef3","src/new/netbsd/sys/statvfs.rs":"875c73a2c18ef78c7363b2196282579b88beca2d42ed24bda4fe8e7800db9bd4","src/new/netbsd/sys/time.rs":"7d420d5384e13ca361aaf9a7fc9faafe29a55b216988c8252a891d2232407a0c","src/new/netbsd/sys/timex.rs":"1b476328c16ce06e316485bd9dc751f31e51f63d0c07e438bf3227e66da07768","src/new/netbsd/sys/types.rs":"a0ec3ac038f0026c285ebfd869a8ae062117b1ff29855cbcf570f7f55860c854","src/new/netbsd/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/netbsd/utmp_.rs":"cbd35108f4ad7fd3c4fc65b888ba7813a29e3ed4af7920604df8085345f81973","src/new/netbsd/utmpx_.rs":"27171f826d6d2bf962a1d973a3427477ae960ad5dccc947c481d45f17ae645f0","src/new/newlib/mod.rs":"046372b698393e20436c85b28dac6f02b5cc7d599d134637bbdaa89f2530d1a6","src/new/newlib/unistd.rs":"15e74fb2c22e2343faa06a7a61baca198d7867cd70f8a4ead6cdc1f4fae24905","src/new/nto/mod.rs":"2e80a71385d3344a5f0b95b8d509148b52ea1a253d87e8f27345956d119f7e58","src/new/nto/net/bpf.rs":"3634f8f5f31f9ad86bf9fe6b4438782806bffc75700c6045673e5512b4cb14bc","src/new/nto/net/if_.rs":"cdea96569bb155c7372da481dbf00630aadfadb68ef07bfe94d258a6c600b82b","src/new/nto/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/nuttx/mod.rs":"7dbbf039987cb5ca17d2a1a562dc967de1c31b970568f728339cd5b9c8e05e25","src/new/nuttx/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/openbsd/mod.rs":"7d86ff099ddfdc8c383f49a1f6fa9c1169810cbe0c1c57d0e86dc14cb1d87320","src/new/openbsd/sys/ipc.rs":"dd37c821138dbf723d637319ad0849e9ed0b2fce1d498e7e38627a8b0a8bf142","src/new/openbsd/sys/mod.rs":"a8fd8f1cb50bffb34db04d1040048e7c23043fea834c1915453b5d539034a845","src/new/openbsd/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/qurt/dlfcn.rs":"8bfec94f78786e2eee9d4306efbf9ad977cf2b3f0d930f8cc65186e922371a9a","src/new/qurt/errno.rs":"2456f7f7557e4716f8b65b1ef67281f795c70ad1d5515d6b001d26c07b943af3","src/new/qurt/fcntl.rs":"0784ab7c55521df2ae80d37749fd22587bf5fe27568758e7d1b7e121a26db457","src/new/qurt/limits.rs":"91c8b32b54cddbef81c9d1225f0c15d27b8d697e04225a808f28737960390727","src/new/qurt/mod.rs":"8047001f3aa1704683ea57343015248b1ba1c860a671763fb7087da1c497fd36","src/new/qurt/mqueue.rs":"f7d9175c4170f9c7fac147aacece30a08319c1a01ceac242819dacc31b1abb28","src/new/qurt/pthread.rs":"8d6ad30ecf52a10062e0ffc891719643dbe1282d779934180a1e858f8c1b1e5b","src/new/qurt/semaphore.rs":"eb995a92cdead52ee61c3f498c7e408430b8430cd6cb6be74b47e6728c6773ae","src/new/qurt/signal.rs":"82ec220c868d6bff14556abdb8e12fdb9498f991d5b525d5cd13151f57b5f309","src/new/qurt/stdio.rs":"280e1faa29c7e2749469a9f9c4b0fa4ba8e0cee42a6e53d9376be6b8e3b8c2ff","src/new/qurt/stdlib.rs":"7d2aad4837a4be08083be8153ecf3e95d8c70469598fbad25793c4cfed1939d8","src/new/qurt/sys/mman.rs":"c0b862bf262564507796b1cdda967c601d265e6a1f1abfe1a5b6d45aa0742df6","src/new/qurt/sys/mod.rs":"e8585c4d447d02d1f4b72183e3d8b8c0d57301ca7099534ce2086a7a3d384b7d","src/new/qurt/sys/sched.rs":"5ae31ad3bf9199e570b9aa0f164eb337a322498aa8d7fb88e9cd73bc19ded597","src/new/qurt/sys/stat.rs":"bbd98cd523dfc7e34c163bc2d397be8ed08401fe24d85d617b581d31e5bdb708","src/new/qurt/sys/types.rs":"c23c7f02eaa198f04991f0dede9e55279effd49ec4a341fb13064f68c19f24ca","src/new/qurt/time.rs":"2745f5ad92955c192023cb57922c7d028d29a5a36a4cd531f9c2ad2a6f3fabc2","src/new/qurt/unistd.rs":"377331ec77889334611103320c54838592dc1b92f38b52bdf5b324b67657af81","src/new/redox/mod.rs":"aaeaa40c0bffde42973cd1809c1c845075f92fac95a074fe3d01d4fb02dc0992","src/new/relibc/mod.rs":"5c6955e052d8b7ead97179e356c369ffcc435e09fcca4def3e100568845e7296","src/new/relibc/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/rtems/mod.rs":"8ad621434ced0a9d1c0ed5d68514f59b0c8bd4c77fdad81eb09e671e7a42cf1d","src/new/sgx/mod.rs":"c500dc72eff5cbf99c9d7e0e3f1faa3c680bfd7f6ac0166fa1a35fd0d7e69f41","src/new/sgx/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/solaris/mod.rs":"ce8a152ebacb9e8e0d87829d166e3ead64222ead397371bd557e18eefdcafe3d","src/new/solaris/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/solid/mod.rs":"dc5c3c8a627972865ef0a968125e74b2f87636dc89dd2df0f7cea9a40d7c6beb","src/new/teeos/mod.rs":"1d69f212e2a848a32292eef9ad16a44a8d5cf80c7d43db5f445dbd1a49400e3b","src/new/trusty/mod.rs":"3f009fef70cbe062126c82f1f9274cba60b12d3766b825d66326666a1f240fc2","src/new/uclibc/mod.rs":"c3f988f3eb289ba6bc3b2535b82163a7ff160288b7494c156f0fba62143cf2d5","src/new/uclibc/pthread.rs":"ab235319003806c5f20aef5f851af472480e88ff13d2a5f730870efb95e7982e","src/new/uclibc/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/ucrt/mod.rs":"4fd3a973de4c4c6349e76320e09b13701ac284e7ae03c671054b1eeebb86215d","src/new/vita/mod.rs":"196d6ca5c9b1ccc602a6270c3cf0b0bdbd39246066d1a8385df03ba45b31d368","src/new/vxworks/mod.rs":"cf19388e70e80a6712bd770cd650bb4e6b5e95504b3d1d026b37a6bb0ed31e07","src/new/vxworks/unistd.rs":"bcbb65f70759cd84c81fc24ea36aac423edb8f9d7148f65b545ee63954411fd1","src/new/wasi/mod.rs":"2a74140697bc528193214aad11edc632923bd0cf8350d24f6d600f849dd19e19","src/new/xous/mod.rs":"69016c5c153d9a14003b15558cab96b4691a927586c20ca493fc8d3bb65594eb","src/primitives.rs":"af323402fee13278461bcaec6a06a15dfca24a02d48b0570c88e2746288d7078","src/psp.rs":"5c4d5fa3a24dad41aba8e05e5592fbc0bc5a5171785d75dab8f5df4f3727d40a","src/qurt/mod.rs":"5af8edfb34f5431586b7ae00b341daa4312737c1e39c16348b1fff1d1cb8c642","src/sgx.rs":"964d6af358f5c85f948275090e5a7854e0169c43b5c338070b6a4cd156ebc9e6","src/solid/aarch64.rs":"4d4236500f98858fc249f3b6858af5009851c8c582031926b8195b2646f7da5e","src/solid/arm.rs":"4d4236500f98858fc249f3b6858af5009851c8c582031926b8195b2646f7da5e","src/solid/mod.rs":"600ae7749abc6d75d6c6922138505440e73a6959e6dd9a2dee0599fcc8a6b8f2","src/switch.rs":"5db5be2d9c235c00f74b25cceabdf2ce5ec9e1936f991815513e4edf5dec0d56","src/teeos/mod.rs":"5811b33c2a80d152a16462a6620e66b1b5093f7be2fc70de63afda5a196e02a1","src/trusty.rs":"cc90bf6b35a515021a3155aa3cc5fcab33457b8fbb2ac7259f0b694d33625fd8","src/types.rs":"f5d55bd81c50b83575435562c65abf49cedbfe7635d4ba443e33a6d2f24a2294","src/unix/aix/mod.rs":"f8b8e22bc7d82f2b3c7d3a920a4df6d3de95523af9097c02010687f618d9aed9","src/unix/aix/powerpc64.rs":"814b5f3ccef00968c907f2ea126ad8598fc13fe11d186541342ed39d50ff7fa9","src/unix/bsd/apple/b32/mod.rs":"c57d89459e22c7644df826ad694bcfe77e28d4fbfcd8d5fcd51645ec764df901","src/unix/bsd/apple/b64/aarch64/mod.rs":"bf2e39a80c8d768c2969197b80fafa50608ac0186b4f4aea53e7fa8bf40d2214","src/unix/bsd/apple/b64/mod.rs":"c0a38b3174c3a8513e4e27faf75b5e506c6495b98d16ae36cc841b847d7aa404","src/unix/bsd/apple/b64/x86_64/mod.rs":"ff16a360cb478a4c2e912b9779a806d0e3439e4c5110e0325c82af5ee8429591","src/unix/bsd/apple/mod.rs":"30b07c6607e27c676ef00fcd0b8d23001fe6222360a5406f26db06111dd047de","src/unix/bsd/freebsdlike/dragonfly/mod.rs":"ffbd3b6aecfb9154f109e015deb30af91e3470f5502ef6b44691095591cf6ecd","src/unix/bsd/freebsdlike/freebsd/aarch64.rs":"f13a68b825a58596b5d3339378b0812b778481a291aeacb41de74cb65ad66d3f","src/unix/bsd/freebsdlike/freebsd/arm.rs":"d627ed0bf17932ec0e3226944a4f9714805b27a953778b309d914545cf21b82a","src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs":"316e70938d2b050fd67e5aaf0bcdd0a70d55f195b26ce4ad6055cdf05cea2e61","src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs":"811c3f1aeb70dfd051abc9d3357e8eca9564c08b85d3ea6f81caacfa559e3060","src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs":"76d8b8fa17ebac22cc0423eec6502c51910a03f4e7330d29d88d8908ac30b1a4","src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs":"9f2acdbe2569d1b8890b86019d09d356c43500415a90b2335dd59c8432f557ff","src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs":"cccd7a563ad4e91518fad7c1d1c7630a5348e5d2dd935e36a40f60f254828c9c","src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs":"0ecd3d7abf2c2eeecc343fa7b2f3ae2872535a0ec69a61544f2cf133bcd27897","src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs":"cccd7a563ad4e91518fad7c1d1c7630a5348e5d2dd935e36a40f60f254828c9c","src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs":"b0df06bd48f06eee77446e689c942fa2b33dc73f9653d5e4d49f58479cdcacff","src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs":"838dee28bffe6f5d6bf0004d823cd8d17e642acb1d30c27a99f96faa32f0cdb8","src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs":"d85e17e4c18f3cccf4ac563eba35ad5b77a3621244bdd208d78b10c29c9b5f68","src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs":"838dee28bffe6f5d6bf0004d823cd8d17e642acb1d30c27a99f96faa32f0cdb8","src/unix/bsd/freebsdlike/freebsd/mod.rs":"f1862cec4db3f2c72906c50b9ebeb2fc24007ab6feb8d457852949da6c5015df","src/unix/bsd/freebsdlike/freebsd/powerpc.rs":"af7a43826e3ca9e5e7c3d7c1b50defa482074fd9909de3ee2e52cd0109c1a950","src/unix/bsd/freebsdlike/freebsd/powerpc64.rs":"f7be922bddd7a4b7da863d6aba057aab2d27f500c7101596bbaaccf075133451","src/unix/bsd/freebsdlike/freebsd/riscv64.rs":"69242a001ab21b6e06b7442c37a89dbc5a67660c7c3cade1d46b65adf32a5669","src/unix/bsd/freebsdlike/freebsd/x86.rs":"5165242f0c82040898dbf711294ba45c5ab2635d39d0bbf9cc899b816415e2a4","src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs":"84044f397dbf13a1c517885c7b234efa2900d116324a4cca626d2f8df398d655","src/unix/bsd/freebsdlike/mod.rs":"514068e20eb263560abaf4bc0f629e4f619d4648e0d25fa765041edb399ed4ec","src/unix/bsd/mod.rs":"f3c1d43560fc184895036a88f65f489b1ed3d31bc38ce30f2bfdc033b9d102cd","src/unix/bsd/netbsdlike/mod.rs":"e935dd0c5fd490e9328b2ac8afcdbe967340692594a7116cc8854fbe5045fae4","src/unix/bsd/netbsdlike/netbsd/aarch64.rs":"ba2425edbf025f13ab3c3534d1671d310392df3a7d237539817d9cfa675971c8","src/unix/bsd/netbsdlike/netbsd/arm.rs":"8dd57613695dec1b2104ec35839f0b9b6d234c6cc80365e9fef9ca977c1865a0","src/unix/bsd/netbsdlike/netbsd/mips.rs":"20cdd8d1427c986ecc3fcf7960d337917a13cfd8386dd2d54f8693a23d60892f","src/unix/bsd/netbsdlike/netbsd/mod.rs":"31a6505b5a16b6cbe5b6463359f76a4ad8f896b3beb75a84b71dce2b8188dafa","src/unix/bsd/netbsdlike/netbsd/powerpc.rs":"c19c4edbc73b5a97b51e3e2ad39b9fee02ad15e80c70ceb3a1abfe977e5c0ead","src/unix/bsd/netbsdlike/netbsd/riscv64.rs":"f446c996f00e4d15fd25461a30c767c05d083df9e047b0da497ce7c545acfa96","src/unix/bsd/netbsdlike/netbsd/sparc64.rs":"d50816e830225779ac9e9a55a7e3e097882153d72987061d76a96ee736c8af9c","src/unix/bsd/netbsdlike/netbsd/x86.rs":"3006b6a086c0241f5383ca101e7b9357368d713f9c38400633491656d110798e","src/unix/bsd/netbsdlike/netbsd/x86_64.rs":"13dd36a0db740930155b5f28fedfac606c7291c0276bbf2c2b3fe03a4dbd2a51","src/unix/bsd/netbsdlike/openbsd/aarch64.rs":"13c91b304dfb5c3c26777863827c7b3707fe245fcf50da32caab641aff998c63","src/unix/bsd/netbsdlike/openbsd/arm.rs":"f064d935f416ca9f7e5e767b9b46da2250c997d667c0c7f4b4c7dfe02d0258c3","src/unix/bsd/netbsdlike/openbsd/mips64.rs":"bee7664d88f8451ae22552fc0721b6b6a6dee2493cc42bcb9829c1e47e4b05f5","src/unix/bsd/netbsdlike/openbsd/mod.rs":"b5bf21aef874477bf26664c0ddfdb370ffeb73b287d7447f8bdd9c61e2546bb2","src/unix/bsd/netbsdlike/openbsd/powerpc.rs":"f064d935f416ca9f7e5e767b9b46da2250c997d667c0c7f4b4c7dfe02d0258c3","src/unix/bsd/netbsdlike/openbsd/powerpc64.rs":"1f62a42e2970c42de9e3492fbf3cd5b45410889f033743579266342d1a9e2a00","src/unix/bsd/netbsdlike/openbsd/riscv64.rs":"b2cf3778bfb51d1c0277f0e92963a04f734be3e29879c6c09a25bad2d9b5ab6a","src/unix/bsd/netbsdlike/openbsd/sparc64.rs":"8d4c5a4cae63e09e1c156164ddc82e0fc77926841d4d4e419dd2e7a7b7145f58","src/unix/bsd/netbsdlike/openbsd/x86.rs":"e6da2fdff7706fd3eac147d3aaf16afdd8542f231f502660d1d89c79b5eca21b","src/unix/bsd/netbsdlike/openbsd/x86_64.rs":"bc7ed75ce66059aafa7a86986aefff267b2c951e47558453fe13ce1bdb48dc0b","src/unix/cygwin/mod.rs":"6aad2e8077d97d293889145ea37ecc379cbe5cb78d2b198750639e822f0917d5","src/unix/haiku/b32.rs":"c3f8678ceee65a3094d8133b0d1a94470860e0b1867977f0569c52c5a20e039f","src/unix/haiku/b64.rs":"f97ce9225f4710893dab03ab3e13bc62152cc84f90c597ec88f6dc1f4c27d242","src/unix/haiku/bsd.rs":"4d9af31fdac2561ee5f942dca97dd2f48139ca74660d40b854b307fa5679d1c8","src/unix/haiku/mod.rs":"102560660857c1a7c6113b2a6b12bd816d9b70dd62cca17a77c543f798301681","src/unix/haiku/native.rs":"93993d4cd065550b772c9700b1da64455f1b495ac8ce7fd71d9c043d4bae1ff0","src/unix/haiku/x86_64.rs":"def40c16609b5d62c3cdbba6a38340720a96b326ad98d53838554e4b6878d2ee","src/unix/hurd/b32.rs":"501f426f7aeb60acf4119064100dd94bbdfebff2cec785428708059d853dc123","src/unix/hurd/b64.rs":"b9b2082e721a5ec89ba55fd5a16bbffcc8a05ca7cef6dbfbd78aff0806cb931f","src/unix/hurd/mod.rs":"47c18259062e834f1937aa8e5902f27f431053f112d22f2af64c4826bbaabd6a","src/unix/linux_like/android/b32/arm.rs":"9c19aeacb713b2886e0293c0abb4b64ddba5935a876a239c8c392b8ae68d02ab","src/unix/linux_like/android/b32/mod.rs":"013d0c2f1b53ae7999ed789a6b92fd4938268a6df0e8dda50f6f16a21567bc6f","src/unix/linux_like/android/b32/x86/mod.rs":"3cc9a98c2dd052029901f2c507c72795018a0ccfb64f97297b5680307da362a9","src/unix/linux_like/android/b64/aarch64/mod.rs":"57e8a37d0cf47c07444832c8684d29be2383547a21c388715b2f597573f77412","src/unix/linux_like/android/b64/mod.rs":"0ac090c7920232aecb9efbb7aef6074a1fc09a4f76c195886c1592a23d847374","src/unix/linux_like/android/b64/riscv64/mod.rs":"394125fc6cbf568271c18cba4673dbb136b560c484d38e01670cab825ca55a0d","src/unix/linux_like/android/b64/x86_64/mod.rs":"0ea316ab5e84781758ff14db88c90721400b4a4d2fb73f61c802bf2784774f94","src/unix/linux_like/android/mod.rs":"5b79b3cb98010896af67fdc4a3c8105ce104fecfa8c21373ee2306e2958fd446","src/unix/linux_like/emscripten/lfs64.rs":"5921989146110ae9b898334dc6c1de8fc2334149711f2aeb26dc654857ee82ac","src/unix/linux_like/emscripten/mod.rs":"515dbc5565556e0b21f7453fe9d529a1cba73ae69ca6c0d3386d6eddb4df9bd2","src/unix/linux_like/l4re/mod.rs":"47c07dc3c5e368ec9a64b33af9a314f51e5ed6c7fc6456bfba919d661a812275","src/unix/linux_like/l4re/uclibc/aarch64/mod.rs":"c22979fe55e9fd752114a43d97cc42211fc5b2244a6c601042c1c6d6b263ba53","src/unix/linux_like/l4re/uclibc/mod.rs":"47b8ca0231d56146c4435c9f5cded520ac67d5c5581d6a1277050942991ef4ef","src/unix/linux_like/l4re/uclibc/x86_64/mod.rs":"438e289c3ad818dd8be5391a4b44e294daf8759424bbe54ae6cf06be14d81498","src/unix/linux_like/linux/arch/generic/mod.rs":"39f70281f38aa591d18e23a465ad8b654acfd66203b53e44a9e27cd174fcea70","src/unix/linux_like/linux/arch/mips/mod.rs":"00014d704cc5c578be2300c7c2057358c64c4700d33da5dcf2a01fd1a50c42fa","src/unix/linux_like/linux/arch/mod.rs":"8bc5898b03760a95dd4f124ac76ad92e5ae36b2d0644203d752ef2b37e487c3a","src/unix/linux_like/linux/arch/powerpc/mod.rs":"03b1a1271891909372a3817f208943d8ed273ee66a8342a02426e0dd7b1137cf","src/unix/linux_like/linux/arch/sparc/mod.rs":"5bb8a0680447d5e061fa2f2370681233487f2e099619536ab2392bbafa31cc0b","src/unix/linux_like/linux/gnu/b32/arm/mod.rs":"60d5c7667d81db0ad9faf65edc79420b2100cab27699e03de4d415de931e9f58","src/unix/linux_like/linux/gnu/b32/csky/mod.rs":"627e61997c33fc12fca9e337d248d8531ef0751f21f70110b65631a0e481b66d","src/unix/linux_like/linux/gnu/b32/m68k/mod.rs":"2ea8f649fc9f01829de439ffe0fdbf9566602ed6ec0088128167af1080c3a1b2","src/unix/linux_like/linux/gnu/b32/mips/mod.rs":"8b3254b47401cde6118f9eea7e98319af8174d99feac451949e673a28ed4ff6e","src/unix/linux_like/linux/gnu/b32/mod.rs":"c7a1d5a3033fea02322b4d1f17b9576e11761a56f418e4ed5e72993f61fad160","src/unix/linux_like/linux/gnu/b32/powerpc.rs":"585983c6617a590ee0ac5217280d03642efcf721bd80fdabd6b9477031574fee","src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs":"a5e6c931ca8da568626233f2aa5ee0dd0b8e4e1e8905d52ab9dd0ea618376c2f","src/unix/linux_like/linux/gnu/b32/sparc/mod.rs":"d3f846bfcec990fbc009fe705edc39b64c011464b8ec1dd5373424ab9511e919","src/unix/linux_like/linux/gnu/b32/x86/mod.rs":"e370a80bfdec000347c384f080b30c6f537dc51e17e715c2dd8a360e6a1407f3","src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs":"cbf545c6fe4e5998792c036d9456408ae415cfe3d68ae2ad6981b8b8ac47a395","src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs":"0e41329debd9e8924bfe784d082c40efaeb8a585a7b5bc1faf9be8b53f0769e1","src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs":"368b40031515d5c4d9834a899136e0d046fdb06f751df84c143ca257d73d3fd9","src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs":"080980118660502ff312a31e108aa9fee51a671fecd80b1871959586b2bdee02","src/unix/linux_like/linux/gnu/b64/mips64/mod.rs":"cde2c6f63ef0efb12cb423e313a20572d76d2e3a24deceec2675fbb07ee422f2","src/unix/linux_like/linux/gnu/b64/mod.rs":"4b6ba534576035f3dd89d6d89c520d4c0a98f3a3e24ece70dff5970d2047d446","src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs":"9cd129a0658213e1e13d7a06c88c54035f4e012f0fa73456605808902e4607f5","src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs":"f229eb10a427a4d206bafa433f4f015cccbd4077d04d340bfae163bbb305435f","src/unix/linux_like/linux/gnu/b64/s390x.rs":"f55c3bca64e3d01691125352e1dda98c93db7361761b817378db0b5f62b1df9d","src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs":"0a71dfee9d66d55e20323b82bb1817070a88606dc88e9008c1c11b32a45478f6","src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs":"5e23cc1b0fc69f2c50f6fc83e0dc8d25afef2d2e74dccd4240ae873c5d6bb72d","src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs":"414d14164e09f0d66609180cda5ff919fda0440b29df43bd0f0f55fd2ddcee4b","src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs":"3cab97c6a03adecccd4e10e90196b2555e3c9de77e210ac9caf3f186fbcd3f01","src/unix/linux_like/linux/gnu/mod.rs":"df5cb173336a5381f3a668af12c89495fd161bcaa5ff3a46b0f9e7222a3bda2e","src/unix/linux_like/linux/mod.rs":"caff5b733b297569edca489ab9b0d049c4fe70ca953de635d983ef483e10a197","src/unix/linux_like/linux/musl/b32/arm/mod.rs":"7dc4b9a4d723d6868a84e81dbd5953b234c4540db3edd5a4a7ea0e154b101d91","src/unix/linux_like/linux/musl/b32/hexagon.rs":"e0e53f5575871faa1870f43bf85b0033c1feac149f766ad73fa2149be2447324","src/unix/linux_like/linux/musl/b32/mips/mod.rs":"64f6b834d3d98db1c2d95d40371c644f71170d7710fcdd933f1ff51c3fbe2c70","src/unix/linux_like/linux/musl/b32/mod.rs":"b136185b20a863d5e2bbec9e3bcb7e0c56329e196165ca70f2aed5777e39aeab","src/unix/linux_like/linux/musl/b32/powerpc.rs":"a946612120ed9700ff1e4e729b0f8107a40f9ed7f5b320357552d5475441042d","src/unix/linux_like/linux/musl/b32/riscv32/mod.rs":"7b5efe1ebf7d5d5439fb929032b48dcde98ba274fb22deb0f45137df21eb87b6","src/unix/linux_like/linux/musl/b32/x86/mod.rs":"83e340712e8acd89cefcb5eef0e826da79f47a7a42784699df90604c4e9a8712","src/unix/linux_like/linux/musl/b64/aarch64/mod.rs":"889ba0c0d20a8531dd05024ec9825a7bc57562c2bda4d063e5c632e76a143fc4","src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs":"a7a136f43e8a6f2c680faf477055a12459fa307587111c0c7c147ac7df8722db","src/unix/linux_like/linux/musl/b64/mips64.rs":"a855f49b0685e50b9fd118c8d8f9d5596440092e37b7696db87cc3d3db3894f9","src/unix/linux_like/linux/musl/b64/mod.rs":"1ce1eee49b1c7c5c02fe04b1539a0316becf0295763e3e18b1088895ed937373","src/unix/linux_like/linux/musl/b64/powerpc64.rs":"e18d27dc96bfd7a352b065498847b4f97d00d33dc27f1fd49ead11d97a923211","src/unix/linux_like/linux/musl/b64/riscv64/mod.rs":"7dd2c67186d0f6e0d585c4eabd686f476edf83f2bd4ca0f6a3a55bcd71c11fd6","src/unix/linux_like/linux/musl/b64/s390x.rs":"042a2be23f0b7437e7b5b007ed7ebddaf6b51e32cfac803f7e9d4fd6941d1d39","src/unix/linux_like/linux/musl/b64/wasm32/mod.rs":"2ae98dba37841279be44f68330c301f823ec2e251ea8258dd7d40f491fd26f76","src/unix/linux_like/linux/musl/b64/wasm32/wali.rs":"006149b7af0145dc40123fc7991d853c7f2c5c77bbc9c8a44c276be0d99a1343","src/unix/linux_like/linux/musl/b64/x86_64/mod.rs":"6a2d9adaf90aa39b56b383d6987091616227f4b6c167934cda2e825e6c806c02","src/unix/linux_like/linux/musl/lfs64.rs":"3c15fd2820d400b0650cca950cd41dc77c017c5f06841db1942cd59118a252e3","src/unix/linux_like/linux/musl/mod.rs":"490ef1317a0173e283c139df5a83e37f54c3ba48eba66a485b2659907220389e","src/unix/linux_like/linux/uclibc/arm/mod.rs":"27a2bab2ff33d0b159eb49ba5a302bcf2ecbc24431ffd0f494ab274a6e43f016","src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs":"39057a283532e0430dc664d9c4ace6a2fba6e9b252c1404a6835ed382a1f2e27","src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs":"7458bd4483a6c16db943d8d69de3e02ca952ec67c608604e174a26e99e453d71","src/unix/linux_like/linux/uclibc/mips/mod.rs":"e552f579a8dc9e690891113aa6360607ad962bd84cbb60c370b5c5f7c7d1d8c0","src/unix/linux_like/linux/uclibc/mod.rs":"aad428f795b39aa987653919175bb2fab633ceedbd01bcbf358c550dc7bdf936","src/unix/linux_like/linux/uclibc/x86_64/mod.rs":"68ec631cd8d8da3d5b12161936e367a68fca982dacf45424789840335c1f39c0","src/unix/linux_like/linux_l4re_shared.rs":"ee47eb40a299f4897e0cc1f8d5a6d554e4fb6302f11b752d921cfcfb09c0afab","src/unix/linux_like/mod.rs":"298ca2a15df5313c893184334caef990df5dbe6f71afcf332d4322dde80e1c3d","src/unix/mod.rs":"999588f6f4ac24156c1bf9260d639a64247a83d7b6db187f4f94f7305c5cde47","src/unix/newlib/aarch64/mod.rs":"d72d067a433bf24ee6b6255c4d04ea7c966518b8d064560c593f1ab23c025962","src/unix/newlib/arm/mod.rs":"95b6e4b3cd1eeb0386d4867e9e4c3438305aa3e8ae75697e06720aa06540a666","src/unix/newlib/espidf/mod.rs":"cbaf10ccdb429719003cac3f3cd4aa0aa63a12a383afc5bd88a4ab3abaef9e2e","src/unix/newlib/generic.rs":"c435a955d72878a71ea0719a75a4579818da6a2e01635f9fe1073d9a0d67352f","src/unix/newlib/horizon/mod.rs":"329f41f1703f318ea8999c2a9f48b953381e9a4fc388670ce69444ad7a32b122","src/unix/newlib/mod.rs":"6bbe0874c5d6f53ea2d9f2a7cb1b27bdb27b9b02704160e6133ea6e559ad66cd","src/unix/newlib/powerpc/mod.rs":"4d6dca09ea5dc000cbd39fb939a9b1a743d819931dfca3c896659e919a07a7da","src/unix/newlib/rtems/mod.rs":"efcb2c5f96ae5877fb4cefa59e4a38ae40c4eba22afa9c9a9ecdc61121d3b9d2","src/unix/newlib/vita/mod.rs":"2f9bf66b40c2aa611033faf3ade5510dc9789af7302571fade40a1715398f06c","src/unix/nto/arch/aarch64.rs":"e7fc7ada9e273c6cffe556f977db71a96c9e4a27f496a8223bc23e3fd876c05e","src/unix/nto/arch/i686.rs":"6ebb8acc594e9dbfa80c363dcf56aca0125afdab4fb3a1fc2806ed8ffe9dc252","src/unix/nto/arch/mod.rs":"4ff319773cd756d9dcace1348a3ac4569cf89a031436bdb57e66c9557a9eb948","src/unix/nto/arch/x86_64.rs":"71e97cb09b938b2c6f01ba71e268221f8a51500ca309c71d6c8de61ee2c0e9c8","src/unix/nto/io_pkt/mod.rs":"1fc160ff187fb6b49744859e3da481a3e7264b248bbe289efff22fd1e6d699e9","src/unix/nto/io_sock/mod.rs":"941bfd903a0cd329ed92f36222a2f13c7e798cd403fee7d7859214a794a65534","src/unix/nto/mod.rs":"41b6926daedda07a5dfbca7e23516ba39161f1de9b9cc89d9b6e512bd877f595","src/unix/nto/neutrino.rs":"59e3b22aa27c2aba3e96b39c0f624897747650c7e916832629586259d18579ce","src/unix/nuttx/mod.rs":"b231559c8b5e0af7fa32f869dce8236b32d0057603a5cea115c776b2ceaf14a0","src/unix/redox/mod.rs":"45613acbd48fb5469a9d4e597e4e492a98138af3135887043c6d5b3f64e18ccb","src/unix/solarish/compat.rs":"3d120a056208c03215cfbe3eef1584105160d133c0aa4557bb38018c177640b0","src/unix/solarish/illumos.rs":"597c04a05dd586eec164624d1819d5bd0db3c26711131fdd896e2af09406340a","src/unix/solarish/mod.rs":"9f94cb59612b898d8da26e69e291730cf374376f6d40940faed92c193c51f359","src/unix/solarish/solaris.rs":"5ea6cc86389f7e3b8dca2de17fbd4fcdbb5b0a6638b95efeb7ae15c8bbb9e79b","src/unix/solarish/x86.rs":"44261c1f1b300dac9fa0dab93ec85d0c3b3c48b15bc4515b9820c9421cff7427","src/unix/solarish/x86_64.rs":"eec1602998dbd3b3aeb2d9a5bd66fc53a6fbbcd7967ed0bb2dd61a8c176023e4","src/unix/solarish/x86_common.rs":"4ae02d88622f7f080f5e8cd328f13187edbc5e124fb3e05e4cf212597f6cce48","src/vxworks/aarch64.rs":"4d4236500f98858fc249f3b6858af5009851c8c582031926b8195b2646f7da5e","src/vxworks/arm.rs":"4d4236500f98858fc249f3b6858af5009851c8c582031926b8195b2646f7da5e","src/vxworks/mod.rs":"e5efaf8a584862fca87a3e367042de056a688a8a105d0bed149f09e516e4cc05","src/vxworks/powerpc.rs":"4d4236500f98858fc249f3b6858af5009851c8c582031926b8195b2646f7da5e","src/vxworks/powerpc64.rs":"4d4236500f98858fc249f3b6858af5009851c8c582031926b8195b2646f7da5e","src/vxworks/riscv32.rs":"b1f933205800f0da00f975d53b18fe0035e075cc4613acf110a09a277dc3302a","src/vxworks/riscv64.rs":"b1f933205800f0da00f975d53b18fe0035e075cc4613acf110a09a277dc3302a","src/vxworks/x86.rs":"b1f933205800f0da00f975d53b18fe0035e075cc4613acf110a09a277dc3302a","src/vxworks/x86_64.rs":"b1f933205800f0da00f975d53b18fe0035e075cc4613acf110a09a277dc3302a","src/wasi/mod.rs":"f4bd5f0481da1922dd31195a2825bf9a1a852c82f56e536f82639eff961c0f9a","src/wasi/p2.rs":"feecc0485eabd2c32bc5d800df6ad1b9b4d282741342fb08792f2635204e1e08","src/windows/gnu/mod.rs":"6422acc5c5a82122c11efb84882778e30888c0693c0993fbf7f3baa59e4cbbb5","src/windows/mod.rs":"8ec2bd46a05aed28f8bdfa17d99909300b59eb36cdc694545e29f8aa902e9e53","src/windows/msvc/mod.rs":"40410b26b606d1b59b0742b2632f3cd0a28a5429f784f9693fae0a78c15b3889","src/xous.rs":"1a83621c40248ad4d0c08e1fd4c1107d5efcbc2f4f0169538b7b4a885abedbfa","tests/const_fn.rs":"8ac3171d7bced3576a4e93f48570b3e00c553d7510ab85a7473ae3b716a812dc"},"package":"3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"} \ No newline at end of file diff --git a/thirdparty/crates/libc-0.2.189/.cargo_vcs_info.json b/thirdparty/crates/libc-0.2.189/.cargo_vcs_info.json new file mode 100644 index 000000000..62453f28b --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "ef0906e20828777175f65caa7e681a0ce33c559a" + }, + "path_in_vcs": "" +} \ No newline at end of file diff --git a/thirdparty/crates/libc-0.2.186/.editorconfig b/thirdparty/crates/libc-0.2.189/.editorconfig similarity index 100% rename from thirdparty/crates/libc-0.2.186/.editorconfig rename to thirdparty/crates/libc-0.2.189/.editorconfig diff --git a/thirdparty/crates/libc-0.2.186/.git-blame-ignore-revs b/thirdparty/crates/libc-0.2.189/.git-blame-ignore-revs similarity index 100% rename from thirdparty/crates/libc-0.2.186/.git-blame-ignore-revs rename to thirdparty/crates/libc-0.2.189/.git-blame-ignore-revs diff --git a/thirdparty/crates/libc-0.2.186/.release-plz.toml b/thirdparty/crates/libc-0.2.189/.release-plz.toml similarity index 100% rename from thirdparty/crates/libc-0.2.186/.release-plz.toml rename to thirdparty/crates/libc-0.2.189/.release-plz.toml diff --git a/thirdparty/crates/libc-0.2.186/.rustfmt.toml b/thirdparty/crates/libc-0.2.189/.rustfmt.toml similarity index 100% rename from thirdparty/crates/libc-0.2.186/.rustfmt.toml rename to thirdparty/crates/libc-0.2.189/.rustfmt.toml diff --git a/thirdparty/crates/libc-0.2.186/BUILD.bazel b/thirdparty/crates/libc-0.2.189/BUILD.bazel similarity index 99% rename from thirdparty/crates/libc-0.2.186/BUILD.bazel rename to thirdparty/crates/libc-0.2.189/BUILD.bazel index 20c662c1e..a08ce4290 100644 --- a/thirdparty/crates/libc-0.2.186/BUILD.bazel +++ b/thirdparty/crates/libc-0.2.189/BUILD.bazel @@ -217,9 +217,9 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.2.186", + version = "0.2.189", deps = [ - "//thirdparty/crates/libc-0.2.186:build_script_build", + "//thirdparty/crates/libc-0.2.189:build_script_build", ], ) @@ -379,7 +379,7 @@ cargo_build_script( "noclippy", "norustfmt", ], - version = "0.2.186", + version = "0.2.189", visibility = ["//visibility:private"], ) diff --git a/thirdparty/crates/libc-0.2.186/CHANGELOG.md b/thirdparty/crates/libc-0.2.189/CHANGELOG.md similarity index 83% rename from thirdparty/crates/libc-0.2.186/CHANGELOG.md rename to thirdparty/crates/libc-0.2.189/CHANGELOG.md index 0e37267c0..079d43cf3 100644 --- a/thirdparty/crates/libc-0.2.186/CHANGELOG.md +++ b/thirdparty/crates/libc-0.2.189/CHANGELOG.md @@ -1,5 +1,183 @@ # Changelog +## [0.2.189](https://github.com/rust-lang/libc/compare/0.2.188...0.2.189) - 2026-07-21 + +### Added + +- Emscripten: Add `pthread_sigmask`, `sigwait`, `sigwaitinfo`, `sigtimedwait`, `faccessat`, and `pthread_kill` ([#5270](https://github.com/rust-lang/libc/pull/5270)) +- Linux SPARC: Enable the `clone3` syscall ([#4980](https://github.com/rust-lang/libc/pull/4980)) +- Solarish: Add `CLOCK_PROCESS_CPUTIME_ID` and `CLOCK_THREAD_CPUTIME_ID` ([#5274](https://github.com/rust-lang/libc/pull/5274)) + +### Deprecated + +- Deprecate `CLONE_INTO_CGROUP` and `CLONE_CLEAR_SIGHAND`. These overflow their types and will be changed to a larger size in the future. ([8c6e6710458d](https://github.com/rust-lang/libc/commit/8c6e6710458db4d6aa0766f6f84bbf13f640237e)) + +### Fixed + +- Musl riscv32: Rename padding fields to avoid a conflict and fix the build ([2499ff0ad993](https://github.com/rust-lang/libc/commit/2499ff0ad9936a036e78a4e0991445efee383564)) +- NuttX: Fix `wchar_t` definition under Arm ([#5245](https://github.com/rust-lang/libc/pull/5245)) +- Windows: Add back link names for `time`-related symbols ([#5300](https://github.com/rust-lang/libc/pull/5300)) + + +## [0.2.188](https://github.com/rust-lang/libc/compare/0.2.187...0.2.188) - 2026-07-21 + +### Changed + +- Restore `Send` and `Sync` for `DIR` ([35b062263401](https://github.com/rust-lang/libc/commit/35b062263401733cd89065c6a553640f2ba51ff1)) + +These were removed in 0.2.187 because `libc` does not actually make `Send` and `Sync` +guarantees about `DIR` (or other extern types), but this caused some crates to break. +The traits are added back for now to allow time to migrate, but will be removed again +in the future; please make sure your crates are not relying on `libc::DIR: Send` or +`libc::DIR: Sync`. + + +## [0.2.187](https://github.com/rust-lang/libc/compare/0.2.186...0.2.187) - 2026-07-20 + +This release contains a number of improvements related to 64-bit `time_t` configuration. +Of note the existing `RUST_LIBC_UNSTABLE_*` environment variables have been replaced +with configuration options. The new way to use these is: + +```sh +RUSTFLAGS='--cfg=libc_unstable_musl_v1_2_3' cargo ... +RUSTFLAGS='--cfg=libc_unstable_gnu_time_bits="64"' cargo ... +``` + +Being able to set this via `RUSTFLAGS` makes it easier to only apply configuration to +specific targets (and notably, not the host if build scripts are used). + +There are two other notable changes: + +* The 32-bit `windows-gnu` targets now respect `libc_unstable_gnu_time_bits` +* uClibc now supports a similar configuration option: + + ```sh + RUSTFLAGS='--cfg=libc_unstable_uclibc_time64' + ``` + +As a reminder, these options are under active development and may change in the future +(hence the "unstable" in the name). It likely that we will harmonize everything under a +single configuration option before considering them stable. + +### Support + +- Add support for `aarch64-unknown-linux-pauthtest` ([#5065](https://github.com/rust-lang/libc/pull/5065)) +- Add support for new QNX targets ([#5241](https://github.com/rust-lang/libc/pull/5241)) +- Better document breaking change policy and recommended usage ([#5179](https://github.com/rust-lang/libc/pull/5179)) + +### Added + +- Android: Add `POSIX_SPAWN_*` constants ([#5104](https://github.com/rust-lang/libc/pull/5104)) +- Android: Add `getpwent`, `setpwent`, and `endpwent` ([#5160](https://github.com/rust-lang/libc/pull/5160)) +- Android: Add `preadv2` and `pwritev2` ([#5157](https://github.com/rust-lang/libc/pull/5157)) +- Android: Add `seccomp_notif*` structures ([#5224](https://github.com/rust-lang/libc/pull/5224)) +- Android: Add `timer_[create, delete, getoverrun, gettime, settime]` ([#5108](https://github.com/rust-lang/libc/pull/5108)) +- Apple: Add `PROC_PIDT_SHORTBSDINFO` and `proc_bsdshortinfo` ([#5110](https://github.com/rust-lang/libc/pull/5110)) +- Apple: Add `SIOC*` constants from `sockio.h` ([#5263](https://github.com/rust-lang/libc/pull/5263)) +- Apple: Add `_IOR`, `_IOW`, `_IOWR` ([#5264](https://github.com/rust-lang/libc/pull/5264)) +- Apple: Add `bpf_program` and `bpf_insn` ([#5235](https://github.com/rust-lang/libc/pull/5235)) +- Apple: Add additional `kqueue` constants ([#5077](https://github.com/rust-lang/libc/pull/5077)) +- Apple: Update `vm_statistics64` with recently added fields ([#5253](https://github.com/rust-lang/libc/pull/5253)) +- Apple: add `IN6_IFF_*` and `SIOCGIFAFLAG_IN6` ([#5239](https://github.com/rust-lang/libc/pull/5239)) +- Dragonfly: Add `O_*`, `POSIX_FADV_*`, `NI*`, and a few other missing constants ([#5116](https://github.com/rust-lang/libc/pull/5116)) +- Dragonfly: add `fdatasync`, `dlvsym`, `reallocarray`, `qsort_r`, `pthread_*affinity_np`, `ftok`, `extattr_*`, and `dup3` ([#5116](https://github.com/rust-lang/libc/pull/5116)) +- Emscripten: Add `in6_pktinfo` ([#5256](https://github.com/rust-lang/libc/pull/5256)) +- FreeBSD: Add SOL_LOCAL ([#5185](https://github.com/rust-lang/libc/pull/5185)) +- FreeBSD: Add `DLT_*` constants ([#5235](https://github.com/rust-lang/libc/pull/5235)) +- FreeBSD: Add `PROC_LOGSIGEXIT_*` and `PPROT_*` ([#4657](https://github.com/rust-lang/libc/pull/4657)) +- FreeBSD: Add `SO_RERROR` ([#5260](https://github.com/rust-lang/libc/pull/5260)) +- FreeBSD: add `IN6_IFF_*`, `in6_ifreq`, and `SIOCGIFAFLAG_IN6` ([#5239](https://github.com/rust-lang/libc/pull/5239)) +- FreeBSD: add `_IO*` helpers from `sys/ioccom.h` ([#5239](https://github.com/rust-lang/libc/pull/5239)) +- Glibc: Add `PTHREAD_*_MUTEX_INITIALIZER_NP` for riscv64 ([#5094](https://github.com/rust-lang/libc/pull/5094)) +- Glibc: Add new fields to `struct tcp_info` ([#5215](https://github.com/rust-lang/libc/pull/5215)) +- Linux: Add `OPEN_TREE_NAMESPACE` ([#5145](https://github.com/rust-lang/libc/pull/5145)) +- Linux: Add `SECCOMP_IOCTL_*` constants ([#5224](https://github.com/rust-lang/libc/pull/5224)) +- Linux: Add `SO_DETACH_REUSEPORT_BPF` ([#5081](https://github.com/rust-lang/libc/pull/5081)) +- Linux: Add `futex_waitv` ([#5125](https://github.com/rust-lang/libc/pull/5125)) +- Linux: Add constants for `fsopen`, `fsconfig`, `fsmount`, and `fspick` ([#5145](https://github.com/rust-lang/libc/pull/5145)) +- Linux: Add fields to `statx` present since 6.16 ([#4621](https://github.com/rust-lang/libc/pull/4621)) +- Linux: Add network entry API ([#5049](https://github.com/rust-lang/libc/pull/5049)) +- Linux: add `ifaddrmsg` and `rtattr` ([#5234](https://github.com/rust-lang/libc/pull/5234)) +- Linux: add `sockaddr_iucv` ([#5041](https://github.com/rust-lang/libc/pull/5041)) +- MacOS: Add `ENOTCAPABLE` ([#4925](https://github.com/rust-lang/libc/pull/4925)) +- Musl: Add `renameat2` ([#5113](https://github.com/rust-lang/libc/pull/5113)) +- NuttX: Add `F_SETFD` ([#5258](https://github.com/rust-lang/libc/pull/5258)) +- NuttX: Add `POLLRD*` and `POLLWR*` constants ([#5258](https://github.com/rust-lang/libc/pull/5258)) +- NuttX: Add `SO_KEEPALIVE` and TCP keepalive constants ([#5111](https://github.com/rust-lang/libc/pull/5111)) +- NuttX: Add `TCP_MAXSEG` ([#5258](https://github.com/rust-lang/libc/pull/5258)) +- NuttX: Add `eventfd` and `EFD_*` constants ([#5258](https://github.com/rust-lang/libc/pull/5258)) +- NuttX: Add `pipe2` ([#5258](https://github.com/rust-lang/libc/pull/5258)) +- NuttX: Add `strerror_r` ([#5258](https://github.com/rust-lang/libc/pull/5258)) +- NuttX: Add `netinet` structs and constants ([#5258](https://github.com/rust-lang/libc/pull/5258)) +- NuttX: Add socket structs, functions and constants ([#5258](https://github.com/rust-lang/libc/pull/5258)) +- QuRT: Add POSIX timer functions ([#5091](https://github.com/rust-lang/libc/pull/5091)) +- QuRT: Add missing pthread functions from QuRT SDK headers ([#5091](https://github.com/rust-lang/libc/pull/5091)) +- QuRT: Add missing unistd process and file functions ([#5091](https://github.com/rust-lang/libc/pull/5091)) +- QuRT: Add mqueue subsystem (message queues, select/pselect) ([#5091](https://github.com/rust-lang/libc/pull/5091)) +- Redox: Add `*at` and `dirent` functions ([#5117](https://github.com/rust-lang/libc/pull/5117)) +- Solarish: Add IP TTL and IPv6 Hop Limit consts ([#5089](https://github.com/rust-lang/libc/pull/5089)) +- Solarish: Add `port_alert` and `PORT_ALERT*` constants ([#5203](https://github.com/rust-lang/libc/pull/5203)) +- Solarish: add AI_CANONNAME ([#5085](https://github.com/rust-lang/libc/pull/5085)) +- aarch64: Add SYS_sendfile and SYS_fadvise64 constants ([#5133](https://github.com/rust-lang/libc/pull/5133)) + +### Deprecated + +- Dragonfly: Deprecate compatibility aliases `CPUCTL_RSMSR` and `UTX_DB_LASTLOG` ([#5116](https://github.com/rust-lang/libc/pull/5116)) + +### Fixed + +- **breaking** NetBSD: Correct `ts` from `*const timespec` to `*mut timespec` in _lwp_park` ([#5169](https://github.com/rust-lang/libc/pull/5169)) +- **breaking** Linux GNU: Change overflowing `PTRACE_*ET_SYSCALL_USER_DISPATCH_CONFIG` constants from `u8` to `c_uint` ([#4936](https://github.com/rust-lang/libc/pull/4936)) +- Fix the soundness bug in the representation of extern types ([#5021](https://github.com/rust-lang/libc/pull/5021)) +- Cygwin: fix `cpuset_t` typo in `CPU_ZERO` ([#5098](https://github.com/rust-lang/libc/pull/5098)) +- Dragonfly: ABI fixes including regex offsets, `ifaddrs`, pthread barriers, process sizing fields, and `mcontext` alignment ([#5116](https://github.com/rust-lang/libc/pull/5116)) +- Dragonfly: Correct values of `CPUCTL_CPUID*`, `EV_HUP`, and `EV_SYSFLAGS` ([#5116](https://github.com/rust-lang/libc/pull/5116)) +- Emscripten: fix pthread type sizes for wasm64 (MEMORY64) ([#5156](https://github.com/rust-lang/libc/pull/5156)) +- Horizon: Fix the value of `POLLOUT` ([#5090](https://github.com/rust-lang/libc/pull/5090)) +- Linux: Correct the value of `EPIOC[GS]PARAMS` with nonstandard _IOC ([#5188](https://github.com/rust-lang/libc/pull/5188)) +- Make VxWorks shims `unsafe` ([#3727](https://github.com/rust-lang/libc/pull/3727)) +- NetBSD: Correct getmntinfo to link `__getmntinfo13` ([#5251](https://github.com/rust-lang/libc/pull/5251)) +- QNX: Fix the value of `PTHREAD_MUTEX_INITIALIZER` ([#5241](https://github.com/rust-lang/libc/pull/5241)) +- QuRT: fix type and definition inaccuracies against SDK headers ([#5091](https://github.com/rust-lang/libc/pull/5091)) +- Windows: Correctly link to 32-bit time routines on 32-bit platforms ([#5059](https://github.com/rust-lang/libc/pull/5059)) +- uClibc: Fix constants accidentally removed ([#5141](https://github.com/rust-lang/libc/pull/5141)) +- uclibc: Fix build issues ([#5046](https://github.com/rust-lang/libc/pull/5046)) +- uclibc: Fix type of PRIO_PROCESS and friends ([#5046](https://github.com/rust-lang/libc/pull/5046)) + +### Changed + +- AIX, TeeOS: Drop unneeded `-> c_void` ([#5240](https://github.com/rust-lang/libc/pull/5240)) +- Apple: Change `AIO_LISTIO_MAX` to account for changes in macOS 27 ([#5253](https://github.com/rust-lang/libc/pull/5253)) +- Glibc: Update the value of `MS_NOUSER` ([#5215](https://github.com/rust-lang/libc/pull/5215)) +- L4Re: Update definitions and test infra ([#5275](https://github.com/rust-lang/libc/pull/5275)) +- Linux: Update the value of `SW_MAX` and `SW_CNT` ([#5215](https://github.com/rust-lang/libc/pull/5215)) +- MacOS: Add `swapped_count` to `vm_statistics64` ([#4926](https://github.com/rust-lang/libc/pull/4926)) +- Windows: Windows-GNU now respects `libc_unstable_gnu_time_bits` for 64-bit `time_t` config ([#5062](https://github.com/rust-lang/libc/pull/5062)) + +### Removed + +- Dragonfly: Remove FreeBSD-only `Elf32_Lword`, `ip_mreq_source`, and `IP_` constants ([#5116](https://github.com/rust-lang/libc/pull/5116)) +- Dragonfly: Remove private VM type bindings ([#5116](https://github.com/rust-lang/libc/pull/5116)) +- Linux: Remove `KERN_REALROOTDEV` and `VM_LAPTOP_MODE` ([#5177](https://github.com/rust-lang/libc/pull/5177)) +- VxWorks: Remove non-user-facing (kernel) API ([#5129](https://github.com/rust-lang/libc/pull/5129)) + +### Other + +- Print config information if `LIBC_BUILD_VERBOSE` is set ([#5272](https://github.com/rust-lang/libc/pull/5272)) +- Annotate `*LAST` constants as potentially changing ([#5120](https://github.com/rust-lang/libc/pull/5120)) +- Annotate `*MAX` constants as potentially changing ([#5122](https://github.com/rust-lang/libc/pull/5122)) +- BSD: Annotate `ELAST` constants as potentially changing ([#5118](https://github.com/rust-lang/libc/pull/5118)) +- FreeBSD: Annotate `RAND_MAX` as potentially changing ([#5119](https://github.com/rust-lang/libc/pull/5119)) +- Linux, L4re: Annotate `*NUM` constants as potentially changing ([#5123](https://github.com/rust-lang/libc/pull/5123)) +- QNX: Restructure to support new platforms ([#4984](https://github.com/rust-lang/libc/pull/4984)) +- Unix: Annotate `*COUNT` constants as potentially changing ([#5121](https://github.com/rust-lang/libc/pull/5121)) +- uClibc: Add unstable support of 64-bit `time_t` ([#5046](https://github.com/rust-lang/libc/pull/5046)) +- (internal) FreeBSD: Replace unstable env to set version with an unstable cfg ([#5201](https://github.com/rust-lang/libc/pull/5201)) +- (internal) Glibc: Remove public configuration for file offset bits ([#5268](https://github.com/rust-lang/libc/pull/5268)) +- (internal) Linux: Delete config via `RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64` ([#5197](https://github.com/rust-lang/libc/pull/5197)) +- (internal) Replace `RUST_LIBC_UNSTABLE` env with `libc_unstable*` cfg ([#4977](https://github.com/rust-lang/libc/pull/4977)) + + ## [0.2.186](https://github.com/rust-lang/libc/compare/0.2.185...0.2.186) - 2026-04-24 ### Added diff --git a/thirdparty/crates/libc-0.2.189/CONTRIBUTING.md b/thirdparty/crates/libc-0.2.189/CONTRIBUTING.md new file mode 100644 index 000000000..5a5ac3ed4 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/CONTRIBUTING.md @@ -0,0 +1,152 @@ +# Contributing to `libc` + +Welcome! If you are reading this document, it means you are interested in +contributing to the `libc` crate. + +## v1.0 Roadmap + +`libc` has two active branches: `main` and `libc-0.2`. `main` is for active +development of the upcoming v1.0 release, and should be the target of all pull +requests. `libc-0.2` is for updates to the currently released version. + +If a pull request to `main` is a good candidate for inclusion in an `0.2.x` +release, include `@rustbot label stable-nominated` in a comment to propose this. +Almost everything should be included in stable, unless it involves breaking +changes. + +Once a `stable-nominated` PR targeting `main` has merged, it can be cherry +picked to the `libc-0.2` branch. A maintainer will likely do these cherry picks +in a batch before a release, so there is no need for any action as a PR author. + +When cherry picking, run the following after branching from `libc-0.2`: +`git cherry-pick -xe commit-sha-on-main` (or `git cherry-pick -xe +start-sha^..end-sha` if a range of commits is needed). `git` will automatically +add the "cherry picked from commit" note, but try to add a backport note so the +original PR gets crosslinked: + +``` +# ... original commit message ... + +(backport ) # add manually +(cherry picked from commit 104b6a4ae31c726814c36318dc718470cc96e167) # added by git +``` + +Cherry pick PRs can then target `libc-0.2`. + +See the [tracking issue](https://github.com/rust-lang/libc/issues/3248) for +details. + +## Adding an API + +Want to use an API which currently isn't bound in `libc`? It's quite easy to add +one! + +If you are adding API for a header that doesn't already have some bindings, +create a new file in the appropriate location in `src/new`. These modules should +approximately match source trees: try to follow the patterns that are there but +don't hesitate to ask maintainers if guidance is needed. + +If some bindings for the relevant header has already been added outside of +`src/new`, it is fine to extend what already exists. Everything outside of +`src/new` uses a hierarchial structure: a single path from root to a leaf node +represents a single platform, and adding API at a given level will make it +available on all children. + +We are currently in a reorganization process, moving from the hierarchial +structure to the source-mapped structure in `src/new`. + +New items (i.e. functions, constants etc.) should also be added to the symbol +list(s) found in the `libc-test/semver` directory. These lists track of what +API is public in the libc crate and ensures they remain available between +changes to the crate. If the new symbol(s) are available on all supported Unixes +it should be added to `unix.txt` list[^1], otherwise they should be added to the +OS-specific list(s). + +With that in mind, the steps for adding a new API are: + +1. Determine where to add your API. +2. Add the API, including adding new symbol(s) to the semver lists. +3. Send a PR to this repo. +4. Wait for CI to pass, fixing errors. +5. Wait for a merge! + +[^1]: Note that this list has nothing to do with any Unix or Posix standard, + it's just a list shared among all OSs that declare `#[cfg(unix)]`. + +## Test before you commit + +There are a few relevant tests in `libc`: + +1. `libc-test` is the main test suite. This can be run locally with `cargo test + --workspace`. + + If needed, the `skip_*()` functions in `libc-test/build.rs` can be used to + skip testing specific API. +2. Style checker and formatter, located at [`./ci/style.py`][style-py]. Running + this also invokes the code formatter. (This also formats code within macros, + which `cargo fmt` won't do.) +3. `ci/verify-build.py`, which checks the build on a wide range of targets. + Typically there is no need to run this locally. + +[style-py]: https://github.com/rust-lang/libc/blob/main/ci/style.py + +## Submitting a Pull Request + +When you submit a PR, please follow these guidelines to give your PR the best +chance of being accepted: + +1. All new API should be added to `libc-test/semver`, which makes sure it + doesn't get removed in the future. +2. All changes *must* have permalink to headers in commit messages. See + [Source links](#source-links) below for more details. +3. For any constants that are expected to change, e.g. `*LAST` or `*MAX`, try to + add the following doc comment: + + ```rust + /// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) + /// for details. + ``` +5. Run tests locally, following the directions at + [Test before you commit](test-before-you-commit). This is especially relevant + for platforms that aren't tested on CI. + +### Source links + +Please include permalinks to headers in commit messages for all API changes. +Common sources include: + +* Linux uapi: https://github.com/torvalds/linux/tree/master/include/uapi +* Glibc: https://sourceware.org/git/?p=glibc.git;a=tree +* Musl: https://github.com/kraj/musl (original is https://git.musl-libc.org/cgit/musl/tree/) +* Apple XNU: https://github.com/apple-oss-distributions/xnu, libc https://github.com/apple-oss-distributions/Libc/tree/main/include +* Android: https://cs.android.com/android/platform/superproject/main +* FreeBSD: https://github.com/freebsd/freebsd-src/tree/main/lib/libc +* Illumos: https://github.com/illumos/illumos-gate/tree/master/usr/src/lib/libc +* Fuchsia: https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/ + +After navigating to the relevant file and selecting relevant lines, get a +permalink. On GitHub this is available by clicking the triple dots and +selecting "copy permalink", and on the Android and Fuchsia source viewers +this is available via l-r (links->commit). + +If sources are closed, link to documentation or paste relevant C declarations. + +(Including this information in the PR description is fine too, commit messages +are preferred because they become part of history.) + +## Breaking change policy + +See `src/lib.rs` for details. + +## Supported target policy + +When Rust removes a support for a target, the libc crate also may remove the +support at any time. MSRV may be different for different targets. + +## Releasing change to crates.io + +This repository uses [release-plz] to handle releases. Once your pull request +has been merged, a maintainer needs to create the changelog and merge a PR +bumping the version. This will automatically publish to crates.io! + +[release-plz]: https://github.com/MarcoIeni/release-plz diff --git a/thirdparty/crates/libc-0.2.186/Cargo.lock b/thirdparty/crates/libc-0.2.189/Cargo.lock similarity index 95% rename from thirdparty/crates/libc-0.2.186/Cargo.lock rename to thirdparty/crates/libc-0.2.189/Cargo.lock index 3f41b6860..139e7a0d8 100644 --- a/thirdparty/crates/libc-0.2.186/Cargo.lock +++ b/thirdparty/crates/libc-0.2.189/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "libc" -version = "0.2.186" +version = "0.2.189" dependencies = [ "rustc-std-workspace-core", ] diff --git a/thirdparty/crates/libc-0.2.186/Cargo.toml b/thirdparty/crates/libc-0.2.189/Cargo.toml similarity index 96% rename from thirdparty/crates/libc-0.2.186/Cargo.toml rename to thirdparty/crates/libc-0.2.189/Cargo.toml index 991aac2cd..381f64ebb 100644 --- a/thirdparty/crates/libc-0.2.186/Cargo.toml +++ b/thirdparty/crates/libc-0.2.189/Cargo.toml @@ -13,8 +13,7 @@ edition = "2021" rust-version = "1.65" name = "libc" -version = "0.2.186" -authors = ["The Rust Project Developers"] +version = "0.2.189" build = "build.rs" exclude = [ "/ci/*", @@ -68,6 +67,7 @@ targets = [ "loongarch64-unknown-linux-musl", "powerpc-unknown-linux-gnu", "powerpc64-unknown-linux-gnu", + "powerpc64-unknown-linux-musl", "powerpc64le-unknown-linux-gnu", "powerpc64le-unknown-linux-musl", "riscv64gc-unknown-linux-gnu", @@ -118,7 +118,7 @@ targets = [ "aarch64-unknown-hermit", "aarch64-unknown-illumos", "aarch64-unknown-netbsd", - "aarch64-unknown-nto-qnx800", + "aarch64-unknown-qnx", "aarch64-unknown-openbsd", "aarch64-unknown-redox", "aarch64-wrs-vxworks", @@ -151,7 +151,6 @@ targets = [ "powerpc64-ibm-aix", "powerpc64-unknown-freebsd", "powerpc64-unknown-linux-gnu", - "powerpc64-unknown-linux-musl", "powerpc64-wrs-vxworks", "riscv32-wrs-vxworks", "riscv32gc-unknown-linux-musl", @@ -212,7 +211,6 @@ version = "1.0.1" optional = true [lints.clippy] -expl_impl_clone_on_copy = "allow" explicit_iter_loop = "warn" identity_op = "allow" manual_assert = "warn" @@ -220,10 +218,8 @@ map_unwrap_or = "warn" missing_safety_doc = "allow" non_minimal_cfg = "allow" ptr_as_ptr = "warn" -uninlined_format_args = "allow" unnecessary_cast = "allow" unnecessary_semicolon = "warn" -used_underscore_binding = "allow" [lints.rust] unused_qualifications = "allow" diff --git a/thirdparty/crates/libc-0.2.186/Cargo.toml.orig b/thirdparty/crates/libc-0.2.189/Cargo.toml.orig similarity index 94% rename from thirdparty/crates/libc-0.2.186/Cargo.toml.orig rename to thirdparty/crates/libc-0.2.189/Cargo.toml.orig index a448d888c..380dd89fb 100644 --- a/thirdparty/crates/libc-0.2.186/Cargo.toml.orig +++ b/thirdparty/crates/libc-0.2.189/Cargo.toml.orig @@ -1,11 +1,10 @@ [package] name = "libc" -version = "0.2.186" +version = "0.2.189" keywords = ["libc", "ffi", "bindings", "operating", "system"] categories = ["external-ffi-bindings", "no-std", "os"] exclude = ["/ci/*", "/.github/*", "/triagebot.toml", "cherry-pick-stable.sh"] description = "Raw FFI bindings to platform libraries like libc." -authors = ["The Rust Project Developers"] edition = "2021" license = "MIT OR Apache-2.0" repository = "https://github.com/rust-lang/libc" @@ -40,6 +39,7 @@ targets = [ "loongarch64-unknown-linux-musl", "powerpc-unknown-linux-gnu", "powerpc64-unknown-linux-gnu", + "powerpc64-unknown-linux-musl", "powerpc64le-unknown-linux-gnu", "powerpc64le-unknown-linux-musl", "riscv64gc-unknown-linux-gnu", @@ -95,7 +95,7 @@ targets = [ "aarch64-unknown-hermit", "aarch64-unknown-illumos", "aarch64-unknown-netbsd", - "aarch64-unknown-nto-qnx800", + "aarch64-unknown-qnx", "aarch64-unknown-openbsd", "aarch64-unknown-redox", "aarch64-wrs-vxworks", @@ -128,7 +128,6 @@ targets = [ "powerpc64-ibm-aix", "powerpc64-unknown-freebsd", "powerpc64-unknown-linux-gnu", - "powerpc64-unknown-linux-musl", "powerpc64-wrs-vxworks", "riscv32-wrs-vxworks", "riscv32gc-unknown-linux-musl", @@ -184,14 +183,11 @@ members = [ "libc-test", ] -# FIXME(msrv): These should be renamed as `[workspace.lints.*]` once MSRV is above 1.64 -# This way all crates can use it with `[lints] workspace=true` section - -[lints.rust] +[workspace.lints.rust] # FIXME(cleanup): make ident usage consistent in each file unused_qualifications = "allow" -[lints.clippy] +[workspace.lints.clippy] # Enable pedantic lints - use this manually once in a while, but don't enable by default # pedantic = { level = "warn", priority = -1 } @@ -206,10 +202,10 @@ ptr_as_ptr = "warn" unnecessary_semicolon = "warn" # FIXME(clippy): these should be fixed if possible -expl_impl_clone_on_copy = "allow" -uninlined_format_args = "allow" unnecessary_cast = "allow" # some casts like `as usize` are only needed for some targets -used_underscore_binding = "allow" + +[lints] +workspace = true [package.metadata.cargo-semver-checks.lints] # Alignment is an internal detail that users must not rely upon diff --git a/thirdparty/crates/libc-0.2.186/LICENSE-APACHE b/thirdparty/crates/libc-0.2.189/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/libc-0.2.186/LICENSE-APACHE rename to thirdparty/crates/libc-0.2.189/LICENSE-APACHE diff --git a/thirdparty/crates/libc-0.2.186/LICENSE-MIT b/thirdparty/crates/libc-0.2.189/LICENSE-MIT similarity index 100% rename from thirdparty/crates/libc-0.2.186/LICENSE-MIT rename to thirdparty/crates/libc-0.2.189/LICENSE-MIT diff --git a/thirdparty/crates/libc-0.2.186/README.md b/thirdparty/crates/libc-0.2.189/README.md similarity index 88% rename from thirdparty/crates/libc-0.2.186/README.md rename to thirdparty/crates/libc-0.2.189/README.md index 76ecb8673..b05a52d11 100644 --- a/thirdparty/crates/libc-0.2.186/README.md +++ b/thirdparty/crates/libc-0.2.189/README.md @@ -41,20 +41,6 @@ Add the following to your `Cargo.toml`: libc = "0.2" ``` -## Features - -* `std`: by default `libc` links to the standard library. Disable this feature - to remove this dependency and be able to use `libc` in `#![no_std]` crates. - -* `extra_traits`: all `struct`s implemented in `libc` are `Copy` and `Clone`. - This feature derives `Debug`, `Eq`, `Hash`, and `PartialEq`. - -The following features are deprecated: - -* `use_std`: this is equivalent to `std` -* `const-extern-fn`: this is now enabled by default -* `align`: this is now enabled by default - ## Rust version support The minimum supported Rust toolchain version is currently **Rust 1.65**. diff --git a/thirdparty/crates/libc-0.2.186/build.rs b/thirdparty/crates/libc-0.2.189/build.rs similarity index 74% rename from thirdparty/crates/libc-0.2.186/build.rs rename to thirdparty/crates/libc-0.2.189/build.rs index 34df96aa7..67da9c63b 100644 --- a/thirdparty/crates/libc-0.2.186/build.rs +++ b/thirdparty/crates/libc-0.2.189/build.rs @@ -3,6 +3,8 @@ use std::process::{ Command, Output, }; +use std::sync::atomic::AtomicBool; +use std::sync::atomic::Ordering::Relaxed; use std::{ env, str, @@ -24,7 +26,8 @@ const ALLOWED_CFGS: &[&str] = &[ "freebsd15", // Corresponds to `_FILE_OFFSET_BITS=64` in glibc "gnu_file_offset_bits64", - // Corresponds to `_TIME_BITS=64` in glibc + // Corresponds to `_TIME_BITS=64` in glibc. Also used in x86 Windows with + // GNU to expose a 64-bit `time_t`. "gnu_time_bits64", "libc_deny_warnings", // Corresponds to `__USE_TIME_BITS64` in UAPI @@ -35,6 +38,7 @@ const ALLOWED_CFGS: &[&str] = &[ // Corresponds to `_REDIR_TIME64` in musl: symbol redirects to __*_time64 "musl_redir_time64", "vxworks_lt_25_09", + "libc_pauthtest", ]; // Extra values to allow for check-cfg. @@ -42,12 +46,12 @@ const CHECK_CFG_EXTRA: &[(&str, &[&str])] = &[ ( "target_os", &[ - "switch", "aix", "ohos", "hurd", "rtems", "visionos", "nuttx", "cygwin", "qurt", + "switch", "aix", "ohos", "hurd", "rtems", "visionos", "nuttx", "cygwin", "qurt", "qnx", ], ), ( "target_env", - &["illumos", "wasi", "aix", "ohos", "nto71_iosock", "nto80"], + &["illumos", "wasi", "aix", "ohos", "nto71_iosock"], ), ( "target_arch", @@ -59,25 +63,58 @@ const CHECK_CFG_EXTRA: &[(&str, &[&str])] = &[ /// from 32-bit to 64-bit `time_t` and need `__*_time64` symbol redirects). const MUSL_REDIR_TIME64_ARCHES: &[&str] = &["arm", "mips", "powerpc", "x86"]; +/// Read from env, print more debug output via `cargo:warning` if set. +static VERBOSE_BUILD: AtomicBool = AtomicBool::new(false); + +/// Print info via warnings if `LIBC_BUILD_VERBOSE` is set. +macro_rules! info { + ($($tt:tt)+) => { + if VERBOSE_BUILD.load(Relaxed) { + println!("cargo:warning=info: {}", format_args!($($tt)*)); + } + } +} + fn main() { // Avoid unnecessary re-building. println!("cargo:rerun-if-changed=build.rs"); + println!("cargo:rerun-if-env-changed=LIBC_BUILD_VERBOSE"); + if env_flag("LIBC_BUILD_VERBOSE") { + VERBOSE_BUILD.store(true, Relaxed); + } + let (rustc_minor_ver, _is_nightly) = rustc_minor_nightly(); let libc_ci = env_flag("LIBC_CI"); let target_env = env::var("CARGO_CFG_TARGET_ENV").unwrap_or_default(); let target_os = env::var("CARGO_CFG_TARGET_OS").unwrap_or_default(); let target_ptr_width = env::var("CARGO_CFG_TARGET_POINTER_WIDTH").unwrap_or_default(); let target_arch = env::var("CARGO_CFG_TARGET_ARCH").unwrap_or_default(); + let target_abi = env::var("CARGO_CFG_TARGET_ABI").unwrap_or_default(); + + // FIXME(msrv): Once the MSRV is 1.78, use `cfg(target_abi = "pauthtest")` + // directly instead of translating it to `libc_pauthtest`. `target_abi` + // cannot be used directly in cfg expressions on the current MSRV. + if target_abi == "pauthtest" { + set_cfg("libc_pauthtest"); + } + + // FIXME: this can be removed in 1-2 releases + println!("cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_FREEBSD_VERSION"); + if env::var("RUST_LIBC_UNSTABLE_FREEBSD_VERSION").is_ok() { + println!( + "cargo:warning=RUST_LIBC_UNSTABLE_FREEBSD_VERSION has been removed; set \ + the cfg libc_unstable_freebsd_version via RUSTFLAGS instead" + ); + } // The ABI of libc used by std is backward compatible with FreeBSD 12. // The ABI of libc from crates.io is backward compatible with FreeBSD 12. // // On CI, we detect the actual FreeBSD version and match its ABI exactly, // running tests to ensure that the ABI is correct. - println!("cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_FREEBSD_VERSION"); // Allow overriding the default version for testing - let which_freebsd = if let Ok(version) = env::var("RUST_LIBC_UNSTABLE_FREEBSD_VERSION") { + let which_freebsd = if let Ok(version) = env::var("CARGO_CFG_LIBC_UNSTABLE_FREEBSD_VERSION") { let vers = version.parse().unwrap(); println!("cargo:warning=setting FreeBSD version to {vers}"); vers @@ -109,14 +146,17 @@ fn main() { _ => (), } - let mut musl_v1_2_3 = env_flag("RUST_LIBC_UNSTABLE_MUSL_V1_2_3"); - println!("cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_MUSL_V1_2_3"); + let mut musl_v1_2_3 = env_flag("CARGO_CFG_LIBC_UNSTABLE_MUSL_V1_2_3"); // OpenHarmony uses a fork of the musl libc let musl = target_env == "musl" || target_env == "ohos"; - // loongarch64, hexagon, and ohos only exist with recent musl - if target_arch == "loongarch64" || target_arch == "hexagon" || target_env == "ohos" { + // loongarch64, hexagon, ohos and pauthtest only exist with recent musl + if target_arch == "loongarch64" + || target_arch == "hexagon" + || target_env == "ohos" + || target_abi == "pauthtest" + { musl_v1_2_3 = true; } @@ -131,47 +171,51 @@ fn main() { } } - let linux_time_bits64 = env::var("RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64").is_ok(); - println!("cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_LINUX_TIME_BITS64"); - if linux_time_bits64 { + let uclibc_use_time64 = env_flag("CARGO_CFG_LIBC_UNSTABLE_UCLIBC_TIME64"); + if target_env == "uclibc" && uclibc_use_time64 { set_cfg("linux_time_bits64"); } - println!("cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS"); - println!("cargo:rerun-if-env-changed=RUST_LIBC_UNSTABLE_GNU_TIME_BITS"); + if target_env == "gnu" - && target_os == "linux" + && matches!(target_os.as_str(), "linux" | "windows") && target_ptr_width == "32" && target_arch != "riscv32" && target_arch != "x86_64" { - let defaultbits = "32".to_string(); - let (timebits, filebits) = match ( - env::var("RUST_LIBC_UNSTABLE_GNU_TIME_BITS"), - env::var("RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS"), - ) { - (Ok(_), Ok(_)) => panic!("Do not set both RUST_LIBC_UNSTABLE_GNU_TIME_BITS and RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS"), - (Err(_), Err(_)) => (defaultbits.clone(), defaultbits.clone()), - (Ok(tb), Err(_)) if tb == "64" => (tb.clone(), tb.clone()), - (Ok(tb), Err(_)) if tb == "32" => (tb, defaultbits.clone()), - (Ok(_), Err(_)) => panic!("Invalid value for RUST_LIBC_UNSTABLE_GNU_TIME_BITS, must be 32 or 64"), - (Err(_), Ok(fb)) if fb == "32" || fb == "64" => (defaultbits.clone(), fb), - (Err(_), Ok(_)) => panic!("Invalid value for RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS, must be 32 or 64"), + let defaultbits = "32"; + + let mut tb_env = env::var("CARGO_CFG_LIBC_UNSTABLE_GNU_TIME_BITS"); + + // FIXME: remove these fallbacks in a few releases + if let Ok(old_tb_env) = env::var("RUST_LIBC_UNSTABLE_GNU_TIME_BITS") { + println!( + "cargo:warning=RUST_LIBC_UNSTABLE_GNU_TIME_BITS will be removed; \ + set `--cfg=libc_unstable_gnu_time_bits=\"...\"` via RUSTFLAGS instead" + ); + tb_env = tb_env.or(Ok(old_tb_env)); + } + if env::var("RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS").is_ok() + || env::var("CARGO_CFG_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS").is_ok() + { + println!( + "cargo:warning=glibc file offset can no longer be set independently of \ + `gnu_time_bits`" + ); + } + + let timebits = match tb_env.as_deref() { + Err(_) => defaultbits, + Ok(tb) if tb == "64" => tb, + Ok(tb) if tb == "32" => tb, + Ok(_) => { + panic!("Invalid value for libc_unstable_gnu_time_bits. Must be 32, 64, or unset.") + } }; - let valid_bits = ["32", "64"]; - assert!( - valid_bits.contains(&filebits.as_str()) && valid_bits.contains(&timebits.as_str()), - "Invalid value for RUST_LIBC_UNSTABLE_GNU_TIME_BITS or RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS, must be 32, 64 or unset" - ); - assert!( - !(filebits == "32" && timebits == "64"), - "RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS must be 64 or unset if RUST_LIBC_UNSTABLE_GNU_TIME_BITS is 64" - ); + if timebits == "64" { set_cfg("linux_time_bits64"); - set_cfg("gnu_time_bits64"); - } - if filebits == "64" { set_cfg("gnu_file_offset_bits64"); + set_cfg("gnu_time_bits64"); } } @@ -266,6 +310,8 @@ fn rustc_minor_nightly() -> (u32, bool) { }); let minor = otry!(otry!(minor).parse().ok()); + info!("detected rust 1.{minor}, nightly={nightly}"); + (minor, nightly) } @@ -333,6 +379,7 @@ fn set_cfg(cfg: &str) { "trying to set cfg {cfg}, but it is not in ALLOWED_CFGS", ); println!("cargo:rustc-cfg={cfg}"); + info!("setting config `{cfg}`"); } /// Return true if the env is set to a value other than `0`. diff --git a/thirdparty/crates/libc-0.2.189/etc/libc-util.py b/thirdparty/crates/libc-0.2.189/etc/libc-util.py new file mode 100755 index 000000000..fc5f81f83 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/etc/libc-util.py @@ -0,0 +1,1112 @@ +#!/usr/bin/env python3 +"""Helper utilities for common libc tasks.""" + +import argparse +import copy +import datetime as dt +from enum import StrEnum +import functools +import json +import os +import pprint +import re +import subprocess as sp +import sys +from dataclasses import dataclass +from inspect import cleandoc +from multiprocessing import Pool +from pathlib import Path + +REPO_OWNER = "rust-lang" +REPO = "libc" + + +def main() -> None: + p = argparse.ArgumentParser( + description="Utilities for helping with libc development" + ) + sub = p.add_subparsers(required=True) + + p_cat = sub.add_parser( + "check-all-targets", + aliases=["cat"], + help="run `cargo check` on some or all targets (see subcommand help for more)", + description=CheckAllTargets.__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + p_cat.add_argument("package", help="specify the package to build") + p_cat.add_argument("-o", "--only", help="filter tested targets by this regex") + p_cat.add_argument("-s", "--skip", help="skip targets matching this regex") + p_cat.add_argument( + "cargo_args", + nargs="*", + metavar="cargo-args", + help="extra arguments for `cargo check`", + ) + p_cat.set_defaults( + func=lambda args: CheckAllTargets.prepare().check_all_targets( + package=args.package, + only=args.only, + skip=args.skip, + cargo_args=args.cargo_args, + ) + ) + + p_rel = sub.add_parser( + "relabel", + help="replace the stable-nominated label with stable-applied", + description=Relabel.__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + p_rel.add_argument( + "pr_number", metavar="pr-number", help="pull request for the backport" + ) + p_rel.set_defaults(func=lambda args: Relabel(pr_number=args.pr_number).execute()) + + p_log = sub.add_parser( + "make-changelog", + help="collect changelog entries", + description=MakeChangelog.__doc__, + formatter_class=argparse.ArgumentDefaultsHelpFormatter, + ) + p_log.add_argument( + "--old-tag", + metavar="old-tag", + help="tag of the previous revision to serve as the changelog base", + required=True, + ) + p_log.add_argument( + "--new-ref", + metavar="new-ref", + help="ref to compare to the old tag", + default="libc-0.2", + ) + p_log.set_defaults( + func=lambda args: MakeChangelog( + old_tag=args.old_tag, new_ref=args.new_ref + ).execute() + ) + + p_bkp = sub.add_parser( + "backport", + help="prepare to cherry pick to `libc-0.2` (see subcommand help for more)", + description=Backporter.__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + p_bkp.add_argument( + "--branch", help="branch to backport to, must not be checked out", required=True + ) + p_bkp.set_defaults( + func=lambda args: Backporter(branch=args.branch).start_backports() + ) + + s = sub.add_parser( + "backport-pr-description", + help="create a PR description for a backport branch", + description=Backporter.backport_pr_description.__doc__, + formatter_class=argparse.RawDescriptionHelpFormatter, + ) + s.add_argument("--branch", help="name of the backport branch", required=True) + s.set_defaults(func=lambda args: Backporter.backport_pr_description(args.branch)) + + p_amd = sub.add_parser( + "add-backport-trailer", + help='add "(backport ...)" to the previous commit', + description=Backporter.add_backport_trailer.__doc__, + ) + p_amd.add_argument("pick", help="commit that was cherry picked") + p_amd.set_defaults(func=lambda args: Backporter.add_backport_trailer(args.pick)) + + p_seq = sub.add_parser( + "_sequence-editor", + help="hook to update the rebase todo, meant for internal use", + ) + p_seq.add_argument("path", help="path to the rebase todo") + p_seq.set_defaults(func=lambda args: Backporter.sequence_editor(args.path)) + + args = p.parse_args() + args.func(args) + + +@dataclass(kw_only=True) +class Relabel: + """ + Replace the stable-nominated label with stable-applied, given the number of + a PR listing backported PRs. + + The backport PR should have a list of items like `* http://.../libc/pull/1234`. + """ + + pr_number: int + + def execute(self) -> None: + num = self.pr_number + j = check_output( + [ + "gh", + "pr", + "view", + f"https://github.com/{REPO_OWNER}/{REPO}/pull/{num}", + "--json=baseRefName,body,state,title", + ] + ) + d = json.loads(j) + base: str = d["baseRefName"] + body: str = d["body"] + state: str = d["state"] + title: str = d["title"] + + if state != "MERGED": + print(f'expected MERGED state; got {state} for "{title}" (#{num})') + exit(1) + if base != "libc-0.2": + print(f'expected libc-0.2 base ref; got {base} for "{title}" (#{num})') + exit(1) + + print(f'Relabling PRs listed in {num} "{title}"') + + to_relabel = [] + for line in body.splitlines(): + if not re.match(r"^[-*]\s*http", line): + continue + + match = re.match( + r"^[-*]\s*https?://github.com/rust-lang/libc/pull/(\d+)", line + ) + if match is None: + print( + f"{E.YEL}Line `{line}` does not match expected link pattern{E.RST}" + ) + continue + + num = int(match.group(1)) + to_relabel.append(num) + + # `gh` requests can be pretty slow, parallelize to help with large lists + with Pool() as p: + p.map(Relabel.do_relabel_inner, to_relabel) + + print("Finished relabeling") + + @staticmethod + def do_relabel_inner(num: int): + j = check_output(["gh", "pr", "view", pr_url(num), "--json=state,title,labels"]) + d = json.loads(j) + state: str = d["state"] + title: str = d["title"] + labels: list[str] = [i["name"] for i in d["labels"]] + + if state != "MERGED": + print( + f'{E.YEL}expected MERGED state; got {state} for "{title}" (#{num}){E.RST}' + ) + return + if "stable-nominated" not in labels: + print( + f'{E.YEL}`stable-nominated` not in labels for "{title}" (#{num}){E.RST}' + ) + + # Use check_output to eat the stdout since otherwise `gh` draws a spinner that + # messes up interleaved stdout. + check_output( + [ + "gh", + "pr", + "edit", + "--remove-label=stable-nominated", + "--add-label=stable-applied", + pr_url(num), + ] + ) + + +@dataclass(kw_only=True) +class MakeChangelog: + """ + Prepare a template with commits merged between `old-tag` and `new-ref`, for + appending to the changelog. + """ + + old_tag: str + new_ref: str + + def execute(self) -> None: + old_tag: str = self.old_tag + new_ref: str = self.new_ref + date = dt.datetime.now(dt.UTC).strftime("%Y-%m-%d") + split = old_tag.split(".") + split[2] = str(int(split[2]) + 1) # increment patch version + next_tag = ".".join(split) + + ret = cleandoc(f""" + ## [{next_tag}](https://github.com/rust-lang/libc/compare/{old_tag}...{next_tag}) - {date} + + ### Support + ### Added + ### Deprecated + ### Fixed + ### Changed + ### Removed + ### Other + """) + ret += "\n\n" + + changes = check_output( + [ + "git", + "log", + f"{old_tag}..{new_ref}", + "--no-merges", + "--oneline", + "--reverse", + ], + ).splitlines() + + print( + f"Generating changelog for {old_tag}..{new_ref}. Make sure {new_ref} " + "is up to date!" + ) + + for logline in changes: + sha = logline.split()[0] + summary = check_output(["git", "log", sha, "--format=%s", "-1"], quiet=True) + body = check_output(["git", "log", sha, "--format=%b", "-1"], quiet=True) + summary = summary.strip() + body = body.strip() + + link = None + + # Extract expected trailers + orig_sha_opt = re.search(r"\(cherry picked from commit (\w+)\)", body, re.M) + url_opt = re.search(r"^\(backport <(.*)>\)", body, re.M) + + # Prefer a PR URL if available + if url_opt is not None: + pr_url = url_opt[1] + pr_opt = re.match( + rf"https://github.com/{REPO_OWNER}/{REPO}/pull/(\d+)", pr_url + ) + if pr_opt is not None: + pr_num = pr_opt[1] + link = f"[#{pr_num}]({pr_url})" + + # If there is no PR URL, link the backported commit + if link is None and orig_sha_opt is not None: + orig_sha = orig_sha_opt[1] + short = orig_sha[:12] + link = f"[{short}](https://github.com/rust-lang/libc/commit/{orig_sha})" + + # If there is no PR URL or cherry pick commit, link the commit itself + if link is None: + patch_sha = check_output(["git", "rev-parse", sha], quiet=True).strip() + short = patch_sha[:12] + link = ( + f"[{short}](https://github.com/rust-lang/libc/commit/{patch_sha})" + ) + + line = f"- {summary} ({link})" + + ret += "\n" + ret += line + + print( + "Copy the below to CHANGELOG.md, then sort log messages into the " + "relevant categories:\n" + ) + print(ret) + + +@dataclass(kw_only=True) +class CheckAllTargets: + """ + Run `cargo check` on all targets, possibly with filtering. + + Query `rustc` for a list of supported targets, then run `cargo check` on each. + `-Zbuild-std` is used if the toolchain is not installed. + + This uses a pinned toolchain and a separate target directory in + `~/.cache/libc-build`. This is done to avoid accidental cache deletion with `cargo + clean` or invalidation by changing toolchain, since the initial build takes so long + that it can be worth keeping the cache around. + + The pinned toolchain can be overridden by setting RUSTC_CACHE_TOOLCHAIN. + """ + + toolchain: str + targets: list["RustcTarget"] + checks: list["CheckInvocation"] + failure_limit: int + + FREEBSD_VERSIONS = [13, 14, 15] + + # Targets that don't pass for one reason or another + BROKEN_TARGETS = [ + # libc problems + ("aarch64-unknown-nto-qnx800", "libc error, unsupported arch"), + ("aarch64.*-gnu_ilp32.*time_bits=64", "libc error, time64 mismatches"), + ("armv6k-nintendo-3ds", "libc error, stat missing"), + ("armv7-sony-vita-newlibeabihf", "libc error, stat missing"), + ("csky.*gnu.*time_bits=64", "libc error, time64 mismatches"), + ("i686-pc-nto-qnx700", "libc error, unsupported arch"), + ("managarm-mlibc", "libc error, unresolved import"), + ("x86_64-lynx-lynxos178", "libc error, unresolved import"), + ("x86_64-pc-nto-qnx800", "libc error, unsupported arch"), + ("x86_64-unknown-linux-none", "libc error, unresolved import"), + # rustc problems + ("xtensa-esp32.*", "target string mismatch in rustc"), + ("amdgcn-amd-amdhsa", "unsupported instructions with some CPUs"), + # llvm problems + ("m68k-unknown-.*", "llvm crash building core"), + ("mipsisa32r6(el)?-.*", "llvm crash building core"), + ] + + # Flags that always need to be passed to specific targets + EXTRA_TARGET_FLAGS = { + # Target CPU must be specified + "avr-none": ["-Ctarget-cpu=atmega328p"], + # Emits a lot of warnings + "hexagon-unknown-qurt": ["-Aunused_imports"], + } + + @staticmethod + def prepare() -> "CheckAllTargets": + """Build a list of checks.""" + toolchain = CheckAllTargets.get_cache_toolchain() + target_dir = cache_dir() / "libc-build" / toolchain + all_targets = RustcTarget.fetch_all(toolchain) + installed_targets = check_output( + [ + "rustup", + "target", + "list", + "--installed", + f"--toolchain={toolchain}", + ] + ).splitlines() + checks: list[CheckInvocation] = [] + + # Add a check for each target and, if applicable, a variant for any cfg options + # that also make sense to check. + for t in all_targets: + base = CheckInvocation( + target=t.triple, + name="", + target_dir=target_dir, + attributes={}, + installed=t.triple in installed_targets, + skip=[], + extra_rustflags=[], + ) + + new_checks = [base] + + # When doing variants, use a separate target directory because otherwise + # running twice with different `RUSTFLAGS` is a cache miss. + + if t.os_ == "freebsd": + new_checks.clear() + for vers in CheckAllTargets.FREEBSD_VERSIONS: + new = copy.deepcopy(base) + new.attributes = base.attributes | {"freebsd": str(vers)} + new.target_dir = base.target_dir / f"freebsd-{vers}" + new.extra_rustflags = base.extra_rustflags + [ + f'--cfg=libc_unstable_freebsd_version="{vers}"' + ] + + new_checks.append(new) + + if t.env == "gnu" and t.bits == 32: + new = copy.deepcopy(base) + new.attributes = base.attributes | {"time_bits": "64"} + new.target_dir = base.target_dir / "time64" + new.extra_rustflags = base.extra_rustflags + [ + '--cfg=libc_unstable_gnu_time_bits="64"' + ] + new_checks.append(new) + + if t.env == "musl" and t.bits == 32: + new = copy.deepcopy(base) + new.attributes = base.attributes | {"time_bits": "64"} + new.target_dir = base.target_dir / "time64" + new.extra_rustflags = base.extra_rustflags + [ + "--cfg=libc_unstable_musl_v1_2_3" + ] + new_checks.append(new) + + # Update the name field and check whether there are any targets that we + # always need to skip, or that need flags. + for check in new_checks: + if len(check.attributes) == 0: + check.name = f"{check.target} (default)" + else: + attrs = ",".join(f"{k}={v}" for (k, v) in check.attributes.items()) + check.name = f"{check.target} ({attrs})" + + for pat, reason in CheckAllTargets.BROKEN_TARGETS: + if check.pattern_matches(pat): + check.skip.append(reason) + + for pat, flags in CheckAllTargets.EXTRA_TARGET_FLAGS.items(): + if check.pattern_matches(pat): + check.extra_rustflags.extend(flags) + + checks.extend(new_checks) + + return CheckAllTargets( + toolchain=toolchain, + targets=all_targets, + checks=checks, + failure_limit=5, + ) + + def check_all_targets( + self, + *, + package: str, + only: str | None = None, + skip: str | None = None, + cargo_args: list[str] = [], + ) -> None: + """Run checks from the populated list.""" + checks = self.checks + ran = 0 + passed = 0 + skipped = 0 + failures = [] + matched_only_already_skipped = [] + + if only is not None: + for t in checks: + if t.pattern_matches(only): + if t.skip: + matched_only_already_skipped.append(t.name) + continue + t.skip.append("does not match --only pattern") + + if skip is not None: + for t in checks: + if not t.pattern_matches(skip): + continue + t.skip.append("matches --skip pattern") + + # `sum(1 for _ in ...)` seems to be the best way to get an iterator's count + total = sum(1 for _ in (t for t in checks if not t.skip)) + + # List skips first so the interesting output is together at the bottom + checks.sort(key=lambda t: len(t.skip) == 0) + + env = os.environ.copy() + env_rustflags = env.get("RUSTFLAGS") + + for t in checks: + fulldesc = f"{t.name} ({ran + 1} / {total})" + + if len(t.skip) > 0: + print(f"{E.YEL}Skipping {fulldesc} ({", ".join(t.skip)}){E.RST}") + skipped += 1 + continue + + print(f"{E.CY_B}Checking {fulldesc}{E.RST}") + + extra_args = [] if t.installed else ["-Zbuild-std=core"] + common_args = [ + f"--package={package}", + f"--target={t.target}", + ] + + # We aim to be warning-free + rustflags = ["-Dwarnings"] + rustflags += t.extra_rustflags + + # Allow forwarding rustflags + if env_rustflags is not None: + rustflags += [env_rustflags] + + print(f" {E.GRN_D}Running build{E.RST}") + + try: + run( + [ + "cargo", + f"+{self.toolchain}", + "check", + f"--target-dir={t.target_dir}", + ] + + common_args + + extra_args + + cargo_args, + env=env | {"RUSTFLAGS": " ".join(rustflags)}, + ) + ok = True + except sp.CalledProcessError: + ok = False + + ran += 1 + + if ok: + passed += 1 + else: + print(f"{E.RED_B}failed: {t.target}{E.RST}") + failures.append(t.name) + + if len(failures) > self.failure_limit: + break + + print( + f"finished checking {ran} targets. {passed} passed, " + f"{len(failures)} failed, {skipped} skipped" + ) + if len(matched_only_already_skipped) > 0: + print( + f"note: {len(matched_only_already_skipped)} targets matched `--only` " + "but were already skipped" + ) + + if len(failures) > 0: + print("failures:") + pprint.pp(failures) + + @staticmethod + def get_cache_toolchain() -> str: + # Arbitrary but reasonably recent default if unset. + return os.environ.get("RUSTC_CACHE_TOOLCHAIN") or "nightly-2026-06-24" + + +@dataclass(kw_only=True) +class CheckInvocation: + """Config for a single invocation of `cargo check`.""" + + target: str + name: str # target plus attributes + target_dir: Path + installed: bool + attributes: dict[str, str] + # skip reasons, empty if we shouldn't skip + skip: list[str] + extra_rustflags: list[str] + + def pattern_matches(self, pat: str) -> bool: + """Ensure pattern matching is applied consistently""" + assert self.name != "" + return re.search(pat, self.name) is not None + + +@dataclass(kw_only=True) +class Backporter: + """Prepare an interactive rebase that will cherry pick commits to `libc-0.2`. + + This loosely does the following: + + * Create a git worktree at `.libc-backports` + * Switch to the specified branch + * Start an interactive rebase that runs `git cherry-pick -x ` for each needed + commit, then modify the commit to add the `(cherry picked from ...)` and + `(backport ...)` trailers. + + An interactive rebase is used because it's a nice way to create and execute a series + of shell commands with a chance to resolve conflicts and continue as needed. + + Because it is standard `git rebase`, it is possible to use typical options like + `git rebase --edit-todo` if it pauses due to conflicts. + """ + + branch: str + + WORKTREE_DIR = ".libc-backports" + WORKTREE_GIT = ["git", "-C", WORKTREE_DIR] + GQL_QUERY = """ + query ($endCursor: String) { + repository(name: "libc", owner: "rust-lang") { + pullRequests( + first: 25 + after: $endCursor + baseRefName: "main" + states: MERGED + labels: ["stable-nominated"] + # Ordering by merge date is not supported, we need to re-sort after fetch. + orderBy: {field: CREATED_AT, direction: ASC} + ) { + nodes { + title + number + state + url + author { + login + } + mergedAt + mergeCommit { + oid + committedDate + messageHeadline + author { + name + user { + login + } + } + } + commits(first: 100) { + totalCount + nodes { + commit { + oid + committedDate + messageHeadline + author { + name + user { + login + } + } + } + } + } + } + pageInfo { + hasNextPage + endCursor + } + } + } + } + """ + + def start_backports(self) -> None: + self.ensure_local_updated() + + try: + self.ensure_branch() + self.ensure_worktree() + self.prepare_rebase_todo() + seq_ed = "../etc/libc-util.py _sequence-editor" + run( + self.WORKTREE_GIT + ["rebase", "-i", "libc-0.2"], + env=os.environ | {"GIT_SEQUENCE_EDITOR": seq_ed}, + ) + # Give the user a chance to delete picks if desired + print("Presenting rebase todo to user for review...") + run(self.WORKTREE_GIT + ["rebase", "--edit-todo"]) + run(self.WORKTREE_GIT + ["rebase", "--continue"]) + except sp.CalledProcessError: + msg = f""" + {E.YEL}Rebase failed or incomplete; check the git error above for + details. + + If git stopped because of a conflict or other resolvable error, change + to the worktree directory at {self.WORKTREE_DIR}. From there, you can + resolve conflicts or `git rebase --quit` to stop trying to backport the + rest of the commits. + + If needed, `git worktree remove .libc-backports` will allow you to + delete the branch and start from scratch.{E.RST} + """ + print("\n" + mstr(msg)) + exit(1) + + def prepare_rebase_todo(self) -> None: + """Create a rebase todo list and cache it, to be picked up by the sequence + editor. + """ + # Start with a break so we can `--edit-todo` + rebase_todo = "break\n" + commit_map = "" + + pull_requests = self.fetch_needs_backport_list() + for pr in pull_requests: + last_sha = pr.merge_commit.oid + parents = check_output( + ["git", "log", last_sha, "--format=%P", "-1"], quiet=True + ).split() + + # If we have a merge commit, take only the second (incoming) commit. + if len(parents) > 2: + eprint("Can't backport commits with >1 parent") + exit(1) + if len(parents) == 2: + last_sha = parents[1] + + # The commit list is not what we actually want to cherry pick; it has the + # refs for the commits in the PR but not the ref after merge. The PR's + # "merge" commit is the last commit on `main` from this PR, so we can + # work backwards; given N commits, `merge_sha~(N-1)` will be the first PR + # from the commit on `main`. + for i in reversed(range(len(pr.commits))): + n_back = len(pr.commits) - i - 1 + pick_sha = check_output( + ["git", "rev-parse", f"{last_sha}~{n_back}"], quiet=True + ).strip() + subject = check_output( + ["git", "log", pick_sha, "--format=%s", "-1"], quiet=True + ).strip() + pick_short = pick_sha[:12] + rebase_todo += ( + f"exec printf '{E.CY_B.u}picking from PR{pr.number}: {pick_short} " + f'"{subject}"{E.RST.u}\\n\'' + "\n" + f'pick {pick_short} # pick "{subject}"' + "\n" + f"exec ../etc/libc-util.py add-backport-trailer {pick_short}" + "\n\n" + ) + commit_map += f"{pick_sha} {pr.number}\n" + + todo_path = self.rebase_todo_tmp_path() + # may need to create `target/libc-util` + todo_path.parent.parent.mkdir(exist_ok=True) + todo_path.parent.mkdir(exist_ok=True) + todo_path.write_text(rebase_todo) + + self.commit_map_path().write_text(commit_map) + + def fetch_needs_backport_list(self) -> list["PullRequest"]: + """Fetch PRs labeled `stable-nominated` via the GraphQL API""" + s = check_output( + [ + "gh", + "api", + "graphql", + "--paginate", + "--slurp", + "-f", + "query=" + self.GQL_QUERY, + ] + ) + j: list[dict] = json.loads(s) + + # The result is paginated so we get nested lists. Extract the data we want + # then flatten. + pages = [page["data"]["repository"]["pullRequests"]["nodes"] for page in j] + pr_nodes = [pr_node for page in pages for pr_node in page] + + pull_requests: list[PullRequest] = [] + for pr in pr_nodes: + commits = [node["commit"] for node in pr["commits"]["nodes"]] + + new = PullRequest( + title=pr["title"], + number=int(pr["number"]), + state=pr["state"], + url=pr["url"], + author_username=pr["author"]["login"], + merged_at=pr["mergedAt"], + merge_commit=Commit.from_object(pr["mergeCommit"]), + commits=[Commit.from_object(c) for c in commits], + ) + + total_commits = int(pr["commits"]["totalCount"]) + new_commit_count = len(new.commits) + if total_commits != new_commit_count: + print( + f"limit reached: {total_commits} total commits but could " + f"only fetch {new_commit_count}" + ) + exit(1) + + pull_requests.append(new) + + # Oldest to newest + pull_requests.sort(key=lambda pr: pr.merged_at) + return pull_requests + + def ensure_local_updated(self) -> None: + """Sanity check that whatever we want to rebase onto is actually updated, and + fetch `main` to ensure cherry pick sources exist locally.""" + + run(["git", "fetch", repo_fetch_url(), "main"]) + run(["git", "fetch", repo_fetch_url(), "libc-0.2"]) + upstream = check_output(["git", "rev-parse", "FETCH_HEAD"]).strip() + local = check_output(["git", "rev-parse", "libc-0.2"]).strip() + + if upstream != local: + print( + f"local libc-0.2@{local[:12]} does not match upstream/libc-0.2@{upstream[:12]}!" + "Fetch before retrying." + ) + exit(1) + + def ensure_branch(self) -> None: + """Create the branch if it doesn't exist.""" + try: + run(["git", "branch", self.branch, "libc-0.2"], stderr=sp.PIPE) + except sp.CalledProcessError: + pass + + def ensure_worktree(self) -> None: + """Set up a worktree pointing to the target branch.""" + # Prune in case the directory was deleted without going via git. + run(["git", "worktree", "prune"]) + + try: + print("creating worktree") + run( + ["git", "worktree", "add", ".libc-backports", self.branch], + stderr=sp.PIPE, + ) + except sp.CalledProcessError: + print("worktree already exists, checking out branch") + run(self.WORKTREE_GIT + ["switch", self.branch]) + + @staticmethod + def sequence_editor(path: str) -> None: + """The script-y way to construct a rebase is by setting the "sequence editor" to + a script that gets the rebase todo path. That's all this function does, the + needed contents have already been written. + """ + + print(f"editing rebase todo at {path}") + + txt = "\n\n" + txt += Backporter.rebase_todo_tmp_path().read_text() + + with Path(path).open("a") as f: + f.write(txt) + + @staticmethod + def add_backport_trailer(pick: str) -> None: + """Add `(backport ...)` to the previous commit, using `(cherry picked from ...)` + to know where the commit came from. + """ + head_summary = check_output(["git", "log", "-1", "HEAD", "--format=%s"]).strip() + pick_summary = check_output(["git", "log", "-1", pick, "--format=%s"]).strip() + head_message = check_output(["git", "log", "-1", "HEAD", "--format=%B"]).strip() + head = check_output(["git", "rev-parse", "HEAD"]).strip() + pick = check_output(["git", "rev-parse", pick]).strip() + + existing_pick_msg = re.search( + r"^\(cherry picked from commit (\w+)\)", head_message, re.M + ) + existing_backport_msg = re.search(r"^\(backport.*\)", head_message, re.M) + + if existing_pick_msg is not None: + print( + f"{E.YEL}Commit {head} already contains cherry-pick trailer; " + f"skipping{E.RST}" + ) + return + + if existing_backport_msg is not None: + print( + f"{E.YEL}Commit {head} already contains backport trailer; " + f"skipping{E.RST}" + ) + return + + if head_summary != pick_summary: + print( + f"{E.YEL}Commit {head} summary does not match pick {pick} " + f"summary; skipping{E.RST}" + ) + return + + commit_map = Backporter.commit_map_path().read_text() + pr = None + for line in commit_map.splitlines(): + if not line.startswith(pick): + continue + _, _, pr = line.partition(" ") + break + + if pr is None: + print(f"{E.YEL}could not locate PR for picked commit {pick}{E.RST}") + return + + new_message = head_message.strip() + new_message += f"\n\n(backport <{pr_url(int(pr))}>)" + new_message += f"\n(cherry picked from commit {pick})\n" + run(["git", "commit", "--amend", "--message", new_message]) + + @staticmethod + def backport_pr_description(branch: str) -> None: + """List all backported commits for a branch, for pasting into the PR body.""" + commits = check_output(["git", "log", f"libc-0.2..{branch}", "--format=%b"]) + urls = {x[1] for x in re.finditer(r"^\(backport <(.*)>\)", commits, re.M)} + urls = sorted(list(urls)) + + s = "Backport the following:\n\n" + for url in urls: + s += f"* {url}\n" + + print(s) + + @staticmethod + def rebase_todo_tmp_path() -> Path: + """Rebase todo to be appended to the default""" + return Path(__file__).parent.parent / "target" / "libc-util" / "rebase-todo.txt" + + @staticmethod + def commit_map_path() -> Path: + """List of ` ` mappings.""" + return Path(__file__).parent.parent / "target" / "libc-util" / "commit-map.txt" + + +@dataclass(kw_only=True) +class RustcTarget: + """Config queried from rustc.""" + + triple: str + arch: str + os_: str | None + env: str | None + bits: int + + @staticmethod + @functools.cache + def get_one(toolchain: str, triple: str) -> "RustcTarget": + target_cfg = check_output( + ["rustc", f"+{toolchain}", "--print=cfg", f"--target={triple}"], quiet=True + ) + return RustcTarget( + triple=triple, + arch=re.findall(r'target_arch="(.*)"', target_cfg)[0], + env=re.findall(r'target_env="(.*)"', target_cfg)[0], + os_=re.findall(r'target_os="(.*)"', target_cfg)[0], + bits=int(re.findall(r'target_pointer_width="(.*)"', target_cfg)[0]), + ) + + @staticmethod + @functools.cache + def fetch_all(toolchain: str) -> list["RustcTarget"]: + """Collect all targets for a given toolchain.""" + all_targets = check_output( + ["rustc", f"+{toolchain}", "--print=target-list"] + ).splitlines() + + # Iterating targets is really slow, throw some threads at it. + with Pool() as p: + ret = p.starmap(RustcTarget.get_one, [(toolchain, t) for t in all_targets]) + + ret.sort(key=lambda t: t.triple) + return ret + + +@dataclass(kw_only=True) +class PullRequest: + """Pull request built from a GitHub GraphQL API response""" + + title: str + number: int + state: str + url: str + author_username: str + merged_at: str + merge_commit: "Commit" + commits: list["Commit"] + + +@dataclass(kw_only=True) +class Commit: + """Commit built from a GitHub GraphQL API response""" + + oid: str + committed_date: str + subject: str + author_name: str + author_username: str | None + + def __post_init__(self) -> None: + # Give some protection against multiline summaries, since that may confuse + # scripts or log messages. + self.subject = trunc_lines(self.subject) + self.author_name = trunc_lines(self.author_name) + if self.author_username is not None: + self.author_username = trunc_lines(self.author_username) + + @staticmethod + def from_object(obj) -> "Commit": + user = obj["author"]["user"] + return Commit( + oid=obj["oid"], + committed_date=obj["committedDate"], + subject=obj["messageHeadline"], + author_name=obj["author"]["name"], + author_username=user["login"] if user is not None else None, + ) + + +class E(StrEnum): + """ANSI escapes.""" + + YEL = "\033[33m" + GRN = "\033[32m" + + # Bright colors + CY_B = "\033[1;36m" + YEL_B = "\033[1;33m" + RED_B = "\033[1;31m" + + # Dimmed colors + DIM = "\033[2m" + YEL_D = "\033[2;33m" + GRN_D = "\033[2;32m" + + RST = "\033[0m" + + @property + def u(self) -> str: + """Unescape, for passing to shell printf.""" + return self.replace("\033", "\\033") + + +@functools.cache +def cache_dir() -> Path: + xdg_cache = os.environ.get("XDG_CACHE_DIR") + if xdg_cache is not None: + return Path(xdg_cache) + return Path.home() / ".cache" + + +def repo_fetch_url() -> str: + return f"https://github.com/{REPO_OWNER}/{REPO}.git" + + +def pr_url(num: int) -> str: + return f"https://github.com/{REPO_OWNER}/{REPO}/pull/{num}" + + +def mstr(s: str) -> str: + """Message string: clean an indented string and convert singular `\\n`s to spaces.""" + return re.sub(r"(\S)\n(\S)", r"\1 \2", cleandoc(s)) + + +def check_output(args: list[str], *, quiet: bool = False, **kw) -> str: + if not quiet: + xtrace(args, env=kw.get("env")) + return sp.check_output(args, encoding="utf8", text=True, **kw) + + +def run(args: list[str], *, quiet: bool = False, **kw) -> sp.CompletedProcess: + if not quiet: + xtrace(args, env=kw.get("env")) + return sp.run(args, check=True, text=True, **kw) + + +def xtrace(args: list[str], *, env: dict[str, str] | None) -> None: + """Print commands before running them.""" + astr = " ".join(str(arg) for arg in args) + + # GQL commands are long, trim the next line + astr = trunc_lines(astr) + + if env is None: + eprint(f"{E.DIM}+ {astr}{E.RST}") + else: + envdiff = set(env.items()) - set(os.environ.items()) + estr = " ".join(f"{k}='{v}'" for (k, v) in envdiff) + eprint(f"{E.DIM}+ {estr} {astr}{E.RST}") + + +def trunc_lines(s: str) -> str: + """If >1 line, replace other lines with `...`.""" + first, _, rest = s.partition("\n") + if rest != "": + first += " ..." + return first + + +def eprint(*args, **kw) -> None: + print(*args, file=sys.stderr, **kw) + + +if __name__ == "__main__": + main() diff --git a/thirdparty/crates/libc-0.2.186/src/fuchsia/aarch64.rs b/thirdparty/crates/libc-0.2.189/src/fuchsia/aarch64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/fuchsia/aarch64.rs rename to thirdparty/crates/libc-0.2.189/src/fuchsia/aarch64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/fuchsia/mod.rs b/thirdparty/crates/libc-0.2.189/src/fuchsia/mod.rs similarity index 98% rename from thirdparty/crates/libc-0.2.186/src/fuchsia/mod.rs rename to thirdparty/crates/libc-0.2.189/src/fuchsia/mod.rs index 3e35faa7b..4c2dcec59 100644 --- a/thirdparty/crates/libc-0.2.186/src/fuchsia/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/fuchsia/mod.rs @@ -79,11 +79,15 @@ pub type fsfilcnt_t = c_ulonglong; pub type rlim_t = c_ulonglong; extern_ty! { - pub enum timezone {} - pub enum DIR {} - pub enum fpos64_t {} // FIXME(fuchsia): fill this out with a struct + pub type timezone; + pub type DIR; + pub type fpos64_t; // FIXME(fuchsia): fill this out with a struct } +// Deprecated impls: see #5296 +unsafe impl Send for DIR {} +unsafe impl Sync for DIR {} + // PUB_STRUCT s! { @@ -1538,6 +1542,8 @@ pub const LOCK_UN: c_int = 8; pub const SS_ONSTACK: c_int = 1; pub const SS_DISABLE: c_int = 2; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PATH_MAX: c_int = 4096; pub const FD_SETSIZE: usize = 1024; @@ -1552,7 +1558,7 @@ pub const EPOLLWRBAND: c_int = 0x200; pub const EPOLLMSG: c_int = 0x400; pub const EPOLLERR: c_int = 0x8; pub const EPOLLHUP: c_int = 0x10; -pub const EPOLLET: c_int = 0x80000000; +pub const EPOLLET: c_int = u32_cast_int(0x80000000); pub const EPOLL_CTL_ADD: c_int = 1; pub const EPOLL_CTL_MOD: c_int = 3; @@ -1644,7 +1650,7 @@ pub const CLONE_NEWIPC: c_int = 0x08000000; pub const CLONE_NEWUSER: c_int = 0x10000000; pub const CLONE_NEWPID: c_int = 0x20000000; pub const CLONE_NEWNET: c_int = 0x40000000; -pub const CLONE_IO: c_int = 0x80000000; +pub const CLONE_IO: c_int = u32_cast_int(0x80000000); pub const CLONE_NEWCGROUP: c_int = 0x02000000; pub const WNOHANG: c_int = 0x00000001; @@ -1680,7 +1686,7 @@ pub const PTRACE_EVENT_SECCOMP: c_int = 7; pub const __WNOTHREAD: c_int = 0x20000000; pub const __WALL: c_int = 0x40000000; -pub const __WCLONE: c_int = 0x80000000; +pub const __WCLONE: c_int = u32_cast_int(0x80000000); pub const SPLICE_F_MOVE: c_uint = 0x01; pub const SPLICE_F_NONBLOCK: c_uint = 0x02; @@ -2497,7 +2503,7 @@ pub const EPROTO: c_int = 71; pub const EDOTDOT: c_int = 73; pub const SA_NODEFER: c_int = 0x40000000; -pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000); pub const SA_RESTART: c_int = 0x10000000; pub const SA_NOCLDSTOP: c_int = 0x00000001; @@ -2964,135 +2970,131 @@ cfg_if! { // END_PUB_CONST f! { - pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] &= !(1 << (fd % size)); return; } - pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0; } - pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] |= 1 << (fd % size); return; } - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in (*set).fds_bits.iter_mut() { - *slot = 0; - } + pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { + (*set).fds_bits.fill(0); } - pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { - for slot in cpuset.bits.iter_mut() { - *slot = 0; - } + pub unsafe fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { + cpuset.bits.fill(0); } - pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { + pub unsafe fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] |= 1 << offset; () } - pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { + pub unsafe fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] &= !(1 << offset); () } - pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { + pub unsafe fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); 0 != (cpuset.bits[idx] & (1 << offset)) } - pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { + pub unsafe fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { set1.bits == set2.bits } - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { cmsg.offset(1) as *mut c_uchar } - pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if ((*cmsg).cmsg_len as size_t) < size_of::() { - core::ptr::null_mut::() + ptr::null_mut() } else if __CMSG_NEXT(cmsg).add(size_of::()) >= __MHDR_END(mhdr) { - core::ptr::null_mut::() + ptr::null_mut() } else { __CMSG_NEXT(cmsg).cast() } } - pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { if (*mhdr).msg_controllen as size_t >= size_of::() { (*mhdr).msg_control.cast() } else { - core::ptr::null_mut::() + ptr::null_mut() } } - pub const fn CMSG_ALIGN(len: size_t) -> size_t { + pub const unsafe fn CMSG_ALIGN(len: size_t) -> size_t { (len + size_of::() - 1) & !(size_of::() - 1) } - pub const fn CMSG_SPACE(len: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(len: c_uint) -> c_uint { (CMSG_ALIGN(len as size_t) + CMSG_ALIGN(size_of::())) as c_uint } - pub const fn CMSG_LEN(len: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(len: c_uint) -> c_uint { (CMSG_ALIGN(size_of::()) + len as size_t) as c_uint } } safe_f! { - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0x7f } - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { (status >> 8) & 0xff } - pub const fn WIFCONTINUED(status: c_int) -> bool { + pub const safe fn WIFCONTINUED(status: c_int) -> bool { status == 0xffff } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { ((status & 0x7f) + 1) as i8 >= 2 } - pub const fn WTERMSIG(status: c_int) -> c_int { + pub const safe fn WTERMSIG(status: c_int) -> c_int { status & 0x7f } - pub const fn WIFEXITED(status: c_int) -> bool { + pub const safe fn WIFEXITED(status: c_int) -> bool { (status & 0x7f) == 0 } - pub const fn WEXITSTATUS(status: c_int) -> c_int { + pub const safe fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xff } - pub const fn WCOREDUMP(status: c_int) -> bool { + pub const safe fn WCOREDUMP(status: c_int) -> bool { (status & 0x80) != 0 } - pub const fn QCMD(cmd: c_int, type_: c_int) -> c_int { + pub const safe fn QCMD(cmd: c_int, type_: c_int) -> c_int { (cmd << 8) | (type_ & 0x00ff) } - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { let major = major as crate::dev_t; let minor = minor as crate::dev_t; let mut dev = 0; @@ -3103,14 +3105,14 @@ safe_f! { dev } - pub const fn major(dev: crate::dev_t) -> c_uint { + pub const safe fn major(dev: crate::dev_t) -> c_uint { let mut major = 0; major |= (dev & 0x00000000000fff00) >> 8; major |= (dev & 0xfffff00000000000) >> 32; major as c_uint } - pub const fn minor(dev: crate::dev_t) -> c_uint { + pub const safe fn minor(dev: crate::dev_t) -> c_uint { let mut minor = 0; minor |= (dev & 0x00000000000000ff) >> 0; minor |= (dev & 0x00000ffffff00000) >> 12; @@ -3138,8 +3140,8 @@ fn __MHDR_END(mhdr: *const msghdr) -> *mut c_uchar { extern "C" {} extern_ty! { - pub enum FILE {} - pub enum fpos_t {} // FIXME(fuchsia): fill this out with a struct + pub type FILE; + pub type fpos_t; // FIXME(fuchsia): fill this out with a struct } extern "C" { diff --git a/thirdparty/crates/libc-0.2.186/src/fuchsia/riscv64.rs b/thirdparty/crates/libc-0.2.189/src/fuchsia/riscv64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/fuchsia/riscv64.rs rename to thirdparty/crates/libc-0.2.189/src/fuchsia/riscv64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/fuchsia/x86_64.rs b/thirdparty/crates/libc-0.2.189/src/fuchsia/x86_64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/fuchsia/x86_64.rs rename to thirdparty/crates/libc-0.2.189/src/fuchsia/x86_64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/hermit.rs b/thirdparty/crates/libc-0.2.189/src/hermit.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/hermit.rs rename to thirdparty/crates/libc-0.2.189/src/hermit.rs index 2cbf57393..04699b1ec 100644 --- a/thirdparty/crates/libc-0.2.186/src/hermit.rs +++ b/thirdparty/crates/libc-0.2.189/src/hermit.rs @@ -157,7 +157,7 @@ pub const F_SETFL: i32 = 4; pub const FD_CLOEXEC: i32 = 1; -pub const FIONBIO: i32 = 0x8008667e; +pub const FIONBIO: i32 = u32_cast_int(0x8008667e); pub const FUTEX_RELATIVE_TIMEOUT: u32 = 1; diff --git a/thirdparty/crates/libc-0.2.189/src/lib.rs b/thirdparty/crates/libc-0.2.189/src/lib.rs new file mode 100644 index 000000000..a95a967e7 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/lib.rs @@ -0,0 +1,309 @@ +//! Raw FFI bindings to platform system libraries. +//! +//! # Usage Guidelines +//! +//! `libc` exposes non-Rust interfaces in Rust, which makes for some caveats to its use that are +//! not present in most Rust libraries. Observing the following guidelines are recommended to help +//! avoid soundness and stability pitfalls. +//! +//! 1. *Never* construct a `libc` struct with `MaybeUninit::uninit()`, initialize it, then call +//! `assume_init`. Many structures have padding fields or may gain fields in the future, and +//! it is far too easy to end up calling `assume_init` on partially initialized data. +//! +//! Instead, use `MaybeUninit::zeroed()` or the `Default` implementations that are slowly being +//! added. Alternatively, access fields only via raw pointer without ever using `assume_init`. +//! +//! 2. Avoid relying on the exact value of constants, the exact length of arrays, or the exact +//! types of type aliases, as they may change across `libc` versions. That is, if `libc` +//! contains code like: +//! +//! +//! ```ignore +//! const IFNAMSIZ: usize = 16; +//! +//! pub struct ifreq { +//! pub ifr_name: [c_char; IFNAMSIZ], +//! // ... +//! } +//! +//! extern "C" { +//! pub fn time(time: *mut time_t) -> time_t; +//! } +//! ``` +//! +//! Then avoid writing code like: +//! +//! ```ignore +//! // Bad assumption that the length will always be 16. +//! fn takes_ifr_name(ifr_name: [c_char; 16]) { /* ... */ } +//! +//! fn process_ifr(ifr: ifreq) { +//! takes_ifr_name(ifr.ifr_name); +//! } +//! +//! // Bad assumption that `time_t` will always be an `i64`. Use `-> time_t` instead, or +//! // explicitly cast to an `i64`.` +//! fn get_time() -> i64 { +//! unsafe { time(ptr::null_mut()) } +//! } +//! +//! ``` +//! +//! For `takes_ifr_name`, use `[c_char; IFNAMSIZ]` or just `&[c_char]` instead. For `get_time`, +//! return a `time_t` or explicitly cast to an `i64`. +//! +//! Along the same lines, if you write code along the lines of `assert_eq!(libc::ELAST, 97)`, +//! expect that there may be a release where this starts to fail. +//! +//! 3. Do not name `__c_anonymous_*` types anywhere, which exist to represent anonymous fields in +//! C. For example, FreeBSD defines: +//! +//! ```c +//! struct filestat { +//! int fs_type; +//! // ... +//! struct { struct filestat stqe_next; } next; +//! }; +//! ``` +//! +//! Which is represented in `libc` as: +//! +//! ```ignore +//! struct filestat { +//! fs_type: c_int, +//! // ... +//! next: __c_anonymous_filestat, +//! } +//! +//! struct __c_anonymous_filestat { stqe_next: *mut filestat } +//! ``` +//! +//! Accessing `some_filestat.next.stqe_next` is completely fine, but `__c_anonymous_filestat` +//! should not be used anywhere (e.g. in a function signature). This is done to permit `libc` to +//! switch to anonymous fields if the feature is ever added to Rust. +//! +//! 4. Avoid accessing fields with names such as `__reserved`, `_pad`, or `_spare`. Usually the +//! platform libraries use these to allow adding new fields without changing the size of a +//! struct, but this means their types change frequently. +//! +//! 5. Be aware of deprecation warnings. These are used as a way to migrate necessary API changes. +//! +//! # Cargo Features +//! +//! - `std`: by default `libc` assumes that the standard library contains link directives necessary +//! to use the APIs in this crate. If `std` is disabled, `libc` will emit the directives instead. +//! +//! This feature is slated for removal in `libc` 1.0. The intention is that no-std users of +//! `libc` should use their own `#[link]` attributes, `rustc-link-lib` build script directives, +//! or `-l` arguments for only the system libraries they need to link, rather than `libc` +//! possibly linking more than is needed or available. If you are using `libc` without the `std` +//! feature, consider starting to add link directives now for a smoother 1.0 transition. +//! +//! - `extra_traits`: all types in `libc` implement `Clone`, `Copy`, and `Debug`. The +//! `extra_traits` feature adds `Eq`, `Hash`, and `PartialEq`. +//! +//! This feature is expected to be removed in libc 1.0. Libraries should instead hash or check +//! equality of only needed fields. +//! +//! - The features `const-extern-fn`, `align`, and `use_std` are all deprecated and do nothing. +//! +//! # Stability Expectations +//! +//! Due to `libc`'s position in the ecosystem, it can effectively never publish semver-breaking +//! releases. However, the API that `libc` binds changes _all the time_; sometimes in ways that +//! are harmless, sometimes in ways that are technically API-breaking for all users but unlikely +//! to be noticed (e.g. removing deprecated API), and sometimes in ways that are nonbreaking in +//! C but translate to breaking changes in Rust (e.g. changing the type of an integer). `libc` +//! tries to strike a balance but all of this means that unfortunately, `libc` must occasionally +//! ship changes within a semver-compatible release that are technically semver-breaking. +//! +//! The following are examples of changes that fall into this category: +//! +//! - Fields are added to a struct that is otherwise exhaustive. +//! - Fields with names such as `padding` or `reserved` change type or are removed. +//! - The length of an array type changes. +//! - A struct field (with available padding) is changed from `int` to `long`. +//! +//! In general, `libc` aims to follow platform API changes, even when this means changes that are +//! user-visible in Rust. There are a few guidelines used here: +//! +//! - Adding struct fields is not considered breaking, nor is changing fields named `reserved`, +//! `padding`, or similar. This is because users are expected to use field-by-field +//! initialization. +//! - Changing type aliases, values of constants, or array lengths is not considered breaking. +//! - If the platform libc has accepted breakage on the C side (typically in the form of removing +//! old API), the `libc` crate will follow suit. +//! - Where possible, `#[deprecated(...)]` will be used to warn about changes before applying them. +//! Alternative mitigations may be considered. +//! - Potentially breaking changes will be well-identified in release notes. +//! - Beyond this, public API is not expected to change on Tier 1 targets. Tier 2 targets have +//! relaxed API stability requirements, and API stability is not enforced on tier 3 targets. +//! +//! While this section seems scary, keep in mind that it is meant to cover worst-case scenarios. In +//! practice, breakage is rare and following the above-discussed [Usage Guidelines](#usage-guidelines) +//! means that most `libc` users will never encounter a problem. + +// Make it a bit easier to build without Cargo +#![crate_name = "libc"] +#![crate_type = "rlib"] +// Pretty much all C API doesn't match Rust conventions. +#![allow(nonstandard_style)] +// Not all macros and all patterns are used on all targets. +#![allow(unused_macros)] +#![allow(unused_macro_rules)] +// All traits should be `Copy` and `Debug`. +#![warn(missing_copy_implementations)] +#![warn(missing_debug_implementations)] +// Downgrade deny to a warning. +#![warn(overflowing_literals)] +// Prepare for a future upgrade. +#![warn(rust_2024_compatibility)] +// Things missing for 2024 that are blocked on MSRV or breakage. +#![allow(missing_unsafe_on_extern)] +#![allow(edition_2024_expr_fragment_specifier)] +// Allowed globally, the warning is enabled in individual modules as we work through them +#![allow(unsafe_op_in_unsafe_fn)] +#![cfg_attr(libc_deny_warnings, deny(warnings))] +// Attributes needed when building as part of the standard library +#![cfg_attr(feature = "rustc-dep-of-std", feature(link_cfg, no_core))] +#![cfg_attr(feature = "rustc-dep-of-std", allow(internal_features))] +// Some targets don't need `link_cfg` and emit a warning. +#![cfg_attr(feature = "rustc-dep-of-std", allow(unused_features))] +// DIFF(1.0): The thread local references that raise this lint were removed in 1.0 +#![cfg_attr(feature = "rustc-dep-of-std", allow(static_mut_refs))] +#![cfg_attr(not(feature = "rustc-dep-of-std"), no_std)] +#![cfg_attr(feature = "rustc-dep-of-std", no_core)] + +#[macro_use] +mod macros; +mod new; + +cfg_if! { + if #[cfg(feature = "rustc-dep-of-std")] { + extern crate rustc_std_workspace_core as core; + } +} + +pub use core::ffi::c_void; + +#[allow(unused_imports)] // needed while the module is empty on some platforms +pub use new::*; + +cfg_if! { + if #[cfg(windows)] { + mod primitives; + pub use crate::primitives::*; + + mod windows; + pub use crate::windows::*; + + prelude!(); + } else if #[cfg(target_os = "fuchsia")] { + mod primitives; + pub use crate::primitives::*; + + mod fuchsia; + pub use crate::fuchsia::*; + + prelude!(); + } else if #[cfg(target_os = "switch")] { + mod primitives; + pub use primitives::*; + + mod switch; + pub use switch::*; + + prelude!(); + } else if #[cfg(target_os = "psp")] { + mod primitives; + pub use primitives::*; + + mod psp; + pub use crate::psp::*; + + prelude!(); + } else if #[cfg(target_os = "vxworks")] { + mod primitives; + pub use crate::primitives::*; + + mod vxworks; + pub use crate::vxworks::*; + + prelude!(); + } else if #[cfg(target_os = "qurt")] { + mod primitives; + pub use crate::primitives::*; + + mod qurt; + pub use crate::qurt::*; + + prelude!(); + } else if #[cfg(target_os = "solid_asp3")] { + mod primitives; + pub use crate::primitives::*; + + mod solid; + pub use crate::solid::*; + + prelude!(); + } else if #[cfg(unix)] { + mod primitives; + pub use crate::primitives::*; + + mod unix; + pub use crate::unix::*; + + prelude!(); + } else if #[cfg(target_os = "hermit")] { + mod primitives; + pub use crate::primitives::*; + + mod hermit; + pub use crate::hermit::*; + + prelude!(); + } else if #[cfg(target_os = "teeos")] { + mod primitives; + pub use primitives::*; + + mod teeos; + pub use teeos::*; + + prelude!(); + } else if #[cfg(target_os = "trusty")] { + mod primitives; + pub use crate::primitives::*; + + mod trusty; + pub use crate::trusty::*; + + prelude!(); + } else if #[cfg(all(target_env = "sgx", target_vendor = "fortanix"))] { + mod primitives; + pub use crate::primitives::*; + + mod sgx; + pub use crate::sgx::*; + + prelude!(); + } else if #[cfg(any(target_env = "wasi", target_os = "wasi"))] { + mod primitives; + pub use crate::primitives::*; + + mod wasi; + pub use crate::wasi::*; + + prelude!(); + } else if #[cfg(target_os = "xous")] { + mod primitives; + pub use crate::primitives::*; + + mod xous; + pub use crate::xous::*; + + prelude!(); + } else { + // non-supported targets: empty... + } +} diff --git a/thirdparty/crates/libc-0.2.186/src/macros.rs b/thirdparty/crates/libc-0.2.189/src/macros.rs similarity index 84% rename from thirdparty/crates/libc-0.2.186/src/macros.rs rename to thirdparty/crates/libc-0.2.189/src/macros.rs index 2d2d39088..0271d326a 100644 --- a/thirdparty/crates/libc-0.2.186/src/macros.rs +++ b/thirdparty/crates/libc-0.2.189/src/macros.rs @@ -87,7 +87,9 @@ macro_rules! prelude { pub(crate) use core::prelude::v1::derive; #[allow(unused_imports)] pub(crate) use core::{ + assert, cfg, + debug_assert, fmt, hash, iter, @@ -105,8 +107,18 @@ macro_rules! prelude { size_of_val, }; + #[allow(unused_imports)] + #[cfg(any(target_os = "linux", target_os = "android", target_os = "l4re"))] + pub(crate) use crate::types::u32_cast_ioctl; #[allow(unused_imports)] pub(crate) use crate::types::{ + replace_array_items, + u16_cast_short, + u32_cast_int, + u32_cast_long, + u8_slice_cast_char_slice, + ulong_cast_int, + ulong_cast_uint, CEnumRepr, Padding, }; @@ -246,17 +258,36 @@ macro_rules! s_no_extra_traits { macro_rules! extern_ty { ($( $(#[$attr:meta])* - pub enum $i:ident {} + $vis:vis type $i:ident; )*) => ($( $(#[$attr])* - // FIXME(1.0): the type is uninhabited so these traits are unreachable and could be - // removed. + /// This is an extern type ("opaque" or "incomplete" type in C). + /// + ///
+ /// This type's current representation allows inspecting some properties, such as via + /// size_of, and it is technically possible to construct the type within + /// MaybeUninit, However, this MUST NOT be relied upon + /// because a future version of libc may switch to a proper + /// extern type + /// representation when available. + ///
+ // ^ unfortunately warning blocks currently don't render markdown so we need to + // use raw HTML. + // + // Representation based on the Nomicon: + // . + // + // FIXME(1.0): These traits are unreachable and should be removed. #[::core::prelude::v1::derive( ::core::clone::Clone, ::core::marker::Copy, ::core::fmt::Debug, )] - pub enum $i { } + #[repr(C)] + $vis struct $i { + _data: (), + _marker: ::core::marker::PhantomData<(*mut u8, ::core::marker::PhantomPinned)>, + } )*); } @@ -295,14 +326,14 @@ macro_rules! c_enum { // Matcher for multiple enums ($( $(#[repr($repr:ty)])? - pub enum $($ty_name:ident)? $(#$anon:ident)? { - $($vis:vis $variant:ident $(= $value:expr)?,)+ + $vis:vis enum $($ty_name:ident)? $(#$anon:ident)? { + $($field_vis:vis $variant:ident $(= $value:expr)?,)+ } )+) => { $(c_enum!(@single; $(#[repr($repr)])? - pub enum $($ty_name)? $(#$anon)? { - $($vis $variant $(= $value)?,)+ + $vis enum $($ty_name)? $(#$anon)? { + $($field_vis $variant $(= $value)?,)+ } );)+ }; @@ -310,31 +341,31 @@ macro_rules! c_enum { // Matcher for a single enum (@single; $(#[repr($repr:ty)])? - pub enum $ty_name:ident { - $($vis:vis $variant:ident $(= $value:expr)?,)+ + $vis:vis enum $ty_name:ident { + $($field_vis:vis $variant:ident $(= $value:expr)?,)+ } ) => { - pub type $ty_name = c_enum!(@ty $($repr)?); + $vis type $ty_name = c_enum!(@ty $($repr)?); c_enum! { @variant; ty: $ty_name; default: 0; - variants: [$($vis $variant $(= $value)?,)+] + variants: [$($field_vis $variant $(= $value)?,)+] } }; // Matcher for a single anonymous enum (@single; $(#[repr($repr:ty)])? - pub enum #anon { - $($vis:vis $variant:ident $(= $value:expr)?,)+ + $vis:vis enum #anon { + $($field_vis:vis $variant:ident $(= $value:expr)?,)+ } ) => { c_enum! { @variant; ty: c_enum!(@ty $($repr)?); default: 0; - variants: [$($vis $variant $(= $value)?,)+] + variants: [$($field_vis $variant $(= $value)?,)+] } }; @@ -345,11 +376,11 @@ macro_rules! c_enum { ty: $ty_name:ty; default: $default_val:expr; variants: [ - $vis:vis $variant:ident $(= $value:expr)?, + $field_vis:vis $variant:ident $(= $value:expr)?, $($tail:tt)* ] ) => { - $vis const $variant: $ty_name = { + $field_vis const $variant: $ty_name = { #[allow(unused_variables)] let r = $default_val; $(let r = $value;)? @@ -375,15 +406,14 @@ macro_rules! c_enum { macro_rules! f { ($( $(#[$attr:meta])* - // Less than ideal hack to match either `fn` or `const fn`. - pub $(fn $i:ident)? $(const fn $const_i:ident)? - ($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty + pub $(const $($const_dummy:literal)?)? unsafe + fn $i:ident ($($arg:ident: $argty:ty),* $(,)?) -> $ret:ty $body:block )+) => {$( #[inline] $(#[$attr])* - pub $(unsafe extern "C" fn $i)? $(const unsafe extern "C" fn $const_i)? - ($($arg: $argty),*) -> $ret + pub $(const $($const_dummy)?)? unsafe extern "C" + fn $i ($($arg: $argty),*) -> $ret $body )+}; } @@ -392,15 +422,14 @@ macro_rules! f { macro_rules! safe_f { ($( $(#[$attr:meta])* - // Less than ideal hack to match either `fn` or `const fn`. - pub $(fn $i:ident)? $(const fn $const_i:ident)? - ($($arg:ident: $argty:ty),* $(,)*) -> $ret:ty + pub $(const $($const_dummy:literal)?)? safe + fn $i:ident ($($arg:ident: $argty:ty),* $(,)?) -> $ret:ty $body:block )+) => {$( #[inline] $(#[$attr])* - pub $(extern "C" fn $i)? $(const extern "C" fn $const_i)? - ($($arg: $argty),*) -> $ret + pub $(const $($const_dummy)?)? extern "C" + fn $i ($($arg: $argty),*) -> $ret $body )+}; } @@ -444,7 +473,7 @@ macro_rules! deprecated_mach { macro_rules! offset_of { ($Ty:path, $field:ident) => {{ // Taken from bytemuck, avoids accidentally calling on deref - #[allow(clippy::unneeded_field_pattern)] + #[allow(clippy::unneeded_wildcard_pattern)] let $Ty { $field: _, .. }; let data = core::mem::MaybeUninit::<$Ty>::uninit(); let ptr = data.as_ptr(); @@ -480,6 +509,13 @@ mod tests { ANON1, ANON2, } + + // No visibility required. + enum #anon { + ANON3, + ANON4, + ANON5, + } } assert_eq!(TypeId::of::(), TypeId::of::()); @@ -491,6 +527,11 @@ mod tests { assert_eq!(ANON0, 0 as CEnumRepr); assert_eq!(ANON1, 1 as CEnumRepr); assert_eq!(ANON2, 2 as CEnumRepr); + + assert_eq!(type_id_of_val(&ANON3), TypeId::of::()); + assert_eq!(ANON3, 0 as CEnumRepr); + assert_eq!(ANON4, 1 as CEnumRepr); + assert_eq!(ANON5, 2 as CEnumRepr); } #[test] @@ -651,4 +692,9 @@ mod macro_checks { b: f32, } } + + extern_ty! { + type Foo; + pub type Bar; + } } diff --git a/thirdparty/crates/libc-0.2.186/src/new/aix/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/aix/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/aix/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/aix/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/aix/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/aix/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/aix/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/aix/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libc/signal.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libc/signal.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libc/signal.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libc/signal.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libc/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libc/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libc/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libc/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/introspection.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/introspection.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/introspection.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/introspection.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/pthread.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/pthread.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/pthread.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/pthread.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/pthread_impl.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/pthread_impl.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/pthread_impl.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/pthread_impl.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/pthread_spis.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/pthread_spis.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/pthread_spis.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/pthread_spis.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/qos.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/qos.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/qos.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/qos.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/sched.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/sched.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/sched.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/sched.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/spawn.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/spawn.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/spawn.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/spawn.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/stack_np.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/stack_np.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/pthread_/stack_np.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/pthread_/stack_np.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/sys/_pthread/_pthread_types.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/sys/_pthread/_pthread_types.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/sys/_pthread/_pthread_types.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/sys/_pthread/_pthread_types.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/sys/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/sys/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/sys/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/sys/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/sys/qos.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/sys/qos.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/libpthread/sys/qos.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/libpthread/sys/qos.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/mod.rs similarity index 93% rename from thirdparty/crates/libc-0.2.186/src/new/apple/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/mod.rs index beb8caab6..1708cc36f 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/apple/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/apple/mod.rs @@ -16,5 +16,4 @@ mod xnu; pub(crate) use libc::*; pub(crate) use libpthread::pthread_; -pub(crate) use pthread_::pthread; pub(crate) use xnu::*; diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/xnu/arm/_mcontext.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/arm/_mcontext.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/xnu/arm/_mcontext.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/xnu/arm/_mcontext.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/xnu/i386/_mcontext.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/i386/_mcontext.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/xnu/i386/_mcontext.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/xnu/i386/_mcontext.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/xnu/mach/arm/_structs.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/mach/arm/_structs.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/xnu/mach/arm/_structs.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/xnu/mach/arm/_structs.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/xnu/mach/i386/_structs.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/mach/i386/_structs.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/xnu/mach/i386/_structs.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/xnu/mach/i386/_structs.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/xnu/mach/machine/_structs.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/mach/machine/_structs.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/xnu/mach/machine/_structs.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/xnu/mach/machine/_structs.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/xnu/mach/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/mach/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/xnu/mach/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/xnu/mach/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/xnu/machine/_mcontext.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/machine/_mcontext.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/xnu/machine/_mcontext.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/xnu/machine/_mcontext.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/xnu/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/mod.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/new/apple/xnu/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/xnu/mod.rs index 8b8afb6bc..a81d38db5 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/apple/xnu/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/mod.rs @@ -27,4 +27,8 @@ pub(crate) mod machine { pub(crate) mod _mcontext; } +pub(crate) mod net; + +pub(crate) mod netinet6; + pub(crate) mod sys; diff --git a/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/net/bpf.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/net/bpf.rs new file mode 100644 index 000000000..dc0aae84d --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/net/bpf.rs @@ -0,0 +1,57 @@ +//! Header: `net/bpf.h` +//! +//! + +use crate::prelude::*; +use crate::sys::ioccom::*; + +s! { + pub struct bpf_insn { + pub code: c_ushort, + pub jt: c_uchar, + pub jf: c_uchar, + pub k: u32, + } + + pub struct bpf_program { + pub bf_len: c_uint, + pub bf_insns: *mut bpf_insn, + } +} + +s_no_extra_traits! { + #[repr(packed(4))] + pub struct bpf_dltlist { + pub bfl_len: u32, + pub bfl_u: __c_anonymous_bfl_u, + } + + pub union __c_anonymous_bfl_u { + pub bflu_list: *mut u32, + pub bflu_pad: u64, + } +} + +pub const DLT_NULL: c_uint = 0; // no link-layer encapsulation +pub const DLT_EN10MB: c_uint = 1; // Ethernet (10Mb) +pub const DLT_EN3MB: c_uint = 2; // Experimental Ethernet (3Mb) +pub const DLT_AX25: c_uint = 3; // Amateur Radio AX.25 +pub const DLT_PRONET: c_uint = 4; // Proteon ProNET Token Ring +pub const DLT_CHAOS: c_uint = 5; // Chaos +pub const DLT_IEEE802: c_uint = 6; // IEEE 802 Networks +pub const DLT_ARCNET: c_uint = 7; // ARCNET +pub const DLT_SLIP: c_uint = 8; // Serial Line IP +pub const DLT_PPP: c_uint = 9; // Point-to-point Protocol +pub const DLT_FDDI: c_uint = 10; // FDDI +pub const DLT_ATM_RFC1483: c_uint = 11; // LLC/SNAP encapsulated atm +pub const DLT_RAW: c_uint = 12; // raw IP +pub const DLT_LOOP: c_uint = 108; + +pub const BPF_ALIGNMENT: c_int = size_of::() as c_int; + +pub const BIOCGRSIG: c_ulong = _IOR::('B' as c_ulong, 114); +pub const BIOCSRSIG: c_ulong = _IOW::('B' as c_ulong, 115); +pub const BIOCGSEESENT: c_ulong = _IOR::('B' as c_ulong, 118); +pub const BIOCSSEESENT: c_ulong = _IOW::('B' as c_ulong, 119); +pub const BIOCSDLT: c_ulong = _IOW::('B' as c_ulong, 120); +pub const BIOCGDLTLIST: c_ulong = _IOWR::('B' as c_ulong, 121); diff --git a/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/net/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/net/mod.rs new file mode 100644 index 000000000..c2844db51 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/net/mod.rs @@ -0,0 +1,5 @@ +//! Directory: `net/` +//! +//! + +pub(crate) mod bpf; diff --git a/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/netinet6/in6_var.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/netinet6/in6_var.rs new file mode 100644 index 000000000..f7fcc04b1 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/netinet6/in6_var.rs @@ -0,0 +1,22 @@ +//! Header: `netinet6/in6_var.h` +//! +//! + +use crate::prelude::*; +use crate::sys::ioccom::*; + +pub const IN6_IFF_ANYCAST: c_int = 0x0001; +pub const IN6_IFF_TENTATIVE: c_int = 0x0002; +pub const IN6_IFF_DUPLICATED: c_int = 0x0004; +pub const IN6_IFF_DETACHED: c_int = 0x0008; +pub const IN6_IFF_DEPRECATED: c_int = 0x0010; +pub const IN6_IFF_NODAD: c_int = 0x0020; +pub const IN6_IFF_AUTOCONF: c_int = 0x0040; +pub const IN6_IFF_TEMPORARY: c_int = 0x0080; +pub const IN6_IFF_DYNAMIC: c_int = 0x0100; +pub const IN6_IFF_OPTIMISTIC: c_int = 0x0200; +pub const IN6_IFF_SECURED: c_int = 0x0400; +pub const IN6_IFF_CLAT46: c_int = 0x1000; +pub const IN6_IFF_NOPFX: c_int = 0x8000; + +pub const SIOCGIFAFLAG_IN6: c_ulong = _IOWR::('i' as c_ulong, 73); diff --git a/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/netinet6/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/netinet6/mod.rs new file mode 100644 index 000000000..1592863f7 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/netinet6/mod.rs @@ -0,0 +1,5 @@ +//! Directory: `netinet6/` +//! +//! + +pub(crate) mod in6_var; diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/xnu/sys/_types/_ucontext.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/_types/_ucontext.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/xnu/sys/_types/_ucontext.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/_types/_ucontext.rs diff --git a/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/ioccom.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/ioccom.rs new file mode 100644 index 000000000..dcc0d0785 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/ioccom.rs @@ -0,0 +1,49 @@ +//! Header: `sys/ioccom.h` +//! +//! + +use crate::prelude::*; + +const IOCPARM_MASK: c_ulong = 0x1fff; + +const IOCPARM_MAX: c_ulong = IOCPARM_MASK + 1; + +// These are u32 in source but would probably be more practical as c_ulong if we ever need +// to make them public. +pub(crate) const IOC_VOID: u32 = 0x20000000; +pub(crate) const IOC_OUT: u32 = 0x40000000; +pub(crate) const IOC_IN: u32 = 0x80000000; +pub(crate) const IOC_INOUT: u32 = IOC_IN | IOC_OUT; +pub(crate) const IOC_DIRMASK: u32 = 0xe0000000; + +// Only pub(crate) for the above reason. +pub(crate) const fn _IOC(inout: u32, group: c_ulong, num: c_ulong, len: c_ulong) -> c_ulong { + debug_assert!(inout <= IOC_DIRMASK); + debug_assert!(group <= 0xff); + debug_assert!(num <= 0xff); + debug_assert!(len <= IOCPARM_MAX); + + // Sanity check the cast + assert!(size_of::() <= size_of::()); + + (inout as c_ulong) | ((len & IOCPARM_MASK) << 16) | (group << 8) | num +} + +pub const fn _IO(g: c_ulong, n: c_ulong) -> c_ulong { + _IOC(IOC_VOID, g, n, 0) +} + +/// Build an ioctl number for an read-only ioctl. +pub const fn _IOR(g: c_ulong, n: c_ulong) -> c_ulong { + _IOC(IOC_OUT, g, n, mem::size_of::() as c_ulong) +} + +/// Build an ioctl number for an write-only ioctl. +pub const fn _IOW(g: c_ulong, n: c_ulong) -> c_ulong { + _IOC(IOC_IN, g, n, mem::size_of::() as c_ulong) +} + +/// Build an ioctl number for a read-write ioctl. +pub const fn _IOWR(g: c_ulong, n: c_ulong) -> c_ulong { + _IOC(IOC_INOUT, g, n, mem::size_of::() as c_ulong) +} diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/xnu/sys/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/mod.rs similarity index 86% rename from thirdparty/crates/libc-0.2.186/src/new/apple/xnu/sys/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/mod.rs index ad4a20489..8c7108c63 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/apple/xnu/sys/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/mod.rs @@ -2,7 +2,10 @@ //! //! +pub(crate) mod ioccom; pub(crate) mod signal; +pub(crate) mod sockio; +pub(crate) mod ttycom; /// Directory: `sys/_types` /// diff --git a/thirdparty/crates/libc-0.2.186/src/new/apple/xnu/sys/signal.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/signal.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/apple/xnu/sys/signal.rs rename to thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/signal.rs diff --git a/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/sockio.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/sockio.rs new file mode 100644 index 000000000..7ca4e0330 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/sockio.rs @@ -0,0 +1,88 @@ +//! Header: `sys/sockio.h` +//! +//! + +use crate::prelude::*; +use crate::sys::ioccom::*; + +pub const SIOCSHIWAT: c_ulong = _IOW::('s' as c_ulong, 0); +pub const SIOCGHIWAT: c_ulong = _IOR::('s' as c_ulong, 1); +pub const SIOCSLOWAT: c_ulong = _IOW::('s' as c_ulong, 2); +pub const SIOCGLOWAT: c_ulong = _IOR::('s' as c_ulong, 3); +pub const SIOCATMARK: c_ulong = _IOR::('s' as c_ulong, 7); +pub const SIOCSPGRP: c_ulong = _IOW::('s' as c_ulong, 8); +pub const SIOCGPGRP: c_ulong = _IOR::('s' as c_ulong, 9); + +pub const SIOCSIFADDR: c_ulong = _IOW::('i' as c_ulong, 12); +pub const SIOCSIFDSTADDR: c_ulong = _IOW::('i' as c_ulong, 14); +pub const SIOCSIFFLAGS: c_ulong = _IOW::('i' as c_ulong, 16); +pub const SIOCGIFFLAGS: c_ulong = _IOWR::('i' as c_ulong, 17); +pub const SIOCSIFBRDADDR: c_ulong = _IOW::('i' as c_ulong, 19); +pub const SIOCSIFNETMASK: c_ulong = _IOW::('i' as c_ulong, 22); +pub const SIOCGIFMETRIC: c_ulong = _IOWR::('i' as c_ulong, 23); +pub const SIOCSIFMETRIC: c_ulong = _IOW::('i' as c_ulong, 24); +pub const SIOCDIFADDR: c_ulong = _IOW::('i' as c_ulong, 25); +// struct ifaliasreq +pub const SIOCAIFADDR: c_ulong = _IOC(IOC_IN, 'i' as c_ulong, 26, 64); +pub const SIOCGIFDSTADDR: c_ulong = _IOWR::('i' as c_ulong, 34); +pub const SIOCGIFBRDADDR: c_ulong = _IOWR::('i' as c_ulong, 35); +pub const SIOCGIFCONF: c_ulong = _IOWR::('i' as c_ulong, 36); +pub const SIOCGIFNETMASK: c_ulong = _IOWR::('i' as c_ulong, 37); +pub const SIOCAUTOADDR: c_ulong = _IOWR::('i' as c_ulong, 38); +pub const SIOCAUTONETMASK: c_ulong = _IOW::('i' as c_ulong, 39); +pub const SIOCARPIPLL: c_ulong = _IOWR::('i' as c_ulong, 40); +pub const SIOCADDMULTI: c_ulong = _IOW::('i' as c_ulong, 49); +pub const SIOCDELMULTI: c_ulong = _IOW::('i' as c_ulong, 50); +pub const SIOCGIFMTU: c_ulong = _IOWR::('i' as c_ulong, 51); +pub const SIOCSIFMTU: c_ulong = _IOW::('i' as c_ulong, 52); +pub const SIOCGIFPHYS: c_ulong = _IOWR::('i' as c_ulong, 53); +pub const SIOCSIFPHYS: c_ulong = _IOW::('i' as c_ulong, 54); +pub const SIOCSIFMEDIA: c_ulong = _IOWR::('i' as c_ulong, 55); +// struct ifmediareq +pub const SIOCGIFMEDIA: c_ulong = _IOC(IOC_INOUT, 'i' as c_ulong, 56, 44); +pub const SIOCSIFGENERIC: c_ulong = _IOW::('i' as c_ulong, 57); +pub const SIOCGIFGENERIC: c_ulong = _IOWR::('i' as c_ulong, 58); +// struct rslvmulti_req +pub const SIOCRSLVMULTI: c_ulong = _IOC(IOC_INOUT, 'i' as c_ulong, 59, 16); +pub const SIOCSIFLLADDR: c_ulong = _IOW::('i' as c_ulong, 60); +// struct ifstat +pub const SIOCGIFSTATUS: c_ulong = _IOC(IOC_INOUT, 'i' as c_ulong, 61, 817); +// struct ifaliasreq +pub const SIOCSIFPHYADDR: c_ulong = _IOC(IOC_IN, 'i' as c_ulong, 62, 64); +pub const SIOCGIFPSRCADDR: c_ulong = _IOWR::('i' as c_ulong, 63); +pub const SIOCGIFPDSTADDR: c_ulong = _IOWR::('i' as c_ulong, 64); +pub const SIOCDIFPHYADDR: c_ulong = _IOW::('i' as c_ulong, 65); +pub const SIOCGIFDEVMTU: c_ulong = _IOWR::('i' as c_ulong, 68); +pub const SIOCSIFALTMTU: c_ulong = _IOW::('i' as c_ulong, 69); +pub const SIOCGIFALTMTU: c_ulong = _IOWR::('i' as c_ulong, 72); +pub const SIOCSIFBOND: c_ulong = _IOW::('i' as c_ulong, 70); +pub const SIOCGIFBOND: c_ulong = _IOWR::('i' as c_ulong, 71); +// struct ifmediareq +pub const SIOCGIFXMEDIA: c_ulong = _IOC(IOC_INOUT, 'i' as c_ulong, 72, 44); +pub const SIOCSIFCAP: c_ulong = _IOW::('i' as c_ulong, 90); +pub const SIOCGIFCAP: c_ulong = _IOWR::('i' as c_ulong, 91); +pub const SIOCSIFMANAGEMENT: c_ulong = _IOWR::('i' as c_ulong, 92); +pub const SIOCIFCREATE: c_ulong = _IOWR::('i' as c_ulong, 120); +pub const SIOCIFDESTROY: c_ulong = _IOW::('i' as c_ulong, 121); +pub const SIOCIFCREATE2: c_ulong = _IOWR::('i' as c_ulong, 122); +// struct ifdrv +pub const SIOCSDRVSPEC: c_ulong = _IOC(IOC_IN, 'i' as c_ulong, 123, 40); +// struct ifdrv +pub const SIOCGDRVSPEC: c_ulong = _IOC(IOC_INOUT, 'i' as c_ulong, 123, 40); +pub const SIOCSIFVLAN: c_ulong = _IOW::('i' as c_ulong, 126); +pub const SIOCGIFVLAN: c_ulong = _IOWR::('i' as c_ulong, 127); +pub const SIOCSETVLAN: c_ulong = SIOCSIFVLAN; +pub const SIOCGETVLAN: c_ulong = SIOCGIFVLAN; +// struct if_clonereq +pub const SIOCIFGCLONERS: c_ulong = _IOC(IOC_INOUT, 'i' as c_ulong, 129, 16); +pub const SIOCGIFASYNCMAP: c_ulong = _IOWR::('i' as c_ulong, 124); +pub const SIOCSIFASYNCMAP: c_ulong = _IOW::('i' as c_ulong, 125); +pub const SIOCGIFMAC: c_ulong = _IOWR::('i' as c_ulong, 130); +pub const SIOCSIFMAC: c_ulong = _IOW::('i' as c_ulong, 131); +pub const SIOCSIFKPI: c_ulong = _IOW::('i' as c_ulong, 134); +pub const SIOCGIFKPI: c_ulong = _IOWR::('i' as c_ulong, 135); +pub const SIOCGIFWAKEFLAGS: c_ulong = _IOWR::('i' as c_ulong, 136); +pub const SIOCGIFFUNCTIONALTYPE: c_ulong = _IOWR::('i' as c_ulong, 173); +pub const SIOCSIF6LOWPAN: c_ulong = _IOW::('i' as c_ulong, 196); +pub const SIOCGIF6LOWPAN: c_ulong = _IOWR::('i' as c_ulong, 197); +pub const SIOCGIFDIRECTLINK: c_ulong = _IOWR::('i' as c_ulong, 222); diff --git a/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/ttycom.rs b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/ttycom.rs new file mode 100644 index 000000000..55e680ce7 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/apple/xnu/sys/ttycom.rs @@ -0,0 +1,93 @@ +//! Header: `sys/ttycom.h` +//! +//! + +use crate::prelude::*; +use crate::sys::ioccom::*; + +/* FIXME(1.0): a number of ioctl numbers are `c_int` or `c_uint` and should be changed to + * `c_ulong` to match the others. */ + +pub const TIOCMODG: c_ulong = _IOR::('t' as c_ulong, 3); +pub const TIOCMODS: c_ulong = _IOW::('t' as c_ulong, 4); + +pub const TIOCM_LE: c_int = 0o0001; +pub const TIOCM_DTR: c_int = 0o0002; +pub const TIOCM_RTS: c_int = 0o0004; +pub const TIOCM_ST: c_int = 0o0010; +pub const TIOCM_SR: c_int = 0o0020; +pub const TIOCM_CTS: c_int = 0o0040; +pub const TIOCM_CAR: c_int = 0o0100; +pub const TIOCM_CD: c_int = TIOCM_CAR; +pub const TIOCM_RNG: c_int = 0o0200; +pub const TIOCM_RI: c_int = TIOCM_RNG; +pub const TIOCM_DSR: c_int = 0o0400; + +pub const TIOCEXCL: c_int = ulong_cast_int(_IO('t' as c_ulong, 13)); +pub const TIOCNXCL: c_int = ulong_cast_int(_IO('t' as c_ulong, 14)); + +pub const TIOCFLUSH: c_ulong = _IOW::('t' as c_ulong, 16); + +pub const TIOCGETA: c_ulong = _IOR::('t' as c_ulong, 19); +pub const TIOCSETA: c_ulong = _IOW::('t' as c_ulong, 20); +pub const TIOCSETAW: c_ulong = _IOW::('t' as c_ulong, 21); +pub const TIOCSETAF: c_ulong = _IOW::('t' as c_ulong, 22); + +pub const TIOCGETD: c_ulong = _IOR::('t' as c_ulong, 26); +pub const TIOCSETD: c_ulong = _IOW::('t' as c_ulong, 27); + +pub const TIOCIXON: c_int = ulong_cast_int(_IO('t' as c_ulong, 129)); +pub const TIOCIXOFF: c_int = ulong_cast_int(_IO('t' as c_ulong, 128)); + +pub const TIOCSBRK: c_int = ulong_cast_int(_IO('t' as c_ulong, 123)); +pub const TIOCCBRK: c_int = ulong_cast_int(_IO('t' as c_ulong, 122)); +pub const TIOCSDTR: c_int = ulong_cast_int(_IO('t' as c_ulong, 121)); +pub const TIOCCDTR: c_int = ulong_cast_int(_IO('t' as c_ulong, 120)); +pub const TIOCGPGRP: c_ulong = _IOR::('t' as c_ulong, 119); +pub const TIOCSPGRP: c_ulong = _IOW::('t' as c_ulong, 118); + +pub const TIOCOUTQ: c_ulong = _IOR::('t' as c_ulong, 115); +pub const TIOCSTI: c_ulong = _IOW::('t' as c_ulong, 114); +pub const TIOCNOTTY: c_ulong = _IO('t' as c_ulong, 113); +pub const TIOCPKT: c_ulong = _IOW::('t' as c_ulong, 112); + +pub const TIOCPKT_DATA: c_int = 0x00; +pub const TIOCPKT_FLUSHREAD: c_int = 0x01; +pub const TIOCPKT_FLUSHWRITE: c_int = 0x02; +pub const TIOCPKT_STOP: c_int = 0x04; +pub const TIOCPKT_START: c_int = 0x08; +pub const TIOCPKT_NOSTOP: c_int = 0x10; +pub const TIOCPKT_DOSTOP: c_int = 0x20; +pub const TIOCPKT_IOCTL: c_int = 0x40; + +pub const TIOCSTOP: c_uint = ulong_cast_uint(_IO('t' as c_ulong, 111)); +pub const TIOCSTART: c_uint = ulong_cast_uint(_IO('t' as c_ulong, 110)); +pub const TIOCMSET: c_ulong = _IOW::('t' as c_ulong, 109); +pub const TIOCMBIS: c_ulong = _IOW::('t' as c_ulong, 108); +pub const TIOCMBIC: c_ulong = _IOW::('t' as c_ulong, 107); +pub const TIOCMGET: c_ulong = _IOR::('t' as c_ulong, 106); + +#[deprecated(since = "0.2.178", note = "Removed in MacOSX 12.0.1")] +pub const TIOCREMOTE: c_ulong = 0x80047469; + +pub const TIOCGWINSZ: c_ulong = _IOR::('t' as c_ulong, 104); +pub const TIOCSWINSZ: c_ulong = _IOW::('t' as c_ulong, 103); +pub const TIOCUCNTL: c_ulong = _IOW::('t' as c_ulong, 102); +pub const TIOCSTAT: c_uint = ulong_cast_uint(_IO('t' as c_ulong, 101)); + +pub const TIOCSCONS: c_uint = ulong_cast_uint(_IO('t' as c_ulong, 99)); +pub const TIOCCONS: c_ulong = _IOW::('t' as c_ulong, 98); +pub const TIOCSCTTY: c_uint = ulong_cast_uint(_IO('t' as c_ulong, 97)); +pub const TIOCEXT: c_ulong = _IOW::('t' as c_ulong, 96); +pub const TIOCSIG: c_uint = ulong_cast_uint(_IO('t' as c_ulong, 95)); +pub const TIOCDRAIN: c_uint = ulong_cast_uint(_IO('t' as c_ulong, 94)); +pub const TIOCMSDTRWAIT: c_ulong = _IOW::('t' as c_ulong, 91); +pub const TIOCMGDTRWAIT: c_ulong = _IOR::('t' as c_ulong, 90); +pub const TIOCTIMESTAMP: c_ulong = _IOR::('t' as c_ulong, 89); +pub const TIOCDCDTIMESTAMP: c_ulong = _IOR::('t' as c_ulong, 88); +pub const TIOCSDRAINWAIT: c_ulong = _IOW::('t' as c_ulong, 87); +pub const TIOCGDRAINWAIT: c_ulong = _IOR::('t' as c_ulong, 86); +pub const TIOCDSIMICROCODE: c_uint = ulong_cast_uint(_IO('t' as c_ulong, 85)); +pub const TIOCPTYGRANT: c_uint = ulong_cast_uint(_IO('t' as c_ulong, 84)); +pub const TIOCPTYGNAME: c_uint = ulong_cast_uint(_IOC(IOC_OUT, 't' as c_ulong, 83, 128)); +pub const TIOCPTYUNLK: c_uint = ulong_cast_uint(_IO('t' as c_ulong, 82)); diff --git a/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/kernel_uapi/linux/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/kernel_uapi/linux/mod.rs new file mode 100644 index 000000000..57cf2dd88 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/kernel_uapi/linux/mod.rs @@ -0,0 +1,5 @@ +//! Directory: `bionic/libc/kernel/uapi/linux/` +//! +//! + +pub(crate) mod types; diff --git a/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/kernel_uapi/linux/types.rs b/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/kernel_uapi/linux/types.rs new file mode 100644 index 000000000..e142abd93 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/kernel_uapi/linux/types.rs @@ -0,0 +1,21 @@ +//! * Header: `bionic/libc/kernel/uapi/linux/types.h` +//! * Header: `bionic/libc/kernel/uapi/asm-generic/int-ll64.h` + +use crate::prelude::*; + +/* Definitions from `asm/types.h` -> `asm-generic/types.h` -> `asm-generic/int-ll64.h` */ + +pub type __u8 = c_uchar; + +pub type __u16 = c_ushort; +pub type __s16 = c_short; + +pub type __u32 = c_uint; +pub type __s32 = c_int; + +pub type __s64 = c_longlong; +pub type __u64 = c_ulonglong; + +/* From `uapi/linux/types.h` */ + +pub type __be16 = __u16; diff --git a/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/kernel_uapi/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/kernel_uapi/mod.rs new file mode 100644 index 000000000..5c879bd08 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/kernel_uapi/mod.rs @@ -0,0 +1,3 @@ +//! Directory: `bionic/libc/kernel/uapi` + +pub(crate) mod linux; diff --git a/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/mod.rs new file mode 100644 index 000000000..3ffdc076b --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/mod.rs @@ -0,0 +1,10 @@ +//! This directory maps to `bionic/libc/include` in the Android source. `bionic/libc/kernel` is +//! the source of UAPI definitions, which are a cleaned form of the default Linux headers. +//! +//! , +//! + +pub(crate) mod kernel_uapi; +pub(crate) mod pthread; +pub(crate) mod sys; +pub(crate) mod unistd; diff --git a/thirdparty/crates/libc-0.2.186/src/new/bionic_libc/pthread.rs b/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/pthread.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/bionic_libc/pthread.rs rename to thirdparty/crates/libc-0.2.189/src/new/bionic_libc/pthread.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/bionic_libc/sys/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/sys/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/bionic_libc/sys/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/bionic_libc/sys/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/bionic_libc/sys/socket.rs b/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/sys/socket.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/bionic_libc/sys/socket.rs rename to thirdparty/crates/libc-0.2.189/src/new/bionic_libc/sys/socket.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/bionic_libc/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/bionic_libc/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/bionic_libc/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/bionic_libc/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/common/bsd.rs b/thirdparty/crates/libc-0.2.189/src/new/common/bsd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/common/bsd.rs rename to thirdparty/crates/libc-0.2.189/src/new/common/bsd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/common/freebsd_like.rs b/thirdparty/crates/libc-0.2.189/src/new/common/freebsd_like.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/common/freebsd_like.rs rename to thirdparty/crates/libc-0.2.189/src/new/common/freebsd_like.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/common/linux_like/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/common/linux_like/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/common/linux_like/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/common/linux_like/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/common/linux_like/pthread.rs b/thirdparty/crates/libc-0.2.189/src/new/common/linux_like/pthread.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/common/linux_like/pthread.rs rename to thirdparty/crates/libc-0.2.189/src/new/common/linux_like/pthread.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/common/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/common/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/common/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/common/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/common/netbsd_like.rs b/thirdparty/crates/libc-0.2.189/src/new/common/netbsd_like.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/common/netbsd_like.rs rename to thirdparty/crates/libc-0.2.189/src/new/common/netbsd_like.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/common/posix/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/common/posix/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/common/posix/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/common/posix/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/common/posix/pthread.rs b/thirdparty/crates/libc-0.2.189/src/new/common/posix/pthread.rs similarity index 97% rename from thirdparty/crates/libc-0.2.186/src/new/common/posix/pthread.rs rename to thirdparty/crates/libc-0.2.189/src/new/common/posix/pthread.rs index 17d390669..b50c21fe6 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/common/posix/pthread.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/common/posix/pthread.rs @@ -187,7 +187,12 @@ extern "C" { // FIXME(reorg): In recent POSIX versions, this is a signal.h function and not required // in pthread. - #[cfg(any(target_os = "android", target_os = "l4re", target_os = "linux"))] + #[cfg(any( + target_os = "android", + target_os = "emscripten", + target_os = "l4re", + target_os = "linux" + ))] pub fn pthread_kill(thread: crate::pthread_t, sig: c_int) -> c_int; #[cfg(all(target_os = "linux", not(target_env = "ohos")))] @@ -298,7 +303,12 @@ extern "C" { // FIXME(reorg): In recent POSIX versions, this is a signal.h function and not required // in pthread. - #[cfg(any(target_os = "android", target_os = "l4re", target_os = "linux"))] + #[cfg(any( + target_os = "android", + target_os = "emscripten", + target_os = "l4re", + target_os = "linux" + ))] pub fn pthread_sigmask( how: c_int, set: *const crate::sigset_t, diff --git a/thirdparty/crates/libc-0.2.186/src/new/common/posix/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/common/posix/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/common/posix/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/common/posix/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/common/solarish.rs b/thirdparty/crates/libc-0.2.189/src/new/common/solarish.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/common/solarish.rs rename to thirdparty/crates/libc-0.2.189/src/new/common/solarish.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/cygwin/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/cygwin/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/cygwin/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/cygwin/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/cygwin/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/cygwin/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/cygwin/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/cygwin/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/dragonfly/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/dragonfly/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/dragonfly/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/dragonfly/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/dragonfly/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/dragonfly/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/dragonfly/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/dragonfly/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/emscripten/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/emscripten/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/emscripten/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/emscripten/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/emscripten/pthread.rs b/thirdparty/crates/libc-0.2.189/src/new/emscripten/pthread.rs similarity index 91% rename from thirdparty/crates/libc-0.2.186/src/new/emscripten/pthread.rs rename to thirdparty/crates/libc-0.2.189/src/new/emscripten/pthread.rs index 21982b797..cfd7a05a2 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/emscripten/pthread.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/emscripten/pthread.rs @@ -8,7 +8,9 @@ pub use crate::new::common::posix::pthread::{ pthread_condattr_setclock, pthread_condattr_setpshared, pthread_create, + pthread_kill, pthread_mutexattr_setpshared, pthread_rwlockattr_getpshared, pthread_rwlockattr_setpshared, + pthread_sigmask, }; diff --git a/thirdparty/crates/libc-0.2.186/src/new/emscripten/sched.rs b/thirdparty/crates/libc-0.2.189/src/new/emscripten/sched.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/emscripten/sched.rs rename to thirdparty/crates/libc-0.2.189/src/new/emscripten/sched.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/emscripten/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/emscripten/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/emscripten/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/emscripten/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/espidf/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/espidf/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/espidf/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/espidf/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/freebsd/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/freebsd/mod.rs similarity index 84% rename from thirdparty/crates/libc-0.2.186/src/new/freebsd/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/freebsd/mod.rs index eedf235d1..c0036c2a4 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/freebsd/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/freebsd/mod.rs @@ -3,5 +3,7 @@ //! * Headers: //! * Symbol map: +pub(crate) mod net; +pub(crate) mod netinet6; pub(crate) mod sys; pub(crate) mod unistd; diff --git a/thirdparty/crates/libc-0.2.189/src/new/freebsd/net/dlt.rs b/thirdparty/crates/libc-0.2.189/src/new/freebsd/net/dlt.rs new file mode 100644 index 000000000..e3dddce93 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/freebsd/net/dlt.rs @@ -0,0 +1,20 @@ +//! Header: `net/dlt.h` +//! +//! https://github.com/freebsd/freebsd-src/blob/main/sys/net/dlt.h + +use crate::prelude::*; + +pub const DLT_NULL: c_uint = 0; // no link-layer encapsulation +pub const DLT_EN10MB: c_uint = 1; // Ethernet (10Mb) +pub const DLT_EN3MB: c_uint = 2; // Experimental Ethernet (3Mb) +pub const DLT_AX25: c_uint = 3; // Amateur Radio AX.25 +pub const DLT_PRONET: c_uint = 4; // Proteon ProNET Token Ring +pub const DLT_CHAOS: c_uint = 5; // Chaos +pub const DLT_IEEE802: c_uint = 6; // IEEE 802 Networks +pub const DLT_ARCNET: c_uint = 7; // ARCNET +pub const DLT_SLIP: c_uint = 8; // Serial Line IP +pub const DLT_PPP: c_uint = 9; // Point-to-point Protocol +pub const DLT_FDDI: c_uint = 10; // FDDI +pub const DLT_ATM_RFC1483: c_uint = 11; // LLC/SNAP encapsulated atm +pub const DLT_RAW: c_uint = 12; // raw IP +pub const DLT_LOOP: c_uint = 108; diff --git a/thirdparty/crates/libc-0.2.189/src/new/freebsd/net/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/freebsd/net/mod.rs new file mode 100644 index 000000000..e270c5493 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/freebsd/net/mod.rs @@ -0,0 +1,5 @@ +//! Directory: `net/` +//! +//! https://github.com/freebsd/freebsd-src/tree/main/sys/net + +pub(crate) mod dlt; diff --git a/thirdparty/crates/libc-0.2.189/src/new/freebsd/netinet6/in6_var.rs b/thirdparty/crates/libc-0.2.189/src/new/freebsd/netinet6/in6_var.rs new file mode 100644 index 000000000..f9e45306b --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/freebsd/netinet6/in6_var.rs @@ -0,0 +1,107 @@ +//! Header: `netinet6/in6_var.h` +//! +//! https://github.com/freebsd/freebsd-src/blob/main/sys/netinet6/in6_var.h + +use crate::prelude::*; +use crate::sys::ioccom::*; + +s! { + pub struct in6_addrlifetime { + pub ia6t_expire: crate::time_t, + pub ia6t_preferred: crate::time_t, + pub ia6t_vltime: u32, + pub ia6t_pltime: u32, + } + + pub struct in6_ifstat { + pub ifs6_in_receive: u64, + pub ifs6_in_hdrerr: u64, + pub ifs6_in_toobig: u64, + pub ifs6_in_noroute: u64, + pub ifs6_in_addrerr: u64, + pub ifs6_in_protounknown: u64, + pub ifs6_in_truncated: u64, + pub ifs6_in_discard: u64, + pub ifs6_in_deliver: u64, + pub ifs6_out_forward: u64, + pub ifs6_out_request: u64, + pub ifs6_out_discard: u64, + pub ifs6_out_fragok: u64, + pub ifs6_out_fragfail: u64, + pub ifs6_out_fragcreat: u64, + pub ifs6_reass_reqd: u64, + pub ifs6_reass_ok: u64, + pub ifs6_reass_fail: u64, + pub ifs6_in_mcast: u64, + pub ifs6_out_mcast: u64, + } + + pub struct icmp6_ifstat { + pub ifs6_in_msg: u64, + pub ifs6_in_error: u64, + pub ifs6_in_dstunreach: u64, + pub ifs6_in_adminprohib: u64, + pub ifs6_in_timeexceed: u64, + pub ifs6_in_paramprob: u64, + pub ifs6_in_pkttoobig: u64, + pub ifs6_in_echo: u64, + pub ifs6_in_echoreply: u64, + pub ifs6_in_routersolicit: u64, + pub ifs6_in_routeradvert: u64, + pub ifs6_in_neighborsolicit: u64, + pub ifs6_in_neighboradvert: u64, + pub ifs6_in_redirect: u64, + pub ifs6_in_mldquery: u64, + pub ifs6_in_mldreport: u64, + pub ifs6_in_mlddone: u64, + pub ifs6_out_msg: u64, + pub ifs6_out_error: u64, + pub ifs6_out_dstunreach: u64, + pub ifs6_out_adminprohib: u64, + pub ifs6_out_timeexceed: u64, + pub ifs6_out_paramprob: u64, + pub ifs6_out_pkttoobig: u64, + pub ifs6_out_echo: u64, + pub ifs6_out_echoreply: u64, + pub ifs6_out_routersolicit: u64, + pub ifs6_out_routeradvert: u64, + pub ifs6_out_neighborsolicit: u64, + pub ifs6_out_neighboradvert: u64, + pub ifs6_out_redirect: u64, + pub ifs6_out_mldquery: u64, + pub ifs6_out_mldreport: u64, + pub ifs6_out_mlddone: u64, + } +} + +s_no_extra_traits! { + pub struct in6_ifreq { + pub ifr_name: [c_char; crate::IFNAMSIZ], + pub ifr_ifru: __c_anonymous_ifr_ifru6, + } + + pub union __c_anonymous_ifr_ifru6 { + pub ifru_addr: crate::sockaddr_in6, + pub ifru_dstaddr: crate::sockaddr_in6, + pub ifru_flags: c_int, + pub ifru_flags6: c_int, + pub ifru_metric: c_int, + pub ifru_data: crate::caddr_t, + pub ifru_lifetime: in6_addrlifetime, + pub ifru_stat: in6_ifstat, + pub ifru_icmp6stat: icmp6_ifstat, + pub ifru_scope_id: [u32; 16], + } +} + +pub const IN6_IFF_ANYCAST: c_int = 0x01; +pub const IN6_IFF_TENTATIVE: c_int = 0x02; +pub const IN6_IFF_DUPLICATED: c_int = 0x04; +pub const IN6_IFF_DETACHED: c_int = 0x08; +pub const IN6_IFF_DEPRECATED: c_int = 0x10; +pub const IN6_IFF_NODAD: c_int = 0x20; +pub const IN6_IFF_AUTOCONF: c_int = 0x40; +pub const IN6_IFF_TEMPORARY: c_int = 0x80; +pub const IN6_IFF_PREFER_SOURCE: c_int = 0x0100; + +pub const SIOCGIFAFLAG_IN6: c_ulong = _IOWR::('i' as c_ulong, 73); diff --git a/thirdparty/crates/libc-0.2.189/src/new/freebsd/netinet6/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/freebsd/netinet6/mod.rs new file mode 100644 index 000000000..848e809aa --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/freebsd/netinet6/mod.rs @@ -0,0 +1,5 @@ +//! Directory: `netinet6/` +//! +//! https://github.com/freebsd/freebsd-src/tree/main/sys/netinet6 + +pub(crate) mod in6_var; diff --git a/thirdparty/crates/libc-0.2.186/src/new/freebsd/sys/file.rs b/thirdparty/crates/libc-0.2.189/src/new/freebsd/sys/file.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/freebsd/sys/file.rs rename to thirdparty/crates/libc-0.2.189/src/new/freebsd/sys/file.rs diff --git a/thirdparty/crates/libc-0.2.189/src/new/freebsd/sys/ioccom.rs b/thirdparty/crates/libc-0.2.189/src/new/freebsd/sys/ioccom.rs new file mode 100644 index 000000000..64261b906 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/freebsd/sys/ioccom.rs @@ -0,0 +1,49 @@ +//! Header: `sys/ioccom.h` +//! +//! https://github.com/freebsd/freebsd-src/blob/main/sys/sys/ioccom.h + +use crate::prelude::*; + +const IOCPARM_SHIFT: c_ulong = 13; +const IOCPARM_MASK: c_ulong = (1 << IOCPARM_SHIFT) - 1; + +const IOCPARM_MAX: c_ulong = 1 << IOCPARM_SHIFT; + +pub(crate) const IOC_VOID: c_ulong = 0x20000000; +pub(crate) const IOC_OUT: c_ulong = 0x40000000; +pub(crate) const IOC_IN: c_ulong = 0x80000000; +pub(crate) const IOC_INOUT: c_ulong = IOC_IN | IOC_OUT; +pub(crate) const IOC_DIRMASK: c_ulong = IOC_VOID | IOC_OUT | IOC_IN; + +pub(crate) const fn _IOC(inout: c_ulong, group: c_ulong, num: c_ulong, len: c_ulong) -> c_ulong { + debug_assert!(inout <= IOC_DIRMASK); + debug_assert!(group <= 0xff); + debug_assert!(num <= 0xff); + debug_assert!(len <= IOCPARM_MAX); + + inout | ((len & IOCPARM_MASK) << 16) | (group << 8) | num +} + +pub const fn _IO(g: c_ulong, n: c_ulong) -> c_ulong { + _IOC(IOC_VOID, g, n, 0) +} + +/// Build an ioctl number for an ioctl that passes an `int` by value. +pub const fn _IOWINT(g: c_ulong, n: c_ulong) -> c_ulong { + _IOC(IOC_VOID, g, n, mem::size_of::() as c_ulong) +} + +/// Build an ioctl number for an read-only ioctl. +pub const fn _IOR(g: c_ulong, n: c_ulong) -> c_ulong { + _IOC(IOC_OUT, g, n, mem::size_of::() as c_ulong) +} + +/// Build an ioctl number for an write-only ioctl. +pub const fn _IOW(g: c_ulong, n: c_ulong) -> c_ulong { + _IOC(IOC_IN, g, n, mem::size_of::() as c_ulong) +} + +/// Build an ioctl number for a read-write ioctl. +pub const fn _IOWR(g: c_ulong, n: c_ulong) -> c_ulong { + _IOC(IOC_INOUT, g, n, mem::size_of::() as c_ulong) +} diff --git a/thirdparty/crates/libc-0.2.186/src/new/freebsd/sys/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/freebsd/sys/mod.rs similarity index 70% rename from thirdparty/crates/libc-0.2.186/src/new/freebsd/sys/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/freebsd/sys/mod.rs index 210e67407..4afb1d48b 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/freebsd/sys/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/freebsd/sys/mod.rs @@ -3,3 +3,5 @@ //! https://github.com/freebsd/freebsd-src/tree/main/sys/sys' pub(crate) mod file; +pub(crate) mod ioccom; +pub(crate) mod socket; diff --git a/thirdparty/crates/libc-0.2.189/src/new/freebsd/sys/socket.rs b/thirdparty/crates/libc-0.2.189/src/new/freebsd/sys/socket.rs new file mode 100644 index 000000000..ba528729d --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/freebsd/sys/socket.rs @@ -0,0 +1,7 @@ +//! Header: `sys/socket.h` +//! +//! https://github.com/freebsd/freebsd-src/blob/main/sys/sys/socket.h + +use crate::prelude::*; + +pub const SO_RERROR: c_int = 0x0002_0000; diff --git a/thirdparty/crates/libc-0.2.186/src/new/freebsd/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/freebsd/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/freebsd/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/freebsd/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/fuchsia/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/fuchsia/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/fuchsia/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/fuchsia/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/fuchsia/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/fuchsia/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/fuchsia/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/fuchsia/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/glibc/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/mod.rs similarity index 85% rename from thirdparty/crates/libc-0.2.186/src/new/glibc/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/glibc/mod.rs index 71d979b17..e11c026f3 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/glibc/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/mod.rs @@ -21,6 +21,9 @@ mod sysdeps { #[cfg(target_os = "linux")] pub(crate) mod nptl; pub(crate) mod unix; + + // You'll notice some directories that provide a `bits` module. These are included via + // `path = "..."` wherever the generic implementation lives. } pub(crate) use posix::*; diff --git a/thirdparty/crates/libc-0.2.186/src/new/glibc/posix/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/posix/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/glibc/posix/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/glibc/posix/unistd.rs diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/mips/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/mips/mod.rs new file mode 100644 index 000000000..03c3cc3fb --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/mips/mod.rs @@ -0,0 +1,6 @@ +//! Directory: `sysdeps/mips` + +#[cfg(target_os = "linux")] +pub(crate) mod nptl { + pub(crate) mod bits; +} diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/mips/nptl/bits/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/mips/nptl/bits/mod.rs new file mode 100644 index 000000000..2da22c3e6 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/mips/nptl/bits/mod.rs @@ -0,0 +1,3 @@ +//! Directory: `sysdeps/mips/nptl/bits` + +pub(crate) mod struct_mutex; diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/mips/nptl/bits/struct_mutex.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/mips/nptl/bits/struct_mutex.rs new file mode 100644 index 000000000..11d0dc09c --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/mips/nptl/bits/struct_mutex.rs @@ -0,0 +1,19 @@ +//! Header: `sysdeps/mips/nptl/bits/struct_mutex.h` + +use crate::prelude::*; + +pub const fn __PTHREAD_MUTEX_INITIALIZER(__kind: c_int) -> crate::pthread_mutex_t { + // We don't need the whole complicated `__pthread_mutex_s` definition, just use the + // offset of the `__kind` field. + let kind_offset = if cfg!(target_abi = "abi64") { + 4 * size_of::() + } else { + 3 * size_of::() + }; + + let size = [0; crate::__SIZEOF_PTHREAD_MUTEX_T]; + let kind_bytes = __kind.to_ne_bytes(); + let repl = u8_slice_cast_char_slice(&kind_bytes); + let size = replace_array_items(size, repl, kind_offset); + crate::pthread_mutex_t { size } +} diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/nptl/bits/struct_mutex.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/nptl/bits/struct_mutex.rs new file mode 100644 index 000000000..451f86cd3 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/nptl/bits/struct_mutex.rs @@ -0,0 +1,20 @@ +//! Header: `sysdeps/nptl/bits/struct_mutex.h` + +use crate::prelude::*; + +pub const fn __PTHREAD_MUTEX_INITIALIZER(__kind: c_int) -> crate::pthread_mutex_t { + // We don't need the whole complicated `__pthread_mutex_s` definition, just use the + // offset of the `__kind` field. + let __PTHREAD_MUTEX_HAVE_PREV = cfg!(target_pointer_width = "64"); + let kind_offset = if __PTHREAD_MUTEX_HAVE_PREV { + 4 * size_of::() + } else { + 3 * size_of::() + }; + + let size = [0; crate::__SIZEOF_PTHREAD_MUTEX_T]; + let kind_bytes = __kind.to_ne_bytes(); + let repl = u8_slice_cast_char_slice(&kind_bytes); + let size = replace_array_items(size, repl, kind_offset); + crate::pthread_mutex_t { size } +} diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/nptl/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/nptl/mod.rs new file mode 100644 index 000000000..92b8e9a22 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/nptl/mod.rs @@ -0,0 +1,29 @@ +//! Source directory: `sysdeps/nptl/`o +//! +//! Native POSIX threading library. +//! +//! + +pub(crate) mod bits { + #[cfg_attr( + any( + target_arch = "mips", + target_arch = "mips32r6", + target_arch = "mips", + target_arch = "mips32r6", + ), + path = "../../mips/nptl/bits/struct_mutex.rs" + )] + #[cfg_attr( + any(target_arch = "powerpc", target_arch = "powerpc64"), + path = "../../powerpc/nptl/bits/struct_mutex.rs" + )] + #[cfg_attr(target_arch = "s390x", path = "../../s390/nptl/bits/struct_mutex.rs")] + #[cfg_attr( + any(target_arch = "x86", target_arch = "x86_64"), + path = "../../x86/nptl/bits/struct_mutex.rs" + )] + pub(crate) mod struct_mutex; +} + +pub(crate) mod pthread; diff --git a/thirdparty/crates/libc-0.2.186/src/new/glibc/sysdeps/nptl/pthread.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/nptl/pthread.rs similarity index 68% rename from thirdparty/crates/libc-0.2.186/src/new/glibc/sysdeps/nptl/pthread.rs rename to thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/nptl/pthread.rs index 27b17285b..cefc9e300 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/glibc/sysdeps/nptl/pthread.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/nptl/pthread.rs @@ -2,6 +2,28 @@ //! //! +use super::bits::struct_mutex::*; +use crate::prelude::*; + +c_enum! { + #[repr(c_int)] + enum #anon { + PTHREAD_MUTEX_TIMED_NP, + PTHREAD_MUTEX_RECURSIVE_NP, + PTHREAD_MUTEX_ERRORCHECK_NP, + pub PTHREAD_MUTEX_ADAPTIVE_NP, + } +} + +pub const PTHREAD_MUTEX_INITIALIZER: crate::pthread_mutex_t = + __PTHREAD_MUTEX_INITIALIZER(PTHREAD_MUTEX_TIMED_NP); +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = + __PTHREAD_MUTEX_INITIALIZER(PTHREAD_MUTEX_RECURSIVE_NP); +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = + __PTHREAD_MUTEX_INITIALIZER(PTHREAD_MUTEX_ERRORCHECK_NP); +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = + __PTHREAD_MUTEX_INITIALIZER(PTHREAD_MUTEX_ADAPTIVE_NP); + pub use crate::new::common::linux_like::pthread::{ pthread_getaffinity_np, pthread_getattr_np, diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/powerpc/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/powerpc/mod.rs new file mode 100644 index 000000000..eed0adc6c --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/powerpc/mod.rs @@ -0,0 +1,6 @@ +//! Directory: `sysdeps/powerpc` + +#[cfg(target_os = "linux")] +pub(crate) mod nptl { + pub(crate) mod bits; +} diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/powerpc/nptl/bits/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/powerpc/nptl/bits/mod.rs new file mode 100644 index 000000000..7af82d2a5 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/powerpc/nptl/bits/mod.rs @@ -0,0 +1,3 @@ +//! Directory: `sysdeps/powerpc/nptl/bits` + +pub(crate) mod struct_mutex; diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/powerpc/nptl/bits/struct_mutex.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/powerpc/nptl/bits/struct_mutex.rs new file mode 100644 index 000000000..65d4deb62 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/powerpc/nptl/bits/struct_mutex.rs @@ -0,0 +1,19 @@ +//! Header: `sysdeps/powerpc/nptl/bits/struct_mutex.h` + +use crate::prelude::*; + +pub const fn __PTHREAD_MUTEX_INITIALIZER(__kind: c_int) -> crate::pthread_mutex_t { + // We don't need the whole complicated `__pthread_mutex_s` definition, just use the + // offset of the `__kind` field. + let kind_offset = if cfg!(target_pointer_width = "64") { + 4 * size_of::() + } else { + 3 * size_of::() + }; + + let size = [0; crate::__SIZEOF_PTHREAD_MUTEX_T]; + let kind_bytes = __kind.to_ne_bytes(); + let repl = u8_slice_cast_char_slice(&kind_bytes); + let size = replace_array_items(size, repl, kind_offset); + crate::pthread_mutex_t { size } +} diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/s390/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/s390/mod.rs new file mode 100644 index 000000000..ced44ecca --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/s390/mod.rs @@ -0,0 +1,6 @@ +//! Directory: `sysdeps/s390` + +#[cfg(target_os = "linux")] +pub(crate) mod nptl { + pub(crate) mod bits; +} diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/s390/nptl/bits/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/s390/nptl/bits/mod.rs new file mode 100644 index 000000000..1283f09ca --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/s390/nptl/bits/mod.rs @@ -0,0 +1,3 @@ +//! Directory: `sysdeps/s390/nptl/bits` + +pub(crate) mod struct_mutex; diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/s390/nptl/bits/struct_mutex.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/s390/nptl/bits/struct_mutex.rs new file mode 100644 index 000000000..3962cac2f --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/s390/nptl/bits/struct_mutex.rs @@ -0,0 +1,19 @@ +//! Header: `sysdeps/s390/nptl/bits/struct_mutex.h` + +use crate::prelude::*; + +pub const fn __PTHREAD_MUTEX_INITIALIZER(__kind: c_int) -> crate::pthread_mutex_t { + // We don't need the whole complicated `__pthread_mutex_s` definition, just use the + // offset of the `__kind` field. + let kind_offset = if cfg!(target_pointer_width = "64") { + 4 * size_of::() + } else { + 3 * size_of::() + }; + + let size = [0; crate::__SIZEOF_PTHREAD_MUTEX_T]; + let kind_bytes = __kind.to_ne_bytes(); + let repl = u8_slice_cast_char_slice(&kind_bytes); + let size = replace_array_items(size, repl, kind_offset); + crate::pthread_mutex_t { size } +} diff --git a/thirdparty/crates/libc-0.2.186/src/new/glibc/sysdeps/unix/linux/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/unix/linux/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/glibc/sysdeps/unix/linux/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/unix/linux/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/glibc/sysdeps/unix/linux/net/route.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/unix/linux/net/route.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/glibc/sysdeps/unix/linux/net/route.rs rename to thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/unix/linux/net/route.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/glibc/sysdeps/unix/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/unix/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/glibc/sysdeps/unix/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/unix/mod.rs diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/x86/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/x86/mod.rs new file mode 100644 index 000000000..0da2b18b7 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/x86/mod.rs @@ -0,0 +1,6 @@ +//! Directory: `sysdeps/x86` + +#[cfg(target_os = "linux")] +pub(crate) mod nptl { + pub(crate) mod bits; +} diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/x86/nptl/bits/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/x86/nptl/bits/mod.rs new file mode 100644 index 000000000..e6c5e5b5a --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/x86/nptl/bits/mod.rs @@ -0,0 +1,3 @@ +//! Directory: `sysdeps/x86/nptl/bits` + +pub(crate) mod struct_mutex; diff --git a/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/x86/nptl/bits/struct_mutex.rs b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/x86/nptl/bits/struct_mutex.rs new file mode 100644 index 000000000..7e2c675ef --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/glibc/sysdeps/x86/nptl/bits/struct_mutex.rs @@ -0,0 +1,19 @@ +//! Header: `sysdeps/x86/nptl/bits/struct_mutex.h` + +use crate::prelude::*; + +pub const fn __PTHREAD_MUTEX_INITIALIZER(__kind: c_int) -> crate::pthread_mutex_t { + // We don't need the whole complicated `__pthread_mutex_s` definition, just use the + // offset of the `__kind` field. + let kind_offset = if cfg!(target_pointer_width = "64") { + 4 * size_of::() + } else { + 3 * size_of::() + }; + + let size = [0; crate::__SIZEOF_PTHREAD_MUTEX_T]; + let kind_bytes = __kind.to_ne_bytes(); + let repl = u8_slice_cast_char_slice(&kind_bytes); + let size = replace_array_items(size, repl, kind_offset); + crate::pthread_mutex_t { size } +} diff --git a/thirdparty/crates/libc-0.2.186/src/new/haiku/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/haiku/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/haiku/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/haiku/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/haiku/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/haiku/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/haiku/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/haiku/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/hermit_abi/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/hermit_abi/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/hermit_abi/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/hermit_abi/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/horizon/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/horizon/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/horizon/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/horizon/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/hurd/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/hurd/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/hurd/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/hurd/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/illumos/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/illumos/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/illumos/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/illumos/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/illumos/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/illumos/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/illumos/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/illumos/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/l4re/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/l4re/mod.rs similarity index 80% rename from thirdparty/crates/libc-0.2.186/src/new/l4re/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/l4re/mod.rs index cbf725f40..1c5c8855e 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/l4re/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/l4re/mod.rs @@ -1,3 +1,5 @@ //! L4re. //! //! * Headers: + +pub(crate) mod packet; diff --git a/thirdparty/crates/libc-0.2.189/src/new/l4re/packet.rs b/thirdparty/crates/libc-0.2.189/src/new/l4re/packet.rs new file mode 100644 index 000000000..f9df7997f --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/l4re/packet.rs @@ -0,0 +1,29 @@ +//! Header: `netpacket/packet.h` + +use crate::prelude::*; + +pub const PACKET_HOST: c_uchar = 0; +pub const PACKET_BROADCAST: c_uchar = 1; +pub const PACKET_MULTICAST: c_uchar = 2; +pub const PACKET_OTHERHOST: c_uchar = 3; +pub const PACKET_OUTGOING: c_uchar = 4; +pub const PACKET_LOOPBACK: c_uchar = 5; + +pub const PACKET_ADD_MEMBERSHIP: c_int = 1; +pub const PACKET_DROP_MEMBERSHIP: c_int = 2; +pub const PACKET_RECV_OUTPUT: c_int = 3; +pub const PACKET_RX_RING: c_int = 5; +pub const PACKET_STATISTICS: c_int = 6; + +s! { + pub struct packet_mreq { + pub mr_ifindex: c_int, + pub mr_type: c_ushort, + pub mr_alen: c_ushort, + pub mr_address: [c_uchar; 8], + } +} + +pub const PACKET_MR_MULTICAST: c_int = 0; +pub const PACKET_MR_PROMISC: c_int = 1; +pub const PACKET_MR_ALLMULTI: c_int = 2; diff --git a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can.rs rename to thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can/bcm.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can/bcm.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can/bcm.rs rename to thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can/bcm.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can/error.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can/error.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can/error.rs rename to thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can/error.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can/j1939.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can/j1939.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can/j1939.rs rename to thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can/j1939.rs index fdf425ce6..7f132b89f 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can/j1939.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can/j1939.rs @@ -57,4 +57,6 @@ s! { } } +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const J1939_FILTER_MAX: c_int = 512; diff --git a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can/netlink.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can/netlink.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can/netlink.rs rename to thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can/netlink.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can/raw.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can/raw.rs similarity index 82% rename from thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can/raw.rs rename to thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can/raw.rs index 470334bd5..217badf21 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/can/raw.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/can/raw.rs @@ -3,6 +3,9 @@ pub use crate::linux::can::*; pub const SOL_CAN_RAW: c_int = SOL_CAN_BASE + CAN_RAW; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const CAN_RAW_FILTER_MAX: c_int = 512; // FIXME(cleanup): use `c_enum!`, which needs to be adapted to allow omitting a type. diff --git a/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/futex.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/futex.rs new file mode 100644 index 000000000..893dee0e0 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/futex.rs @@ -0,0 +1,73 @@ +//! Header: `linux/futex.h` + +use crate::prelude::*; + +pub const FUTEX_WAIT: c_int = 0; +pub const FUTEX_WAKE: c_int = 1; +pub const FUTEX_FD: c_int = 2; +pub const FUTEX_REQUEUE: c_int = 3; +pub const FUTEX_CMP_REQUEUE: c_int = 4; +pub const FUTEX_WAKE_OP: c_int = 5; +pub const FUTEX_LOCK_PI: c_int = 6; +pub const FUTEX_UNLOCK_PI: c_int = 7; +pub const FUTEX_TRYLOCK_PI: c_int = 8; +pub const FUTEX_WAIT_BITSET: c_int = 9; +pub const FUTEX_WAKE_BITSET: c_int = 10; +pub const FUTEX_WAIT_REQUEUE_PI: c_int = 11; +pub const FUTEX_CMP_REQUEUE_PI: c_int = 12; +pub const FUTEX_LOCK_PI2: c_int = 13; + +pub const FUTEX_PRIVATE_FLAG: c_int = 128; +pub const FUTEX_CLOCK_REALTIME: c_int = 256; + +pub const FUTEX_CMD_MASK: c_int = !(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME); + +pub const FUTEX2_SIZE_U8: c_int = 0x00; +pub const FUTEX2_SIZE_U16: c_int = 0x01; +pub const FUTEX2_SIZE_U32: c_int = 0x02; +pub const FUTEX2_SIZE_U64: c_int = 0x03; +pub const FUTEX2_NUMA: c_int = 0x04; +pub const FUTEX2_PRIVATE: c_int = FUTEX_PRIVATE_FLAG; +pub const FUTEX2_SIZE_MASK: c_int = 0x03; + +#[deprecated( + since = "0.2.187", + note = "UAPI headers indicate this should not be used" +)] +pub const FUTEX_32: c_int = FUTEX2_SIZE_U32; + +pub const FUTEX_WAITV_MAX: c_int = 128; + +s! { + pub struct futex_waitv { + pub val: crate::__u64, + pub uaddr: crate::__u64, + pub flags: crate::__u32, + __reserved: Padding, + } +} + +pub const FUTEX_WAITERS: u32 = 0x80000000; +pub const FUTEX_OWNER_DIED: u32 = 0x40000000; +pub const FUTEX_TID_MASK: u32 = 0x3fffffff; + +pub const FUTEX_BITSET_MATCH_ANY: c_int = u32_cast_int(0xffffffff); + +pub const FUTEX_OP_SET: c_int = 0; +pub const FUTEX_OP_ADD: c_int = 1; +pub const FUTEX_OP_OR: c_int = 2; +pub const FUTEX_OP_ANDN: c_int = 3; +pub const FUTEX_OP_XOR: c_int = 4; + +pub const FUTEX_OP_OPARG_SHIFT: c_int = 8; + +pub const FUTEX_OP_CMP_EQ: c_int = 0; +pub const FUTEX_OP_CMP_NE: c_int = 1; +pub const FUTEX_OP_CMP_LT: c_int = 2; +pub const FUTEX_OP_CMP_LE: c_int = 3; +pub const FUTEX_OP_CMP_GT: c_int = 4; +pub const FUTEX_OP_CMP_GE: c_int = 5; + +pub fn FUTEX_OP(op: c_int, oparg: c_int, cmp: c_int, cmparg: c_int) -> c_int { + ((op & 0xf) << 28) | ((cmp & 0xf) << 24) | ((oparg & 0xfff) << 12) | (cmparg & 0xfff) +} diff --git a/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/if_addr.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/if_addr.rs new file mode 100644 index 000000000..a009f359e --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/if_addr.rs @@ -0,0 +1,37 @@ +//! Header: `uapi/linux/if_addr.h` + +use crate::prelude::*; + +s! { + pub struct ifaddrmsg { + pub ifa_family: u8, + pub ifa_prefixlen: u8, + pub ifa_flags: u8, + pub ifa_scope: u8, + pub ifa_index: u32, + } +} + +pub const IFA_UNSPEC: c_ushort = 0; +pub const IFA_ADDRESS: c_ushort = 1; +pub const IFA_LOCAL: c_ushort = 2; +pub const IFA_LABEL: c_ushort = 3; +pub const IFA_BROADCAST: c_ushort = 4; +pub const IFA_ANYCAST: c_ushort = 5; +pub const IFA_CACHEINFO: c_ushort = 6; +pub const IFA_MULTICAST: c_ushort = 7; +pub const IFA_FLAGS: c_ushort = 8; + +pub const IFA_F_SECONDARY: u32 = 0x01; +pub const IFA_F_TEMPORARY: u32 = 0x01; +pub const IFA_F_NODAD: u32 = 0x02; +pub const IFA_F_OPTIMISTIC: u32 = 0x04; +pub const IFA_F_DADFAILED: u32 = 0x08; +pub const IFA_F_HOMEADDRESS: u32 = 0x10; +pub const IFA_F_DEPRECATED: u32 = 0x20; +pub const IFA_F_TENTATIVE: u32 = 0x40; +pub const IFA_F_PERMANENT: u32 = 0x80; +pub const IFA_F_MANAGETEMPADDR: u32 = 0x100; +pub const IFA_F_NOPREFIXROUTE: u32 = 0x200; +pub const IFA_F_MCAUTOJOIN: u32 = 0x400; +pub const IFA_F_STABLE_PRIVACY: u32 = 0x800; diff --git a/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/if_link.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/if_link.rs new file mode 100644 index 000000000..2c9bb5216 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/if_link.rs @@ -0,0 +1,83 @@ +//! Header: `uapi/linux/if_link.h` + +use crate::prelude::*; + +c_enum! { + #[repr(c_ushort)] + pub enum #anon { + pub IFLA_UNSPEC, + pub IFLA_ADDRESS, + pub IFLA_BROADCAST, + pub IFLA_IFNAME, + pub IFLA_MTU, + pub IFLA_LINK, + pub IFLA_QDISC, + pub IFLA_STATS, + pub IFLA_COST, + pub IFLA_PRIORITY, + pub IFLA_MASTER, + pub IFLA_WIRELESS, + pub IFLA_PROTINFO, + pub IFLA_TXQLEN, + pub IFLA_MAP, + pub IFLA_WEIGHT, + pub IFLA_OPERSTATE, + pub IFLA_LINKMODE, + pub IFLA_LINKINFO, + pub IFLA_NET_NS_PID, + pub IFLA_IFALIAS, + pub IFLA_NUM_VF, + pub IFLA_VFINFO_LIST, + pub IFLA_STATS64, + pub IFLA_VF_PORTS, + pub IFLA_PORT_SELF, + pub IFLA_AF_SPEC, + pub IFLA_GROUP, + pub IFLA_NET_NS_FD, + pub IFLA_EXT_MASK, + pub IFLA_PROMISCUITY, + pub IFLA_NUM_TX_QUEUES, + pub IFLA_NUM_RX_QUEUES, + pub IFLA_CARRIER, + pub IFLA_PHYS_PORT_ID, + pub IFLA_CARRIER_CHANGES, + pub IFLA_PHYS_SWITCH_ID, + pub IFLA_LINK_NETNSID, + pub IFLA_PHYS_PORT_NAME, + pub IFLA_PROTO_DOWN, + pub IFLA_GSO_MAX_SEGS, + pub IFLA_GSO_MAX_SIZE, + pub IFLA_PAD, + pub IFLA_XDP, + pub IFLA_EVENT, + pub IFLA_NEW_NETNSID, + pub IFLA_IF_NETNSID, + pub IFLA_TARGET_NETNSID = IFLA_IF_NETNSID, + pub IFLA_CARRIER_UP_COUNT, + pub IFLA_CARRIER_DOWN_COUNT, + pub IFLA_NEW_IFINDEX, + pub IFLA_MIN_MTU, + pub IFLA_MAX_MTU, + pub IFLA_PROP_LIST, + pub IFLA_ALT_IFNAME, + pub IFLA_PERM_ADDRESS, + pub IFLA_PROTO_DOWN_REASON, + + pub IFLA_PARENT_DEV_NAME, + pub IFLA_PARENT_DEV_BUS_NAME, + pub IFLA_GRO_MAX_SIZE, + pub IFLA_TSO_MAX_SIZE, + pub IFLA_TSO_MAX_SEGS, + pub IFLA_ALLMULTI, + } + + #[repr(c_ushort)] + pub enum #anon { + pub IFLA_INFO_UNSPEC, + pub IFLA_INFO_KIND, + pub IFLA_INFO_DATA, + pub IFLA_INFO_XSTATS, + pub IFLA_INFO_SLAVE_KIND, + pub IFLA_INFO_SLAVE_DATA, + } +} diff --git a/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/if_packet.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/if_packet.rs new file mode 100644 index 000000000..5e99a1227 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/if_packet.rs @@ -0,0 +1,258 @@ +//! Header: `uapi/linux/if_packet.h` + +use crate::prelude::*; + +s! { + #[deprecated(since = "0.2.70", note = "sockaddr_ll type should be used instead")] + pub struct sockaddr_pkt { + pub spkt_family: c_ushort, + pub spkt_device: [c_uchar; 14], + pub spkt_protocol: c_ushort, + } +} + +pub const PACKET_HOST: c_uchar = 0; +pub const PACKET_BROADCAST: c_uchar = 1; +pub const PACKET_MULTICAST: c_uchar = 2; +pub const PACKET_OTHERHOST: c_uchar = 3; +pub const PACKET_OUTGOING: c_uchar = 4; +pub const PACKET_LOOPBACK: c_uchar = 5; +pub const PACKET_USER: c_uchar = 6; +pub const PACKET_KERNEL: c_uchar = 7; + +pub const PACKET_ADD_MEMBERSHIP: c_int = 1; +pub const PACKET_DROP_MEMBERSHIP: c_int = 2; +pub const PACKET_RECV_OUTPUT: c_int = 3; +pub const PACKET_RX_RING: c_int = 5; +pub const PACKET_STATISTICS: c_int = 6; +pub const PACKET_COPY_THRESH: c_int = 7; +pub const PACKET_AUXDATA: c_int = 8; +pub const PACKET_ORIGDEV: c_int = 9; +pub const PACKET_VERSION: c_int = 10; +pub const PACKET_HDRLEN: c_int = 11; +pub const PACKET_RESERVE: c_int = 12; +pub const PACKET_TX_RING: c_int = 13; +pub const PACKET_LOSS: c_int = 14; +pub const PACKET_VNET_HDR: c_int = 15; +pub const PACKET_TX_TIMESTAMP: c_int = 16; +pub const PACKET_TIMESTAMP: c_int = 17; +pub const PACKET_FANOUT: c_int = 18; +pub const PACKET_TX_HAS_OFF: c_int = 19; +pub const PACKET_QDISC_BYPASS: c_int = 20; +pub const PACKET_ROLLOVER_STATS: c_int = 21; +pub const PACKET_FANOUT_DATA: c_int = 22; +pub const PACKET_IGNORE_OUTGOING: c_int = 23; +pub const PACKET_VNET_HDR_SZ: c_int = 24; + +pub const PACKET_FANOUT_HASH: c_uint = 0; +pub const PACKET_FANOUT_LB: c_uint = 1; +pub const PACKET_FANOUT_CPU: c_uint = 2; +pub const PACKET_FANOUT_ROLLOVER: c_uint = 3; +pub const PACKET_FANOUT_RND: c_uint = 4; +pub const PACKET_FANOUT_QM: c_uint = 5; +pub const PACKET_FANOUT_CBPF: c_uint = 6; +pub const PACKET_FANOUT_EBPF: c_uint = 7; +pub const PACKET_FANOUT_FLAG_ROLLOVER: c_uint = 0x1000; +pub const PACKET_FANOUT_FLAG_UNIQUEID: c_uint = 0x2000; +pub const PACKET_FANOUT_FLAG_IGNORE_OUTGOING: c_uint = 0x4000; +pub const PACKET_FANOUT_FLAG_DEFRAG: c_uint = 0x8000; + +s! { + pub struct tpacket_stats { + pub tp_packets: c_uint, + pub tp_drops: c_uint, + } + + pub struct tpacket_stats_v3 { + pub tp_packets: c_uint, + pub tp_drops: c_uint, + pub tp_freeze_q_cnt: c_uint, + } + + #[repr(align(8))] + pub struct tpacket_rollover_stats { + pub tp_all: crate::__u64, + pub tp_huge: crate::__u64, + pub tp_failed: crate::__u64, + } + + pub struct tpacket_auxdata { + pub tp_status: u32, + pub tp_len: u32, + pub tp_snaplen: u32, + pub tp_mac: u16, + pub tp_net: u16, + pub tp_vlan_tci: u16, + pub tp_vlan_tpid: u16, + } +} + +pub const TP_STATUS_KERNEL: u32 = 0; +pub const TP_STATUS_USER: u32 = 1 << 0; +pub const TP_STATUS_COPY: u32 = 1 << 1; +pub const TP_STATUS_LOSING: u32 = 1 << 2; +pub const TP_STATUS_CSUMNOTREADY: u32 = 1 << 3; +pub const TP_STATUS_VLAN_VALID: u32 = 1 << 4; +pub const TP_STATUS_BLK_TMO: u32 = 1 << 5; +pub const TP_STATUS_VLAN_TPID_VALID: u32 = 1 << 6; +pub const TP_STATUS_CSUM_VALID: u32 = 1 << 7; + +pub const TP_STATUS_AVAILABLE: u32 = 0; +pub const TP_STATUS_SEND_REQUEST: u32 = 1 << 0; +pub const TP_STATUS_SENDING: u32 = 1 << 1; +pub const TP_STATUS_WRONG_FORMAT: u32 = 1 << 2; + +pub const TP_STATUS_TS_SOFTWARE: u32 = 1 << 29; +pub const TP_STATUS_TS_SYS_HARDWARE: u32 = 1 << 30; +pub const TP_STATUS_TS_RAW_HARDWARE: u32 = 1 << 31; + +pub const TP_FT_REQ_FILL_RXHASH: u32 = 1; + +s! { + pub struct tpacket_hdr { + pub tp_status: c_ulong, + pub tp_len: c_uint, + pub tp_snaplen: c_uint, + pub tp_mac: c_ushort, + pub tp_net: c_ushort, + pub tp_sec: c_uint, + pub tp_usec: c_uint, + } +} + +pub const TPACKET_ALIGNMENT: usize = 16; +f! { + pub unsafe fn TPACKET_ALIGN(x: usize) -> usize { + (x + TPACKET_ALIGNMENT - 1) & !(TPACKET_ALIGNMENT - 1) + } +} +pub const TPACKET_HDRLEN: usize = ((size_of::() + TPACKET_ALIGNMENT - 1) + & !(TPACKET_ALIGNMENT - 1)) + + size_of::(); + +s! { + pub struct tpacket2_hdr { + pub tp_status: u32, + pub tp_len: u32, + pub tp_snaplen: u32, + pub tp_mac: u16, + pub tp_net: u16, + pub tp_sec: u32, + pub tp_nsec: u32, + pub tp_vlan_tci: u16, + pub tp_vlan_tpid: u16, + pub tp_padding: [u8; 4], + } + + pub struct tpacket_hdr_variant1 { + pub tp_rxhash: u32, + pub tp_vlan_tci: u32, + pub tp_vlan_tpid: u16, + pub tp_padding: u16, + } + + pub struct tpacket3_hdr { + pub tp_next_offset: u32, + pub tp_sec: u32, + pub tp_nsec: u32, + pub tp_snaplen: u32, + pub tp_len: u32, + pub tp_status: u32, + pub tp_mac: u16, + pub tp_net: u16, + pub hv1: tpacket_hdr_variant1, + pub tp_padding: [u8; 8], + } + + pub struct tpacket_bd_ts { + pub ts_sec: c_uint, + pub ts_usec: c_uint, + } + + #[repr(align(8))] + pub struct tpacket_hdr_v1 { + pub block_status: u32, + pub num_pkts: u32, + pub offset_to_first_pkt: u32, + pub blk_len: u32, + pub seq_num: crate::__u64, + pub ts_first_pkt: tpacket_bd_ts, + pub ts_last_pkt: tpacket_bd_ts, + } +} + +s_no_extra_traits! { + pub union tpacket_bd_header_u { + pub bh1: tpacket_hdr_v1, + } + + pub struct tpacket_block_desc { + pub version: u32, + pub offset_to_priv: u32, + pub hdr: tpacket_bd_header_u, + } +} + +pub const TPACKET2_HDRLEN: usize = ((size_of::() + TPACKET_ALIGNMENT - 1) + & !(TPACKET_ALIGNMENT - 1)) + + size_of::(); +pub const TPACKET3_HDRLEN: usize = ((size_of::() + TPACKET_ALIGNMENT - 1) + & !(TPACKET_ALIGNMENT - 1)) + + size_of::(); + +e! { + #[repr(u32)] + pub enum tpacket_versions { + TPACKET_V1, + TPACKET_V2, + TPACKET_V3, + } +} + +s! { + pub struct tpacket_req { + pub tp_block_size: c_uint, + pub tp_block_nr: c_uint, + pub tp_frame_size: c_uint, + pub tp_frame_nr: c_uint, + } + + pub struct tpacket_req3 { + pub tp_block_size: c_uint, + pub tp_block_nr: c_uint, + pub tp_frame_size: c_uint, + pub tp_frame_nr: c_uint, + pub tp_retire_blk_tov: c_uint, + pub tp_sizeof_priv: c_uint, + pub tp_feature_req_word: c_uint, + } +} + +s_no_extra_traits! { + pub union tpacket_req_u { + pub req: tpacket_req, + pub req3: tpacket_req3, + } +} + +s! { + pub struct packet_mreq { + pub mr_ifindex: c_int, + pub mr_type: c_ushort, + pub mr_alen: c_ushort, + pub mr_address: [c_uchar; 8], + } + + pub struct fanout_args { + #[cfg(target_endian = "little")] + pub id: u16, + pub type_flags: u16, + #[cfg(target_endian = "big")] + pub id: u16, + pub max_num_members: u32, + } +} + +pub const PACKET_MR_MULTICAST: c_int = 0; +pub const PACKET_MR_PROMISC: c_int = 1; +pub const PACKET_MR_ALLMULTI: c_int = 2; diff --git a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/keyctl.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/keyctl.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/keyctl.rs rename to thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/keyctl.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/membarrier.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/membarrier.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/membarrier.rs rename to thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/membarrier.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/mod.rs similarity index 54% rename from thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/mod.rs index 09e2c3ece..209454a60 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/mod.rs @@ -3,7 +3,15 @@ //! pub(crate) mod can; +pub(crate) mod futex; +pub(crate) mod if_addr; +pub(crate) mod if_link; +pub(crate) mod if_packet; pub(crate) mod keyctl; pub(crate) mod membarrier; +pub(crate) mod mount; pub(crate) mod netlink; pub(crate) mod pidfd; +pub(crate) mod sctp; +pub(crate) mod tls; +pub(crate) mod types; diff --git a/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/mount.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/mount.rs new file mode 100644 index 000000000..bf736acb4 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/mount.rs @@ -0,0 +1,68 @@ +//! Header: `uapi/linux/mount.h` + +use crate::prelude::*; + +pub const MS_RMT_MASK: c_ulong = crate::MS_RDONLY + | crate::MS_SYNCHRONOUS + | crate::MS_MANDLOCK + | crate::MS_I_VERSION + | crate::MS_LAZYTIME; + +pub const OPEN_TREE_CLONE: c_uint = 0x01; +pub const OPEN_TREE_NAMESPACE: c_uint = 0x02; +pub const OPEN_TREE_CLOEXEC: c_uint = crate::O_CLOEXEC as c_uint; + +pub const MOVE_MOUNT_F_SYMLINKS: c_uint = 0x00000001; +pub const MOVE_MOUNT_F_AUTOMOUNTS: c_uint = 0x00000002; +pub const MOVE_MOUNT_F_EMPTY_PATH: c_uint = 0x00000004; +pub const MOVE_MOUNT_T_SYMLINKS: c_uint = 0x00000010; +pub const MOVE_MOUNT_T_AUTOMOUNTS: c_uint = 0x00000020; +pub const MOVE_MOUNT_T_EMPTY_PATH: c_uint = 0x00000040; +pub const MOVE_MOUNT_SET_GROUP: c_uint = 0x00000100; +pub const MOVE_MOUNT_BENEATH: c_uint = 0x00000200; + +pub const FSOPEN_CLOEXEC: c_uint = 0x00000001; + +pub const FSPICK_CLOEXEC: c_uint = 0x00000001; +pub const FSPICK_SYMLINK_NOFOLLOW: c_uint = 0x00000002; +pub const FSPICK_NO_AUTOMOUNT: c_uint = 0x00000004; +pub const FSPICK_EMPTY_PATH: c_uint = 0x00000008; + +c_enum! { + pub enum fsconfig_command { + pub FSCONFIG_SET_FLAG, + pub FSCONFIG_SET_STRING, + pub FSCONFIG_SET_BINARY, + pub FSCONFIG_SET_PATH, + pub FSCONFIG_SET_PATH_EMPTY, + pub FSCONFIG_SET_FD, + pub FSCONFIG_CMD_CREATE, + pub FSCONFIG_CMD_RECONFIGURE, + pub FSCONFIG_CMD_CREATE_EXCL, + } +} + +pub const FSMOUNT_CLOEXEC: c_uint = 0x00000001; + +pub const MOUNT_ATTR_RDONLY: u64 = 0x00000001; +pub const MOUNT_ATTR_NOSUID: u64 = 0x00000002; +pub const MOUNT_ATTR_NODEV: u64 = 0x00000004; +pub const MOUNT_ATTR_NOEXEC: u64 = 0x00000008; +pub const MOUNT_ATTR__ATIME: u64 = 0x00000070; +pub const MOUNT_ATTR_RELATIME: u64 = 0x00000000; +pub const MOUNT_ATTR_NOATIME: u64 = 0x00000010; +pub const MOUNT_ATTR_STRICTATIME: u64 = 0x00000020; +pub const MOUNT_ATTR_NODIRATIME: u64 = 0x00000080; +pub const MOUNT_ATTR_IDMAP: u64 = 0x00100000; +pub const MOUNT_ATTR_NOSYMFOLLOW: u64 = 0x00200000; + +s! { + pub struct mount_attr { + pub attr_set: crate::__u64, + pub attr_clr: crate::__u64, + pub propagation: crate::__u64, + pub userns_fd: crate::__u64, + } +} + +pub const MOUNT_ATTR_SIZE_VER0: c_int = 32; diff --git a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/netlink.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/netlink.rs similarity index 98% rename from thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/netlink.rs rename to thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/netlink.rs index 03e18d739..eb78ecac9 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/netlink.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/netlink.rs @@ -130,7 +130,7 @@ pub const NLA_TYPE_MASK: c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER); pub const NLA_ALIGNTO: c_int = 4; f! { - pub fn NLA_ALIGN(len: c_int) -> c_int { + pub unsafe fn NLA_ALIGN(len: c_int) -> c_int { return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1); } } diff --git a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/pidfd.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/pidfd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/linux_uapi/linux/pidfd.rs rename to thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/pidfd.rs diff --git a/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/sctp.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/sctp.rs new file mode 100644 index 000000000..3a9ad6d19 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/sctp.rs @@ -0,0 +1,177 @@ +use crate::prelude::*; +use crate::{ + __s32, + __u16, + __u32, +}; + +pub type sctp_assoc_t = __s32; + +pub const SCTP_FUTURE_ASSOC: c_int = 0; +pub const SCTP_CURRENT_ASSOC: c_int = 1; +pub const SCTP_ALL_ASSOC: c_int = 2; + +pub const SCTP_RTOINFO: c_int = 0; +pub const SCTP_ASSOCINFO: c_int = 1; +pub const SCTP_INITMSG: c_int = 2; +pub const SCTP_NODELAY: c_int = 3; +pub const SCTP_AUTOCLOSE: c_int = 4; +pub const SCTP_SET_PEER_PRIMARY_ADDR: c_int = 5; +pub const SCTP_PRIMARY_ADDR: c_int = 6; +pub const SCTP_ADAPTATION_LAYER: c_int = 7; +pub const SCTP_DISABLE_FRAGMENTS: c_int = 8; +pub const SCTP_PEER_ADDR_PARAMS: c_int = 9; +pub const SCTP_DEFAULT_SEND_PARAM: c_int = 10; +pub const SCTP_EVENTS: c_int = 11; +pub const SCTP_I_WANT_MAPPED_V4_ADDR: c_int = 12; +pub const SCTP_MAXSEG: c_int = 13; +pub const SCTP_STATUS: c_int = 14; +pub const SCTP_GET_PEER_ADDR_INFO: c_int = 15; +pub const SCTP_DELAYED_ACK_TIME: c_int = 16; +pub const SCTP_DELAYED_ACK: c_int = SCTP_DELAYED_ACK_TIME; +pub const SCTP_DELAYED_SACK: c_int = SCTP_DELAYED_ACK_TIME; +pub const SCTP_CONTEXT: c_int = 17; +pub const SCTP_FRAGMENT_INTERLEAVE: c_int = 18; +pub const SCTP_PARTIAL_DELIVERY_POINT: c_int = 19; +pub const SCTP_MAX_BURST: c_int = 20; +pub const SCTP_AUTH_CHUNK: c_int = 21; +pub const SCTP_HMAC_IDENT: c_int = 22; +pub const SCTP_AUTH_KEY: c_int = 23; +pub const SCTP_AUTH_ACTIVE_KEY: c_int = 24; +pub const SCTP_AUTH_DELETE_KEY: c_int = 25; +pub const SCTP_PEER_AUTH_CHUNKS: c_int = 26; +pub const SCTP_LOCAL_AUTH_CHUNKS: c_int = 27; +pub const SCTP_GET_ASSOC_NUMBER: c_int = 28; +pub const SCTP_GET_ASSOC_ID_LIST: c_int = 29; +pub const SCTP_AUTO_ASCONF: c_int = 30; +pub const SCTP_PEER_ADDR_THLDS: c_int = 31; +pub const SCTP_RECVRCVINFO: c_int = 32; +pub const SCTP_RECVNXTINFO: c_int = 33; +pub const SCTP_DEFAULT_SNDINFO: c_int = 34; +pub const SCTP_AUTH_DEACTIVATE_KEY: c_int = 35; +pub const SCTP_REUSE_PORT: c_int = 36; +pub const SCTP_PEER_ADDR_THLDS_V2: c_int = 37; + +pub const SCTP_PR_SCTP_NONE: c_int = 0x0000; +pub const SCTP_PR_SCTP_TTL: c_int = 0x0010; +pub const SCTP_PR_SCTP_RTX: c_int = 0x0020; +pub const SCTP_PR_SCTP_PRIO: c_int = 0x0030; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. +pub const SCTP_PR_SCTP_MAX: c_int = SCTP_PR_SCTP_PRIO; +pub const SCTP_PR_SCTP_MASK: c_int = 0x0030; + +f! { + pub unsafe fn SCTP_PR_INDEX(policy: c_int) -> c_int { + policy >> (4 - 1) + } + + pub unsafe fn SCTP_PR_POLICY(policy: c_int) -> c_int { + policy & SCTP_PR_SCTP_MASK + } + + pub unsafe fn SCTP_PR_SET_POLICY(flags: &mut c_int, policy: c_int) -> () { + *flags &= !SCTP_PR_SCTP_MASK; + *flags |= policy; + } +} + +safe_f! { + pub const safe fn SCTP_PR_TTL_ENABLED(policy: c_int) -> bool { + policy == SCTP_PR_SCTP_TTL + } + + pub const safe fn SCTP_PR_RTX_ENABLED(policy: c_int) -> bool { + policy == SCTP_PR_SCTP_RTX + } + + pub const safe fn SCTP_PR_PRIO_ENABLED(policy: c_int) -> bool { + policy == SCTP_PR_SCTP_PRIO + } +} + +pub const SCTP_ENABLE_RESET_STREAM_REQ: c_int = 0x01; +pub const SCTP_ENABLE_RESET_ASSOC_REQ: c_int = 0x02; +pub const SCTP_ENABLE_CHANGE_ASSOC_REQ: c_int = 0x04; +pub const SCTP_ENABLE_STRRESET_MASK: c_int = 0x07; + +pub const SCTP_STREAM_RESET_INCOMING: c_int = 0x01; +pub const SCTP_STREAM_RESET_OUTGOING: c_int = 0x02; + +pub const MSG_NOTIFICATION: c_int = 0x8000; + +s! { + pub struct sctp_initmsg { + pub sinit_num_ostreams: __u16, + pub sinit_max_instreams: __u16, + pub sinit_max_attempts: __u16, + pub sinit_max_init_timeo: __u16, + } + + pub struct sctp_sndrcvinfo { + pub sinfo_stream: __u16, + pub sinfo_ssn: __u16, + pub sinfo_flags: __u16, + pub sinfo_ppid: __u32, + pub sinfo_context: __u32, + pub sinfo_timetolive: __u32, + pub sinfo_tsn: __u32, + pub sinfo_cumtsn: __u32, + pub sinfo_assoc_id: crate::sctp_assoc_t, + } + + pub struct sctp_sndinfo { + pub snd_sid: __u16, + pub snd_flags: __u16, + pub snd_ppid: __u32, + pub snd_context: __u32, + pub snd_assoc_id: crate::sctp_assoc_t, + } + + pub struct sctp_rcvinfo { + pub rcv_sid: __u16, + pub rcv_ssn: __u16, + pub rcv_flags: __u16, + pub rcv_ppid: __u32, + pub rcv_tsn: __u32, + pub rcv_cumtsn: __u32, + pub rcv_context: __u32, + pub rcv_assoc_id: crate::sctp_assoc_t, + } + + pub struct sctp_nxtinfo { + pub nxt_sid: __u16, + pub nxt_flags: __u16, + pub nxt_ppid: __u32, + pub nxt_length: __u32, + pub nxt_assoc_id: crate::sctp_assoc_t, + } + + pub struct sctp_prinfo { + pub pr_policy: __u16, + pub pr_value: __u32, + } + + pub struct sctp_authinfo { + pub auth_keynumber: __u16, + } +} + +pub const SCTP_UNORDERED: c_int = 1 << 0; +pub const SCTP_ADDR_OVER: c_int = 1 << 1; +pub const SCTP_ABORT: c_int = 1 << 2; +pub const SCTP_SACK_IMMEDIATELY: c_int = 1 << 3; +pub const SCTP_SENDALL: c_int = 1 << 6; +pub const SCTP_PR_SCTP_ALL: c_int = 1 << 7; +pub const SCTP_NOTIFICATION: c_int = MSG_NOTIFICATION; +pub const SCTP_EOF: c_int = crate::MSG_FIN; + +pub const SCTP_INIT: c_int = 0; +pub const SCTP_SNDRCV: c_int = 1; +pub const SCTP_SNDINFO: c_int = 2; +pub const SCTP_RCVINFO: c_int = 3; +pub const SCTP_NXTINFO: c_int = 4; +pub const SCTP_PRINFO: c_int = 5; +pub const SCTP_AUTHINFO: c_int = 6; +pub const SCTP_DSTADDRV4: c_int = 7; +pub const SCTP_DSTADDRV6: c_int = 8; diff --git a/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/tls.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/tls.rs new file mode 100644 index 000000000..913a93fd0 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/tls.rs @@ -0,0 +1,177 @@ +//! Header: `uapi/linux/tls.h` + +use crate::prelude::*; +use crate::{ + __u16, + __u8, +}; + +pub const TLS_TX: c_int = 1; +pub const TLS_RX: c_int = 2; +pub const TLS_TX_ZEROCOPY_RO: c_int = 3; +pub const TLS_RX_EXPECT_NO_PAD: c_int = 4; + +pub const TLS_1_2_VERSION_MAJOR: __u8 = 0x3; +pub const TLS_1_2_VERSION_MINOR: __u8 = 0x3; +pub const TLS_1_2_VERSION: __u16 = + ((TLS_1_2_VERSION_MAJOR as __u16) << 8) | (TLS_1_2_VERSION_MINOR as __u16); + +pub const TLS_1_3_VERSION_MAJOR: __u8 = 0x3; +pub const TLS_1_3_VERSION_MINOR: __u8 = 0x4; +pub const TLS_1_3_VERSION: __u16 = + ((TLS_1_3_VERSION_MAJOR as __u16) << 8) | (TLS_1_3_VERSION_MINOR as __u16); + +pub const TLS_CIPHER_AES_GCM_128: __u16 = 51; +pub const TLS_CIPHER_AES_GCM_128_IV_SIZE: usize = 8; +pub const TLS_CIPHER_AES_GCM_128_KEY_SIZE: usize = 16; +pub const TLS_CIPHER_AES_GCM_128_SALT_SIZE: usize = 4; +pub const TLS_CIPHER_AES_GCM_128_TAG_SIZE: usize = 16; +pub const TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE: usize = 8; + +pub const TLS_CIPHER_AES_GCM_256: __u16 = 52; +pub const TLS_CIPHER_AES_GCM_256_IV_SIZE: usize = 8; +pub const TLS_CIPHER_AES_GCM_256_KEY_SIZE: usize = 32; +pub const TLS_CIPHER_AES_GCM_256_SALT_SIZE: usize = 4; +pub const TLS_CIPHER_AES_GCM_256_TAG_SIZE: usize = 16; +pub const TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE: usize = 8; + +pub const TLS_CIPHER_AES_CCM_128: __u16 = 53; +pub const TLS_CIPHER_AES_CCM_128_IV_SIZE: usize = 8; +pub const TLS_CIPHER_AES_CCM_128_KEY_SIZE: usize = 16; +pub const TLS_CIPHER_AES_CCM_128_SALT_SIZE: usize = 4; +pub const TLS_CIPHER_AES_CCM_128_TAG_SIZE: usize = 16; +pub const TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE: usize = 8; + +pub const TLS_CIPHER_CHACHA20_POLY1305: __u16 = 54; +pub const TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE: usize = 12; +pub const TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE: usize = 32; +pub const TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE: usize = 0; +pub const TLS_CIPHER_CHACHA20_POLY1305_TAG_SIZE: usize = 16; +pub const TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE: usize = 8; + +pub const TLS_CIPHER_SM4_GCM: __u16 = 55; +pub const TLS_CIPHER_SM4_GCM_IV_SIZE: usize = 8; +pub const TLS_CIPHER_SM4_GCM_KEY_SIZE: usize = 16; +pub const TLS_CIPHER_SM4_GCM_SALT_SIZE: usize = 4; +pub const TLS_CIPHER_SM4_GCM_TAG_SIZE: usize = 16; +pub const TLS_CIPHER_SM4_GCM_REC_SEQ_SIZE: usize = 8; + +pub const TLS_CIPHER_SM4_CCM: __u16 = 56; +pub const TLS_CIPHER_SM4_CCM_IV_SIZE: usize = 8; +pub const TLS_CIPHER_SM4_CCM_KEY_SIZE: usize = 16; +pub const TLS_CIPHER_SM4_CCM_SALT_SIZE: usize = 4; +pub const TLS_CIPHER_SM4_CCM_TAG_SIZE: usize = 16; +pub const TLS_CIPHER_SM4_CCM_REC_SEQ_SIZE: usize = 8; + +pub const TLS_CIPHER_ARIA_GCM_128: __u16 = 57; +pub const TLS_CIPHER_ARIA_GCM_128_IV_SIZE: usize = 8; +pub const TLS_CIPHER_ARIA_GCM_128_KEY_SIZE: usize = 16; +pub const TLS_CIPHER_ARIA_GCM_128_SALT_SIZE: usize = 4; +pub const TLS_CIPHER_ARIA_GCM_128_TAG_SIZE: usize = 16; +pub const TLS_CIPHER_ARIA_GCM_128_REC_SEQ_SIZE: usize = 8; + +pub const TLS_CIPHER_ARIA_GCM_256: __u16 = 58; +pub const TLS_CIPHER_ARIA_GCM_256_IV_SIZE: usize = 8; +pub const TLS_CIPHER_ARIA_GCM_256_KEY_SIZE: usize = 32; +pub const TLS_CIPHER_ARIA_GCM_256_SALT_SIZE: usize = 4; +pub const TLS_CIPHER_ARIA_GCM_256_TAG_SIZE: usize = 16; +pub const TLS_CIPHER_ARIA_GCM_256_REC_SEQ_SIZE: usize = 8; + +pub const TLS_SET_RECORD_TYPE: c_int = 1; +pub const TLS_GET_RECORD_TYPE: c_int = 2; + +s! { + pub struct tls_crypto_info { + pub version: __u16, + pub cipher_type: __u16, + } + + pub struct tls12_crypto_info_aes_gcm_128 { + pub info: tls_crypto_info, + pub iv: [c_uchar; TLS_CIPHER_AES_GCM_128_IV_SIZE], + pub key: [c_uchar; TLS_CIPHER_AES_GCM_128_KEY_SIZE], + pub salt: [c_uchar; TLS_CIPHER_AES_GCM_128_SALT_SIZE], + pub rec_seq: [c_uchar; TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE], + } + + pub struct tls12_crypto_info_aes_gcm_256 { + pub info: tls_crypto_info, + pub iv: [c_uchar; TLS_CIPHER_AES_GCM_256_IV_SIZE], + pub key: [c_uchar; TLS_CIPHER_AES_GCM_256_KEY_SIZE], + pub salt: [c_uchar; TLS_CIPHER_AES_GCM_256_SALT_SIZE], + pub rec_seq: [c_uchar; TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE], + } + + pub struct tls12_crypto_info_aes_ccm_128 { + pub info: tls_crypto_info, + pub iv: [c_uchar; TLS_CIPHER_AES_CCM_128_IV_SIZE], + pub key: [c_uchar; TLS_CIPHER_AES_CCM_128_KEY_SIZE], + pub salt: [c_uchar; TLS_CIPHER_AES_CCM_128_SALT_SIZE], + pub rec_seq: [c_uchar; TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE], + } + + pub struct tls12_crypto_info_chacha20_poly1305 { + pub info: tls_crypto_info, + pub iv: [c_uchar; TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE], + pub key: [c_uchar; TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE], + pub salt: [c_uchar; TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE], + pub rec_seq: [c_uchar; TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE], + } + + pub struct tls12_crypto_info_sm4_gcm { + pub info: tls_crypto_info, + pub iv: [c_uchar; TLS_CIPHER_SM4_GCM_IV_SIZE], + pub key: [c_uchar; TLS_CIPHER_SM4_GCM_KEY_SIZE], + pub salt: [c_uchar; TLS_CIPHER_SM4_GCM_SALT_SIZE], + pub rec_seq: [c_uchar; TLS_CIPHER_SM4_GCM_REC_SEQ_SIZE], + } + + pub struct tls12_crypto_info_sm4_ccm { + pub info: tls_crypto_info, + pub iv: [c_uchar; TLS_CIPHER_SM4_CCM_IV_SIZE], + pub key: [c_uchar; TLS_CIPHER_SM4_CCM_KEY_SIZE], + pub salt: [c_uchar; TLS_CIPHER_SM4_CCM_SALT_SIZE], + pub rec_seq: [c_uchar; TLS_CIPHER_SM4_CCM_REC_SEQ_SIZE], + } + + pub struct tls12_crypto_info_aria_gcm_128 { + pub info: tls_crypto_info, + pub iv: [c_uchar; TLS_CIPHER_ARIA_GCM_128_IV_SIZE], + pub key: [c_uchar; TLS_CIPHER_ARIA_GCM_128_KEY_SIZE], + pub salt: [c_uchar; TLS_CIPHER_ARIA_GCM_128_SALT_SIZE], + pub rec_seq: [c_uchar; TLS_CIPHER_ARIA_GCM_128_REC_SEQ_SIZE], + } + + pub struct tls12_crypto_info_aria_gcm_256 { + pub info: tls_crypto_info, + pub iv: [c_uchar; TLS_CIPHER_ARIA_GCM_256_IV_SIZE], + pub key: [c_uchar; TLS_CIPHER_ARIA_GCM_256_KEY_SIZE], + pub salt: [c_uchar; TLS_CIPHER_ARIA_GCM_256_SALT_SIZE], + pub rec_seq: [c_uchar; TLS_CIPHER_ARIA_GCM_256_REC_SEQ_SIZE], + } +} + +c_enum! { + // FIXME(1.0): This is an i32 in `libc` but enum reprs are `u32`. + #[repr(c_int)] + pub enum #anon { + pub TLS_INFO_UNSPEC, + pub TLS_INFO_VERSION, + pub TLS_INFO_CIPHER, + pub TLS_INFO_TXCONF, + pub TLS_INFO_RXCONF, + pub TLS_INFO_ZC_RO_TX, + pub TLS_INFO_RX_NO_PAD, + pub TLS_INFO_TX_MAX_PAYLOAD_LEN, + __TLS_INFO_MAX, + } +} + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. +pub const TLS_INFO_MAX: c_int = __TLS_INFO_MAX - 1; + +pub const TLS_CONF_BASE: c_int = 1; +pub const TLS_CONF_SW: c_int = 2; +pub const TLS_CONF_HW: c_int = 3; +pub const TLS_CONF_HW_RECORD: c_int = 4; diff --git a/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/types.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/types.rs new file mode 100644 index 000000000..d0eecd34d --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/linux/types.rs @@ -0,0 +1,17 @@ +//! * Header: `uapi/linux/types.h` +//! * Header: `uapi/asm-generic/int-ll64.h` + +use crate::prelude::*; + +/* Definitions from `asm/types.h` -> `asm-generic/types.h` -> `asm-generic/int-ll64.h` */ + +pub type __u8 = c_uchar; + +pub type __u16 = c_ushort; +pub type __s16 = c_short; + +pub type __u32 = c_uint; +pub type __s32 = c_int; + +pub type __s64 = c_longlong; +pub type __u64 = c_ulonglong; diff --git a/thirdparty/crates/libc-0.2.186/src/new/linux_uapi/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/linux_uapi/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/linux_uapi/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/linux_uapi/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/mod.rs similarity index 89% rename from thirdparty/crates/libc-0.2.186/src/new/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/mod.rs index 1c5d6a6e1..f4387e7aa 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/mod.rs @@ -93,7 +93,7 @@ cfg_if! { } else if #[cfg(target_os = "netbsd")] { mod netbsd; pub(crate) use netbsd::*; - } else if #[cfg(target_os = "nto")] { + } else if #[cfg(any(target_os = "nto", target_os = "qnx"))] { mod nto; pub(crate) use nto::*; } else if #[cfg(target_os = "nuttx")] { @@ -104,7 +104,6 @@ cfg_if! { pub(crate) use openbsd::*; } else if #[cfg(target_os = "qurt")] { pub mod qurt; - pub use qurt::*; } else if #[cfg(target_os = "redox")] { mod redox; // pub(crate) use redox::*; @@ -174,6 +173,8 @@ cfg_if! { // Per-OS headers we export cfg_if! { if #[cfg(target_os = "android")] { + use bionic_libc::kernel_uapi::linux; + pub use linux::types::*; pub use sys::socket::*; } else if #[cfg(target_os = "linux")] { pub use linux::can::bcm::*; @@ -181,20 +182,33 @@ cfg_if! { pub use linux::can::j1939::*; pub use linux::can::netlink::*; pub use linux::can::raw::*; - pub use linux::can::*; + pub use linux::futex::*; + pub use linux::if_addr::*; + pub use linux::if_link::*; + pub use linux::if_packet::*; pub use linux::keyctl::*; pub use linux::membarrier::*; + pub use linux::mount::*; pub use linux::netlink::*; pub use linux::pidfd::*; + pub use linux::sctp::*; + pub use linux::tls::*; + pub use linux::types::*; #[cfg(target_env = "gnu")] pub use net::route::*; } else if #[cfg(target_vendor = "apple")] { - pub use pthread::*; + pub use net::bpf::*; + pub use netinet6::in6_var::*; pub use pthread_::introspection::*; pub use pthread_::pthread_spis::*; pub use pthread_::spawn::*; pub use pthread_::stack_np::*; pub use signal::*; + pub use sys::ioccom::*; + pub use sys::sockio::*; + pub use sys::ttycom::*; + } else if #[cfg(target_os = "l4re")] { + pub use l4re::packet::*; } else if #[cfg(target_os = "netbsd")] { pub use net::if_::*; pub use sys::file::*; @@ -208,11 +222,15 @@ cfg_if! { pub use utmpx_::*; } else if #[cfg(target_os = "openbsd")] { pub use sys::ipc::*; - } else if #[cfg(target_os = "nto")] { + } else if #[cfg(any(target_os = "nto", target_os = "qnx"))] { pub use net::bpf::*; pub use net::if_::*; } else if #[cfg(target_os = "freebsd")] { + pub use net::dlt::*; + pub use netinet6::in6_var::*; pub use sys::file::*; + pub use sys::ioccom::*; + pub use sys::socket::*; } } diff --git a/thirdparty/crates/libc-0.2.186/src/new/musl/arch/generic/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/musl/arch/generic/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/musl/arch/generic/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/musl/arch/generic/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/musl/arch/mips/bits/socket.rs b/thirdparty/crates/libc-0.2.189/src/new/musl/arch/mips/bits/socket.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/musl/arch/mips/bits/socket.rs rename to thirdparty/crates/libc-0.2.189/src/new/musl/arch/mips/bits/socket.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/musl/arch/mips/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/musl/arch/mips/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/musl/arch/mips/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/musl/arch/mips/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/musl/arch/mips64/bits/socket.rs b/thirdparty/crates/libc-0.2.189/src/new/musl/arch/mips64/bits/socket.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/musl/arch/mips64/bits/socket.rs rename to thirdparty/crates/libc-0.2.189/src/new/musl/arch/mips64/bits/socket.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/musl/arch/mips64/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/musl/arch/mips64/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/musl/arch/mips64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/musl/arch/mips64/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/musl/arch/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/musl/arch/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/musl/arch/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/musl/arch/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/musl/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/musl/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/musl/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/musl/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/musl/pthread.rs b/thirdparty/crates/libc-0.2.189/src/new/musl/pthread.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/musl/pthread.rs rename to thirdparty/crates/libc-0.2.189/src/new/musl/pthread.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/musl/sched.rs b/thirdparty/crates/libc-0.2.189/src/new/musl/sched.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/musl/sched.rs rename to thirdparty/crates/libc-0.2.189/src/new/musl/sched.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/musl/sys/socket.rs b/thirdparty/crates/libc-0.2.189/src/new/musl/sys/socket.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/musl/sys/socket.rs rename to thirdparty/crates/libc-0.2.189/src/new/musl/sys/socket.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/musl/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/musl/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/musl/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/musl/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/netbsd/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/netbsd/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/netbsd/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/netbsd/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/netbsd/net/if_.rs b/thirdparty/crates/libc-0.2.189/src/new/netbsd/net/if_.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/netbsd/net/if_.rs rename to thirdparty/crates/libc-0.2.189/src/new/netbsd/net/if_.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/file.rs b/thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/file.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/file.rs rename to thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/file.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/ipc.rs b/thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/ipc.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/ipc.rs rename to thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/ipc.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/socket.rs b/thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/socket.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/socket.rs rename to thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/socket.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/statvfs.rs b/thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/statvfs.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/statvfs.rs rename to thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/statvfs.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/time.rs b/thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/time.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/time.rs rename to thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/time.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/timex.rs b/thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/timex.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/timex.rs rename to thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/timex.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/types.rs b/thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/types.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/netbsd/sys/types.rs rename to thirdparty/crates/libc-0.2.189/src/new/netbsd/sys/types.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/netbsd/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/netbsd/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/netbsd/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/netbsd/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/netbsd/utmp_.rs b/thirdparty/crates/libc-0.2.189/src/new/netbsd/utmp_.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/netbsd/utmp_.rs rename to thirdparty/crates/libc-0.2.189/src/new/netbsd/utmp_.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/netbsd/utmpx_.rs b/thirdparty/crates/libc-0.2.189/src/new/netbsd/utmpx_.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/netbsd/utmpx_.rs rename to thirdparty/crates/libc-0.2.189/src/new/netbsd/utmpx_.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/newlib/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/newlib/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/newlib/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/newlib/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/newlib/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/newlib/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/newlib/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/newlib/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/nto/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/nto/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/nto/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/nto/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/nto/net/bpf.rs b/thirdparty/crates/libc-0.2.189/src/new/nto/net/bpf.rs similarity index 76% rename from thirdparty/crates/libc-0.2.186/src/new/nto/net/bpf.rs rename to thirdparty/crates/libc-0.2.189/src/new/nto/net/bpf.rs index 8b8dd71dc..6ee9f53e8 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/nto/net/bpf.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/nto/net/bpf.rs @@ -40,35 +40,35 @@ pub const BPF_TAX: u16 = 0x00; pub const BPF_TXA: u16 = 0x80; f! { - pub fn BPF_CLASS(code: u32) -> u32 { + pub unsafe fn BPF_CLASS(code: u32) -> u32 { code & 0x07 } - pub fn BPF_SIZE(code: u32) -> u32 { + pub unsafe fn BPF_SIZE(code: u32) -> u32 { code & 0x18 } - pub fn BPF_MODE(code: u32) -> u32 { + pub unsafe fn BPF_MODE(code: u32) -> u32 { code & 0xe0 } - pub fn BPF_OP(code: u32) -> u32 { + pub unsafe fn BPF_OP(code: u32) -> u32 { code & 0xf0 } - pub fn BPF_SRC(code: u32) -> u32 { + pub unsafe fn BPF_SRC(code: u32) -> u32 { code & 0x08 } - pub fn BPF_RVAL(code: u32) -> u32 { + pub unsafe fn BPF_RVAL(code: u32) -> u32 { code & 0x18 } - pub fn BPF_MISCOP(code: u32) -> u32 { + pub unsafe fn BPF_MISCOP(code: u32) -> u32 { code & 0xf8 } - pub fn BPF_STMT(code: u16, k: u32) -> bpf_insn { + pub unsafe fn BPF_STMT(code: u16, k: u32) -> bpf_insn { bpf_insn { code, jt: 0, @@ -77,7 +77,7 @@ f! { } } - pub fn BPF_JUMP(code: u16, k: u32, jt: u8, jf: u8) -> bpf_insn { + pub unsafe fn BPF_JUMP(code: u16, k: u32, jt: u8, jf: u8) -> bpf_insn { bpf_insn { code, jt, jf, k } } } diff --git a/thirdparty/crates/libc-0.2.186/src/new/nto/net/if_.rs b/thirdparty/crates/libc-0.2.189/src/new/nto/net/if_.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/nto/net/if_.rs rename to thirdparty/crates/libc-0.2.189/src/new/nto/net/if_.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/nto/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/nto/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/nto/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/nto/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/nuttx/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/nuttx/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/nuttx/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/nuttx/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/nuttx/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/nuttx/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/nuttx/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/nuttx/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/openbsd/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/openbsd/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/openbsd/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/openbsd/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/openbsd/sys/ipc.rs b/thirdparty/crates/libc-0.2.189/src/new/openbsd/sys/ipc.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/openbsd/sys/ipc.rs rename to thirdparty/crates/libc-0.2.189/src/new/openbsd/sys/ipc.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/openbsd/sys/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/openbsd/sys/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/openbsd/sys/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/openbsd/sys/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/openbsd/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/openbsd/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/openbsd/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/openbsd/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/dlfcn.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/dlfcn.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/dlfcn.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/dlfcn.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/errno.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/errno.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/errno.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/errno.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/fcntl.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/fcntl.rs similarity index 95% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/fcntl.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/fcntl.rs index 0287292ad..615a7128c 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/qurt/fcntl.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/qurt/fcntl.rs @@ -47,6 +47,5 @@ pub const F_UNLCK: c_int = 2; // Functions extern "C" { pub fn open(pathname: *const c_char, flags: c_int, ...) -> c_int; - pub fn creat(pathname: *const c_char, mode: mode_t) -> c_int; pub fn fcntl(fd: c_int, cmd: c_int, ...) -> c_int; } diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/limits.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/limits.rs similarity index 64% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/limits.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/limits.rs index ae1a007ff..8bf772ceb 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/qurt/limits.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/qurt/limits.rs @@ -7,32 +7,44 @@ use crate::prelude::*; pub const CHAR_BIT: c_uint = 8; pub const CHAR_MAX: c_char = 255; // unsigned char on Hexagon pub const CHAR_MIN: c_char = 0; -pub const SCHAR_MAX: c_schar = 127; -pub const SCHAR_MIN: c_schar = -128; +pub const SCHAR_MAX: i8 = 127; +pub const SCHAR_MIN: i8 = -128; pub const UCHAR_MAX: c_uchar = 255; // Integer properties pub const INT_MAX: c_int = 2147483647; -pub const INT_MIN: c_int = (-2147483647 - 1); +pub const INT_MIN: c_int = -2147483647 - 1; pub const UINT_MAX: c_uint = 4294967295; pub const LONG_MAX: c_long = 2147483647; -pub const LONG_MIN: c_long = (-2147483647 - 1); +pub const LONG_MIN: c_long = -2147483647 - 1; pub const ULONG_MAX: c_ulong = 4294967295; pub const SHRT_MAX: c_short = 32767; -pub const SHRT_MIN: c_short = (-32768); +pub const SHRT_MIN: c_short = -32768; pub const USHRT_MAX: c_ushort = 65535; // POSIX Limits pub const ARG_MAX: c_int = 4096; pub const CHILD_MAX: c_int = 25; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const LINK_MAX: c_int = 8; + pub const MAX_CANON: c_int = 255; pub const MAX_INPUT: c_int = 255; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NAME_MAX: c_int = 255; + pub const OPEN_MAX: c_int = 20; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PATH_MAX: c_int = 260; + pub const PIPE_BUF: c_int = 512; pub const STREAM_MAX: c_int = 20; pub const TZNAME_MAX: c_int = 50; diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/mod.rs similarity index 77% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/mod.rs index 52d7ae048..a55726612 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/qurt/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/qurt/mod.rs @@ -39,15 +39,18 @@ pub type pthread_t = c_uint; pub type pthread_key_t = c_int; pub type pthread_once_t = c_int; pub type pthread_mutex_t = c_uint; -pub type pthread_mutexattr_t = c_uint; +// QuRT pthread_mutexattr_t is a struct with 4 ints (is_initialized, type, pshared, protocol) +pub type pthread_mutexattr_t = [c_uint; 4]; pub type pthread_cond_t = c_uint; -pub type pthread_condattr_t = c_uint; -pub type pthread_attr_t = c_uint; -pub type pthread_rwlock_t = c_uint; -pub type pthread_rwlockattr_t = c_uint; +// QuRT pthread_condattr_t is a struct with 3 ints (is_initialized, pshared, clock_id) +pub type pthread_condattr_t = [c_uint; 3]; +// pthread_attr_t is defined as a struct in the s! block below +pub type pthread_rwlock_t = *mut c_void; +pub type pthread_rwlockattr_t = *mut c_void; pub type pthread_spinlock_t = c_uint; pub type pthread_barrier_t = c_uint; -pub type pthread_barrierattr_t = c_uint; +// QuRT pthread_barrierattr_t is a struct with 2 ints (is_initialized, pshared) +pub type pthread_barrierattr_t = [c_uint; 2]; // Network types pub type socklen_t = c_uint; @@ -55,18 +58,17 @@ pub type sa_family_t = c_ushort; pub type in_addr_t = c_uint; pub type in_port_t = c_ushort; -// File descriptor types -pub type fd_set = c_ulong; +// File descriptor types - QuRT defines fd_set as a struct in mqueue.h +// FD_SETSIZE = 256, NFDBITS = 32, so fds_bits has 8 elements // Standard C library types extern_ty! { - pub enum FILE {} + pub type FILE; } pub type fpos_t = c_long; pub type clock_t = c_long; -// POSIX semaphore types -pub type sem_t = c_uint; +// POSIX semaphore types - QuRT sem_t is a struct with an opaque pointer // Message queue types pub type mqd_t = c_int; @@ -80,22 +82,12 @@ pub type sigset_t = c_ulong; // Variadic argument list type pub type va_list = *mut c_char; -// Additional missing types -pub type c_schar = i8; - -// Wide character type (hexagon-specific) -pub type wchar_t = u32; +// Wide character type (hexagon uses signed wchar_t) +pub type wchar_t = i32; // Error type (compatible with std expectations) pub type errno_t = c_int; -// Resource limit type (for compatibility, not fully supported on QuRT) -pub type rlim_t = c_ulong; - -// Terminal types (for compatibility, not fully supported on QuRT) -pub type speed_t = c_uint; -pub type tcflag_t = c_uint; - // Division result types and structures s! { pub struct div_t { @@ -164,43 +156,7 @@ s! { pub entry: dirent, } - // Terminal I/O structure (for compatibility, limited support on QuRT) - pub struct termios { - pub c_iflag: tcflag_t, - pub c_oflag: tcflag_t, - pub c_cflag: tcflag_t, - pub c_lflag: tcflag_t, - pub c_cc: [c_uchar; 32], - pub c_ispeed: speed_t, - pub c_ospeed: speed_t, - } - - // Resource limit structures (for compatibility, limited support on QuRT) - pub struct rlimit { - pub rlim_cur: rlim_t, - pub rlim_max: rlim_t, - } - - pub struct rusage { - pub ru_utime: timeval, - pub ru_stime: timeval, - pub ru_maxrss: c_long, - pub ru_ixrss: c_long, - pub ru_idrss: c_long, - pub ru_isrss: c_long, - pub ru_minflt: c_long, - pub ru_majflt: c_long, - pub ru_nswap: c_long, - pub ru_inblock: c_long, - pub ru_oublock: c_long, - pub ru_msgsnd: c_long, - pub ru_msgrcv: c_long, - pub ru_nsignals: c_long, - pub ru_nvcsw: c_long, - pub ru_nivcsw: c_long, - } - - // File lock structure (for compatibility) + // File lock structure (from toolchain generic fcntl.h) pub struct flock { pub l_type: c_short, pub l_whence: c_short, @@ -208,6 +164,30 @@ s! { pub l_len: off_t, pub l_pid: pid_t, } + + // QuRT fd_set from mqueue.h: FD_SETSIZE=256, NFDBITS=32 (sizeof(fd_mask)*8) + pub struct fd_set { + pub fds_bits: [c_ulong; 8], + } + + // QuRT sem_t from semaphore.h: struct with opaque pointer + pub struct sem_t { + pub opaque: *mut c_uint, + } + + // QuRT pthread_attr_t - matches pthread_types.h struct layout + pub struct pthread_attr_t { + pub stackaddr: *mut c_void, + pub internal_stack: c_int, + pub stacksize: size_t, + pub priority: c_int, + pub timetest_id: c_ushort, + __bitfield: c_ushort, + pub cpumask: cpu_set_t, + pub name: [c_char; 16], + pub ext_context: c_int, + pub detachstate: c_int, + } } // Additional pthread constants @@ -236,7 +216,11 @@ pub const FOPEN_MAX: c_uint = 20; pub const EOK: c_int = 0; // Semaphore constants -pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t; +pub const SEM_FAILED: *mut sem_t = ptr::null_mut(); + +// fd_set constants from mqueue.h +pub const FD_SETSIZE: c_uint = 256; +pub const NFDBITS: c_uint = 32; // Page size constants (hexagon-specific) pub const PAGESIZE: size_t = 4096; @@ -256,24 +240,10 @@ pub const DT_SOCK: c_uchar = 12; extern "C" { pub fn opendir(name: *const c_char) -> *mut DIR; pub fn readdir(dirp: *mut DIR) -> *mut dirent; - pub fn closedir(dirp: *const DIR) -> c_int; + pub fn closedir(dirp: *mut DIR) -> c_int; pub fn mkdir(path: *const c_char, mode: mode_t) -> c_int; } -// Additional pthread functions -extern "C" { - pub fn pthread_attr_getstack( - attr: *const pthread_attr_t, - stackaddr: *mut *mut c_void, - stacksize: *mut size_t, - ) -> c_int; - pub fn pthread_attr_setstack( - attr: *mut pthread_attr_t, - stackaddr: *mut c_void, - stacksize: size_t, - ) -> c_int; -} - // Additional time functions extern "C" { pub fn clock_getcpuclockid(pid: pid_t, clock_id: *mut clockid_t) -> c_int; @@ -317,16 +287,6 @@ extern "C" { pub fn memset(s: *mut c_void, c: c_int, n: size_t) -> *mut c_void; } -// Additional unistd functions -extern "C" { - pub fn fork() -> pid_t; - pub fn execve( - filename: *const c_char, - argv: *const *const c_char, - envp: *const *const c_char, - ) -> c_int; -} - // Character classification functions (ctype.h) extern "C" { pub fn isalnum(c: c_int) -> c_int; @@ -348,6 +308,7 @@ pub(crate) mod dlfcn; pub(crate) mod errno; pub(crate) mod fcntl; pub(crate) mod limits; +pub(crate) mod mqueue; pub(crate) mod pthread; pub(crate) mod semaphore; pub(crate) mod signal; @@ -362,6 +323,7 @@ pub use dlfcn::*; pub use errno::*; pub use fcntl::*; pub use limits::*; +pub use mqueue::*; pub use pthread::*; pub use semaphore::*; pub use signal::*; diff --git a/thirdparty/crates/libc-0.2.189/src/new/qurt/mqueue.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/mqueue.rs new file mode 100644 index 000000000..88ecef584 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/qurt/mqueue.rs @@ -0,0 +1,74 @@ +//! Header: `mqueue.h` +//! +//! QuRT POSIX message queue API. Also provides select/pselect and fd_set +//! operations since these are declared in QuRT's mqueue.h. + +use super::*; +use crate::prelude::*; + +// Message queue priority constants +pub const MQ_PRIO_DEFAULT: c_int = 0; + +// Bits per byte +pub const NBBY: c_uint = 8; + +s! { + pub struct mq_attr { + pub mq_flags: c_long, + pub mq_maxmsg: c_long, + pub mq_msgsize: c_long, + pub mq_curmsgs: c_long, + } +} + +extern "C" { + // Message queue operations + pub fn mq_open(name: *const c_char, oflag: c_int, ...) -> mqd_t; + pub fn mq_close(mq_desc: mqd_t) -> c_int; + pub fn mq_unlink(name: *const c_char) -> c_int; + pub fn mq_send( + mqdes: mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + ) -> c_int; + pub fn mq_timedsend( + mqdes: mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + abs_timeout: *const timespec, + ) -> c_int; + pub fn mq_receive( + mqdes: mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + ) -> ssize_t; + pub fn mq_timedreceive( + mqdes: mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + abs_timeout: *const timespec, + ) -> ssize_t; + pub fn mq_getattr(mqdes: mqd_t, mqstat: *mut mq_attr) -> c_int; + pub fn mq_setattr(mqdes: mqd_t, mqstat: *const mq_attr, omqstat: *mut mq_attr) -> c_int; + + // select/pselect (declared in QuRT mqueue.h) + pub fn select( + nfds: c_int, + readfds: *mut fd_set, + writefds: *mut fd_set, + errorfds: *mut fd_set, + timeout: *mut timeval, + ) -> c_int; + pub fn pselect( + nfds: c_int, + readfds: *mut fd_set, + writefds: *mut fd_set, + errorfds: *mut fd_set, + timeout: *const timespec, + sigmask: *const sigset_t, + ) -> c_int; +} diff --git a/thirdparty/crates/libc-0.2.189/src/new/qurt/pthread.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/pthread.rs new file mode 100644 index 000000000..80ae47f49 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/qurt/pthread.rs @@ -0,0 +1,275 @@ +//! Header: `pthread.h` +//! +//! QuRT provides a subset of POSIX pthread functionality optimized for real-time systems. + +use super::*; +use crate::prelude::*; + +// Thread creation attributes (QuRT values differ from POSIX/Linux defaults) +pub const PTHREAD_CREATE_DETACHED: c_int = 0; +pub const PTHREAD_CREATE_JOINABLE: c_int = 1; + +// Mutex types (QuRT values differ from POSIX/Linux defaults) +pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 0; +pub const PTHREAD_MUTEX_NORMAL: c_int = 1; +pub const PTHREAD_MUTEX_RECURSIVE: c_int = 2; +pub const PTHREAD_MUTEX_DEFAULT: c_int = 3; + +// Process sharing +pub const PTHREAD_PROCESS_PRIVATE: c_int = 0; +pub const PTHREAD_PROCESS_SHARED: c_int = 1; + +// Mutex protocol +pub const PTHREAD_PRIO_NONE: c_int = 0; +pub const PTHREAD_PRIO_INHERIT: c_int = 1; +pub const PTHREAD_PRIO_PROTECT: c_int = 2; + +// Thread priority constants +pub const PTHREAD_MIN_PRIORITY: c_int = 0; +pub const PTHREAD_MAX_PRIORITY: c_int = 255; + +// Initializer constants +pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0xFFFFFFFF; +pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0xFFFFFFFF; +pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = !0usize as pthread_rwlock_t; +pub const PTHREAD_ONCE_INIT: pthread_once_t = 0; + +// Stack size +pub const PTHREAD_STACK_MIN: size_t = 8192; + +// Contention scope +pub const PTHREAD_SCOPE_SYSTEM: c_int = 0; +pub const PTHREAD_SCOPE_PROCESS: c_int = 1; + +// Scheduler inheritance (QuRT values differ from POSIX/Linux defaults) +pub const PTHREAD_EXPLICIT_SCHED: c_int = 0; +pub const PTHREAD_INHERIT_SCHED: c_int = 1; + +extern "C" { + // Thread management + pub fn pthread_create( + thread: *mut pthread_t, + attr: *const pthread_attr_t, + start_routine: extern "C" fn(*mut c_void) -> *mut c_void, + arg: *mut c_void, + ) -> c_int; + pub fn pthread_join(thread: pthread_t, retval: *mut *mut c_void) -> c_int; + pub fn pthread_detach(thread: pthread_t) -> c_int; + pub fn pthread_exit(retval: *mut c_void) -> !; + pub fn pthread_self() -> pthread_t; + // Note: pthread_equal is static inline in QuRT pthread.h, no linkable symbol + pub fn pthread_cancel(thread: pthread_t) -> c_int; + pub fn pthread_kill(thread: pthread_t, sig: c_int) -> c_int; + pub fn pthread_setcancelstate(state: c_int, oldstate: *mut c_int) -> c_int; + pub fn pthread_setcanceltype(r#type: c_int, oldtype: *mut c_int) -> c_int; + + // Thread scheduling + pub fn pthread_getschedparam( + thread: pthread_t, + policy: *mut c_int, + param: *mut sched_param, + ) -> c_int; + pub fn pthread_setschedparam( + thread: pthread_t, + policy: c_int, + param: *const sched_param, + ) -> c_int; + pub fn pthread_setschedprio(thread: pthread_t, prio: c_int) -> c_int; + + // Thread attributes + pub fn pthread_attr_init(attr: *mut pthread_attr_t) -> c_int; + pub fn pthread_attr_destroy(attr: *mut pthread_attr_t) -> c_int; + pub fn pthread_attr_setstacksize(attr: *mut pthread_attr_t, stacksize: size_t) -> c_int; + pub fn pthread_attr_getstacksize(attr: *const pthread_attr_t, stacksize: *mut size_t) -> c_int; + pub fn pthread_attr_setstackaddr(attr: *mut pthread_attr_t, stackaddr: *mut c_void) -> c_int; + pub fn pthread_attr_getstackaddr( + attr: *const pthread_attr_t, + stackaddr: *mut *mut c_void, + ) -> c_int; + pub fn pthread_attr_setstack( + attr: *mut pthread_attr_t, + stackaddr: *mut c_void, + stacksize: size_t, + ) -> c_int; + pub fn pthread_attr_getstack( + attr: *const pthread_attr_t, + stackaddr: *mut *mut c_void, + stacksize: *mut size_t, + ) -> c_int; + pub fn pthread_attr_setdetachstate(attr: *mut pthread_attr_t, detachstate: c_int) -> c_int; + pub fn pthread_attr_getdetachstate( + attr: *const pthread_attr_t, + detachstate: *mut c_int, + ) -> c_int; + pub fn pthread_attr_setscope(attr: *mut pthread_attr_t, scope: c_int) -> c_int; + pub fn pthread_attr_getscope(attr: *const pthread_attr_t, scope: *mut c_int) -> c_int; + pub fn pthread_attr_setinheritsched(attr: *mut pthread_attr_t, inheritsched: c_int) -> c_int; + pub fn pthread_attr_getinheritsched( + attr: *const pthread_attr_t, + inheritsched: *mut c_int, + ) -> c_int; + pub fn pthread_attr_setschedparam( + attr: *mut pthread_attr_t, + param: *const sched_param, + ) -> c_int; + pub fn pthread_attr_getschedparam( + attr: *const pthread_attr_t, + param: *mut sched_param, + ) -> c_int; + pub fn pthread_attr_getguardsize(attr: *const pthread_attr_t, guardsize: *mut size_t) -> c_int; + + // Mutex operations + pub fn pthread_mutex_init( + mutex: *mut pthread_mutex_t, + attr: *const pthread_mutexattr_t, + ) -> c_int; + pub fn pthread_mutex_destroy(mutex: *mut pthread_mutex_t) -> c_int; + pub fn pthread_mutex_lock(mutex: *mut pthread_mutex_t) -> c_int; + pub fn pthread_mutex_trylock(mutex: *mut pthread_mutex_t) -> c_int; + pub fn pthread_mutex_unlock(mutex: *mut pthread_mutex_t) -> c_int; + pub fn pthread_mutex_getprioceiling( + mutex: *const pthread_mutex_t, + prioceiling: *mut c_int, + ) -> c_int; + pub fn pthread_mutex_setprioceiling( + mutex: *mut pthread_mutex_t, + prioceiling: c_int, + old_ceiling: *mut c_int, + ) -> c_int; + + // Mutex attributes + pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> c_int; + pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> c_int; + pub fn pthread_mutexattr_settype(attr: *mut pthread_mutexattr_t, kind: c_int) -> c_int; + pub fn pthread_mutexattr_gettype(attr: *const pthread_mutexattr_t, kind: *mut c_int) -> c_int; + pub fn pthread_mutexattr_setprotocol(attr: *mut pthread_mutexattr_t, protocol: c_int) -> c_int; + pub fn pthread_mutexattr_getprotocol( + attr: *const pthread_mutexattr_t, + protocol: *mut c_int, + ) -> c_int; + pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t, pshared: c_int) -> c_int; + pub fn pthread_mutexattr_getpshared( + attr: *const pthread_mutexattr_t, + pshared: *mut c_int, + ) -> c_int; + pub fn pthread_mutexattr_setprioceiling( + attr: *mut pthread_mutexattr_t, + prioceiling: c_int, + ) -> c_int; + pub fn pthread_mutexattr_getprioceiling( + attr: *const pthread_mutexattr_t, + prioceiling: *mut c_int, + ) -> c_int; + + // Condition variables + pub fn pthread_cond_init(cond: *mut pthread_cond_t, attr: *const pthread_condattr_t) -> c_int; + pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> c_int; + pub fn pthread_cond_wait(cond: *mut pthread_cond_t, mutex: *mut pthread_mutex_t) -> c_int; + pub fn pthread_cond_timedwait( + cond: *mut pthread_cond_t, + mutex: *mut pthread_mutex_t, + abstime: *const timespec, + ) -> c_int; + pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> c_int; + pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> c_int; + + // Condition variable attributes + pub fn pthread_condattr_init(attr: *mut pthread_condattr_t) -> c_int; + pub fn pthread_condattr_destroy(attr: *mut pthread_condattr_t) -> c_int; + pub fn pthread_condattr_setclock(attr: *mut pthread_condattr_t, clock_id: clockid_t) -> c_int; + pub fn pthread_condattr_getclock( + attr: *const pthread_condattr_t, + clock_id: *mut clockid_t, + ) -> c_int; + pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: c_int) -> c_int; + pub fn pthread_condattr_getpshared( + attr: *const pthread_condattr_t, + pshared: *mut c_int, + ) -> c_int; + + // Spinlocks + pub fn pthread_spin_init(lock: *mut pthread_spinlock_t, pshared: c_int) -> c_int; + pub fn pthread_spin_destroy(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_lock(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_trylock(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_unlock(lock: *mut pthread_spinlock_t) -> c_int; + + // Barriers + pub fn pthread_barrier_init( + barrier: *mut pthread_barrier_t, + attr: *const pthread_barrierattr_t, + count: c_uint, + ) -> c_int; + pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> c_int; + pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> c_int; + pub fn pthread_barrierattr_init(attr: *mut pthread_barrierattr_t) -> c_int; + pub fn pthread_barrierattr_destroy(attr: *mut pthread_barrierattr_t) -> c_int; + pub fn pthread_barrierattr_getpshared( + attr: *const pthread_barrierattr_t, + pshared: *mut c_int, + ) -> c_int; + pub fn pthread_barrierattr_setpshared( + attr: *mut pthread_barrierattr_t, + pshared: c_int, + ) -> c_int; + + // Read-write locks + pub fn pthread_rwlock_init( + rwlock: *mut pthread_rwlock_t, + attr: *const pthread_rwlockattr_t, + ) -> c_int; + pub fn pthread_rwlock_destroy(rwlock: *mut pthread_rwlock_t) -> c_int; + pub fn pthread_rwlock_rdlock(rwlock: *mut pthread_rwlock_t) -> c_int; + pub fn pthread_rwlock_tryrdlock(rwlock: *mut pthread_rwlock_t) -> c_int; + pub fn pthread_rwlock_wrlock(rwlock: *mut pthread_rwlock_t) -> c_int; + pub fn pthread_rwlock_trywrlock(rwlock: *mut pthread_rwlock_t) -> c_int; + pub fn pthread_rwlock_unlock(rwlock: *mut pthread_rwlock_t) -> c_int; + pub fn pthread_rwlockattr_init(attr: *mut pthread_rwlockattr_t) -> c_int; + pub fn pthread_rwlockattr_destroy(attr: *mut pthread_rwlockattr_t) -> c_int; + pub fn pthread_rwlockattr_getpshared( + attr: *const pthread_rwlockattr_t, + pshared: *mut c_int, + ) -> c_int; + pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, pshared: c_int) -> c_int; + + // Thread-local storage + pub fn pthread_key_create( + key: *mut pthread_key_t, + destructor: Option, + ) -> c_int; + pub fn pthread_key_delete(key: pthread_key_t) -> c_int; + pub fn pthread_getspecific(key: pthread_key_t) -> *mut c_void; + pub fn pthread_setspecific(key: pthread_key_t, value: *const c_void) -> c_int; + + // One-time initialization + pub fn pthread_once(once_control: *mut pthread_once_t, init_routine: extern "C" fn()) -> c_int; + + // GNU/QuRT non-portable extensions + pub fn pthread_getname_np(thread: pthread_t, name: *mut c_char, len: size_t) -> c_int; + pub fn pthread_getattr_np(thread: pthread_t, attr: *mut pthread_attr_t) -> c_int; + pub fn pthread_attr_setaffinity_np( + attr: *mut pthread_attr_t, + cpusetsize: size_t, + cpuset: *const cpu_set_t, + ) -> c_int; + pub fn pthread_attr_getaffinity_np( + attr: *mut pthread_attr_t, + cpusetsize: size_t, + cpuset: *mut cpu_set_t, + ) -> c_int; + + // QuRT-specific thread attribute extensions + pub fn pthread_attr_setthreadname(attr: *mut pthread_attr_t, name: *const c_char) -> c_int; + pub fn pthread_attr_getthreadname( + attr: *const pthread_attr_t, + name: *mut c_char, + size: c_int, + ) -> c_int; + pub fn pthread_attr_settimetestid(attr: *mut pthread_attr_t, tid: c_uint) -> c_int; + pub fn pthread_attr_gettimetestid(attr: *const pthread_attr_t, tid: *mut c_uint) -> c_int; + pub fn pthread_attr_setautostack(attr: *mut pthread_attr_t) -> c_int; + pub fn pthread_attr_setbuspriority(attr: *mut pthread_attr_t, bus_priority: c_ushort) -> c_int; + + // POSIX standard (declared in QuRT pthread.h) + pub fn posix_memalign(memptr: *mut *mut c_void, alignment: size_t, size: size_t) -> c_int; +} diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/semaphore.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/semaphore.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/semaphore.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/semaphore.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/signal.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/signal.rs similarity index 88% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/signal.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/signal.rs index f525fa15f..63e7251b6 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/qurt/signal.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/qurt/signal.rs @@ -3,13 +3,14 @@ use super::*; use crate::prelude::*; -// Standard signal numbers +// Signal numbers from toolchain signal.h (non-_LINUX_C_LIB_H_ path) pub const SIGHUP: c_int = 1; pub const SIGINT: c_int = 2; pub const SIGQUIT: c_int = 3; pub const SIGILL: c_int = 4; pub const SIGTRAP: c_int = 5; pub const SIGABRT: c_int = 6; +pub const SIGIOT: c_int = 6; pub const SIGBUS: c_int = 7; pub const SIGFPE: c_int = 8; pub const SIGKILL: c_int = 9; @@ -29,9 +30,9 @@ pub const SIGTTOU: c_int = 22; pub const SIGURG: c_int = 23; pub const SIGXCPU: c_int = 24; pub const SIGXFSZ: c_int = 25; -pub const SIGVTALRM: c_int = 26; pub const SIGPROF: c_int = 27; pub const SIGWINCH: c_int = 28; +pub const SIGPOLL: c_int = 29; pub const SIGIO: c_int = 29; pub const SIGPWR: c_int = 30; pub const SIGSYS: c_int = 31; @@ -50,6 +51,9 @@ pub const SIG_SETMASK: c_int = 3; pub const POSIX_MSG: c_int = 7; pub const POSIX_NOTIF: c_int = 8; pub const SIGRTMIN: c_int = 10; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SIGRTMAX: c_int = 32; // Notification types (from QuRT signal.h) @@ -61,12 +65,16 @@ pub const SA_SIGINFO: c_int = 1; pub type sighandler_t = size_t; // Signal structures based on QuRT SDK headers -s! { - pub struct sigval { + +// sigval is a union in C (4 bytes on 32-bit hexagon) +s_no_extra_traits! { + pub union sigval { pub sival_int: c_int, pub sival_ptr: *mut c_void, } +} +s! { pub struct sigevent { pub sigev_notify: c_int, pub sigev_signo: c_int, @@ -90,23 +98,17 @@ s! { } extern "C" { + // From generic signal.h (toolchain) pub fn signal(sig: c_int, handler: sighandler_t) -> sighandler_t; - pub fn kill(pid: pid_t, sig: c_int) -> c_int; pub fn raise(sig: c_int) -> c_int; - pub fn alarm(seconds: c_uint) -> c_uint; - pub fn pause() -> c_int; - // Signal mask functions + // QuRT POSIX signal functions pub fn sigemptyset(set: *mut sigset_t) -> c_int; pub fn sigfillset(set: *mut sigset_t) -> c_int; pub fn sigaddset(set: *mut sigset_t, signum: c_int) -> c_int; pub fn sigdelset(set: *mut sigset_t, signum: c_int) -> c_int; pub fn sigismember(set: *const sigset_t, signum: c_int) -> c_int; - pub fn sigprocmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; - pub fn sigpending(set: *mut sigset_t) -> c_int; pub fn sigsuspend(mask: *const sigset_t) -> c_int; - - // QuRT-specific signal functions pub fn sigwait(set: *const sigset_t, sig: *mut c_int) -> c_int; pub fn _sigaction(sig: c_int, act: *const sigaction, oact: *mut sigaction) -> c_int; pub fn sigtimedwait( diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/stdio.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/stdio.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/stdio.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/stdio.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/stdlib.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/stdlib.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/stdlib.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/stdlib.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/sys/mman.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/sys/mman.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/sys/mman.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/sys/mman.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/sys/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/sys/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/sys/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/sys/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/sys/sched.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/sys/sched.rs similarity index 71% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/sys/sched.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/sys/sched.rs index 56fed5ba0..d56a4bc65 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/qurt/sys/sched.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/qurt/sys/sched.rs @@ -18,6 +18,9 @@ s! { } extern "C" { + // Note: sched_yield is static inline in QuRT sys/sched.h, so there is no + // linkable symbol in the SDK libraries. Programs must provide their own + // implementation or use --defsym=sched_yield=abort at link time. pub fn sched_yield() -> c_int; pub fn sched_get_priority_max(policy: c_int) -> c_int; pub fn sched_get_priority_min(policy: c_int) -> c_int; diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/sys/stat.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/sys/stat.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/sys/stat.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/sys/stat.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/sys/types.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/sys/types.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/sys/types.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/sys/types.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/time.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/time.rs similarity index 75% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/time.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/time.rs index ab6f4453d..732297ecb 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/qurt/time.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/qurt/time.rs @@ -31,4 +31,15 @@ extern "C" { pub fn strptime(s: *const c_char, format: *const c_char, tm: *mut tm) -> *mut c_char; pub fn clock_gettime(clk_id: clockid_t, tp: *mut timespec) -> c_int; pub fn nanosleep(req: *const timespec, rem: *mut timespec) -> c_int; + + // POSIX timer functions (from QuRT time.h) + pub fn timer_create(clockid: clockid_t, evp: *mut sigevent, timerid: *mut timer_t) -> c_int; + pub fn timer_delete(timerid: timer_t) -> c_int; + pub fn timer_gettime(timerid: timer_t, value: *mut itimerspec) -> c_int; + pub fn timer_settime( + timerid: timer_t, + flags: c_int, + value: *const itimerspec, + ovalue: *mut itimerspec, + ) -> c_int; } diff --git a/thirdparty/crates/libc-0.2.186/src/new/qurt/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/qurt/unistd.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/new/qurt/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/qurt/unistd.rs index b973b60e6..654d02a38 100644 --- a/thirdparty/crates/libc-0.2.186/src/new/qurt/unistd.rs +++ b/thirdparty/crates/libc-0.2.189/src/new/qurt/unistd.rs @@ -239,10 +239,26 @@ extern "C" { // Process operations pub fn getpid() -> pid_t; + pub fn getppid() -> pid_t; + pub fn getpgid(pid: pid_t) -> pid_t; + pub fn getpgrp() -> pid_t; + pub fn getuid() -> uid_t; + pub fn geteuid() -> uid_t; + pub fn getgid() -> gid_t; + pub fn getegid() -> gid_t; + pub fn seteuid(uid: uid_t) -> c_int; + pub fn setuid(uid: uid_t) -> c_int; + pub fn setpgid(pid: pid_t, pgid: pid_t) -> c_int; + pub fn setpgrp() -> pid_t; + pub fn setsid() -> pid_t; // Sleep functions pub fn sleep(seconds: c_uint) -> c_uint; + // Sync operations + pub fn fsync(fd: c_int) -> c_int; + // System configuration pub fn sysconf(name: c_int) -> c_long; + pub fn pathconf(path: *const c_char, name: c_int) -> c_long; } diff --git a/thirdparty/crates/libc-0.2.186/src/new/redox/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/redox/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/redox/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/redox/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/relibc/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/relibc/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/relibc/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/relibc/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/relibc/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/relibc/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/relibc/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/relibc/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/rtems/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/rtems/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/rtems/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/rtems/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/sgx/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/sgx/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/sgx/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/sgx/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/sgx/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/sgx/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/sgx/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/sgx/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/solaris/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/solaris/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/solaris/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/solaris/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/solaris/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/solaris/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/solaris/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/solaris/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/solid/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/solid/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/solid/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/solid/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/teeos/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/teeos/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/teeos/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/teeos/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/trusty/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/trusty/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/trusty/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/trusty/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/uclibc/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/uclibc/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/uclibc/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/uclibc/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/uclibc/pthread.rs b/thirdparty/crates/libc-0.2.189/src/new/uclibc/pthread.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/uclibc/pthread.rs rename to thirdparty/crates/libc-0.2.189/src/new/uclibc/pthread.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/uclibc/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/uclibc/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/uclibc/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/uclibc/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/ucrt/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/ucrt/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/ucrt/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/ucrt/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/vita/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/vita/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/vita/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/vita/mod.rs diff --git a/thirdparty/crates/libc-0.2.189/src/new/vxworks/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/vxworks/mod.rs new file mode 100644 index 000000000..31600129d --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/new/vxworks/mod.rs @@ -0,0 +1,7 @@ +//! VxWorks libc. +//! +//! VxWorks allows compiling different types of programs. The `libc` crate only +//! supports RTPs. Refer to the RTP definitions in case of discrepancy. +// FIXME(vxworks): link to headers needed. + +pub(crate) mod unistd; diff --git a/thirdparty/crates/libc-0.2.186/src/new/vxworks/unistd.rs b/thirdparty/crates/libc-0.2.189/src/new/vxworks/unistd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/vxworks/unistd.rs rename to thirdparty/crates/libc-0.2.189/src/new/vxworks/unistd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/wasi/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/wasi/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/wasi/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/wasi/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/new/xous/mod.rs b/thirdparty/crates/libc-0.2.189/src/new/xous/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/new/xous/mod.rs rename to thirdparty/crates/libc-0.2.189/src/new/xous/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/primitives.rs b/thirdparty/crates/libc-0.2.189/src/primitives.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/primitives.rs rename to thirdparty/crates/libc-0.2.189/src/primitives.rs diff --git a/thirdparty/crates/libc-0.2.186/src/psp.rs b/thirdparty/crates/libc-0.2.189/src/psp.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/psp.rs rename to thirdparty/crates/libc-0.2.189/src/psp.rs index 823567127..99a72b702 100644 --- a/thirdparty/crates/libc-0.2.186/src/psp.rs +++ b/thirdparty/crates/libc-0.2.189/src/psp.rs @@ -2415,9 +2415,9 @@ pub const USB_CAM_FLIP: i32 = 1; pub const USB_CAM_MIRROR: i32 = 0x100; pub const THREAD_ATTR_VFPU: i32 = 0x00004000; -pub const THREAD_ATTR_USER: i32 = 0x80000000; -pub const THREAD_ATTR_USBWLAN: i32 = 0xa0000000; -pub const THREAD_ATTR_VSH: i32 = 0xc0000000; +pub const THREAD_ATTR_USER: i32 = u32_cast_int(0x80000000); +pub const THREAD_ATTR_USBWLAN: i32 = u32_cast_int(0xa0000000); +pub const THREAD_ATTR_VSH: i32 = u32_cast_int(0xc0000000); pub const THREAD_ATTR_SCRATCH_SRAM: i32 = 0x00008000; pub const THREAD_ATTR_NO_FILLSTACK: i32 = 0x00100000; pub const THREAD_ATTR_CLEAR_STACK: i32 = 0x00200000; @@ -2428,7 +2428,7 @@ pub const EVENT_WAIT_AND: i32 = 0; pub const EVENT_WAIT_OR: i32 = 1; pub const EVENT_WAIT_CLEAR: i32 = 0x20; -pub const POWER_INFO_POWER_SWITCH: i32 = 0x80000000; +pub const POWER_INFO_POWER_SWITCH: i32 = u32_cast_int(0x80000000); pub const POWER_INFO_HOLD_SWITCH: i32 = 0x40000000; pub const POWER_INFO_STANDBY: i32 = 0x00080000; pub const POWER_INFO_RESUME_COMPLETE: i32 = 0x00040000; diff --git a/thirdparty/crates/libc-0.2.186/src/qurt/mod.rs b/thirdparty/crates/libc-0.2.189/src/qurt/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/qurt/mod.rs rename to thirdparty/crates/libc-0.2.189/src/qurt/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/sgx.rs b/thirdparty/crates/libc-0.2.189/src/sgx.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/sgx.rs rename to thirdparty/crates/libc-0.2.189/src/sgx.rs diff --git a/thirdparty/crates/libc-0.2.186/src/solid/aarch64.rs b/thirdparty/crates/libc-0.2.189/src/solid/aarch64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/solid/aarch64.rs rename to thirdparty/crates/libc-0.2.189/src/solid/aarch64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/solid/arm.rs b/thirdparty/crates/libc-0.2.189/src/solid/arm.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/solid/arm.rs rename to thirdparty/crates/libc-0.2.189/src/solid/arm.rs diff --git a/thirdparty/crates/libc-0.2.186/src/solid/mod.rs b/thirdparty/crates/libc-0.2.189/src/solid/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/solid/mod.rs rename to thirdparty/crates/libc-0.2.189/src/solid/mod.rs index 0182f8150..d14dcf88d 100644 --- a/thirdparty/crates/libc-0.2.186/src/solid/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/solid/mod.rs @@ -207,10 +207,10 @@ pub const S_IWRITE: c_short = 0o0200; pub const S_IREAD: c_short = 0o0400; pub const S_IFCHR: c_short = 0o2_0000; pub const S_IFDIR: c_short = 0o4_0000; -pub const S_IFMT: c_short = 0o16_0000; +pub const S_IFMT: c_short = u16_cast_short(0o16_0000); pub const S_IFIFO: c_short = 0o1_0000; pub const S_IFBLK: c_short = 0o6_0000; -pub const S_IFREG: c_short = 0o10_0000; +pub const S_IFREG: c_short = u16_cast_short(0o10_0000); pub const LC_ALL: c_int = 0; pub const LC_COLLATE: c_int = 1; @@ -219,6 +219,9 @@ pub const LC_MONETARY: c_int = 3; pub const LC_NUMERIC: c_int = 4; pub const LC_TIME: c_int = 5; pub const LC_MESSAGES: c_int = 6; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const _LC_LAST: c_int = 7; pub const EPERM: c_int = 1; @@ -397,8 +400,8 @@ pub const SIGUSR2: c_int = 31; pub const SIGPWR: c_int = 32; extern_ty! { - pub enum FILE {} - pub enum fpos_t {} + pub type FILE; + pub type fpos_t; } extern "C" { diff --git a/thirdparty/crates/libc-0.2.186/src/switch.rs b/thirdparty/crates/libc-0.2.189/src/switch.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/switch.rs rename to thirdparty/crates/libc-0.2.189/src/switch.rs diff --git a/thirdparty/crates/libc-0.2.186/src/teeos/mod.rs b/thirdparty/crates/libc-0.2.189/src/teeos/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/teeos/mod.rs rename to thirdparty/crates/libc-0.2.189/src/teeos/mod.rs index 89a30a888..daf4cf31f 100644 --- a/thirdparty/crates/libc-0.2.186/src/teeos/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/teeos/mod.rs @@ -41,7 +41,7 @@ pub type pthread_spinlock_t = c_int; pub type off_t = i64; -pub type time_t = c_long; +pub type time_t = i64; pub type clock_t = c_long; @@ -49,7 +49,7 @@ pub type clockid_t = c_int; pub type suseconds_t = c_long; -pub type once_fn = extern "C" fn() -> c_void; +pub type once_fn = extern "C" fn(); pub type pthread_once_t = c_int; diff --git a/thirdparty/crates/libc-0.2.186/src/trusty.rs b/thirdparty/crates/libc-0.2.189/src/trusty.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/trusty.rs rename to thirdparty/crates/libc-0.2.189/src/trusty.rs diff --git a/thirdparty/crates/libc-0.2.189/src/types.rs b/thirdparty/crates/libc-0.2.189/src/types.rs new file mode 100644 index 000000000..7be6e78bc --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/types.rs @@ -0,0 +1,140 @@ +//! Platform-agnostic support types. + +#[cfg(feature = "extra_traits")] +use core::hash::Hash; +use core::mem::MaybeUninit; + +use crate::prelude::*; + +/// A transparent wrapper over `MaybeUninit` to represent uninitialized padding +/// while providing `Default`. +// This is restricted to `Copy` types since that's a loose indicator that zeros is actually +// a valid bitpattern. There is no technical reason this is required, though, so it could be +// lifted in the future if it becomes a problem. +#[allow(dead_code)] +#[repr(transparent)] +#[derive(Clone, Copy)] +pub(crate) struct Padding(MaybeUninit); + +impl Default for Padding { + fn default() -> Self { + Self(MaybeUninit::zeroed()) + } +} + +impl Padding { + /// Create a `Padding` initialized with the given value. + #[allow(dead_code)] + pub(crate) const fn new(val: T) -> Self { + Self(MaybeUninit::new(val)) + } +} + +impl fmt::Debug for Padding { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + // Taken from `MaybeUninit`'s debug implementation + // NB: there is no `.pad_fmt` so we can't use a simpler `format_args!("Padding<{..}>"). + let full_name = core::any::type_name::(); + let prefix_len = full_name.find("Padding").unwrap(); + f.pad(&full_name[prefix_len..]) + } +} + +/// Do nothing when hashing to ignore the existence of padding fields. +#[cfg(feature = "extra_traits")] +impl Hash for Padding { + fn hash(&self, _state: &mut H) {} +} + +/// Padding fields are all equal, regardless of what is inside them, so they do not affect anything. +#[cfg(feature = "extra_traits")] +impl PartialEq for Padding { + fn eq(&self, _other: &Self) -> bool { + true + } +} + +/// Mark that `Padding` implements `Eq` so that it can be used in types that implement it. +#[cfg(feature = "extra_traits")] +impl Eq for Padding {} + +/// The default repr type used for C style enums in Rust. +#[cfg(target_env = "msvc")] +#[allow(unused)] +pub(crate) type CEnumRepr = c_int; +#[cfg(not(target_env = "msvc"))] +#[allow(unused)] +pub(crate) type CEnumRepr = c_uint; + +/// Used to avoid `overflowing_literals` when the value is in-range for the unsigned number but +/// out-of-range for signed. +#[allow(unused)] +pub(crate) const fn u16_cast_short(x: u16) -> c_short { + assert!(size_of::() <= size_of::()); // Should always be true + x as i16 +} + +/// Used to avoid `overflowing_literals` when the value is in-range for the unsigned number but +/// out-of-range for signed. +#[allow(unused)] +pub(crate) const fn u32_cast_int(x: u32) -> c_int { + // May not be true on 16-bit platforms, but should be everywhere this is used. + assert!(size_of::() <= size_of::()); + x as i32 +} + +/// Used to avoid `overflowing_literals` when the value is in-range for the unsigned number but +/// out-of-range for signed. +#[allow(unused)] +pub(crate) const fn u32_cast_long(x: u32) -> c_long { + assert!(size_of::() <= size_of::()); // Should always be true + x as c_long +} + +/// Checked casting from `unsigned long` to `int`. +#[allow(unused)] +pub(crate) const fn ulong_cast_int(x: c_ulong) -> c_int { + assert!(x <= (c_int::MAX as c_ulong)); + x as c_int +} + +/// Checked casting from `unsigned long` to `unsigned int`. +#[allow(unused)] +pub(crate) const fn ulong_cast_uint(x: c_ulong) -> c_uint { + assert!(x <= (c_uint::MAX as c_ulong)); + x as c_uint +} + +/// Used to avoid `overflowing_literals` when the value is in-range for the unsigned number but +/// out-of-range for signed. +#[allow(unused)] +#[cfg(any(target_os = "linux", target_os = "android", target_os = "l4re"))] +pub(crate) const fn u32_cast_ioctl(x: u32) -> crate::Ioctl { + assert!(size_of::() <= size_of::()); // Should always be true + x as crate::Ioctl +} + +#[allow(unused)] +pub(crate) const fn u8_slice_cast_char_slice(x: &[u8]) -> &[c_char] { + assert!(size_of::() == size_of::()); + // SAFETY: same repr, possibly just a sign cast + unsafe { mem::transmute::<&[u8], &[c_char]>(x) } +} + +/// Replace bytes in an array with those from a slice. This is a polyfill for `[T]::copy_from_slice` +/// in `const`. +// FIXME(msrv): we can switch to `copy_from_slice` in 1.87. +#[must_use] +#[allow(dead_code)] +pub const fn replace_array_items( + mut dst: [T; N], + src: &[T], + start: usize, +) -> [T; N] { + let mut i = 0; + while i < src.len() { + dst[i + start] = src[i]; + i += 1; + } + dst +} diff --git a/thirdparty/crates/libc-0.2.186/src/unix/aix/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/aix/mod.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/aix/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/aix/mod.rs index 71d041f7b..6f5a02a28 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/aix/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/aix/mod.rs @@ -774,7 +774,7 @@ pub const IPV6_FLOWINFO_FLOWLABEL: c_int = 0x00ffffff; pub const IPV6_FLOWINFO_PRIORITY: c_int = 0x0f000000; pub const IPV6_FLOWINFO_PRIFLOW: c_int = 0x0fffffff; pub const IPV6_FLOWINFO_SRFLAG: c_int = 0x10000000; -pub const IPV6_FLOWINFO_VERSION: c_int = 0xf0000000; +pub const IPV6_FLOWINFO_VERSION: c_int = u32_cast_int(0xf0000000); pub const IPV6_HOPLIMIT: c_int = 40; pub const IPV6_HOPOPTS: c_int = 52; pub const IPV6_NEXTHOP: c_int = 48; @@ -809,20 +809,20 @@ pub const DLT_PPP: c_int = 0x17; pub const DLT_FDDI: c_int = 0xf; pub const DLT_ATM: c_int = 0x25; pub const DLT_IPOIB: c_int = 0xc7; -pub const BIOCSETF: c_int = 0x80104267; +pub const BIOCSETF: c_int = u32_cast_int(0x80104267); pub const BIOCGRTIMEOUT: c_int = 0x4010426e; pub const BIOCGBLEN: c_int = 0x40044266; -pub const BIOCSBLEN: c_int = 0xc0044266; +pub const BIOCSBLEN: c_int = u32_cast_int(0xc0044266); pub const BIOCFLUSH: c_int = 0x20004268; pub const BIOCPROMISC: c_int = 0x20004269; pub const BIOCGDLT: c_int = 0x4004426a; -pub const BIOCSRTIMEOUT: c_int = 0x8010426d; +pub const BIOCSRTIMEOUT: c_int = u32_cast_int(0x8010426d); pub const BIOCGSTATS: c_int = 0x4008426f; -pub const BIOCIMMEDIATE: c_int = 0x80044270; +pub const BIOCIMMEDIATE: c_int = u32_cast_int(0x80044270); pub const BIOCVERSION: c_int = 0x40044271; pub const BIOCSDEVNO: c_int = 0x20004272; pub const BIOCGETIF: c_int = 0x4020426b; -pub const BIOCSETIF: c_int = 0x8020426c; +pub const BIOCSETIF: c_int = u32_cast_int(0x8020426c); pub const BPF_ABS: c_int = 32; pub const BPF_ADD: c_int = 0; pub const BPF_ALIGNMENT: c_ulong = 4; @@ -931,7 +931,11 @@ pub const RTAX_IFP: c_int = 4; pub const RTAX_IFA: c_int = 5; pub const RTAX_AUTHOR: c_int = 6; pub const RTAX_BRD: c_int = 7; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RTAX_MAX: c_int = 8; + pub const RTF_UP: c_int = 0x1; pub const RTF_GATEWAY: c_int = 0x2; pub const RTF_HOST: c_int = 0x4; @@ -1350,15 +1354,15 @@ pub const IOC_INOUT: c_int = IOC_IN | IOC_OUT; pub const FIOCLEX: c_int = 0x20006601; pub const FIONCLEX: c_int = 0x20006602; pub const FIONREAD: c_int = 0x4004667f; -pub const FIONBIO: c_int = 0x8004667e; -pub const FIOASYNC: c_int = 0x8004667d; -pub const FIOSETOWN: c_int = 0x8004667c; +pub const FIONBIO: c_int = u32_cast_int(0x8004667e); +pub const FIOASYNC: c_int = u32_cast_int(0x8004667d); +pub const FIOSETOWN: c_int = u32_cast_int(0x8004667c); pub const FIOGETOWN: c_int = 0x4004667b; pub const TIOCGETD: c_int = 0x40047400; -pub const TIOCSETD: c_int = 0x80047401; +pub const TIOCSETD: c_int = u32_cast_int(0x80047401); pub const TIOCHPCL: c_int = 0x20007402; pub const TIOCMODG: c_int = 0x40047403; -pub const TIOCMODS: c_int = 0x80047404; +pub const TIOCMODS: c_int = u32_cast_int(0x80047404); pub const TIOCM_LE: c_int = 0x1; pub const TIOCM_DTR: c_int = 0x2; pub const TIOCM_RTS: c_int = 0x4; @@ -1371,45 +1375,45 @@ pub const TIOCM_RNG: c_int = 0x80; pub const TIOCM_RI: c_int = 0x80; pub const TIOCM_DSR: c_int = 0x100; pub const TIOCGETP: c_int = 0x40067408; -pub const TIOCSETP: c_int = 0x80067409; -pub const TIOCSETN: c_int = 0x8006740a; +pub const TIOCSETP: c_int = u32_cast_int(0x80067409); +pub const TIOCSETN: c_int = u32_cast_int(0x8006740a); pub const TIOCEXCL: c_int = 0x2000740d; pub const TIOCNXCL: c_int = 0x2000740e; -pub const TIOCFLUSH: c_int = 0x80047410; -pub const TIOCSETC: c_int = 0x80067411; +pub const TIOCFLUSH: c_int = u32_cast_int(0x80047410); +pub const TIOCSETC: c_int = u32_cast_int(0x80067411); pub const TIOCGETC: c_int = 0x40067412; pub const TANDEM: c_int = 0x1; pub const CBREAK: c_int = 0x2; pub const LCASE: c_int = 0x4; pub const MDMBUF: c_int = 0x800000; pub const XTABS: c_int = 0xc00; -pub const SIOCADDMULTI: c_int = 0x80206931; -pub const SIOCADDRT: c_int = 0x8038720a; -pub const SIOCDARP: c_int = 0x804c6920; -pub const SIOCDELMULTI: c_int = 0x80206932; -pub const SIOCDELRT: c_int = 0x8038720b; -pub const SIOCDIFADDR: c_int = 0x80286919; -pub const SIOCGARP: c_int = 0xc04c6926; -pub const SIOCGIFADDR: c_int = 0xc0286921; -pub const SIOCGIFBRDADDR: c_int = 0xc0286923; -pub const SIOCGIFCONF: c_int = 0xc0106945; -pub const SIOCGIFDSTADDR: c_int = 0xc0286922; -pub const SIOCGIFFLAGS: c_int = 0xc0286911; -pub const SIOCGIFHWADDR: c_int = 0xc0546995; -pub const SIOCGIFMETRIC: c_int = 0xc0286917; -pub const SIOCGIFMTU: c_int = 0xc0286956; -pub const SIOCGIFNETMASK: c_int = 0xc0286925; -pub const SIOCSARP: c_int = 0x804c691e; -pub const SIOCSIFADDR: c_int = 0x8028690c; -pub const SIOCSIFBRDADDR: c_int = 0x80286913; -pub const SIOCSIFDSTADDR: c_int = 0x8028690e; -pub const SIOCSIFFLAGS: c_int = 0x80286910; -pub const SIOCSIFMETRIC: c_int = 0x80286918; -pub const SIOCSIFMTU: c_int = 0x80286958; -pub const SIOCSIFNETMASK: c_int = 0x80286916; -pub const TIOCUCNTL: c_int = 0x80047466; -pub const TIOCCONS: c_int = 0x80047462; -pub const TIOCPKT: c_int = 0x80047470; +pub const SIOCADDMULTI: c_int = u32_cast_int(0x80206931); +pub const SIOCADDRT: c_int = u32_cast_int(0x8038720a); +pub const SIOCDARP: c_int = u32_cast_int(0x804c6920); +pub const SIOCDELMULTI: c_int = u32_cast_int(0x80206932); +pub const SIOCDELRT: c_int = u32_cast_int(0x8038720b); +pub const SIOCDIFADDR: c_int = u32_cast_int(0x80286919); +pub const SIOCGARP: c_int = u32_cast_int(0xc04c6926); +pub const SIOCGIFADDR: c_int = u32_cast_int(0xc0286921); +pub const SIOCGIFBRDADDR: c_int = u32_cast_int(0xc0286923); +pub const SIOCGIFCONF: c_int = u32_cast_int(0xc0106945); +pub const SIOCGIFDSTADDR: c_int = u32_cast_int(0xc0286922); +pub const SIOCGIFFLAGS: c_int = u32_cast_int(0xc0286911); +pub const SIOCGIFHWADDR: c_int = u32_cast_int(0xc0546995); +pub const SIOCGIFMETRIC: c_int = u32_cast_int(0xc0286917); +pub const SIOCGIFMTU: c_int = u32_cast_int(0xc0286956); +pub const SIOCGIFNETMASK: c_int = u32_cast_int(0xc0286925); +pub const SIOCSARP: c_int = u32_cast_int(0x804c691e); +pub const SIOCSIFADDR: c_int = u32_cast_int(0x8028690c); +pub const SIOCSIFBRDADDR: c_int = u32_cast_int(0x80286913); +pub const SIOCSIFDSTADDR: c_int = u32_cast_int(0x8028690e); +pub const SIOCSIFFLAGS: c_int = u32_cast_int(0x80286910); +pub const SIOCSIFMETRIC: c_int = u32_cast_int(0x80286918); +pub const SIOCSIFMTU: c_int = u32_cast_int(0x80286958); +pub const SIOCSIFNETMASK: c_int = u32_cast_int(0x80286916); +pub const TIOCUCNTL: c_int = u32_cast_int(0x80047466); +pub const TIOCCONS: c_int = u32_cast_int(0x80047462); +pub const TIOCPKT: c_int = u32_cast_int(0x80047470); pub const TIOCPKT_DATA: c_int = 0; pub const TIOCPKT_FLUSHREAD: c_int = 1; pub const TIOCPKT_FLUSHWRITE: c_int = 2; @@ -1445,7 +1449,11 @@ pub const L_GETPROCINFO: c_int = 7; pub const L_GETXINFO: c_int = 8; // sys/limits.h + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PATH_MAX: c_int = 1023; + pub const PAGESIZE: c_int = 4096; pub const IOV_MAX: c_int = 16; pub const AIO_LISTIO_MAX: c_int = 4096; @@ -1454,14 +1462,37 @@ pub const OPEN_MAX: c_int = 65534; pub const MAX_INPUT: c_int = 512; pub const MAX_CANON: c_int = 256; pub const ARG_MAX: c_int = 1048576; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const BC_BASE_MAX: c_int = 99; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const BC_DIM_MAX: c_int = 0x800; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const BC_SCALE_MAX: c_int = 99; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const BC_STRING_MAX: c_int = 0x800; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const CHARCLASS_NAME_MAX: c_int = 14; + pub const CHILD_MAX: c_int = 128; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const COLL_WEIGHTS_MAX: c_int = 4; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const EXPR_NEST_MAX: c_int = 32; + pub const NZERO: c_int = 20; // sys/lockf.h @@ -1541,7 +1572,11 @@ pub const MAXPATHLEN: c_int = PATH_MAX + 1; pub const MAXSYMLINKS: c_int = 20; pub const MAXHOSTNAMELEN: c_int = 256; pub const MAXUPRC: c_int = 128; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NGROUPS_MAX: c_ulong = 2048; + pub const NGROUPS: c_ulong = NGROUPS_MAX; pub const NOFILE: c_int = OPEN_MAX; @@ -1552,7 +1587,7 @@ pub const POLLOUT: c_short = 0x0002; pub const POLLERR: c_short = 0x4000; pub const POLLHUP: c_short = 0x2000; pub const POLLMSG: c_short = 0x0080; -pub const POLLSYNC: c_short = 0x8000; +pub const POLLSYNC: c_short = u16_cast_short(0x8000); pub const POLLNVAL: c_short = POLLSYNC; pub const POLLNORM: c_short = POLLIN; pub const POLLRDNORM: c_short = 0x0010; @@ -1676,11 +1711,11 @@ pub const SETALL: c_int = 9; // sys/shm.h pub const SHMLBA: c_int = 0x10000000; pub const SHMLBA_EXTSHM: c_int = 0x1000; -pub const SHM_SHMAT: c_int = 0x80000000; +pub const SHM_SHMAT: c_int = u32_cast_int(0x80000000); pub const SHM_RDONLY: c_int = 0o10000; pub const SHM_RND: c_int = 0o20000; pub const SHM_PIN: c_int = 0o4000; -pub const SHM_LGPAGE: c_int = 0o20000000000; +pub const SHM_LGPAGE: c_int = u32_cast_int(0o20000000000); pub const SHM_MAP: c_int = 0o4000; pub const SHM_FMAP: c_int = 0o2000; pub const SHM_COPY: c_int = 0o40000; @@ -1739,7 +1774,11 @@ pub const SIGXCPU: c_int = 24; pub const SIGXFSZ: c_int = 25; pub const SIGTRAP: c_int = 5; pub const SIGCLD: c_int = 20; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SIGRTMAX: c_int = 57; + pub const SIGRTMIN: c_int = 50; pub const SI_USER: c_int = 0; pub const SI_UNDEFINED: c_int = 8; @@ -1817,7 +1856,11 @@ pub const AF_INET6: c_int = 24; pub const AF_INTF: c_int = 20; pub const AF_RIF: c_int = 21; pub const AF_NDD: c_int = 23; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const AF_MAX: c_int = 30; + pub const PF_UNSPEC: c_int = AF_UNSPEC; pub const PF_UNIX: c_int = AF_UNIX; pub const PF_INET: c_int = AF_INET; @@ -1843,7 +1886,11 @@ pub const PF_RIF: c_int = AF_RIF; pub const PF_INTF: c_int = AF_INTF; pub const PF_NDD: c_int = AF_NDD; pub const PF_INET6: c_int = AF_INET6; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PF_MAX: c_int = AF_MAX; + pub const SF_CLOSE: c_int = 1; pub const SF_REUSE: c_int = 2; pub const SF_DONT_CACHE: c_int = 4; @@ -2074,30 +2121,30 @@ pub const TCIOFF: c_int = 2; pub const TCION: c_int = 3; pub const TIOC: c_int = 0x5400; pub const TIOCGWINSZ: c_int = 0x40087468; -pub const TIOCSWINSZ: c_int = 0x80087467; -pub const TIOCLBIS: c_int = 0x8004747f; -pub const TIOCLBIC: c_int = 0x8004747e; -pub const TIOCLSET: c_int = 0x8004747d; +pub const TIOCSWINSZ: c_int = u32_cast_int(0x80087467); +pub const TIOCLBIS: c_int = u32_cast_int(0x8004747f); +pub const TIOCLBIC: c_int = u32_cast_int(0x8004747e); +pub const TIOCLSET: c_int = u32_cast_int(0x8004747d); pub const TIOCLGET: c_int = 0x4004747c; pub const TIOCSBRK: c_int = 0x2000747b; pub const TIOCCBRK: c_int = 0x2000747a; pub const TIOCSDTR: c_int = 0x20007479; pub const TIOCCDTR: c_int = 0x20007478; -pub const TIOCSLTC: c_int = 0x80067475; +pub const TIOCSLTC: c_int = u32_cast_int(0x80067475); pub const TIOCGLTC: c_int = 0x40067474; pub const TIOCOUTQ: c_int = 0x40047473; pub const TIOCNOTTY: c_int = 0x20007471; pub const TIOCSTOP: c_int = 0x2000746f; pub const TIOCSTART: c_int = 0x2000746e; pub const TIOCGPGRP: c_int = 0x40047477; -pub const TIOCSPGRP: c_int = 0x80047476; +pub const TIOCSPGRP: c_int = u32_cast_int(0x80047476); pub const TIOCGSID: c_int = 0x40047448; -pub const TIOCSTI: c_int = 0x80017472; -pub const TIOCMSET: c_int = 0x8004746d; -pub const TIOCMBIS: c_int = 0x8004746c; -pub const TIOCMBIC: c_int = 0x8004746b; +pub const TIOCSTI: c_int = u32_cast_int(0x80017472); +pub const TIOCMSET: c_int = u32_cast_int(0x8004746d); +pub const TIOCMBIS: c_int = u32_cast_int(0x8004746c); +pub const TIOCMBIC: c_int = u32_cast_int(0x8004746b); pub const TIOCMGET: c_int = 0x4004746a; -pub const TIOCREMOTE: c_int = 0x80047469; +pub const TIOCREMOTE: c_int = u32_cast_int(0x80047469); // sys/user.h pub const MAXCOMLEN: c_int = 32; @@ -2411,22 +2458,22 @@ pub const DEAD_PROCESS: c_short = 8; pub const ACCOUNTING: c_short = 9; f! { - pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { if (*mhdr).msg_controllen as usize >= size_of::() { (*mhdr).msg_control as *mut cmsghdr } else { - core::ptr::null_mut::() + ptr::null_mut() } } - pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if cmsg.is_null() { CMSG_FIRSTHDR(mhdr) } else { if (cmsg as usize + (*cmsg).cmsg_len as usize + size_of::()) > ((*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize) { - core::ptr::null_mut::() + ptr::null_mut() } else { // AIX does not have any alignment/padding for ancillary data, so we don't need _CMSG_ALIGN here. (cmsg as usize + (*cmsg).cmsg_len as usize) as *mut cmsghdr @@ -2434,39 +2481,37 @@ f! { } } - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { (cmsg as *mut c_uchar).offset(size_of::() as isize) } - pub const fn CMSG_LEN(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(length: c_uint) -> c_uint { size_of::() as c_uint + length } - pub const fn CMSG_SPACE(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(length: c_uint) -> c_uint { size_of::() as c_uint + length } - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in (*set).fds_bits.iter_mut() { - *slot = 0; - } + pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { + (*set).fds_bits.fill(0); } - pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let bits = size_of::() * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] |= 1 << (fd % bits); return; } - pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let bits = size_of::() * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); return; } - pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let bits = size_of::() * 8; let fd = fd as usize; return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0; @@ -2474,11 +2519,11 @@ f! { } safe_f! { - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { (status & _W_STOPPED) != 0 } - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { if WIFSTOPPED(status) { (((status as c_uint) >> 8) & 0xff) as c_int } else { @@ -2486,11 +2531,11 @@ safe_f! { } } - pub const fn WIFEXITED(status: c_int) -> bool { + pub const safe fn WIFEXITED(status: c_int) -> bool { (status & 0xFF) == 0 } - pub const fn WEXITSTATUS(status: c_int) -> c_int { + pub const safe fn WEXITSTATUS(status: c_int) -> c_int { if WIFEXITED(status) { (((status as c_uint) >> 8) & 0xff) as c_int } else { @@ -2498,11 +2543,11 @@ safe_f! { } } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { !WIFEXITED(status) && !WIFSTOPPED(status) } - pub const fn WTERMSIG(status: c_int) -> c_int { + pub const safe fn WTERMSIG(status: c_int) -> c_int { if WIFSIGNALED(status) { (((status as c_uint) >> 16) & 0xff) as c_int } else { @@ -2510,26 +2555,26 @@ safe_f! { } } - pub const fn WIFCONTINUED(status: c_int) -> bool { + pub const safe fn WIFCONTINUED(status: c_int) -> bool { (status & WCONTINUED) != 0 } // AIX doesn't have native WCOREDUMP. - pub const fn WCOREDUMP(_status: c_int) -> bool { + pub const safe fn WCOREDUMP(_status: c_int) -> bool { false } - pub const fn major(dev: crate::dev_t) -> c_uint { + pub const safe fn major(dev: crate::dev_t) -> c_uint { let x = dev >> 16; x as c_uint } - pub const fn minor(dev: crate::dev_t) -> c_uint { + pub const safe fn minor(dev: crate::dev_t) -> c_uint { let y = dev & 0xFFFF; y as c_uint } - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { let major = major as crate::dev_t; let minor = minor as crate::dev_t; let mut dev = 0; @@ -2648,12 +2693,12 @@ extern "C" { pub fn pthread_cancel(thread: crate::pthread_t) -> c_int; - pub fn pthread_cleanup_pop(execute: c_int) -> c_void; + pub fn pthread_cleanup_pop(execute: c_int); pub fn pthread_cleanup_push( routine: Option, arg: *mut c_void, - ) -> c_void; + ); pub fn pthread_condattr_getclock( attr: *const pthread_condattr_t, @@ -2794,7 +2839,7 @@ extern "C" { pub fn pthread_spin_trylock(lock: *mut pthread_spinlock_t) -> c_int; pub fn pthread_spin_unlock(lock: *mut pthread_spinlock_t) -> c_int; - pub fn pthread_testcancel() -> c_void; + pub fn pthread_testcancel(); } #[link(name = "iconv")] diff --git a/thirdparty/crates/libc-0.2.186/src/unix/aix/powerpc64.rs b/thirdparty/crates/libc-0.2.189/src/unix/aix/powerpc64.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/aix/powerpc64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/aix/powerpc64.rs index 0862cbf85..cd439044d 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/aix/powerpc64.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/aix/powerpc64.rs @@ -3,7 +3,7 @@ use crate::prelude::*; // Define lock_data_instrumented as an empty enum extern_ty! { - pub enum lock_data_instrumented {} + pub type lock_data_instrumented; } s! { diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/apple/b32/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/apple/b32/mod.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/apple/b32/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/apple/b32/mod.rs index ab0c94ef4..e71378ccc 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/apple/b32/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/apple/b32/mod.rs @@ -60,9 +60,6 @@ s_no_extra_traits! { #[deprecated(since = "0.2.55")] pub const NET_RT_MAXID: c_int = 10; -pub const TIOCTIMESTAMP: c_ulong = 0x40087459; -pub const TIOCDCDTIMESTAMP: c_ulong = 0x40087458; - pub const BIOCSETF: c_ulong = 0x80084267; pub const BIOCSRTIMEOUT: c_ulong = 0x8008426d; pub const BIOCGRTIMEOUT: c_ulong = 0x4008426e; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/apple/b64/aarch64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/apple/b64/aarch64/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/apple/b64/aarch64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/apple/b64/aarch64/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/apple/b64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/apple/b64/mod.rs similarity index 95% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/apple/b64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/apple/b64/mod.rs index 5ccf65abb..359aa7978 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/apple/b64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/apple/b64/mod.rs @@ -53,9 +53,6 @@ s! { #[deprecated(since = "0.2.55")] pub const NET_RT_MAXID: c_int = 11; -pub const TIOCTIMESTAMP: c_ulong = 0x40107459; -pub const TIOCDCDTIMESTAMP: c_ulong = 0x40107458; - pub const BIOCSETF: c_ulong = 0x80104267; pub const BIOCSRTIMEOUT: c_ulong = 0x8010426d; pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/apple/b64/x86_64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/apple/b64/x86_64/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/apple/b64/x86_64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/apple/b64/x86_64/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/apple/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/apple/mod.rs similarity index 95% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/apple/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/apple/mod.rs index ff0e24a90..ab6736a5c 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/apple/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/apple/mod.rs @@ -180,7 +180,7 @@ deprecated_mach! { } extern_ty! { - pub enum timezone {} + pub type timezone; } #[derive(Debug)] @@ -628,6 +628,35 @@ s! { pub pbi_start_tvusec: u64, } + pub struct proc_bsdshortinfo { + /// Process ID. + pub pbsi_pid: u32, + /// Process parent ID. + pub pbsi_ppid: u32, + /// Process perp ID. + pub pbsi_pgid: u32, + /// `p_stat` value: `SZOMB`, `SRUN`, etc. + pub pbsi_status: u32, + /// Up to 16 characters of process name. + pub pbsi_comm: [c_char; MAXCOMLEN], + /// 64bit, emulated, etc. + pub pbsi_flags: u32, + /// Current UID on process. + pub pbsi_uid: crate::uid_t, + /// Current GID on process. + pub pbsi_gid: crate::gid_t, + /// Current RUID on process. + pub pbsi_ruid: crate::uid_t, + /// Current RGID on process. + pub pbsi_rgid: crate::gid_t, + /// Current SVUID on process. + pub pbsi_svuid: crate::uid_t, + /// Current SVGID on process. + pub pbsi_svgid: crate::gid_t, + /// Reserved for future use. + pbsi_rfu: u32, + } + pub struct proc_taskallinfo { pub pbsd: proc_bsdinfo, pub ptinfo: proc_taskinfo, @@ -1521,6 +1550,39 @@ s! { pub external_page_count: natural_t, pub internal_page_count: natural_t, pub total_uncompressed_pages_in_compressor: u64, + pub swapped_count: u64, + pub total_tag_storage_pages: u64, + pub nontag_pageable_tag_storage_pages: u64, + pub nontag_wired_tag_storage_pages: u64, + pub free_tag_storage_pages: u64, + pub tag_storing_tag_storage_pages: u64, + pub total_tagged_pages: u64, + pub resident_tagged_pages: u64, + pub compressed_tagged_pages: u64, + pub tagged_compressions: u64, + pub tagged_decompressions: u64, + pub compressed_tag_storage_bytes: u64, + pub speculative_pages_created: u64, + pub speculative_pages_activated: u64, + pub swap_count: u64, + pub empty_tag_storing_tag_storage_pages: u64, + pub executable_count: u64, + pub shared_region_count: u64, + pub boot_stolen_count: u64, + pub secluded_count: u64, + pub active_internal_count: u64, + pub inactive_internal_count: u64, + pub active_external_count: u64, + pub inactive_external_count: u64, + pub purgeable_pageable_count: u64, + pub purgeable_wired_count: u64, + pub background_internal_count: u64, + pub background_external_count: u64, + pub donated_count: u64, + pub realtime_count: u64, + pub max_mem_count: u64, + pub phantom_ghosts_found: u64, + pub phantom_ghosts_added: u64, } #[repr(packed(4))] @@ -1911,6 +1973,41 @@ pub const ABMON_10: crate::nl_item = 42; pub const ABMON_11: crate::nl_item = 43; pub const ABMON_12: crate::nl_item = 44; +pub const REG_BASIC: c_int = 0o0000; +pub const REG_EXTENDED: c_int = 0o0001; +pub const REG_ICASE: c_int = 0o0002; +pub const REG_NOSUB: c_int = 0o0004; +pub const REG_NEWLINE: c_int = 0o0010; +pub const REG_NOSPEC: c_int = 0o0020; +pub const REG_PEND: c_int = 0o0040; +pub const REG_DUMP: c_int = 0o0200; + +pub const REG_NOMATCH: c_int = 1; +pub const REG_BADPAT: c_int = 2; +pub const REG_ECOLLATE: c_int = 3; +pub const REG_ECTYPE: c_int = 4; +pub const REG_EESCAPE: c_int = 5; +pub const REG_ESUBREG: c_int = 6; +pub const REG_EBRACK: c_int = 7; +pub const REG_EPAREN: c_int = 8; +pub const REG_EBRACE: c_int = 9; +pub const REG_BADBR: c_int = 10; +pub const REG_ERANGE: c_int = 11; +pub const REG_ESPACE: c_int = 12; +pub const REG_BADRPT: c_int = 13; +pub const REG_EMPTY: c_int = 14; +pub const REG_ASSERT: c_int = 15; +pub const REG_INVARG: c_int = 16; +pub const REG_ATOI: c_int = 255; +pub const REG_ITOA: c_int = 0o0400; + +pub const REG_NOTBOL: c_int = 0o00001; +pub const REG_NOTEOL: c_int = 0o00002; +pub const REG_STARTEND: c_int = 0o00004; +pub const REG_TRACE: c_int = 0o00400; +pub const REG_LARGE: c_int = 0o01000; +pub const REG_BACKR: c_int = 0o02000; + pub const CLOCK_REALTIME: crate::clockid_t = 0; pub const CLOCK_MONOTONIC_RAW: crate::clockid_t = 4; pub const CLOCK_MONOTONIC_RAW_APPROX: crate::clockid_t = 5; @@ -2075,6 +2172,9 @@ pub const CPU_STATE_USER: c_int = 0; pub const CPU_STATE_SYSTEM: c_int = 1; pub const CPU_STATE_IDLE: c_int = 2; pub const CPU_STATE_NICE: c_int = 3; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const CPU_STATE_MAX: c_int = 4; pub const PROCESSOR_BASIC_INFO: c_int = 1; @@ -2096,9 +2196,9 @@ deprecated_mach! { pub const VM_FLAGS_SUPERPAGE_MASK: c_int = 0x70000; pub const VM_FLAGS_RETURN_DATA_ADDR: c_int = 0x100000; pub const VM_FLAGS_RETURN_4K_DATA_ADDR: c_int = 0x800000; - pub const VM_FLAGS_ALIAS_MASK: c_int = 0xFF000000; - pub const VM_FLAGS_USER_ALLOCATE: c_int = 0xff07401f; - pub const VM_FLAGS_USER_MAP: c_int = 0xff97401f; + pub const VM_FLAGS_ALIAS_MASK: c_int = u32_cast_int(0xFF000000); + pub const VM_FLAGS_USER_ALLOCATE: c_int = u32_cast_int(0xff07401f); + pub const VM_FLAGS_USER_MAP: c_int = u32_cast_int(0xff97401f); pub const VM_FLAGS_USER_REMAP: c_int = VM_FLAGS_FIXED | VM_FLAGS_ANYWHERE | VM_FLAGS_RANDOM_ADDR @@ -2301,7 +2401,11 @@ pub const ENOPOLICY: c_int = 103; pub const ENOTRECOVERABLE: c_int = 104; pub const EOWNERDEAD: c_int = 105; pub const EQFULL: c_int = 106; -pub const ELAST: c_int = 106; +pub const ENOTCAPABLE: c_int = 107; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details.and use. +pub const ELAST: c_int = 107; pub const EAI_AGAIN: c_int = 2; pub const EAI_BADFLAGS: c_int = 3; @@ -2357,80 +2461,6 @@ pub const AT_SYMLINK_NOFOLLOW: c_int = 0x0020; pub const AT_SYMLINK_FOLLOW: c_int = 0x0040; pub const AT_REMOVEDIR: c_int = 0x0080; -pub const TIOCMODG: c_ulong = 0x40047403; -pub const TIOCMODS: c_ulong = 0x80047404; -pub const TIOCM_LE: c_int = 0x1; -pub const TIOCM_DTR: c_int = 0x2; -pub const TIOCM_RTS: c_int = 0x4; -pub const TIOCM_ST: c_int = 0x8; -pub const TIOCM_SR: c_int = 0x10; -pub const TIOCM_CTS: c_int = 0x20; -pub const TIOCM_CAR: c_int = 0x40; -pub const TIOCM_CD: c_int = 0x40; -pub const TIOCM_RNG: c_int = 0x80; -pub const TIOCM_RI: c_int = 0x80; -pub const TIOCM_DSR: c_int = 0x100; -pub const TIOCEXCL: c_int = 0x2000740d; -pub const TIOCNXCL: c_int = 0x2000740e; -pub const TIOCFLUSH: c_ulong = 0x80047410; -pub const TIOCGETD: c_ulong = 0x4004741a; -pub const TIOCSETD: c_ulong = 0x8004741b; -pub const TIOCIXON: c_uint = 0x20007481; -pub const TIOCIXOFF: c_uint = 0x20007480; -pub const TIOCSDTR: c_uint = 0x20007479; -pub const TIOCCDTR: c_uint = 0x20007478; -pub const TIOCGPGRP: c_ulong = 0x40047477; -pub const TIOCSPGRP: c_ulong = 0x80047476; -pub const TIOCOUTQ: c_ulong = 0x40047473; -pub const TIOCSTI: c_ulong = 0x80017472; -pub const TIOCNOTTY: c_uint = 0x20007471; -pub const TIOCPKT: c_ulong = 0x80047470; -pub const TIOCPKT_DATA: c_int = 0x0; -pub const TIOCPKT_FLUSHREAD: c_int = 0x1; -pub const TIOCPKT_FLUSHWRITE: c_int = 0x2; -pub const TIOCPKT_STOP: c_int = 0x4; -pub const TIOCPKT_START: c_int = 0x8; -pub const TIOCPKT_NOSTOP: c_int = 0x10; -pub const TIOCPKT_DOSTOP: c_int = 0x20; -pub const TIOCPKT_IOCTL: c_int = 0x40; -pub const TIOCSTOP: c_uint = 0x2000746f; -pub const TIOCSTART: c_uint = 0x2000746e; -pub const TIOCMSET: c_ulong = 0x8004746d; -pub const TIOCMBIS: c_ulong = 0x8004746c; -pub const TIOCMBIC: c_ulong = 0x8004746b; -pub const TIOCMGET: c_ulong = 0x4004746a; -#[deprecated(since = "0.2.178", note = "Removed in MacOSX 12.0.1")] -pub const TIOCREMOTE: c_ulong = 0x80047469; -pub const TIOCGWINSZ: c_ulong = 0x40087468; -pub const TIOCSWINSZ: c_ulong = 0x80087467; -pub const TIOCUCNTL: c_ulong = 0x80047466; -pub const TIOCSTAT: c_uint = 0x20007465; -pub const TIOCSCONS: c_uint = 0x20007463; -pub const TIOCCONS: c_ulong = 0x80047462; -pub const TIOCSCTTY: c_uint = 0x20007461; -pub const TIOCEXT: c_ulong = 0x80047460; -pub const TIOCSIG: c_uint = 0x2000745f; -pub const TIOCDRAIN: c_uint = 0x2000745e; -pub const TIOCMSDTRWAIT: c_ulong = 0x8004745b; -pub const TIOCMGDTRWAIT: c_ulong = 0x4004745a; -pub const TIOCSDRAINWAIT: c_ulong = 0x80047457; -pub const TIOCGDRAINWAIT: c_ulong = 0x40047456; -pub const TIOCDSIMICROCODE: c_uint = 0x20007455; -pub const TIOCPTYGRANT: c_uint = 0x20007454; -pub const TIOCPTYGNAME: c_uint = 0x40807453; -pub const TIOCPTYUNLK: c_uint = 0x20007452; -pub const TIOCGETA: c_ulong = 0x40487413; -pub const TIOCSETA: c_ulong = 0x80487414; -pub const TIOCSETAW: c_ulong = 0x80487415; -pub const TIOCSETAF: c_ulong = 0x80487416; - -pub const BIOCGRSIG: c_ulong = 0x40044272; -pub const BIOCSRSIG: c_ulong = 0x80044273; -pub const BIOCSDLT: c_ulong = 0x80044278; -pub const BIOCGSEESENT: c_ulong = 0x40044276; -pub const BIOCSSEESENT: c_ulong = 0x80044277; -pub const BIOCGDLTLIST: c_ulong = 0xc00c4279; - pub const FIODTYPE: c_ulong = 0x4004667a; pub const B0: speed_t = 0; @@ -3168,6 +3198,7 @@ pub const EVFILT_MACHPORT: i16 = -8; pub const EVFILT_FS: i16 = -9; pub const EVFILT_USER: i16 = -10; pub const EVFILT_VM: i16 = -12; +pub const EVFILT_EXCEPT: i16 = -15; pub const EV_ADD: u16 = 0x1; pub const EV_DELETE: u16 = 0x2; @@ -3177,6 +3208,9 @@ pub const EV_ONESHOT: u16 = 0x10; pub const EV_CLEAR: u16 = 0x20; pub const EV_RECEIPT: u16 = 0x40; pub const EV_DISPATCH: u16 = 0x80; +pub const EV_UDATA_SPECIFIC: u16 = 0x0100; +pub const EV_DISPATCH2: u16 = EV_DISPATCH | EV_UDATA_SPECIFIC; +pub const EV_VANISHED: u16 = 0x0200; pub const EV_FLAG0: u16 = 0x1000; pub const EV_POLL: u16 = 0x1000; pub const EV_FLAG1: u16 = 0x2000; @@ -3197,6 +3231,7 @@ pub const NOTE_FFCOPY: u32 = 0xc0000000; pub const NOTE_FFCTRLMASK: u32 = 0xc0000000; pub const NOTE_FFLAGSMASK: u32 = 0x00ffffff; pub const NOTE_LOWAT: u32 = 0x00000001; +pub const NOTE_OOB: u32 = 0x00000002; pub const NOTE_DELETE: u32 = 0x00000001; pub const NOTE_WRITE: u32 = 0x00000002; pub const NOTE_EXTEND: u32 = 0x00000004; @@ -3205,6 +3240,9 @@ pub const NOTE_LINK: u32 = 0x00000010; pub const NOTE_RENAME: u32 = 0x00000020; pub const NOTE_REVOKE: u32 = 0x00000040; pub const NOTE_NONE: u32 = 0x00000080; +pub const NOTE_FUNLOCK: u32 = 0x00000100; +pub const NOTE_LEASE_DOWNGRADE: u32 = 0x00000200; +pub const NOTE_LEASE_RELEASE: u32 = 0x00000400; pub const NOTE_EXIT: u32 = 0x80000000; pub const NOTE_FORK: u32 = 0x40000000; pub const NOTE_EXEC: u32 = 0x20000000; @@ -3309,7 +3347,7 @@ pub const CTLTYPE_STRING: c_int = 3; pub const CTLTYPE_QUAD: c_int = 4; pub const CTLTYPE_OPAQUE: c_int = 5; pub const CTLTYPE_STRUCT: c_int = CTLTYPE_OPAQUE; -pub const CTLFLAG_RD: c_int = 0x80000000; +pub const CTLFLAG_RD: c_int = u32_cast_int(0x80000000); pub const CTLFLAG_WR: c_int = 0x40000000; pub const CTLFLAG_RW: c_int = CTLFLAG_RD | CTLFLAG_WR; pub const CTLFLAG_NOLOCK: c_int = 0x20000000; @@ -3546,14 +3584,39 @@ pub const HW_TARGET: c_int = 26; pub const HW_PRODUCT: c_int = 27; pub const HW_MAXID: c_int = 28; pub const USER_CS_PATH: c_int = 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_BASE_MAX: c_int = 2; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_DIM_MAX: c_int = 3; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_SCALE_MAX: c_int = 4; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_STRING_MAX: c_int = 5; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_COLL_WEIGHTS_MAX: c_int = 6; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_EXPR_NEST_MAX: c_int = 7; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_LINE_MAX: c_int = 8; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_RE_DUP_MAX: c_int = 9; + pub const USER_POSIX2_VERSION: c_int = 10; pub const USER_POSIX2_C_BIND: c_int = 11; pub const USER_POSIX2_C_DEV: c_int = 12; @@ -3597,11 +3660,7 @@ pub const SIGEV_THREAD: c_int = 3; pub const AIO_CANCELED: c_int = 2; pub const AIO_NOTCANCELED: c_int = 4; pub const AIO_ALLDONE: c_int = 1; -#[deprecated( - since = "0.2.64", - note = "Can vary at runtime. Use sysconf(3) instead" -)] -pub const AIO_LISTIO_MAX: c_int = 16; +pub const AIO_LISTIO_MAX: c_int = 32; pub const LIO_NOP: c_int = 0; pub const LIO_WRITE: c_int = 2; pub const LIO_READ: c_int = 1; @@ -3676,6 +3735,8 @@ pub const RTV_SSTHRESH: c_int = 0x20; pub const RTV_RTT: c_int = 0x40; pub const RTV_RTTVAR: c_int = 0x80; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RTAX_MAX: c_int = 8; pub const KERN_PROCARGS2: c_int = 49; @@ -3685,6 +3746,7 @@ pub const PROC_PIDTBSDINFO: c_int = 3; pub const PROC_PIDTASKINFO: c_int = 4; pub const PROC_PIDTHREADINFO: c_int = 5; pub const PROC_PIDVNODEPATHINFO: c_int = 9; +pub const PROC_PIDT_SHORTBSDINFO: c_int = 13; pub const PROC_PIDPATHINFO_MAXSIZE: c_int = 4096; pub const PROC_PIDLISTFDS: c_int = 1; @@ -3719,26 +3781,6 @@ pub const MH_MAGIC_64: u32 = 0xfeedfacf; pub const UTUN_OPT_FLAGS: c_int = 1; pub const UTUN_OPT_IFNAME: c_int = 2; -// net/bpf.h -pub const DLT_NULL: c_uint = 0; // no link-layer encapsulation -pub const DLT_EN10MB: c_uint = 1; // Ethernet (10Mb) -pub const DLT_EN3MB: c_uint = 2; // Experimental Ethernet (3Mb) -pub const DLT_AX25: c_uint = 3; // Amateur Radio AX.25 -pub const DLT_PRONET: c_uint = 4; // Proteon ProNET Token Ring -pub const DLT_CHAOS: c_uint = 5; // Chaos -pub const DLT_IEEE802: c_uint = 6; // IEEE 802 Networks -pub const DLT_ARCNET: c_uint = 7; // ARCNET -pub const DLT_SLIP: c_uint = 8; // Serial Line IP -pub const DLT_PPP: c_uint = 9; // Point-to-point Protocol -pub const DLT_FDDI: c_uint = 10; // FDDI -pub const DLT_ATM_RFC1483: c_uint = 11; // LLC/SNAP encapsulated atm -pub const DLT_RAW: c_uint = 12; // raw IP -pub const DLT_LOOP: c_uint = 108; - -// https://github.com/apple/darwin-xnu/blob/HEAD/bsd/net/bpf.h#L100 -// sizeof(i32) -pub const BPF_ALIGNMENT: c_int = 4; - // sys/mount.h pub const MNT_NODEV: c_int = 0x00000010; pub const MNT_UNION: c_int = 0x00000020; @@ -3883,7 +3925,11 @@ pub const MNT_NOWAIT: c_int = 2; // pub const THREAD_STANDARD_POLICY: c_int = 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const THREAD_STANDARD_POLICY_COUNT: c_int = 0; + pub const THREAD_EXTENDED_POLICY: c_int = 1; pub const THREAD_TIME_CONSTRAINT_POLICY: c_int = 2; pub const THREAD_PRECEDENCE_POLICY: c_int = 3; @@ -3945,7 +3991,11 @@ pub const VM_PAGE_QUERY_PAGE_CS_NX: i32 = 0x400; // mach/task_info.h pub const TASK_THREAD_TIMES_INFO: u32 = 3; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const HOST_CPU_LOAD_INFO_COUNT: u32 = 4; + pub const MACH_TASK_BASIC_INFO: u32 = 20; pub const MACH_PORT_NULL: i32 = 0; @@ -4008,7 +4058,10 @@ pub const COPYFILE_STATE_DST_BSIZE: c_int = 12; pub const COPYFILE_STATE_BSIZE: c_int = 13; // +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const ATTR_BIT_MAP_COUNT: c_ushort = 5; + pub const FSOPT_NOFOLLOW: u32 = 0x1; pub const FSOPT_NOFOLLOW_ANY: u32 = 0x800; pub const FSOPT_REPORT_FULLSIZE: u32 = 0x4; @@ -4179,36 +4232,73 @@ const fn __DARWIN_ALIGN32(p: usize) -> usize { (p + __DARWIN_ALIGNBYTES32) & !__DARWIN_ALIGNBYTES32 } +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const THREAD_EXTENDED_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const THREAD_TIME_CONSTRAINT_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const THREAD_PRECEDENCE_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const THREAD_AFFINITY_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const THREAD_BACKGROUND_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const THREAD_LATENCY_QOS_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const THREAD_THROUGHPUT_QOS_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const THREAD_BASIC_INFO_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const THREAD_IDENTIFIER_INFO_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const THREAD_EXTENDED_INFO_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const TASK_THREAD_TIMES_INFO_COUNT: u32 = (size_of::() / size_of::()) as u32; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const MACH_TASK_BASIC_INFO_COUNT: u32 = (size_of::() / size_of::()) as u32; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const HOST_VM_INFO64_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; @@ -4242,7 +4332,7 @@ pub const DOT3COMPLIANCE_COLLS: c_int = 2; pub const MAX_KCTL_NAME: usize = 96; f! { - pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if cmsg.is_null() { return crate::CMSG_FIRSTHDR(mhdr); } @@ -4250,59 +4340,59 @@ f! { let next = cmsg as usize + __DARWIN_ALIGN32(cmsg_len); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next + __DARWIN_ALIGN32(size_of::()) > max { - core::ptr::null_mut() + ptr::null_mut() } else { next as *mut cmsghdr } } - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { (cmsg as *mut c_uchar).add(__DARWIN_ALIGN32(size_of::())) } - pub const fn CMSG_SPACE(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(length: c_uint) -> c_uint { (__DARWIN_ALIGN32(size_of::()) + __DARWIN_ALIGN32(length as usize)) as c_uint } - pub const fn CMSG_LEN(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(length: c_uint) -> c_uint { (__DARWIN_ALIGN32(size_of::()) + length as usize) as c_uint } - pub const fn VM_MAKE_TAG(id: u8) -> u32 { + pub const unsafe fn VM_MAKE_TAG(id: u8) -> u32 { (id as u32) << 24u32 } } safe_f! { - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { status >> 8 } - pub const fn _WSTATUS(status: c_int) -> c_int { + pub const safe fn _WSTATUS(status: c_int) -> c_int { status & 0x7f } - pub const fn WIFCONTINUED(status: c_int) -> bool { + pub const safe fn WIFCONTINUED(status: c_int) -> bool { _WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) == 0x13 } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { _WSTATUS(status) != _WSTOPPED && _WSTATUS(status) != 0 } - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { _WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) != 0x13 } - pub const fn makedev(major: i32, minor: i32) -> dev_t { + pub const safe fn makedev(major: i32, minor: i32) -> dev_t { (major << 24) | minor } - pub const fn major(dev: dev_t) -> i32 { + pub const safe fn major(dev: dev_t) -> i32 { (dev >> 24) & 0xff } - pub const fn minor(dev: dev_t) -> i32 { + pub const safe fn minor(dev: dev_t) -> i32 { dev & 0xffffff } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/dragonfly/mod.rs similarity index 84% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/dragonfly/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/dragonfly/mod.rs index 60e7989bb..773acc66f 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/dragonfly/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/dragonfly/mod.rs @@ -30,26 +30,23 @@ pub type cpuset_t = cpumask_t; pub type cpu_set_t = cpumask_t; pub type register_t = c_long; -pub type umtx_t = c_int; -pub type pthread_barrierattr_t = c_int; -pub type pthread_barrier_t = crate::uintptr_t; +pub type pthread_barrierattr_t = *mut __c_anonymous_pthread_barrierattr; +pub type pthread_barrier_t = *mut __c_anonymous_pthread_barrier; pub type pthread_spinlock_t = crate::uintptr_t; -pub type segsz_t = usize; +pub type segsz_t = isize; pub type vm_prot_t = u8; pub type vm_maptype_t = u8; pub type vm_inherit_t = i8; -pub type vm_subsys_t = c_int; -pub type vm_eflags_t = c_uint; -pub type vm_map_t = *mut __c_anonymous_vm_map; -pub type vm_map_entry_t = *mut vm_map_entry; - -pub type pmap = __c_anonymous_pmap; +pub type vm_map_t = *mut c_void; +pub type vm_map_entry_t = *mut c_void; extern_ty! { - pub enum sem {} + pub type sem; + pub type __c_anonymous_pthread_barrier; + pub type __c_anonymous_pthread_barrierattr; } e! { @@ -191,9 +188,9 @@ s! { pub ifm_msglen: c_ushort, pub ifm_version: c_uchar, pub ifm_type: c_uchar, - pub ifm_addrs: c_int, - pub ifm_flags: c_int, pub ifm_index: c_ushort, + pub ifm_flags: c_int, + pub ifm_addrs: c_int, pub ifm_data: if_data, } @@ -259,7 +256,7 @@ s! { pub cp_nice: u64, pub cp_sys: u64, pub cp_intr: u64, - pub cp_idel: u64, + pub cp_idle: u64, cp_unused01: Padding, cp_unused02: Padding, pub cp_sample_pc: u64, @@ -345,50 +342,6 @@ s! { kp_spare: [c_int; 2], } - pub struct __c_anonymous_vm_map { - _priv: [crate::uintptr_t; 36], - } - - pub struct vm_map_entry { - _priv: [crate::uintptr_t; 15], - pub eflags: crate::vm_eflags_t, - pub maptype: crate::vm_maptype_t, - pub protection: crate::vm_prot_t, - pub max_protection: crate::vm_prot_t, - pub inheritance: crate::vm_inherit_t, - pub wired_count: c_int, - pub id: crate::vm_subsys_t, - } - - pub struct __c_anonymous_pmap { - _priv1: [crate::uintptr_t; 32], - _priv2: [crate::uintptr_t; 32], - _priv3: [crate::uintptr_t; 32], - _priv4: [crate::uintptr_t; 32], - _priv5: [crate::uintptr_t; 8], - } - - pub struct vmspace { - vm_map: __c_anonymous_vm_map, - vm_pmap: __c_anonymous_pmap, - pub vm_flags: c_int, - pub vm_shm: *mut c_char, - pub vm_rssize: crate::segsz_t, - pub vm_swrss: crate::segsz_t, - pub vm_tsize: crate::segsz_t, - pub vm_dsize: crate::segsz_t, - pub vm_ssize: crate::segsz_t, - pub vm_taddr: *mut c_char, - pub vm_daddr: *mut c_char, - pub vm_maxsaddr: *mut c_char, - pub vm_minsaddr: *mut c_char, - _unused1: Padding, - _unused2: Padding, - pub vm_pagesupply: c_int, - pub vm_holdcnt: c_uint, - pub vm_refcnt: c_uint, - } - pub struct cpuctl_msr_args_t { pub msr: c_int, pub data: u64, @@ -481,6 +434,7 @@ s! { __unused3: Padding<*mut c_void>, //actually a function pointer } + #[repr(align(64))] pub struct mcontext_t { pub mc_onstack: register_t, pub mc_rdi: register_t, @@ -540,15 +494,33 @@ pub const MADV_INVAL: c_int = 10; pub const MADV_SETMAP: c_int = 11; pub const O_CLOEXEC: c_int = 0x00020000; pub const O_DIRECTORY: c_int = 0x08000000; +pub const O_FBLOCKING: c_int = 0x00040000; +pub const O_FNONBLOCKING: c_int = 0x00080000; +pub const O_FAPPEND: c_int = 0x00100000; +pub const O_FOFFSET: c_int = 0x00200000; +pub const O_FSYNCWRITE: c_int = 0x00400000; +pub const O_FASYNCWRITE: c_int = 0x00800000; +pub const O_FMASK: c_int = + O_FBLOCKING | O_FNONBLOCKING | O_FAPPEND | O_FOFFSET | O_FSYNCWRITE | O_FASYNCWRITE; pub const F_GETLK: c_int = 7; pub const F_SETLK: c_int = 8; pub const F_SETLKW: c_int = 9; pub const F_GETPATH: c_int = 19; +pub const POSIX_FADV_NORMAL: c_int = 0; +pub const POSIX_FADV_SEQUENTIAL: c_int = 1; +pub const POSIX_FADV_RANDOM: c_int = 2; +pub const POSIX_FADV_WILLNEED: c_int = 3; +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; pub const ENOMEDIUM: c_int = 93; pub const ENOTRECOVERABLE: c_int = 94; pub const EOWNERDEAD: c_int = 95; pub const EASYNC: c_int = 99; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details.and use. pub const ELAST: c_int = 99; + pub const RLIMIT_POSIXLOCKS: c_int = 11; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: crate::rlim_t = 12; @@ -604,7 +576,8 @@ pub const KERN_USRSTACK: c_int = 33; pub const KERN_LOGSIGEXIT: c_int = 34; pub const KERN_IOV_MAX: c_int = 35; pub const KERN_MAXPOSIXLOCKSPERUID: c_int = 36; -pub const KERN_MAXID: c_int = 37; +pub const KERN_STATIC_TLS_EXTRA: c_int = 37; +pub const KERN_MAXID: c_int = 38; pub const KERN_PROC_ALL: c_int = 0; pub const KERN_PROC_PID: c_int = 1; pub const KERN_PROC_PGRP: c_int = 2; @@ -641,14 +614,39 @@ pub const HW_MACHINE_PLATFORM: c_int = 12; pub const HW_SENSORS: c_int = 13; pub const HW_MAXID: c_int = 14; pub const USER_CS_PATH: c_int = 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_BASE_MAX: c_int = 2; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_DIM_MAX: c_int = 3; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_SCALE_MAX: c_int = 4; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_STRING_MAX: c_int = 5; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_COLL_WEIGHTS_MAX: c_int = 6; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_EXPR_NEST_MAX: c_int = 7; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_LINE_MAX: c_int = 8; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_RE_DUP_MAX: c_int = 9; + pub const USER_POSIX2_VERSION: c_int = 10; pub const USER_POSIX2_C_BIND: c_int = 11; pub const USER_POSIX2_C_DEV: c_int = 12; @@ -688,16 +686,54 @@ pub const CTL_P1003_1B_SIGQUEUE_MAX: c_int = 24; pub const CTL_P1003_1B_TIMER_MAX: c_int = 25; pub const CTL_P1003_1B_MAXID: c_int = 26; -pub const CPUCTL_RSMSR: c_int = 0xc0106301; -pub const CPUCTL_WRMSR: c_int = 0xc0106302; -pub const CPUCTL_CPUID: c_int = 0xc0106303; -pub const CPUCTL_UPDATE: c_int = 0xc0106304; -pub const CPUCTL_MSRSBIT: c_int = 0xc0106305; -pub const CPUCTL_MSRCBIT: c_int = 0xc0106306; -pub const CPUCTL_CPUID_COUNT: c_int = 0xc0106307; +pub const CPUCTL_RDMSR: c_int = u32_cast_int(0xc0106301); +#[deprecated(since = "0.2.187", note = "Replaced on DragonFly by CPUCTL_RDMSR")] +pub const CPUCTL_RSMSR: c_int = CPUCTL_RDMSR; +pub const CPUCTL_WRMSR: c_int = u32_cast_int(0xc0106302); +pub const CPUCTL_CPUID: c_int = u32_cast_int(0xc0146303); +pub const CPUCTL_UPDATE: c_int = u32_cast_int(0xc0106304); +pub const CPUCTL_MSRSBIT: c_int = u32_cast_int(0xc0106305); +pub const CPUCTL_MSRCBIT: c_int = u32_cast_int(0xc0106306); +pub const CPUCTL_CPUID_COUNT: c_int = u32_cast_int(0xc0186307); pub const CPU_SETSIZE: size_t = size_of::() * 8; +pub const REG_BASIC: c_int = 0o0000; +pub const REG_EXTENDED: c_int = 0o0001; +pub const REG_ICASE: c_int = 0o0002; +pub const REG_NOSUB: c_int = 0x8; +pub const REG_NEWLINE: c_int = 0x4; +pub const REG_NOSPEC: c_int = 0o0020; +pub const REG_PEND: c_int = 0x80; +pub const REG_DUMP: c_int = 0o0200; + +pub const REG_NOMATCH: c_int = 1; +pub const REG_BADPAT: c_int = 2; +pub const REG_ECOLLATE: c_int = 3; +pub const REG_ECTYPE: c_int = 4; +pub const REG_EESCAPE: c_int = 5; +pub const REG_ESUBREG: c_int = 6; +pub const REG_EBRACK: c_int = 7; +pub const REG_EPAREN: c_int = 8; +pub const REG_EBRACE: c_int = 9; +pub const REG_BADBR: c_int = 10; +pub const REG_ERANGE: c_int = 11; +pub const REG_ESPACE: c_int = 12; +pub const REG_BADRPT: c_int = 13; +pub const REG_EMPTY: c_int = 14; +pub const REG_ASSERT: c_int = 15; +pub const REG_INVARG: c_int = 15; +pub const REG_ILLSEQ: c_int = 16; +pub const REG_ATOI: c_int = 255; +pub const REG_ITOA: c_int = 0o0400; + +pub const REG_NOTBOL: c_int = 0o00001; +pub const REG_NOTEOL: c_int = 0o00002; +pub const REG_STARTEND: c_int = 0o00004; +pub const REG_TRACE: c_int = 0o00400; +pub const REG_LARGE: c_int = 0o01000; +pub const REG_BACKR: c_int = 0x8; + pub const EVFILT_READ: i16 = -1; pub const EVFILT_WRITE: i16 = -2; pub const EVFILT_AIO: i16 = -3; @@ -721,8 +757,8 @@ pub const EV_NODATA: u16 = 0x1000; pub const EV_FLAG1: u16 = 0x2000; pub const EV_ERROR: u16 = 0x4000; pub const EV_EOF: u16 = 0x8000; -pub const EV_HUP: u16 = 0x8000; -pub const EV_SYSFLAGS: u16 = 0xf000; +pub const EV_HUP: u16 = 0x0800; +pub const EV_SYSFLAGS: u16 = 0xF800; pub const FIODNAME: c_ulong = 0x80106678; @@ -775,6 +811,7 @@ pub const IFF_NOARP: c_int = 0x80; // no address resolution protocol pub const IFF_PROMISC: c_int = 0x100; // receive all packets pub const IFF_ALLMULTI: c_int = 0x200; // receive all multicast packets pub const IFF_OACTIVE_COMPAT: c_int = 0x400; // was transmission in progress +pub const IFF_OACTIVE: c_int = IFF_OACTIVE_COMPAT; pub const IFF_SIMPLEX: c_int = 0x800; // can't hear own transmissions pub const IFF_LINK0: c_int = 0x1000; // per link layer defined bit pub const IFF_LINK1: c_int = 0x2000; // per link layer defined bit @@ -1022,8 +1059,10 @@ pub const TCP_FASTKEEP: c_int = 128; pub const AF_BLUETOOTH: c_int = 33; pub const AF_MPLS: c_int = 34; pub const AF_IEEE80211: c_int = 35; +pub const AF_ARP: c_int = 36; pub const PF_BLUETOOTH: c_int = AF_BLUETOOTH; +pub const PF_ARP: c_int = AF_ARP; pub const NET_RT_DUMP: c_int = 1; pub const NET_RT_FLAGS: c_int = 2; @@ -1038,7 +1077,7 @@ pub const MSG_SYNC: c_int = 0x00000800; pub const MSG_CMSG_CLOEXEC: c_int = 0x00001000; pub const MSG_FBLOCKING: c_int = 0x00010000; pub const MSG_FNONBLOCKING: c_int = 0x00020000; -pub const MSG_FMASK: c_int = 0xFFFF0000; +pub const MSG_FMASK: c_int = u32_cast_int(0xFFFF0000); // sys/mount.h pub const MNT_NODEV: c_int = 0x00000010; @@ -1066,12 +1105,32 @@ pub const DOWNTIME: c_short = 11; // utmpx database types pub const UTX_DB_UTMPX: c_uint = 0; pub const UTX_DB_WTMPX: c_uint = 1; -pub const UTX_DB_LASTLOG: c_uint = 2; +pub const UTX_DB_LASTLOGX: c_uint = 2; +#[deprecated(since = "0.2.187", note = "Replaced on DragonFly by UTX_DB_LASTLOGX")] +pub const UTX_DB_LASTLOG: c_uint = UTX_DB_LASTLOGX; pub const _UTX_LINESIZE: usize = 32; pub const _UTX_USERSIZE: usize = 32; pub const _UTX_IDSIZE: usize = 4; pub const _UTX_HOSTSIZE: usize = 256; +pub const EXTATTR_NAMESPACE_EMPTY: c_int = 0; +pub const EXTATTR_NAMESPACE_USER: c_int = 1; +pub const EXTATTR_NAMESPACE_SYSTEM: c_int = 2; + +pub const GRND_NONBLOCK: c_uint = 0x2; +pub const GRND_RANDOM: c_uint = 0x1; +pub const GRND_INSECURE: c_uint = 0x4; + +pub const NI_NOFQDN: c_int = 0x00000001; +pub const NI_NUMERICHOST: c_int = 0x00000002; +pub const NI_NAMEREQD: c_int = 0x00000004; +pub const NI_NUMERICSERV: c_int = 0x00000008; +pub const NI_DGRAM: c_int = 0x00000010; +pub const NI_NUMERICSCOPE: c_int = 0x00000040; + +pub const B460800: crate::speed_t = 460800; +pub const B921600: crate::speed_t = 921600; + pub const LC_COLLATE_MASK: c_int = 1 << 0; pub const LC_CTYPE_MASK: c_int = 1 << 1; pub const LC_MONETARY_MASK: c_int = 1 << 2; @@ -1093,9 +1152,11 @@ pub const TIOCMODG: c_ulong = 0x40047403; pub const TIOCMODS: c_ulong = 0x80047404; pub const TIOCREMOTE: c_ulong = 0x80047469; pub const TIOCTIMESTAMP: c_ulong = 0x40107459; +pub const BIOCSRTIMEOUT: c_ulong = 0x8010426d; +pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e; // Constants used by "at" family of system calls. -pub const AT_FDCWD: c_int = 0xFFFAFDCD; // invalid file descriptor +pub const AT_FDCWD: c_int = u32_cast_int(0xFFFAFDCD); // invalid file descriptor pub const AT_SYMLINK_NOFOLLOW: c_int = 1; pub const AT_REMOVEDIR: c_int = 2; pub const AT_EACCESS: c_int = 4; @@ -1106,8 +1167,6 @@ pub const VCHECKPT: usize = 19; pub const _PC_2_SYMLINKS: c_int = 22; pub const _PC_TIMESTAMP_RESOLUTION: c_int = 23; -pub const _CS_PATH: c_int = 1; - pub const _SC_V7_ILP32_OFF32: c_int = 122; pub const _SC_V7_ILP32_OFFBIG: c_int = 123; pub const _SC_V7_LP64_OFF64: c_int = 124; @@ -1166,6 +1225,9 @@ pub const RTM_VERSION: c_int = 7; pub const RTAX_MPLS1: c_int = 8; pub const RTAX_MPLS2: c_int = 9; pub const RTAX_MPLS3: c_int = 10; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RTAX_MAX: c_int = 11; const fn _CMSG_ALIGN(n: usize) -> usize { @@ -1173,15 +1235,15 @@ const fn _CMSG_ALIGN(n: usize) -> usize { } f! { - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { (cmsg as *mut c_uchar).offset(_CMSG_ALIGN(size_of::()) as isize) } - pub const fn CMSG_LEN(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(length: c_uint) -> c_uint { (_CMSG_ALIGN(size_of::()) + length as usize) as c_uint } - pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { let next = cmsg as usize + _CMSG_ALIGN((*cmsg).cmsg_len as usize) + _CMSG_ALIGN(size_of::()); @@ -1189,44 +1251,42 @@ f! { if next <= max { (cmsg as usize + _CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr } else { - core::ptr::null_mut::() + ptr::null_mut() } } - pub const fn CMSG_SPACE(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(length: c_uint) -> c_uint { (_CMSG_ALIGN(size_of::()) + _CMSG_ALIGN(length as usize)) as c_uint } - pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { - for slot in cpuset.ary.iter_mut() { - *slot = 0; - } + pub unsafe fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { + cpuset.ary.fill(0); } - pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { + pub unsafe fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { let (idx, offset) = ((cpu >> 6) & 3, cpu & 63); cpuset.ary[idx] |= 1 << offset; () } - pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { + pub unsafe fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { let (idx, offset) = ((cpu >> 6) & 3, cpu & 63); cpuset.ary[idx] &= !(1 << offset); () } - pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { + pub unsafe fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { let (idx, offset) = ((cpu >> 6) & 3, cpu & 63); 0 != cpuset.ary[idx] & (1 << offset) } } safe_f! { - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { (status & 0o177) != 0o177 && (status & 0o177) != 0 } - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { let major = major as crate::dev_t; let minor = minor as crate::dev_t; let mut dev = 0; @@ -1235,11 +1295,11 @@ safe_f! { dev } - pub const fn major(dev: crate::dev_t) -> c_int { + pub const safe fn major(dev: crate::dev_t) -> c_int { ((dev >> 8) & 0xff) as c_int } - pub const fn minor(dev: crate::dev_t) -> c_int { + pub const safe fn minor(dev: crate::dev_t) -> c_int { (dev & 0xffff00ff) as c_int } } @@ -1278,6 +1338,7 @@ extern "C" { pub fn statfs(path: *const c_char, buf: *mut statfs) -> c_int; pub fn fstatfs(fd: c_int, buf: *mut statfs) -> c_int; + pub fn fdatasync(fd: c_int) -> c_int; pub fn uname(buf: *mut crate::utsname) -> c_int; pub fn memmem( haystack: *const c_void, @@ -1285,12 +1346,36 @@ extern "C" { needle: *const c_void, needlelen: size_t, ) -> *mut c_void; + pub fn dlvsym( + handle: *mut c_void, + symbol: *const c_char, + version: *const c_char, + ) -> *mut c_void; + pub fn reallocarray(ptr: *mut c_void, nmemb: size_t, size: size_t) -> *mut c_void; + pub fn qsort_r( + base: *mut c_void, + num: size_t, + size: size_t, + arg: *mut c_void, + compar: Option c_int>, + ); pub fn pthread_spin_init(lock: *mut pthread_spinlock_t, pshared: c_int) -> c_int; pub fn pthread_spin_destroy(lock: *mut pthread_spinlock_t) -> c_int; pub fn pthread_spin_lock(lock: *mut pthread_spinlock_t) -> c_int; pub fn pthread_spin_trylock(lock: *mut pthread_spinlock_t) -> c_int; pub fn pthread_spin_unlock(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_getaffinity_np( + td: crate::pthread_t, + cpusetsize: size_t, + cpusetp: *mut cpuset_t, + ) -> c_int; + pub fn pthread_setaffinity_np( + td: crate::pthread_t, + cpusetsize: size_t, + cpusetp: *const cpuset_t, + ) -> c_int; + pub fn sched_getaffinity(pid: crate::pid_t, cpusetsize: size_t, mask: *mut cpu_set_t) -> c_int; pub fn sched_setaffinity( pid: crate::pid_t, @@ -1300,6 +1385,7 @@ extern "C" { pub fn sched_getcpu() -> c_int; pub fn setproctitle(fmt: *const c_char, ...); + pub fn ftok(path: *const c_char, id: c_int) -> crate::key_t; pub fn shmget(key: crate::key_t, size: size_t, shmflg: c_int) -> c_int; pub fn shmat(shmid: c_int, shmaddr: *const c_void, shmflg: c_int) -> *mut c_void; pub fn shmdt(shmaddr: *const c_void) -> c_int; @@ -1332,6 +1418,27 @@ extern "C" { flags: c_int, ) -> c_int; + pub fn extattr_delete_file( + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + ) -> c_int; + pub fn extattr_get_file( + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + data: *mut c_void, + nbytes: size_t, + ) -> ssize_t; + pub fn extattr_set_file( + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + data: *const c_void, + nbytes: size_t, + ) -> c_int; + + pub fn dup3(src: c_int, dst: c_int, flags: c_int) -> c_int; pub fn closefrom(lowfd: c_int) -> c_int; } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/aarch64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/aarch64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/aarch64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/aarch64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/arm.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/arm.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/arm.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/arm.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs similarity index 96% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs index e04fcc0cd..1bf913bc5 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs @@ -258,25 +258,31 @@ s! { } } +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const ELAST: c_int = 96; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RAND_MAX: c_int = 0x7fff_fffd; + pub const KI_NSPARE_PTR: usize = 6; pub const MINCORE_SUPER: c_int = 0x20; /// max length of devicename pub const SPECNAMELEN: c_int = 63; safe_f! { - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { let major = major as crate::dev_t; let minor = minor as crate::dev_t; (major << 8) | minor } - pub const fn major(dev: crate::dev_t) -> c_int { + pub const safe fn major(dev: crate::dev_t) -> c_int { ((dev >> 8) & 0xff) as c_int } - pub const fn minor(dev: crate::dev_t) -> c_int { + pub const safe fn minor(dev: crate::dev_t) -> c_int { (dev & 0xffff00ff) as c_int } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs similarity index 96% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs index 34979f888..8fd49615d 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs @@ -303,7 +303,12 @@ s! { } } +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RAND_MAX: c_int = 0x7fff_fffd; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const ELAST: c_int = 97; /// max length of devicename @@ -313,7 +318,7 @@ pub const KI_NSPARE_PTR: usize = 6; pub const MINCORE_SUPER: c_int = 0x20; safe_f! { - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { let major = major as crate::dev_t; let minor = minor as crate::dev_t; let mut dev = 0; @@ -324,11 +329,11 @@ safe_f! { dev } - pub const fn major(dev: crate::dev_t) -> c_int { + pub const safe fn major(dev: crate::dev_t) -> c_int { (((dev >> 32) & 0xffffff00) | ((dev >> 8) & 0xff)) as c_int } - pub const fn minor(dev: crate::dev_t) -> c_int { + pub const safe fn minor(dev: crate::dev_t) -> c_int { (((dev >> 24) & 0xff00) | (dev & 0xffff00ff)) as c_int } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs similarity index 78% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs index b29171cc5..cf720ebe5 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs @@ -4,4 +4,4 @@ pub const PROC_KPTI_CTL: c_int = crate::PROC_PROCCTL_MD_MIN; pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: c_int = 1; pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: c_int = 2; pub const PROC_KPTI_STATUS: c_int = crate::PROC_PROCCTL_MD_MIN + 1; -pub const PROC_KPTI_STATUS_ACTIVE: c_int = 0x80000000; +pub const PROC_KPTI_STATUS_ACTIVE: c_int = u32_cast_int(0x80000000); diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs similarity index 96% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs index 6ef62be3c..2858cbfe7 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs @@ -316,7 +316,12 @@ s! { } } +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RAND_MAX: c_int = 0x7fff_ffff; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const ELAST: c_int = 97; pub const KF_TYPE_EVENTFD: c_int = 13; @@ -335,7 +340,7 @@ pub const DOMAINSET_POLICY_INTERLEAVE: c_int = 4; pub const MINCORE_SUPER: c_int = 0x20; safe_f! { - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { let major = major as crate::dev_t; let minor = minor as crate::dev_t; let mut dev = 0; @@ -346,11 +351,11 @@ safe_f! { dev } - pub const fn major(dev: crate::dev_t) -> c_int { + pub const safe fn major(dev: crate::dev_t) -> c_int { (((dev >> 32) & 0xffffff00) | ((dev >> 8) & 0xff)) as c_int } - pub const fn minor(dev: crate::dev_t) -> c_int { + pub const safe fn minor(dev: crate::dev_t) -> c_int { (((dev >> 24) & 0xff00) | (dev & 0xffff00ff)) as c_int } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs similarity index 78% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs index b29171cc5..cf720ebe5 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs @@ -4,4 +4,4 @@ pub const PROC_KPTI_CTL: c_int = crate::PROC_PROCCTL_MD_MIN; pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: c_int = 1; pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: c_int = 2; pub const PROC_KPTI_STATUS: c_int = crate::PROC_PROCCTL_MD_MIN + 1; -pub const PROC_KPTI_STATUS_ACTIVE: c_int = 0x80000000; +pub const PROC_KPTI_STATUS_ACTIVE: c_int = u32_cast_int(0x80000000); diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs similarity index 96% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs index f2753cebc..12beb34e4 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs @@ -318,7 +318,12 @@ s! { } } +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RAND_MAX: c_int = 0x7fff_ffff; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const ELAST: c_int = 97; pub const KF_TYPE_EVENTFD: c_int = 13; @@ -337,7 +342,7 @@ pub const DOMAINSET_POLICY_INTERLEAVE: c_int = 4; pub const MINCORE_SUPER: c_int = 0x60; safe_f! { - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { let major = major as crate::dev_t; let minor = minor as crate::dev_t; let mut dev = 0; @@ -348,11 +353,11 @@ safe_f! { dev } - pub const fn major(dev: crate::dev_t) -> c_int { + pub const safe fn major(dev: crate::dev_t) -> c_int { (((dev >> 32) & 0xffffff00) | ((dev >> 8) & 0xff)) as c_int } - pub const fn minor(dev: crate::dev_t) -> c_int { + pub const safe fn minor(dev: crate::dev_t) -> c_int { (((dev >> 24) & 0xff00) | (dev & 0xffff00ff)) as c_int } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs similarity index 90% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs index 3e037471f..b490c6e25 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs @@ -4,7 +4,7 @@ pub const PROC_KPTI_CTL: c_int = crate::PROC_PROCCTL_MD_MIN; pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: c_int = 1; pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: c_int = 2; pub const PROC_KPTI_STATUS: c_int = crate::PROC_PROCCTL_MD_MIN + 1; -pub const PROC_KPTI_STATUS_ACTIVE: c_int = 0x80000000; +pub const PROC_KPTI_STATUS_ACTIVE: c_int = u32_cast_int(0x80000000); pub const PROC_LA_CTL: c_int = crate::PROC_PROCCTL_MD_MIN + 2; pub const PROC_LA_STATUS: c_int = crate::PROC_PROCCTL_MD_MIN + 3; pub const PROC_LA_CTL_LA48_ON_EXEC: c_int = 1; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs similarity index 96% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs index d9d936878..92c263f48 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs @@ -320,7 +320,12 @@ s! { } } +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RAND_MAX: c_int = 0x7fff_ffff; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const ELAST: c_int = 97; pub const KF_TYPE_EVENTFD: c_int = 13; @@ -339,7 +344,7 @@ pub const DOMAINSET_POLICY_INTERLEAVE: c_int = 4; pub const MINCORE_SUPER: c_int = 0x60; safe_f! { - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { let major = major as crate::dev_t; let minor = minor as crate::dev_t; let mut dev = 0; @@ -350,11 +355,11 @@ safe_f! { dev } - pub const fn major(dev: crate::dev_t) -> c_int { + pub const safe fn major(dev: crate::dev_t) -> c_int { (((dev >> 32) & 0xffffff00) | ((dev >> 8) & 0xff)) as c_int } - pub const fn minor(dev: crate::dev_t) -> c_int { + pub const safe fn minor(dev: crate::dev_t) -> c_int { (((dev >> 24) & 0xff00) | (dev & 0xffff00ff)) as c_int } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs similarity index 90% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs index 3e037471f..b490c6e25 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs @@ -4,7 +4,7 @@ pub const PROC_KPTI_CTL: c_int = crate::PROC_PROCCTL_MD_MIN; pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: c_int = 1; pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: c_int = 2; pub const PROC_KPTI_STATUS: c_int = crate::PROC_PROCCTL_MD_MIN + 1; -pub const PROC_KPTI_STATUS_ACTIVE: c_int = 0x80000000; +pub const PROC_KPTI_STATUS_ACTIVE: c_int = u32_cast_int(0x80000000); pub const PROC_LA_CTL: c_int = crate::PROC_PROCCTL_MD_MIN + 2; pub const PROC_LA_STATUS: c_int = crate::PROC_PROCCTL_MD_MIN + 3; pub const PROC_LA_CTL_LA48_ON_EXEC: c_int = 1; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/mod.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/mod.rs index 233026cc7..0d1491bcf 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -6,6 +6,8 @@ use crate::{ pub type fflags_t = u32; +pub type Elf32_Lword = u64; + pub type vm_prot_t = u_char; pub type kvaddr_t = u64; pub type segsz_t = isize; @@ -278,6 +280,12 @@ s! { pub ip6: *mut crate::in6_addr, } + pub struct ip_mreq_source { + pub imr_multiaddr: crate::in_addr, + pub imr_sourceaddr: crate::in_addr, + pub imr_interface: crate::in_addr, + } + pub struct statvfs { pub f_bavail: crate::fsblkcnt_t, pub f_bfree: crate::fsblkcnt_t, @@ -2157,6 +2165,47 @@ pub const POSIX_FADV_WILLNEED: c_int = 3; pub const POSIX_FADV_DONTNEED: c_int = 4; pub const POSIX_FADV_NOREUSE: c_int = 5; +pub const REG_BASIC: c_int = 0o0000; +pub const REG_EXTENDED: c_int = 0o0001; +pub const REG_ICASE: c_int = 0o0002; +pub const REG_NOSUB: c_int = 0o0004; +pub const REG_NEWLINE: c_int = 0o0010; +pub const REG_NOSPEC: c_int = 0o0020; +pub const REG_PEND: c_int = 0o0040; +pub const REG_DUMP: c_int = 0o0200; + +pub const REG_NOMATCH: c_int = 1; +pub const REG_BADPAT: c_int = 2; +pub const REG_ECOLLATE: c_int = 3; +pub const REG_ECTYPE: c_int = 4; +pub const REG_EESCAPE: c_int = 5; +pub const REG_ESUBREG: c_int = 6; +pub const REG_EBRACK: c_int = 7; +pub const REG_EPAREN: c_int = 8; +pub const REG_EBRACE: c_int = 9; +pub const REG_BADBR: c_int = 10; +pub const REG_ERANGE: c_int = 11; +pub const REG_ESPACE: c_int = 12; +pub const REG_BADRPT: c_int = 13; +pub const REG_EMPTY: c_int = 14; +pub const REG_ASSERT: c_int = 15; +pub const REG_INVARG: c_int = 16; +pub const REG_ILLSEQ: c_int = 17; +pub const REG_ATOI: c_int = 255; +pub const REG_ITOA: c_int = 0o0400; + +pub const REG_NOTBOL: c_int = 0o00001; +pub const REG_NOTEOL: c_int = 0o00002; +pub const REG_STARTEND: c_int = 0o00004; +pub const REG_TRACE: c_int = 0o00400; +pub const REG_LARGE: c_int = 0o01000; +pub const REG_BACKR: c_int = 0o02000; + +// For getrandom() +pub const GRND_NONBLOCK: c_uint = 0x1; +pub const GRND_RANDOM: c_uint = 0x2; +pub const GRND_INSECURE: c_uint = 0x4; + pub const POLLINIGNEOF: c_short = 0x2000; pub const POLLRDHUP: c_short = 0x4000; @@ -2267,7 +2316,7 @@ pub const CTLTYPE_S16: c_int = 0xd; pub const CTLTYPE_S32: c_int = 0xe; pub const CTLTYPE_U32: c_int = 0xf; -pub const CTLFLAG_RD: c_int = 0x80000000; +pub const CTLFLAG_RD: c_int = u32_cast_int(0x80000000); pub const CTLFLAG_WR: c_int = 0x40000000; pub const CTLFLAG_RW: c_int = CTLFLAG_RD | CTLFLAG_WR; pub const CTLFLAG_DORMANT: c_int = 0x20000000; @@ -2398,14 +2447,39 @@ pub const HW_MACHINE_ARCH: c_int = 11; pub const HW_REALMEM: c_int = 12; pub const USER_CS_PATH: c_int = 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_BASE_MAX: c_int = 2; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_DIM_MAX: c_int = 3; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_SCALE_MAX: c_int = 4; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_STRING_MAX: c_int = 5; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_COLL_WEIGHTS_MAX: c_int = 6; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_EXPR_NEST_MAX: c_int = 7; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_LINE_MAX: c_int = 8; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_RE_DUP_MAX: c_int = 9; + pub const USER_POSIX2_VERSION: c_int = 10; pub const USER_POSIX2_C_BIND: c_int = 11; pub const USER_POSIX2_C_DEV: c_int = 12; @@ -2515,13 +2589,16 @@ pub const SO_PROTOTYPE: c_int = SO_PROTOCOL; pub const SO_TS_CLOCK: c_int = 0x1017; pub const SO_DOMAIN: c_int = 0x1019; pub const SO_SPLICE: c_int = 0x1023; -pub const SO_VENDOR: c_int = 0x80000000; +pub const SO_VENDOR: c_int = u32_cast_int(0x80000000); pub const SO_TS_REALTIME_MICRO: c_int = 0; pub const SO_TS_BINTIME: c_int = 1; pub const SO_TS_REALTIME: c_int = 2; pub const SO_TS_MONOTONIC: c_int = 3; pub const SO_TS_DEFAULT: c_int = SO_TS_REALTIME_MICRO; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SO_TS_CLOCK_MAX: c_int = SO_TS_MONOTONIC; pub const LOCAL_CREDS: c_int = 2; @@ -2608,6 +2685,11 @@ pub const PROC_NO_NEW_PRIVS_CTL: c_int = 19; pub const PROC_NO_NEW_PRIVS_STATUS: c_int = 20; pub const PROC_WXMAP_CTL: c_int = 21; pub const PROC_WXMAP_STATUS: c_int = 22; +pub const PROC_LOGSIGEXIT_CTL: c_int = 23; +pub const PROC_LOGSIGEXIT_STATUS: c_int = 24; +pub const PROC_LOGSIGEXIT_CTL_NOFORCE: c_int = 1; +pub const PROC_LOGSIGEXIT_CTL_FORCE_ENABLE: c_int = 2; +pub const PROC_LOGSIGEXIT_CTL_FORCE_DISABLE: c_int = 3; pub const PROC_PROCCTL_MD_MIN: c_int = 0x10000000; pub const PPROT_SET: c_int = 1; @@ -2625,12 +2707,12 @@ pub const PROC_TRAPCAP_CTL_DISABLE: c_int = 2; pub const PROC_ASLR_FORCE_ENABLE: c_int = 1; pub const PROC_ASLR_FORCE_DISABLE: c_int = 2; pub const PROC_ASLR_NOFORCE: c_int = 3; -pub const PROC_ASLR_ACTIVE: c_int = 0x80000000; +pub const PROC_ASLR_ACTIVE: c_int = u32_cast_int(0x80000000); pub const PROC_PROTMAX_FORCE_ENABLE: c_int = 1; pub const PROC_PROTMAX_FORCE_DISABLE: c_int = 2; pub const PROC_PROTMAX_NOFORCE: c_int = 3; -pub const PROC_PROTMAX_ACTIVE: c_int = 0x80000000; +pub const PROC_PROTMAX_ACTIVE: c_int = u32_cast_int(0x80000000); pub const PROC_STACKGAP_ENABLE: c_int = 0x0001; pub const PROC_STACKGAP_DISABLE: c_int = 0x0002; @@ -2642,7 +2724,7 @@ pub const PROC_NO_NEW_PRIVS_DISABLE: c_int = 2; pub const PROC_WX_MAPPINGS_PERMIT: c_int = 0x0001; pub const PROC_WX_MAPPINGS_DISALLOW_EXEC: c_int = 0x0002; -pub const PROC_WXORX_ENFORCE: c_int = 0x80000000; +pub const PROC_WXORX_ENFORCE: c_int = u32_cast_int(0x80000000); pub const AF_SLOW: c_int = 33; pub const AF_SCLUSTER: c_int = 34; @@ -2786,7 +2868,7 @@ pub const IFCAP_VXLAN_HWCSUM: c_int = 0x20000000; /// can do IFCAP_TSO on VXLANs pub const IFCAP_VXLAN_HWTSO: c_int = 0x40000000; /// can do TLS with rate limiting -pub const IFCAP_TXTLS_RTLMT: c_int = 0x80000000; +pub const IFCAP_TXTLS_RTLMT: c_int = u32_cast_int(0x80000000); pub const IFCAP_HWCSUM_IPV6: c_int = IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6; pub const IFCAP_HWCSUM: c_int = IFCAP_RXCSUM | IFCAP_TXCSUM; @@ -2802,6 +2884,8 @@ pub const IFNET_SLOWHZ: c_int = 1; pub const IFAN_ARRIVAL: c_int = 0; pub const IFAN_DEPARTURE: c_int = 1; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const IFSTATMAX: c_int = 800; pub const RSS_FUNC_NONE: c_int = 0; @@ -3141,6 +3225,9 @@ pub const TCP_PCAP_IN: c_int = 4096; pub const TCP_FUNCTION_BLK: c_int = 8192; pub const TCP_FUNCTION_ALIAS: c_int = 8193; pub const TCP_FASTOPEN_PSK_LEN: c_int = 16; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const TCP_FUNCTION_NAME_LEN_MAX: c_int = 32; pub const TCP_REUSPORT_LB_NUMA: c_int = 1026; @@ -3195,6 +3282,10 @@ pub const IP_RECVORIGDSTADDR: c_int = IP_ORIGDSTADDR; pub const IP_DONTFRAG: c_int = 67; pub const IP_RECVTOS: c_int = 68; +pub const IP_ADD_SOURCE_MEMBERSHIP: c_int = 70; +pub const IP_DROP_SOURCE_MEMBERSHIP: c_int = 71; +pub const IP_BLOCK_SOURCE: c_int = 72; +pub const IP_UNBLOCK_SOURCE: c_int = 73; pub const IPV6_BINDANY: c_int = 64; pub const IPV6_ORIGDSTADDR: c_int = 72; @@ -3398,7 +3489,7 @@ pub const RFTHREAD: c_int = 8192; pub const RFSIGSHARE: c_int = 16384; pub const RFLINUXTHPN: c_int = 65536; pub const RFTSIGZMB: c_int = 524288; -pub const RFSPAWN: c_int = 2147483648; +pub const RFSPAWN: c_int = u32_cast_int(2147483648); // For eventfd pub const EFD_SEMAPHORE: c_int = 0x1; @@ -3527,71 +3618,111 @@ pub const KKST_STATE_SWAPPED: c_int = 1; pub const KKST_STATE_RUNNING: c_int = 2; // Constants about priority. + pub const PRI_MIN: c_int = 0; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PRI_MAX: c_int = 255; + pub const PRI_MIN_ITHD: c_int = PRI_MIN; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PRI_MAX_ITHD: c_int = PRI_MIN_REALTIME - 1; + pub const PI_REALTIME: c_int = PRI_MIN_ITHD + 0; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PI_AV: c_int = PRI_MIN_ITHD + 4; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PI_NET: c_int = PRI_MIN_ITHD + 8; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PI_DISK: c_int = PRI_MIN_ITHD + 12; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PI_TTY: c_int = PRI_MIN_ITHD + 16; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PI_DULL: c_int = PRI_MIN_ITHD + 20; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PI_SOFT: c_int = PRI_MIN_ITHD + 24; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PRI_MIN_REALTIME: c_int = 48; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PRI_MAX_REALTIME: c_int = PRI_MIN_KERN - 1; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PRI_MIN_KERN: c_int = 80; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PRI_MAX_KERN: c_int = PRI_MIN_TIMESHARE - 1; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PSWP: c_int = PRI_MIN_KERN + 0; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PVM: c_int = PRI_MIN_KERN + 4; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PINOD: c_int = PRI_MIN_KERN + 8; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PRIBIO: c_int = PRI_MIN_KERN + 12; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PVFS: c_int = PRI_MIN_KERN + 16; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PZERO: c_int = PRI_MIN_KERN + 20; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PSOCK: c_int = PRI_MIN_KERN + 24; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PWAIT: c_int = PRI_MIN_KERN + 28; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PLOCK: c_int = PRI_MIN_KERN + 32; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PPAUSE: c_int = PRI_MIN_KERN + 36; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PRI_MIN_TIMESHARE: c_int = 120; + pub const PRI_MAX_TIMESHARE: c_int = PRI_MIN_IDLE - 1; -#[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -#[allow(deprecated)] + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PUSER: c_int = PRI_MIN_TIMESHARE; + pub const PRI_MIN_IDLE: c_int = 224; pub const PRI_MAX_IDLE: c_int = PRI_MAX; @@ -3607,6 +3738,7 @@ cfg_if! { pub const ARG_MAX: c_int = 2 * 256 * 1024; } } + pub const CHILD_MAX: c_int = 40; /// max command name remembered pub const MAXCOMLEN: usize = 19; @@ -3630,10 +3762,16 @@ pub const MAXHOSTNAMELEN: c_int = 256; pub const MAX_CANON: c_int = 255; /// max bytes in terminal input pub const MAX_INPUT: c_int = 255; -/// max bytes in a file name +/// Max bytes in a file name. +/// +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NAME_MAX: c_int = 255; pub const MAXSYMLINKS: c_int = 32; -/// max supplemental group id's +/// Max supplemental group IDs. +/// +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NGROUPS_MAX: c_int = 1023; /// max open files per process pub const OPEN_MAX: c_int = 64; @@ -3647,23 +3785,58 @@ pub const _POSIX_PIPE_BUF: c_int = 512; pub const _POSIX_SSIZE_MAX: c_int = 32767; pub const _POSIX_STREAM_MAX: c_int = 8; -/// max ibase/obase values in bc(1) +/// Max ibase/obase values in bc(1). +/// +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const BC_BASE_MAX: c_int = 99; -/// max array elements in bc(1) + +/// Max array elements in bc(1). +/// +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const BC_DIM_MAX: c_int = 2048; -/// max scale value in bc(1) + +/// Max scale value in bc(1). +/// +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const BC_SCALE_MAX: c_int = 99; -/// max const string length in bc(1) + +/// Max const string length in bc(1). +/// +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const BC_STRING_MAX: c_int = 1000; -/// max character class name size + +/// Max character class name size. +/// +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const CHARCLASS_NAME_MAX: c_int = 14; -/// max weights for order keyword + +/// Max weights for order keyword. +/// +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const COLL_WEIGHTS_MAX: c_int = 10; -/// max expressions nested in expr(1) + +/// Max expressions nested in expr(1). +/// +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const EXPR_NEST_MAX: c_int = 32; -/// max bytes in an input line + +/// Max bytes in an input line. +/// +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const LINE_MAX: c_int = 2048; -/// max RE's in interval notation + +/// Max RE's in interval notation. +/// +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RE_DUP_MAX: c_int = 255; pub const _POSIX2_BC_BASE_MAX: c_int = 99; @@ -3800,7 +3973,7 @@ pub const P_STATCHILD: c_int = 0x08000000; pub const P_INMEM: c_int = 0x10000000; pub const P_SWAPPINGOUT: c_int = 0x20000000; pub const P_SWAPPINGIN: c_int = 0x40000000; -pub const P_PPTRACE: c_int = 0x80000000; +pub const P_PPTRACE: c_int = u32_cast_int(0x80000000); pub const P_STOPPED: c_int = P_STOPPED_SIG | P_STOPPED_SINGLE | P_STOPPED_TRACE; pub const P2_INHERIT_PROTECTED: c_int = 0x00000001; @@ -3824,11 +3997,11 @@ pub const SZOMB: c_char = 5; pub const SWAIT: c_char = 6; pub const SLOCK: c_char = 7; -pub const P_MAGIC: c_int = 0xbeefface; +pub const P_MAGIC: c_int = u32_cast_int(0xbeefface); pub const TDP_SIGFASTBLOCK: c_int = 0x00000100; pub const TDP_UIOHELD: c_int = 0x10000000; -pub const TDP_SIGFASTPENDING: c_int = 0x80000000; +pub const TDP_SIGFASTPENDING: c_int = u32_cast_int(0x80000000); pub const TDP2_COMPAT32RB: c_int = 0x00000002; pub const P2_PROTMAX_ENABLE: c_int = 0x00000200; pub const P2_PROTMAX_DISABLE: c_int = 0x00000400; @@ -4071,6 +4244,8 @@ pub const RTF_FIXEDMTU: c_int = 0x80000; pub const RTM_VERSION: c_int = 5; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RTAX_MAX: c_int = 8; // sys/signal.h @@ -4118,7 +4293,11 @@ pub const SCTP_PR_SCTP_TTL: c_int = 0x0001; pub const SCTP_PR_SCTP_PRIO: c_int = 0x0002; pub const SCTP_PR_SCTP_BUF: c_int = SCTP_PR_SCTP_PRIO; pub const SCTP_PR_SCTP_RTX: c_int = 0x0003; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SCTP_PR_SCTP_MAX: c_int = SCTP_PR_SCTP_RTX; + pub const SCTP_PR_SCTP_ALL: c_int = 0x000f; pub const SCTP_INIT: c_int = 0x0001; @@ -4200,6 +4379,9 @@ pub const SCTP_ASSOC_SUPPORTS_ASCONF: c_int = 0x03; pub const SCTP_ASSOC_SUPPORTS_MULTIBUF: c_int = 0x04; pub const SCTP_ASSOC_SUPPORTS_RE_CONFIG: c_int = 0x05; pub const SCTP_ASSOC_SUPPORTS_INTERLEAVING: c_int = 0x06; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SCTP_ASSOC_SUPPORTS_MAX: c_int = 0x06; pub const SCTP_ADDR_AVAILABLE: c_int = 0x0001; @@ -4269,6 +4451,8 @@ pub const KCMP_FILES: c_int = 102; pub const KCMP_SIGHAND: c_int = 103; pub const KCMP_VM: c_int = 104; +pub const SOL_LOCAL: c_int = 0; + pub const fn MAP_ALIGNED(a: c_int) -> c_int { a << 24 } @@ -4278,83 +4462,79 @@ const fn _ALIGN(p: usize) -> usize { } f! { - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { (cmsg as *mut c_uchar).add(_ALIGN(size_of::())) } - pub const fn CMSG_LEN(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(length: c_uint) -> c_uint { _ALIGN(size_of::()) as c_uint + length } - pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if cmsg.is_null() { return crate::CMSG_FIRSTHDR(mhdr); } let next = cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize) + _ALIGN(size_of::()); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next > max { - core::ptr::null_mut::() + ptr::null_mut() } else { (cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr } } - pub const fn CMSG_SPACE(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(length: c_uint) -> c_uint { (_ALIGN(size_of::()) + _ALIGN(length as usize)) as c_uint } - pub fn MALLOCX_ALIGN(lg: c_uint) -> c_int { + pub unsafe fn MALLOCX_ALIGN(lg: c_uint) -> c_int { ffsl(lg as c_long - 1) } - pub const fn MALLOCX_TCACHE(tc: c_int) -> c_int { + pub const unsafe fn MALLOCX_TCACHE(tc: c_int) -> c_int { (tc + 2) << 8 as c_int } - pub const fn MALLOCX_ARENA(a: c_int) -> c_int { + pub const unsafe fn MALLOCX_ARENA(a: c_int) -> c_int { (a + 1) << 20 as c_int } - pub fn SOCKCREDSIZE(ngrps: usize) -> usize { + pub unsafe fn SOCKCREDSIZE(ngrps: usize) -> usize { let ngrps = if ngrps > 0 { ngrps - 1 } else { 0 }; size_of::() + size_of::() * ngrps } - pub fn uname(buf: *mut crate::utsname) -> c_int { - __xuname(256, buf as *mut c_void) + pub unsafe fn uname(buf: *mut crate::utsname) -> c_int { + __xuname(256, buf.cast()) } - pub fn CPU_ZERO(cpuset: &mut cpuset_t) -> () { - for slot in cpuset.__bits.iter_mut() { - *slot = 0; - } + pub unsafe fn CPU_ZERO(cpuset: &mut cpuset_t) -> () { + cpuset.__bits.fill(0); } - pub fn CPU_FILL(cpuset: &mut cpuset_t) -> () { - for slot in cpuset.__bits.iter_mut() { - *slot = !0; - } + pub unsafe fn CPU_FILL(cpuset: &mut cpuset_t) -> () { + cpuset.__bits.fill(!0); } - pub fn CPU_SET(cpu: usize, cpuset: &mut cpuset_t) -> () { + pub unsafe fn CPU_SET(cpu: usize, cpuset: &mut cpuset_t) -> () { let bitset_bits = 8 * size_of::(); let (idx, offset) = (cpu / bitset_bits, cpu % bitset_bits); cpuset.__bits[idx] |= 1 << offset; } - pub fn CPU_CLR(cpu: usize, cpuset: &mut cpuset_t) -> () { + pub unsafe fn CPU_CLR(cpu: usize, cpuset: &mut cpuset_t) -> () { let bitset_bits = 8 * size_of::(); let (idx, offset) = (cpu / bitset_bits, cpu % bitset_bits); cpuset.__bits[idx] &= !(1 << offset); } - pub fn CPU_ISSET(cpu: usize, cpuset: &cpuset_t) -> bool { + pub unsafe fn CPU_ISSET(cpu: usize, cpuset: &cpuset_t) -> bool { let bitset_bits = 8 * size_of::(); let (idx, offset) = (cpu / bitset_bits, cpu % bitset_bits); 0 != cpuset.__bits[idx] & (1 << offset) } - pub fn CPU_COUNT(cpuset: &cpuset_t) -> c_int { + pub unsafe fn CPU_COUNT(cpuset: &cpuset_t) -> c_int { let mut s: u32 = 0; let cpuset_size = size_of::(); let bitset_size = size_of::(); @@ -4365,27 +4545,27 @@ f! { s as c_int } - pub fn SOCKCRED2SIZE(ngrps: usize) -> usize { + pub unsafe fn SOCKCRED2SIZE(ngrps: usize) -> usize { let ngrps = if ngrps > 0 { ngrps - 1 } else { 0 }; size_of::() + size_of::() * ngrps } - pub fn PROT_MAX(x: c_int) -> c_int { + pub unsafe fn PROT_MAX(x: c_int) -> c_int { x << 16 } - pub fn PROT_MAX_EXTRACT(x: c_int) -> c_int { + pub unsafe fn PROT_MAX_EXTRACT(x: c_int) -> c_int { (x >> 16) & (crate::PROT_READ | crate::PROT_WRITE | crate::PROT_EXEC) } } safe_f! { - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { (status & 0o177) != 0o177 && (status & 0o177) != 0 && status != 0x13 } - pub const fn INVALID_SINFO_FLAG(x: c_int) -> bool { - (x) & 0xfffffff0 + pub const safe fn INVALID_SINFO_FLAG(x: c_int) -> bool { + (x) & u32_cast_int(0xfffffff0) & !(SCTP_EOF | SCTP_ABORT | SCTP_UNORDERED @@ -4396,33 +4576,41 @@ safe_f! { != 0 } - pub const fn PR_SCTP_POLICY(x: c_int) -> c_int { + pub const safe fn PR_SCTP_POLICY(x: c_int) -> c_int { x & 0x0f } - pub const fn PR_SCTP_ENABLED(x: c_int) -> bool { + pub const safe fn PR_SCTP_ENABLED(x: c_int) -> bool { PR_SCTP_POLICY(x) != SCTP_PR_SCTP_NONE && PR_SCTP_POLICY(x) != SCTP_PR_SCTP_ALL } - pub const fn PR_SCTP_TTL_ENABLED(x: c_int) -> bool { + pub const safe fn PR_SCTP_TTL_ENABLED(x: c_int) -> bool { PR_SCTP_POLICY(x) == SCTP_PR_SCTP_TTL } - pub const fn PR_SCTP_BUF_ENABLED(x: c_int) -> bool { + pub const safe fn PR_SCTP_BUF_ENABLED(x: c_int) -> bool { PR_SCTP_POLICY(x) == SCTP_PR_SCTP_BUF } - pub const fn PR_SCTP_RTX_ENABLED(x: c_int) -> bool { + pub const safe fn PR_SCTP_RTX_ENABLED(x: c_int) -> bool { PR_SCTP_POLICY(x) == SCTP_PR_SCTP_RTX } - pub const fn PR_SCTP_INVALID_POLICY(x: c_int) -> bool { + pub const safe fn PR_SCTP_INVALID_POLICY(x: c_int) -> bool { PR_SCTP_POLICY(x) > SCTP_PR_SCTP_MAX } - pub const fn PR_SCTP_VALID_POLICY(x: c_int) -> bool { + pub const safe fn PR_SCTP_VALID_POLICY(x: c_int) -> bool { PR_SCTP_POLICY(x) <= SCTP_PR_SCTP_MAX } + + pub const safe fn PPROT_OP(o: c_int) -> c_int { + o & 0xf + } + + pub const safe fn PPROT_FLAGS(o: c_int) -> c_int { + o & !0xf + } } cfg_if! { diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/powerpc.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/powerpc.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/powerpc.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/powerpc.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/riscv64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/riscv64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/riscv64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/riscv64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/x86.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/x86.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/x86.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/x86.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/mod.rs similarity index 98% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/mod.rs index 38fe66a11..5c9bccf38 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/freebsdlike/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/freebsdlike/mod.rs @@ -22,7 +22,6 @@ pub type key_t = c_long; pub type Elf32_Addr = u32; pub type Elf32_Half = u16; -pub type Elf32_Lword = u64; pub type Elf32_Off = u32; pub type Elf32_Sword = i32; pub type Elf32_Word = u32; @@ -60,7 +59,7 @@ cfg_if! { // link.h extern_ty! { - pub enum timezone {} + pub type timezone; } impl siginfo_t { @@ -101,12 +100,6 @@ s! { pub imr_ifindex: c_int, } - pub struct ip_mreq_source { - pub imr_multiaddr: in_addr, - pub imr_sourceaddr: in_addr, - pub imr_interface: in_addr, - } - pub struct glob_t { pub gl_pathc: size_t, pub gl_matchc: size_t, @@ -408,10 +401,6 @@ s! { // Non-public helper constant const SIZEOF_LONG: usize = size_of::(); -#[deprecated( - since = "0.2.64", - note = "Can vary at runtime. Use sysconf(3) instead" -)] pub const AIO_LISTIO_MAX: c_int = 16; pub const AIO_CANCELED: c_int = 1; pub const AIO_NOTCANCELED: c_int = 2; @@ -596,7 +585,7 @@ pub const MCL_FUTURE: c_int = 0x0002; pub const MNT_EXPUBLIC: c_int = 0x20000000; pub const MNT_NOATIME: c_int = 0x10000000; pub const MNT_NOCLUSTERR: c_int = 0x40000000; -pub const MNT_NOCLUSTERW: c_int = 0x80000000; +pub const MNT_NOCLUSTERW: c_int = u32_cast_int(0x80000000); pub const MNT_NOSYMFOLLOW: c_int = 0x00400000; pub const MNT_SOFTDEP: c_int = 0x00200000; pub const MNT_SUIDDIR: c_int = 0x00100000; @@ -945,10 +934,6 @@ pub const IPV6_PKTINFO: c_int = 46; pub const IPV6_HOPLIMIT: c_int = 47; pub const IPV6_RECVTCLASS: c_int = 57; pub const IPV6_TCLASS: c_int = 61; -pub const IP_ADD_SOURCE_MEMBERSHIP: c_int = 70; -pub const IP_DROP_SOURCE_MEMBERSHIP: c_int = 71; -pub const IP_BLOCK_SOURCE: c_int = 72; -pub const IP_UNBLOCK_SOURCE: c_int = 73; pub const TCP_NOPUSH: c_int = 4; pub const TCP_NOOPT: c_int = 8; @@ -1412,7 +1397,6 @@ pub const TIME_WAIT: c_int = 4; pub const TIME_ERROR: c_int = 5; pub const REG_ENOSYS: c_int = -1; -pub const REG_ILLSEQ: c_int = 17; pub const IPC_PRIVATE: crate::key_t = 0; pub const IPC_CREAT: c_int = 0o1000; @@ -1455,11 +1439,6 @@ pub const RB_GDB: c_int = 0x8000; pub const RB_MUTE: c_int = 0x10000; pub const RB_SELFTEST: c_int = 0x20000; -// For getrandom() -pub const GRND_NONBLOCK: c_uint = 0x1; -pub const GRND_RANDOM: c_uint = 0x2; -pub const GRND_INSECURE: c_uint = 0x4; - // DIFF(main): changed to `c_short` in f62eb023ab pub const POSIX_SPAWN_RESETIDS: c_int = 0x01; pub const POSIX_SPAWN_SETPGROUP: c_int = 0x02; @@ -1469,15 +1448,15 @@ pub const POSIX_SPAWN_SETSIGDEF: c_int = 0x10; pub const POSIX_SPAWN_SETSIGMASK: c_int = 0x20; safe_f! { - pub const fn WIFCONTINUED(status: c_int) -> bool { + pub const safe fn WIFCONTINUED(status: c_int) -> bool { status == 0x13 } - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { status >> 8 } - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { (status & 0o177) == 0o177 } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/mod.rs similarity index 93% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/mod.rs index cb4781735..e0a39f273 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/mod.rs @@ -7,6 +7,9 @@ pub type socklen_t = u32; pub type sa_family_t = u8; pub type pthread_t = crate::uintptr_t; pub type nfds_t = c_uint; +#[cfg(target_os = "dragonfly")] +pub type regoff_t = c_int; +#[cfg(not(target_os = "dragonfly"))] pub type regoff_t = off_t; s! { @@ -57,7 +60,7 @@ s! { pub ifa_netmask: *mut crate::sockaddr, pub ifa_dstaddr: *mut crate::sockaddr, pub ifa_data: *mut c_void, - #[cfg(target_os = "netbsd")] + #[cfg(any(target_os = "dragonfly", target_os = "netbsd"))] pub ifa_addrflags: c_uint, } @@ -163,7 +166,10 @@ pub const FIOASYNC: c_ulong = 0x8004667d; pub const FIOSETOWN: c_ulong = 0x8004667c; pub const FIOGETOWN: c_ulong = 0x4004667b; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PATH_MAX: c_int = 1024; + pub const MAXPATHLEN: c_int = PATH_MAX; pub const IOV_MAX: c_int = 1024; @@ -403,43 +409,13 @@ cfg_if! { } } -pub const REG_BASIC: c_int = 0o0000; -pub const REG_EXTENDED: c_int = 0o0001; -pub const REG_ICASE: c_int = 0o0002; -pub const REG_NOSUB: c_int = 0o0004; -pub const REG_NEWLINE: c_int = 0o0010; -pub const REG_NOSPEC: c_int = 0o0020; -pub const REG_PEND: c_int = 0o0040; -pub const REG_DUMP: c_int = 0o0200; - -pub const REG_NOMATCH: c_int = 1; -pub const REG_BADPAT: c_int = 2; -pub const REG_ECOLLATE: c_int = 3; -pub const REG_ECTYPE: c_int = 4; -pub const REG_EESCAPE: c_int = 5; -pub const REG_ESUBREG: c_int = 6; -pub const REG_EBRACK: c_int = 7; -pub const REG_EPAREN: c_int = 8; -pub const REG_EBRACE: c_int = 9; -pub const REG_BADBR: c_int = 10; -pub const REG_ERANGE: c_int = 11; -pub const REG_ESPACE: c_int = 12; -pub const REG_BADRPT: c_int = 13; -pub const REG_EMPTY: c_int = 14; -pub const REG_ASSERT: c_int = 15; -pub const REG_INVARG: c_int = 16; -pub const REG_ATOI: c_int = 255; -pub const REG_ITOA: c_int = 0o0400; - -pub const REG_NOTBOL: c_int = 0o00001; -pub const REG_NOTEOL: c_int = 0o00002; -pub const REG_STARTEND: c_int = 0o00004; -pub const REG_TRACE: c_int = 0o00400; -pub const REG_LARGE: c_int = 0o01000; -pub const REG_BACKR: c_int = 0o02000; - -pub const TIOCCBRK: c_uint = 0x2000747a; -pub const TIOCSBRK: c_uint = 0x2000747b; +cfg_if! { + // Redefined in `new/apple` + if #[cfg(not(target_vendor = "apple"))] { + pub const TIOCCBRK: c_uint = 0x2000747a; + pub const TIOCSBRK: c_uint = 0x2000747b; + } +} pub const PRIO_PROCESS: c_int = 0; pub const PRIO_PGRP: c_int = 1; @@ -493,59 +469,57 @@ pub const RTAX_AUTHOR: c_int = 6; pub const RTAX_BRD: c_int = 7; f! { - pub fn CMSG_FIRSTHDR(mhdr: *const crate::msghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_FIRSTHDR(mhdr: *const crate::msghdr) -> *mut cmsghdr { if (*mhdr).msg_controllen as usize >= size_of::() { - (*mhdr).msg_control.cast::() + (*mhdr).msg_control.cast() } else { - core::ptr::null_mut() + ptr::null_mut() } } - pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let bits = size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); return; } - pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let bits = size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0; } - pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let bits = size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] |= 1 << (fd % bits); return; } - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in &mut (*set).fds_bits { - *slot = 0; - } + pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { + (*set).fds_bits.fill(0); } } safe_f! { - pub const fn WTERMSIG(status: c_int) -> c_int { + pub const safe fn WTERMSIG(status: c_int) -> c_int { status & 0o177 } - pub const fn WIFEXITED(status: c_int) -> bool { + pub const safe fn WIFEXITED(status: c_int) -> bool { (status & 0o177) == 0 } - pub const fn WEXITSTATUS(status: c_int) -> c_int { + pub const safe fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0x00ff } - pub const fn WCOREDUMP(status: c_int) -> bool { + pub const safe fn WCOREDUMP(status: c_int) -> bool { (status & 0o200) != 0 } - pub const fn QCMD(cmd: c_int, type_: c_int) -> c_int { + pub const safe fn QCMD(cmd: c_int, type_: c_int) -> c_int { (cmd << 8) | (type_ & 0x00ff) } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/mod.rs similarity index 96% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/mod.rs index ac0d91286..c46a9550a 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/mod.rs @@ -17,8 +17,8 @@ pub type sem_t = *mut sem; pub type key_t = c_long; extern_ty! { - pub enum timezone {} - pub enum sem {} + pub type timezone; + pub type sem; } s! { @@ -133,6 +133,41 @@ pub const CRNCYSTR: crate::nl_item = 50; pub const CODESET: crate::nl_item = 51; +pub const REG_BASIC: c_int = 0o0000; +pub const REG_EXTENDED: c_int = 0o0001; +pub const REG_ICASE: c_int = 0o0002; +pub const REG_NOSUB: c_int = 0o0004; +pub const REG_NEWLINE: c_int = 0o0010; +pub const REG_NOSPEC: c_int = 0o0020; +pub const REG_PEND: c_int = 0o0040; +pub const REG_DUMP: c_int = 0o0200; + +pub const REG_NOMATCH: c_int = 1; +pub const REG_BADPAT: c_int = 2; +pub const REG_ECOLLATE: c_int = 3; +pub const REG_ECTYPE: c_int = 4; +pub const REG_EESCAPE: c_int = 5; +pub const REG_ESUBREG: c_int = 6; +pub const REG_EBRACK: c_int = 7; +pub const REG_EPAREN: c_int = 8; +pub const REG_EBRACE: c_int = 9; +pub const REG_BADBR: c_int = 10; +pub const REG_ERANGE: c_int = 11; +pub const REG_ESPACE: c_int = 12; +pub const REG_BADRPT: c_int = 13; +pub const REG_EMPTY: c_int = 14; +pub const REG_ASSERT: c_int = 15; +pub const REG_INVARG: c_int = 16; +pub const REG_ATOI: c_int = 255; +pub const REG_ITOA: c_int = 0o0400; + +pub const REG_NOTBOL: c_int = 0o00001; +pub const REG_NOTEOL: c_int = 0o00002; +pub const REG_STARTEND: c_int = 0o00004; +pub const REG_TRACE: c_int = 0o00400; +pub const REG_LARGE: c_int = 0o01000; +pub const REG_BACKR: c_int = 0o02000; + pub const EXIT_FAILURE: c_int = 1; pub const EXIT_SUCCESS: c_int = 0; pub const RAND_MAX: c_int = 2147483647; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/aarch64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/aarch64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/aarch64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/aarch64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/arm.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/arm.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/arm.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/arm.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/mips.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/mips.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/mips.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/mips.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/mod.rs similarity index 97% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/mod.rs index f3d027ce3..43572ce59 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -46,7 +46,7 @@ e! { } extern_ty! { - pub enum _cpuset {} + pub type _cpuset; } cfg_if! { @@ -84,7 +84,7 @@ impl siginfo_t { __pad1: Padding, _pid: crate::pid_t, } - (*(self as *const siginfo_t as *const siginfo_timer))._pid + (*(self as *const siginfo_t).cast::())._pid } pub unsafe fn si_uid(&self) -> crate::uid_t { @@ -98,7 +98,7 @@ impl siginfo_t { _pid: crate::pid_t, _uid: crate::uid_t, } - (*(self as *const siginfo_t as *const siginfo_timer))._uid + (*(self as *const siginfo_t).cast::())._uid } pub unsafe fn si_value(&self) -> crate::sigval { @@ -113,7 +113,7 @@ impl siginfo_t { _uid: crate::uid_t, value: crate::sigval, } - (*(self as *const siginfo_t as *const siginfo_timer)).value + (*(self as *const siginfo_t).cast::()).value } pub unsafe fn si_status(&self) -> c_int { @@ -128,7 +128,7 @@ impl siginfo_t { _uid: crate::uid_t, status: c_int, } - (*(self as *const siginfo_t as *const siginfo_timer)).status + (*(self as *const siginfo_t).cast::()).status } } @@ -969,7 +969,7 @@ pub const TCP_CONGCTL: c_int = 0x20; pub const SOCK_CONN_DGRAM: c_int = 6; pub const SOCK_DCCP: c_int = SOCK_CONN_DGRAM; pub const SOCK_NOSIGPIPE: c_int = 0x40000000; -pub const SOCK_FLAGS_MASK: c_int = 0xf0000000; +pub const SOCK_FLAGS_MASK: c_int = u32_cast_int(0xf0000000); pub const SO_SNDTIMEO: c_int = 0x100b; pub const SO_RCVTIMEO: c_int = 0x100c; @@ -1276,7 +1276,7 @@ pub const MNT_NOATIME: c_int = 0x04000000; pub const MNT_AUTOMOUNTED: c_int = 0x10000000; pub const MNT_SYMPERM: c_int = 0x20000000; pub const MNT_NODEVMTIME: c_int = 0x40000000; -pub const MNT_SOFTDEP: c_int = 0x80000000; +pub const MNT_SOFTDEP: c_int = u32_cast_int(0x80000000); pub const MNT_POSIX1EACLS: c_int = 0x00000800; pub const MNT_ACLS: c_int = MNT_POSIX1EACLS; pub const MNT_WAIT: c_int = 1; @@ -1331,20 +1331,20 @@ cfg_if! { ptm_pad1: Padding::new([0; 3]), ptm_unused: Padding::new(0), ptm_pad2: Padding::new([0; 3]), - ptm_waiters: 0 as *mut _, + ptm_waiters: ptr::null_mut(), ptm_owner: 0, ptm_recursed: 0, - ptm_spare2: 0 as *mut _, + ptm_spare2: ptr::null_mut(), }; } else { pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { ptm_magic: 0x33330003, ptm_errorcheck: 0, ptm_unused: Padding::new(0), - ptm_waiters: 0 as *mut _, + ptm_waiters: ptr::null_mut(), ptm_owner: 0, ptm_recursed: 0, - ptm_spare2: 0 as *mut _, + ptm_spare2: ptr::null_mut(), }; } } @@ -1352,21 +1352,21 @@ cfg_if! { pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { ptc_magic: 0x55550005, ptc_lock: 0, - ptc_waiters_first: 0 as *mut _, - ptc_waiters_last: 0 as *mut _, - ptc_mutex: 0 as *mut _, - ptc_private: 0 as *mut _, + ptc_waiters_first: ptr::null_mut(), + ptc_waiters_last: ptr::null_mut(), + ptc_mutex: ptr::null_mut(), + ptc_private: ptr::null_mut(), }; pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { ptr_magic: 0x99990009, ptr_interlock: 0, - ptr_rblocked_first: 0 as *mut _, - ptr_rblocked_last: 0 as *mut _, - ptr_wblocked_first: 0 as *mut _, - ptr_wblocked_last: 0 as *mut _, + ptr_rblocked_first: ptr::null_mut(), + ptr_rblocked_last: ptr::null_mut(), + ptr_wblocked_first: ptr::null_mut(), + ptr_wblocked_last: ptr::null_mut(), ptr_nreaders: 0, ptr_owner: 0, - ptr_private: 0 as *mut _, + ptr_private: ptr::null_mut(), }; pub const PTHREAD_MUTEX_NORMAL: c_int = 0; pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 1; @@ -1478,7 +1478,7 @@ pub const CTLFLAG_ALIAS: c_int = 0x00010000; pub const CTLFLAG_MMAP: c_int = 0x00020000; pub const CTLFLAG_OWNDESC: c_int = 0x00040000; pub const CTLFLAG_UNSIGNED: c_int = 0x00080000; -pub const SYSCTL_VERS_MASK: c_int = 0xff000000; +pub const SYSCTL_VERS_MASK: c_int = u32_cast_int(0xff000000); pub const SYSCTL_VERS_0: c_int = 0x00000000; pub const SYSCTL_VERS_1: c_int = 0x01000000; pub const SYSCTL_VERSION: c_int = SYSCTL_VERS_1; @@ -1716,6 +1716,8 @@ pub const KVME_FLAG_PAGEABLE: c_int = 0x000000008; pub const KVME_FLAG_GROWS_UP: c_int = 0x000000010; pub const KVME_FLAG_GROWS_DOWN: c_int = 0x000000020; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NGROUPS_MAX: c_int = 16; pub const KI_NGROUPS: c_int = 16; @@ -1792,6 +1794,9 @@ pub const RTM_CHGADDR: c_int = 0x18; pub const RTA_TAG: c_int = 0x100; pub const RTAX_TAG: c_int = 8; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RTAX_MAX: c_int = 9; // For eventfd @@ -1810,70 +1815,70 @@ const fn _ALIGN(p: usize) -> usize { } f! { - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { (cmsg as *mut c_uchar).add(_ALIGN(size_of::())) } - pub const fn CMSG_LEN(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(length: c_uint) -> c_uint { _ALIGN(size_of::()) as c_uint + length } - pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if cmsg.is_null() { return crate::CMSG_FIRSTHDR(mhdr); } let next = cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize) + _ALIGN(size_of::()); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next > max { - core::ptr::null_mut::() + ptr::null_mut() } else { (cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr } } - pub const fn CMSG_SPACE(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(length: c_uint) -> c_uint { (_ALIGN(size_of::()) + _ALIGN(length as usize)) as c_uint } // dirfd() is a macro on netbsd to access // the first field of the struct where dirp points to: // http://cvsweb.netbsd.org/bsdweb.cgi/src/include/dirent.h?rev=1.36 - pub fn dirfd(dirp: *mut crate::DIR) -> c_int { + pub unsafe fn dirfd(dirp: *mut crate::DIR) -> c_int { *(dirp as *const c_int) } - pub fn SOCKCREDSIZE(ngrps: usize) -> usize { + pub unsafe fn SOCKCREDSIZE(ngrps: usize) -> usize { let ngrps = if ngrps > 0 { ngrps - 1 } else { 0 }; size_of::() + size_of::() * ngrps } - pub fn PROT_MPROTECT(x: c_int) -> c_int { + pub unsafe fn PROT_MPROTECT(x: c_int) -> c_int { x << 3 } - pub fn PROT_MPROTECT_EXTRACT(x: c_int) -> c_int { + pub unsafe fn PROT_MPROTECT_EXTRACT(x: c_int) -> c_int { (x >> 3) & 0x7 } } safe_f! { - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { status >> 8 } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { (status & 0o177) != 0o177 && (status & 0o177) != 0 } - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { (status & 0o177) == 0o177 } - pub const fn WIFCONTINUED(status: c_int) -> bool { + pub const safe fn WIFCONTINUED(status: c_int) -> bool { status == 0xffff } - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { let major = major as crate::dev_t; let minor = minor as crate::dev_t; let mut dev = 0; @@ -1883,11 +1888,11 @@ safe_f! { dev } - pub const fn major(dev: crate::dev_t) -> c_int { + pub const safe fn major(dev: crate::dev_t) -> c_int { (((dev as u32) & 0x000fff00) >> 8) as c_int } - pub const fn minor(dev: crate::dev_t) -> c_int { + pub const safe fn minor(dev: crate::dev_t) -> c_int { let mut res = 0; res |= ((dev as u32) & 0xfff00000) >> 12; res |= (dev as u32) & 0x000000ff; @@ -2234,7 +2239,7 @@ extern "C" { pub fn _lwp_park( clock: crate::clockid_t, flags: c_int, - ts: *const crate::timespec, + ts: *mut crate::timespec, unpark: crate::lwpid_t, hint: *const c_void, unparkhint: *mut c_void, @@ -2245,6 +2250,7 @@ extern "C" { ntargets: size_t, hint: *const c_void, ) -> c_int; + #[link_name = "__getmntinfo13"] pub fn getmntinfo(mntbufp: *mut *mut crate::statvfs, flags: c_int) -> c_int; pub fn getvfsstat(buf: *mut crate::statvfs, bufsize: size_t, flags: c_int) -> c_int; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/powerpc.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/powerpc.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/powerpc.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/powerpc.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/riscv64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/riscv64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/riscv64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/riscv64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/sparc64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/sparc64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/sparc64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/sparc64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/x86.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/x86.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/x86.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/x86.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/x86_64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/x86_64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/netbsd/x86_64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/netbsd/x86_64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/aarch64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/aarch64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/aarch64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/aarch64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/arm.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/arm.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/arm.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/arm.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/mips64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/mips64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/mips64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/mips64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/mod.rs similarity index 97% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/mod.rs index b6e70f987..5a69b0ef3 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/mod.rs @@ -865,7 +865,7 @@ impl siginfo_t { _stime: crate::clock_t, _status: crate::c_int, } - (*(self as *const siginfo_t as *const siginfo_proc))._status + (*(self as *const siginfo_t).cast::())._status } } @@ -945,6 +945,9 @@ pub const EBADMSG: c_int = 92; pub const ENOTRECOVERABLE: c_int = 93; pub const EOWNERDEAD: c_int = 94; pub const EPROTO: c_int = 95; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const ELAST: c_int = 95; pub const F_DUPFD_CLOEXEC: c_int = 10; @@ -1523,6 +1526,8 @@ pub const ISOFSMNT_EXTATT: c_int = 0x4; // enable extended attr pub const ISOFSMNT_NOJOLIET: c_int = 0x8; // disable Joliet Ext pub const ISOFSMNT_SESS: c_int = 0x10; // use iso_args.sess +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NFS_ARGSVERSION: c_int = 4; // change when nfs_args changes pub const NFSMNT_RESVPORT: c_int = 0; // always use reserved ports @@ -1552,7 +1557,7 @@ pub const NFSMNT_ACDIRMIN: c_int = 0x100000; // acdirmin field valid pub const NFSMNT_ACDIRMAX: c_int = 0x200000; // acdirmax field valid /* Flags valid only in kernel */ -pub const NFSMNT_INTERNAL: c_int = 0xfffc0000; // Bits set internally +pub const NFSMNT_INTERNAL: c_int = u32_cast_int(0xfffc0000); // Bits set internally pub const NFSMNT_HASWRITEVERF: c_int = 0x40000; // Has write verifier for V3 pub const NFSMNT_GOTPATHCONF: c_int = 0x80000; // Got the V3 pathconf info pub const NFSMNT_GOTFSINFO: c_int = 0x100000; // Got the V3 fsinfo @@ -1566,7 +1571,7 @@ pub const NFSMNT_WANTRCV: c_int = 0x8000000; // Want above pub const NFSMNT_WAITAUTH: c_int = 0x10000000; // Wait for authentication pub const NFSMNT_HASAUTH: c_int = 0x20000000; // Has authenticator pub const NFSMNT_WANTAUTH: c_int = 0x40000000; // Wants an authenticator -pub const NFSMNT_AUTHERR: c_int = 0x80000000; // Authentication error +pub const NFSMNT_AUTHERR: c_int = u32_cast_int(0x80000000); // Authentication error pub const MSDOSFSMNT_SHORTNAME: c_int = 0x1; // Force old DOS short names only pub const MSDOSFSMNT_LONGNAME: c_int = 0x2; // Force Win'95 long names @@ -1752,7 +1757,10 @@ pub const LC_NUMERIC_MASK: c_int = 1 << crate::LC_NUMERIC; pub const LC_TIME_MASK: c_int = 1 << crate::LC_TIME; pub const LC_MESSAGES_MASK: c_int = 1 << crate::LC_MESSAGES; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. const _LC_LAST: c_int = 7; + pub const LC_ALL_MASK: c_int = (1 << _LC_LAST) - 2; pub const LC_GLOBAL_LOCALE: crate::locale_t = -1isize as crate::locale_t; @@ -1830,6 +1838,9 @@ pub const RTAX_BFD: c_int = 11; pub const RTAX_DNS: c_int = 12; pub const RTAX_STATIC: c_int = 13; pub const RTAX_SEARCH: c_int = 14; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RTAX_MAX: c_int = 15; const fn _ALIGN(p: usize) -> usize { @@ -1837,50 +1848,50 @@ const fn _ALIGN(p: usize) -> usize { } f! { - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { (cmsg as *mut c_uchar).offset(_ALIGN(size_of::()) as isize) } - pub const fn CMSG_LEN(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(length: c_uint) -> c_uint { _ALIGN(size_of::()) as c_uint + length } - pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if cmsg.is_null() { return crate::CMSG_FIRSTHDR(mhdr); } let next = cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize) + _ALIGN(size_of::()); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next > max { - core::ptr::null_mut::() + ptr::null_mut() } else { (cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr } } - pub const fn CMSG_SPACE(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(length: c_uint) -> c_uint { (_ALIGN(size_of::()) + _ALIGN(length as usize)) as c_uint } } safe_f! { - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { status >> 8 } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { (status & 0o177) != 0o177 && (status & 0o177) != 0 } - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0o177 } - pub const fn WIFCONTINUED(status: c_int) -> bool { + pub const safe fn WIFCONTINUED(status: c_int) -> bool { (status & 0o177777) == 0o177777 } - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { let major = major as crate::dev_t; let minor = minor as crate::dev_t; let mut dev = 0; @@ -1890,11 +1901,11 @@ safe_f! { dev } - pub const fn major(dev: crate::dev_t) -> c_uint { + pub const safe fn major(dev: crate::dev_t) -> c_uint { ((dev as c_uint) >> 8) & 0xff } - pub const fn minor(dev: crate::dev_t) -> c_uint { + pub const safe fn minor(dev: crate::dev_t) -> c_uint { let dev = dev as c_uint; let mut res = 0; res |= (dev) & 0xff; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/powerpc.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/powerpc.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/powerpc.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/powerpc.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/powerpc64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/powerpc64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/powerpc64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/powerpc64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/riscv64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/riscv64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/riscv64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/riscv64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/sparc64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/sparc64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/sparc64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/sparc64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/x86.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/x86.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/x86.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/x86.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/x86_64.rs b/thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/x86_64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/bsd/netbsdlike/openbsd/x86_64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/bsd/netbsdlike/openbsd/x86_64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/cygwin/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/cygwin/mod.rs similarity index 96% rename from thirdparty/crates/libc-0.2.186/src/unix/cygwin/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/cygwin/mod.rs index 0c093a4c1..bfe1d8ff4 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/cygwin/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/cygwin/mod.rs @@ -29,7 +29,7 @@ pub type suseconds_t = c_long; pub type useconds_t = c_ulong; extern_ty! { - pub enum timezone {} + pub type timezone; } pub type sigset_t = c_ulong; @@ -71,7 +71,7 @@ pub type nfds_t = c_uint; pub type sem_t = *mut sem; extern_ty! { - pub enum sem {} + pub type sem; } pub type tcflag_t = c_uint; @@ -534,7 +534,7 @@ impl siginfo_t { _si_errno: c_int, si_addr: *mut c_void, } - (*(self as *const siginfo_t as *const siginfo_si_addr)).si_addr + (*(self as *const siginfo_t).cast::()).si_addr } pub unsafe fn si_status(&self) -> c_int { @@ -547,7 +547,7 @@ impl siginfo_t { _si_errno: c_int, si_status: c_int, } - (*(self as *const siginfo_t as *const siginfo_sigchld)).si_status + (*(self as *const siginfo_t).cast::()).si_status } pub unsafe fn si_pid(&self) -> pid_t { @@ -568,7 +568,7 @@ impl siginfo_t { _si_errno: c_int, si_value: sigval, } - (*(self as *const siginfo_t as *const siginfo_si_value)).si_value + (*(self as *const siginfo_t).cast::()).si_value } } @@ -599,7 +599,7 @@ pub const SA_SIGINFO: c_int = 0x00000002; pub const SA_RESTART: c_int = 0x10000000; pub const SA_ONSTACK: c_int = 0x20000000; pub const SA_NODEFER: c_int = 0x40000000; -pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000); pub const MINSIGSTKSZ: size_t = 8192; pub const SIGSTKSZ: size_t = 32768; pub const SIGHUP: c_int = 1; @@ -693,8 +693,8 @@ pub const IF_NAMESIZE: size_t = 44; pub const IFNAMSIZ: size_t = IF_NAMESIZE; pub const FIONREAD: c_int = 0x4008667f; -pub const FIONBIO: c_int = 0x8004667e; -pub const FIOASYNC: c_int = 0x8008667d; +pub const FIONBIO: c_int = u32_cast_int(0x8004667e); +pub const FIOASYNC: c_int = u32_cast_int(0x8008667d); pub const FIOCLEX: c_int = 0; // FIXME: does not exist on Cygwin! pub const SIOCGIFCONF: c_ulong = 0x80107364; pub const SIOCGIFFLAGS: c_ulong = 0x80507365; @@ -897,8 +897,15 @@ pub const ARG_MAX: c_int = 32000; pub const CHILD_MAX: c_int = 256; pub const IOV_MAX: c_int = 1024; pub const PTHREAD_STACK_MIN: size_t = 65536; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PATH_MAX: c_int = 4096; + pub const PIPE_BUF: usize = 4096; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NGROUPS_MAX: c_int = 1024; pub const FILENAME_MAX: c_int = 4096; @@ -1020,7 +1027,7 @@ pub const LC_TIME_MASK: c_int = 1 << 5; pub const LC_MESSAGES_MASK: c_int = 1 << 6; pub const LC_GLOBAL_LOCALE: locale_t = -1isize as locale_t; -pub const SEM_FAILED: *mut sem_t = core::ptr::null_mut(); +pub const SEM_FAILED: *mut sem_t = ptr::null_mut(); pub const ST_RDONLY: c_ulong = 0x80000; pub const ST_NOSUID: c_ulong = 0; @@ -1672,37 +1679,35 @@ pub const FALLOC_FL_INSERT_RANGE: c_int = 0x0010; pub const FALLOC_FL_KEEP_SIZE: c_int = 0x1000; f! { - pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] &= !(1 << (fd % size)); } - pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0 } - pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] |= 1 << (fd % size); } - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in (*set).fds_bits.iter_mut() { - *slot = 0; - } + pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { + (*set).fds_bits.fill(0); } - pub fn CPU_ALLOC_SIZE(count: c_int) -> size_t { + pub unsafe fn CPU_ALLOC_SIZE(count: c_int) -> size_t { let _dummy: cpu_set_t = cpu_set_t { bits: [0; 16] }; let size_in_bits = 8 * size_of_val(&_dummy.bits[0]); ((count as size_t + size_in_bits - 1) / 8) as size_t } - pub fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> c_int { + pub unsafe fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> c_int { let mut s: u32 = 0; let size_of_mask = size_of_val(&cpuset.bits[0]); for i in cpuset.bits[..(size / size_of_mask)].iter() { @@ -1711,12 +1716,11 @@ f! { s as c_int } - pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { - for slot in cpuset.bits.iter_mut() { - *slot = 0; - } + pub unsafe fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { + cpuset.bits.fill(0); } - pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { + + pub unsafe fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); if cpu < size_in_bits { let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); @@ -1724,7 +1728,7 @@ f! { } } - pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { + pub unsafe fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); if cpu < size_in_bits { let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); @@ -1732,7 +1736,7 @@ f! { } } - pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { + pub unsafe fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); if cpu < size_in_bits { let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); @@ -1742,89 +1746,89 @@ f! { } } - pub fn CPU_COUNT(cpuset: &cpu_set_t) -> c_int { + pub unsafe fn CPU_COUNT(cpuset: &cpu_set_t) -> c_int { CPU_COUNT_S(size_of::(), cpuset) } - pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { + pub unsafe fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { set1.bits == set2.bits } - pub fn CMSG_LEN(length: c_uint) -> c_uint { + pub unsafe fn CMSG_LEN(length: c_uint) -> c_uint { CMSG_ALIGN(size_of::()) as c_uint + length } - pub const fn CMSG_SPACE(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(length: c_uint) -> c_uint { (CMSG_ALIGN(length as usize) + CMSG_ALIGN(size_of::())) as c_uint } - pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { if (*mhdr).msg_controllen as usize >= size_of::() { (*mhdr).msg_control.cast() } else { - core::ptr::null_mut() + ptr::null_mut() } } - pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { let next = (cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr; let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next as usize + CMSG_ALIGN(size_of::()) as usize > max { - core::ptr::null_mut() + ptr::null_mut() } else { next } } - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { cmsg.offset(1).cast_mut().cast() } } safe_f! { - pub const fn makedev(ma: c_uint, mi: c_uint) -> dev_t { + pub const safe fn makedev(ma: c_uint, mi: c_uint) -> dev_t { let ma = ma as dev_t; let mi = mi as dev_t; (ma << 16) | (mi & 0xffff) } - pub const fn major(dev: dev_t) -> c_uint { + pub const safe fn major(dev: dev_t) -> c_uint { ((dev >> 16) & 0xffff) as c_uint } - pub const fn minor(dev: dev_t) -> c_uint { + pub const safe fn minor(dev: dev_t) -> c_uint { (dev & 0xffff) as c_uint } - pub const fn WIFEXITED(status: c_int) -> bool { + pub const safe fn WIFEXITED(status: c_int) -> bool { (status & 0xff) == 0 } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { (status & 0o177) != 0o177 && (status & 0o177) != 0 } - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0o177 } - pub const fn WIFCONTINUED(status: c_int) -> bool { + pub const safe fn WIFCONTINUED(status: c_int) -> bool { (status & 0o177777) == 0o177777 } - pub const fn WEXITSTATUS(status: c_int) -> c_int { + pub const safe fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xff } - pub const fn WTERMSIG(status: c_int) -> c_int { + pub const safe fn WTERMSIG(status: c_int) -> c_int { status & 0o177 } - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { (status >> 8) & 0xff } - pub const fn WCOREDUMP(status: c_int) -> bool { + pub const safe fn WCOREDUMP(status: c_int) -> bool { WIFSIGNALED(status) && (status & 0x80) != 0 } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/haiku/b32.rs b/thirdparty/crates/libc-0.2.189/src/unix/haiku/b32.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/haiku/b32.rs rename to thirdparty/crates/libc-0.2.189/src/unix/haiku/b32.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/haiku/b64.rs b/thirdparty/crates/libc-0.2.189/src/unix/haiku/b64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/haiku/b64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/haiku/b64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/haiku/bsd.rs b/thirdparty/crates/libc-0.2.189/src/unix/haiku/bsd.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/haiku/bsd.rs rename to thirdparty/crates/libc-0.2.189/src/unix/haiku/bsd.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/haiku/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/haiku/mod.rs similarity index 97% rename from thirdparty/crates/libc-0.2.186/src/unix/haiku/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/haiku/mod.rs index cbb6464ed..011fa9f9a 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/haiku/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/haiku/mod.rs @@ -81,7 +81,7 @@ pub type posix_spawnattr_t = *mut c_void; pub type posix_spawn_file_actions_t = *mut c_void; extern_ty! { - pub enum timezone {} + pub type timezone; } impl siginfo_t { @@ -902,6 +902,9 @@ pub const MINSIGSTKSZ: size_t = 8192; pub const SIGSTKSZ: size_t = 16384; pub const IOV_MAX: c_int = 1024; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PATH_MAX: c_int = 1024; pub const SA_NOCLDSTOP: c_int = 0x01; @@ -1098,7 +1101,7 @@ pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { flags: 0, unused: Padding::new(0), - mutex: 0 as *mut _, + mutex: ptr::null_mut(), waiter_count: 0, lock: 0, }; @@ -1109,7 +1112,7 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { lock_count: 0, reader_count: 0, writer_count: 0, - waiters: [0 as *mut _; 2], + waiters: [ptr::null_mut(); 2], }; pub const PTHREAD_MUTEX_DEFAULT: c_int = 0; @@ -1383,27 +1386,27 @@ const fn CMSG_ALIGN(len: usize) -> usize { } f! { - pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { if (*mhdr).msg_controllen as usize >= size_of::() { - (*mhdr).msg_control as *mut cmsghdr + (*mhdr).msg_control.cast() } else { - core::ptr::null_mut::() + ptr::null_mut() } } - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { (cmsg as *mut c_uchar).offset(CMSG_ALIGN(size_of::()) as isize) } - pub const fn CMSG_SPACE(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(length: c_uint) -> c_uint { (CMSG_ALIGN(length as usize) + CMSG_ALIGN(size_of::())) as c_uint } - pub const fn CMSG_LEN(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(length: c_uint) -> c_uint { CMSG_ALIGN(size_of::()) as c_uint + length } - pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if cmsg.is_null() { return crate::CMSG_FIRSTHDR(mhdr); } @@ -1412,70 +1415,68 @@ f! { + CMSG_ALIGN(size_of::()); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next > max { - core::ptr::null_mut::() + ptr::null_mut() } else { (cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr } } - pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] &= !(1 << (fd % size)); return; } - pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0; } - pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] |= 1 << (fd % size); return; } - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in (*set).fds_bits.iter_mut() { - *slot = 0; - } + pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { + (*set).fds_bits.fill(0); } } safe_f! { - pub const fn WIFEXITED(status: c_int) -> bool { + pub const safe fn WIFEXITED(status: c_int) -> bool { (status & !0xff) == 0 } - pub const fn WEXITSTATUS(status: c_int) -> c_int { + pub const safe fn WEXITSTATUS(status: c_int) -> c_int { status & 0xff } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { ((status >> 8) & 0xff) != 0 } - pub const fn WTERMSIG(status: c_int) -> c_int { + pub const safe fn WTERMSIG(status: c_int) -> c_int { (status >> 8) & 0xff } - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { ((status >> 16) & 0xff) != 0 } - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { (status >> 16) & 0xff } // actually WIFCORED, but this is used everywhere else - pub const fn WCOREDUMP(status: c_int) -> bool { + pub const safe fn WCOREDUMP(status: c_int) -> bool { (status & 0x10000) != 0 } - pub const fn WIFCONTINUED(status: c_int) -> bool { + pub const safe fn WIFCONTINUED(status: c_int) -> bool { (status & 0x20000) != 0 } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/haiku/native.rs b/thirdparty/crates/libc-0.2.189/src/unix/haiku/native.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/haiku/native.rs rename to thirdparty/crates/libc-0.2.189/src/unix/haiku/native.rs index 99ceab8a7..bc0cd5e15 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/haiku/native.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/haiku/native.rs @@ -519,7 +519,7 @@ cfg_if! { // kernel/OS.h pub const B_OS_NAME_LENGTH: usize = 32; pub const B_PAGE_SIZE: usize = 4096; -pub const B_INFINITE_TIMEOUT: usize = 9223372036854775807; +pub const B_INFINITE_TIMEOUT: c_longlong = 0x7FFFFFFFFFFFFFFF; pub const B_RELATIVE_TIMEOUT: u32 = 0x8; pub const B_ABSOLUTE_TIMEOUT: u32 = 0x10; @@ -905,7 +905,7 @@ pub const B_XATTR_TYPE: u32 = haiku_constant!('X', 'A', 'T', 'R'); pub const B_NETWORK_ADDRESS_TYPE: u32 = haiku_constant!('N', 'W', 'A', 'D'); pub const B_MIME_STRING_TYPE: u32 = haiku_constant!('M', 'I', 'M', 'S'); pub const B_ASCII_TYPE: u32 = haiku_constant!('T', 'E', 'X', 'T'); -pub const B_APP_IMAGE_SYMBOL: *const c_void = core::ptr::null(); +pub const B_APP_IMAGE_SYMBOL: *const c_void = ptr::null(); extern "C" { // kernel/OS.h diff --git a/thirdparty/crates/libc-0.2.186/src/unix/haiku/x86_64.rs b/thirdparty/crates/libc-0.2.189/src/unix/haiku/x86_64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/haiku/x86_64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/haiku/x86_64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/hurd/b32.rs b/thirdparty/crates/libc-0.2.189/src/unix/hurd/b32.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/hurd/b32.rs rename to thirdparty/crates/libc-0.2.189/src/unix/hurd/b32.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/hurd/b64.rs b/thirdparty/crates/libc-0.2.189/src/unix/hurd/b64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/hurd/b64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/hurd/b64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/hurd/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/hurd/mod.rs similarity index 97% rename from thirdparty/crates/libc-0.2.186/src/unix/hurd/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/hurd/mod.rs index 74b77d96f..1cc87eb26 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/hurd/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/hurd/mod.rs @@ -226,8 +226,8 @@ pub type nl_item = c_int; pub type iconv_t = *mut c_void; extern_ty! { - pub enum fpos64_t {} // FIXME(hurd): fill this out with a struct - pub enum timezone {} + pub type fpos64_t; // FIXME(hurd): fill this out with a struct + pub type timezone; } // structs @@ -1230,7 +1230,11 @@ pub const PF_IPX: c_int = 23; pub const PF_SIP: c_int = 24; pub const PF_PIP: c_int = 25; pub const PF_INET6: c_int = 26; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PF_MAX: c_int = 27; + pub const AF_UNSPEC: c_int = 0; pub const AF_LOCAL: c_int = 1; pub const AF_UNIX: c_int = 1; @@ -1260,7 +1264,11 @@ pub const AF_IPX: c_int = 23; pub const AF_SIP: c_int = 24; pub const pseudo_AF_PIP: c_int = 25; pub const AF_INET6: c_int = 26; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const AF_MAX: c_int = 27; + pub const SOMAXCONN: c_int = 4096; pub const _SS_SIZE: usize = 128; pub const CMGROUP_MAX: usize = 16; @@ -1526,8 +1534,15 @@ pub const _POSIX_QLIMIT: usize = 1; pub const _POSIX_HIWAT: usize = 512; pub const _POSIX_UIO_MAXIOV: usize = 16; pub const _POSIX_CLOCKRES_MIN: usize = 20000000; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NAME_MAX: usize = 255; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NGROUPS_MAX: usize = 256; + pub const _POSIX_THREAD_KEYS_MAX: usize = 128; pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: usize = 4; pub const _POSIX_THREAD_THREADS_MAX: usize = 64; @@ -3207,6 +3222,9 @@ pub const RTLD_DI_PROFILEOUT: c_int = 8; pub const RTLD_DI_TLS_MODID: c_int = 9; pub const RTLD_DI_TLS_DATA: c_int = 10; pub const RTLD_DI_PHDR: c_int = 11; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RTLD_DI_MAX: c_int = 11; pub const SI_ASYNCIO: c_int = -4; @@ -3336,19 +3354,19 @@ pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { }; pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { __lock: __PTHREAD_SPIN_LOCK_INITIALIZER, - __queue: 0i64 as *mut __pthread, - __attr: 0i64 as *mut __pthread_condattr, + __queue: ptr::null_mut(), + __attr: ptr::null_mut(), __wrefs: 0, - __data: 0i64 as *mut c_void, + __data: ptr::null_mut(), }; pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { __held: __PTHREAD_SPIN_LOCK_INITIALIZER, __lock: __PTHREAD_SPIN_LOCK_INITIALIZER, __readers: 0, - __readerqueue: 0i64 as *mut __pthread, - __writerqueue: 0i64 as *mut __pthread, - __attr: 0i64 as *mut __pthread_rwlockattr, - __data: 0i64 as *mut c_void, + __readerqueue: ptr::null_mut(), + __writerqueue: ptr::null_mut(), + __attr: ptr::null_mut(), + __data: ptr::null_mut(), }; pub const PTHREAD_STACK_MIN: size_t = 0; @@ -3361,72 +3379,70 @@ const fn CMSG_ALIGN(len: usize) -> usize { // functions f! { - pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { if (*mhdr).msg_controllen as usize >= size_of::() { - (*mhdr).msg_control.cast::() + (*mhdr).msg_control.cast() } else { - core::ptr::null_mut::() + ptr::null_mut() } } - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { (cmsg as *mut c_uchar).offset(CMSG_ALIGN(size_of::()) as isize) } - pub const fn CMSG_SPACE(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(length: c_uint) -> c_uint { (CMSG_ALIGN(length as usize) + CMSG_ALIGN(size_of::())) as c_uint } - pub const fn CMSG_LEN(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(length: c_uint) -> c_uint { CMSG_ALIGN(size_of::()) as c_uint + length } - pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if ((*cmsg).cmsg_len as usize) < size_of::() { - return core::ptr::null_mut::(); + return ptr::null_mut(); } let next = (cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr; let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if (next.offset(1)) as usize > max || next as usize + CMSG_ALIGN((*next).cmsg_len as usize) > max { - core::ptr::null_mut::() + ptr::null_mut() } else { - next.cast::() + next.cast() } } - pub fn CPU_ALLOC_SIZE(count: c_int) -> size_t { + pub unsafe fn CPU_ALLOC_SIZE(count: c_int) -> size_t { let _dummy: cpu_set_t = mem::zeroed(); let size_in_bits = 8 * size_of_val(&_dummy.bits[0]); ((count as size_t + size_in_bits - 1) / 8) as size_t } - pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { - for slot in cpuset.bits.iter_mut() { - *slot = 0; - } + pub unsafe fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { + cpuset.bits.fill(0); } - pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { + pub unsafe fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] |= 1 << offset; } - pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { + pub unsafe fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] &= !(1 << offset); } - pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { + pub unsafe fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); 0 != (cpuset.bits[idx] & (1 << offset)) } - pub fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> c_int { + pub unsafe fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> c_int { let mut s: u32 = 0; let size_of_mask = size_of_val(&cpuset.bits[0]); for i in cpuset.bits[..(size / size_of_mask)].iter() { @@ -3435,46 +3451,44 @@ f! { s as c_int } - pub fn CPU_COUNT(cpuset: &cpu_set_t) -> c_int { + pub unsafe fn CPU_COUNT(cpuset: &cpu_set_t) -> c_int { CPU_COUNT_S(size_of::(), cpuset) } - pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { + pub unsafe fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { set1.bits == set2.bits } - pub fn IPTOS_TOS(tos: u8) -> u8 { + pub unsafe fn IPTOS_TOS(tos: u8) -> u8 { tos & IPTOS_TOS_MASK } - pub fn IPTOS_PREC(tos: u8) -> u8 { + pub unsafe fn IPTOS_PREC(tos: u8) -> u8 { tos & IPTOS_PREC_MASK } - pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] &= !(1 << (fd % size)); return; } - pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0; } - pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] |= 1 << (fd % size); return; } - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in (*set).fds_bits.iter_mut() { - *slot = 0; - } + pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { + (*set).fds_bits.fill(0); } } @@ -4467,7 +4481,7 @@ extern "C" { } safe_f! { - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { let major = major as crate::dev_t; let minor = minor as crate::dev_t; let mut dev = 0; @@ -4476,79 +4490,79 @@ safe_f! { dev } - pub const fn major(dev: crate::dev_t) -> c_uint { + pub const safe fn major(dev: crate::dev_t) -> c_uint { ((dev >> 8) & 0xff) as c_uint } - pub const fn minor(dev: crate::dev_t) -> c_uint { + pub const safe fn minor(dev: crate::dev_t) -> c_uint { (dev & 0xffff00ff) as c_uint } - pub fn SIGRTMAX() -> c_int { + pub safe fn SIGRTMAX() -> c_int { unsafe { __libc_current_sigrtmax() } } - pub fn SIGRTMIN() -> c_int { + pub safe fn SIGRTMIN() -> c_int { unsafe { __libc_current_sigrtmin() } } - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0x7f } - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { (status >> 8) & 0xff } - pub const fn WIFCONTINUED(status: c_int) -> bool { + pub const safe fn WIFCONTINUED(status: c_int) -> bool { status == 0xffff } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { ((status & 0x7f) + 1) as i8 >= 2 } - pub const fn WTERMSIG(status: c_int) -> c_int { + pub const safe fn WTERMSIG(status: c_int) -> c_int { status & 0x7f } - pub const fn WIFEXITED(status: c_int) -> bool { + pub const safe fn WIFEXITED(status: c_int) -> bool { (status & 0x7f) == 0 } - pub const fn WEXITSTATUS(status: c_int) -> c_int { + pub const safe fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xff } - pub const fn WCOREDUMP(status: c_int) -> bool { + pub const safe fn WCOREDUMP(status: c_int) -> bool { (status & 0x80) != 0 } - pub const fn W_EXITCODE(ret: c_int, sig: c_int) -> c_int { + pub const safe fn W_EXITCODE(ret: c_int, sig: c_int) -> c_int { (ret << 8) | sig } - pub const fn W_STOPCODE(sig: c_int) -> c_int { + pub const safe fn W_STOPCODE(sig: c_int) -> c_int { (sig << 8) | 0x7f } - pub const fn QCMD(cmd: c_int, type_: c_int) -> c_int { + pub const safe fn QCMD(cmd: c_int, type_: c_int) -> c_int { (cmd << 8) | (type_ & 0x00ff) } - pub const fn IPOPT_COPIED(o: u8) -> u8 { + pub const safe fn IPOPT_COPIED(o: u8) -> u8 { o & IPOPT_COPY } - pub const fn IPOPT_CLASS(o: u8) -> u8 { + pub const safe fn IPOPT_CLASS(o: u8) -> u8 { o & IPOPT_CLASS_MASK } - pub const fn IPOPT_NUMBER(o: u8) -> u8 { + pub const safe fn IPOPT_NUMBER(o: u8) -> u8 { o & IPOPT_NUMBER_MASK } - pub const fn IPTOS_ECN(x: u8) -> u8 { + pub const safe fn IPTOS_ECN(x: u8) -> u8 { x & crate::IPTOS_ECN_MASK } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b32/arm.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b32/arm.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b32/arm.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b32/arm.rs index 66375876e..0fe599fe5 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b32/arm.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b32/arm.rs @@ -483,7 +483,7 @@ f! { // directly. This workaround can be removed if the minimum version of // Android is bumped. When the workaround is removed, `accept4` can be // moved back to `linux_like/mod.rs` - pub fn accept4( + pub unsafe fn accept4( fd: c_int, addr: *mut crate::sockaddr, len: *mut crate::socklen_t, diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b32/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b32/mod.rs similarity index 98% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b32/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b32/mod.rs index d0c2349b9..e744c324e 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b32/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b32/mod.rs @@ -8,8 +8,6 @@ pub type off64_t = c_longlong; pub type sigset_t = c_ulong; pub type socklen_t = i32; pub type time64_t = i64; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; s! { // FIXME(1.0): This should not implement `PartialEq` @@ -188,7 +186,7 @@ pub const SA_NOCLDSTOP: c_int = 0x00000001; pub const SA_NOCLDWAIT: c_int = 0x00000002; pub const SA_NODEFER: c_int = 0x40000000; pub const SA_ONSTACK: c_int = 0x08000000; -pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000); pub const SA_RESTART: c_int = 0x10000000; pub const SA_SIGINFO: c_int = 0x00000004; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b32/x86/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b32/x86/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b32/x86/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b32/x86/mod.rs index 7266cf2c3..baa285e0f 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b32/x86/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b32/x86/mod.rs @@ -554,7 +554,7 @@ f! { // This workaround can be removed if the minimum Android version is bumped. // When the workaround is removed, `accept4` can be moved back // to `linux_like/mod.rs` - pub fn accept4( + pub unsafe fn accept4( fd: c_int, addr: *mut crate::sockaddr, len: *mut crate::socklen_t, diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b64/aarch64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b64/aarch64/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b64/aarch64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b64/aarch64/mod.rs index 3cc6fc837..c8c48e5d9 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b64/aarch64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b64/aarch64/mod.rs @@ -2,8 +2,6 @@ use crate::off64_t; use crate::prelude::*; pub type wchar_t = u32; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; s! { pub struct stat { diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b64/mod.rs similarity index 98% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b64/mod.rs index 84c35a57f..f5a204d8f 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b64/mod.rs @@ -145,7 +145,7 @@ pub const SA_NOCLDSTOP: c_int = 0x00000001; pub const SA_NOCLDWAIT: c_int = 0x00000002; pub const SA_NODEFER: c_int = 0x40000000; pub const SA_ONSTACK: c_int = 0x08000000; -pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000); pub const SA_RESTART: c_int = 0x10000000; pub const SA_SIGINFO: c_int = 0x00000004; @@ -183,7 +183,7 @@ f! { // directly. This workaround can be removed if the minimum version of // Android is bumped. When the workaround is removed, `accept4` can be // moved back to `linux_like/mod.rs` - pub fn accept4( + pub unsafe fn accept4( fd: c_int, addr: *mut crate::sockaddr, len: *mut crate::socklen_t, diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b64/riscv64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b64/riscv64/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b64/riscv64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b64/riscv64/mod.rs index dded1292b..12f87304e 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b64/riscv64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b64/riscv64/mod.rs @@ -3,8 +3,6 @@ use crate::prelude::*; pub type wchar_t = u32; pub type greg_t = i64; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; s! { pub struct stat { diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b64/x86_64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b64/x86_64/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b64/x86_64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b64/x86_64/mod.rs index 0f3b74131..6fd06b007 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/b64/x86_64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/b64/x86_64/mod.rs @@ -3,8 +3,6 @@ use crate::prelude::*; pub type wchar_t = i32; pub type greg_t = i64; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; s! { pub struct stat { diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/mod.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/mod.rs index 31d1dba3e..a29476859 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/android/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/android/mod.rs @@ -4,6 +4,8 @@ use crate::prelude::*; use crate::{ cmsghdr, msghdr, + _IOW, + _IOWR, }; cfg_if! { @@ -41,13 +43,6 @@ pub type loff_t = c_longlong; pub type __kernel_loff_t = c_longlong; pub type __kernel_pid_t = c_int; -pub type __u8 = c_uchar; -pub type __u16 = c_ushort; -pub type __s16 = c_short; -pub type __u32 = c_uint; -pub type __s32 = c_int; -pub type __be16 = __u16; - // linux/elf.h pub type Elf32_Addr = u32; @@ -341,6 +336,34 @@ s! { pub flags: crate::__u64, } + pub struct seccomp_notif_sizes { + pub seccomp_notif: crate::__u16, + pub seccomp_notif_resp: crate::__u16, + pub seccomp_data: crate::__u16, + } + + pub struct seccomp_notif { + pub id: crate::__u64, + pub pid: crate::__u32, + pub flags: crate::__u32, + pub data: seccomp_data, + } + + pub struct seccomp_notif_resp { + pub id: crate::__u64, + pub val: crate::__s64, + pub error: crate::__s32, + pub flags: crate::__u32, + } + + pub struct seccomp_notif_addfd { + pub id: crate::__u64, + pub flags: crate::__u32, + pub srcfd: crate::__u32, + pub newfd: crate::__u32, + pub newfd_flags: crate::__u32, + } + pub struct ptrace_peeksiginfo_args { pub off: crate::__u64, pub flags: crate::__u32, @@ -576,6 +599,14 @@ s! { __serial: c_uint, __value: [c_char; 92], } + + // linux/futex.h + pub struct futex_waitv { + pub val: crate::__u64, + pub uaddr: crate::__u64, + pub flags: crate::__u32, + __reserved: Padding, + } } s_no_extra_traits! { @@ -688,6 +719,7 @@ cfg_if! { } pub const MADV_SOFT_OFFLINE: c_int = 101; +#[allow(overflowing_literals)] // fixed in a future kernel version pub const MS_NOUSER: c_ulong = 0xffffffff80000000; pub const MS_RMT_MASK: c_ulong = 0x02800051; @@ -742,6 +774,15 @@ pub const FILENAME_MAX: c_uint = 4096; pub const FOPEN_MAX: c_uint = 20; pub const POSIX_FADV_DONTNEED: c_int = 4; pub const POSIX_FADV_NOREUSE: c_int = 5; +pub const POSIX_SPAWN_RESETIDS: c_short = 1; +pub const POSIX_SPAWN_SETPGROUP: c_short = 2; +pub const POSIX_SPAWN_SETSIGDEF: c_short = 4; +pub const POSIX_SPAWN_SETSIGMASK: c_short = 8; +pub const POSIX_SPAWN_SETSCHEDPARAM: c_short = 16; +pub const POSIX_SPAWN_SETSCHEDULER: c_short = 32; +pub const POSIX_SPAWN_USEVFORK: c_short = 64; +pub const POSIX_SPAWN_SETSID: c_short = 128; +pub const POSIX_SPAWN_CLOEXEC_DEFAULT: c_short = 256; pub const L_tmpnam: c_uint = 4096; pub const TMP_MAX: c_uint = 308915776; pub const _PC_LINK_MAX: c_int = 1; @@ -1291,7 +1332,7 @@ pub const TCGETS: c_int = 0x5401; pub const TCSETS: c_int = 0x5402; pub const TCSETSW: c_int = 0x5403; pub const TCSETSF: c_int = 0x5404; -pub const TCGETS2: c_int = 0x802c542a; +pub const TCGETS2: c_int = u32_cast_int(0x802c542a); pub const TCSETS2: c_int = 0x402c542b; pub const TCSETSW2: c_int = 0x402c542c; pub const TCSETSF2: c_int = 0x402c542d; @@ -1355,24 +1396,24 @@ pub const AI_DEFAULT: c_int = AI_V4MAPPED_CFG | AI_ADDRCONFIG; // linux/kexec.h pub const KEXEC_ON_CRASH: c_int = 0x00000001; pub const KEXEC_PRESERVE_CONTEXT: c_int = 0x00000002; -pub const KEXEC_ARCH_MASK: c_int = 0xffff0000; +pub const KEXEC_ARCH_MASK: c_int = u32_cast_int(0xffff0000); pub const KEXEC_FILE_UNLOAD: c_int = 0x00000001; pub const KEXEC_FILE_ON_CRASH: c_int = 0x00000002; pub const KEXEC_FILE_NO_INITRAMFS: c_int = 0x00000004; -pub const LINUX_REBOOT_MAGIC1: c_int = 0xfee1dead; +pub const LINUX_REBOOT_MAGIC1: c_int = u32_cast_int(0xfee1dead); pub const LINUX_REBOOT_MAGIC2: c_int = 672274793; pub const LINUX_REBOOT_MAGIC2A: c_int = 85072278; pub const LINUX_REBOOT_MAGIC2B: c_int = 369367448; pub const LINUX_REBOOT_MAGIC2C: c_int = 537993216; pub const LINUX_REBOOT_CMD_RESTART: c_int = 0x01234567; -pub const LINUX_REBOOT_CMD_HALT: c_int = 0xCDEF0123; -pub const LINUX_REBOOT_CMD_CAD_ON: c_int = 0x89ABCDEF; +pub const LINUX_REBOOT_CMD_HALT: c_int = u32_cast_int(0xCDEF0123); +pub const LINUX_REBOOT_CMD_CAD_ON: c_int = u32_cast_int(0x89ABCDEF); pub const LINUX_REBOOT_CMD_CAD_OFF: c_int = 0x00000000; pub const LINUX_REBOOT_CMD_POWER_OFF: c_int = 0x4321FEDC; -pub const LINUX_REBOOT_CMD_RESTART2: c_int = 0xA1B2C3D4; -pub const LINUX_REBOOT_CMD_SW_SUSPEND: c_int = 0xD000FCE2; +pub const LINUX_REBOOT_CMD_RESTART2: c_int = u32_cast_int(0xA1B2C3D4); +pub const LINUX_REBOOT_CMD_SW_SUSPEND: c_int = u32_cast_int(0xD000FCE2); pub const LINUX_REBOOT_CMD_KEXEC: c_int = 0x45584543; pub const REG_BASIC: c_int = 0; @@ -1598,6 +1639,9 @@ pub const NFNL_SUBSYS_CTNETLINK_TIMEOUT: c_int = 8; pub const NFNL_SUBSYS_CTHELPER: c_int = 9; pub const NFNL_SUBSYS_NFTABLES: c_int = 10; pub const NFNL_SUBSYS_NFT_COMPAT: c_int = 11; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NFNL_SUBSYS_COUNT: c_int = 12; pub const NFNL_MSG_BATCH_BEGIN: c_int = NLMSG_MIN_TYPE; @@ -1710,6 +1754,9 @@ pub const NFQA_CFG_F_CONNTRACK: c_int = 0x0002; pub const NFQA_CFG_F_GSO: c_int = 0x0004; pub const NFQA_CFG_F_UID_GID: c_int = 0x0008; pub const NFQA_CFG_F_SECCTX: c_int = 0x0010; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NFQA_CFG_F_MAX: c_int = 0x0020; pub const NFQA_SKB_CSUMNOTREADY: c_int = 0x0001; @@ -1812,6 +1859,14 @@ pub const SECCOMP_USER_NOTIF_FLAG_CONTINUE: c_ulong = 1; pub const SECCOMP_ADDFD_FLAG_SETFD: c_ulong = 1; pub const SECCOMP_ADDFD_FLAG_SEND: c_ulong = 2; +const SECCOMP_IOC_MAGIC: u32 = b'!' as u32; + +pub const SECCOMP_IOCTL_NOTIF_RECV: Ioctl = _IOWR::(SECCOMP_IOC_MAGIC, 0); +pub const SECCOMP_IOCTL_NOTIF_SEND: Ioctl = _IOWR::(SECCOMP_IOC_MAGIC, 1); +pub const SECCOMP_IOCTL_NOTIF_ID_VALID: Ioctl = _IOW::(SECCOMP_IOC_MAGIC, 2); +pub const SECCOMP_IOCTL_NOTIF_ADDFD: Ioctl = _IOW::(SECCOMP_IOC_MAGIC, 3); +pub const SECCOMP_IOCTL_NOTIF_SET_FLAGS: Ioctl = _IOW::(SECCOMP_IOC_MAGIC, 4); + pub const NLA_F_NESTED: c_int = 1 << 15; pub const NLA_F_NET_BYTEORDER: c_int = 1 << 14; pub const NLA_TYPE_MASK: c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER); @@ -1916,7 +1971,7 @@ pub const NF_MAX_VERDICT: c_int = NF_STOP; pub const NF_VERDICT_MASK: c_int = 0x000000ff; pub const NF_VERDICT_FLAG_QUEUE_BYPASS: c_int = 0x00008000; -pub const NF_VERDICT_QMASK: c_int = 0xffff0000; +pub const NF_VERDICT_QMASK: c_int = u32_cast_int(0xffff0000); pub const NF_VERDICT_QBITS: c_int = 16; pub const NF_VERDICT_BITS: c_int = 16; @@ -1966,6 +2021,9 @@ pub const NF_BR_PRI_BRNF: c_int = 0; pub const NF_BR_PRI_NAT_DST_OTHER: c_int = 100; pub const NF_BR_PRI_FILTER_OTHER: c_int = 200; pub const NF_BR_PRI_NAT_SRC: c_int = 300; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NF_BR_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv4.h @@ -1990,6 +2048,9 @@ pub const NF_IP_PRI_NAT_SRC: c_int = 100; pub const NF_IP_PRI_SELINUX_LAST: c_int = 225; pub const NF_IP_PRI_CONNTRACK_HELPER: c_int = 300; pub const NF_IP_PRI_CONNTRACK_CONFIRM: c_int = crate::INT_MAX; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NF_IP_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv6.h @@ -2013,6 +2074,9 @@ pub const NF_IP6_PRI_SECURITY: c_int = 50; pub const NF_IP6_PRI_NAT_SRC: c_int = 100; pub const NF_IP6_PRI_SELINUX_LAST: c_int = 225; pub const NF_IP6_PRI_CONNTRACK_HELPER: c_int = 300; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NF_IP6_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv6/ip6_tables.h @@ -2030,7 +2094,11 @@ pub const NFT_REG_1: c_int = 1; pub const NFT_REG_2: c_int = 2; pub const NFT_REG_3: c_int = 3; pub const NFT_REG_4: c_int = 4; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const __NFT_REG_MAX: c_int = 5; + pub const NFT_REG32_00: c_int = 8; pub const NFT_REG32_01: c_int = 9; pub const NFT_REG32_02: c_int = 10; @@ -2079,6 +2147,9 @@ pub const NFT_MSG_NEWOBJ: c_int = 18; pub const NFT_MSG_GETOBJ: c_int = 19; pub const NFT_MSG_DELOBJ: c_int = 20; pub const NFT_MSG_GETOBJ_RESET: c_int = 21; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NFT_MSG_MAX: c_int = 25; pub const NFT_SET_ANONYMOUS: c_int = 0x1; @@ -2210,31 +2281,77 @@ pub const NFT_NG_INCREMENTAL: c_int = 0; pub const NFT_NG_RANDOM: c_int = 1; // linux/input.h +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const FF_MAX: crate::__u16 = 0x7f; + pub const FF_CNT: usize = FF_MAX as usize + 1; // linux/input-event-codes.h +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const INPUT_PROP_MAX: crate::__u16 = 0x1f; + pub const INPUT_PROP_CNT: usize = INPUT_PROP_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const EV_MAX: crate::__u16 = 0x1f; + pub const EV_CNT: usize = EV_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SYN_MAX: crate::__u16 = 0xf; + pub const SYN_CNT: usize = SYN_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const KEY_MAX: crate::__u16 = 0x2ff; + pub const KEY_CNT: usize = KEY_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const REL_MAX: crate::__u16 = 0x0f; + pub const REL_CNT: usize = REL_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const ABS_MAX: crate::__u16 = 0x3f; + pub const ABS_CNT: usize = ABS_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SW_MAX: crate::__u16 = 0x0f; + pub const SW_CNT: usize = SW_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const MSC_MAX: crate::__u16 = 0x07; + pub const MSC_CNT: usize = MSC_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const LED_MAX: crate::__u16 = 0x0f; + pub const LED_CNT: usize = LED_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const REP_MAX: crate::__u16 = 0x01; + pub const REP_CNT: usize = REP_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SND_MAX: crate::__u16 = 0x07; + pub const SND_CNT: usize = SND_MAX as usize + 1; // linux/uinput.h @@ -2613,6 +2730,16 @@ pub const FUTEX_PRIVATE_FLAG: c_int = 128; pub const FUTEX_CLOCK_REALTIME: c_int = 256; pub const FUTEX_CMD_MASK: c_int = !(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME); +pub const FUTEX2_SIZE_U8: c_int = 0x00; +pub const FUTEX2_SIZE_U16: c_int = 0x01; +pub const FUTEX2_SIZE_U32: c_int = 0x02; +pub const FUTEX2_SIZE_U64: c_int = 0x03; +pub const FUTEX2_NUMA: c_int = 0x04; +pub const FUTEX2_PRIVATE: c_int = FUTEX_PRIVATE_FLAG; +pub const FUTEX2_SIZE_MASK: c_int = 0x03; +pub const FUTEX_32: c_int = FUTEX2_SIZE_U32; +pub const FUTEX_WAITV_MAX: c_int = 128; + // linux/errqueue.h pub const SO_EE_ORIGIN_NONE: u8 = 0; pub const SO_EE_ORIGIN_LOCAL: u8 = 1; @@ -2790,7 +2917,7 @@ pub const PR_SET_MM_EXE_FILE: c_int = 13; pub const PR_SET_MM_MAP: c_int = 14; pub const PR_SET_MM_MAP_SIZE: c_int = 15; pub const PR_SET_PTRACER: c_int = 0x59616d61; -pub const PR_SET_PTRACER_ANY: c_ulong = 0xffffffffffffffff; +pub const PR_SET_PTRACER_ANY: c_ulong = (-1 as c_long) as c_ulong; pub const PR_SET_CHILD_SUBREAPER: c_int = 36; pub const PR_GET_CHILD_SUBREAPER: c_int = 37; pub const PR_SET_NO_NEW_PRIVS: c_int = 38; @@ -2855,7 +2982,11 @@ pub const PR_SCHED_CORE_GET: c_int = 0; pub const PR_SCHED_CORE_CREATE: c_int = 1; pub const PR_SCHED_CORE_SHARE_TO: c_int = 2; pub const PR_SCHED_CORE_SHARE_FROM: c_int = 3; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PR_SCHED_CORE_MAX: c_int = 4; + pub const PR_SCHED_CORE_SCOPE_THREAD: c_int = 0; pub const PR_SCHED_CORE_SCOPE_THREAD_GROUP: c_int = 1; pub const PR_SCHED_CORE_SCOPE_PROCESS_GROUP: c_int = 2; @@ -3123,7 +3254,6 @@ pub const KERN_PROF: c_int = 6; pub const KERN_NODENAME: c_int = 7; pub const KERN_DOMAINNAME: c_int = 8; pub const KERN_PANIC: c_int = 15; -pub const KERN_REALROOTDEV: c_int = 16; pub const KERN_SPARC_REBOOT: c_int = 21; pub const KERN_CTLALTDEL: c_int = 22; pub const KERN_PRINTK: c_int = 23; @@ -3158,7 +3288,11 @@ pub const KERN_S390_USER_DEBUG_LOGGING: c_int = 51; pub const KERN_CORE_USES_PID: c_int = 52; pub const KERN_TAINTED: c_int = 53; pub const KERN_CADPID: c_int = 54; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const KERN_PIDMAX: c_int = 55; + pub const KERN_CORE_PATTERN: c_int = 56; pub const KERN_PANIC_ON_OOPS: c_int = 57; pub const KERN_HPPA_PWRSW: c_int = 58; @@ -3166,7 +3300,11 @@ pub const KERN_HPPA_UNALIGNED: c_int = 59; pub const KERN_PRINTK_RATELIMIT: c_int = 60; pub const KERN_PRINTK_RATELIMIT_BURST: c_int = 61; pub const KERN_PTY: c_int = 62; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const KERN_NGROUPS_MAX: c_int = 63; + pub const KERN_SPARC_SCONS_PWROFF: c_int = 64; pub const KERN_HZ_TIMER: c_int = 65; pub const KERN_UNKNOWN_NMI_PANIC: c_int = 66; @@ -3193,7 +3331,6 @@ pub const VM_SWAPPINESS: c_int = 19; pub const VM_LOWMEM_RESERVE_RATIO: c_int = 20; pub const VM_MIN_FREE_KBYTES: c_int = 21; pub const VM_MAX_MAP_COUNT: c_int = 22; -pub const VM_LAPTOP_MODE: c_int = 23; pub const VM_BLOCK_DUMP: c_int = 24; pub const VM_HUGETLB_GROUP: c_int = 25; pub const VM_VFS_CACHE_PRESSURE: c_int = 26; @@ -3258,7 +3395,7 @@ pub const PF_NO_SETAFFINITY: c_int = 0x04000000; pub const PF_MCE_EARLY: c_int = 0x08000000; pub const PF_MEMALLOC_PIN: c_int = 0x10000000; -pub const PF_SUSPEND_TASK: c_int = 0x80000000; +pub const PF_SUSPEND_TASK: c_int = u32_cast_int(0x80000000); pub const KLOG_CLOSE: c_int = 0; pub const KLOG_OPEN: c_int = 1; @@ -3306,6 +3443,16 @@ pub const AT_MINSIGSTKSZ: c_ulong = 51; pub const SI_DETHREAD: c_int = -7; pub const TRAP_PERF: c_int = 6; +// Flags for preadv2/pwritev2 +pub const RWF_HIPRI: c_int = 0x00000001; +pub const RWF_DSYNC: c_int = 0x00000002; +pub const RWF_SYNC: c_int = 0x00000004; +pub const RWF_NOWAIT: c_int = 0x00000008; +pub const RWF_APPEND: c_int = 0x00000010; +pub const RWF_NOAPPEND: c_int = 0x00000020; +pub const RWF_ATOMIC: c_int = 0x00000040; +pub const RWF_DONTCACHE: c_int = 0x00000080; + // Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the // following are only available on newer Linux versions than the versions // currently used in CI in some configurations, so we define them here. @@ -3318,49 +3465,47 @@ cfg_if! { } f! { - pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { let next = (cmsg as usize + super::CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr; let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if (next.offset(1)) as usize > max { - core::ptr::null_mut::() + ptr::null_mut() } else { - next as *mut cmsghdr + next.cast() } } - pub fn CPU_ALLOC_SIZE(count: c_int) -> size_t { + pub unsafe fn CPU_ALLOC_SIZE(count: c_int) -> size_t { let _dummy: cpu_set_t = mem::zeroed(); let size_in_bits = 8 * size_of_val(&_dummy.__bits[0]); ((count as size_t + size_in_bits - 1) / 8) as size_t } - pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { - for slot in cpuset.__bits.iter_mut() { - *slot = 0; - } + pub unsafe fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { + cpuset.__bits.fill(0); } - pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { + pub unsafe fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { let size_in_bits = 8 * size_of_val(&cpuset.__bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.__bits[idx] |= 1 << offset; () } - pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { + pub unsafe fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { let size_in_bits = 8 * size_of_val(&cpuset.__bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.__bits[idx] &= !(1 << offset); () } - pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { + pub unsafe fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { let size_in_bits = 8 * size_of_val(&cpuset.__bits[0]); let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); 0 != (cpuset.__bits[idx] & (1 << offset)) } - pub fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> c_int { + pub unsafe fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> c_int { let mut s: u32 = 0; let size_of_mask = size_of_val(&cpuset.__bits[0]); for i in cpuset.__bits[..(size / size_of_mask)].iter() { @@ -3369,40 +3514,43 @@ f! { s as c_int } - pub fn CPU_COUNT(cpuset: &cpu_set_t) -> c_int { + pub unsafe fn CPU_COUNT(cpuset: &cpu_set_t) -> c_int { CPU_COUNT_S(size_of::(), cpuset) } - pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { + pub unsafe fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { set1.__bits == set2.__bits } - pub fn NLA_ALIGN(len: c_int) -> c_int { + pub unsafe fn NLA_ALIGN(len: c_int) -> c_int { return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1); } - pub fn SO_EE_OFFENDER(ee: *const crate::sock_extended_err) -> *mut crate::sockaddr { + pub unsafe fn SO_EE_OFFENDER(ee: *const crate::sock_extended_err) -> *mut crate::sockaddr { ee.offset(1) as *mut crate::sockaddr } } safe_f! { - pub const fn makedev(ma: c_uint, mi: c_uint) -> crate::dev_t { + pub const safe fn makedev(ma: c_uint, mi: c_uint) -> crate::dev_t { let ma = ma as crate::dev_t; let mi = mi as crate::dev_t; ((ma & 0xfff) << 8) | (mi & 0xff) | ((mi & 0xfff00) << 12) } - pub const fn major(dev: crate::dev_t) -> c_int { + pub const safe fn major(dev: crate::dev_t) -> c_int { ((dev >> 8) & 0xfff) as c_int } - pub const fn minor(dev: crate::dev_t) -> c_int { + pub const safe fn minor(dev: crate::dev_t) -> c_int { ((dev & 0xff) | ((dev >> 12) & 0xfff00)) as c_int } } extern "C" { + pub fn setpwent(); + pub fn endpwent(); + pub fn getpwent() -> *mut passwd; pub fn setgrent(); pub fn endgrent(); pub fn getgrent() -> *mut crate::group; @@ -3533,6 +3681,20 @@ extern "C" { new_value: *const itimerspec, old_value: *mut itimerspec, ) -> c_int; + pub fn timer_create( + clockid: crate::clockid_t, + sevp: *mut crate::sigevent, + timerid: *mut crate::timer_t, + ) -> c_int; + pub fn timer_delete(timerid: crate::timer_t) -> c_int; + pub fn timer_getoverrun(timerid: crate::timer_t) -> c_int; + pub fn timer_gettime(timerid: crate::timer_t, curr_value: *mut crate::itimerspec) -> c_int; + pub fn timer_settime( + timerid: crate::timer_t, + flags: c_int, + new_value: *const crate::itimerspec, + old_value: *mut crate::itimerspec, + ) -> c_int; pub fn syscall(num: c_long, ...) -> c_long; pub fn sched_getaffinity( pid: crate::pid_t, @@ -3765,6 +3927,20 @@ extern "C" { newpath: *const c_char, flags: c_uint, ) -> c_int; + pub fn preadv2( + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off_t, + flags: c_int, + ) -> ssize_t; + pub fn pwritev2( + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off_t, + flags: c_int, + ) -> ssize_t; } cfg_if! { @@ -3788,7 +3964,7 @@ impl siginfo_t { _si_code: c_int, si_addr: *mut c_void, } - (*(self as *const siginfo_t as *const siginfo_sigfault)).si_addr + (*(self as *const siginfo_t).cast::()).si_addr } pub unsafe fn si_value(&self) -> crate::sigval { @@ -3801,13 +3977,13 @@ impl siginfo_t { _si_overrun: c_int, si_sigval: crate::sigval, } - (*(self as *const siginfo_t as *const siginfo_timer)).si_sigval + (*(self as *const siginfo_t).cast::()).si_sigval } } impl siginfo_t { unsafe fn sifields(&self) -> &sifields { - &(*(self as *const siginfo_t as *const siginfo_f)).sifields + &(*(self as *const siginfo_t).cast::()).sifields } pub unsafe fn si_pid(&self) -> crate::pid_t { diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/emscripten/lfs64.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/emscripten/lfs64.rs similarity index 88% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/emscripten/lfs64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/emscripten/lfs64.rs index 501540943..5ced3277a 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/emscripten/lfs64.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/emscripten/lfs64.rs @@ -10,7 +10,7 @@ pub unsafe extern "C" fn creat64(path: *const c_char, mode: crate::mode_t) -> c_ #[inline] pub unsafe extern "C" fn fgetpos64(stream: *mut crate::FILE, pos: *mut crate::fpos64_t) -> c_int { - crate::fgetpos(stream, pos as *mut _) + crate::fgetpos(stream, pos.cast()) } #[inline] @@ -38,12 +38,12 @@ pub unsafe extern "C" fn fseeko64( #[inline] pub unsafe extern "C" fn fsetpos64(stream: *mut crate::FILE, pos: *const crate::fpos64_t) -> c_int { - crate::fsetpos(stream, pos as *mut _) + crate::fsetpos(stream, pos.cast()) } #[inline] pub unsafe extern "C" fn fstat64(fildes: c_int, buf: *mut crate::stat64) -> c_int { - crate::fstat(fildes, buf as *mut _) + crate::fstat(fildes, buf.cast()) } #[inline] @@ -53,17 +53,17 @@ pub unsafe extern "C" fn fstatat64( buf: *mut crate::stat64, flag: c_int, ) -> c_int { - crate::fstatat(fd, path, buf as *mut _, flag) + crate::fstatat(fd, path, buf.cast(), flag) } #[inline] pub unsafe extern "C" fn fstatfs64(fd: c_int, buf: *mut crate::statfs64) -> c_int { - crate::fstatfs(fd, buf as *mut _) + crate::fstatfs(fd, buf.cast()) } #[inline] pub unsafe extern "C" fn fstatvfs64(fd: c_int, buf: *mut crate::statvfs64) -> c_int { - crate::fstatvfs(fd, buf as *mut _) + crate::fstatvfs(fd, buf.cast()) } #[inline] @@ -78,7 +78,7 @@ pub unsafe extern "C" fn ftruncate64(fd: c_int, length: off64_t) -> c_int { #[inline] pub unsafe extern "C" fn getrlimit64(resource: c_int, rlim: *mut crate::rlimit64) -> c_int { - crate::getrlimit(resource, rlim as *mut _) + crate::getrlimit(resource, rlim.cast()) } #[inline] @@ -88,7 +88,7 @@ pub unsafe extern "C" fn lseek64(fd: c_int, offset: off64_t, whence: c_int) -> o #[inline] pub unsafe extern "C" fn lstat64(path: *const c_char, buf: *mut crate::stat64) -> c_int { - crate::lstat(path, buf as *mut _) + crate::lstat(path, buf.cast()) } #[inline] @@ -171,7 +171,7 @@ pub unsafe extern "C" fn pwritev64( #[inline] pub unsafe extern "C" fn readdir64(dirp: *mut crate::DIR) -> *mut crate::dirent64 { - crate::readdir(dirp) as *mut _ + crate::readdir(dirp).cast() } #[inline] @@ -180,27 +180,27 @@ pub unsafe extern "C" fn readdir64_r( entry: *mut crate::dirent64, result: *mut *mut crate::dirent64, ) -> c_int { - crate::readdir_r(dirp, entry as *mut _, result as *mut _) + crate::readdir_r(dirp, entry.cast(), result.cast()) } #[inline] pub unsafe extern "C" fn setrlimit64(resource: c_int, rlim: *const crate::rlimit64) -> c_int { - crate::setrlimit(resource, rlim as *mut _) + crate::setrlimit(resource, rlim.cast()) } #[inline] pub unsafe extern "C" fn stat64(pathname: *const c_char, statbuf: *mut crate::stat64) -> c_int { - crate::stat(pathname, statbuf as *mut _) + crate::stat(pathname, statbuf.cast()) } #[inline] pub unsafe extern "C" fn statfs64(pathname: *const c_char, buf: *mut crate::statfs64) -> c_int { - crate::statfs(pathname, buf as *mut _) + crate::statfs(pathname, buf.cast()) } #[inline] pub unsafe extern "C" fn statvfs64(path: *const c_char, buf: *mut crate::statvfs64) -> c_int { - crate::statvfs(path, buf as *mut _) + crate::statvfs(path, buf.cast()) } #[inline] diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/emscripten/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/emscripten/mod.rs similarity index 96% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/emscripten/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/emscripten/mod.rs index 711ed8f8b..7a28d8926 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/emscripten/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/emscripten/mod.rs @@ -41,7 +41,7 @@ pub type statvfs64 = crate::statvfs; pub type dirent64 = crate::dirent; extern_ty! { - pub enum fpos64_t {} // FIXME(emscripten): fill this out with a struct + pub type fpos64_t; // FIXME(emscripten): fill this out with a struct } s! { @@ -188,7 +188,8 @@ s! { } pub struct pthread_attr_t { - __size: [u32; 11], + // 11 pointer-width words: 44 bytes on wasm32, 88 on wasm64 (MEMORY64). + __size: [usize; 11], } pub struct sigset_t { @@ -211,6 +212,11 @@ s! { pub cmsg_type: c_int, } + pub struct in6_pktinfo { + pub ipi6_addr: crate::in6_addr, + pub ipi6_ifindex: c_uint, + } + pub struct sem_t { __val: [c_int; 4], } @@ -920,7 +926,7 @@ pub const EHWPOISON: c_int = 155; pub const EL2NSYNC: c_int = 156; pub const SA_NODEFER: c_int = 0x40000000; -pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000); pub const SA_RESTART: c_int = 0x10000000; pub const SA_NOCLDSTOP: c_int = 0x00000001; @@ -1064,8 +1070,14 @@ pub const SO_RXQ_OVFL: c_int = 40; pub const SO_PEEK_OFF: c_int = 42; pub const SO_BUSY_POLL: c_int = 46; +#[cfg(target_pointer_width = "32")] pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; +#[cfg(target_pointer_width = "64")] +pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; +#[cfg(target_pointer_width = "32")] pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; +#[cfg(target_pointer_width = "64")] +pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const O_DIRECT: c_int = 0x4000; pub const O_DIRECTORY: c_int = 0x10000; @@ -1251,52 +1263,50 @@ pub const PRIO_USER: c_int = 2; pub const SOMAXCONN: c_int = 128; f! { - pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if ((*cmsg).cmsg_len as usize) < size_of::() { - return core::ptr::null_mut::(); + return ptr::null_mut(); } let next = (cmsg as usize + super::CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr; let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if (next.offset(1)) as usize >= max { - core::ptr::null_mut::() + ptr::null_mut() } else { - next as *mut cmsghdr + next.cast() } } - pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { - for slot in cpuset.bits.iter_mut() { - *slot = 0; - } + pub unsafe fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { + cpuset.bits.fill(0); } - pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { + pub unsafe fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] |= 1 << offset; () } - pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { + pub unsafe fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] &= !(1 << offset); () } - pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { + pub unsafe fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); 0 != (cpuset.bits[idx] & (1 << offset)) } - pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { + pub unsafe fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { set1.bits == set2.bits } } safe_f! { - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { let major = major as crate::dev_t; let minor = minor as crate::dev_t; let mut dev = 0; @@ -1307,7 +1317,7 @@ safe_f! { dev } - pub const fn major(dev: crate::dev_t) -> c_uint { + pub const safe fn major(dev: crate::dev_t) -> c_uint { // see // https://github.com/emscripten-core/emscripten/blob/ // main/system/lib/libc/musl/include/sys/sysmacros.h @@ -1317,7 +1327,7 @@ safe_f! { major as c_uint } - pub const fn minor(dev: crate::dev_t) -> c_uint { + pub const safe fn minor(dev: crate::dev_t) -> c_uint { // see // https://github.com/emscripten-core/emscripten/blob/ // main/system/lib/libc/musl/include/sys/sysmacros.h @@ -1448,6 +1458,14 @@ extern "C" { buflen: size_t, result: *mut *mut crate::group, ) -> c_int; + pub fn sigwait(set: *const crate::sigset_t, sig: *mut c_int) -> c_int; + pub fn sigwaitinfo(set: *const crate::sigset_t, info: *mut crate::siginfo_t) -> c_int; + pub fn sigtimedwait( + set: *const crate::sigset_t, + info: *mut crate::siginfo_t, + timeout: *const crate::timespec, + ) -> c_int; + pub fn faccessat(dirfd: c_int, pathname: *const c_char, mode: c_int, flags: c_int) -> c_int; } // Alias to 64 to mimic glibc's LFS64 support diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/l4re/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/l4re/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/l4re/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/l4re/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/l4re/uclibc/aarch64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/l4re/uclibc/aarch64/mod.rs similarity index 96% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/l4re/uclibc/aarch64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/l4re/uclibc/aarch64/mod.rs index 3a471700f..23421f036 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/l4re/uclibc/aarch64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/l4re/uclibc/aarch64/mod.rs @@ -59,22 +59,6 @@ s! { pub st_ino: crate::ino64_t, } - pub struct shmid_ds { - pub shm_perm: crate::ipc_perm, - pub shm_segsz: crate::size_t, - pub shm_atime: crate::time_t, - __unused1: c_ulong, - pub shm_dtime: crate::time_t, - __unused2: c_ulong, - pub shm_ctime: crate::time_t, - __unused3: c_ulong, - pub shm_cpid: crate::pid_t, - pub shm_lpid: crate::pid_t, - pub shm_nattch: crate::shmatt_t, - __unused4: c_ulong, - __unused5: c_ulong, - } - #[allow(unpredictable_function_pointer_comparisons)] pub struct sigaction { pub sa_handler: crate::sighandler_t, diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/l4re/uclibc/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/l4re/uclibc/mod.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/l4re/uclibc/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/l4re/uclibc/mod.rs index e593ad76d..e89794648 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/l4re/uclibc/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/l4re/uclibc/mod.rs @@ -250,6 +250,7 @@ s! { pub struct pthread_mutexattr_t { __mutexkind: c_int, + __mutexprotocol: c_int, } pub struct pthread_rwlock_t { @@ -277,6 +278,30 @@ s! { pub struct pthread_barrierattr_t { __pshared: c_int, } + + pub struct __mbstate_t { + pub __mask: crate::wchar_t, + pub __wc: crate::wchar_t, + } + + pub struct fpos64_t { + pub __pos: crate::off64_t, + pub __mbstate: __mbstate_t, + pub __mblen_pending: c_int, + } + + pub struct shmid_ds { + pub shm_perm: crate::ipc_perm, + pub shm_segsz: crate::size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused4: c_ulong, + __unused5: c_ulong, + } } impl siginfo_t { @@ -424,7 +449,6 @@ pub const MAP_HUGE_MASK: c_int = 0x3f; pub const MSG_COPY: c_int = 0o40000; pub const NI_MAXHOST: crate::socklen_t = 1025; pub const O_TMPFILE: c_int = 0o20000000 | O_DIRECTORY; -pub const PACKET_MR_UNICAST: c_int = 3; pub const PF_NFC: c_int = 39; pub const PF_VSOCK: c_int = 40; pub const RTLD_NOLOAD: c_int = 0x00004; @@ -456,7 +480,7 @@ pub const __LOCK_INITIALIZER: _pthread_fastlock = _pthread_fastlock { pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { __m_reserved: 0, __m_count: 0, - __m_owner: core::ptr::null_mut(), + __m_owner: ptr::null_mut(), __m_kind: PTHREAD_MUTEX_TIMED_NP, __m_lock: __LOCK_INITIALIZER, }; @@ -468,7 +492,7 @@ const PTHREAD_COND_PADDING_SIZE: usize = 48 pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { __c_lock: __LOCK_INITIALIZER, - __c_waiting: core::ptr::null_mut(), + __c_waiting: ptr::null_mut(), __padding: [0; PTHREAD_COND_PADDING_SIZE], __align: 0, }; @@ -476,9 +500,9 @@ pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { __rw_lock: __LOCK_INITIALIZER, __rw_readers: 0, - __rw_writer: core::ptr::null_mut(), - __rw_read_waiting: core::ptr::null_mut(), - __rw_write_waiting: core::ptr::null_mut(), + __rw_writer: ptr::null_mut(), + __rw_read_waiting: ptr::null_mut(), + __rw_write_waiting: ptr::null_mut(), __rw_kind: PTHREAD_RWLOCK_DEFAULT_NP, __rw_pshared: crate::PTHREAD_PROCESS_PRIVATE, }; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/l4re/uclibc/x86_64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/l4re/uclibc/x86_64/mod.rs similarity index 97% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/l4re/uclibc/x86_64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/l4re/uclibc/x86_64/mod.rs index bb4b2ed4a..ed62740e9 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/l4re/uclibc/x86_64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/l4re/uclibc/x86_64/mod.rs @@ -62,19 +62,6 @@ s! { st_pad4: [c_long; 3], } - pub struct shmid_ds { - pub shm_perm: crate::ipc_perm, - pub shm_segsz: crate::size_t, - pub shm_atime: crate::time_t, - pub shm_dtime: crate::time_t, - pub shm_ctime: crate::time_t, - pub shm_cpid: crate::pid_t, - pub shm_lpid: crate::pid_t, - pub shm_nattch: crate::shmatt_t, - __unused4: c_ulong, - __unused5: c_ulong, - } - #[allow(unpredictable_function_pointer_comparisons)] pub struct sigaction { pub sa_handler: crate::sighandler_t, diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/generic/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/generic/mod.rs similarity index 96% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/generic/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/generic/mod.rs index 37b751715..9b9a11dd5 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/generic/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/generic/mod.rs @@ -143,9 +143,9 @@ cfg_if! { pub const SO_TIMESTAMPING_NEW: c_int = 65; pub const SO_RCVTIMEO_NEW: c_int = 66; pub const SO_SNDTIMEO_NEW: c_int = 67; - pub const SO_DETACH_REUSEPORT_BPF: c_int = 68; } } +pub const SO_DETACH_REUSEPORT_BPF: c_int = 68; pub const SO_PREFER_BUSY_POLL: c_int = 69; pub const SO_BUSY_POLL_BUDGET: c_int = 70; pub const SO_NETNS_COOKIE: c_int = 71; @@ -210,24 +210,24 @@ pub const TCSBRKP: Ioctl = 0x5425; pub const TIOCSBRK: Ioctl = 0x5427; pub const TIOCCBRK: Ioctl = 0x5428; pub const TIOCGSID: Ioctl = 0x5429; -pub const TCGETS2: Ioctl = 0x802c542a; +pub const TCGETS2: Ioctl = u32_cast_ioctl(0x802c542a); pub const TCSETS2: Ioctl = 0x402c542b; pub const TCSETSW2: Ioctl = 0x402c542c; pub const TCSETSF2: Ioctl = 0x402c542d; pub const TIOCGRS485: Ioctl = 0x542E; pub const TIOCSRS485: Ioctl = 0x542F; -pub const TIOCGPTN: Ioctl = 0x80045430; +pub const TIOCGPTN: Ioctl = u32_cast_ioctl(0x80045430); pub const TIOCSPTLCK: Ioctl = 0x40045431; -pub const TIOCGDEV: Ioctl = 0x80045432; +pub const TIOCGDEV: Ioctl = u32_cast_ioctl(0x80045432); pub const TCGETX: Ioctl = 0x5432; pub const TCSETX: Ioctl = 0x5433; pub const TCSETXF: Ioctl = 0x5434; pub const TCSETXW: Ioctl = 0x5435; pub const TIOCSIG: Ioctl = 0x40045436; pub const TIOCVHANGUP: Ioctl = 0x5437; -pub const TIOCGPKT: Ioctl = 0x80045438; -pub const TIOCGPTLCK: Ioctl = 0x80045439; -pub const TIOCGEXCL: Ioctl = 0x80045440; +pub const TIOCGPKT: Ioctl = u32_cast_ioctl(0x80045438); +pub const TIOCGPTLCK: Ioctl = u32_cast_ioctl(0x80045439); +pub const TIOCGEXCL: Ioctl = u32_cast_ioctl(0x80045440); pub const TIOCGPTPEER: Ioctl = 0x5441; // pub const TIOCGISO7816: Ioctl = 0x80285442; // pub const TIOCSISO7816: Ioctl = 0xc0285443; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/mips/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/mips/mod.rs similarity index 95% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/mips/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/mips/mod.rs index 78eec0ff5..44c5f124d 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/mips/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/mips/mod.rs @@ -117,7 +117,7 @@ cfg_if! { } } -// pub const SO_DETACH_REUSEPORT_BPF: c_int = 68; +pub const SO_DETACH_REUSEPORT_BPF: c_int = 68; pub const SO_PREFER_BUSY_POLL: c_int = 69; pub const SO_BUSY_POLL_BUDGET: c_int = 70; pub const SO_NETNS_COOKIE: c_int = 71; @@ -156,11 +156,11 @@ pub const TIOCEXCL: Ioctl = 0x740d; pub const TIOCNXCL: Ioctl = 0x740e; pub const TIOCSCTTY: Ioctl = 0x5480; pub const TIOCGPGRP: Ioctl = 0x40047477; -pub const TIOCSPGRP: Ioctl = 0x80047476; +pub const TIOCSPGRP: Ioctl = u32_cast_ioctl(0x80047476); pub const TIOCOUTQ: Ioctl = 0x7472; pub const TIOCSTI: Ioctl = 0x5472; pub const TIOCGWINSZ: Ioctl = 0x40087468; -pub const TIOCSWINSZ: Ioctl = 0x80087467; +pub const TIOCSWINSZ: Ioctl = u32_cast_ioctl(0x80087467); pub const TIOCMGET: Ioctl = 0x741d; pub const TIOCMBIS: Ioctl = 0x741b; pub const TIOCMBIC: Ioctl = 0x741c; @@ -170,7 +170,7 @@ pub const TIOCSSOFTCAR: Ioctl = 0x5482; pub const FIONREAD: Ioctl = 0x467f; pub const TIOCINQ: Ioctl = FIONREAD; pub const TIOCLINUX: Ioctl = 0x5483; -pub const TIOCCONS: Ioctl = 0x80047478; +pub const TIOCCONS: Ioctl = u32_cast_ioctl(0x80047478); pub const TIOCGSERIAL: Ioctl = 0x5484; pub const TIOCSSERIAL: Ioctl = 0x5485; pub const TIOCPKT: Ioctl = 0x5470; @@ -182,14 +182,14 @@ pub const TCSBRKP: Ioctl = 0x5486; pub const TIOCSBRK: Ioctl = 0x5427; pub const TIOCCBRK: Ioctl = 0x5428; pub const TIOCGSID: Ioctl = 0x7416; -pub const TCGETS2: Ioctl = 0x4030542a; -pub const TCSETS2: Ioctl = 0x8030542b; -pub const TCSETSW2: Ioctl = 0x8030542c; -pub const TCSETSF2: Ioctl = 0x8030542d; +pub const TCGETS2: Ioctl = u32_cast_ioctl(0x4030542a); +pub const TCSETS2: Ioctl = u32_cast_ioctl(0x8030542b); +pub const TCSETSW2: Ioctl = u32_cast_ioctl(0x8030542c); +pub const TCSETSF2: Ioctl = u32_cast_ioctl(0x8030542d); pub const TIOCGPTN: Ioctl = 0x40045430; -pub const TIOCSPTLCK: Ioctl = 0x80045431; +pub const TIOCSPTLCK: Ioctl = u32_cast_ioctl(0x80045431); pub const TIOCGDEV: Ioctl = 0x40045432; -pub const TIOCSIG: Ioctl = 0x80045436; +pub const TIOCSIG: Ioctl = u32_cast_ioctl(0x80045436); pub const TIOCVHANGUP: Ioctl = 0x5437; pub const TIOCGPKT: Ioctl = 0x40045438; pub const TIOCGPTLCK: Ioctl = 0x40045439; @@ -224,7 +224,7 @@ pub const BLKPBSZGET: Ioctl = 0x2000127B; cfg_if! { if #[cfg(target_env = "musl")] { pub const TIOCGRS485: Ioctl = 0x4020542e; - pub const TIOCSRS485: Ioctl = 0xc020542f; + pub const TIOCSRS485: Ioctl = u32_cast_ioctl(0xc020542f); } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/powerpc/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/powerpc/mod.rs similarity index 91% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/powerpc/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/powerpc/mod.rs index b5a3557a7..1aaa4c7e0 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/powerpc/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/powerpc/mod.rs @@ -105,7 +105,7 @@ pub const SO_ZEROCOPY: c_int = 60; pub const SO_TXTIME: c_int = 61; pub const SCM_TXTIME: c_int = SO_TXTIME; pub const SO_BINDTOIFINDEX: c_int = 62; -// pub const SO_DETACH_REUSEPORT_BPF: c_int = 68; +pub const SO_DETACH_REUSEPORT_BPF: c_int = 68; pub const SO_PREFER_BUSY_POLL: c_int = 69; pub const SO_BUSY_POLL_BUDGET: c_int = 70; pub const SO_NETNS_COOKIE: c_int = 71; @@ -132,21 +132,21 @@ pub const SCM_DEVMEM_DMABUF: c_int = SO_DEVMEM_DMABUF; cfg_if! { if #[cfg(target_env = "gnu")] { pub const TCGETS: Ioctl = 0x403c7413; - pub const TCSETS: Ioctl = 0x803c7414; - pub const TCSETSW: Ioctl = 0x803c7415; - pub const TCSETSF: Ioctl = 0x803c7416; + pub const TCSETS: Ioctl = u32_cast_ioctl(0x803c7414); + pub const TCSETSW: Ioctl = u32_cast_ioctl(0x803c7415); + pub const TCSETSF: Ioctl = u32_cast_ioctl(0x803c7416); } else if #[cfg(target_env = "musl")] { pub const TCGETS: Ioctl = 0x402c7413; - pub const TCSETS: Ioctl = 0x802c7414; - pub const TCSETSW: Ioctl = 0x802c7415; - pub const TCSETSF: Ioctl = 0x802c7416; + pub const TCSETS: Ioctl = u32_cast_ioctl(0x802c7414); + pub const TCSETSW: Ioctl = u32_cast_ioctl(0x802c7415); + pub const TCSETSF: Ioctl = u32_cast_ioctl(0x802c7416); } } pub const TCGETA: Ioctl = 0x40147417; -pub const TCSETA: Ioctl = 0x80147418; -pub const TCSETAW: Ioctl = 0x80147419; -pub const TCSETAF: Ioctl = 0x8014741C; +pub const TCSETA: Ioctl = u32_cast_ioctl(0x80147418); +pub const TCSETAW: Ioctl = u32_cast_ioctl(0x80147419); +pub const TCSETAF: Ioctl = u32_cast_ioctl(0x8014741C); pub const TCSBRK: Ioctl = 0x2000741D; pub const TCXONC: Ioctl = 0x2000741E; pub const TCFLSH: Ioctl = 0x2000741F; @@ -154,11 +154,11 @@ pub const TIOCEXCL: Ioctl = 0x540C; pub const TIOCNXCL: Ioctl = 0x540D; pub const TIOCSCTTY: Ioctl = 0x540E; pub const TIOCGPGRP: Ioctl = 0x40047477; -pub const TIOCSPGRP: Ioctl = 0x80047476; +pub const TIOCSPGRP: Ioctl = u32_cast_ioctl(0x80047476); pub const TIOCOUTQ: Ioctl = 0x40047473; pub const TIOCSTI: Ioctl = 0x5412; pub const TIOCGWINSZ: Ioctl = 0x40087468; -pub const TIOCSWINSZ: Ioctl = 0x80087467; +pub const TIOCSWINSZ: Ioctl = u32_cast_ioctl(0x80087467); pub const TIOCMGET: Ioctl = 0x5415; pub const TIOCMBIS: Ioctl = 0x5416; pub const TIOCMBIC: Ioctl = 0x5417; @@ -172,7 +172,7 @@ pub const TIOCCONS: Ioctl = 0x541D; pub const TIOCGSERIAL: Ioctl = 0x541E; pub const TIOCSSERIAL: Ioctl = 0x541F; pub const TIOCPKT: Ioctl = 0x5420; -pub const FIONBIO: Ioctl = 0x8004667e; +pub const FIONBIO: Ioctl = u32_cast_ioctl(0x8004667e); pub const TIOCNOTTY: Ioctl = 0x5422; pub const TIOCSETD: Ioctl = 0x5423; pub const TIOCGETD: Ioctl = 0x5424; @@ -183,9 +183,9 @@ pub const TIOCGSID: Ioctl = 0x5429; pub const TIOCGRS485: Ioctl = 0x542e; pub const TIOCSRS485: Ioctl = 0x542f; pub const TIOCGPTN: Ioctl = 0x40045430; -pub const TIOCSPTLCK: Ioctl = 0x80045431; +pub const TIOCSPTLCK: Ioctl = u32_cast_ioctl(0x80045431); pub const TIOCGDEV: Ioctl = 0x40045432; -pub const TIOCSIG: Ioctl = 0x80045436; +pub const TIOCSIG: Ioctl = u32_cast_ioctl(0x80045436); pub const TIOCVHANGUP: Ioctl = 0x5437; pub const TIOCGPKT: Ioctl = 0x40045438; pub const TIOCGPTLCK: Ioctl = 0x40045439; @@ -195,7 +195,7 @@ pub const TIOCGPTPEER: Ioctl = 0x20005441; //pub const TIOCSISO7816: Ioctl = 0xc0285443; pub const FIONCLEX: Ioctl = 0x20006602; pub const FIOCLEX: Ioctl = 0x20006601; -pub const FIOASYNC: Ioctl = 0x8004667d; +pub const FIOASYNC: Ioctl = u32_cast_ioctl(0x8004667d); pub const TIOCSERCONFIG: Ioctl = 0x5453; pub const TIOCSERGWILD: Ioctl = 0x5454; pub const TIOCSERSWILD: Ioctl = 0x5455; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/sparc/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/sparc/mod.rs similarity index 98% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/sparc/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/sparc/mod.rs index 006156ee0..42799cdd4 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/arch/sparc/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/arch/sparc/mod.rs @@ -94,7 +94,7 @@ pub const SO_TIMESTAMPING: c_int = 0x0023; // pub const SO_TIMESTAMPING_NEW: c_int = 0x0043; // pub const SO_RCVTIMEO_NEW: c_int = 0x0044; // pub const SO_SNDTIMEO_NEW: c_int = 0x0045; -// pub const SO_DETACH_REUSEPORT_BPF: c_int = 0x0047; +pub const SO_DETACH_REUSEPORT_BPF: c_int = 0x0047; pub const SO_PREFER_BUSY_POLL: c_int = 0x0048; pub const SO_BUSY_POLL_BUDGET: c_int = 0x0049; pub const SO_NETNS_COOKIE: c_int = 0x0050; @@ -159,7 +159,7 @@ pub const TCSBRKP: Ioctl = 0x5425; pub const TIOCSBRK: Ioctl = 0x2000747b; pub const TIOCCBRK: Ioctl = 0x2000747a; pub const TIOCGSID: Ioctl = 0x40047485; -pub const TCGETS2: Ioctl = 0x402c540c; +pub const TCGETS2: Ioctl = u32_cast_ioctl(0x402c540c); pub const TCSETS2: Ioctl = 0x802c540d; pub const TCSETSW2: Ioctl = 0x802c540e; pub const TCSETSF2: Ioctl = 0x802c540f; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/arm/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/arm/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/arm/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/arm/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/csky/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/csky/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/csky/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/csky/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/mips/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/mips/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/mips/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/mips/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/mod.rs similarity index 90% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/mod.rs index d9aebbe0e..11ada71ae 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/mod.rs @@ -1,7 +1,6 @@ //! 32-bit specific definitions for linux-like values use crate::prelude::*; -use crate::pthread_mutex_t; pub type clock_t = i32; @@ -9,8 +8,6 @@ pub type shmatt_t = c_ulong; pub type msgqnum_t = c_ulong; pub type msglen_t = c_ulong; pub type nlink_t = u32; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; pub type __fsword_t = i32; pub type fsblkcnt64_t = u64; pub type fsfilcnt64_t = u64; @@ -379,7 +376,7 @@ cfg_if! { pub const EDOTDOT: c_int = 73; pub const SA_NODEFER: c_int = 0x40000000; - pub const SA_RESETHAND: c_int = 0x80000000; + pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000); pub const SA_RESTART: c_int = 0x10000000; pub const SA_NOCLDSTOP: c_int = 0x00000001; @@ -407,43 +404,6 @@ cfg_if! { } } -#[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; - pub const PTRACE_GETFPREGS: c_uint = 14; pub const PTRACE_SETFPREGS: c_uint = 15; pub const PTRACE_GETREGS: c_uint = 12; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/powerpc.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/powerpc.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/powerpc.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/powerpc.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs index 75fefcd94..76b899838 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs @@ -849,7 +849,6 @@ pub const SYS_fsconfig: c_long = 431; pub const SYS_fsmount: c_long = 432; pub const SYS_fspick: c_long = 433; pub const SYS_pidfd_open: c_long = 434; -// Reserved in the kernel, but not actually implemented yet pub const SYS_clone3: c_long = 435; pub const SYS_close_range: c_long = 436; pub const SYS_openat2: c_long = 437; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/x86/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/x86/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b32/x86/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b32/x86/mod.rs diff --git a/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs new file mode 100644 index 000000000..db73bf0ec --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs @@ -0,0 +1,10 @@ +use crate::prelude::*; + +pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; +pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 32; +pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; +pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 48; +pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; +pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 20; + +pub const SYS_sync_file_range2: c_long = 84; diff --git a/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs new file mode 100644 index 000000000..c7342276d --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs @@ -0,0 +1,13 @@ +use crate::prelude::*; + +pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 8; +pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 48; +pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 8; +pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; +pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 8; +pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; + +pub const SYS_renameat: c_long = 38; +pub const SYS_sync_file_range: c_long = 84; +pub const SYS_getrlimit: c_long = 163; +pub const SYS_setrlimit: c_long = 164; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs index b8c55dc33..a4fe3ba7e 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs @@ -10,8 +10,6 @@ pub type wchar_t = u32; pub type nlink_t = u32; pub type blksize_t = i32; pub type suseconds_t = i64; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; s! { // FIXME(1.0): This should not implement `PartialEq` @@ -442,7 +440,7 @@ pub const EPROTO: c_int = 71; pub const EDOTDOT: c_int = 73; pub const SA_NODEFER: c_int = 0x40000000; -pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000); pub const SA_RESTART: c_int = 0x10000000; pub const SA_NOCLDSTOP: c_int = 0x00000001; @@ -712,6 +710,7 @@ pub const SYS_pread64: c_long = 67; pub const SYS_pwrite64: c_long = 68; pub const SYS_preadv: c_long = 69; pub const SYS_pwritev: c_long = 70; +pub const SYS_sendfile: c_long = 71; pub const SYS_pselect6: c_long = 72; pub const SYS_ppoll: c_long = 73; pub const SYS_signalfd4: c_long = 74; @@ -863,6 +862,7 @@ pub const SYS_keyctl: c_long = 219; pub const SYS_clone: c_long = 220; pub const SYS_execve: c_long = 221; pub const SYS_mmap: c_long = 222; +pub const SYS_fadvise64: c_long = 223; pub const SYS_swapon: c_long = 224; pub const SYS_swapoff: c_long = 225; pub const SYS_mprotect: c_long = 226; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs index 3f01da8c0..01044881f 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs @@ -2,7 +2,6 @@ use crate::prelude::*; use crate::{ off64_t, off_t, - pthread_mutex_t, }; pub type wchar_t = i32; @@ -10,8 +9,6 @@ pub type wchar_t = i32; pub type blksize_t = i32; pub type nlink_t = u32; pub type suseconds_t = i64; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; s! { pub struct stat { @@ -254,49 +251,6 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; -#[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; - pub const HWCAP_LOONGARCH_CPUCFG: c_ulong = 1 << 0; pub const HWCAP_LOONGARCH_LAM: c_ulong = 1 << 1; pub const HWCAP_LOONGARCH_UAL: c_ulong = 1 << 2; @@ -771,7 +725,7 @@ pub const SOCK_DGRAM: c_int = 2; pub const SFD_NONBLOCK: c_int = 0x800; pub const SFD_CLOEXEC: c_int = 0x080000; pub const SA_NODEFER: c_int = 0x40000000; -pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000); pub const SA_RESTART: c_int = 0x10000000; pub const SA_NOCLDSTOP: c_int = 0x00000001; pub const SA_ONSTACK: c_int = 0x08000000; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs index dfec92033..7fed1e538 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs @@ -2,15 +2,12 @@ use crate::prelude::*; use crate::{ off64_t, off_t, - pthread_mutex_t, }; pub type blksize_t = i64; pub type nlink_t = u64; pub type suseconds_t = i64; pub type wchar_t = i32; -pub type __u64 = c_ulong; -pub type __s64 = c_long; s! { pub struct stat { @@ -204,49 +201,6 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; -#[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; - pub const SYS_read: c_long = 5000 + 0; pub const SYS_write: c_long = 5000 + 1; pub const SYS_open: c_long = 5000 + 2; @@ -631,7 +585,7 @@ pub const EPROTO: c_int = 71; pub const EDOTDOT: c_int = 73; pub const SA_NODEFER: c_int = 0x40000000; -pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000); pub const SA_RESTART: c_int = 0x10000000; pub const SA_NOCLDSTOP: c_int = 0x00000001; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/mod.rs similarity index 95% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/mod.rs index 3d442a6d8..16b7bef08 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/mod.rs @@ -98,6 +98,17 @@ s! { __glibc_reserved4: Padding, } + // net/iucv/iucv.h + + pub struct sockaddr_iucv { + pub siucv_family: crate::sa_family_t, + __siucv_port: Padding, // unused crate::in_port_t + __siucv_addr: Padding, // unused crate::in_addr_t + pub siucv_nodeid: [c_char; 8], + pub siucv_user_id: [c_char; 8], + pub siucv_name: [c_char; 8], + } + pub struct timex { pub modes: c_uint, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs index ee2cd21de..f30450724 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs @@ -4,15 +4,12 @@ use crate::prelude::*; use crate::{ off64_t, off_t, - pthread_mutex_t, }; pub type wchar_t = i32; pub type nlink_t = u64; pub type blksize_t = i64; pub type suseconds_t = i64; -pub type __u64 = c_ulong; -pub type __s64 = c_long; pub type gregset_t = [c_ulong; __NGREG]; pub type fpregset_t = [c_ulong; __NFPREG]; @@ -482,7 +479,7 @@ pub const EPROTO: c_int = 71; pub const EDOTDOT: c_int = 73; pub const SA_NODEFER: c_int = 0x40000000; -pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000); pub const SA_RESTART: c_int = 0x10000000; pub const SA_NOCLDSTOP: c_int = 0x00000001; @@ -495,49 +492,6 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; -#[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; - pub const O_DIRECTORY: c_int = 0x4000; pub const O_NOFOLLOW: c_int = 0x8000; pub const O_DIRECT: c_int = 0x20000; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs index cbb1502eb..3371f0337 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs @@ -13,8 +13,6 @@ pub type blksize_t = c_int; pub type fsblkcnt64_t = c_ulong; pub type fsfilcnt64_t = c_ulong; pub type suseconds_t = i64; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; s! { pub struct pthread_attr_t { diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/s390x.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/s390x.rs similarity index 97% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/s390x.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/s390x.rs index 28e02c4f2..c5a7cc414 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/s390x.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/s390x.rs @@ -4,7 +4,6 @@ use crate::prelude::*; use crate::{ off64_t, off_t, - pthread_mutex_t, }; pub type blksize_t = i64; @@ -12,8 +11,6 @@ pub type nlink_t = u64; pub type suseconds_t = i64; pub type wchar_t = i32; pub type greg_t = u64; -pub type __u64 = u64; -pub type __s64 = i64; s! { // FIXME(1.0): This should not implement `PartialEq` @@ -275,7 +272,7 @@ pub const EPROTO: c_int = 71; pub const EDOTDOT: c_int = 73; pub const SA_NODEFER: c_int = 0x40000000; -pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000); pub const SA_RESTART: c_int = 0x10000000; pub const SA_NOCLDSTOP: c_int = 0x00000001; @@ -290,25 +287,6 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; - pub const EUCLEAN: c_int = 117; pub const ENOTNAM: c_int = 118; pub const ENAVAIL: c_int = 119; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs similarity index 97% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs index 0b3256233..6e3673e35 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs @@ -4,15 +4,12 @@ use crate::prelude::*; use crate::{ off64_t, off_t, - pthread_mutex_t, }; pub type wchar_t = i32; pub type nlink_t = u32; pub type blksize_t = i64; pub type suseconds_t = i32; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; s! { // FIXME(1.0): This should not implement `PartialEq` @@ -416,25 +413,6 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; - pub const O_DIRECTORY: c_int = 0o200000; pub const O_NOFOLLOW: c_int = 0o400000; pub const O_DIRECT: c_int = 0x100000; @@ -904,7 +882,6 @@ pub const SYS_fsconfig: c_long = 431; pub const SYS_fsmount: c_long = 432; pub const SYS_fspick: c_long = 433; pub const SYS_pidfd_open: c_long = 434; -// Reserved in the kernel, but not actually implemented yet pub const SYS_clone3: c_long = 435; pub const SYS_close_range: c_long = 436; pub const SYS_openat2: c_long = 437; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs index 7edd7c566..9658aeb4a 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs @@ -11,8 +11,6 @@ pub type nlink_t = u64; pub type blksize_t = i64; pub type greg_t = i64; pub type suseconds_t = i64; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; s! { // FIXME(1.0): This should not implement `PartialEq` @@ -512,7 +510,7 @@ pub const EPROTO: c_int = 71; pub const EDOTDOT: c_int = 73; pub const SA_NODEFER: c_int = 0x40000000; -pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000); pub const SA_RESTART: c_int = 0x10000000; pub const SA_NOCLDSTOP: c_int = 0x00000001; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs similarity index 89% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs index 27b96a60a..9f9a618d1 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs @@ -1,5 +1,4 @@ use crate::prelude::*; -use crate::pthread_mutex_t; s! { pub struct statvfs { @@ -22,49 +21,6 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; -#[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; -#[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - ], -}; - // Syscall table pub const SYS_read: c_long = 0; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs similarity index 96% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs index 1a1cd34be..183eccc43 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs @@ -1,5 +1,4 @@ use crate::prelude::*; -use crate::pthread_mutex_t; s! { pub struct statvfs { @@ -22,25 +21,6 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 32; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 44; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 20; -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, - ], -}; -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, - ], -}; -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { - size: [ - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, - ], -}; - // Syscall table pub const __X32_SYSCALL_BIT: c_long = 0x40000000; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/mod.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/mod.rs index 65e94a19a..d162a2643 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/gnu/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/gnu/mod.rs @@ -255,19 +255,23 @@ s! { /// This contains the bitfields `tcpi_snd_wscale` and `tcpi_rcv_wscale`. /// Each is 4 bits. pub tcpi_snd_rcv_wscale: u8, + pub tcpi_rto: u32, pub tcpi_ato: u32, pub tcpi_snd_mss: u32, pub tcpi_rcv_mss: u32, + pub tcpi_unacked: u32, pub tcpi_sacked: u32, pub tcpi_lost: u32, pub tcpi_retrans: u32, pub tcpi_fackets: u32, + pub tcpi_last_data_sent: u32, pub tcpi_last_ack_sent: u32, pub tcpi_last_data_recv: u32, pub tcpi_last_ack_recv: u32, + pub tcpi_pmtu: u32, pub tcpi_rcv_ssthresh: u32, pub tcpi_rtt: u32, @@ -276,9 +280,55 @@ s! { pub tcpi_snd_cwnd: u32, pub tcpi_advmss: u32, pub tcpi_reordering: u32, + pub tcpi_rcv_rtt: u32, pub tcpi_rcv_space: u32, + pub tcpi_total_retrans: u32, + + pub tcpi_pacing_rate: u64, + pub tcpi_max_pacing_rate: u64, + pub tcpi_bytes_acked: u64, + pub tcpi_bytes_received: u64, + pub tcpi_segs_out: u32, + pub tcpi_segs_in: u32, + + pub tcpi_notsent_bytes: u32, + pub tcpi_min_rtt: u32, + pub tcpi_data_segs_in: u32, + pub tcpi_data_segs_out: u32, + + pub tcpi_delivery_rate: u64, + + pub tcpi_busy_time: u64, + pub tcpi_rwnd_limited: u64, + pub tcpi_sndbuf_limited: u64, + + pub tcpi_delivered: u32, + pub tcpi_delivered_ce: u32, + + pub tcpi_bytes_sent: u64, + pub tcpi_bytes_retrans: u64, + pub tcpi_dsack_dups: u32, + pub tcpi_reord_seen: u32, + + pub tcpi_rcv_ooopack: u32, + pub tcpi_snd_wnd: u32, + pub tcpi_rcv_wnd: u32, + + pub tcpi_rehash: u32, + pub tcpi_total_rto: u16, + pub tcpi_total_rto_recoveries: u16, + pub tcpi_total_rto_time: u32, + pub tcpi_received_ce: u32, + pub tcpi_delivered_e1_bytes: u32, + pub tcpi_delivered_e0_bytes: u32, + pub tcpi_delivered_ce_bytes: u32, + pub tcpi_received_e1_bytes: u32, + pub tcpi_received_e0_bytes: u32, + pub tcpi_received_ce_bytes: u32, + pub tcpi_accecn_fail_mode: u16, + pub tcpi_accecn_opt_seen: u16, } pub struct fanotify_event_info_pidfd { @@ -545,8 +595,6 @@ pub const PRIO_PROCESS: crate::__priority_which_t = 0; pub const PRIO_PGRP: crate::__priority_which_t = 1; pub const PRIO_USER: crate::__priority_which_t = 2; -pub const MS_RMT_MASK: c_ulong = 0x02800051; - pub const __UT_LINESIZE: usize = 32; pub const __UT_NAMESIZE: usize = 32; pub const __UT_HOSTSIZE: usize = 256; @@ -765,8 +813,8 @@ pub const PTRACE_SYSCALL_INFO_NONE: crate::__u8 = 0; pub const PTRACE_SYSCALL_INFO_ENTRY: crate::__u8 = 1; pub const PTRACE_SYSCALL_INFO_EXIT: crate::__u8 = 2; pub const PTRACE_SYSCALL_INFO_SECCOMP: crate::__u8 = 3; -pub const PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG: crate::__u8 = 0x4210; -pub const PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG: crate::__u8 = 0x4211; +pub const PTRACE_SET_SYSCALL_USER_DISPATCH_CONFIG: c_uint = 0x4210; +pub const PTRACE_GET_SYSCALL_USER_DISPATCH_CONFIG: c_uint = 0x4211; // linux/rtnetlink.h pub const TCA_PAD: c_ushort = 9; @@ -813,8 +861,18 @@ pub const ELFOSABI_ARM_AEABI: u8 = 64; // linux/sched.h pub const CLONE_NEWTIME: c_int = 0x80; -// DIFF(main): changed to `c_ulonglong` in e9abac9ac2 +// DIFF(main): changed to `c_ulonglong` in e9abac9ac2. This is broken so should be fixed. +#[allow(overflowing_literals)] +#[deprecated( + since = "0.2.188", + note = "This constant overflows. In the near future, `libc` will change to a wider type, see #3584." +)] pub const CLONE_CLEAR_SIGHAND: c_int = 0x100000000; +#[allow(overflowing_literals)] +#[deprecated( + since = "0.2.188", + note = "This constant overflows. In the near future, `libc` will change to a wider type, see #3584." +)] pub const CLONE_INTO_CGROUP: c_int = 0x200000000; pub const M_MXFAST: c_int = 1; @@ -832,16 +890,6 @@ pub const M_ARENA_MAX: c_int = -8; pub const SOMAXCONN: c_int = 4096; -// linux/mount.h -pub const MOVE_MOUNT_F_SYMLINKS: c_uint = 0x00000001; -pub const MOVE_MOUNT_F_AUTOMOUNTS: c_uint = 0x00000002; -pub const MOVE_MOUNT_F_EMPTY_PATH: c_uint = 0x00000004; -pub const MOVE_MOUNT_T_SYMLINKS: c_uint = 0x00000010; -pub const MOVE_MOUNT_T_AUTOMOUNTS: c_uint = 0x00000020; -pub const MOVE_MOUNT_T_EMPTY_PATH: c_uint = 0x00000040; -pub const MOVE_MOUNT_SET_GROUP: c_uint = 0x00000100; -pub const MOVE_MOUNT_BENEATH: c_uint = 0x00000200; - // sys/timex.h pub const ADJ_OFFSET: c_uint = 0x0001; pub const ADJ_FREQUENCY: c_uint = 0x0002; @@ -929,7 +977,6 @@ cfg_if! { pub const PTHREAD_STACK_MIN: size_t = 131072; } } -pub const PTHREAD_MUTEX_ADAPTIVE_NP: c_int = 3; pub const REG_STARTEND: c_int = 4; @@ -1153,6 +1200,30 @@ extern "C" { buflen: size_t, result: *mut *mut crate::group, ) -> c_int; + pub fn getnetent_r( + result_buf: *mut crate::netent, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::netent, + h_errnop: *mut c_int, + ) -> c_int; + pub fn getnetbyname_r( + name: *const c_char, + result_buf: *mut crate::netent, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::netent, + h_errnop: *mut c_int, + ) -> c_int; + pub fn getnetbyaddr_r( + net: u32, + type_: c_int, + result_buf: *mut crate::netent, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::netent, + h_errnop: *mut c_int, + ) -> c_int; pub fn putpwent(p: *const crate::passwd, stream: *mut crate::FILE) -> c_int; pub fn putgrent(grp: *const crate::group, stream: *mut crate::FILE) -> c_int; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/mod.rs similarity index 82% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/mod.rs index e58849b4e..a41d03d9f 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/mod.rs @@ -1,6 +1,12 @@ //! Linux-specific definitions for linux-like values use crate::prelude::*; use crate::{ + __s16, + __s32, + __u16, + __u32, + __u64, + __u8, sock_filter, _IO, _IOR, @@ -26,26 +32,8 @@ pub type pthread_spinlock_t = c_int; pub type __kernel_fsid_t = __c_anonymous__kernel_fsid_t; pub type __kernel_clockid_t = c_int; -pub type __u8 = c_uchar; -pub type __u16 = c_ushort; -pub type __s16 = c_short; -pub type __u32 = c_uint; -pub type __s32 = c_int; - -// linux/sctp.h -pub type sctp_assoc_t = __s32; - pub type eventfd_t = u64; -e! { - #[repr(u32)] - pub enum tpacket_versions { - TPACKET_V1, - TPACKET_V2, - TPACKET_V3, - } -} - c_enum! { pub enum pid_type { pub PIDTYPE_PID, @@ -94,126 +82,6 @@ s! { _pad: Padding<[u8; 28]>, } - pub struct fanout_args { - #[cfg(target_endian = "little")] - pub id: __u16, - pub type_flags: __u16, - #[cfg(target_endian = "big")] - pub id: __u16, - pub max_num_members: __u32, - } - - #[deprecated(since = "0.2.70", note = "sockaddr_ll type must be used instead")] - pub struct sockaddr_pkt { - pub spkt_family: c_ushort, - pub spkt_device: [c_uchar; 14], - pub spkt_protocol: c_ushort, - } - - pub struct tpacket_auxdata { - pub tp_status: __u32, - pub tp_len: __u32, - pub tp_snaplen: __u32, - pub tp_mac: __u16, - pub tp_net: __u16, - pub tp_vlan_tci: __u16, - pub tp_vlan_tpid: __u16, - } - - pub struct tpacket_hdr { - pub tp_status: c_ulong, - pub tp_len: c_uint, - pub tp_snaplen: c_uint, - pub tp_mac: c_ushort, - pub tp_net: c_ushort, - pub tp_sec: c_uint, - pub tp_usec: c_uint, - } - - pub struct tpacket_hdr_variant1 { - pub tp_rxhash: __u32, - pub tp_vlan_tci: __u32, - pub tp_vlan_tpid: __u16, - pub tp_padding: __u16, - } - - pub struct tpacket2_hdr { - pub tp_status: __u32, - pub tp_len: __u32, - pub tp_snaplen: __u32, - pub tp_mac: __u16, - pub tp_net: __u16, - pub tp_sec: __u32, - pub tp_nsec: __u32, - pub tp_vlan_tci: __u16, - pub tp_vlan_tpid: __u16, - pub tp_padding: [__u8; 4], - } - - pub struct tpacket_req { - pub tp_block_size: c_uint, - pub tp_block_nr: c_uint, - pub tp_frame_size: c_uint, - pub tp_frame_nr: c_uint, - } - - pub struct tpacket_req3 { - pub tp_block_size: c_uint, - pub tp_block_nr: c_uint, - pub tp_frame_size: c_uint, - pub tp_frame_nr: c_uint, - pub tp_retire_blk_tov: c_uint, - pub tp_sizeof_priv: c_uint, - pub tp_feature_req_word: c_uint, - } - - #[repr(align(8))] - pub struct tpacket_rollover_stats { - pub tp_all: crate::__u64, - pub tp_huge: crate::__u64, - pub tp_failed: crate::__u64, - } - - pub struct tpacket_stats { - pub tp_packets: c_uint, - pub tp_drops: c_uint, - } - - pub struct tpacket_stats_v3 { - pub tp_packets: c_uint, - pub tp_drops: c_uint, - pub tp_freeze_q_cnt: c_uint, - } - - pub struct tpacket3_hdr { - pub tp_next_offset: __u32, - pub tp_sec: __u32, - pub tp_nsec: __u32, - pub tp_snaplen: __u32, - pub tp_len: __u32, - pub tp_status: __u32, - pub tp_mac: __u16, - pub tp_net: __u16, - pub hv1: crate::tpacket_hdr_variant1, - pub tp_padding: [__u8; 8], - } - - pub struct tpacket_bd_ts { - pub ts_sec: c_uint, - pub ts_usec: c_uint, - } - - #[repr(align(8))] - pub struct tpacket_hdr_v1 { - pub block_status: __u32, - pub num_pkts: __u32, - pub offset_to_first_pkt: __u32, - pub blk_len: __u32, - pub seq_num: crate::__u64, - pub ts_first_pkt: crate::tpacket_bd_ts, - pub ts_last_pkt: crate::tpacket_bd_ts, - } - // System V IPC pub struct msginfo { pub msgpool: c_int, @@ -521,134 +389,6 @@ s! { rsv: [c_uint; 2], } - // linux/sctp.h - - pub struct sctp_initmsg { - pub sinit_num_ostreams: __u16, - pub sinit_max_instreams: __u16, - pub sinit_max_attempts: __u16, - pub sinit_max_init_timeo: __u16, - } - - pub struct sctp_sndrcvinfo { - pub sinfo_stream: __u16, - pub sinfo_ssn: __u16, - pub sinfo_flags: __u16, - pub sinfo_ppid: __u32, - pub sinfo_context: __u32, - pub sinfo_timetolive: __u32, - pub sinfo_tsn: __u32, - pub sinfo_cumtsn: __u32, - pub sinfo_assoc_id: crate::sctp_assoc_t, - } - - pub struct sctp_sndinfo { - pub snd_sid: __u16, - pub snd_flags: __u16, - pub snd_ppid: __u32, - pub snd_context: __u32, - pub snd_assoc_id: crate::sctp_assoc_t, - } - - pub struct sctp_rcvinfo { - pub rcv_sid: __u16, - pub rcv_ssn: __u16, - pub rcv_flags: __u16, - pub rcv_ppid: __u32, - pub rcv_tsn: __u32, - pub rcv_cumtsn: __u32, - pub rcv_context: __u32, - pub rcv_assoc_id: crate::sctp_assoc_t, - } - - pub struct sctp_nxtinfo { - pub nxt_sid: __u16, - pub nxt_flags: __u16, - pub nxt_ppid: __u32, - pub nxt_length: __u32, - pub nxt_assoc_id: crate::sctp_assoc_t, - } - - pub struct sctp_prinfo { - pub pr_policy: __u16, - pub pr_value: __u32, - } - - pub struct sctp_authinfo { - pub auth_keynumber: __u16, - } - - // linux/tls.h - - pub struct tls_crypto_info { - pub version: __u16, - pub cipher_type: __u16, - } - - pub struct tls12_crypto_info_aes_gcm_128 { - pub info: tls_crypto_info, - pub iv: [c_uchar; TLS_CIPHER_AES_GCM_128_IV_SIZE], - pub key: [c_uchar; TLS_CIPHER_AES_GCM_128_KEY_SIZE], - pub salt: [c_uchar; TLS_CIPHER_AES_GCM_128_SALT_SIZE], - pub rec_seq: [c_uchar; TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE], - } - - pub struct tls12_crypto_info_aes_gcm_256 { - pub info: tls_crypto_info, - pub iv: [c_uchar; TLS_CIPHER_AES_GCM_256_IV_SIZE], - pub key: [c_uchar; TLS_CIPHER_AES_GCM_256_KEY_SIZE], - pub salt: [c_uchar; TLS_CIPHER_AES_GCM_256_SALT_SIZE], - pub rec_seq: [c_uchar; TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE], - } - - pub struct tls12_crypto_info_aes_ccm_128 { - pub info: tls_crypto_info, - pub iv: [c_uchar; TLS_CIPHER_AES_CCM_128_IV_SIZE], - pub key: [c_uchar; TLS_CIPHER_AES_CCM_128_KEY_SIZE], - pub salt: [c_uchar; TLS_CIPHER_AES_CCM_128_SALT_SIZE], - pub rec_seq: [c_uchar; TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE], - } - - pub struct tls12_crypto_info_chacha20_poly1305 { - pub info: tls_crypto_info, - pub iv: [c_uchar; TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE], - pub key: [c_uchar; TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE], - pub salt: [c_uchar; TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE], - pub rec_seq: [c_uchar; TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE], - } - - pub struct tls12_crypto_info_sm4_gcm { - pub info: tls_crypto_info, - pub iv: [c_uchar; TLS_CIPHER_SM4_GCM_IV_SIZE], - pub key: [c_uchar; TLS_CIPHER_SM4_GCM_KEY_SIZE], - pub salt: [c_uchar; TLS_CIPHER_SM4_GCM_SALT_SIZE], - pub rec_seq: [c_uchar; TLS_CIPHER_SM4_GCM_REC_SEQ_SIZE], - } - - pub struct tls12_crypto_info_sm4_ccm { - pub info: tls_crypto_info, - pub iv: [c_uchar; TLS_CIPHER_SM4_CCM_IV_SIZE], - pub key: [c_uchar; TLS_CIPHER_SM4_CCM_KEY_SIZE], - pub salt: [c_uchar; TLS_CIPHER_SM4_CCM_SALT_SIZE], - pub rec_seq: [c_uchar; TLS_CIPHER_SM4_CCM_REC_SEQ_SIZE], - } - - pub struct tls12_crypto_info_aria_gcm_128 { - pub info: tls_crypto_info, - pub iv: [c_uchar; TLS_CIPHER_ARIA_GCM_128_IV_SIZE], - pub key: [c_uchar; TLS_CIPHER_ARIA_GCM_128_KEY_SIZE], - pub salt: [c_uchar; TLS_CIPHER_ARIA_GCM_128_SALT_SIZE], - pub rec_seq: [c_uchar; TLS_CIPHER_ARIA_GCM_128_REC_SEQ_SIZE], - } - - pub struct tls12_crypto_info_aria_gcm_256 { - pub info: tls_crypto_info, - pub iv: [c_uchar; TLS_CIPHER_ARIA_GCM_256_IV_SIZE], - pub key: [c_uchar; TLS_CIPHER_ARIA_GCM_256_KEY_SIZE], - pub salt: [c_uchar; TLS_CIPHER_ARIA_GCM_256_SALT_SIZE], - pub rec_seq: [c_uchar; TLS_CIPHER_ARIA_GCM_256_REC_SEQ_SIZE], - } - // linux/wireless.h pub struct iw_param { @@ -994,15 +734,6 @@ s! { pub csum_offset: __u16, } - // linux/mount.h - - pub struct mount_attr { - pub attr_set: crate::__u64, - pub attr_clr: crate::__u64, - pub propagation: crate::__u64, - pub userns_fd: crate::__u64, - } - // linux/nsfs.h pub struct mnt_ns_info { pub size: crate::__u32, @@ -1105,8 +836,7 @@ s! { repr(align(8)) )] pub struct pthread_mutex_t { - #[doc(hidden)] - size: [c_char; crate::__SIZEOF_PTHREAD_MUTEX_T], + pub(crate) size: [c_char; crate::__SIZEOF_PTHREAD_MUTEX_T], } #[cfg_attr( @@ -1264,6 +994,27 @@ s! { pub ifi_flags: c_uint, pub ifi_change: c_uint, } + + pub struct rtattr { + pub rta_len: c_ushort, + pub rta_type: c_ushort, + } + + // netdb.h + pub struct netent { + pub n_name: *mut c_char, + pub n_aliases: *mut *mut c_char, + pub n_addrtype: c_int, + pub n_net: u32, + } +} + +cfg_if! { + if #[cfg(not(target_env = "gnu"))] { + extern_ty! { + pub type fpos64_t; // FIXME(linux): fill this out with a struct + } + } } cfg_if! { @@ -1304,21 +1055,6 @@ s_no_extra_traits! { pub iv: [c_uchar; 0], } - pub union tpacket_req_u { - pub req: crate::tpacket_req, - pub req3: crate::tpacket_req3, - } - - pub union tpacket_bd_header_u { - pub bh1: crate::tpacket_hdr_v1, - } - - pub struct tpacket_block_desc { - pub version: __u32, - pub offset_to_priv: __u32, - pub hdr: crate::tpacket_bd_header_u, - } - // linux/net_tstamp.h pub struct sock_txtime { pub clockid: crate::clockid_t, @@ -1421,8 +1157,9 @@ cfg_if! { } } -pub const POSIX_SPAWN_USEVFORK: c_int = 64; -pub const POSIX_SPAWN_SETSID: c_int = 128; +pub const POSIX_SPAWN_USEVFORK: c_short = 64; +#[cfg(not(target_env = "uclibc"))] +pub const POSIX_SPAWN_SETSID: c_short = 128; pub const F_SEAL_FUTURE_WRITE: c_int = 0x0010; pub const F_SEAL_EXEC: c_int = 0x0020; @@ -1439,31 +1176,6 @@ pub const AT_HANDLE_FID: c_int = 0x200; pub const AT_HANDLE_MNT_ID_UNIQUE: c_int = 0x001; pub const AT_HANDLE_CONNECTABLE: c_int = 0x002; -// linux/if_addr.h -pub const IFA_UNSPEC: c_ushort = 0; -pub const IFA_ADDRESS: c_ushort = 1; -pub const IFA_LOCAL: c_ushort = 2; -pub const IFA_LABEL: c_ushort = 3; -pub const IFA_BROADCAST: c_ushort = 4; -pub const IFA_ANYCAST: c_ushort = 5; -pub const IFA_CACHEINFO: c_ushort = 6; -pub const IFA_MULTICAST: c_ushort = 7; -pub const IFA_FLAGS: c_ushort = 8; - -pub const IFA_F_SECONDARY: u32 = 0x01; -pub const IFA_F_TEMPORARY: u32 = 0x01; -pub const IFA_F_NODAD: u32 = 0x02; -pub const IFA_F_OPTIMISTIC: u32 = 0x04; -pub const IFA_F_DADFAILED: u32 = 0x08; -pub const IFA_F_HOMEADDRESS: u32 = 0x10; -pub const IFA_F_DEPRECATED: u32 = 0x20; -pub const IFA_F_TENTATIVE: u32 = 0x40; -pub const IFA_F_PERMANENT: u32 = 0x80; -pub const IFA_F_MANAGETEMPADDR: u32 = 0x100; -pub const IFA_F_NOPREFIXROUTE: u32 = 0x200; -pub const IFA_F_MCAUTOJOIN: u32 = 0x400; -pub const IFA_F_STABLE_PRIVACY: u32 = 0x800; - // linux/fs.h // Flags for preadv2/pwritev2 @@ -1476,78 +1188,6 @@ pub const RWF_NOAPPEND: c_int = 0x00000020; pub const RWF_ATOMIC: c_int = 0x00000040; pub const RWF_DONTCACHE: c_int = 0x00000080; -// linux/if_link.h -pub const IFLA_UNSPEC: c_ushort = 0; -pub const IFLA_ADDRESS: c_ushort = 1; -pub const IFLA_BROADCAST: c_ushort = 2; -pub const IFLA_IFNAME: c_ushort = 3; -pub const IFLA_MTU: c_ushort = 4; -pub const IFLA_LINK: c_ushort = 5; -pub const IFLA_QDISC: c_ushort = 6; -pub const IFLA_STATS: c_ushort = 7; -pub const IFLA_COST: c_ushort = 8; -pub const IFLA_PRIORITY: c_ushort = 9; -pub const IFLA_MASTER: c_ushort = 10; -pub const IFLA_WIRELESS: c_ushort = 11; -pub const IFLA_PROTINFO: c_ushort = 12; -pub const IFLA_TXQLEN: c_ushort = 13; -pub const IFLA_MAP: c_ushort = 14; -pub const IFLA_WEIGHT: c_ushort = 15; -pub const IFLA_OPERSTATE: c_ushort = 16; -pub const IFLA_LINKMODE: c_ushort = 17; -pub const IFLA_LINKINFO: c_ushort = 18; -pub const IFLA_NET_NS_PID: c_ushort = 19; -pub const IFLA_IFALIAS: c_ushort = 20; -pub const IFLA_NUM_VF: c_ushort = 21; -pub const IFLA_VFINFO_LIST: c_ushort = 22; -pub const IFLA_STATS64: c_ushort = 23; -pub const IFLA_VF_PORTS: c_ushort = 24; -pub const IFLA_PORT_SELF: c_ushort = 25; -pub const IFLA_AF_SPEC: c_ushort = 26; -pub const IFLA_GROUP: c_ushort = 27; -pub const IFLA_NET_NS_FD: c_ushort = 28; -pub const IFLA_EXT_MASK: c_ushort = 29; -pub const IFLA_PROMISCUITY: c_ushort = 30; -pub const IFLA_NUM_TX_QUEUES: c_ushort = 31; -pub const IFLA_NUM_RX_QUEUES: c_ushort = 32; -pub const IFLA_CARRIER: c_ushort = 33; -pub const IFLA_PHYS_PORT_ID: c_ushort = 34; -pub const IFLA_CARRIER_CHANGES: c_ushort = 35; -pub const IFLA_PHYS_SWITCH_ID: c_ushort = 36; -pub const IFLA_LINK_NETNSID: c_ushort = 37; -pub const IFLA_PHYS_PORT_NAME: c_ushort = 38; -pub const IFLA_PROTO_DOWN: c_ushort = 39; -pub const IFLA_GSO_MAX_SEGS: c_ushort = 40; -pub const IFLA_GSO_MAX_SIZE: c_ushort = 41; -pub const IFLA_PAD: c_ushort = 42; -pub const IFLA_XDP: c_ushort = 43; -pub const IFLA_EVENT: c_ushort = 44; -pub const IFLA_NEW_NETNSID: c_ushort = 45; -pub const IFLA_IF_NETNSID: c_ushort = 46; -pub const IFLA_TARGET_NETNSID: c_ushort = IFLA_IF_NETNSID; -pub const IFLA_CARRIER_UP_COUNT: c_ushort = 47; -pub const IFLA_CARRIER_DOWN_COUNT: c_ushort = 48; -pub const IFLA_NEW_IFINDEX: c_ushort = 49; -pub const IFLA_MIN_MTU: c_ushort = 50; -pub const IFLA_MAX_MTU: c_ushort = 51; -pub const IFLA_PROP_LIST: c_ushort = 52; -pub const IFLA_ALT_IFNAME: c_ushort = 53; -pub const IFLA_PERM_ADDRESS: c_ushort = 54; -pub const IFLA_PROTO_DOWN_REASON: c_ushort = 55; -pub const IFLA_PARENT_DEV_NAME: c_ushort = 56; -pub const IFLA_PARENT_DEV_BUS_NAME: c_ushort = 57; -pub const IFLA_GRO_MAX_SIZE: c_ushort = 58; -pub const IFLA_TSO_MAX_SIZE: c_ushort = 59; -pub const IFLA_TSO_MAX_SEGS: c_ushort = 60; -pub const IFLA_ALLMULTI: c_ushort = 61; - -pub const IFLA_INFO_UNSPEC: c_ushort = 0; -pub const IFLA_INFO_KIND: c_ushort = 1; -pub const IFLA_INFO_DATA: c_ushort = 2; -pub const IFLA_INFO_XSTATS: c_ushort = 3; -pub const IFLA_INFO_SLAVE_KIND: c_ushort = 4; -pub const IFLA_INFO_SLAVE_DATA: c_ushort = 5; - // Since Linux 3.1 pub const SEEK_DATA: c_int = 3; pub const SEEK_HOLE: c_int = 4; @@ -1562,6 +1202,7 @@ pub const MPOL_F_NUMA_BALANCING: c_int = 1 << 13; pub const MPOL_F_RELATIVE_NODES: c_int = 1 << 14; pub const MPOL_F_STATIC_NODES: c_int = 1 << 15; +#[cfg(not(target_env = "gnu"))] // defined in `new/glibc` pub const PTHREAD_MUTEX_INITIALIZER: crate::pthread_mutex_t = crate::pthread_mutex_t { size: [0; crate::__SIZEOF_PTHREAD_MUTEX_T], }; @@ -1578,7 +1219,6 @@ pub const RENAME_WHITEOUT: c_uint = 4; pub const MSG_STAT: c_int = 11 | (crate::IPC_STAT & 0x100); pub const MSG_INFO: c_int = 12; -pub const MSG_NOTIFICATION: c_int = 0x8000; pub const MSG_NOERROR: c_int = 0o10000; pub const MSG_EXCEPT: c_int = 0o20000; @@ -1687,6 +1327,14 @@ pub const SECCOMP_USER_NOTIF_FLAG_CONTINUE: c_ulong = 1; pub const SECCOMP_ADDFD_FLAG_SETFD: c_ulong = 1; pub const SECCOMP_ADDFD_FLAG_SEND: c_ulong = 2; +const SECCOMP_IOC_MAGIC: u32 = b'!' as u32; + +pub const SECCOMP_IOCTL_NOTIF_RECV: Ioctl = _IOWR::(SECCOMP_IOC_MAGIC, 0); +pub const SECCOMP_IOCTL_NOTIF_SEND: Ioctl = _IOWR::(SECCOMP_IOC_MAGIC, 1); +pub const SECCOMP_IOCTL_NOTIF_ID_VALID: Ioctl = _IOW::(SECCOMP_IOC_MAGIC, 2); +pub const SECCOMP_IOCTL_NOTIF_ADDFD: Ioctl = _IOW::(SECCOMP_IOC_MAGIC, 3); +pub const SECCOMP_IOCTL_NOTIF_SET_FLAGS: Ioctl = _IOW::(SECCOMP_IOC_MAGIC, 4); + pub const TFD_CLOEXEC: c_int = O_CLOEXEC; pub const TFD_NONBLOCK: c_int = O_NONBLOCK; pub const TFD_TIMER_ABSTIME: c_int = 1; @@ -1750,7 +1398,11 @@ pub const SKF_AD_VLAN_TAG_PRESENT: c_int = 48; pub const SKF_AD_PAY_OFFSET: c_int = 52; pub const SKF_AD_RANDOM: c_int = 56; pub const SKF_AD_VLAN_TPID: c_int = 60; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SKF_AD_MAX: c_int = 64; + pub const SKF_NET_OFF: c_int = -0x100000; pub const SKF_LL_OFF: c_int = -0x200000; pub const BPF_NET_OFF: c_int = SKF_NET_OFF; @@ -1936,6 +1588,9 @@ pub const NFNL_SUBSYS_CTHELPER: c_int = 9; pub const NFNL_SUBSYS_NFTABLES: c_int = 10; pub const NFNL_SUBSYS_NFT_COMPAT: c_int = 11; pub const NFNL_SUBSYS_HOOK: c_int = 12; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NFNL_SUBSYS_COUNT: c_int = 13; pub const NFNL_MSG_BATCH_BEGIN: c_int = crate::NLMSG_MIN_TYPE; @@ -2052,6 +1707,9 @@ pub const NFQA_CFG_F_CONNTRACK: c_int = 0x0002; pub const NFQA_CFG_F_GSO: c_int = 0x0004; pub const NFQA_CFG_F_UID_GID: c_int = 0x0008; pub const NFQA_CFG_F_SECCTX: c_int = 0x0010; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NFQA_CFG_F_MAX: c_int = 0x0020; pub const NFQA_SKB_CSUMNOTREADY: c_int = 0x0001; @@ -2100,60 +1758,6 @@ pub const CTRL_ATTR_MCAST_GRP_UNSPEC: c_int = 0; pub const CTRL_ATTR_MCAST_GRP_NAME: c_int = 1; pub const CTRL_ATTR_MCAST_GRP_ID: c_int = 2; -pub const PACKET_FANOUT: c_int = 18; -pub const PACKET_TX_HAS_OFF: c_int = 19; -pub const PACKET_QDISC_BYPASS: c_int = 20; -pub const PACKET_ROLLOVER_STATS: c_int = 21; -pub const PACKET_FANOUT_DATA: c_int = 22; -pub const PACKET_IGNORE_OUTGOING: c_int = 23; -pub const PACKET_VNET_HDR_SZ: c_int = 24; - -pub const PACKET_FANOUT_HASH: c_uint = 0; -pub const PACKET_FANOUT_LB: c_uint = 1; -pub const PACKET_FANOUT_CPU: c_uint = 2; -pub const PACKET_FANOUT_ROLLOVER: c_uint = 3; -pub const PACKET_FANOUT_RND: c_uint = 4; -pub const PACKET_FANOUT_QM: c_uint = 5; -pub const PACKET_FANOUT_CBPF: c_uint = 6; -pub const PACKET_FANOUT_EBPF: c_uint = 7; -pub const PACKET_FANOUT_FLAG_ROLLOVER: c_uint = 0x1000; -pub const PACKET_FANOUT_FLAG_UNIQUEID: c_uint = 0x2000; -pub const PACKET_FANOUT_FLAG_IGNORE_OUTGOING: c_uint = 0x4000; -pub const PACKET_FANOUT_FLAG_DEFRAG: c_uint = 0x8000; - -pub const TP_STATUS_KERNEL: __u32 = 0; -pub const TP_STATUS_USER: __u32 = 1 << 0; -pub const TP_STATUS_COPY: __u32 = 1 << 1; -pub const TP_STATUS_LOSING: __u32 = 1 << 2; -pub const TP_STATUS_CSUMNOTREADY: __u32 = 1 << 3; -pub const TP_STATUS_VLAN_VALID: __u32 = 1 << 4; -pub const TP_STATUS_BLK_TMO: __u32 = 1 << 5; -pub const TP_STATUS_VLAN_TPID_VALID: __u32 = 1 << 6; -pub const TP_STATUS_CSUM_VALID: __u32 = 1 << 7; - -pub const TP_STATUS_AVAILABLE: __u32 = 0; -pub const TP_STATUS_SEND_REQUEST: __u32 = 1 << 0; -pub const TP_STATUS_SENDING: __u32 = 1 << 1; -pub const TP_STATUS_WRONG_FORMAT: __u32 = 1 << 2; - -pub const TP_STATUS_TS_SOFTWARE: __u32 = 1 << 29; -pub const TP_STATUS_TS_SYS_HARDWARE: __u32 = 1 << 30; -pub const TP_STATUS_TS_RAW_HARDWARE: __u32 = 1 << 31; - -pub const TP_FT_REQ_FILL_RXHASH: __u32 = 1; - -pub const TPACKET_ALIGNMENT: usize = 16; - -pub const TPACKET_HDRLEN: usize = ((size_of::() + TPACKET_ALIGNMENT - 1) - & !(TPACKET_ALIGNMENT - 1)) - + size_of::(); -pub const TPACKET2_HDRLEN: usize = ((size_of::() + TPACKET_ALIGNMENT - 1) - & !(TPACKET_ALIGNMENT - 1)) - + size_of::(); -pub const TPACKET3_HDRLEN: usize = ((size_of::() + TPACKET_ALIGNMENT - 1) - & !(TPACKET_ALIGNMENT - 1)) - + size_of::(); - // linux/netfilter.h pub const NF_DROP: c_int = 0; pub const NF_ACCEPT: c_int = 1; @@ -2166,7 +1770,7 @@ pub const NF_MAX_VERDICT: c_int = NF_STOP; pub const NF_VERDICT_MASK: c_int = 0x000000ff; pub const NF_VERDICT_FLAG_QUEUE_BYPASS: c_int = 0x00008000; -pub const NF_VERDICT_QMASK: c_int = 0xffff0000; +pub const NF_VERDICT_QMASK: c_int = u32_cast_int(0xffff0000); pub const NF_VERDICT_QBITS: c_int = 16; pub const NF_VERDICT_BITS: c_int = 16; @@ -2217,6 +1821,9 @@ pub const NF_BR_PRI_BRNF: c_int = 0; pub const NF_BR_PRI_NAT_DST_OTHER: c_int = 100; pub const NF_BR_PRI_FILTER_OTHER: c_int = 200; pub const NF_BR_PRI_NAT_SRC: c_int = 300; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NF_BR_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv4.h @@ -2241,6 +1848,9 @@ pub const NF_IP_PRI_NAT_SRC: c_int = 100; pub const NF_IP_PRI_SELINUX_LAST: c_int = 225; pub const NF_IP_PRI_CONNTRACK_HELPER: c_int = 300; pub const NF_IP_PRI_CONNTRACK_CONFIRM: c_int = crate::INT_MAX; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NF_IP_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv6.h @@ -2264,6 +1874,9 @@ pub const NF_IP6_PRI_SECURITY: c_int = 50; pub const NF_IP6_PRI_NAT_SRC: c_int = 100; pub const NF_IP6_PRI_SELINUX_LAST: c_int = 225; pub const NF_IP6_PRI_CONNTRACK_HELPER: c_int = 300; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NF_IP6_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv6/ip6_tables.h @@ -2341,9 +1954,15 @@ pub const SIOCGIWENCODEEXT: c_ulong = 0x8B35; pub const SIOCSIWPMKSA: c_ulong = 0x8B36; pub const SIOCIWFIRSTPRIV: c_ulong = 0x8BE0; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SIOCIWLASTPRIV: c_ulong = 0x8BFF; pub const SIOCIWFIRST: c_ulong = 0x8B00; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SIOCIWLAST: c_ulong = SIOCIWLASTPRIV; pub const IWEVTXDROP: c_ulong = 0x8C00; @@ -2909,98 +2528,10 @@ pub const PTP_PF_EXTTS: c_uint = 1; pub const PTP_PF_PEROUT: c_uint = 2; pub const PTP_PF_PHYSYNC: c_uint = 3; -// linux/tls.h -pub const TLS_TX: c_int = 1; -pub const TLS_RX: c_int = 2; - -pub const TLS_TX_ZEROCOPY_RO: c_int = 3; -pub const TLS_RX_EXPECT_NO_PAD: c_int = 4; - -pub const TLS_1_2_VERSION_MAJOR: __u8 = 0x3; -pub const TLS_1_2_VERSION_MINOR: __u8 = 0x3; -pub const TLS_1_2_VERSION: __u16 = - ((TLS_1_2_VERSION_MAJOR as __u16) << 8) | (TLS_1_2_VERSION_MINOR as __u16); - -pub const TLS_1_3_VERSION_MAJOR: __u8 = 0x3; -pub const TLS_1_3_VERSION_MINOR: __u8 = 0x4; -pub const TLS_1_3_VERSION: __u16 = - ((TLS_1_3_VERSION_MAJOR as __u16) << 8) | (TLS_1_3_VERSION_MINOR as __u16); - -pub const TLS_CIPHER_AES_GCM_128: __u16 = 51; -pub const TLS_CIPHER_AES_GCM_128_IV_SIZE: usize = 8; -pub const TLS_CIPHER_AES_GCM_128_KEY_SIZE: usize = 16; -pub const TLS_CIPHER_AES_GCM_128_SALT_SIZE: usize = 4; -pub const TLS_CIPHER_AES_GCM_128_TAG_SIZE: usize = 16; -pub const TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE: usize = 8; - -pub const TLS_CIPHER_AES_GCM_256: __u16 = 52; -pub const TLS_CIPHER_AES_GCM_256_IV_SIZE: usize = 8; -pub const TLS_CIPHER_AES_GCM_256_KEY_SIZE: usize = 32; -pub const TLS_CIPHER_AES_GCM_256_SALT_SIZE: usize = 4; -pub const TLS_CIPHER_AES_GCM_256_TAG_SIZE: usize = 16; -pub const TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE: usize = 8; - -pub const TLS_CIPHER_AES_CCM_128: __u16 = 53; -pub const TLS_CIPHER_AES_CCM_128_IV_SIZE: usize = 8; -pub const TLS_CIPHER_AES_CCM_128_KEY_SIZE: usize = 16; -pub const TLS_CIPHER_AES_CCM_128_SALT_SIZE: usize = 4; -pub const TLS_CIPHER_AES_CCM_128_TAG_SIZE: usize = 16; -pub const TLS_CIPHER_AES_CCM_128_REC_SEQ_SIZE: usize = 8; - -pub const TLS_CIPHER_CHACHA20_POLY1305: __u16 = 54; -pub const TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE: usize = 12; -pub const TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE: usize = 32; -pub const TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE: usize = 0; -pub const TLS_CIPHER_CHACHA20_POLY1305_TAG_SIZE: usize = 16; -pub const TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE: usize = 8; - -pub const TLS_CIPHER_SM4_GCM: __u16 = 55; -pub const TLS_CIPHER_SM4_GCM_IV_SIZE: usize = 8; -pub const TLS_CIPHER_SM4_GCM_KEY_SIZE: usize = 16; -pub const TLS_CIPHER_SM4_GCM_SALT_SIZE: usize = 4; -pub const TLS_CIPHER_SM4_GCM_TAG_SIZE: usize = 16; -pub const TLS_CIPHER_SM4_GCM_REC_SEQ_SIZE: usize = 8; - -pub const TLS_CIPHER_SM4_CCM: __u16 = 56; -pub const TLS_CIPHER_SM4_CCM_IV_SIZE: usize = 8; -pub const TLS_CIPHER_SM4_CCM_KEY_SIZE: usize = 16; -pub const TLS_CIPHER_SM4_CCM_SALT_SIZE: usize = 4; -pub const TLS_CIPHER_SM4_CCM_TAG_SIZE: usize = 16; -pub const TLS_CIPHER_SM4_CCM_REC_SEQ_SIZE: usize = 8; - -pub const TLS_CIPHER_ARIA_GCM_128: __u16 = 57; -pub const TLS_CIPHER_ARIA_GCM_128_IV_SIZE: usize = 8; -pub const TLS_CIPHER_ARIA_GCM_128_KEY_SIZE: usize = 16; -pub const TLS_CIPHER_ARIA_GCM_128_SALT_SIZE: usize = 4; -pub const TLS_CIPHER_ARIA_GCM_128_TAG_SIZE: usize = 16; -pub const TLS_CIPHER_ARIA_GCM_128_REC_SEQ_SIZE: usize = 8; - -pub const TLS_CIPHER_ARIA_GCM_256: __u16 = 58; -pub const TLS_CIPHER_ARIA_GCM_256_IV_SIZE: usize = 8; -pub const TLS_CIPHER_ARIA_GCM_256_KEY_SIZE: usize = 32; -pub const TLS_CIPHER_ARIA_GCM_256_SALT_SIZE: usize = 4; -pub const TLS_CIPHER_ARIA_GCM_256_TAG_SIZE: usize = 16; -pub const TLS_CIPHER_ARIA_GCM_256_REC_SEQ_SIZE: usize = 8; - -pub const TLS_SET_RECORD_TYPE: c_int = 1; -pub const TLS_GET_RECORD_TYPE: c_int = 2; +// linux/socket.h pub const SOL_TLS: c_int = 282; -// enum -pub const TLS_INFO_UNSPEC: c_int = 0x00; -pub const TLS_INFO_VERSION: c_int = 0x01; -pub const TLS_INFO_CIPHER: c_int = 0x02; -pub const TLS_INFO_TXCONF: c_int = 0x03; -pub const TLS_INFO_RXCONF: c_int = 0x04; -pub const TLS_INFO_ZC_RO_TX: c_int = 0x05; -pub const TLS_INFO_RX_NO_PAD: c_int = 0x06; - -pub const TLS_CONF_BASE: c_int = 1; -pub const TLS_CONF_SW: c_int = 2; -pub const TLS_CONF_HW: c_int = 3; -pub const TLS_CONF_HW_RECORD: c_int = 4; - // linux/if_alg.h pub const ALG_SET_KEY: c_int = 1; pub const ALG_SET_IV: c_int = 2; @@ -3141,10 +2672,6 @@ pub const IN_ALL_EVENTS: u32 = IN_ACCESS pub const IN_CLOEXEC: c_int = O_CLOEXEC; pub const IN_NONBLOCK: c_int = O_NONBLOCK; -// uapi/linux/mount.h -pub const OPEN_TREE_CLONE: c_uint = 0x01; -pub const OPEN_TREE_CLOEXEC: c_uint = O_CLOEXEC as c_uint; - // uapi/linux/netfilter/nf_tables.h pub const NFT_TABLE_MAXNAMELEN: c_int = 256; pub const NFT_CHAIN_MAXNAMELEN: c_int = 256; @@ -3157,7 +2684,11 @@ pub const NFT_REG_1: c_int = 1; pub const NFT_REG_2: c_int = 2; pub const NFT_REG_3: c_int = 3; pub const NFT_REG_4: c_int = 4; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const __NFT_REG_MAX: c_int = 5; + pub const NFT_REG32_00: c_int = 8; pub const NFT_REG32_01: c_int = 9; pub const NFT_REG32_02: c_int = 10; @@ -3211,6 +2742,8 @@ cfg_if! { } } +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NFT_MSG_MAX: c_int = 34; pub const NFT_SET_ANONYMOUS: c_int = 0x1; @@ -3341,6 +2874,8 @@ pub const NFT_NG_INCREMENTAL: c_int = 0; pub const NFT_NG_RANDOM: c_int = 1; // linux/input.h +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const FF_MAX: __u16 = 0x7f; pub const FF_CNT: usize = FF_MAX as usize + 1; @@ -3352,26 +2887,60 @@ pub const INPUT_PROP_SEMI_MT: __u16 = 0x03; pub const INPUT_PROP_TOPBUTTONPAD: __u16 = 0x04; pub const INPUT_PROP_POINTING_STICK: __u16 = 0x05; pub const INPUT_PROP_ACCELEROMETER: __u16 = 0x06; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const INPUT_PROP_MAX: __u16 = 0x1f; + pub const INPUT_PROP_CNT: usize = INPUT_PROP_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const EV_MAX: __u16 = 0x1f; pub const EV_CNT: usize = EV_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SYN_MAX: __u16 = 0xf; pub const SYN_CNT: usize = SYN_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const KEY_MAX: __u16 = 0x2ff; pub const KEY_CNT: usize = KEY_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const REL_MAX: __u16 = 0x0f; pub const REL_CNT: usize = REL_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const ABS_MAX: __u16 = 0x3f; pub const ABS_CNT: usize = ABS_MAX as usize + 1; -pub const SW_MAX: __u16 = 0x10; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. +pub const SW_MAX: __u16 = 0x11; pub const SW_CNT: usize = SW_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const MSC_MAX: __u16 = 0x07; pub const MSC_CNT: usize = MSC_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const LED_MAX: __u16 = 0x0f; pub const LED_CNT: usize = LED_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const REP_MAX: __u16 = 0x01; pub const REP_CNT: usize = REP_MAX as usize + 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SND_MAX: __u16 = 0x07; pub const SND_CNT: usize = SND_MAX as usize + 1; @@ -3471,73 +3040,28 @@ pub const FAN_NOFD: c_int = -1; pub const FAN_NOPIDFD: c_int = FAN_NOFD; pub const FAN_EPIDFD: c_int = -2; -// linux/futex.h -pub const FUTEX_WAIT: c_int = 0; -pub const FUTEX_WAKE: c_int = 1; -pub const FUTEX_FD: c_int = 2; -pub const FUTEX_REQUEUE: c_int = 3; -pub const FUTEX_CMP_REQUEUE: c_int = 4; -pub const FUTEX_WAKE_OP: c_int = 5; -pub const FUTEX_LOCK_PI: c_int = 6; -pub const FUTEX_UNLOCK_PI: c_int = 7; -pub const FUTEX_TRYLOCK_PI: c_int = 8; -pub const FUTEX_WAIT_BITSET: c_int = 9; -pub const FUTEX_WAKE_BITSET: c_int = 10; -pub const FUTEX_WAIT_REQUEUE_PI: c_int = 11; -pub const FUTEX_CMP_REQUEUE_PI: c_int = 12; -pub const FUTEX_LOCK_PI2: c_int = 13; - -pub const FUTEX_PRIVATE_FLAG: c_int = 128; -pub const FUTEX_CLOCK_REALTIME: c_int = 256; -pub const FUTEX_CMD_MASK: c_int = !(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME); - -pub const FUTEX_WAITERS: u32 = 0x80000000; -pub const FUTEX_OWNER_DIED: u32 = 0x40000000; -pub const FUTEX_TID_MASK: u32 = 0x3fffffff; - -pub const FUTEX_BITSET_MATCH_ANY: c_int = 0xffffffff; - -pub const FUTEX_OP_SET: c_int = 0; -pub const FUTEX_OP_ADD: c_int = 1; -pub const FUTEX_OP_OR: c_int = 2; -pub const FUTEX_OP_ANDN: c_int = 3; -pub const FUTEX_OP_XOR: c_int = 4; - -pub const FUTEX_OP_OPARG_SHIFT: c_int = 8; - -pub const FUTEX_OP_CMP_EQ: c_int = 0; -pub const FUTEX_OP_CMP_NE: c_int = 1; -pub const FUTEX_OP_CMP_LT: c_int = 2; -pub const FUTEX_OP_CMP_LE: c_int = 3; -pub const FUTEX_OP_CMP_GT: c_int = 4; -pub const FUTEX_OP_CMP_GE: c_int = 5; - -pub fn FUTEX_OP(op: c_int, oparg: c_int, cmp: c_int, cmparg: c_int) -> c_int { - ((op & 0xf) << 28) | ((cmp & 0xf) << 24) | ((oparg & 0xfff) << 12) | (cmparg & 0xfff) -} - // linux/kexec.h pub const KEXEC_ON_CRASH: c_int = 0x00000001; pub const KEXEC_PRESERVE_CONTEXT: c_int = 0x00000002; -pub const KEXEC_ARCH_MASK: c_int = 0xffff0000; +pub const KEXEC_ARCH_MASK: c_int = u32_cast_int(0xffff0000); pub const KEXEC_FILE_UNLOAD: c_int = 0x00000001; pub const KEXEC_FILE_ON_CRASH: c_int = 0x00000002; pub const KEXEC_FILE_NO_INITRAMFS: c_int = 0x00000004; // linux/reboot.h -pub const LINUX_REBOOT_MAGIC1: c_int = 0xfee1dead; +pub const LINUX_REBOOT_MAGIC1: c_int = u32_cast_int(0xfee1dead); pub const LINUX_REBOOT_MAGIC2: c_int = 672274793; pub const LINUX_REBOOT_MAGIC2A: c_int = 85072278; pub const LINUX_REBOOT_MAGIC2B: c_int = 369367448; pub const LINUX_REBOOT_MAGIC2C: c_int = 537993216; pub const LINUX_REBOOT_CMD_RESTART: c_int = 0x01234567; -pub const LINUX_REBOOT_CMD_HALT: c_int = 0xCDEF0123; -pub const LINUX_REBOOT_CMD_CAD_ON: c_int = 0x89ABCDEF; +pub const LINUX_REBOOT_CMD_HALT: c_int = u32_cast_int(0xCDEF0123); +pub const LINUX_REBOOT_CMD_CAD_ON: c_int = u32_cast_int(0x89ABCDEF); pub const LINUX_REBOOT_CMD_CAD_OFF: c_int = 0x00000000; pub const LINUX_REBOOT_CMD_POWER_OFF: c_int = 0x4321FEDC; -pub const LINUX_REBOOT_CMD_RESTART2: c_int = 0xA1B2C3D4; -pub const LINUX_REBOOT_CMD_SW_SUSPEND: c_int = 0xD000FCE2; +pub const LINUX_REBOOT_CMD_RESTART2: c_int = u32_cast_int(0xA1B2C3D4); +pub const LINUX_REBOOT_CMD_SW_SUSPEND: c_int = u32_cast_int(0xD000FCE2); pub const LINUX_REBOOT_CMD_KEXEC: c_int = 0x45584543; // linux/errqueue.h @@ -3548,82 +3072,6 @@ pub const SO_EE_ORIGIN_ICMP6: u8 = 3; pub const SO_EE_ORIGIN_TXSTATUS: u8 = 4; pub const SO_EE_ORIGIN_TIMESTAMPING: u8 = SO_EE_ORIGIN_TXSTATUS; -// linux/sctp.h -pub const SCTP_FUTURE_ASSOC: c_int = 0; -pub const SCTP_CURRENT_ASSOC: c_int = 1; -pub const SCTP_ALL_ASSOC: c_int = 2; -pub const SCTP_RTOINFO: c_int = 0; -pub const SCTP_ASSOCINFO: c_int = 1; -pub const SCTP_INITMSG: c_int = 2; -pub const SCTP_NODELAY: c_int = 3; -pub const SCTP_AUTOCLOSE: c_int = 4; -pub const SCTP_SET_PEER_PRIMARY_ADDR: c_int = 5; -pub const SCTP_PRIMARY_ADDR: c_int = 6; -pub const SCTP_ADAPTATION_LAYER: c_int = 7; -pub const SCTP_DISABLE_FRAGMENTS: c_int = 8; -pub const SCTP_PEER_ADDR_PARAMS: c_int = 9; -pub const SCTP_DEFAULT_SEND_PARAM: c_int = 10; -pub const SCTP_EVENTS: c_int = 11; -pub const SCTP_I_WANT_MAPPED_V4_ADDR: c_int = 12; -pub const SCTP_MAXSEG: c_int = 13; -pub const SCTP_STATUS: c_int = 14; -pub const SCTP_GET_PEER_ADDR_INFO: c_int = 15; -pub const SCTP_DELAYED_ACK_TIME: c_int = 16; -pub const SCTP_DELAYED_ACK: c_int = SCTP_DELAYED_ACK_TIME; -pub const SCTP_DELAYED_SACK: c_int = SCTP_DELAYED_ACK_TIME; -pub const SCTP_CONTEXT: c_int = 17; -pub const SCTP_FRAGMENT_INTERLEAVE: c_int = 18; -pub const SCTP_PARTIAL_DELIVERY_POINT: c_int = 19; -pub const SCTP_MAX_BURST: c_int = 20; -pub const SCTP_AUTH_CHUNK: c_int = 21; -pub const SCTP_HMAC_IDENT: c_int = 22; -pub const SCTP_AUTH_KEY: c_int = 23; -pub const SCTP_AUTH_ACTIVE_KEY: c_int = 24; -pub const SCTP_AUTH_DELETE_KEY: c_int = 25; -pub const SCTP_PEER_AUTH_CHUNKS: c_int = 26; -pub const SCTP_LOCAL_AUTH_CHUNKS: c_int = 27; -pub const SCTP_GET_ASSOC_NUMBER: c_int = 28; -pub const SCTP_GET_ASSOC_ID_LIST: c_int = 29; -pub const SCTP_AUTO_ASCONF: c_int = 30; -pub const SCTP_PEER_ADDR_THLDS: c_int = 31; -pub const SCTP_RECVRCVINFO: c_int = 32; -pub const SCTP_RECVNXTINFO: c_int = 33; -pub const SCTP_DEFAULT_SNDINFO: c_int = 34; -pub const SCTP_AUTH_DEACTIVATE_KEY: c_int = 35; -pub const SCTP_REUSE_PORT: c_int = 36; -pub const SCTP_PEER_ADDR_THLDS_V2: c_int = 37; -pub const SCTP_PR_SCTP_NONE: c_int = 0x0000; -pub const SCTP_PR_SCTP_TTL: c_int = 0x0010; -pub const SCTP_PR_SCTP_RTX: c_int = 0x0020; -pub const SCTP_PR_SCTP_PRIO: c_int = 0x0030; -pub const SCTP_PR_SCTP_MAX: c_int = SCTP_PR_SCTP_PRIO; -pub const SCTP_PR_SCTP_MASK: c_int = 0x0030; -pub const SCTP_ENABLE_RESET_STREAM_REQ: c_int = 0x01; -pub const SCTP_ENABLE_RESET_ASSOC_REQ: c_int = 0x02; -pub const SCTP_ENABLE_CHANGE_ASSOC_REQ: c_int = 0x04; -pub const SCTP_ENABLE_STRRESET_MASK: c_int = 0x07; -pub const SCTP_STREAM_RESET_INCOMING: c_int = 0x01; -pub const SCTP_STREAM_RESET_OUTGOING: c_int = 0x02; - -pub const SCTP_INIT: c_int = 0; -pub const SCTP_SNDRCV: c_int = 1; -pub const SCTP_SNDINFO: c_int = 2; -pub const SCTP_RCVINFO: c_int = 3; -pub const SCTP_NXTINFO: c_int = 4; -pub const SCTP_PRINFO: c_int = 5; -pub const SCTP_AUTHINFO: c_int = 6; -pub const SCTP_DSTADDRV4: c_int = 7; -pub const SCTP_DSTADDRV6: c_int = 8; - -pub const SCTP_UNORDERED: c_int = 1 << 0; -pub const SCTP_ADDR_OVER: c_int = 1 << 1; -pub const SCTP_ABORT: c_int = 1 << 2; -pub const SCTP_SACK_IMMEDIATELY: c_int = 1 << 3; -pub const SCTP_SENDALL: c_int = 1 << 6; -pub const SCTP_PR_SCTP_ALL: c_int = 1 << 7; -pub const SCTP_NOTIFICATION: c_int = MSG_NOTIFICATION; -pub const SCTP_EOF: c_int = crate::MSG_FIN; - /* DCCP socket options */ pub const DCCP_SOCKOPT_PACKET_SIZE: c_int = 1; pub const DCCP_SOCKOPT_SERVICE: c_int = 2; @@ -3670,7 +3118,6 @@ pub const KERN_PROF: c_int = 6; pub const KERN_NODENAME: c_int = 7; pub const KERN_DOMAINNAME: c_int = 8; pub const KERN_PANIC: c_int = 15; -pub const KERN_REALROOTDEV: c_int = 16; pub const KERN_SPARC_REBOOT: c_int = 21; pub const KERN_CTLALTDEL: c_int = 22; pub const KERN_PRINTK: c_int = 23; @@ -3705,7 +3152,11 @@ pub const KERN_S390_USER_DEBUG_LOGGING: c_int = 51; pub const KERN_CORE_USES_PID: c_int = 52; pub const KERN_TAINTED: c_int = 53; pub const KERN_CADPID: c_int = 54; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const KERN_PIDMAX: c_int = 55; + pub const KERN_CORE_PATTERN: c_int = 56; pub const KERN_PANIC_ON_OOPS: c_int = 57; pub const KERN_HPPA_PWRSW: c_int = 58; @@ -3713,7 +3164,11 @@ pub const KERN_HPPA_UNALIGNED: c_int = 59; pub const KERN_PRINTK_RATELIMIT: c_int = 60; pub const KERN_PRINTK_RATELIMIT_BURST: c_int = 61; pub const KERN_PTY: c_int = 62; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const KERN_NGROUPS_MAX: c_int = 63; + pub const KERN_SPARC_SCONS_PWROFF: c_int = 64; pub const KERN_HZ_TIMER: c_int = 65; pub const KERN_UNKNOWN_NMI_PANIC: c_int = 66; @@ -3742,7 +3197,6 @@ pub const VM_SWAPPINESS: c_int = 19; pub const VM_LOWMEM_RESERVE_RATIO: c_int = 20; pub const VM_MIN_FREE_KBYTES: c_int = 21; pub const VM_MAX_MAP_COUNT: c_int = 22; -pub const VM_LAPTOP_MODE: c_int = 23; pub const VM_BLOCK_DUMP: c_int = 24; pub const VM_HUGETLB_GROUP: c_int = 25; pub const VM_VFS_CACHE_PRESSURE: c_int = 26; @@ -3841,7 +3295,7 @@ pub const PF_MEMALLOC_PIN: c_int = 0x10000000; /// Plug has ts that needs updating. pub const PF_BLOCK_TS: c_int = 0x20000000; /// This thread called `freeze_processes()` and should not be frozen. -pub const PF_SUSPEND_TASK: c_int = PF_SUSPEND_TASK_UINT as _; +pub const PF_SUSPEND_TASK: c_int = u32_cast_int(PF_SUSPEND_TASK_UINT); // The used value is the highest possible bit fitting on 32 bits, so directly // defining it as a signed integer causes the compiler to report an overflow. // Use instead a private intermediary that assuringly has the correct type and @@ -3882,7 +3336,7 @@ pub const XDP_OPTIONS: c_int = 8; pub const XDP_OPTIONS_ZEROCOPY: crate::__u32 = 1 << 0; pub const XDP_PGOFF_RX_RING: crate::off_t = 0; -pub const XDP_PGOFF_TX_RING: crate::off_t = 0x80000000; +pub const XDP_PGOFF_TX_RING: crate::off_t = 0x80000000u32 as crate::off_t; pub const XDP_UMEM_PGOFF_FILL_RING: crate::c_ulonglong = 0x100000000; pub const XDP_UMEM_PGOFF_COMPLETION_RING: crate::c_ulonglong = 0x180000000; @@ -3902,21 +3356,6 @@ pub const XDP_TX_METADATA: crate::__u32 = 1 << 1; pub const SOL_XDP: c_int = 283; -// linux/mount.h -pub const MOUNT_ATTR_RDONLY: crate::__u64 = 0x00000001; -pub const MOUNT_ATTR_NOSUID: crate::__u64 = 0x00000002; -pub const MOUNT_ATTR_NODEV: crate::__u64 = 0x00000004; -pub const MOUNT_ATTR_NOEXEC: crate::__u64 = 0x00000008; -pub const MOUNT_ATTR__ATIME: crate::__u64 = 0x00000070; -pub const MOUNT_ATTR_RELATIME: crate::__u64 = 0x00000000; -pub const MOUNT_ATTR_NOATIME: crate::__u64 = 0x00000010; -pub const MOUNT_ATTR_STRICTATIME: crate::__u64 = 0x00000020; -pub const MOUNT_ATTR_NODIRATIME: crate::__u64 = 0x00000080; -pub const MOUNT_ATTR_IDMAP: crate::__u64 = 0x00100000; -pub const MOUNT_ATTR_NOSYMFOLLOW: crate::__u64 = 0x00200000; - -pub const MOUNT_ATTR_SIZE_VER0: c_int = 32; - pub const SCHED_FLAG_KEEP_ALL: c_int = SCHED_FLAG_KEEP_POLICY | SCHED_FLAG_KEEP_PARAMS; pub const SCHED_FLAG_UTIL_CLAMP: c_int = SCHED_FLAG_UTIL_CLAMP_MIN | SCHED_FLAG_UTIL_CLAMP_MAX; @@ -3928,64 +3367,48 @@ pub const SCHED_FLAG_ALL: c_int = SCHED_FLAG_RESET_ON_FORK | SCHED_FLAG_UTIL_CLAMP; // ioctl_eventpoll: added in Linux 6.9 -pub const EPIOCSPARAMS: Ioctl = 0x40088a01; -pub const EPIOCGPARAMS: Ioctl = 0x80088a02; +const EPOLL_IOC_TYPE: u32 = 0x8A; +pub const EPIOCSPARAMS: Ioctl = _IOW::(EPOLL_IOC_TYPE, 0x01); +pub const EPIOCGPARAMS: Ioctl = _IOR::(EPOLL_IOC_TYPE, 0x02); // siginfo.h pub const SI_DETHREAD: c_int = -7; pub const TRAP_PERF: c_int = 6; f! { - pub fn SCTP_PR_INDEX(policy: c_int) -> c_int { - policy >> (4 - 1) - } - - pub fn SCTP_PR_POLICY(policy: c_int) -> c_int { - policy & SCTP_PR_SCTP_MASK - } - - pub fn SCTP_PR_SET_POLICY(flags: &mut c_int, policy: c_int) -> () { - *flags &= !SCTP_PR_SCTP_MASK; - *flags |= policy; - } - - pub fn SO_EE_OFFENDER(ee: *const crate::sock_extended_err) -> *mut crate::sockaddr { + pub unsafe fn SO_EE_OFFENDER(ee: *const crate::sock_extended_err) -> *mut crate::sockaddr { ee.offset(1) as *mut crate::sockaddr } - pub fn TPACKET_ALIGN(x: usize) -> usize { - (x + TPACKET_ALIGNMENT - 1) & !(TPACKET_ALIGNMENT - 1) - } - - pub fn BPF_CLASS(code: __u32) -> __u32 { + pub unsafe fn BPF_CLASS(code: __u32) -> __u32 { code & 0x07 } - pub fn BPF_SIZE(code: __u32) -> __u32 { + pub unsafe fn BPF_SIZE(code: __u32) -> __u32 { code & 0x18 } - pub fn BPF_MODE(code: __u32) -> __u32 { + pub unsafe fn BPF_MODE(code: __u32) -> __u32 { code & 0xe0 } - pub fn BPF_OP(code: __u32) -> __u32 { + pub unsafe fn BPF_OP(code: __u32) -> __u32 { code & 0xf0 } - pub fn BPF_SRC(code: __u32) -> __u32 { + pub unsafe fn BPF_SRC(code: __u32) -> __u32 { code & 0x08 } - pub fn BPF_RVAL(code: __u32) -> __u32 { + pub unsafe fn BPF_RVAL(code: __u32) -> __u32 { code & 0x18 } - pub fn BPF_MISCOP(code: __u32) -> __u32 { + pub unsafe fn BPF_MISCOP(code: __u32) -> __u32 { code & 0xf8 } - pub fn BPF_STMT(code: __u16, k: __u32) -> sock_filter { + pub unsafe fn BPF_STMT(code: __u16, k: __u32) -> sock_filter { sock_filter { code, jt: 0, @@ -3994,35 +3417,21 @@ f! { } } - pub fn BPF_JUMP(code: __u16, k: __u32, jt: __u8, jf: __u8) -> sock_filter { + pub unsafe fn BPF_JUMP(code: __u16, k: __u32, jt: __u8, jf: __u8) -> sock_filter { sock_filter { code, jt, jf, k } } #[cfg(target_env = "gnu")] - pub fn SUN_LEN(s: crate::sockaddr_un) -> usize { + pub unsafe fn SUN_LEN(s: crate::sockaddr_un) -> usize { offset_of!(crate::sockaddr_un, sun_path) + crate::strlen(s.sun_path.as_ptr()) } #[cfg(target_env = "musl")] - pub fn SUN_LEN(s: crate::sockaddr_un) -> usize { + pub unsafe fn SUN_LEN(s: crate::sockaddr_un) -> usize { 2 * crate::strlen(s.sun_path.as_ptr()) } } -safe_f! { - pub const fn SCTP_PR_TTL_ENABLED(policy: c_int) -> bool { - policy == SCTP_PR_SCTP_TTL - } - - pub const fn SCTP_PR_RTX_ENABLED(policy: c_int) -> bool { - policy == SCTP_PR_SCTP_RTX - } - - pub const fn SCTP_PR_PRIO_ENABLED(policy: c_int) -> bool { - policy == SCTP_PR_SCTP_PRIO - } -} - // These functions are not available on OpenHarmony cfg_if! { if #[cfg(not(target_env = "ohos"))] { @@ -4211,6 +3620,13 @@ extern "C" { pub fn posix_madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; + pub fn mremap( + addr: *mut c_void, + len: size_t, + new_len: size_t, + flags: c_int, + ... + ) -> *mut c_void; pub fn remap_file_pages( addr: *mut c_void, size: size_t, @@ -4396,6 +3812,11 @@ extern "C" { flags: c_int, ) -> c_int; pub fn open_by_handle_at(mount_fd: c_int, handle: *mut file_handle, flags: c_int) -> c_int; + pub fn getnetbyname(name: *const c_char) -> *mut netent; + pub fn getnetbyaddr(net: u32, type_: c_int) -> *mut netent; + pub fn getnetent() -> *mut netent; + pub fn setnetent(stayopen: c_int); + pub fn endnetent(); } // LFS64 extensions diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/arm/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/arm/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/arm/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/arm/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/hexagon.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/hexagon.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/hexagon.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/hexagon.rs index fa5ebf363..c8c3377c5 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/hexagon.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/hexagon.rs @@ -102,7 +102,11 @@ s! { pub const AF_FILE: c_int = 1; pub const AF_KCM: c_int = 41; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const AF_MAX: c_int = 43; + pub const AF_QIPCRTR: c_int = 42; pub const EADDRINUSE: c_int = 98; pub const EADDRNOTAVAIL: c_int = 99; @@ -235,7 +239,11 @@ pub const O_SYNC: c_int = 1052672; pub const O_RSYNC: c_int = 1052672; pub const PF_FILE: c_int = 1; pub const PF_KCM: c_int = 41; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PF_MAX: c_int = 43; + pub const PF_QIPCRTR: c_int = 42; pub const SA_ONSTACK: c_int = 0x08000000; pub const SA_SIGINFO: c_int = 0x00000004; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/mips/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/mips/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/mips/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/mips/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/mod.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/mod.rs index ac76d3c65..8b662af23 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/mod.rs @@ -2,8 +2,6 @@ use crate::prelude::*; pub type nlink_t = u32; pub type blksize_t = c_long; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; pub type regoff_t = c_int; s! { diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/powerpc.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/powerpc.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/powerpc.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/powerpc.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs index 8589e4692..1dea8d224 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs @@ -16,10 +16,10 @@ s! { pub st_uid: crate::uid_t, pub st_gid: crate::gid_t, pub st_rdev: crate::dev_t, - pub __pad1: crate::dev_t, + __st_rdev_padding: Padding, pub st_size: off_t, pub st_blksize: crate::blksize_t, - pub __pad2: c_int, + __st_blksize_padding: Padding, pub st_blocks: crate::blkcnt_t, pub st_atime: crate::time_t, #[cfg(all(musl32_time64, target_endian = "big"))] diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/x86/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/x86/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b32/x86/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b32/x86/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs index 82df29bf4..04bbb8d22 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs @@ -1,8 +1,6 @@ use crate::off_t; use crate::prelude::*; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; pub type wchar_t = u32; pub type nlink_t = u32; pub type blksize_t = c_int; @@ -373,6 +371,7 @@ pub const SYS_pread64: c_long = 67; pub const SYS_pwrite64: c_long = 68; pub const SYS_preadv: c_long = 69; pub const SYS_pwritev: c_long = 70; +pub const SYS_sendfile: c_long = 71; pub const SYS_pselect6: c_long = 72; pub const SYS_ppoll: c_long = 73; pub const SYS_signalfd4: c_long = 74; @@ -524,6 +523,7 @@ pub const SYS_keyctl: c_long = 219; pub const SYS_clone: c_long = 220; pub const SYS_execve: c_long = 221; pub const SYS_mmap: c_long = 222; +pub const SYS_fadvise64: c_long = 223; pub const SYS_swapon: c_long = 224; pub const SYS_swapoff: c_long = 225; pub const SYS_mprotect: c_long = 226; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs index 8e890be51..27853cdbf 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs @@ -7,8 +7,6 @@ pub type wchar_t = c_int; pub type nlink_t = c_uint; pub type blksize_t = c_int; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; pub type stat64 = stat; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/mips64.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/mips64.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/mips64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/mips64.rs index 1fb8618c3..dc59d58be 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/mips64.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/mips64.rs @@ -2,8 +2,6 @@ use crate::off_t; use crate::prelude::*; pub type wchar_t = i32; -pub type __u64 = c_ulong; -pub type __s64 = c_long; pub type nlink_t = c_uint; pub type blksize_t = i64; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/powerpc64.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/powerpc64.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/powerpc64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/powerpc64.rs index 4885ea2f0..32c380789 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/powerpc64.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/powerpc64.rs @@ -2,8 +2,6 @@ use crate::off_t; use crate::prelude::*; pub type wchar_t = i32; -pub type __u64 = c_ulong; -pub type __s64 = c_long; pub type nlink_t = u64; pub type blksize_t = c_long; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs index bd395e49c..4baced6f1 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs @@ -7,8 +7,6 @@ pub type wchar_t = c_int; pub type nlink_t = c_uint; pub type blksize_t = c_int; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; pub type stat64 = stat; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/s390x.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/s390x.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/s390x.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/s390x.rs index 0ee6c11c6..3291acc7b 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/s390x.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/s390x.rs @@ -5,8 +5,6 @@ pub type blksize_t = i64; pub type nlink_t = u64; pub type wchar_t = i32; pub type greg_t = u64; -pub type __u64 = u64; -pub type __s64 = i64; pub type statfs64 = statfs; pub type stat64 = stat; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/wasm32/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/wasm32/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/wasm32/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/wasm32/mod.rs index 1a4d89632..7064a137a 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/wasm32/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/wasm32/mod.rs @@ -6,8 +6,6 @@ use crate::prelude::*; pub type wchar_t = i32; pub type nlink_t = u64; pub type blksize_t = c_long; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; pub type stat64 = stat; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/wasm32/wali.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/wasm32/wali.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/wasm32/wali.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/wasm32/wali.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs index 39daf548d..805457f16 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs @@ -4,8 +4,6 @@ use crate::prelude::*; pub type wchar_t = i32; pub type nlink_t = u64; pub type blksize_t = c_long; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; pub type greg_t = i64; pub type stat64 = stat; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/lfs64.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/lfs64.rs similarity index 88% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/lfs64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/lfs64.rs index 4d595fc42..c74fb8460 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/lfs64.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/lfs64.rs @@ -18,7 +18,7 @@ pub unsafe extern "C" fn fallocate64( #[inline] pub unsafe extern "C" fn fgetpos64(stream: *mut crate::FILE, pos: *mut crate::fpos64_t) -> c_int { - crate::fgetpos(stream, pos as *mut _) + crate::fgetpos(stream, pos.cast()) } #[inline] @@ -46,12 +46,12 @@ pub unsafe extern "C" fn fseeko64( #[inline] pub unsafe extern "C" fn fsetpos64(stream: *mut crate::FILE, pos: *const crate::fpos64_t) -> c_int { - crate::fsetpos(stream, pos as *mut _) + crate::fsetpos(stream, pos.cast()) } #[inline] pub unsafe extern "C" fn fstat64(fildes: c_int, buf: *mut crate::stat64) -> c_int { - crate::fstat(fildes, buf as *mut _) + crate::fstat(fildes, buf.cast()) } #[inline] @@ -61,17 +61,17 @@ pub unsafe extern "C" fn fstatat64( buf: *mut crate::stat64, flag: c_int, ) -> c_int { - crate::fstatat(fd, path, buf as *mut _, flag) + crate::fstatat(fd, path, buf.cast(), flag) } #[inline] pub unsafe extern "C" fn fstatfs64(fd: c_int, buf: *mut crate::statfs64) -> c_int { - crate::fstatfs(fd, buf as *mut _) + crate::fstatfs(fd, buf.cast()) } #[inline] pub unsafe extern "C" fn fstatvfs64(fd: c_int, buf: *mut crate::statvfs64) -> c_int { - crate::fstatvfs(fd, buf as *mut _) + crate::fstatvfs(fd, buf.cast()) } #[inline] @@ -86,7 +86,7 @@ pub unsafe extern "C" fn ftruncate64(fd: c_int, length: off64_t) -> c_int { #[inline] pub unsafe extern "C" fn getrlimit64(resource: c_int, rlim: *mut crate::rlimit64) -> c_int { - crate::getrlimit(resource, rlim as *mut _) + crate::getrlimit(resource, rlim.cast()) } #[inline] @@ -96,7 +96,7 @@ pub unsafe extern "C" fn lseek64(fd: c_int, offset: off64_t, whence: c_int) -> o #[inline] pub unsafe extern "C" fn lstat64(path: *const c_char, buf: *mut crate::stat64) -> c_int { - crate::lstat(path, buf as *mut _) + crate::lstat(path, buf.cast()) } #[inline] @@ -164,7 +164,7 @@ pub unsafe extern "C" fn prlimit64( new_limit: *const crate::rlimit64, old_limit: *mut crate::rlimit64, ) -> c_int { - crate::prlimit(pid, resource, new_limit as *mut _, old_limit as *mut _) + crate::prlimit(pid, resource, new_limit.cast(), old_limit.cast()) } #[inline] @@ -189,7 +189,7 @@ pub unsafe extern "C" fn pwritev64( #[inline] pub unsafe extern "C" fn readdir64(dirp: *mut crate::DIR) -> *mut crate::dirent64 { - crate::readdir(dirp) as *mut _ + crate::readdir(dirp).cast() } #[inline] @@ -198,7 +198,7 @@ pub unsafe extern "C" fn readdir64_r( entry: *mut crate::dirent64, result: *mut *mut crate::dirent64, ) -> c_int { - crate::readdir_r(dirp, entry as *mut _, result as *mut _) + crate::readdir_r(dirp, entry.cast(), result.cast()) } #[inline] @@ -213,22 +213,22 @@ pub unsafe extern "C" fn sendfile64( #[inline] pub unsafe extern "C" fn setrlimit64(resource: c_int, rlim: *const crate::rlimit64) -> c_int { - crate::setrlimit(resource, rlim as *mut _) + crate::setrlimit(resource, rlim.cast()) } #[inline] pub unsafe extern "C" fn stat64(pathname: *const c_char, statbuf: *mut crate::stat64) -> c_int { - crate::stat(pathname, statbuf as *mut _) + crate::stat(pathname, statbuf.cast()) } #[inline] pub unsafe extern "C" fn statfs64(pathname: *const c_char, buf: *mut crate::statfs64) -> c_int { - crate::statfs(pathname, buf as *mut _) + crate::statfs(pathname, buf.cast()) } #[inline] pub unsafe extern "C" fn statvfs64(path: *const c_char, buf: *mut crate::statvfs64) -> c_int { - crate::statvfs(path, buf as *mut _) + crate::statvfs(path, buf.cast()) } #[inline] diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/mod.rs similarity index 98% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/mod.rs index 9d3009cba..26a7248ac 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/musl/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/musl/mod.rs @@ -61,7 +61,7 @@ impl siginfo_t { _si_code: c_int, si_addr: *mut c_void, } - (*(self as *const siginfo_t as *const siginfo_sigfault)).si_addr + (*(self as *const siginfo_t).cast::()).si_addr } pub unsafe fn si_value(&self) -> crate::sigval { @@ -74,7 +74,7 @@ impl siginfo_t { _si_overrun: c_int, si_value: crate::sigval, } - (*(self as *const siginfo_t as *const siginfo_si_value)).si_value + (*(self as *const siginfo_t).cast::()).si_value } } @@ -105,7 +105,7 @@ s_no_extra_traits! { impl siginfo_t { unsafe fn sifields(&self) -> &sifields { - &(*(self as *const siginfo_t as *const siginfo_f)).sifields + &(*(self as *const siginfo_t).cast::()).sifields } pub unsafe fn si_pid(&self) -> crate::pid_t { @@ -507,8 +507,6 @@ pub const MAP_HUGE_1GB: c_int = 30 << MAP_HUGE_SHIFT; pub const MAP_HUGE_2GB: c_int = 31 << MAP_HUGE_SHIFT; pub const MAP_HUGE_16GB: c_int = 34 << MAP_HUGE_SHIFT; -pub const MS_RMT_MASK: c_ulong = 0x02800051; - // include/utmpx.h pub const EMPTY: c_short = 0; pub const RUN_LVL: c_short = 1; @@ -557,7 +555,7 @@ pub const F_WRLCK: c_int = 1; pub const F_UNLCK: c_int = 2; pub const SA_NODEFER: c_int = 0x40000000; -pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESETHAND: c_int = u32_cast_int(0x80000000); pub const SA_RESTART: c_int = 0x10000000; pub const SA_NOCLDSTOP: c_int = 0x00000001; @@ -795,6 +793,13 @@ extern "C" { flags: c_int, ) -> ssize_t; pub fn getauxval(type_: c_ulong) -> c_ulong; + pub fn renameat2( + olddirfd: c_int, + oldpath: *const c_char, + newdirfd: c_int, + newpath: *const c_char, + flags: c_uint, + ) -> c_int; // Added in `musl` 1.1.20 pub fn explicit_bzero(s: *mut c_void, len: size_t); diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/arm/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/arm/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/arm/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/arm/mod.rs index 26dd49b24..9d255b738 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/arm/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/arm/mod.rs @@ -2,7 +2,6 @@ use crate::off64_t; use crate::prelude::*; pub type wchar_t = c_uint; -pub type time_t = c_long; pub type clock_t = c_long; pub type fsblkcnt_t = c_ulong; @@ -10,7 +9,6 @@ pub type fsfilcnt_t = c_ulong; pub type ino_t = c_ulong; pub type off_t = c_long; pub type pthread_t = c_ulong; -pub type suseconds_t = c_long; pub type nlink_t = c_uint; pub type blksize_t = c_long; @@ -18,8 +16,6 @@ pub type blkcnt_t = c_long; pub type fsblkcnt64_t = u64; pub type fsfilcnt64_t = u64; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; s! { pub struct cmsghdr { diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs index 93ed7ab21..b6c8559e7 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs @@ -2,8 +2,6 @@ use crate::off64_t; use crate::prelude::*; pub type clock_t = i32; -pub type time_t = i32; -pub type suseconds_t = i32; pub type wchar_t = i32; pub type off_t = i32; pub type ino_t = u32; @@ -12,8 +10,6 @@ pub type blksize_t = i32; pub type nlink_t = u32; pub type fsblkcnt_t = c_ulong; pub type fsfilcnt_t = c_ulong; -pub type __u64 = c_ulonglong; -pub type __s64 = c_longlong; pub type fsblkcnt64_t = u64; pub type fsfilcnt64_t = u64; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs index 449518140..a6a63a33a 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs @@ -8,8 +8,6 @@ pub type fsfilcnt_t = c_ulong; pub type ino_t = u64; pub type nlink_t = u64; pub type off_t = i64; -pub type suseconds_t = i64; -pub type time_t = i64; pub type wchar_t = i32; s! { diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/mips/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/mips/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/mips/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/mips/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/mod.rs similarity index 77% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/mod.rs index f70e0c41a..6c3d8013f 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/mod.rs @@ -12,6 +12,17 @@ pub type rlim_t = c_ulong; pub type __rlimit_resource_t = c_ulong; pub type __priority_which_t = c_uint; +cfg_if! { + // Set `--cfg=libc_unstable_uclibc_time64` in RUSTFLAGS if your uClibc has 64-bit `time_t`. + if #[cfg(linux_time_bits64)] { + pub type time_t = i64; + pub type suseconds_t = i64; + } else { + pub type time_t = c_long; + pub type suseconds_t = c_long; + } +} + cfg_if! { if #[cfg(doc)] { // Used in `linux::arch` to define ioctl constants. @@ -87,37 +98,6 @@ s! { pub nr: crate::__s32, } - #[cfg_attr( - any( - target_pointer_width = "32", - target_arch = "x86_64", - target_arch = "powerpc64", - target_arch = "mips64", - target_arch = "s390x", - target_arch = "sparc64" - ), - repr(align(4)) - )] - #[cfg_attr( - not(any( - target_pointer_width = "32", - target_arch = "x86_64", - target_arch = "powerpc64", - target_arch = "mips64", - target_arch = "s390x", - target_arch = "sparc64" - )), - repr(align(8)) - )] - pub struct pthread_mutexattr_t { - size: [u8; crate::__SIZEOF_PTHREAD_MUTEXATTR_T], - } - - #[repr(align(4))] - pub struct pthread_condattr_t { - size: [u8; crate::__SIZEOF_PTHREAD_CONDATTR_T], - } - pub struct tcp_info { pub tcpi_state: u8, pub tcpi_ca_state: u8, @@ -164,7 +144,7 @@ impl siginfo_t { _si_code: c_int, si_addr: *mut c_void, } - (*(self as *const siginfo_t as *const siginfo_sigfault)).si_addr + (*(self as *const siginfo_t).cast::()).si_addr } pub unsafe fn si_value(&self) -> crate::sigval { @@ -177,7 +157,7 @@ impl siginfo_t { _si_overrun: c_int, si_value: crate::sigval, } - (*(self as *const siginfo_t as *const siginfo_si_value)).si_value + (*(self as *const siginfo_t).cast::()).si_value } } @@ -208,7 +188,7 @@ s_no_extra_traits! { impl siginfo_t { unsafe fn sifields(&self) -> &sifields { - &(*(self as *const siginfo_t as *const siginfo_f)).sifields + &(*(self as *const siginfo_t).cast::()).sifields } pub unsafe fn si_pid(&self) -> crate::pid_t { @@ -288,79 +268,17 @@ pub const LC_MESSAGES: c_int = 5; pub const LC_ALL: c_int = 6; // end different section -// MS_ flags for mount(2) -pub const MS_RMT_MASK: c_ulong = - crate::MS_RDONLY | crate::MS_SYNCHRONOUS | crate::MS_MANDLOCK | crate::MS_I_VERSION; - pub const ENOTSUP: c_int = EOPNOTSUPP; pub const IPV6_JOIN_GROUP: c_int = 20; pub const IPV6_LEAVE_GROUP: c_int = 21; -// These are different from GNU -pub const ABDAY_1: crate::nl_item = 0x300; -pub const ABDAY_2: crate::nl_item = 0x301; -pub const ABDAY_3: crate::nl_item = 0x302; -pub const ABDAY_4: crate::nl_item = 0x303; -pub const ABDAY_5: crate::nl_item = 0x304; -pub const ABDAY_6: crate::nl_item = 0x305; -pub const ABDAY_7: crate::nl_item = 0x306; -pub const DAY_1: crate::nl_item = 0x307; -pub const DAY_2: crate::nl_item = 0x308; -pub const DAY_3: crate::nl_item = 0x309; -pub const DAY_4: crate::nl_item = 0x30A; -pub const DAY_5: crate::nl_item = 0x30B; -pub const DAY_6: crate::nl_item = 0x30C; -pub const DAY_7: crate::nl_item = 0x30D; -pub const ABMON_1: crate::nl_item = 0x30E; -pub const ABMON_2: crate::nl_item = 0x30F; -pub const ABMON_3: crate::nl_item = 0x310; -pub const ABMON_4: crate::nl_item = 0x311; -pub const ABMON_5: crate::nl_item = 0x312; -pub const ABMON_6: crate::nl_item = 0x313; -pub const ABMON_7: crate::nl_item = 0x314; -pub const ABMON_8: crate::nl_item = 0x315; -pub const ABMON_9: crate::nl_item = 0x316; -pub const ABMON_10: crate::nl_item = 0x317; -pub const ABMON_11: crate::nl_item = 0x318; -pub const ABMON_12: crate::nl_item = 0x319; -pub const MON_1: crate::nl_item = 0x31A; -pub const MON_2: crate::nl_item = 0x31B; -pub const MON_3: crate::nl_item = 0x31C; -pub const MON_4: crate::nl_item = 0x31D; -pub const MON_5: crate::nl_item = 0x31E; -pub const MON_6: crate::nl_item = 0x31F; -pub const MON_7: crate::nl_item = 0x320; -pub const MON_8: crate::nl_item = 0x321; -pub const MON_9: crate::nl_item = 0x322; -pub const MON_10: crate::nl_item = 0x323; -pub const MON_11: crate::nl_item = 0x324; -pub const MON_12: crate::nl_item = 0x325; -pub const AM_STR: crate::nl_item = 0x326; -pub const PM_STR: crate::nl_item = 0x327; -pub const D_T_FMT: crate::nl_item = 0x328; -pub const D_FMT: crate::nl_item = 0x329; -pub const T_FMT: crate::nl_item = 0x32A; -pub const T_FMT_AMPM: crate::nl_item = 0x32B; -pub const ERA: crate::nl_item = 0x32C; -pub const ERA_D_FMT: crate::nl_item = 0x32E; -pub const ALT_DIGITS: crate::nl_item = 0x32F; -pub const ERA_D_T_FMT: crate::nl_item = 0x330; -pub const ERA_T_FMT: crate::nl_item = 0x331; -pub const CODESET: crate::nl_item = 10; -pub const CRNCYSTR: crate::nl_item = 0x215; -pub const RADIXCHAR: crate::nl_item = 0x100; -pub const THOUSEP: crate::nl_item = 0x101; -pub const NOEXPR: crate::nl_item = 0x501; -pub const YESSTR: crate::nl_item = 0x502; -pub const NOSTR: crate::nl_item = 0x503; - // Different than Gnu. pub const FILENAME_MAX: c_uint = 4095; -pub const PRIO_PROCESS: c_int = 0; -pub const PRIO_PGRP: c_int = 1; -pub const PRIO_USER: c_int = 2; +pub const PRIO_PROCESS: crate::__priority_which_t = 0; +pub const PRIO_PGRP: crate::__priority_which_t = 1; +pub const PRIO_USER: crate::__priority_which_t = 2; pub const SOMAXCONN: c_int = 128; @@ -418,7 +336,6 @@ pub const SOCK_PACKET: c_int = 10; pub const TCP_COOKIE_TRANSACTIONS: c_int = 15; pub const UDP_GRO: c_int = 104; pub const UDP_SEGMENT: c_int = 103; -pub const YESEXPR: c_int = ((5) << 8) | (0); extern "C" { pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/x86_64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/x86_64/mod.rs similarity index 98% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/x86_64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/x86_64/mod.rs index 30e677238..46f3439cc 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux/uclibc/x86_64/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux/uclibc/x86_64/mod.rs @@ -14,15 +14,11 @@ pub type nlink_t = c_uint; pub type off_t = c_long; // [uClibc docs] Note stat64 has the same shape as stat for x86-64. pub type stat64 = stat; -pub type suseconds_t = c_long; -pub type time_t = c_int; pub type wchar_t = c_int; pub type pthread_t = c_ulong; pub type fsblkcnt64_t = u64; pub type fsfilcnt64_t = u64; -pub type __u64 = c_ulong; -pub type __s64 = c_long; s! { pub struct ipc_perm { diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux_l4re_shared.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux_l4re_shared.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux_l4re_shared.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux_l4re_shared.rs index cf76b3966..067426918 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/linux_l4re_shared.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/linux_l4re_shared.rs @@ -32,14 +32,6 @@ cfg_if! { pub type iconv_t = *mut c_void; -cfg_if! { - if #[cfg(not(target_env = "gnu"))] { - extern_ty! { - pub enum fpos64_t {} // FIXME(linux): fill this out with a struct - } - } -} - s! { pub struct glob_t { pub gl_pathc: size_t, @@ -85,13 +77,6 @@ s! { __val: [c_int; 2], } - pub struct packet_mreq { - pub mr_ifindex: c_int, - pub mr_type: c_ushort, - pub mr_alen: c_ushort, - pub mr_address: [c_uchar; 8], - } - pub struct cpu_set_t { #[cfg(all(target_pointer_width = "32", not(target_arch = "x86_64")))] bits: [u32; 32], @@ -690,6 +675,9 @@ pub const EI_CLASS: usize = 4; pub const ELFCLASSNONE: u8 = 0; pub const ELFCLASS32: u8 = 1; pub const ELFCLASS64: u8 = 2; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const ELFCLASSNUM: usize = 3; pub const EI_DATA: usize = 5; @@ -809,7 +797,6 @@ pub const EM_PJ: u16 = 91; pub const EM_OPENRISC: u16 = 92; #[cfg(target_env = "uclibc")] pub const EM_OR1K: u16 = 92; -#[cfg(not(target_env = "uclibc"))] pub const EM_ARC_A5: u16 = 93; pub const EM_XTENSA: u16 = 94; pub const EM_AARCH64: u16 = 183; @@ -821,6 +808,9 @@ pub const EM_ALPHA: u16 = 0x9026; // elf.h - Legal values for e_version (version). pub const EV_NONE: u32 = 0; pub const EV_CURRENT: u32 = 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const EV_NUM: u32 = 2; // elf.h - Legal values for p_type (segment type). @@ -939,21 +929,18 @@ pub const PTHREAD_MUTEX_NORMAL: c_int = 0; pub const PTHREAD_MUTEX_RECURSIVE: c_int = 1; pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 2; pub const PTHREAD_MUTEX_DEFAULT: c_int = PTHREAD_MUTEX_NORMAL; -#[cfg(not(target_env = "uclibc"))] +#[cfg(not(target_os = "l4re"))] pub const PTHREAD_MUTEX_STALLED: c_int = 0; -#[cfg(not(target_env = "uclibc"))] +#[cfg(not(target_os = "l4re"))] pub const PTHREAD_MUTEX_ROBUST: c_int = 1; -#[cfg(not(target_env = "uclibc"))] pub const PTHREAD_PRIO_NONE: c_int = 0; -#[cfg(not(target_env = "uclibc"))] pub const PTHREAD_PRIO_INHERIT: c_int = 1; -#[cfg(not(target_env = "uclibc"))] pub const PTHREAD_PRIO_PROTECT: c_int = 2; pub const PTHREAD_PROCESS_PRIVATE: c_int = 0; pub const PTHREAD_PROCESS_SHARED: c_int = 1; pub const PTHREAD_INHERIT_SCHED: c_int = 0; pub const PTHREAD_EXPLICIT_SCHED: c_int = 1; -#[cfg(not(all(target_os = "l4re", target_env = "uclibc")))] +#[cfg(not(target_os = "l4re"))] pub const __SIZEOF_PTHREAD_COND_T: usize = 48; // netinet/in.h @@ -1140,7 +1127,7 @@ pub const PR_SET_MM_MAP: c_int = 14; pub const PR_SET_MM_MAP_SIZE: c_int = 15; pub const PR_SET_PTRACER: c_int = 0x59616d61; -pub const PR_SET_PTRACER_ANY: c_ulong = 0xffffffffffffffff; +pub const PR_SET_PTRACER_ANY: c_ulong = (-1 as c_long) as c_ulong; pub const PR_SET_CHILD_SUBREAPER: c_int = 36; pub const PR_GET_CHILD_SUBREAPER: c_int = 37; @@ -1175,7 +1162,11 @@ pub const PR_SCHED_CORE_GET: c_int = 0; pub const PR_SCHED_CORE_CREATE: c_int = 1; pub const PR_SCHED_CORE_SHARE_TO: c_int = 2; pub const PR_SCHED_CORE_SHARE_FROM: c_int = 3; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PR_SCHED_CORE_MAX: c_int = 4; + pub const PR_SCHED_CORE_SCOPE_THREAD: c_int = 0; pub const PR_SCHED_CORE_SCOPE_THREAD_GROUP: c_int = 1; pub const PR_SCHED_CORE_SCOPE_PROCESS_GROUP: c_int = 2; @@ -1193,11 +1184,11 @@ pub const IUTF8: crate::tcflag_t = 0x00004000; #[cfg(not(all(target_env = "uclibc", target_arch = "mips")))] pub const CMSPAR: crate::tcflag_t = 0o10000000000; -pub const MFD_CLOEXEC: c_uint = 0x0001; -pub const MFD_ALLOW_SEALING: c_uint = 0x0002; -pub const MFD_HUGETLB: c_uint = 0x0004; cfg_if! { - if #[cfg(not(target_env = "uclibc"))] { + if #[cfg(not(target_os = "l4re"))] { + pub const MFD_CLOEXEC: c_uint = 0x0001; + pub const MFD_ALLOW_SEALING: c_uint = 0x0002; + pub const MFD_HUGETLB: c_uint = 0x0004; pub const MFD_NOEXEC_SEAL: c_uint = 0x0008; pub const MFD_EXEC: c_uint = 0x0010; pub const MFD_HUGE_64KB: c_uint = 0x40000000; @@ -1217,43 +1208,6 @@ cfg_if! { } } -// linux/if_packet.h -pub const PACKET_HOST: c_uchar = 0; -pub const PACKET_BROADCAST: c_uchar = 1; -pub const PACKET_MULTICAST: c_uchar = 2; -pub const PACKET_OTHERHOST: c_uchar = 3; -pub const PACKET_OUTGOING: c_uchar = 4; -pub const PACKET_LOOPBACK: c_uchar = 5; -#[cfg(not(target_os = "l4re"))] -pub const PACKET_USER: c_uchar = 6; -#[cfg(not(target_os = "l4re"))] -pub const PACKET_KERNEL: c_uchar = 7; - -pub const PACKET_ADD_MEMBERSHIP: c_int = 1; -pub const PACKET_DROP_MEMBERSHIP: c_int = 2; -pub const PACKET_RECV_OUTPUT: c_int = 3; -pub const PACKET_RX_RING: c_int = 5; -pub const PACKET_STATISTICS: c_int = 6; -cfg_if! { - if #[cfg(not(target_os = "l4re"))] { - pub const PACKET_COPY_THRESH: c_int = 7; - pub const PACKET_AUXDATA: c_int = 8; - pub const PACKET_ORIGDEV: c_int = 9; - pub const PACKET_VERSION: c_int = 10; - pub const PACKET_HDRLEN: c_int = 11; - pub const PACKET_RESERVE: c_int = 12; - pub const PACKET_TX_RING: c_int = 13; - pub const PACKET_LOSS: c_int = 14; - pub const PACKET_VNET_HDR: c_int = 15; - pub const PACKET_TX_TIMESTAMP: c_int = 16; - pub const PACKET_TIMESTAMP: c_int = 17; - } -} - -pub const PACKET_MR_MULTICAST: c_int = 0; -pub const PACKET_MR_PROMISC: c_int = 1; -pub const PACKET_MR_ALLMULTI: c_int = 2; - pub const SIOCADDRT: c_ulong = 0x0000890B; pub const SIOCDELRT: c_ulong = 0x0000890C; pub const SIOCGIFNAME: c_ulong = 0x00008910; @@ -1365,6 +1319,9 @@ pub const RT_CLASS_UNSPEC: u8 = 0; pub const RT_CLASS_DEFAULT: u8 = 253; pub const RT_CLASS_MAIN: u8 = 254; pub const RT_CLASS_LOCAL: u8 = 255; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const RT_CLASS_MAX: u8 = 255; pub const MAX_ADDR_LEN: usize = 7; @@ -1477,15 +1434,16 @@ pub const NT_LWPSTATUS: c_int = 16; pub const NT_LWPSINFO: c_int = 17; pub const NT_PRFPXREG: c_int = 20; -pub const MS_NOUSER: c_ulong = 0xffffffff80000000; +// FIXME(1.0): C uses an unsigned int here. +pub const MS_NOUSER: c_ulong = 1 << 31; f! { - pub fn CMSG_NXTHDR( + pub unsafe fn CMSG_NXTHDR( mhdr: *const crate::msghdr, cmsg: *const crate::cmsghdr, ) -> *mut crate::cmsghdr { if ((*cmsg).cmsg_len as usize) < size_of::() { - return core::ptr::null_mut::(); + return ptr::null_mut(); } // FIXME(msrv): `.wrapping_byte_add()` stabilized in 1.75 @@ -1497,7 +1455,7 @@ f! { // In case the addition wrapped. `next_addr > max_addr` // would otherwise not work as intended. if (next_cmsg as usize) < (cmsg as usize) { - return core::ptr::null_mut(); + return ptr::null_mut(); } let mut max_addr = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; @@ -1510,43 +1468,41 @@ f! { } if next_cmsg as usize + size_of::() > max_addr { - core::ptr::null_mut::() + ptr::null_mut() } else { next_cmsg as *mut crate::cmsghdr } } - pub fn CPU_ALLOC_SIZE(count: c_int) -> size_t { + pub unsafe fn CPU_ALLOC_SIZE(count: c_int) -> size_t { let _dummy: cpu_set_t = mem::zeroed(); let size_in_bits = 8 * size_of_val(&_dummy.bits[0]); ((count as size_t + size_in_bits - 1) / 8) as size_t } - pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { - for slot in &mut cpuset.bits { - *slot = 0; - } + pub unsafe fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { + cpuset.bits.fill(0); } - pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { + pub unsafe fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] |= 1 << offset; } - pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { + pub unsafe fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] &= !(1 << offset); } - pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { + pub unsafe fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { let size_in_bits = 8 * size_of_val(&cpuset.bits[0]); let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); 0 != (cpuset.bits[idx] & (1 << offset)) } - pub fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> c_int { + pub unsafe fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> c_int { let mut s: u32 = 0; let size_of_mask = size_of_val(&cpuset.bits[0]); for i in &cpuset.bits[..(size / size_of_mask)] { @@ -1555,61 +1511,61 @@ f! { s as c_int } - pub fn CPU_COUNT(cpuset: &cpu_set_t) -> c_int { + pub unsafe fn CPU_COUNT(cpuset: &cpu_set_t) -> c_int { CPU_COUNT_S(size_of::(), cpuset) } - pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { + pub unsafe fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { set1.bits == set2.bits } - pub fn IPTOS_TOS(tos: u8) -> u8 { + pub unsafe fn IPTOS_TOS(tos: u8) -> u8 { tos & IPTOS_TOS_MASK } - pub fn IPTOS_PREC(tos: u8) -> u8 { + pub unsafe fn IPTOS_PREC(tos: u8) -> u8 { tos & IPTOS_PREC_MASK } - pub fn RT_TOS(tos: u8) -> u8 { + pub unsafe fn RT_TOS(tos: u8) -> u8 { tos & crate::IPTOS_TOS_MASK } - pub fn RT_ADDRCLASS(flags: u32) -> u32 { + pub unsafe fn RT_ADDRCLASS(flags: u32) -> u32 { flags >> 23 } - pub fn RT_LOCALADDR(flags: u32) -> bool { + pub unsafe fn RT_LOCALADDR(flags: u32) -> bool { (flags & RTF_ADDRCLASSMASK) == (RTF_LOCAL | RTF_INTERFACE) } - pub fn ELF32_R_SYM(val: Elf32_Word) -> Elf32_Word { + pub unsafe fn ELF32_R_SYM(val: Elf32_Word) -> Elf32_Word { val >> 8 } - pub fn ELF32_R_TYPE(val: Elf32_Word) -> Elf32_Word { + pub unsafe fn ELF32_R_TYPE(val: Elf32_Word) -> Elf32_Word { val & 0xff } - pub fn ELF32_R_INFO(sym: Elf32_Word, t: Elf32_Word) -> Elf32_Word { + pub unsafe fn ELF32_R_INFO(sym: Elf32_Word, t: Elf32_Word) -> Elf32_Word { sym << (8 + t) & 0xff } - pub fn ELF64_R_SYM(val: Elf64_Xword) -> Elf64_Xword { + pub unsafe fn ELF64_R_SYM(val: Elf64_Xword) -> Elf64_Xword { val >> 32 } - pub fn ELF64_R_TYPE(val: Elf64_Xword) -> Elf64_Xword { + pub unsafe fn ELF64_R_TYPE(val: Elf64_Xword) -> Elf64_Xword { val & 0xffffffff } - pub fn ELF64_R_INFO(sym: Elf64_Xword, t: Elf64_Xword) -> Elf64_Xword { + pub unsafe fn ELF64_R_INFO(sym: Elf64_Xword, t: Elf64_Xword) -> Elf64_Xword { sym << (32 + t) } } safe_f! { - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { let major = major as crate::dev_t; let minor = minor as crate::dev_t; let mut dev = 0; @@ -1620,14 +1576,14 @@ safe_f! { dev } - pub const fn major(dev: crate::dev_t) -> c_uint { + pub const safe fn major(dev: crate::dev_t) -> c_uint { let mut major = 0; major |= (dev & 0x00000000000fff00) >> 8; major |= (dev & 0xfffff00000000000) >> 32; major as c_uint } - pub const fn minor(dev: crate::dev_t) -> c_uint { + pub const safe fn minor(dev: crate::dev_t) -> c_uint { let mut minor = 0; minor |= (dev & 0x00000000000000ff) >> 0; minor |= (dev & 0x00000ffffff00000) >> 12; @@ -1775,15 +1731,6 @@ extern "C" { pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; pub fn __errno_location() -> *mut c_int; - // Not available now on Android - pub fn mremap( - addr: *mut c_void, - len: size_t, - new_len: size_t, - flags: c_int, - ... - ) -> *mut c_void; - #[cfg_attr(gnu_time_bits64, link_name = "__glob64_time64")] #[cfg_attr( all(not(gnu_time_bits64), gnu_file_offset_bits64), diff --git a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/mod.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/linux_like/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/linux_like/mod.rs index 59e16a0f3..9081f8472 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/linux_like/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/linux_like/mod.rs @@ -10,7 +10,7 @@ pub type key_t = c_int; pub type id_t = c_uint; extern_ty! { - pub enum timezone {} + pub type timezone; } s! { @@ -240,10 +240,10 @@ cfg_if! { // linux/filter.h pub struct sock_filter { - pub code: __u16, - pub jt: __u8, - pub jf: __u8, - pub k: __u32, + pub code: crate::__u16, + pub jt: crate::__u8, + pub jf: crate::__u8, + pub k: crate::__u32, } pub struct sock_fprog { @@ -285,6 +285,25 @@ cfg_if! { pub stx_mnt_id: crate::__u64, pub stx_dio_mem_align: crate::__u32, pub stx_dio_offset_align: crate::__u32, + // The following fields are not available on Android as of + // 2026-06. + #[cfg(target_os = "linux")] + pub stx_subvol: crate::__u64, + #[cfg(target_os = "linux")] + pub stx_atomic_write_unit_min: crate::__u32, + #[cfg(target_os = "linux")] + pub stx_atomic_write_unit_max: crate::__u32, + #[cfg(target_os = "linux")] + pub stx_atomic_write_segments_max: crate::__u32, + #[cfg(target_os = "linux")] + pub stx_dio_read_offset_align: crate::__u32, + #[cfg(target_os = "linux")] + pub stx_atomic_write_unit_max_opt: crate::__u32, + #[cfg(target_os = "linux")] + __statx_pad2: Padding<[crate::__u32; 1]>, + #[cfg(target_os = "linux")] + __statx_pad3: Padding<[crate::__u64; 8]>, + #[cfg(not(target_os = "linux"))] __statx_pad3: Padding<[crate::__u64; 12]>, } @@ -545,6 +564,7 @@ pub const MS_NODIRATIME: c_ulong = 0x0800; pub const MS_BIND: c_ulong = 0x1000; pub const MS_MOVE: c_ulong = 0x2000; pub const MS_REC: c_ulong = 0x4000; +// MS_VERBOSE is deprecated pub const MS_SILENT: c_ulong = 0x8000; pub const MS_POSIXACL: c_ulong = 0x010000; pub const MS_UNBINDABLE: c_ulong = 0x020000; @@ -760,11 +780,11 @@ pub const IP_TRANSPARENT: c_int = 19; pub const IP_ORIGDSTADDR: c_int = 20; pub const IP_RECVORIGDSTADDR: c_int = IP_ORIGDSTADDR; pub const IP_MINTTL: c_int = 21; -#[cfg(not(target_env = "uclibc"))] +#[cfg(not(target_os = "l4re"))] pub const IP_NODEFRAG: c_int = 22; -#[cfg(not(target_env = "uclibc"))] +#[cfg(not(target_os = "l4re"))] pub const IP_CHECKSUM: c_int = 23; -#[cfg(not(target_env = "uclibc"))] +#[cfg(not(target_os = "l4re"))] pub const IP_BIND_ADDRESS_NO_PORT: c_int = 24; pub const IP_MULTICAST_IF: c_int = 32; pub const IP_MULTICAST_TTL: c_int = 33; @@ -786,9 +806,9 @@ pub const IP_PMTUDISC_DONT: c_int = 0; pub const IP_PMTUDISC_WANT: c_int = 1; pub const IP_PMTUDISC_DO: c_int = 2; pub const IP_PMTUDISC_PROBE: c_int = 3; -#[cfg(not(target_env = "uclibc"))] +#[cfg(not(target_os = "l4re"))] pub const IP_PMTUDISC_INTERFACE: c_int = 4; -#[cfg(not(target_env = "uclibc"))] +#[cfg(not(target_os = "l4re"))] pub const IP_PMTUDISC_OMIT: c_int = 5; // IPPROTO_IP defined in src/unix/mod.rs @@ -898,16 +918,16 @@ pub const IPV6_RECVRTHDR: c_int = 56; pub const IPV6_RTHDR: c_int = 57; pub const IPV6_RECVDSTOPTS: c_int = 58; pub const IPV6_DSTOPTS: c_int = 59; -#[cfg(not(target_env = "uclibc"))] +#[cfg(not(target_os = "l4re"))] pub const IPV6_RECVPATHMTU: c_int = 60; -#[cfg(not(target_env = "uclibc"))] +#[cfg(not(target_os = "l4re"))] pub const IPV6_PATHMTU: c_int = 61; -#[cfg(not(target_env = "uclibc"))] +#[cfg(not(target_os = "l4re"))] pub const IPV6_DONTFRAG: c_int = 62; pub const IPV6_RECVTCLASS: c_int = 66; pub const IPV6_TCLASS: c_int = 67; cfg_if! { - if #[cfg(not(target_env = "uclibc"))] { + if #[cfg(not(target_os = "l4re"))] { pub const IPV6_AUTOFLOWLABEL: c_int = 70; pub const IPV6_ADDR_PREFERENCES: c_int = 72; pub const IPV6_MINHOPCOUNT: c_int = 73; @@ -1001,7 +1021,12 @@ pub const LOCK_UN: c_int = 8; pub const SS_ONSTACK: c_int = 1; pub const SS_DISABLE: c_int = 2; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const NAME_MAX: c_int = 255; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PATH_MAX: c_int = 4096; pub const UIO_MAXIOV: c_int = 1024; @@ -1022,7 +1047,7 @@ pub const EPOLLRDHUP: c_int = 0x2000; pub const EPOLLEXCLUSIVE: c_int = 0x10000000; pub const EPOLLWAKEUP: c_int = 0x20000000; pub const EPOLLONESHOT: c_int = 0x40000000; -pub const EPOLLET: c_int = 0x80000000; +pub const EPOLLET: c_int = u32_cast_int(0x80000000); pub const EPOLL_CTL_ADD: c_int = 1; pub const EPOLL_CTL_MOD: c_int = 3; @@ -1120,7 +1145,7 @@ pub const CLONE_NEWIPC: c_int = 0x08000000; pub const CLONE_NEWUSER: c_int = 0x10000000; pub const CLONE_NEWPID: c_int = 0x20000000; pub const CLONE_NEWNET: c_int = 0x40000000; -pub const CLONE_IO: c_int = 0x80000000; +pub const CLONE_IO: c_int = u32_cast_int(0x80000000); pub const WNOHANG: c_int = 0x00000001; pub const WUNTRACED: c_int = 0x00000002; @@ -1168,10 +1193,10 @@ cfg_if! { pub const __WNOTHREAD: c_int = 0x20000000; pub const __WALL: c_int = 0x40000000; -pub const __WCLONE: c_int = 0x80000000; +pub const __WCLONE: c_int = u32_cast_int(0x80000000); cfg_if! { - if #[cfg(not(target_env = "uclibc"))] { + if #[cfg(not(target_os = "l4re"))] { pub const SPLICE_F_MOVE: c_uint = 0x01; pub const SPLICE_F_NONBLOCK: c_uint = 0x02; pub const SPLICE_F_MORE: c_uint = 0x04; @@ -1502,8 +1527,8 @@ cfg_if! { pub const AFFS_SUPER_MAGIC: c_long = 0x0000adff; pub const AFS_SUPER_MAGIC: c_long = 0x5346414f; pub const AUTOFS_SUPER_MAGIC: c_long = 0x0187; - pub const BPF_FS_MAGIC: c_long = 0xcafe4a11; - pub const BTRFS_SUPER_MAGIC: c_long = 0x9123683e; + pub const BPF_FS_MAGIC: c_long = u32_cast_long(0xcafe4a11); + pub const BTRFS_SUPER_MAGIC: c_long = u32_cast_long(0x9123683e); pub const CGROUP2_SUPER_MAGIC: c_long = 0x63677270; pub const CGROUP_SUPER_MAGIC: c_long = 0x27e0eb; pub const CODA_SUPER_MAGIC: c_long = 0x73757245; @@ -1515,12 +1540,12 @@ cfg_if! { pub const EXT2_SUPER_MAGIC: c_long = 0x0000ef53; pub const EXT3_SUPER_MAGIC: c_long = 0x0000ef53; pub const EXT4_SUPER_MAGIC: c_long = 0x0000ef53; - pub const F2FS_SUPER_MAGIC: c_long = 0xf2f52010; + pub const F2FS_SUPER_MAGIC: c_long = u32_cast_long(0xf2f52010); pub const FUSE_SUPER_MAGIC: c_long = 0x65735546; pub const FUTEXFS_SUPER_MAGIC: c_long = 0xbad1dea; pub const HOSTFS_SUPER_MAGIC: c_long = 0x00c0ffee; - pub const HPFS_SUPER_MAGIC: c_long = 0xf995e849; - pub const HUGETLBFS_MAGIC: c_long = 0x958458f6; + pub const HPFS_SUPER_MAGIC: c_long = u32_cast_long(0xf995e849); + pub const HUGETLBFS_MAGIC: c_long = u32_cast_long(0x958458f6); pub const ISOFS_SUPER_MAGIC: c_long = 0x00009660; pub const JFFS2_SUPER_MAGIC: c_long = 0x000072b6; pub const MINIX2_SUPER_MAGIC2: c_long = 0x00002478; @@ -1541,7 +1566,7 @@ cfg_if! { pub const RDTGROUP_SUPER_MAGIC: c_long = 0x7655821; pub const REISERFS_SUPER_MAGIC: c_long = 0x52654973; pub const SECURITYFS_MAGIC: c_long = 0x73636673; - pub const SELINUX_MAGIC: c_long = 0xf97cff8c; + pub const SELINUX_MAGIC: c_long = u32_cast_long(0xf97cff8c); pub const SMACK_MAGIC: c_long = 0x43415d53; pub const SMB_SUPER_MAGIC: c_long = 0x0000517b; pub const SYSFS_MAGIC: c_long = 0x62656572; @@ -1549,7 +1574,7 @@ cfg_if! { pub const TRACEFS_MAGIC: c_long = 0x74726163; pub const UDF_SUPER_MAGIC: c_long = 0x15013346; pub const USBDEVICE_SUPER_MAGIC: c_long = 0x00009fa2; - pub const XENFS_SUPER_MAGIC: c_long = 0xabba1974; + pub const XENFS_SUPER_MAGIC: c_long = u32_cast_long(0xabba1974); pub const NSFS_MAGIC: c_long = 0x6e736673; } else if #[cfg(target_arch = "s390x")] { pub const ADFS_SUPER_MAGIC: c_uint = 0x0000adf5; @@ -1635,7 +1660,7 @@ cfg_if! { pub const STATX_ALL: c_uint = 0x0fff; pub const STATX_MNT_ID: c_uint = 0x1000; pub const STATX_DIOALIGN: c_uint = 0x2000; - pub const STATX__RESERVED: c_int = 0x80000000; + pub const STATX__RESERVED: c_int = u32_cast_int(0x80000000); pub const STATX_ATTR_COMPRESSED: c_int = 0x0004; pub const STATX_ATTR_IMMUTABLE: c_int = 0x0010; pub const STATX_ATTR_APPEND: c_int = 0x0020; @@ -1738,124 +1763,122 @@ const fn CMSG_ALIGN(len: usize) -> usize { } f! { - pub fn CMSG_FIRSTHDR(mhdr: *const crate::msghdr) -> *mut crate::cmsghdr { + pub unsafe fn CMSG_FIRSTHDR(mhdr: *const crate::msghdr) -> *mut crate::cmsghdr { if (*mhdr).msg_controllen as usize >= size_of::() { - (*mhdr).msg_control.cast::() + (*mhdr).msg_control.cast() } else { - core::ptr::null_mut::() + ptr::null_mut() } } - pub fn CMSG_DATA(cmsg: *const crate::cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const crate::cmsghdr) -> *mut c_uchar { cmsg.offset(1) as *mut c_uchar } - pub const fn CMSG_SPACE(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(length: c_uint) -> c_uint { (CMSG_ALIGN(length as usize) + CMSG_ALIGN(size_of::())) as c_uint } - pub const fn CMSG_LEN(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(length: c_uint) -> c_uint { CMSG_ALIGN(size_of::()) as c_uint + length } - pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] &= !(1 << (fd % size)); return; } - pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0; } - pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] |= 1 << (fd % size); return; } - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in &mut (*set).fds_bits { - *slot = 0; - } + pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { + (*set).fds_bits.fill(0); } } safe_f! { - pub fn SIGRTMAX() -> c_int { + pub safe fn SIGRTMAX() -> c_int { unsafe { __libc_current_sigrtmax() } } - pub fn SIGRTMIN() -> c_int { + pub safe fn SIGRTMIN() -> c_int { unsafe { __libc_current_sigrtmin() } } - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0x7f } - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { (status >> 8) & 0xff } - pub const fn WIFCONTINUED(status: c_int) -> bool { + pub const safe fn WIFCONTINUED(status: c_int) -> bool { status == 0xffff } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { ((status & 0x7f) + 1) as i8 >= 2 } - pub const fn WTERMSIG(status: c_int) -> c_int { + pub const safe fn WTERMSIG(status: c_int) -> c_int { status & 0x7f } - pub const fn WIFEXITED(status: c_int) -> bool { + pub const safe fn WIFEXITED(status: c_int) -> bool { (status & 0x7f) == 0 } - pub const fn WEXITSTATUS(status: c_int) -> c_int { + pub const safe fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xff } - pub const fn WCOREDUMP(status: c_int) -> bool { + pub const safe fn WCOREDUMP(status: c_int) -> bool { (status & 0x80) != 0 } - pub const fn W_EXITCODE(ret: c_int, sig: c_int) -> c_int { + pub const safe fn W_EXITCODE(ret: c_int, sig: c_int) -> c_int { (ret << 8) | sig } - pub const fn W_STOPCODE(sig: c_int) -> c_int { + pub const safe fn W_STOPCODE(sig: c_int) -> c_int { (sig << 8) | 0x7f } - pub const fn QCMD(cmd: c_int, type_: c_int) -> c_int { + pub const safe fn QCMD(cmd: c_int, type_: c_int) -> c_int { (cmd << 8) | (type_ & 0x00ff) } - pub const fn IPOPT_COPIED(o: u8) -> u8 { + pub const safe fn IPOPT_COPIED(o: u8) -> u8 { o & IPOPT_COPY } - pub const fn IPOPT_CLASS(o: u8) -> u8 { + pub const safe fn IPOPT_CLASS(o: u8) -> u8 { o & IPOPT_CLASS_MASK } - pub const fn IPOPT_NUMBER(o: u8) -> u8 { + pub const safe fn IPOPT_NUMBER(o: u8) -> u8 { o & IPOPT_NUMBER_MASK } - pub const fn IPTOS_ECN(x: u8) -> u8 { + pub const safe fn IPTOS_ECN(x: u8) -> u8 { x & crate::IPTOS_ECN_MASK } #[allow(ellipsis_inclusive_range_patterns)] - pub const fn KERNEL_VERSION(a: u32, b: u32, c: u32) -> u32 { + pub const safe fn KERNEL_VERSION(a: u32, b: u32, c: u32) -> u32 { ((a << 16) + (b << 8)) + if c > 255 { 255 } else { c } } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/mod.rs similarity index 97% rename from thirdparty/crates/libc-0.2.186/src/unix/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/mod.rs index 207c36b82..6c64020d4 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/mod.rs @@ -14,6 +14,7 @@ pub type intptr_t = isize; pub type uintptr_t = usize; pub type ssize_t = isize; +#[cfg(not(target_os = "nuttx"))] pub type pid_t = i32; pub type in_addr_t = u32; pub type in_port_t = u16; @@ -28,7 +29,7 @@ cfg_if! { ))] { pub type uid_t = c_ushort; pub type gid_t = c_ushort; - } else if #[cfg(target_os = "nto")] { + } else if #[cfg(any(target_os = "nto", target_os = "qnx"))] { pub type uid_t = i32; pub type gid_t = i32; } else { @@ -38,9 +39,13 @@ cfg_if! { } extern_ty! { - pub enum DIR {} + pub type DIR; } +// Deprecated impls: see #5296 +unsafe impl Send for DIR {} +unsafe impl Sync for DIR {} + #[cfg(not(target_os = "nuttx"))] pub type locale_t = *mut c_void; @@ -235,7 +240,7 @@ pub const SIG_ERR: sighandler_t = !0 as sighandler_t; cfg_if! { if #[cfg(all( - not(target_os = "nto"), + not(any(target_os = "nto", target_os = "qnx")), not(target_os = "aix"), not(target_os = "espidf") ))] { @@ -256,7 +261,11 @@ cfg_if! { } cfg_if! { - if #[cfg(not(any(target_os = "nto", target_os = "l4re")))] { + if #[cfg(not(any( + target_os = "nto", + target_os = "qnx", + target_os = "l4re" + )))] { pub const USRQUOTA: c_int = 0; pub const GRPQUOTA: c_int = 1; } @@ -319,7 +328,7 @@ pub const LOG_PRIMASK: c_int = 7; pub const LOG_FACMASK: c_int = 0x3f8; cfg_if! { - if #[cfg(not(target_os = "nto"))] { + if #[cfg(not(any(target_os = "nto", target_os = "qnx")))] { pub const PRIO_MIN: c_int = -20; pub const PRIO_MAX: c_int = 20; } @@ -353,7 +362,7 @@ pub const ATF_PUBL: c_int = 0x08; pub const ATF_USETRAILERS: c_int = 0x10; cfg_if! { - if #[cfg(any(target_os = "nto", target_os = "aix"))] { + if #[cfg(any(target_os = "nto", target_os = "qnx", target_os = "aix"))] { pub const FNM_PERIOD: c_int = 1 << 1; } else { pub const FNM_PERIOD: c_int = 1 << 2; @@ -377,6 +386,7 @@ cfg_if! { if #[cfg(any( target_os = "macos", target_os = "freebsd", + target_os = "dragonfly", target_os = "android", target_os = "openbsd", target_os = "cygwin", @@ -392,13 +402,14 @@ cfg_if! { if #[cfg(any( target_os = "macos", target_os = "freebsd", + target_os = "dragonfly", target_os = "android", target_os = "openbsd", target_os = "netbsd", target_os = "cygwin", ))] { pub const FNM_NOESCAPE: c_int = 1 << 0; - } else if #[cfg(target_os = "nto")] { + } else if #[cfg(any(target_os = "nto", target_os = "qnx"))] { pub const FNM_NOESCAPE: c_int = 1 << 2; } else if #[cfg(target_os = "aix")] { pub const FNM_NOESCAPE: c_int = 1 << 3; @@ -412,6 +423,9 @@ extern "C" { pub static in6addr_any: in6_addr; } +// FIXME(1.0): We want to remove these directives and instead expect that no-std users add their +// own link configuration when required, rather than unconditionally linking everything that may +// possibly be needed. cfg_if! { if #[cfg(any( target_os = "l4re", @@ -496,7 +510,17 @@ cfg_if! { #[link(name = "dl", cfg(not(target_feature = "crt-static")))] #[link(name = "c", cfg(not(target_feature = "crt-static")))] extern "C" {} - } else if #[cfg(any(target_env = "musl", target_env = "ohos"))] { + } else if #[cfg(libc_pauthtest)] { + #[link(name = "c")] + #[link(name = "m")] + #[link(name = "rt")] + #[link(name = "pthread")] + #[link(name = "dl")] + extern "C" {} + } else if #[cfg(any( + all(target_env = "musl", not(libc_pauthtest)), + target_env = "ohos" + ))] { #[cfg_attr( feature = "rustc-dep-of-std", link( @@ -539,6 +563,7 @@ cfg_if! { target_os = "android", target_os = "openbsd", target_os = "nto", + target_os = "qnx", ))] { #[link(name = "c")] #[link(name = "m")] @@ -588,13 +613,13 @@ cfg_if! { cfg_if! { if #[cfg(not(all(target_os = "linux", target_env = "gnu")))] { extern_ty! { - pub enum fpos_t {} // FIXME(unix): fill this out with a struct + pub type fpos_t; // FIXME(unix): fill this out with a struct } } } extern_ty! { - pub enum FILE {} + pub type FILE; } extern "C" { @@ -957,6 +982,15 @@ extern "C" { )] #[cfg_attr(target_os = "netbsd", link_name = "__opendir30")] pub fn opendir(dirname: *const c_char) -> *mut crate::DIR; + #[cfg_attr( + all(target_os = "macos", target_arch = "x86_64"), + link_name = "fdopendir$INODE64" + )] + #[cfg_attr( + all(target_os = "macos", target_arch = "x86"), + link_name = "fdopendir$INODE64$UNIX2003" + )] + pub fn fdopendir(fd: c_int) -> *mut crate::DIR; #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), @@ -994,6 +1028,8 @@ extern "C" { group: crate::gid_t, flags: c_int, ) -> c_int; + #[cfg_attr(gnu_file_offset_bits64, link_name = "openat64")] + pub fn openat(dirfd: c_int, pathname: *const c_char, flags: c_int, ...) -> c_int; #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), link_name = "fstatat$INODE64" @@ -1019,6 +1055,8 @@ extern "C" { flags: c_int, ) -> c_int; #[cfg(not(target_os = "l4re"))] + pub fn mkdirat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; + #[cfg(not(target_os = "l4re"))] pub fn renameat( olddirfd: c_int, oldpath: *const c_char, @@ -2091,16 +2129,16 @@ extern "C" { safe_f! { // It seems htonl, etc are macros on macOS. So we have to reimplement them. So let's // reimplement them for all UNIX platforms - pub const fn htonl(hostlong: u32) -> u32 { + pub const safe fn htonl(hostlong: u32) -> u32 { u32::to_be(hostlong) } - pub const fn htons(hostshort: u16) -> u16 { + pub const safe fn htons(hostshort: u16) -> u16 { u16::to_be(hostshort) } - pub const fn ntohl(netlong: u32) -> u32 { + pub const safe fn ntohl(netlong: u32) -> u32 { u32::from_be(netlong) } - pub const fn ntohs(netshort: u16) -> u16 { + pub const safe fn ntohs(netshort: u16) -> u16 { u16::from_be(netshort) } } @@ -2111,6 +2149,7 @@ cfg_if! { target_os = "android", target_os = "haiku", target_os = "nto", + target_os = "qnx", target_os = "solaris", target_os = "cygwin", target_os = "aix", @@ -2201,22 +2240,6 @@ cfg_if! { link_name = "pause$UNIX2003" )] pub fn pause() -> c_int; - - #[cfg(not(target_os = "l4re"))] - pub fn mkdirat(dirfd: c_int, pathname: *const c_char, mode: mode_t) -> c_int; - #[cfg_attr(gnu_file_offset_bits64, link_name = "openat64")] - pub fn openat(dirfd: c_int, pathname: *const c_char, flags: c_int, ...) -> c_int; - - #[cfg_attr( - all(target_os = "macos", target_arch = "x86_64"), - link_name = "fdopendir$INODE64" - )] - #[cfg_attr( - all(target_os = "macos", target_arch = "x86"), - link_name = "fdopendir$INODE64$UNIX2003" - )] - pub fn fdopendir(fd: c_int) -> *mut crate::DIR; - #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), link_name = "readdir_r$INODE64" @@ -2230,13 +2253,13 @@ cfg_if! { all(target_os = "freebsd", not(any(freebsd11, freebsd10))), link_name = "readdir_r@FBSD_1.5" )] - #[allow(non_autolinks)] // FIXME(docs): `<>` breaks line length limit. /// The 64-bit libc on Solaris and illumos only has readdir_r. If a /// 32-bit Solaris or illumos target is ever created, it should use /// __posix_readdir_r. See libc(3LIB) on Solaris or illumos: - /// https://illumos.org/man/3lib/libc - /// https://docs.oracle.com/cd/E36784_01/html/E36873/libc-3lib.html - /// https://www.unix.com/man-page/opensolaris/3LIB/libc/ + /// + /// * + /// * + /// * #[cfg_attr(gnu_file_offset_bits64, link_name = "readdir64_r")] pub fn readdir_r( dirp: *mut crate::DIR, @@ -2248,7 +2271,7 @@ cfg_if! { } cfg_if! { - if #[cfg(target_os = "nto")] { + if #[cfg(any(target_os = "nto", target_os = "qnx"))] { extern "C" { pub fn readlinkat( dirfd: c_int, @@ -2322,10 +2345,7 @@ cfg_if! { } cfg_if! { - if #[cfg(any( - target_os = "aix", - all(target_os = "nto", target_env = "nto80") - ))] { + if #[cfg(any(target_os = "aix", target_os = "qnx",))] { extern "C" { pub fn cfsetspeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int; } @@ -2482,7 +2502,7 @@ cfg_if! { } else if #[cfg(target_os = "cygwin")] { mod cygwin; pub use self::cygwin::*; - } else if #[cfg(target_os = "nto")] { + } else if #[cfg(any(target_os = "nto", target_os = "qnx"))] { mod nto; pub use self::nto::*; } else if #[cfg(target_os = "aix")] { diff --git a/thirdparty/crates/libc-0.2.186/src/unix/newlib/aarch64/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/newlib/aarch64/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/newlib/aarch64/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/newlib/aarch64/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/newlib/arm/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/newlib/arm/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/newlib/arm/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/newlib/arm/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/newlib/espidf/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/newlib/espidf/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/newlib/espidf/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/newlib/espidf/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/newlib/generic.rs b/thirdparty/crates/libc-0.2.189/src/unix/newlib/generic.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/newlib/generic.rs rename to thirdparty/crates/libc-0.2.189/src/unix/newlib/generic.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/newlib/horizon/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/newlib/horizon/mod.rs similarity index 90% rename from thirdparty/crates/libc-0.2.186/src/unix/newlib/horizon/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/newlib/horizon/mod.rs index e94a0bb1c..0e92ccd9f 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/newlib/horizon/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/newlib/horizon/mod.rs @@ -152,12 +152,14 @@ pub const WNOHANG: c_int = 1; pub const POLLIN: c_int = 0x0001; pub const POLLPRI: c_int = 0x0002; -pub const POLLOUT: c_int = 0x0004; +pub const POLLOUT: c_int = 0x0008; pub const POLLRDNORM: c_int = 0x0040; pub const POLLWRNORM: c_int = POLLOUT; pub const POLLRDBAND: c_int = 0x0080; pub const POLLWRBAND: c_int = 0x0100; +/// POLLERR behavior on 3DS+HorizonOS is unclear, and it may be unsupported. pub const POLLERR: c_int = 0x0008; +/// POLLHUP behavior on 3DS+HorizonOS is unclear, and it may be unsupported. pub const POLLHUP: c_int = 0x0010; pub const POLLNVAL: c_int = 0x0020; @@ -169,6 +171,9 @@ pub const EAI_SYSTEM: c_int = 11; pub const EAI_BADHINTS: c_int = 12; pub const EAI_PROTOCOL: c_int = 13; pub const EAI_OVERFLOW: c_int = 14; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const EAI_MAX: c_int = 15; pub const AF_UNIX: c_int = 1; @@ -188,35 +193,35 @@ pub const GRND_RANDOM: c_uint = 0x2; // Horizon OS works doesn't or can't hold any of this information safe_f! { - pub const fn WIFSTOPPED(_status: c_int) -> bool { + pub const safe fn WIFSTOPPED(_status: c_int) -> bool { false } - pub const fn WSTOPSIG(_status: c_int) -> c_int { + pub const safe fn WSTOPSIG(_status: c_int) -> c_int { 0 } - pub const fn WIFCONTINUED(_status: c_int) -> bool { + pub const safe fn WIFCONTINUED(_status: c_int) -> bool { true } - pub const fn WIFSIGNALED(_status: c_int) -> bool { + pub const safe fn WIFSIGNALED(_status: c_int) -> bool { false } - pub const fn WTERMSIG(_status: c_int) -> c_int { + pub const safe fn WTERMSIG(_status: c_int) -> c_int { 0 } - pub const fn WIFEXITED(_status: c_int) -> bool { + pub const safe fn WIFEXITED(_status: c_int) -> bool { true } - pub const fn WEXITSTATUS(_status: c_int) -> c_int { + pub const safe fn WEXITSTATUS(_status: c_int) -> c_int { 0 } - pub const fn WCOREDUMP(_status: c_int) -> bool { + pub const safe fn WCOREDUMP(_status: c_int) -> bool { false } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/newlib/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/newlib/mod.rs similarity index 98% rename from thirdparty/crates/libc-0.2.186/src/unix/newlib/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/newlib/mod.rs index 9e7df163e..d5f8bc53d 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/newlib/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/newlib/mod.rs @@ -610,7 +610,7 @@ pub const SO_SETFIB: c_int = 0x1014; pub const SO_USER_COOKIE: c_int = 0x1015; pub const SO_PROTOCOL: c_int = 0x1016; pub const SO_PROTOTYPE: c_int = SO_PROTOCOL; -pub const SO_VENDOR: c_int = 0x80000000; +pub const SO_VENDOR: c_int = u32_cast_int(0x80000000); pub const SO_DEBUG: c_int = 0x01; pub const SO_ACCEPTCONN: c_int = 0x0002; pub const SO_REUSEADDR: c_int = 0x0004; @@ -816,30 +816,28 @@ pub const PRIO_PGRP: c_int = 1; pub const PRIO_USER: c_int = 2; f! { - pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let bits = size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); return; } - pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let bits = size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0; } - pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let bits = size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] |= 1 << (fd % bits); return; } - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in (*set).fds_bits.iter_mut() { - *slot = 0; - } + pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { + (*set).fds_bits.fill(0); } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/newlib/powerpc/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/newlib/powerpc/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/newlib/powerpc/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/newlib/powerpc/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/newlib/rtems/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/newlib/rtems/mod.rs similarity index 85% rename from thirdparty/crates/libc-0.2.186/src/unix/newlib/rtems/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/newlib/rtems/mod.rs index ec4534e32..c889f6d90 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/newlib/rtems/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/newlib/rtems/mod.rs @@ -56,7 +56,11 @@ pub const SIGWINCH: c_int = 24; pub const SIGUSR1: c_int = 25; pub const SIGUSR2: c_int = 26; pub const SIGRTMIN: c_int = 27; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const SIGRTMAX: c_int = 31; + pub const SIGXCPU: c_int = 24; pub const SIGXFSZ: c_int = 25; pub const SIGVTALRM: c_int = 26; @@ -83,38 +87,38 @@ pub const WUNTRACED: c_int = 2; pub const SOMAXCONN: c_int = 128; safe_f! { - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0x7f } - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { // (status >> 8) & 0xff WEXITSTATUS(status) } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { ((status & 0x7f) > 0) && ((status & 0x7f) < 0x7f) } - pub const fn WTERMSIG(status: c_int) -> c_int { + pub const safe fn WTERMSIG(status: c_int) -> c_int { status & 0x7f } - pub const fn WIFEXITED(status: c_int) -> bool { + pub const safe fn WIFEXITED(status: c_int) -> bool { (status & 0xff) == 0 } - pub const fn WEXITSTATUS(status: c_int) -> c_int { + pub const safe fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xff } // RTEMS doesn't have native WIFCONTINUED. - pub const fn WIFCONTINUED(_status: c_int) -> bool { + pub const safe fn WIFCONTINUED(_status: c_int) -> bool { true } // RTEMS doesn't have native WCOREDUMP. - pub const fn WCOREDUMP(_status: c_int) -> bool { + pub const safe fn WCOREDUMP(_status: c_int) -> bool { false } } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/newlib/vita/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/newlib/vita/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/newlib/vita/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/newlib/vita/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/nto/aarch64.rs b/thirdparty/crates/libc-0.2.189/src/unix/nto/arch/aarch64.rs similarity index 75% rename from thirdparty/crates/libc-0.2.186/src/unix/nto/aarch64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/nto/arch/aarch64.rs index 559ab6e49..8662169e3 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/nto/aarch64.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/nto/arch/aarch64.rs @@ -1,3 +1,12 @@ +//! Definitions specific to QNX on AArch64 +//! +//! This module applies to: +//! +//! * `aarch64-unknown-nto-qnx700` +//! * `aarch64-unknown-nto-qnx710` +//! * `aarch64-unknown-nto-qnx710_iosock` +//! * `aarch64-unknown-qnx` + use crate::prelude::*; pub type wchar_t = u32; diff --git a/thirdparty/crates/libc-0.2.189/src/unix/nto/arch/i686.rs b/thirdparty/crates/libc-0.2.189/src/unix/nto/arch/i686.rs new file mode 100644 index 000000000..489b047c4 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/unix/nto/arch/i686.rs @@ -0,0 +1,10 @@ +//! Definitions specific to QNX on x86 +//! +//! This module applies to: +//! +//! * `i686-pc-nto-qnx700` + +use crate::prelude::*; + +pub type wchar_t = u32; +pub type time_t = i64; diff --git a/thirdparty/crates/libc-0.2.189/src/unix/nto/arch/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/nto/arch/mod.rs new file mode 100644 index 000000000..e6717166e --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/unix/nto/arch/mod.rs @@ -0,0 +1,13 @@ +//! Architecture-specific definitions for QNX + +cfg_if! { + if #[cfg(target_arch = "x86_64")] { + mod x86_64; + pub use self::x86_64::*; + } else if #[cfg(target_arch = "aarch64")] { + mod aarch64; + pub use self::aarch64::*; + } else { + panic!("Unsupported arch"); + } +} diff --git a/thirdparty/crates/libc-0.2.186/src/unix/nto/x86_64.rs b/thirdparty/crates/libc-0.2.189/src/unix/nto/arch/x86_64.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/nto/x86_64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/nto/arch/x86_64.rs index b8e0b2213..fa2c02870 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/nto/x86_64.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/nto/arch/x86_64.rs @@ -1,3 +1,11 @@ +//! Definitions specific to QNX on x86-64 +//! +//! This module applies to: +//! +//! * `x86_64-pc-nto-qnx710` +//! * `x86_64-pc-nto-qnx710_iosock` +//! * `x86_64-pc-qnx` + use crate::prelude::*; pub type wchar_t = u32; diff --git a/thirdparty/crates/libc-0.2.189/src/unix/nto/io_pkt/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/nto/io_pkt/mod.rs new file mode 100644 index 000000000..928e0a350 --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/unix/nto/io_pkt/mod.rs @@ -0,0 +1,160 @@ +//! Definitions specific to QNX versions using io-pkt networking +//! +//! This module applies to: +//! +//! * `aarch64-unknown-nto-qnx700` +//! * `i686-pc-nto-qnx700` +//! * `aarch64-unknown-nto-qnx710` +//! * `x86_64-pc-nto-qnx710` + +use crate::prelude::*; + +s! { + #[repr(packed)] + pub struct in_addr { + pub s_addr: crate::in_addr_t, + } + + pub struct sockaddr_in { + pub sin_len: u8, + pub sin_family: crate::sa_family_t, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, + pub sin_zero: [i8; 8], + } + + pub struct in_pktinfo { + pub ipi_addr: crate::in_addr, + pub ipi_ifindex: c_uint, + } + + #[repr(packed)] + pub struct arphdr { + pub ar_hrd: u16, + pub ar_pro: u16, + pub ar_hln: u8, + pub ar_pln: u8, + pub ar_op: u16, + } + + pub struct unpcbid { + pub unp_pid: crate::pid_t, + pub unp_euid: crate::uid_t, + pub unp_egid: crate::gid_t, + } + + pub struct mmsghdr { + pub msg_hdr: crate::msghdr, + pub msg_len: c_uint, + } + + pub struct bpf_stat { + pub bs_recv: u64, + pub bs_drop: u64, + pub bs_capt: u64, + bs_padding: Padding<[u64; 13]>, + } + + pub struct sockaddr_dl { + pub sdl_len: c_uchar, + pub sdl_family: crate::sa_family_t, + pub sdl_index: u16, + pub sdl_type: c_uchar, + pub sdl_nlen: c_uchar, + pub sdl_alen: c_uchar, + pub sdl_slen: c_uchar, + pub sdl_data: [c_char; 12], + } +} + +pub const SCM_CREDS: c_int = 0x04; +pub const IFF_NOTRAILERS: c_int = 0x00000020; +pub const AF_INET6: c_int = 24; +pub const AF_BLUETOOTH: c_int = 31; +pub const pseudo_AF_KEY: c_int = 29; +pub const MSG_NOSIGNAL: c_int = 0x0800; +pub const MSG_WAITFORONE: c_int = 0x2000; +pub const IP_IPSEC_POLICY_COMPAT: c_int = 22; +pub const IP_PKTINFO: c_int = 25; +pub const IPPROTO_DIVERT: c_int = 259; +pub const IPV6_IPSEC_POLICY_COMPAT: c_int = 28; +pub const TCP_KEEPALIVE: c_int = 0x04; +pub const ARPHRD_ARCNET: u16 = 7; +pub const SO_BINDTODEVICE: c_int = 0x0800; +pub const EAI_NODATA: c_int = 7; +pub const IPTOS_ECN_NOT_ECT: u8 = 0x00; +pub const RTF_BROADCAST: u32 = 0x80000; +pub const UDP_ENCAP: c_int = 100; +pub const HW_IOSTATS: c_int = 9; +pub const HW_MACHINE_ARCH: c_int = 10; +pub const HW_ALIGNBYTES: c_int = 11; +pub const HW_CNMAGIC: c_int = 12; +pub const HW_PHYSMEM64: c_int = 13; +pub const HW_USERMEM64: c_int = 14; +pub const HW_IOSTATNAMES: c_int = 15; +pub const HW_MAXID: c_int = 15; +pub const CTL_UNSPEC: c_int = 0; +pub const CTL_QNX: c_int = 9; +pub const CTL_PROC: c_int = 10; +pub const CTL_VENDOR: c_int = 11; +pub const CTL_EMUL: c_int = 12; +pub const CTL_SECURITY: c_int = 13; +pub const CTL_MAXID: c_int = 14; +pub const AF_ARP: c_int = 28; +pub const AF_IEEE80211: c_int = 32; +pub const AF_NATM: c_int = 27; +pub const AF_NS: c_int = 6; +pub const BIOCGDLTLIST: c_int = -1072676233; +pub const BIOCGETIF: c_int = 1083196011; +pub const BIOCGSEESENT: c_int = 1074020984; +pub const BIOCGSTATS: c_int = 1082147439; +pub const BIOCSDLT: c_int = -2147204490; +pub const BIOCSETIF: c_int = -2138029460; +pub const BIOCSSEESENT: c_int = -2147204487; +pub const FIONSPACE: c_int = 1074030200; +pub const FIONWRITE: c_int = 1074030201; +pub const IFF_ACCEPTRTADV: c_int = 0x40000000; +pub const IFF_IP6FORWARDING: c_int = 0x20000000; +pub const IFF_SHIM: c_int = u32_cast_int(0x80000000); +pub const KERN_ARND: c_int = 81; +pub const KERN_IOV_MAX: c_int = 38; +pub const KERN_LOGSIGEXIT: c_int = 46; +pub const KERN_MAXID: c_int = 83; +pub const KERN_PROC_ARGS: c_int = 48; +pub const KERN_PROC_ENV: c_int = 3; +pub const KERN_PROC_GID: c_int = 7; +pub const KERN_PROC_RGID: c_int = 8; +pub const LOCAL_CONNWAIT: c_int = 0x0002; +pub const LOCAL_CREDS: c_int = 0x0001; +pub const LOCAL_PEEREID: c_int = 0x0003; +pub const MSG_NOTIFICATION: c_int = 0x0400; +pub const NET_RT_IFLIST: c_int = 4; +pub const NI_NUMERICSCOPE: c_int = 0x00000040; +pub const PF_ARP: c_int = 28; +pub const PF_NATM: c_int = 27; +pub const pseudo_AF_HDRCMPLT: c_int = 30; +pub const SIOCGIFADDR: c_int = -1064277727; +pub const SO_FIB: c_int = 0x100a; +pub const SO_TXPRIO: c_int = 0x100b; +pub const SO_SETFIB: c_int = 0x100a; +pub const SO_VLANPRIO: c_int = 0x100c; +pub const USER_ATEXIT_MAX: c_int = 21; +pub const USER_MAXID: c_int = 22; +pub const SO_OVERFLOWED: c_int = 0x1009; + +extern "C" { + pub fn sendmmsg( + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_uint, + ) -> c_int; + + pub fn recvmmsg( + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_uint, + timeout: *mut crate::timespec, + ) -> c_int; +} diff --git a/thirdparty/crates/libc-0.2.189/src/unix/nto/io_sock/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/nto/io_sock/mod.rs new file mode 100644 index 000000000..303f5ca4c --- /dev/null +++ b/thirdparty/crates/libc-0.2.189/src/unix/nto/io_sock/mod.rs @@ -0,0 +1,108 @@ +//! Definitions specific to QNX versions using io-sock networking +//! +//! This module applies to: +//! +//! * `aarch64-unknown-nto-qnx710` +//! * `x86_64-pc-nto-qnx710` +//! * `aarch64-unknown-qnx` +//! * `x86_64-pc-qnx` + +use crate::prelude::*; + +s! { + pub struct in_addr { + pub s_addr: crate::in_addr_t, + } + + pub struct sockaddr_in { + pub sin_len: u8, + pub sin_family: crate::sa_family_t, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, + pub sin_zero: [c_char; 8], + } + + pub struct arphdr { + pub ar_hrd: u16, + pub ar_pro: u16, + pub ar_hln: u8, + pub ar_pln: u8, + pub ar_op: u16, + } + + pub struct mmsghdr { + pub msg_hdr: crate::msghdr, + pub msg_len: ssize_t, + } + + pub struct bpf_stat { + pub bs_recv: c_uint, + pub bs_drop: c_uint, + } + + pub struct sockaddr_dl { + pub sdl_len: c_uchar, + pub sdl_family: c_uchar, + pub sdl_index: c_ushort, + pub sdl_type: c_uchar, + pub sdl_nlen: c_uchar, + pub sdl_alen: c_uchar, + pub sdl_slen: c_uchar, + pub sdl_data: [c_char; 46], + } +} + +pub const SCM_CREDS: c_int = 0x03; +pub const AF_INET6: c_int = 28; +pub const AF_BLUETOOTH: c_int = 36; +pub const pseudo_AF_KEY: c_int = 27; +pub const MSG_NOSIGNAL: c_int = 0x20000; +pub const MSG_WAITFORONE: c_int = 0x00080000; +pub const IPPROTO_DIVERT: c_int = 258; +pub const RTF_BROADCAST: u32 = 0x400000; +pub const UDP_ENCAP: c_int = 1; +pub const HW_MACHINE_ARCH: c_int = 11; +pub const AF_ARP: c_int = 35; +pub const AF_IEEE80211: c_int = 37; +pub const AF_NATM: c_int = 29; +pub const BIOCGDLTLIST: c_ulong = 0xffffffffc0104279; +pub const BIOCGETIF: c_int = 0x4020426b; +pub const BIOCGSEESENT: c_int = 0x40044276; +pub const BIOCGSTATS: c_int = 0x4008426f; +pub const BIOCSDLT: c_int = u32_cast_int(0x80044278); +pub const BIOCSETIF: c_int = u32_cast_int(0x8020426c); +pub const BIOCSSEESENT: c_int = u32_cast_int(0x80044277); +pub const KERN_ARND: c_int = 37; +pub const KERN_IOV_MAX: c_int = 35; +pub const KERN_LOGSIGEXIT: c_int = 34; +pub const KERN_PROC_ARGS: c_int = 7; +pub const KERN_PROC_ENV: c_int = 35; +pub const KERN_PROC_GID: c_int = 11; +pub const KERN_PROC_RGID: c_int = 10; +pub const LOCAL_CONNWAIT: c_int = 4; +pub const LOCAL_CREDS: c_int = 2; +pub const MSG_NOTIFICATION: c_int = 0x00002000; +pub const NET_RT_IFLIST: c_int = 3; +pub const NI_NUMERICSCOPE: c_int = 0x00000020; +pub const PF_ARP: c_int = AF_ARP; +pub const PF_NATM: c_int = AF_NATM; +pub const pseudo_AF_HDRCMPLT: c_int = 31; +pub const SIOCGIFADDR: c_int = u32_cast_int(0xc0206921); +pub const SO_SETFIB: c_int = 0x1014; + +extern "C" { + pub fn sendmmsg( + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: size_t, + flags: c_int, + ) -> ssize_t; + + pub fn recvmmsg( + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: size_t, + flags: c_int, + timeout: *const crate::timespec, + ) -> ssize_t; +} diff --git a/thirdparty/crates/libc-0.2.186/src/unix/nto/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/nto/mod.rs similarity index 89% rename from thirdparty/crates/libc-0.2.186/src/unix/nto/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/nto/mod.rs index 022fb0be1..6aa400ad6 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/nto/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/nto/mod.rs @@ -1,5 +1,24 @@ +//! Definitions for QNX Software Development Platform +//! +//! This module applies to: +//! +//! * `aarch64-unknown-nto-qnx700` +//! * `aarch64-unknown-nto-qnx710` +//! * `aarch64-unknown-nto-qnx710_iosock` +//! * `aarch64-unknown-qnx` +//! * `i686-pc-nto-qnx700` +//! * `x86_64-pc-nto-qnx710` +//! * `x86_64-pc-nto-qnx710_iosock` +//! * `x86_64-pc-qnx` +//! +//! There are sub-modules for the target architecture, and sub-modules for the +//! kind of networking library used. QNX SDP 7.0 uses `io-pkt`, QNX SDP 8.0 +//! uses `io-sock`, and QNX SDP 7.1 comes with both (so you can pick). + use crate::prelude::*; +// QNX definitions of common UNIX things + pub type clock_t = u32; pub type sa_family_t = u8; @@ -73,7 +92,7 @@ pub type sem_t = sync_t; pub type nl_item = c_int; extern_ty! { - pub enum timezone {} + pub type timezone; } s! { @@ -109,35 +128,12 @@ s! { pub imr_interface: in_addr, } - #[cfg_attr(any(target_env = "nto71", target_env = "nto70"), repr(packed))] - pub struct in_addr { - pub s_addr: crate::in_addr_t, - } - pub struct sockaddr { pub sa_len: u8, pub sa_family: sa_family_t, pub sa_data: [c_char; 14], } - #[cfg(not(target_env = "nto71_iosock"))] - pub struct sockaddr_in { - pub sin_len: u8, - pub sin_family: sa_family_t, - pub sin_port: crate::in_port_t, - pub sin_addr: crate::in_addr, - pub sin_zero: [i8; 8], - } - - #[cfg(target_env = "nto71_iosock")] - pub struct sockaddr_in { - pub sin_len: u8, - pub sin_family: sa_family_t, - pub sin_port: crate::in_port_t, - pub sin_addr: crate::in_addr, - pub sin_zero: [c_char; 8], - } - pub struct sockaddr_in6 { pub sin6_len: u8, pub sin6_family: sa_family_t, @@ -239,13 +235,6 @@ s! { _Reserved: Padding<[*mut c_char; 8]>, } - // Does not exist in io-sock - #[cfg(not(target_env = "nto71_iosock"))] - pub struct in_pktinfo { - pub ipi_addr: crate::in_addr, - pub ipi_ifindex: c_uint, - } - pub struct ifaddrs { pub ifa_next: *mut ifaddrs, pub ifa_name: *mut c_char, @@ -262,27 +251,6 @@ s! { pub arp_flags: c_int, } - #[cfg_attr(any(target_env = "nto71", target_env = "nto70"), repr(packed))] - pub struct arphdr { - pub ar_hrd: u16, - pub ar_pro: u16, - pub ar_hln: u8, - pub ar_pln: u8, - pub ar_op: u16, - } - - #[cfg(not(target_env = "nto71_iosock"))] - pub struct mmsghdr { - pub msg_hdr: crate::msghdr, - pub msg_len: c_uint, - } - - #[cfg(target_env = "nto71_iosock")] - pub struct mmsghdr { - pub msg_hdr: crate::msghdr, - pub msg_len: ssize_t, - } - #[repr(align(8))] pub struct siginfo_t { pub si_signo: c_int, @@ -610,20 +578,6 @@ s! { pub bf_insns: *mut crate::bpf_insn, } - #[cfg(not(target_env = "nto71_iosock"))] - pub struct bpf_stat { - pub bs_recv: u64, - pub bs_drop: u64, - pub bs_capt: u64, - bs_padding: Padding<[u64; 13]>, - } - - #[cfg(target_env = "nto71_iosock")] - pub struct bpf_stat { - pub bs_recv: c_uint, - pub bs_drop: c_uint, - } - pub struct bpf_version { pub bv_major: c_ushort, pub bv_minor: c_ushort, @@ -648,14 +602,6 @@ s! { pub bfl_list: *mut c_uint, } - // Does not exist in io-sock - #[cfg(not(target_env = "nto71_iosock"))] - pub struct unpcbid { - pub unp_pid: crate::pid_t, - pub unp_euid: crate::uid_t, - pub unp_egid: crate::gid_t, - } - pub struct dl_phdr_info { pub dlpi_addr: crate::Elf64_Addr, pub dlpi_name: *const c_char, @@ -720,30 +666,6 @@ s! { pub mq_sendwait: c_long, pub mq_recvwait: c_long, } - - #[cfg(not(target_env = "nto71_iosock"))] - pub struct sockaddr_dl { - pub sdl_len: c_uchar, - pub sdl_family: crate::sa_family_t, - pub sdl_index: u16, - pub sdl_type: c_uchar, - pub sdl_nlen: c_uchar, - pub sdl_alen: c_uchar, - pub sdl_slen: c_uchar, - pub sdl_data: [c_char; 12], - } - - #[cfg(target_env = "nto71_iosock")] - pub struct sockaddr_dl { - pub sdl_len: c_uchar, - pub sdl_family: c_uchar, - pub sdl_index: c_ushort, - pub sdl_type: c_uchar, - pub sdl_nlen: c_uchar, - pub sdl_alen: c_uchar, - pub sdl_slen: c_uchar, - pub sdl_data: [c_char; 46], - } } s_no_extra_traits! { @@ -803,10 +725,10 @@ s_no_extra_traits! { // get native f128 support. // // The definition was taken from the definition of the _Maxalignt struct in the QNX SDK. - // However, on QNX7, there is a different definition of std::max_align_t (the C++ version of + // However, on QNX SDP 7, there is a different definition of std::max_align_t (the C++ version of // this type). In practice, this doesn't make a difference for the _alignment_ properties of the // type - however, it changes the size, so using in in any other form than the zero-sized array - // form would be bogus and it would potentially change the size of the data type. On QNX8, this + // form would be bogus and it would potentially change the size of the data type. On QNX SDP 8, this // got fixed and both C and C++ are using the same definition. pub struct max_align_t { _ll: crate::c_longlong, @@ -894,132 +816,6 @@ pub const MS_SYNC: c_int = 2; pub const SCM_RIGHTS: c_int = 0x01; pub const SCM_TIMESTAMP: c_int = 0x02; -// QNX Network Stack Versioning: -// -// The `if` block targets the legacy `io-pkt` stack. -// - target_env = "nto70": QNX 7.0 -// - target_env = "nto71": Standard QNX 7.1 (default legacy stack) -// -// The `else` block targets the modern `io-sock` stack. -// - target_env = "nto71_iosock": QNX 7.1 with the optional new stack -// - target_env = "nto80": QNX 8.0 -cfg_if! { - if #[cfg(any(target_env = "nto70", target_env = "nto71"))] { - pub const SCM_CREDS: c_int = 0x04; - pub const IFF_NOTRAILERS: c_int = 0x00000020; - pub const AF_INET6: c_int = 24; - pub const AF_BLUETOOTH: c_int = 31; - pub const pseudo_AF_KEY: c_int = 29; - pub const MSG_NOSIGNAL: c_int = 0x0800; - pub const MSG_WAITFORONE: c_int = 0x2000; - pub const IP_IPSEC_POLICY_COMPAT: c_int = 22; - pub const IP_PKTINFO: c_int = 25; - pub const IPPROTO_DIVERT: c_int = 259; - pub const IPV6_IPSEC_POLICY_COMPAT: c_int = 28; - pub const TCP_KEEPALIVE: c_int = 0x04; - pub const ARPHRD_ARCNET: u16 = 7; - pub const SO_BINDTODEVICE: c_int = 0x0800; - pub const EAI_NODATA: c_int = 7; - pub const IPTOS_ECN_NOT_ECT: u8 = 0x00; - pub const RTF_BROADCAST: u32 = 0x80000; - pub const UDP_ENCAP: c_int = 100; - pub const HW_IOSTATS: c_int = 9; - pub const HW_MACHINE_ARCH: c_int = 10; - pub const HW_ALIGNBYTES: c_int = 11; - pub const HW_CNMAGIC: c_int = 12; - pub const HW_PHYSMEM64: c_int = 13; - pub const HW_USERMEM64: c_int = 14; - pub const HW_IOSTATNAMES: c_int = 15; - pub const HW_MAXID: c_int = 15; - pub const CTL_UNSPEC: c_int = 0; - pub const CTL_QNX: c_int = 9; - pub const CTL_PROC: c_int = 10; - pub const CTL_VENDOR: c_int = 11; - pub const CTL_EMUL: c_int = 12; - pub const CTL_SECURITY: c_int = 13; - pub const CTL_MAXID: c_int = 14; - pub const AF_ARP: c_int = 28; - pub const AF_IEEE80211: c_int = 32; - pub const AF_NATM: c_int = 27; - pub const AF_NS: c_int = 6; - pub const BIOCGDLTLIST: c_int = -1072676233; - pub const BIOCGETIF: c_int = 1083196011; - pub const BIOCGSEESENT: c_int = 1074020984; - pub const BIOCGSTATS: c_int = 1082147439; - pub const BIOCSDLT: c_int = -2147204490; - pub const BIOCSETIF: c_int = -2138029460; - pub const BIOCSSEESENT: c_int = -2147204487; - pub const FIONSPACE: c_int = 1074030200; - pub const FIONWRITE: c_int = 1074030201; - pub const IFF_ACCEPTRTADV: c_int = 0x40000000; - pub const IFF_IP6FORWARDING: c_int = 0x20000000; - pub const IFF_SHIM: c_int = 0x80000000; - pub const KERN_ARND: c_int = 81; - pub const KERN_IOV_MAX: c_int = 38; - pub const KERN_LOGSIGEXIT: c_int = 46; - pub const KERN_MAXID: c_int = 83; - pub const KERN_PROC_ARGS: c_int = 48; - pub const KERN_PROC_ENV: c_int = 3; - pub const KERN_PROC_GID: c_int = 7; - pub const KERN_PROC_RGID: c_int = 8; - pub const LOCAL_CONNWAIT: c_int = 0x0002; - pub const LOCAL_CREDS: c_int = 0x0001; - pub const LOCAL_PEEREID: c_int = 0x0003; - pub const MSG_NOTIFICATION: c_int = 0x0400; - pub const NET_RT_IFLIST: c_int = 4; - pub const NI_NUMERICSCOPE: c_int = 0x00000040; - pub const PF_ARP: c_int = 28; - pub const PF_NATM: c_int = 27; - pub const pseudo_AF_HDRCMPLT: c_int = 30; - pub const SIOCGIFADDR: c_int = -1064277727; - pub const SO_FIB: c_int = 0x100a; - pub const SO_TXPRIO: c_int = 0x100b; - pub const SO_SETFIB: c_int = 0x100a; - pub const SO_VLANPRIO: c_int = 0x100c; - pub const USER_ATEXIT_MAX: c_int = 21; - pub const USER_MAXID: c_int = 22; - pub const SO_OVERFLOWED: c_int = 0x1009; - } else { - pub const SCM_CREDS: c_int = 0x03; - pub const AF_INET6: c_int = 28; - pub const AF_BLUETOOTH: c_int = 36; - pub const pseudo_AF_KEY: c_int = 27; - pub const MSG_NOSIGNAL: c_int = 0x20000; - pub const MSG_WAITFORONE: c_int = 0x00080000; - pub const IPPROTO_DIVERT: c_int = 258; - pub const RTF_BROADCAST: u32 = 0x400000; - pub const UDP_ENCAP: c_int = 1; - pub const HW_MACHINE_ARCH: c_int = 11; - pub const AF_ARP: c_int = 35; - pub const AF_IEEE80211: c_int = 37; - pub const AF_NATM: c_int = 29; - pub const BIOCGDLTLIST: c_ulong = 0xffffffffc0104279; - pub const BIOCGETIF: c_int = 0x4020426b; - pub const BIOCGSEESENT: c_int = 0x40044276; - pub const BIOCGSTATS: c_int = 0x4008426f; - pub const BIOCSDLT: c_int = 0x80044278; - pub const BIOCSETIF: c_int = 0x8020426c; - pub const BIOCSSEESENT: c_int = 0x80044277; - pub const KERN_ARND: c_int = 37; - pub const KERN_IOV_MAX: c_int = 35; - pub const KERN_LOGSIGEXIT: c_int = 34; - pub const KERN_PROC_ARGS: c_int = 7; - pub const KERN_PROC_ENV: c_int = 35; - pub const KERN_PROC_GID: c_int = 11; - pub const KERN_PROC_RGID: c_int = 10; - pub const LOCAL_CONNWAIT: c_int = 4; - pub const LOCAL_CREDS: c_int = 2; - pub const MSG_NOTIFICATION: c_int = 0x00002000; - pub const NET_RT_IFLIST: c_int = 3; - pub const NI_NUMERICSCOPE: c_int = 0x00000020; - pub const PF_ARP: c_int = AF_ARP; - pub const PF_NATM: c_int = AF_NATM; - pub const pseudo_AF_HDRCMPLT: c_int = 31; - pub const SIOCGIFADDR: c_int = 0xc0206921; - pub const SO_SETFIB: c_int = 0x1014; - } -} - pub const MAP_TYPE: c_int = 0x3; pub const IFF_UP: c_int = 0x00000001; @@ -1154,6 +950,8 @@ pub const LOCK_UN: c_int = 0x8; pub const SS_ONSTACK: c_int = 1; pub const SS_DISABLE: c_int = 2; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PATH_MAX: c_int = 1024; pub const UIO_MAXIOV: c_int = 1024; @@ -2341,14 +2139,39 @@ pub const TIOCSTOP: c_int = 29807; pub const TIOCSWINSZ: c_int = -2146929561; pub const USER_CS_PATH: c_int = 1; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_BASE_MAX: c_int = 2; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_DIM_MAX: c_int = 3; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_SCALE_MAX: c_int = 4; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_BC_STRING_MAX: c_int = 5; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_COLL_WEIGHTS_MAX: c_int = 6; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_EXPR_NEST_MAX: c_int = 7; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_LINE_MAX: c_int = 8; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const USER_RE_DUP_MAX: c_int = 9; + pub const USER_POSIX2_VERSION: c_int = 10; pub const USER_POSIX2_C_BIND: c_int = 11; pub const USER_POSIX2_C_DEV: c_int = 12; @@ -2397,10 +2220,21 @@ pub const PTHREAD_PROCESS_SHARED: c_int = 0x01; pub const PTHREAD_KEYS_MAX: usize = 128; +#[cfg(not(any(target_env = "nto71", target_env = "nto71_iosock", target_os = "qnx")))] pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { __u: 0x80000000, __owner: 0xffffffff, }; +#[cfg(any(target_env = "nto71", target_env = "nto71_iosock"))] +pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { + __u: 0x82000000, + __owner: 0, +}; +#[cfg(target_os = "qnx")] +pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { + __u: 0x80000000, + __owner: 0, +}; pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { __u: CLOCK_REALTIME as u32, __owner: 0xfffffffb, @@ -2426,70 +2260,68 @@ const fn _ALIGN(p: usize, b: usize) -> usize { } f! { - pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { if (*mhdr).msg_controllen as usize >= size_of::() { - (*mhdr).msg_control as *mut cmsghdr + (*mhdr).msg_control.cast() } else { - core::ptr::null_mut::() + ptr::null_mut() } } - pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { let msg = _CMSG_ALIGN((*cmsg).cmsg_len as usize); let next = cmsg as usize + msg + _CMSG_ALIGN(size_of::()); if next > (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize { - core::ptr::null_mut::() + ptr::null_mut() } else { (cmsg as usize + msg) as *mut cmsghdr } } - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { (cmsg as *mut c_uchar).offset(_CMSG_ALIGN(size_of::()) as isize) } - pub const fn CMSG_LEN(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(length: c_uint) -> c_uint { _CMSG_ALIGN(size_of::()) as c_uint + length } - pub const fn CMSG_SPACE(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(length: c_uint) -> c_uint { (_CMSG_ALIGN(size_of::()) + _CMSG_ALIGN(length as usize)) as c_uint } - pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] &= !(1 << (fd % size)); return; } - pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0; } - pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] |= 1 << (fd % size); return; } - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in (*set).fds_bits.iter_mut() { - *slot = 0; - } + pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { + (*set).fds_bits.fill(0); } - pub fn _DEXTRA_FIRST(_d: *const dirent) -> *mut crate::dirent_extra { + pub unsafe fn _DEXTRA_FIRST(_d: *const dirent) -> *mut crate::dirent_extra { let _f = &((*(_d)).d_name) as *const _; let _s = _d as usize; _ALIGN(_s + _f as usize - _s + (*_d).d_namelen as usize + 1, 8) as *mut crate::dirent_extra } - pub fn _DEXTRA_VALID(_x: *const crate::dirent_extra, _d: *const dirent) -> bool { + pub unsafe fn _DEXTRA_VALID(_x: *const crate::dirent_extra, _d: *const dirent) -> bool { let sz = _x as usize - _d as usize + size_of::(); let rsz = (*_d).d_reclen as usize; @@ -2500,105 +2332,69 @@ f! { } } - pub fn _DEXTRA_NEXT(_x: *const crate::dirent_extra) -> *mut crate::dirent_extra { + pub unsafe fn _DEXTRA_NEXT(_x: *const crate::dirent_extra) -> *mut crate::dirent_extra { _ALIGN( _x as usize + size_of::() + (*_x).d_datalen as usize, 8, ) as *mut crate::dirent_extra } - pub fn SOCKCREDSIZE(ngrps: usize) -> usize { + pub unsafe fn SOCKCREDSIZE(ngrps: usize) -> usize { let ngrps = if ngrps > 0 { ngrps - 1 } else { 0 }; size_of::() + size_of::() * ngrps } } safe_f! { - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0x7f } - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { (status >> 8) & 0xff } - pub const fn WIFCONTINUED(status: c_int) -> bool { + pub const safe fn WIFCONTINUED(status: c_int) -> bool { status == 0xffff } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { ((status & 0x7f) + 1) as i8 >= 2 } - pub const fn WTERMSIG(status: c_int) -> c_int { + pub const safe fn WTERMSIG(status: c_int) -> c_int { status & 0x7f } - pub const fn WIFEXITED(status: c_int) -> bool { + pub const safe fn WIFEXITED(status: c_int) -> bool { (status & 0x7f) == 0 } - pub const fn WEXITSTATUS(status: c_int) -> c_int { + pub const safe fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xff } - pub const fn WCOREDUMP(status: c_int) -> bool { + pub const safe fn WCOREDUMP(status: c_int) -> bool { (status & 0x80) != 0 } - pub const fn IPTOS_ECN(x: u8) -> u8 { + pub const safe fn IPTOS_ECN(x: u8) -> u8 { x & crate::IPTOS_ECN_MASK } - pub const fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { ((major << 10) | (minor)) as crate::dev_t } - pub const fn major(dev: crate::dev_t) -> c_uint { + pub const safe fn major(dev: crate::dev_t) -> c_uint { ((dev as c_uint) >> 10) & 0x3f } - pub const fn minor(dev: crate::dev_t) -> c_uint { + pub const safe fn minor(dev: crate::dev_t) -> c_uint { (dev as c_uint) & 0x3ff } } -cfg_if! { - if #[cfg(not(target_env = "nto71_iosock"))] { - extern "C" { - pub fn sendmmsg( - sockfd: c_int, - msgvec: *mut crate::mmsghdr, - vlen: c_uint, - flags: c_uint, - ) -> c_int; - pub fn recvmmsg( - sockfd: c_int, - msgvec: *mut crate::mmsghdr, - vlen: c_uint, - flags: c_uint, - timeout: *mut crate::timespec, - ) -> c_int; - } - } else { - extern "C" { - pub fn sendmmsg( - sockfd: c_int, - msgvec: *mut crate::mmsghdr, - vlen: size_t, - flags: c_int, - ) -> ssize_t; - pub fn recvmmsg( - sockfd: c_int, - msgvec: *mut crate::mmsghdr, - vlen: size_t, - flags: c_int, - timeout: *const crate::timespec, - ) -> ssize_t; - } - } -} - // Network related functions are provided by libsocket and regex // functions are provided by libregex. // In QNX <=7.0, libregex functions were included in libc itself. @@ -3150,7 +2946,7 @@ pub unsafe fn atexit(cb: extern "C" fn()) -> c_int { static __dso_handle: *mut c_void; pub fn __cxa_atexit(cb: extern "C" fn(), __arg: *mut c_void, __dso: *mut c_void) -> c_int; } - __cxa_atexit(cb, 0 as *mut c_void, __dso_handle) + __cxa_atexit(cb, ptr::null_mut(), __dso_handle) } impl siginfo_t { @@ -3160,7 +2956,7 @@ impl siginfo_t { _pad: Padding<[u8; 32]>, si_addr: *mut c_void, } - (*(self as *const siginfo_t as *const siginfo_si_addr)).si_addr + (*(self as *const siginfo_t).cast::()).si_addr } pub unsafe fn si_value(&self) -> crate::sigval { @@ -3169,7 +2965,7 @@ impl siginfo_t { _pad: Padding<[u8; 32]>, si_value: crate::sigval, } - (*(self as *const siginfo_t as *const siginfo_si_value)).si_value + (*(self as *const siginfo_t).cast::()).si_value } pub unsafe fn si_pid(&self) -> crate::pid_t { @@ -3178,7 +2974,7 @@ impl siginfo_t { _pad: Padding<[u8; 16]>, si_pid: crate::pid_t, } - (*(self as *const siginfo_t as *const siginfo_si_pid)).si_pid + (*(self as *const siginfo_t).cast::()).si_pid } pub unsafe fn si_uid(&self) -> crate::uid_t { @@ -3187,7 +2983,7 @@ impl siginfo_t { _pad: Padding<[u8; 24]>, si_uid: crate::uid_t, } - (*(self as *const siginfo_t as *const siginfo_si_uid)).si_uid + (*(self as *const siginfo_t).cast::()).si_uid } pub unsafe fn si_status(&self) -> c_int { @@ -3196,21 +2992,30 @@ impl siginfo_t { _pad: Padding<[u8; 28]>, si_status: c_int, } - (*(self as *const siginfo_t as *const siginfo_si_status)).si_status + (*(self as *const siginfo_t).cast::()).si_status } } +// Things that are QNX specific + +mod neutrino; +pub use self::neutrino::*; + +// Things that are architecture specific + +mod arch; +pub use self::arch::*; + +// Things that are network-stack specific + cfg_if! { - if #[cfg(target_arch = "x86_64")] { - mod x86_64; - pub use self::x86_64::*; - } else if #[cfg(target_arch = "aarch64")] { - mod aarch64; - pub use self::aarch64::*; + if #[cfg(any(target_env = "nto70", target_env = "nto71"))] { + mod io_pkt; + pub use self::io_pkt::*; + } else if #[cfg(any(target_env = "nto71_iosock", target_os = "qnx"))] { + mod io_sock; + pub use self::io_sock::*; } else { panic!("Unsupported arch"); } } - -mod neutrino; -pub use self::neutrino::*; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/nto/neutrino.rs b/thirdparty/crates/libc-0.2.189/src/unix/nto/neutrino.rs similarity index 99% rename from thirdparty/crates/libc-0.2.186/src/unix/nto/neutrino.rs rename to thirdparty/crates/libc-0.2.189/src/unix/nto/neutrino.rs index 4c3fca143..f360605d1 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/nto/neutrino.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/nto/neutrino.rs @@ -1,3 +1,5 @@ +//! APIs that are specific to QNX Neutrino and not found in other operating systems + use crate::prelude::*; pub type nto_job_t = crate::sync_t; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/nuttx/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/nuttx/mod.rs similarity index 78% rename from thirdparty/crates/libc-0.2.186/src/unix/nuttx/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/nuttx/mod.rs index 150dc4355..b1100342b 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/nuttx/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/nuttx/mod.rs @@ -1,3 +1,7 @@ +///! Definitions for Apache NuttX RTOS. +///! +///! Following definitions are based on NuttX 13.0.0. +///! See https://github.com/apache/nuttx/tree/releases/13.0 for more details. use crate::prelude::*; use crate::{ in6_addr, @@ -6,6 +10,7 @@ use crate::{ DIR, }; +pub type pid_t = c_int; pub type nlink_t = u16; pub type ino_t = u16; pub type blkcnt_t = u64; @@ -24,15 +29,23 @@ pub type pthread_rwlockattr_t = i32; pub type pthread_t = i32; pub type rlim_t = i64; pub type sa_family_t = u16; -pub type socklen_t = u32; +pub type socklen_t = c_uint; pub type speed_t = usize; pub type suseconds_t = i32; pub type tcflag_t = u32; -pub type clockid_t = i32; +pub type clockid_t = c_int; pub type time_t = i64; -pub type wchar_t = i32; + +cfg_if! { + if #[cfg(any(target_arch = "riscv32", target_arch = "riscv64"))] { + pub type wchar_t = c_int; + } else if #[cfg(any(target_arch = "arm", target_arch = "aarch64"))] { + pub type wchar_t = c_uint; + } +} s! { + // sys/stat.h pub struct stat { pub st_dev: dev_t, pub st_ino: ino_t, @@ -50,11 +63,23 @@ s! { __reserved: Padding<[usize; __DEFAULT_RESERVED_SIZE__]>, } + // sys/socket.h pub struct sockaddr { pub sa_family: sa_family_t, pub sa_data: [u8; 14], } + pub struct msghdr { + pub msg_name: *mut c_void, + pub msg_namelen: socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_ulong, + pub msg_control: *mut c_void, + pub msg_controllen: c_ulong, + pub msg_flags: c_int, + } + + // pwd.h pub struct passwd { pub pw_name: *const c_char, pub pw_passwd: *const c_char, @@ -198,6 +223,7 @@ s! { __reserved: Padding<[usize; __DEFAULT_RESERVED_SIZE__]>, } + // netinet/in.h pub struct in_addr { pub s_addr: in_addr_t, } @@ -232,10 +258,22 @@ s! { pub imr_interface: in_addr, } + pub struct ip_mreqn { + pub imr_multiaddr: in_addr, + pub imr_address: in_addr, + pub imr_ifindex: c_uint, + } + pub struct ipv6_mreq { pub ipv6mr_multiaddr: in6_addr, pub ipv6mr_interface: u32, } + + pub struct ip_mreq_source { + pub imr_multiaddr: in_addr, + pub imr_interface: in_addr, + pub imr_sourceaddr: in_addr, + } } // Reserved two pointer size for reserved area for some structures. @@ -427,11 +465,14 @@ pub const ENOSHARE: i32 = 139; pub const ECASECLASH: i32 = 140; // fcntl.h +// fcntl() commands pub const FIOCLEX: i32 = 0x30b; -pub const F_SETFL: i32 = 0x9; pub const F_DUPFD_CLOEXEC: i32 = 0x12; pub const F_GETFD: i32 = 0x1; pub const F_GETFL: i32 = 0x2; +pub const F_SETFD: i32 = 8; +pub const F_SETFL: i32 = 9; +// open flag settings for open() (and related APIs) pub const O_RDONLY: i32 = 0x1; pub const O_WRONLY: i32 = 0x2; pub const O_RDWR: i32 = 0x3; @@ -478,32 +519,67 @@ pub const S_IXOTH: u32 = 0x001; // sys/poll.h pub const POLLIN: i16 = 0x01; +pub const POLLRDNORM: i16 = 0x01; +pub const POLLRDBAND: i16 = 0x01; +pub const POLLPRI: i16 = 0x02; pub const POLLOUT: i16 = 0x04; +pub const POLLWRNORM: i16 = 0x04; +pub const POLLWRBAND: i16 = 0x04; pub const POLLHUP: i16 = 0x10; +pub const POLLRDHUP: i16 = 0x10; pub const POLLERR: i16 = 0x08; pub const POLLNVAL: i16 = 0x20; // sys/socket.h +// Supported Protocol Families +pub const AF_UNSPEC: i32 = 0; pub const AF_UNIX: i32 = 1; -pub const SOCK_DGRAM: i32 = 2; -pub const SOCK_STREAM: i32 = 1; pub const AF_INET: i32 = 2; pub const AF_INET6: i32 = 10; -pub const MSG_PEEK: i32 = 0x02; +// The socket created by socket() has the indicated type, which specifies +// the communication semantics. +pub const SOCK_STREAM: i32 = 1; +pub const SOCK_DGRAM: i32 = 2; +pub const SOCK_RAW: i32 = 3; +pub const SOCK_RDM: i32 = 4; +pub const SOCK_SEQPACKET: i32 = 5; +pub const SOCK_CLOEXEC: i32 = 0o02000000; +pub const SOCK_NONBLOCK: i32 = 0o00004000; +// Bits in the FLAGS argument to `send', `recv', et al. These are the bits +// recognized by Linux, not all are supported by NuttX. +pub const MSG_OOB: i32 = 0x000001; +pub const MSG_PEEK: i32 = 0x000002; +pub const MSG_TRUNC: i32 = 0x000020; +pub const MSG_EOR: i32 = 0x000080; +// Protocol levels supported by get/setsockopt(): pub const SOL_SOCKET: i32 = 1; -pub const SHUT_WR: i32 = 2; -pub const SHUT_RD: i32 = 1; -pub const SHUT_RDWR: i32 = 3; +// Socket-level options +pub const SO_BROADCAST: i32 = 1; pub const SO_ERROR: i32 = 4; +pub const SO_KEEPALIVE: i32 = 5; +pub const SO_LINGER: i32 = 6; +pub const SO_OOBINLINE: i32 = 7; +pub const SO_RCVBUF: i32 = 8; +pub const SO_RCVTIMEO: i32 = 10; pub const SO_REUSEADDR: i32 = 11; +pub const SO_SNDBUF: i32 = 12; +pub const SO_SNDTIMEO: i32 = 14; +pub const SO_TYPE: i32 = 15; +// Protocol-level socket options may begin with this value +pub const __SO_PROTOCOL: i32 = 16; +// Values for the 'how' argument of shutdown() +pub const SHUT_RD: i32 = 1; +pub const SHUT_WR: i32 = 2; +pub const SHUT_RDWR: i32 = 3; +// The maximum backlog queue length pub const SOMAXCONN: i32 = 8; -pub const SO_LINGER: i32 = 6; -pub const SO_RCVTIMEO: i32 = 0xa; -pub const SO_SNDTIMEO: i32 = 0xe; -pub const SO_BROADCAST: i32 = 1; // netinet/tcp.h -pub const TCP_NODELAY: i32 = 0x10; +pub const TCP_NODELAY: i32 = __SO_PROTOCOL + 0; +pub const TCP_KEEPIDLE: i32 = __SO_PROTOCOL + 1; +pub const TCP_KEEPINTVL: i32 = __SO_PROTOCOL + 2; +pub const TCP_KEEPCNT: i32 = __SO_PROTOCOL + 3; +pub const TCP_MAXSEG: i32 = __SO_PROTOCOL + 4; // nuttx/fs/ioctl.h pub const FIONBIO: i32 = 0x30a; @@ -514,6 +590,10 @@ pub const _SC_THREAD_STACK_MIN: i32 = 0x58; pub const _SC_GETPW_R_SIZE_MAX: i32 = 0x25; pub const _SC_HOST_NAME_MAX: i32 = 0x26; +// sys/eventfd.h +pub const EFD_NONBLOCK: i32 = O_NONBLOCK; +pub const EFD_CLOEXEC: i32 = O_CLOEXEC; + // signal.h pub const SIGHUP: c_int = 1; pub const SIGINT: c_int = 2; @@ -552,15 +632,25 @@ pub const SIGSYS: c_int = 31; pub const PTHREAD_MUTEX_NORMAL: i32 = 0; // netinet/in.h -pub const IP_TTL: i32 = 0x1e; -pub const IPV6_V6ONLY: i32 = 0x17; -pub const IPV6_JOIN_GROUP: i32 = 0x11; -pub const IPV6_LEAVE_GROUP: i32 = 0x12; -pub const IP_MULTICAST_LOOP: i32 = 0x13; -pub const IPV6_MULTICAST_LOOP: i32 = 0x15; -pub const IP_MULTICAST_TTL: i32 = 0x12; -pub const IP_ADD_MEMBERSHIP: i32 = 0x14; -pub const IP_DROP_MEMBERSHIP: i32 = 0x15; +// SOL_IP protocol-level socket options. +pub const IP_MULTICAST_IF: i32 = __SO_PROTOCOL + 1; +pub const IP_MULTICAST_TTL: i32 = __SO_PROTOCOL + 2; +pub const IP_MULTICAST_LOOP: i32 = __SO_PROTOCOL + 3; +pub const IP_ADD_MEMBERSHIP: i32 = __SO_PROTOCOL + 4; +pub const IP_DROP_MEMBERSHIP: i32 = __SO_PROTOCOL + 5; +pub const IP_ADD_SOURCE_MEMBERSHIP: i32 = __SO_PROTOCOL + 8; +pub const IP_DROP_SOURCE_MEMBERSHIP: i32 = __SO_PROTOCOL + 9; +pub const IP_TOS: i32 = __SO_PROTOCOL + 13; +pub const IP_TTL: i32 = __SO_PROTOCOL + 14; +// SOL_IPV6 protocol-level socket options. +pub const IPV6_JOIN_GROUP: i32 = __SO_PROTOCOL + 1; +pub const IPV6_LEAVE_GROUP: i32 = __SO_PROTOCOL + 2; +pub const IPV6_MULTICAST_HOPS: i32 = __SO_PROTOCOL + 3; +pub const IPV6_MULTICAST_IF: i32 = __SO_PROTOCOL + 4; +pub const IPV6_MULTICAST_LOOP: i32 = __SO_PROTOCOL + 5; +pub const IPV6_UNICAST_HOPS: i32 = __SO_PROTOCOL + 6; +pub const IPV6_V6ONLY: i32 = __SO_PROTOCOL + 7; +pub const IPV6_RECVHOPLIMIT: i32 = __SO_PROTOCOL + 11; extern "C" { pub fn __errno() -> *mut c_int; @@ -591,4 +681,19 @@ extern "C" { pub fn getrandom(buf: *mut c_void, buflen: usize, flags: u32) -> isize; pub fn arc4random() -> u32; pub fn arc4random_buf(bytes: *mut c_void, nbytes: usize); + // string.h + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; + // sys/socket.h + pub fn accept4( + sockfd: c_int, + addr: *mut sockaddr, + addrlen: *mut socklen_t, + flags: c_int, + ) -> c_int; + pub fn recvmsg(sockfd: c_int, msg: *mut msghdr, flags: c_int) -> ssize_t; + pub fn sendmsg(sockfd: c_int, msg: *const msghdr, flags: c_int) -> ssize_t; + // sys/eventfd.h + pub fn eventfd(count: c_uint, flags: c_int) -> c_int; + // unistd.h + pub fn pipe2(fds: *mut c_int, flags: c_int) -> c_int; } diff --git a/thirdparty/crates/libc-0.2.186/src/unix/redox/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/redox/mod.rs similarity index 95% rename from thirdparty/crates/libc-0.2.186/src/unix/redox/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/redox/mod.rs index 691fe5c5f..774d7b0d3 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/redox/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/redox/mod.rs @@ -32,7 +32,7 @@ pub type uid_t = c_int; pub type gid_t = c_int; extern_ty! { - pub enum timezone {} + pub type timezone; } s! { @@ -333,6 +333,8 @@ cfg_if! { } // limits.h +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PATH_MAX: c_int = 4096; // fcntl.h @@ -345,6 +347,11 @@ pub const F_TLOCK: c_int = 2; pub const F_TEST: c_int = 3; pub const AT_FDCWD: c_int = -100; +pub const AT_SYMLINK_NOFOLLOW: c_int = 0x200; +pub const AT_REMOVEDIR: c_int = 0x200; +pub const AT_SYMLINK_FOLLOW: c_int = 0x2000; +pub const AT_EMPTY_PATH: c_int = 0x4000; +pub const AT_EACCESS: c_int = 0x400; // FIXME(redox): relibc { pub const RTLD_DEFAULT: *mut c_void = ptr::null_mut(); @@ -516,6 +523,7 @@ pub const O_SHLOCK: c_int = 0x0010_0000; pub const O_EXLOCK: c_int = 0x0020_0000; pub const O_ASYNC: c_int = 0x0040_0000; pub const O_FSYNC: c_int = 0x0080_0000; +pub const O_SYNC: c_int = O_FSYNC; pub const O_CLOEXEC: c_int = 0x0100_0000; pub const O_CREAT: c_int = 0x0200_0000; pub const O_TRUNC: c_int = 0x0400_0000; @@ -725,6 +733,8 @@ pub const S_IRWXO: c_int = 0o0007; pub const S_IROTH: c_int = 0o0004; pub const S_IWOTH: c_int = 0o0002; pub const S_IXOTH: c_int = 0o0001; +pub const UTIME_NOW: c_long = u32_cast_long(0xffffffff); +pub const UTIME_OMIT: c_long = u32_cast_long(0xfffffffe); // stdlib.h pub const EXIT_SUCCESS: c_int = 0; @@ -978,8 +988,7 @@ pub const WNOWAIT: c_int = 0x0100_0000; pub const __WNOTHREAD: c_int = 0x2000_0000; pub const __WALL: c_int = 0x4000_0000; -#[allow(overflowing_literals)] -pub const __WCLONE: c_int = 0x8000_0000; +pub const __WCLONE: c_int = u32_cast_int(0x8000_0000); // time.h pub const CLOCK_REALTIME: c_int = 1; @@ -1102,78 +1111,76 @@ pub const RENAME_NOREPLACE: c_uint = 1; f! { //sys/socket.h - pub const fn CMSG_ALIGN(len: size_t) -> size_t { + pub const unsafe fn CMSG_ALIGN(len: size_t) -> size_t { (len + size_of::() - 1) & !(size_of::() - 1) } - pub const fn CMSG_LEN(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(length: c_uint) -> c_uint { (CMSG_ALIGN(size_of::()) + length as usize) as c_uint } - pub const fn CMSG_SPACE(len: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(len: c_uint) -> c_uint { (CMSG_ALIGN(len as size_t) + CMSG_ALIGN(size_of::())) as c_uint } // wait.h - pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] &= !(1 << (fd % size)); return; } - pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0; } - pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; let size = size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] |= 1 << (fd % size); return; } - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in (*set).fds_bits.iter_mut() { - *slot = 0; - } + pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { + (*set).fds_bits.fill(0); } } safe_f! { - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0x7f } - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { (status >> 8) & 0xff } - pub const fn WIFCONTINUED(status: c_int) -> bool { + pub const safe fn WIFCONTINUED(status: c_int) -> bool { status == 0xffff } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { ((status & 0x7f) + 1) as i8 >= 2 } - pub const fn WTERMSIG(status: c_int) -> c_int { + pub const safe fn WTERMSIG(status: c_int) -> c_int { status & 0x7f } - pub const fn WIFEXITED(status: c_int) -> bool { + pub const safe fn WIFEXITED(status: c_int) -> bool { (status & 0x7f) == 0 } - pub const fn WEXITSTATUS(status: c_int) -> c_int { + pub const safe fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xff } - pub const fn WCOREDUMP(status: c_int) -> bool { + pub const safe fn WCOREDUMP(status: c_int) -> bool { (status & 0x80) != 0 } - pub const fn makedev(major: c_uint, minor: c_uint) -> dev_t { + pub const safe fn makedev(major: c_uint, minor: c_uint) -> dev_t { let major = major as dev_t; let minor = minor as dev_t; let mut dev = 0; @@ -1184,14 +1191,14 @@ safe_f! { dev } - pub const fn major(dev: dev_t) -> c_uint { + pub const safe fn major(dev: dev_t) -> c_uint { let mut major = 0; major |= (dev & 0x00000000000fff00) >> 8; major |= (dev & 0xfffff00000000000) >> 32; major as c_uint } - pub const fn minor(dev: dev_t) -> c_uint { + pub const safe fn minor(dev: dev_t) -> c_uint { let mut minor = 0; minor |= (dev & 0x00000000000000ff) >> 0; minor |= (dev & 0x00000ffffff00000) >> 12; @@ -1206,8 +1213,10 @@ extern "C" { // dirent.h pub fn dirfd(dirp: *mut crate::DIR) -> c_int; + pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); // unistd.h + pub fn faccessat(dirfd: c_int, pathname: *const c_char, mode: c_int, flags: c_int) -> c_int; pub fn pipe2(fds: *mut c_int, flags: c_int) -> c_int; pub fn getdtablesize() -> c_int; pub fn getresgid( @@ -1408,6 +1417,13 @@ extern "C" { // sys/stat.h pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: mode_t, dev: dev_t) -> c_int; + pub fn utimensat( + dirfd: c_int, + path: *const c_char, + times: *const crate::timespec, + flag: c_int, + ) -> c_int; // sys/uio.h pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; @@ -1420,6 +1436,7 @@ extern "C" { // time.h pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int; + pub fn clock_getres(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; pub fn strftime( s: *mut c_char, diff --git a/thirdparty/crates/libc-0.2.186/src/unix/solarish/compat.rs b/thirdparty/crates/libc-0.2.189/src/unix/solarish/compat.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/solarish/compat.rs rename to thirdparty/crates/libc-0.2.189/src/unix/solarish/compat.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/solarish/illumos.rs b/thirdparty/crates/libc-0.2.189/src/unix/solarish/illumos.rs similarity index 94% rename from thirdparty/crates/libc-0.2.186/src/unix/solarish/illumos.rs rename to thirdparty/crates/libc-0.2.189/src/unix/solarish/illumos.rs index 50e6302e7..7b8ce2c29 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/solarish/illumos.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/solarish/illumos.rs @@ -109,7 +109,11 @@ pub const FD_CLOFORK: c_int = 2; pub const FIL_ATTACH: c_int = 0x1; pub const FIL_DETACH: c_int = 0x2; pub const FIL_LIST: c_int = 0x3; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const FILNAME_MAX: c_int = 32; + pub const FILF_PROG: c_int = 0x1; pub const FILF_AUTO: c_int = 0x2; pub const FILF_BYPASS: c_int = 0x4; @@ -152,6 +156,8 @@ pub const LOCK_EX: c_int = 2; pub const LOCK_NB: c_int = 4; pub const LOCK_UN: c_int = 8; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const _PC_LAST: c_int = 101; pub const _CS_PATH: c_int = 65; @@ -169,7 +175,7 @@ pub const EPOLLWRBAND: c_int = 0x200; pub const EPOLLMSG: c_int = 0x400; pub const EPOLLERR: c_int = 0x8; pub const EPOLLHUP: c_int = 0x10; -pub const EPOLLET: c_int = 0x80000000; +pub const EPOLLET: c_int = u32_cast_int(0x80000000); pub const EPOLLRDHUP: c_int = 0x2000; pub const EPOLLONESHOT: c_int = 0x40000000; pub const EPOLLWAKEUP: c_int = 0x20000000; @@ -186,7 +192,10 @@ pub const PRIV_USER: c_uint = PRIV_DEBUG | PRIV_AWARE_RESET | PRIV_PFEXEC; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const LGRP_RSRC_COUNT: crate::lgrp_rsrc_t = 2; + pub const LGRP_RSRC_CPU: crate::lgrp_rsrc_t = 0; pub const LGRP_RSRC_MEM: crate::lgrp_rsrc_t = 1; @@ -207,6 +216,10 @@ pub const B4000000: crate::speed_t = 31; // sys/systeminfo.h pub const SI_ADDRESS_WIDTH: c_int = 520; +// netinet/in.h +pub const IP_MINTTL: c_int = 0x1c; +pub const IPV6_MINHOPCOUNT: c_int = 0x2f; + // sys/timerfd.h pub const TFD_CLOEXEC: i32 = 0o2000000; pub const TFD_NONBLOCK: i32 = 0o4000; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/solarish/mod.rs b/thirdparty/crates/libc-0.2.189/src/unix/solarish/mod.rs similarity index 97% rename from thirdparty/crates/libc-0.2.186/src/unix/solarish/mod.rs rename to thirdparty/crates/libc-0.2.189/src/unix/solarish/mod.rs index 494ecdb7d..b08e8a408 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/solarish/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/solarish/mod.rs @@ -56,8 +56,8 @@ pub type posix_spawnattr_t = *mut c_void; pub type posix_spawn_file_actions_t = *mut c_void; extern_ty! { - pub enum timezone {} - pub enum ucred_t {} + pub type timezone; + pub type ucred_t; } s! { @@ -823,6 +823,8 @@ pub const NOEXPR: crate::nl_item = 57; pub const _DATE_FMT: crate::nl_item = 58; pub const MAXSTRMSG: crate::nl_item = 58; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PATH_MAX: c_int = 1024; pub const SA_ONSTACK: c_int = 0x00000001; @@ -839,9 +841,9 @@ pub const SS_DISABLE: c_int = 2; pub const FIOCLEX: c_int = 0x20006601; pub const FIONCLEX: c_int = 0x20006602; pub const FIONREAD: c_int = 0x4004667f; -pub const FIONBIO: c_int = 0x8004667e; -pub const FIOASYNC: c_int = 0x8004667d; -pub const FIOSETOWN: c_int = 0x8004667c; +pub const FIONBIO: c_int = u32_cast_int(0x8004667e); +pub const FIOASYNC: c_int = u32_cast_int(0x8004667d); +pub const FIOSETOWN: c_int = u32_cast_int(0x8004667c); pub const FIOGETOWN: c_int = 0x4004667b; pub const SIGCHLD: c_int = 18; @@ -882,6 +884,7 @@ pub const IPV6_MULTICAST_IF: c_int = 0x6; pub const IPV6_MULTICAST_HOPS: c_int = 0x7; pub const IPV6_MULTICAST_LOOP: c_int = 0x8; pub const IPV6_PKTINFO: c_int = 0xb; +pub const IPV6_HOPLIMIT: c_int = 0xc; pub const IPV6_RECVPKTINFO: c_int = 0x12; pub const IPV6_RECVTCLASS: c_int = 0x19; pub const IPV6_DONTFRAG: c_int = 0x21; @@ -1031,7 +1034,7 @@ pub const WSTOPPED: c_int = WUNTRACED; pub const WCONTINUED: c_int = 0x08; pub const WNOWAIT: c_int = 0x80; -pub const AT_FDCWD: c_int = 0xffd19553; +pub const AT_FDCWD: c_int = u32_cast_int(0xffd19553); pub const AT_SYMLINK_NOFOLLOW: c_int = 0x1000; pub const AT_SYMLINK_FOLLOW: c_int = 0x2000; pub const AT_REMOVEDIR: c_int = 0x1; @@ -1234,6 +1237,8 @@ pub const EAI_SOCKTYPE: c_int = 10; pub const EAI_SYSTEM: c_int = 11; pub const EAI_OVERFLOW: c_int = 12; +pub const AI_CANONNAME: c_int = 0x0010; + pub const NI_NOFQDN: c_uint = 0x0001; pub const NI_NUMERICHOST: c_uint = 0x0002; pub const NI_NAMEREQD: c_uint = 0x0004; @@ -1304,15 +1309,16 @@ pub const SIGSTKSZ: size_t = 8192; // https://illumos.org/man/3c/clock_gettime // https://github.com/illumos/illumos-gate/ // blob/HEAD/usr/src/lib/libc/amd64/sys/__clock_gettime.s -// clock_gettime(3c) doesn't seem to accept anything other than CLOCK_REALTIME -// or __CLOCK_REALTIME0 // // https://github.com/illumos/illumos-gate/ // blob/HEAD/usr/src/uts/common/sys/time_impl.h // Confusing! CLOCK_HIGHRES==CLOCK_MONOTONIC==4 // __CLOCK_REALTIME0==0 is an obsoleted version of CLOCK_REALTIME==3 +// CLOCK_PROF==CLOCK_THREAD_CPUTIME_ID==2 (distinct from CLOCK_VIRTUAL==1) pub const CLOCK_REALTIME: crate::clockid_t = 3; pub const CLOCK_MONOTONIC: crate::clockid_t = 4; +pub const CLOCK_PROCESS_CPUTIME_ID: crate::clockid_t = 5; +pub const CLOCK_THREAD_CPUTIME_ID: crate::clockid_t = 2; pub const TIMER_RELTIME: c_int = 0; pub const TIMER_ABSTIME: c_int = 1; @@ -1533,8 +1539,8 @@ pub const IFF_NOFAILOVER: c_int = 0x0008000000; // in.mpathd test address pub const IFF_FAILED: c_int = 0x0010000000; // Interface has failed pub const IFF_STANDBY: c_int = 0x0020000000; // Interface is a hot-spare pub const IFF_INACTIVE: c_int = 0x0040000000; // Functioning but not used -pub const IFF_OFFLINE: c_int = 0x0080000000; // Interface is offline - // If CoS marking is supported +pub const IFF_OFFLINE: c_int = u32_cast_int(0x0080000000); // Interface is offline + // If CoS marking is supported pub const IFF_COS_ENABLED: c_longlong = 0x0200000000; pub const IFF_PREFERRED: c_longlong = 0x0400000000; // Prefer as source addr. pub const IFF_TEMPORARY: c_longlong = 0x0800000000; // RFC3041 @@ -1820,6 +1826,10 @@ pub const PORT_SOURCE_ALERT: c_int = 5; pub const PORT_SOURCE_MQ: c_int = 6; pub const PORT_SOURCE_FILE: c_int = 7; +pub const PORT_ALERT_SET: c_int = 0x01; +pub const PORT_ALERT_UPDATE: c_int = 0x02; +pub const PORT_ALERT_INVALID: c_int = PORT_ALERT_SET | PORT_ALERT_UPDATE; + pub const NONROOT_USR: c_short = 2; pub const EMPTY: c_short = 0; @@ -2208,23 +2218,23 @@ const fn _CMSG_DATA_ALIGN(p: usize) -> usize { } f! { - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { _CMSG_DATA_ALIGN(cmsg.offset(1) as usize) as *mut c_uchar } - pub const fn CMSG_LEN(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(length: c_uint) -> c_uint { _CMSG_DATA_ALIGN(size_of::()) as c_uint + length } - pub fn CMSG_FIRSTHDR(mhdr: *const crate::msghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_FIRSTHDR(mhdr: *const crate::msghdr) -> *mut cmsghdr { if ((*mhdr).msg_controllen as usize) < size_of::() { - core::ptr::null_mut::() + ptr::null_mut() } else { - (*mhdr).msg_control as *mut cmsghdr + (*mhdr).msg_control.cast::() } } - pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if cmsg.is_null() { return crate::CMSG_FIRSTHDR(mhdr); } @@ -2232,85 +2242,83 @@ f! { _CMSG_HDR_ALIGN(cmsg as usize + (*cmsg).cmsg_len as usize + size_of::()); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next > max { - core::ptr::null_mut::() + ptr::null_mut() } else { _CMSG_HDR_ALIGN(cmsg as usize + (*cmsg).cmsg_len as usize) as *mut cmsghdr } } - pub const fn CMSG_SPACE(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(length: c_uint) -> c_uint { _CMSG_HDR_ALIGN(size_of::() as usize + length as usize) as c_uint } - pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let bits = size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); return; } - pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let bits = size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0; } - pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let bits = size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] |= 1 << (fd % bits); return; } - pub fn FD_ZERO(set: *mut fd_set) -> () { - for slot in (*set).fds_bits.iter_mut() { - *slot = 0; - } + pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { + (*set).fds_bits.fill(0); } } safe_f! { - pub fn SIGRTMAX() -> c_int { + pub safe fn SIGRTMAX() -> c_int { unsafe { crate::sysconf(_SC_SIGRT_MAX) as c_int } } - pub fn SIGRTMIN() -> c_int { + pub safe fn SIGRTMIN() -> c_int { unsafe { crate::sysconf(_SC_SIGRT_MIN) as c_int } } - pub const fn WIFEXITED(status: c_int) -> bool { + pub const safe fn WIFEXITED(status: c_int) -> bool { (status & 0xFF) == 0 } - pub const fn WEXITSTATUS(status: c_int) -> c_int { + pub const safe fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xFF } - pub const fn WTERMSIG(status: c_int) -> c_int { + pub const safe fn WTERMSIG(status: c_int) -> c_int { status & 0x7F } - pub const fn WIFCONTINUED(status: c_int) -> bool { + pub const safe fn WIFCONTINUED(status: c_int) -> bool { (status & 0xffff) == 0xffff } - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { (status & 0xff00) >> 8 } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { ((status & 0xff) > 0) && (status & 0xff00 == 0) } - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { ((status & 0xff) == 0x7f) && ((status & 0xff00) != 0) } - pub const fn WCOREDUMP(status: c_int) -> bool { + pub const safe fn WCOREDUMP(status: c_int) -> bool { (status & 0x80) != 0 } - pub const fn MR_GET_TYPE(flags: c_uint) -> c_uint { + pub const safe fn MR_GET_TYPE(flags: c_uint) -> c_uint { flags & 0x0000ffff } } @@ -2656,6 +2664,7 @@ extern "C" { events: c_int, user: *mut c_void, ) -> c_int; + pub fn port_alert(port: c_int, flags: c_int, events: c_int, user: *mut c_void) -> c_int; #[cfg_attr( any(target_os = "solaris", target_os = "illumos"), link_name = "__posix_getgrgid_r" diff --git a/thirdparty/crates/libc-0.2.186/src/unix/solarish/solaris.rs b/thirdparty/crates/libc-0.2.189/src/unix/solarish/solaris.rs similarity index 98% rename from thirdparty/crates/libc-0.2.186/src/unix/solarish/solaris.rs rename to thirdparty/crates/libc-0.2.189/src/unix/solarish/solaris.rs index 2b9ace5e9..b336c316b 100644 --- a/thirdparty/crates/libc-0.2.186/src/unix/solarish/solaris.rs +++ b/thirdparty/crates/libc-0.2.189/src/unix/solarish/solaris.rs @@ -132,6 +132,8 @@ pub const F_DUPFD_CLOFORK: c_int = 49; pub const F_DUP2FD_CLOEXEC: c_int = 48; pub const F_DUP2FD_CLOFORK: c_int = 50; +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const _PC_LAST: c_int = 102; pub const PRIV_PROC_SENSITIVE: c_uint = 0x0008; diff --git a/thirdparty/crates/libc-0.2.186/src/unix/solarish/x86.rs b/thirdparty/crates/libc-0.2.189/src/unix/solarish/x86.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/solarish/x86.rs rename to thirdparty/crates/libc-0.2.189/src/unix/solarish/x86.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/solarish/x86_64.rs b/thirdparty/crates/libc-0.2.189/src/unix/solarish/x86_64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/solarish/x86_64.rs rename to thirdparty/crates/libc-0.2.189/src/unix/solarish/x86_64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/unix/solarish/x86_common.rs b/thirdparty/crates/libc-0.2.189/src/unix/solarish/x86_common.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/unix/solarish/x86_common.rs rename to thirdparty/crates/libc-0.2.189/src/unix/solarish/x86_common.rs diff --git a/thirdparty/crates/libc-0.2.186/src/vxworks/aarch64.rs b/thirdparty/crates/libc-0.2.189/src/vxworks/aarch64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/vxworks/aarch64.rs rename to thirdparty/crates/libc-0.2.189/src/vxworks/aarch64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/vxworks/arm.rs b/thirdparty/crates/libc-0.2.189/src/vxworks/arm.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/vxworks/arm.rs rename to thirdparty/crates/libc-0.2.189/src/vxworks/arm.rs diff --git a/thirdparty/crates/libc-0.2.186/src/vxworks/mod.rs b/thirdparty/crates/libc-0.2.189/src/vxworks/mod.rs similarity index 97% rename from thirdparty/crates/libc-0.2.186/src/vxworks/mod.rs rename to thirdparty/crates/libc-0.2.189/src/vxworks/mod.rs index bc4d53689..27e0c122b 100644 --- a/thirdparty/crates/libc-0.2.186/src/vxworks/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/vxworks/mod.rs @@ -1,13 +1,15 @@ //! Interface to VxWorks C library -use core::ptr::null_mut; - use crate::prelude::*; extern_ty! { - pub enum DIR {} + pub type DIR; } +// Deprecated impls: see #5296 +unsafe impl Send for DIR {} +unsafe impl Sync for DIR {} + pub type intmax_t = i64; pub type uintmax_t = u64; @@ -60,7 +62,12 @@ pub type pthread_key_t = c_ulong; // From b_off_t.h pub type off_t = c_longlong; -pub type off64_t = off_t; + +#[deprecated( + since = "0.2.187", + note = "Kernel mode definitions are unsupported. Use `off_t` instead." +)] +pub type off64_t = c_longlong; // From b_BOOL.h pub type BOOL = c_int; @@ -95,7 +102,7 @@ pub type sa_family_t = c_uchar; pub type mqd_t = c_int; extern_ty! { - pub enum _Vx_semaphore {} + pub type _Vx_semaphore; } impl siginfo_t { @@ -689,9 +696,9 @@ pub const TIMER_ABSTIME: c_int = 0x1; pub const TIMER_RELTIME: c_int = 0x0; // PTHREAD STUFF -pub const PTHREAD_INITIALIZED_OBJ: c_int = 0xF70990EF; +pub const PTHREAD_INITIALIZED_OBJ: c_int = u32_cast_int(0xF70990EF); pub const PTHREAD_DESTROYED_OBJ: c_int = -1; -pub const PTHREAD_VALID_OBJ: c_int = 0xEC542A37; +pub const PTHREAD_VALID_OBJ: c_int = u32_cast_int(0xEC542A37); pub const PTHREAD_INVALID_OBJ: c_int = -1; pub const PTHREAD_UNUSED_YET_OBJ: c_int = -1; @@ -704,6 +711,9 @@ pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 1; pub const PTHREAD_MUTEX_RECURSIVE: c_int = 2; pub const PTHREAD_MUTEX_DEFAULT: c_int = PTHREAD_MUTEX_NORMAL; pub const PTHREAD_STACK_MIN: usize = 4096; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const _PTHREAD_SHARED_SEM_NAME_MAX: usize = 30; //sched.h @@ -1043,6 +1053,9 @@ pub const AF_SOCKDEV: c_int = 31; pub const AF_TIPC: c_int = 33; pub const AF_MIPC: c_int = 34; pub const AF_MIPC_SAFE: c_int = 35; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const AF_MAX: c_int = 39; // termios.h @@ -1170,10 +1183,13 @@ pub const FIODISKCHANGE: c_int = 13; pub const FIOCANCEL: c_int = 14; pub const FIOSQUEEZE: c_int = 15; pub const FIOGETNAME: c_int = 18; -pub const FIONBIO: c_int = 0x90040010; +pub const FIONBIO: c_int = u32_cast_int(0x90040010); // limits.h +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const PATH_MAX: c_int = _PARM_PATH_MAX; + pub const _POSIX_PATH_MAX: c_int = 256; // Some poll stuff @@ -1317,7 +1333,12 @@ pub const AT_REMOVEDIR: c_int = 0x200; pub const AT_SYMLINK_FOLLOW: c_int = 0x400; // vxParams.h definitions +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const _PARM_NAME_MAX: c_int = 255; + +/// Constants may change across releases. See the [usage guidelines](crate#usage-guidelines) +/// for details. pub const _PARM_PATH_MAX: c_int = 1024; // WAIT STUFF @@ -1333,7 +1354,7 @@ const PTHREAD_MUTEXATTR_INITIALIZER: pthread_mutexattr_t = pthread_mutexattr_t { mutexAttrPshared: 1, }; pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { - mutexSemId: null_mut(), + mutexSemId: ptr::null_mut(), mutexValid: PTHREAD_VALID_OBJ, mutexInitted: PTHREAD_UNUSED_YET_OBJ, mutexCondRefCount: 0, @@ -1343,16 +1364,16 @@ pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { }; const PTHREAD_CONDATTR_INITIALIZER: pthread_condattr_t = pthread_condattr_t { - condAttrStatus: 0xf70990ef, + condAttrStatus: u32_cast_int(0xf70990ef), condAttrPshared: 1, condAttrClockId: CLOCK_REALTIME, }; pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { - condSemId: null_mut(), + condSemId: ptr::null_mut(), condValid: PTHREAD_VALID_OBJ, condInitted: PTHREAD_UNUSED_YET_OBJ, condRefCount: 0, - condMutex: null_mut(), + condMutex: ptr::null_mut(), condAttr: PTHREAD_CONDATTR_INITIALIZER, condSemName: [0; _PTHREAD_SHARED_SEM_NAME_MAX], }; @@ -1364,7 +1385,7 @@ const PTHREAD_RWLOCKATTR_INITIALIZER: pthread_rwlockattr_t = pthread_rwlockattr_ rwlockAttrConformOpt: 1, }; pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { - rwlockSemId: null_mut(), + rwlockSemId: ptr::null_mut(), rwlockReadersRefCount: 0, rwlockValid: PTHREAD_VALID_OBJ, rwlockInitted: PTHREAD_UNUSED_YET_OBJ, @@ -1431,20 +1452,20 @@ pub const MS_INVALIDATE: c_int = 0x0004; pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; // sys/ttycom.h -pub const TIOCGWINSZ: c_int = 0x1740087468; +pub const TIOCGWINSZ: i64 = 0x1740087468; pub const TIOCSWINSZ: c_int = -0x7ff78b99; extern_ty! { - pub enum FILE {} - pub enum fpos_t {} // FIXME(vxworks): fill this out with a struct + pub type FILE; + pub type fpos_t; // FIXME(vxworks): fill this out with a struct } f! { - pub const fn CMSG_ALIGN(len: usize) -> usize { + pub const unsafe fn CMSG_ALIGN(len: usize) -> usize { len + size_of::() - 1 & !(size_of::() - 1) } - pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { let next = cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize) + CMSG_ALIGN(size_of::()); @@ -1452,27 +1473,27 @@ f! { if next <= max { (cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr } else { - core::ptr::null_mut::() + ptr::null_mut() } } - pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { + pub unsafe fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { if (*mhdr).msg_controllen as usize > 0 { - (*mhdr).msg_control as *mut cmsghdr + (*mhdr).msg_control.cast() } else { - core::ptr::null_mut::() + ptr::null_mut() } } - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + pub unsafe fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { (cmsg as *mut c_uchar).offset(CMSG_ALIGN(size_of::()) as isize) } - pub const fn CMSG_SPACE(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_SPACE(length: c_uint) -> c_uint { (CMSG_ALIGN(length as usize) + CMSG_ALIGN(size_of::())) as c_uint } - pub const fn CMSG_LEN(length: c_uint) -> c_uint { + pub const unsafe fn CMSG_LEN(length: c_uint) -> c_uint { CMSG_ALIGN(size_of::()) as c_uint + length } } @@ -2393,37 +2414,30 @@ extern "C" { // wait.h macros safe_f! { - pub const fn WIFEXITED(status: c_int) -> bool { + pub const safe fn WIFEXITED(status: c_int) -> bool { (status & 0xFF00) == 0 } - pub const fn WIFSIGNALED(status: c_int) -> bool { + pub const safe fn WIFSIGNALED(status: c_int) -> bool { (status & 0xFF00) != 0 } - pub const fn WIFSTOPPED(status: c_int) -> bool { + pub const safe fn WIFSTOPPED(status: c_int) -> bool { (status & 0xFF0000) != 0 } - pub const fn WEXITSTATUS(status: c_int) -> c_int { + pub const safe fn WEXITSTATUS(status: c_int) -> c_int { status & 0xFF } - pub const fn WIFCONTINUED(status: c_int) -> c_int { + pub const safe fn WIFCONTINUED(status: c_int) -> c_int { (status >> 24) & 0xFF } - pub const fn WTERMSIG(status: c_int) -> c_int { + pub const safe fn WTERMSIG(status: c_int) -> c_int { (status >> 8) & 0xFF } - pub const fn WSTOPSIG(status: c_int) -> c_int { + pub const safe fn WSTOPSIG(status: c_int) -> c_int { (status >> 16) & 0xFF } } -pub fn pread(_fd: c_int, _buf: *mut c_void, _count: size_t, _offset: off64_t) -> ssize_t { - -1 -} - -pub fn pwrite(_fd: c_int, _buf: *const c_void, _count: size_t, _offset: off64_t) -> ssize_t { - -1 -} -pub fn posix_memalign(memptr: *mut *mut c_void, align: size_t, size: size_t) -> c_int { +pub unsafe fn posix_memalign(memptr: *mut *mut c_void, align: size_t, size: size_t) -> c_int { // check to see if align is a power of 2 and if align is a multiple // of sizeof(void *) if (align & align - 1 != 0) || (align as usize % size_of::() != 0) { diff --git a/thirdparty/crates/libc-0.2.186/src/vxworks/powerpc.rs b/thirdparty/crates/libc-0.2.189/src/vxworks/powerpc.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/vxworks/powerpc.rs rename to thirdparty/crates/libc-0.2.189/src/vxworks/powerpc.rs diff --git a/thirdparty/crates/libc-0.2.186/src/vxworks/powerpc64.rs b/thirdparty/crates/libc-0.2.189/src/vxworks/powerpc64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/vxworks/powerpc64.rs rename to thirdparty/crates/libc-0.2.189/src/vxworks/powerpc64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/vxworks/riscv32.rs b/thirdparty/crates/libc-0.2.189/src/vxworks/riscv32.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/vxworks/riscv32.rs rename to thirdparty/crates/libc-0.2.189/src/vxworks/riscv32.rs diff --git a/thirdparty/crates/libc-0.2.186/src/vxworks/riscv64.rs b/thirdparty/crates/libc-0.2.189/src/vxworks/riscv64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/vxworks/riscv64.rs rename to thirdparty/crates/libc-0.2.189/src/vxworks/riscv64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/vxworks/x86.rs b/thirdparty/crates/libc-0.2.189/src/vxworks/x86.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/vxworks/x86.rs rename to thirdparty/crates/libc-0.2.189/src/vxworks/x86.rs diff --git a/thirdparty/crates/libc-0.2.186/src/vxworks/x86_64.rs b/thirdparty/crates/libc-0.2.189/src/vxworks/x86_64.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/vxworks/x86_64.rs rename to thirdparty/crates/libc-0.2.189/src/vxworks/x86_64.rs diff --git a/thirdparty/crates/libc-0.2.186/src/wasi/mod.rs b/thirdparty/crates/libc-0.2.189/src/wasi/mod.rs similarity index 98% rename from thirdparty/crates/libc-0.2.186/src/wasi/mod.rs rename to thirdparty/crates/libc-0.2.189/src/wasi/mod.rs index e580df52a..9bce09655 100644 --- a/thirdparty/crates/libc-0.2.186/src/wasi/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/wasi/mod.rs @@ -14,7 +14,7 @@ pub type ssize_t = isize; pub type ptrdiff_t = isize; pub type intptr_t = isize; pub type uintptr_t = usize; -pub type off_t = i64; +pub type off_t = c_longlong; pub type pid_t = i32; pub type clock_t = c_longlong; pub type time_t = c_longlong; @@ -45,15 +45,15 @@ s_no_extra_traits! { } } -#[allow(missing_copy_implementations)] -#[derive(Debug)] -pub enum FILE {} -#[allow(missing_copy_implementations)] -#[derive(Debug)] -pub enum DIR {} -#[allow(missing_copy_implementations)] -#[derive(Debug)] -pub enum __locale_struct {} +extern_ty! { + pub type FILE; + pub type DIR; + pub type __locale_struct; +} + +// Deprecated impls: see #5296 +unsafe impl Send for DIR {} +unsafe impl Sync for DIR {} s_paren! { // in wasi-libc clockid_t is const struct __clockid* (where __clockid is an opaque struct), @@ -274,8 +274,8 @@ pub const AT_EACCESS: c_int = 0x0; pub const AT_SYMLINK_NOFOLLOW: c_int = 0x1; pub const AT_SYMLINK_FOLLOW: c_int = 0x2; pub const AT_REMOVEDIR: c_int = 0x4; -pub const UTIME_OMIT: c_long = 0xfffffffe; -pub const UTIME_NOW: c_long = 0xffffffff; +pub const UTIME_OMIT: c_long = u32_cast_long(0xfffffffe); +pub const UTIME_NOW: c_long = u32_cast_long(0xffffffff); pub const S_IFIFO: mode_t = 0o1_0000; pub const S_IFCHR: mode_t = 0o2_0000; pub const S_IFBLK: mode_t = 0o6_0000; @@ -619,13 +619,13 @@ pub const PTHREAD_STACK_MIN: usize = 2048; pub const TIMER_ABSTIME: c_int = 1; f! { - pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + pub unsafe fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let set = &*set; let n = set.__nfds; return set.__fds[..n].iter().any(|p| *p == fd); } - pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + pub unsafe fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let set = &mut *set; let n = set.__nfds; if !set.__fds[..n].iter().any(|p| *p == fd) { @@ -634,7 +634,7 @@ f! { } } - pub fn FD_ZERO(set: *mut fd_set) -> () { + pub unsafe fn FD_ZERO(set: *mut fd_set) -> () { (*set).__nfds = 0; return; } diff --git a/thirdparty/crates/libc-0.2.186/src/wasi/p2.rs b/thirdparty/crates/libc-0.2.189/src/wasi/p2.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/wasi/p2.rs rename to thirdparty/crates/libc-0.2.189/src/wasi/p2.rs diff --git a/thirdparty/crates/libc-0.2.186/src/windows/gnu/mod.rs b/thirdparty/crates/libc-0.2.189/src/windows/gnu/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/windows/gnu/mod.rs rename to thirdparty/crates/libc-0.2.189/src/windows/gnu/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/windows/mod.rs b/thirdparty/crates/libc-0.2.189/src/windows/mod.rs similarity index 92% rename from thirdparty/crates/libc-0.2.186/src/windows/mod.rs rename to thirdparty/crates/libc-0.2.189/src/windows/mod.rs index 612c0ee11..67e8df3b4 100644 --- a/thirdparty/crates/libc-0.2.186/src/windows/mod.rs +++ b/thirdparty/crates/libc-0.2.189/src/windows/mod.rs @@ -19,7 +19,13 @@ pub type clock_t = i32; pub type errno_t = c_int; cfg_if! { - if #[cfg(all(target_arch = "x86", target_env = "gnu"))] { + // FIXME(1.0): Windows GNU has 64-bit `time_t` by default. In x86 this is + // wrongly bound. + if #[cfg(all( + target_arch = "x86", + target_env = "gnu", + not(gnu_time_bits64) + ))] { pub type time_t = i32; } else { pub type time_t = i64; @@ -31,7 +37,7 @@ pub type dev_t = u32; pub type ino_t = u16; extern_ty! { - pub enum timezone {} + pub type timezone; } pub type time64_t = i64; @@ -254,8 +260,8 @@ pub const TMP_MAX: c_uint = 0x7fff_ffff; extern "C" {} extern_ty! { - pub enum FILE {} - pub enum fpos_t {} // FIXME(windows): fill this out with a struct + pub type FILE; + pub type fpos_t; // FIXME(windows): fill this out with a struct } // Special handling for all print and scan type functions because of https://github.com/rust-lang/libc/issues/2860 @@ -397,11 +403,40 @@ extern "C" { pub fn signal(signum: c_int, handler: sighandler_t) -> sighandler_t; pub fn raise(signum: c_int) -> c_int; + // By default, the following link to 64-bit variants where the expected + // `time_t` is also 64-bits. + // + // Under Windows x86 with GNU, `time_t` is still 32-bit wide on stable, so + // these routines have to link with their 32-bit variants. + cfg_if! { + if #[cfg(all( + target_arch = "x86", + target_env = "gnu", + not(gnu_time_bits64), + ))] { + #[link_name = "_ctime32"] + pub fn ctime(sourceTime: *const time_t) -> *mut c_char; + #[link_name = "_difftime32"] + pub fn difftime(timeEnd: time_t, timeStart: time_t) -> c_double; + #[link_name = "_gmtime32_s"] + pub fn gmtime_s(destTime: *mut tm, srcTime: *const time_t) -> c_int; + #[link_name = "_localtime32_s"] + pub fn localtime_s(tmDest: *mut tm, sourceTime: *const time_t) -> crate::errno_t; + #[link_name = "_time32"] + pub fn time(destTime: *mut time_t) -> time_t; + } else { + pub fn ctime(sourceTime: *const time_t) -> *mut c_char; + pub fn difftime(timeEnd: time_t, timeStart: time_t) -> c_double; + #[link_name = "_gmtime64_s"] + pub fn gmtime_s(destTime: *mut tm, srcTime: *const time_t) -> c_int; + #[link_name = "_localtime64_s"] + pub fn localtime_s(tmDest: *mut tm, sourceTime: *const time_t) -> crate::errno_t; + #[link_name = "_time64"] + pub fn time(destTime: *mut time_t) -> time_t; + } + } + pub fn clock() -> clock_t; - pub fn ctime(sourceTime: *const time_t) -> *mut c_char; - pub fn difftime(timeEnd: time_t, timeStart: time_t) -> c_double; - #[link_name = "_gmtime64_s"] - pub fn gmtime_s(destTime: *mut tm, srcTime: *const time_t) -> c_int; #[link_name = "_get_daylight"] pub fn get_daylight(hours: *mut c_int) -> errno_t; #[link_name = "_get_dstbias"] @@ -415,10 +450,6 @@ extern "C" { size_in_bytes: size_t, index: c_int, ) -> errno_t; - #[link_name = "_localtime64_s"] - pub fn localtime_s(tmDest: *mut tm, sourceTime: *const time_t) -> crate::errno_t; - #[link_name = "_time64"] - pub fn time(destTime: *mut time_t) -> time_t; #[link_name = "_tzset"] pub fn tzset(); #[link_name = "_chmod"] diff --git a/thirdparty/crates/libc-0.2.186/src/windows/msvc/mod.rs b/thirdparty/crates/libc-0.2.189/src/windows/msvc/mod.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/windows/msvc/mod.rs rename to thirdparty/crates/libc-0.2.189/src/windows/msvc/mod.rs diff --git a/thirdparty/crates/libc-0.2.186/src/xous.rs b/thirdparty/crates/libc-0.2.189/src/xous.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/src/xous.rs rename to thirdparty/crates/libc-0.2.189/src/xous.rs diff --git a/thirdparty/crates/libc-0.2.186/tests/const_fn.rs b/thirdparty/crates/libc-0.2.189/tests/const_fn.rs similarity index 100% rename from thirdparty/crates/libc-0.2.186/tests/const_fn.rs rename to thirdparty/crates/libc-0.2.189/tests/const_fn.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/.cargo-checksum.json b/thirdparty/crates/num-bigint-0.4.8/.cargo-checksum.json deleted file mode 100644 index 5d58de1b9..000000000 --- a/thirdparty/crates/num-bigint-0.4.8/.cargo-checksum.json +++ /dev/null @@ -1 +0,0 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"59e02c98c1fa213b98a1dc0609b83e81fff5a4637773f4af1bcb805ff5f87615","Cargo.lock":"65b53d2baf7b6abfad1047544ce4db3b2217e743402a2c0044595db315ce5ad9","Cargo.toml":"fcb19e142df64dc58a459ba33e1e22c1551497962f8037ed98df124d749f28f1","Cargo.toml.orig":"62010089fd0c2ef0106c006dfe18bc07d01152a0d761b026de2a3b409308c831","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"4e13261f3e330cebe41e18dd3c87c47805b89e626c702f5421c6e8f996552fe3","RELEASES.md":"e757ffe2a62354aa308855177dd195c19f561102fa99550c941da292490491b1","benches/bigint.rs":"6c61937c1edfe68ec9e640aa8dbf3ef3a2dd81a66cc5a7c7468f55d81a8a2449","benches/factorial.rs":"ed1d276a780e7e5fe79121b941c22a00c2854dbf92fd8a5372619853ba0c13b7","benches/gcd.rs":"3cc1a3356f680a6fa625f0ece0c8dd778f4091a53a31177f2870ef9a6c858c7d","benches/rng/mod.rs":"38144fc8283955db4be72a1533328fded98986d6f9d0bc7da0b306f7d4b5ca43","benches/roots.rs":"b31846852a7215c26df228940f2e469aff32fa8805eccc2b5ee5e7280ef0eeb4","benches/shootout-pidigits.rs":"c2a48133f5b679928f7e3f4e764c78aaa8c5b811f58b86fe57fae8c63cb07136","src/big_digit.rs":"b70899171a1850714ede4a1ea2cb387bd9245ab2d8dfa8ae47e533a6cf95acc1","src/bigint.rs":"bbed782925af8f9a3c15a02f94154548df92f37aee6b8593597d192533f25c13","src/bigint/addition.rs":"cdc28e59a5dc6fe7dbad2d8d9514b49fe1bea061e82ebefe89c518f448dc8ba9","src/bigint/arbitrary.rs":"9fb1f7f8bbc7a792d19d4c30ed2671ed2d73847d57e5f65380ae31e5db0146c6","src/bigint/bits.rs":"2cf9d05059224ecea8927f6d3c5025ebf78460e39f36e332128359abe7308be4","src/bigint/convert.rs":"da5ff804ae7be9b88b1f59837d4acad6fda6f39eb97c9fb63c1a7bd35ea2729f","src/bigint/division.rs":"dea89b4efb06b77bbbf07036c454d52f4d026658bcbacad1d15302c93d61b3dd","src/bigint/multiplication.rs":"096ef437f5a3ac97320a77b2745cdf313cf908c6f140e893b18bd98aad71e73c","src/bigint/power.rs":"a3823654f022014c5ce2dc2fd97afa6696589d32a54cc4ec65e6c113e8613672","src/bigint/serde.rs":"a7275341ec518f27f4d955e95b6e302b786944e9462bf0c17c7087d073212943","src/bigint/shift.rs":"3f28bca2d52621133cdf567290645d30a746e663d8dacea29c172b5ed7ff3538","src/bigint/subtraction.rs":"c2aa7e0fbfc7747099d0eec77efdedaa8d79cff88b1587d640d6b1c3c7dc0e4a","src/bigrand.rs":"115ab17de1c909b22bf20374b31cf5b1e9b28cd4914bf8cd6852375c35d6a027","src/biguint.rs":"b2a37538d35c0e7683ce3d311109a7dd59cf498635855598c42b2267c0ce5384","src/biguint/addition.rs":"3361e240f8c77eb07ad4674c3f21fecdceeb98cb3ebad94bf02715fcf72f8cf7","src/biguint/arbitrary.rs":"f978d1d6b8a42a3103219cb2b179ba84a964a67e9d50a145031449c2c9b05137","src/biguint/bits.rs":"509036c6c6cb083d4568f92ac852cf5f12510f98c4547d47a80e3db4282a159e","src/biguint/convert.rs":"f4daf2e5e48fc5f9cd91d70f35574aca00ed27ced8e63f56dcc216dc6fb97dbc","src/biguint/division.rs":"ded96527f0c3f3172ddd8dacfb98d27b32545ea4c64fe7a59af2c5c209324f5a","src/biguint/iter.rs":"88aa6c8a08cf50ed6d1f01fea0a11aab6a13b5d64760d79d4bea44196f5f91d4","src/biguint/monty.rs":"2054d8f269580650032ce5592801ea9296c6e06347fc16a0d71af29d415c1bb9","src/biguint/multiplication.rs":"414a7d83d554eb7e48fcc36e8f71870f3cdf6f0718a1ffbd580fe83fe0fc0399","src/biguint/power.rs":"e71bde50a73fde40d8a25c68719db4a87e1640ab173171d1a1cbe7f2bcac2017","src/biguint/serde.rs":"f4d4e6f2d56c9bab95d8b178682ebeba88965a36bcff42ccade3334712c9977a","src/biguint/shift.rs":"d8b96431e5d463237908ba7c519397698601b2ad55ddbb7f7320dafddeb88567","src/biguint/subtraction.rs":"30b244098074b11a43d632894cefec8496866b6d6384bd0852a18bddab4f1d38","src/lib.rs":"b84dc7141ad821273b49cfa2608d40d520143dcd66f23c2f056af077d0391c43","src/macros.rs":"4b8ae695a29bec4c3796aeb1b903843c4fbf841fe1763e6e2769bbee14588a37","tests/bigint.rs":"929422608f842cfb0bdd5117f5af74c954704d3c84df7da46b0eea1fdedd5ba8","tests/bigint_bitwise.rs":"a69d59c3eb07867f9da66ad9a8ae101a15366f88fb1f72f2015a9fe4de3518db","tests/bigint_scalar.rs":"a87e801e370686985d44e1f020c69fceca72b9f048e0f7301d2b8d38469e5636","tests/biguint.rs":"05ffec6b4fb61d5e19a7df47b361b660f900b1825ad884917c813c60d8b7d9c4","tests/biguint_scalar.rs":"b09cda9d4fe6ec519e93282653f69b57d70db73b9cb59c0ea5cd0861ca2de266","tests/consts/mod.rs":"f077d1aea22895a29df4e1391b40cc983cde9389f97e5b30923765f61dc3d017","tests/fuzzed.rs":"befa40b613c6f2976c543e321773c4043638fde63a5457947995b6e7be47d5f2","tests/macros/mod.rs":"1a8f9f015e5caaac60ce9ccff01a75ae489801c3ede6e7b9b3c5079b6efefc9c","tests/modpow.rs":"f4c81111308d63876ed02229cbab50bec9bac082bfa71f481120e46b5d7e5560","tests/roots.rs":"1c1576309eef9a6eb7ac8db4358fcf1d5b55403deaf27fd40ba2aa61b9567c87"},"package":"c89e69e7e0f03bea5ef08013795c25018e101932225a656383bd384495ecc367"} \ No newline at end of file diff --git a/thirdparty/crates/num-bigint-0.4.8/.cargo_vcs_info.json b/thirdparty/crates/num-bigint-0.4.8/.cargo_vcs_info.json deleted file mode 100644 index c98a34160..000000000 --- a/thirdparty/crates/num-bigint-0.4.8/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "65330056d6c00def4c6cda78c87453f4c2a76913" - }, - "path_in_vcs": "" -} \ No newline at end of file diff --git a/thirdparty/crates/num-bigint-0.4.8/benches/rng/mod.rs b/thirdparty/crates/num-bigint-0.4.8/benches/rng/mod.rs deleted file mode 100644 index 33e4f0fad..000000000 --- a/thirdparty/crates/num-bigint-0.4.8/benches/rng/mod.rs +++ /dev/null @@ -1,38 +0,0 @@ -use rand::RngCore; - -pub(crate) fn get_rng() -> impl RngCore { - XorShiftStar { - a: 0x0123_4567_89AB_CDEF, - } -} - -/// Simple `Rng` for benchmarking without additional dependencies -struct XorShiftStar { - a: u64, -} - -impl RngCore for XorShiftStar { - fn next_u32(&mut self) -> u32 { - self.next_u64() as u32 - } - - fn next_u64(&mut self) -> u64 { - // https://en.wikipedia.org/wiki/Xorshift#xorshift* - self.a ^= self.a >> 12; - self.a ^= self.a << 25; - self.a ^= self.a >> 27; - self.a.wrapping_mul(0x2545_F491_4F6C_DD1D) - } - - fn fill_bytes(&mut self, dest: &mut [u8]) { - for chunk in dest.chunks_mut(8) { - let bytes = self.next_u64().to_le_bytes(); - let slice = &bytes[..chunk.len()]; - chunk.copy_from_slice(slice) - } - } - - fn try_fill_bytes(&mut self, dest: &mut [u8]) -> Result<(), rand::Error> { - Ok(self.fill_bytes(dest)) - } -} diff --git a/thirdparty/crates/num-bigint-0.4.8/src/bigrand.rs b/thirdparty/crates/num-bigint-0.4.8/src/bigrand.rs deleted file mode 100644 index e5cbacdbc..000000000 --- a/thirdparty/crates/num-bigint-0.4.8/src/bigrand.rs +++ /dev/null @@ -1,285 +0,0 @@ -//! Randomization of big integers -#![cfg(feature = "rand")] -#![cfg_attr(docsrs, doc(cfg(feature = "rand")))] - -use rand::distributions::uniform::{SampleBorrow, SampleUniform, UniformSampler}; -use rand::prelude::*; - -use crate::BigInt; -use crate::BigUint; -use crate::Sign::*; - -use crate::biguint::biguint_from_vec; - -use num_integer::Integer; -use num_traits::{ToPrimitive, Zero}; - -/// A trait for sampling random big integers. -/// -/// The `rand` feature must be enabled to use this. See crate-level documentation for details. -pub trait RandBigInt { - /// Generate a random [`BigUint`] of the given bit size. - fn gen_biguint(&mut self, bit_size: u64) -> BigUint; - - /// Generate a random [ BigInt`] of the given bit size. - fn gen_bigint(&mut self, bit_size: u64) -> BigInt; - - /// Generate a random [`BigUint`] less than the given bound. Fails - /// when the bound is zero. - fn gen_biguint_below(&mut self, bound: &BigUint) -> BigUint; - - /// Generate a random [`BigUint`] within the given range. The lower - /// bound is inclusive; the upper bound is exclusive. Fails when - /// the upper bound is not greater than the lower bound. - fn gen_biguint_range(&mut self, lbound: &BigUint, ubound: &BigUint) -> BigUint; - - /// Generate a random [`BigInt`] within the given range. The lower - /// bound is inclusive; the upper bound is exclusive. Fails when - /// the upper bound is not greater than the lower bound. - fn gen_bigint_range(&mut self, lbound: &BigInt, ubound: &BigInt) -> BigInt; -} - -fn gen_bits(rng: &mut R, data: &mut [u32], rem: u64) { - // `fill` is faster than many `gen::` calls - rng.fill(data); - if rem > 0 { - let last = data.len() - 1; - data[last] >>= 32 - rem; - } -} - -impl RandBigInt for R { - cfg_digit!( - fn gen_biguint(&mut self, bit_size: u64) -> BigUint { - let (digits, rem) = bit_size.div_rem(&32); - let len = (digits + (rem > 0) as u64) - .to_usize() - .expect("capacity overflow"); - let mut data = vec![0u32; len]; - gen_bits(self, &mut data, rem); - biguint_from_vec(data) - } - - fn gen_biguint(&mut self, bit_size: u64) -> BigUint { - use core::slice; - - let (digits, rem) = bit_size.div_rem(&32); - let len = (digits + (rem > 0) as u64) - .to_usize() - .expect("capacity overflow"); - let native_digits = Integer::div_ceil(&bit_size, &64); - let native_len = native_digits.to_usize().expect("capacity overflow"); - let mut data = vec![0u64; native_len]; - unsafe { - // Generate bits in a `&mut [u32]` slice for value stability - let ptr = data.as_mut_ptr() as *mut u32; - debug_assert!(native_len * 2 >= len); - let data = slice::from_raw_parts_mut(ptr, len); - gen_bits(self, data, rem); - } - #[cfg(target_endian = "big")] - for digit in &mut data { - // swap u32 digits into u64 endianness - *digit = (*digit << 32) | (*digit >> 32); - } - biguint_from_vec(data) - } - ); - - fn gen_bigint(&mut self, bit_size: u64) -> BigInt { - loop { - // Generate a random BigUint... - let biguint = self.gen_biguint(bit_size); - // ...and then randomly assign it a Sign... - let sign = if biguint.is_zero() { - // ...except that if the BigUint is zero, we need to try - // again with probability 0.5. This is because otherwise, - // the probability of generating a zero BigInt would be - // double that of any other number. - if self.gen() { - continue; - } else { - NoSign - } - } else if self.gen() { - Plus - } else { - Minus - }; - return BigInt::from_biguint(sign, biguint); - } - } - - fn gen_biguint_below(&mut self, bound: &BigUint) -> BigUint { - assert!(!bound.is_zero()); - let bits = bound.bits(); - loop { - let n = self.gen_biguint(bits); - if n < *bound { - return n; - } - } - } - - fn gen_biguint_range(&mut self, lbound: &BigUint, ubound: &BigUint) -> BigUint { - assert!(*lbound < *ubound); - if lbound.is_zero() { - self.gen_biguint_below(ubound) - } else { - lbound + self.gen_biguint_below(&(ubound - lbound)) - } - } - - fn gen_bigint_range(&mut self, lbound: &BigInt, ubound: &BigInt) -> BigInt { - assert!(*lbound < *ubound); - if lbound.is_zero() { - BigInt::from(self.gen_biguint_below(ubound.magnitude())) - } else if ubound.is_zero() { - lbound + BigInt::from(self.gen_biguint_below(lbound.magnitude())) - } else { - let delta = ubound - lbound; - lbound + BigInt::from(self.gen_biguint_below(delta.magnitude())) - } - } -} - -/// The back-end implementing rand's [`UniformSampler`] for [`BigUint`]. -#[derive(Clone, Debug)] -pub struct UniformBigUint { - base: BigUint, - len: BigUint, -} - -impl UniformSampler for UniformBigUint { - type X = BigUint; - - #[inline] - fn new(low_b: B1, high_b: B2) -> Self - where - B1: SampleBorrow + Sized, - B2: SampleBorrow + Sized, - { - let low = low_b.borrow(); - let high = high_b.borrow(); - assert!(low < high); - UniformBigUint { - len: high - low, - base: low.clone(), - } - } - - #[inline] - fn new_inclusive(low_b: B1, high_b: B2) -> Self - where - B1: SampleBorrow + Sized, - B2: SampleBorrow + Sized, - { - let low = low_b.borrow(); - let high = high_b.borrow(); - assert!(low <= high); - Self::new(low, high + 1u32) - } - - #[inline] - fn sample(&self, rng: &mut R) -> Self::X { - &self.base + rng.gen_biguint_below(&self.len) - } - - #[inline] - fn sample_single(low: B1, high: B2, rng: &mut R) -> Self::X - where - B1: SampleBorrow + Sized, - B2: SampleBorrow + Sized, - { - rng.gen_biguint_range(low.borrow(), high.borrow()) - } -} - -impl SampleUniform for BigUint { - type Sampler = UniformBigUint; -} - -/// The back-end implementing rand's [`UniformSampler`] for [`BigInt`]. -#[derive(Clone, Debug)] -pub struct UniformBigInt { - base: BigInt, - len: BigUint, -} - -impl UniformSampler for UniformBigInt { - type X = BigInt; - - #[inline] - fn new(low_b: B1, high_b: B2) -> Self - where - B1: SampleBorrow + Sized, - B2: SampleBorrow + Sized, - { - let low = low_b.borrow(); - let high = high_b.borrow(); - assert!(low < high); - UniformBigInt { - len: (high - low).into_parts().1, - base: low.clone(), - } - } - - #[inline] - fn new_inclusive(low_b: B1, high_b: B2) -> Self - where - B1: SampleBorrow + Sized, - B2: SampleBorrow + Sized, - { - let low = low_b.borrow(); - let high = high_b.borrow(); - assert!(low <= high); - Self::new(low, high + 1u32) - } - - #[inline] - fn sample(&self, rng: &mut R) -> Self::X { - &self.base + BigInt::from(rng.gen_biguint_below(&self.len)) - } - - #[inline] - fn sample_single(low: B1, high: B2, rng: &mut R) -> Self::X - where - B1: SampleBorrow + Sized, - B2: SampleBorrow + Sized, - { - rng.gen_bigint_range(low.borrow(), high.borrow()) - } -} - -impl SampleUniform for BigInt { - type Sampler = UniformBigInt; -} - -/// A random distribution for [`BigUint`] and [`BigInt`] values of a particular bit size. -/// -/// The `rand` feature must be enabled to use this. See crate-level documentation for details. -#[derive(Clone, Copy, Debug)] -pub struct RandomBits { - bits: u64, -} - -impl RandomBits { - #[inline] - pub fn new(bits: u64) -> RandomBits { - RandomBits { bits } - } -} - -impl Distribution for RandomBits { - #[inline] - fn sample(&self, rng: &mut R) -> BigUint { - rng.gen_biguint(self.bits) - } -} - -impl Distribution for RandomBits { - #[inline] - fn sample(&self, rng: &mut R) -> BigInt { - rng.gen_bigint(self.bits) - } -} diff --git a/thirdparty/crates/num-bigint-0.5.1/.cargo-checksum.json b/thirdparty/crates/num-bigint-0.5.1/.cargo-checksum.json new file mode 100644 index 000000000..be05fd417 --- /dev/null +++ b/thirdparty/crates/num-bigint-0.5.1/.cargo-checksum.json @@ -0,0 +1 @@ +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"8b3718b8c17a7b3fbf2149a7b03c4638e4c9ecd90402b1dea79da5a83f3e724a","Cargo.lock":"ad4900d94570543c442fd3a8b34dde388add635539b3c13beef1f103a5b80f55","Cargo.toml":"3413270c8dd1a2adfa18f752411edb104c1cd5542d7359f2302eddbf2ccc1505","Cargo.toml.orig":"8d46db269f8ed80a712c948dc9772ad0c9a58a40a5ab065ffcdc9868adb7c8d0","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"6485b8ed310d3f0340bf1ad1f47645069ce4069dcc6bb46c7d5c6faf41de1fdb","README.md":"89bd777524aea829cfa02333c8cc1302d3c64534a3f9c858b3d9b7c5146bbc89","RELEASES.md":"a4a2b2767ae7d13ab1d6c562ac20a390dbe957fc0203a63ed9b868cfc130a110","benches/bigint.rs":"ec9b3a9fabfda4e7cd3c395b37e59ee34df92bf66a6c322d42f231bc2e8ca1cf","benches/factorial.rs":"ed1d276a780e7e5fe79121b941c22a00c2854dbf92fd8a5372619853ba0c13b7","benches/gcd.rs":"6976b9b33337560576e7fe3e9476b434e68e1122932f42d83534f6a65d1b3837","benches/rng/mod.rs":"d5968109518fb6f144ee84ecccdc55131b49c9f0aaa434e079ecf3bafe1e972a","benches/roots.rs":"bc00a5e6992dd9419dce2eec3f78e1b73ae28bd60fed3e273f36fe3f31baff17","benches/shootout-pidigits.rs":"c2a48133f5b679928f7e3f4e764c78aaa8c5b811f58b86fe57fae8c63cb07136","src/big_digit.rs":"b70899171a1850714ede4a1ea2cb387bd9245ab2d8dfa8ae47e533a6cf95acc1","src/bigint.rs":"bbed782925af8f9a3c15a02f94154548df92f37aee6b8593597d192533f25c13","src/bigint/addition.rs":"cdc28e59a5dc6fe7dbad2d8d9514b49fe1bea061e82ebefe89c518f448dc8ba9","src/bigint/arbitrary.rs":"9fb1f7f8bbc7a792d19d4c30ed2671ed2d73847d57e5f65380ae31e5db0146c6","src/bigint/bits.rs":"2cf9d05059224ecea8927f6d3c5025ebf78460e39f36e332128359abe7308be4","src/bigint/convert.rs":"da5ff804ae7be9b88b1f59837d4acad6fda6f39eb97c9fb63c1a7bd35ea2729f","src/bigint/division.rs":"dea89b4efb06b77bbbf07036c454d52f4d026658bcbacad1d15302c93d61b3dd","src/bigint/multiplication.rs":"096ef437f5a3ac97320a77b2745cdf313cf908c6f140e893b18bd98aad71e73c","src/bigint/power.rs":"a3823654f022014c5ce2dc2fd97afa6696589d32a54cc4ec65e6c113e8613672","src/bigint/serde.rs":"a7275341ec518f27f4d955e95b6e302b786944e9462bf0c17c7087d073212943","src/bigint/shift.rs":"3f28bca2d52621133cdf567290645d30a746e663d8dacea29c172b5ed7ff3538","src/bigint/subtraction.rs":"c2aa7e0fbfc7747099d0eec77efdedaa8d79cff88b1587d640d6b1c3c7dc0e4a","src/bigrand.rs":"02e5511d38a07d0da129770fed279e70ca00f3440a816ac1fb25f3046d5f1c61","src/bigrand/distr.rs":"a4b2ecc1b9d0768bb56b2f5d74e4d637c5d175740fba194ef3ec23f52f85553a","src/bigrand/traits.rs":"277aaaa4ce8c77d558e6c3670b9ce9a2c4ac14c9a005f2fe51ed864f48ba56fe","src/biguint.rs":"b2a37538d35c0e7683ce3d311109a7dd59cf498635855598c42b2267c0ce5384","src/biguint/addition.rs":"3361e240f8c77eb07ad4674c3f21fecdceeb98cb3ebad94bf02715fcf72f8cf7","src/biguint/arbitrary.rs":"f978d1d6b8a42a3103219cb2b179ba84a964a67e9d50a145031449c2c9b05137","src/biguint/bits.rs":"509036c6c6cb083d4568f92ac852cf5f12510f98c4547d47a80e3db4282a159e","src/biguint/convert.rs":"f4daf2e5e48fc5f9cd91d70f35574aca00ed27ced8e63f56dcc216dc6fb97dbc","src/biguint/division.rs":"ded96527f0c3f3172ddd8dacfb98d27b32545ea4c64fe7a59af2c5c209324f5a","src/biguint/iter.rs":"88aa6c8a08cf50ed6d1f01fea0a11aab6a13b5d64760d79d4bea44196f5f91d4","src/biguint/monty.rs":"2054d8f269580650032ce5592801ea9296c6e06347fc16a0d71af29d415c1bb9","src/biguint/multiplication.rs":"414a7d83d554eb7e48fcc36e8f71870f3cdf6f0718a1ffbd580fe83fe0fc0399","src/biguint/power.rs":"e71bde50a73fde40d8a25c68719db4a87e1640ab173171d1a1cbe7f2bcac2017","src/biguint/serde.rs":"f4d4e6f2d56c9bab95d8b178682ebeba88965a36bcff42ccade3334712c9977a","src/biguint/shift.rs":"d8b96431e5d463237908ba7c519397698601b2ad55ddbb7f7320dafddeb88567","src/biguint/subtraction.rs":"30b244098074b11a43d632894cefec8496866b6d6384bd0852a18bddab4f1d38","src/lib.rs":"bc752ca8dcd9eb7356b20aa7b825899cc4227b933664fb93b10a8051756efbfe","src/macros.rs":"4b8ae695a29bec4c3796aeb1b903843c4fbf841fe1763e6e2769bbee14588a37","tests/bigint.rs":"929422608f842cfb0bdd5117f5af74c954704d3c84df7da46b0eea1fdedd5ba8","tests/bigint_bitwise.rs":"a69d59c3eb07867f9da66ad9a8ae101a15366f88fb1f72f2015a9fe4de3518db","tests/bigint_scalar.rs":"a87e801e370686985d44e1f020c69fceca72b9f048e0f7301d2b8d38469e5636","tests/biguint.rs":"05ffec6b4fb61d5e19a7df47b361b660f900b1825ad884917c813c60d8b7d9c4","tests/biguint_scalar.rs":"b09cda9d4fe6ec519e93282653f69b57d70db73b9cb59c0ea5cd0861ca2de266","tests/consts/mod.rs":"f077d1aea22895a29df4e1391b40cc983cde9389f97e5b30923765f61dc3d017","tests/fuzzed.rs":"befa40b613c6f2976c543e321773c4043638fde63a5457947995b6e7be47d5f2","tests/macros/mod.rs":"1a8f9f015e5caaac60ce9ccff01a75ae489801c3ede6e7b9b3c5079b6efefc9c","tests/modpow.rs":"f4c81111308d63876ed02229cbab50bec9bac082bfa71f481120e46b5d7e5560","tests/roots.rs":"1c1576309eef9a6eb7ac8db4358fcf1d5b55403deaf27fd40ba2aa61b9567c87"},"package":"93e7820bc0a80a0238e650327316f929ba18d5be054b647490a3a6a339f3e7c0"} \ No newline at end of file diff --git a/thirdparty/crates/num-bigint-0.5.1/.cargo_vcs_info.json b/thirdparty/crates/num-bigint-0.5.1/.cargo_vcs_info.json new file mode 100644 index 000000000..22d7df38d --- /dev/null +++ b/thirdparty/crates/num-bigint-0.5.1/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "33c59ba44b7bdb09975b38a321b1b88c6a444005" + }, + "path_in_vcs": "" +} \ No newline at end of file diff --git a/thirdparty/crates/num-bigint-0.4.8/BUILD.bazel b/thirdparty/crates/num-bigint-0.5.1/BUILD.bazel similarity index 99% rename from thirdparty/crates/num-bigint-0.4.8/BUILD.bazel rename to thirdparty/crates/num-bigint-0.5.1/BUILD.bazel index 6095890be..375d3b762 100644 --- a/thirdparty/crates/num-bigint-0.4.8/BUILD.bazel +++ b/thirdparty/crates/num-bigint-0.5.1/BUILD.bazel @@ -106,7 +106,7 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.4.8", + version = "0.5.1", deps = [ "//thirdparty/crates/num-integer-0.1.46:num_integer", "//thirdparty/crates/num-traits-0.2.19:num_traits", diff --git a/thirdparty/crates/num-bigint-0.4.8/Cargo.lock b/thirdparty/crates/num-bigint-0.5.1/Cargo.lock similarity index 81% rename from thirdparty/crates/num-bigint-0.4.8/Cargo.lock rename to thirdparty/crates/num-bigint-0.5.1/Cargo.lock index 024a7d2c4..f723280fe 100644 --- a/thirdparty/crates/num-bigint-0.4.8/Cargo.lock +++ b/thirdparty/crates/num-bigint-0.5.1/Cargo.lock @@ -39,13 +39,16 @@ checksum = "1fdaeca4cf44ed4ac623e86ef41f056e848dbeab7ec043ecb7326ba300b36fd0" [[package]] name = "num-bigint" -version = "0.4.8" +version = "0.5.1" dependencies = [ "arbitrary", "num-integer", "num-traits", "quickcheck", - "rand", + "rand 0.10.2", + "rand 0.9.4", + "rand_core 0.10.1", + "rand_core 0.9.5", "serde", ] @@ -82,7 +85,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "588f6378e4dd99458b60ec275b4477add41ce4fa9f64dcba6f15adccb19b50d6" dependencies = [ - "rand", + "rand 0.8.6", ] [[package]] @@ -100,7 +103,25 @@ version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5ca0ecfa931c29007047d1bc58e623ab12e5590e8c7cc53200d5202b69266d8a" dependencies = [ - "rand_core", + "rand_core 0.6.4", +] + +[[package]] +name = "rand" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea" +dependencies = [ + "rand_core 0.9.5", +] + +[[package]] +name = "rand" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" +dependencies = [ + "rand_core 0.10.1", ] [[package]] @@ -112,6 +133,18 @@ dependencies = [ "getrandom", ] +[[package]] +name = "rand_core" +version = "0.9.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c" + +[[package]] +name = "rand_core" +version = "0.10.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" + [[package]] name = "serde" version = "1.0.228" diff --git a/thirdparty/crates/num-bigint-0.4.8/Cargo.toml b/thirdparty/crates/num-bigint-0.5.1/Cargo.toml similarity index 78% rename from thirdparty/crates/num-bigint-0.4.8/Cargo.toml rename to thirdparty/crates/num-bigint-0.5.1/Cargo.toml index 32b0861b0..6e5716c4c 100644 --- a/thirdparty/crates/num-bigint-0.4.8/Cargo.toml +++ b/thirdparty/crates/num-bigint-0.5.1/Cargo.toml @@ -13,8 +13,7 @@ edition = "2021" rust-version = "1.60" name = "num-bigint" -version = "0.4.8" -authors = ["The Rust Project Developers"] +version = "0.5.1" build = false exclude = [ "/ci/*", @@ -46,7 +45,8 @@ repository = "https://github.com/rust-num/num-bigint" features = [ "std", "serde", - "rand", + "rand_0_10", + "rand_0_9", "quickcheck", "arbitrary", ] @@ -59,7 +59,16 @@ rustdoc-args = [ arbitrary = ["dep:arbitrary"] default = ["std"] quickcheck = ["dep:quickcheck"] -rand = ["dep:rand"] +rand_0_10 = [ + "rand_core_0_10", + "dep:rand_0_10", +] +rand_0_9 = [ + "rand_core_0_9", + "dep:rand_0_9", +] +rand_core_0_10 = ["dep:rand_core_0_10"] +rand_core_0_9 = ["dep:rand_core_0_9"] serde = ["dep:serde"] std = [ "num-integer/std", @@ -105,6 +114,7 @@ path = "tests/roots.rs" [[bench]] name = "bigint" path = "benches/bigint.rs" +required-features = ["rand_0_10"] [[bench]] name = "factorial" @@ -113,10 +123,12 @@ path = "benches/factorial.rs" [[bench]] name = "gcd" path = "benches/gcd.rs" +required-features = ["rand_0_10"] [[bench]] name = "roots" path = "benches/roots.rs" +required-features = ["rand_0_10"] [[bench]] name = "shootout-pidigits" @@ -143,10 +155,29 @@ version = "1" optional = true default-features = false -[dependencies.rand] -version = "0.8" +[dependencies.rand_0_10] +version = "0.10" +optional = true +default-features = false +package = "rand" + +[dependencies.rand_0_9] +version = "0.9" +optional = true +default-features = false +package = "rand" + +[dependencies.rand_core_0_10] +version = "0.10" +optional = true +default-features = false +package = "rand_core" + +[dependencies.rand_core_0_9] +version = "0.9" optional = true default-features = false +package = "rand_core" [dependencies.serde] version = "1.0" diff --git a/thirdparty/crates/num-bigint-0.4.8/Cargo.toml.orig b/thirdparty/crates/num-bigint-0.5.1/Cargo.toml.orig similarity index 63% rename from thirdparty/crates/num-bigint-0.4.8/Cargo.toml.orig rename to thirdparty/crates/num-bigint-0.5.1/Cargo.toml.orig index 0d4b00958..7935e31a8 100644 --- a/thirdparty/crates/num-bigint-0.4.8/Cargo.toml.orig +++ b/thirdparty/crates/num-bigint-0.5.1/Cargo.toml.orig @@ -1,5 +1,4 @@ [package] -authors = ["The Rust Project Developers"] description = "Big integer implementation for Rust" documentation = "https://docs.rs/num-bigint" homepage = "https://github.com/rust-num/num-bigint" @@ -8,7 +7,7 @@ categories = [ "algorithms", "data-structures", "science" ] license = "MIT OR Apache-2.0" name = "num-bigint" repository = "https://github.com/rust-num/num-bigint" -version = "0.4.8" +version = "0.5.1" readme = "README.md" exclude = ["/ci/*", "/.github/*"] edition = "2021" @@ -19,24 +18,30 @@ default = ["std"] std = ["num-integer/std", "num-traits/std"] arbitrary = ["dep:arbitrary"] quickcheck = ["dep:quickcheck"] -rand = ["dep:rand"] +rand_0_9 = ["rand_core_0_9", "dep:rand_0_9"] +rand_core_0_9 = ["dep:rand_core_0_9"] +rand_0_10 = ["rand_core_0_10", "dep:rand_0_10"] +rand_core_0_10 = ["dep:rand_core_0_10"] serde = ["dep:serde"] [package.metadata.docs.rs] -features = ["std", "serde", "rand", "quickcheck", "arbitrary"] +features = ["std", "serde", "rand_0_10", "rand_0_9", "quickcheck", "arbitrary"] rustdoc-args = ["--cfg", "docsrs"] [[bench]] name = "bigint" +required-features = ["rand_0_10"] [[bench]] name = "factorial" [[bench]] name = "gcd" +required-features = ["rand_0_10"] [[bench]] name = "roots" +required-features = ["rand_0_10"] [[bench]] harness = false @@ -54,9 +59,28 @@ version = "0.2.18" default-features = false features = ["i128"] -[dependencies.rand] +[dependencies.rand_0_9] +package = "rand" optional = true -version = "0.8" +version = "0.9" +default-features = false + +[dependencies.rand_core_0_9] +package = "rand_core" +optional = true +version = "0.9" +default-features = false + +[dependencies.rand_0_10] +package = "rand" +optional = true +version = "0.10" +default-features = false + +[dependencies.rand_core_0_10] +package = "rand_core" +optional = true +version = "0.10" default-features = false [dependencies.serde] diff --git a/thirdparty/crates/num-bigint-0.4.8/LICENSE-APACHE b/thirdparty/crates/num-bigint-0.5.1/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/LICENSE-APACHE rename to thirdparty/crates/num-bigint-0.5.1/LICENSE-APACHE diff --git a/thirdparty/crates/num-bigint-0.4.8/LICENSE-MIT b/thirdparty/crates/num-bigint-0.5.1/LICENSE-MIT similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/LICENSE-MIT rename to thirdparty/crates/num-bigint-0.5.1/LICENSE-MIT diff --git a/thirdparty/crates/num-bigint-0.4.8/README.md b/thirdparty/crates/num-bigint-0.5.1/README.md similarity index 89% rename from thirdparty/crates/num-bigint-0.4.8/README.md rename to thirdparty/crates/num-bigint-0.5.1/README.md index 04ab0fb53..18df346f2 100644 --- a/thirdparty/crates/num-bigint-0.4.8/README.md +++ b/thirdparty/crates/num-bigint-0.5.1/README.md @@ -13,7 +13,7 @@ Add this to your `Cargo.toml`: ```toml [dependencies] -num-bigint = "0.4" +num-bigint = "0.5" ``` ## Features @@ -25,16 +25,18 @@ if your compiler is not new enough. ### Random Generation -`num-bigint` supports the generation of random big integers when the `rand` -feature is enabled. To enable it include rand as +`num-bigint` supports the generation of random big integers when either of the +`rand_0_9` or `rand_0_10` features are enabled. For example: ```toml -rand = "0.8" -num-bigint = { version = "0.4", features = ["rand"] } +rand = "0.10" +num-bigint = { version = "0.5", features = ["rand_0_10"] } ``` -Note that you must use the version of `rand` that `num-bigint` is compatible -with: `0.8`. +Note that you must use the same version of `rand` as the feature you enable. + +You can instead use `rand_core_0_9` or `rand_core_0_10` for a more restricted +subset. ## Releases diff --git a/thirdparty/crates/num-bigint-0.4.8/RELEASES.md b/thirdparty/crates/num-bigint-0.5.1/RELEASES.md similarity index 94% rename from thirdparty/crates/num-bigint-0.4.8/RELEASES.md rename to thirdparty/crates/num-bigint-0.5.1/RELEASES.md index 4c06a8618..3f08b6d05 100644 --- a/thirdparty/crates/num-bigint-0.4.8/RELEASES.md +++ b/thirdparty/crates/num-bigint-0.5.1/RELEASES.md @@ -1,11 +1,27 @@ -# Release 0.4.8 (2026-07-04) +# Release 0.5.1 (2026-07-04) -- [Fixed a regression in the B-Z division algorithm.][349] +- [Fixed a regression in the B-Z division algorithm.][348] -[349]: https://github.com/rust-num/num-bigint/pull/349 +[348]: https://github.com/rust-num/num-bigint/pull/338 **Contributors**: @cuviper +# Release 0.5.0 (2026-07-02) + +- [Upgrade to `rand` v0.10 and/or v0.9, and split `rand_core`][338]. + - The former `rand` feature is now split into multiple features, `rand_0_9`, + `rand_core_0_9`, `rand_0_10`, and `rand_core_0_10`, depending on the + version and feature set you need. + - The `RandBigInt` extension trait is now split into `BigRng09` and + `BigRng010` for each version. + - The `gen_*` methods are deprecated in favor of new `random_*` methods. + - This is also a [value-breaking] release, as `rand` defines it. + +[338]: https://github.com/rust-num/num-bigint/pull/338 +[value-breaking]: https://rust-random.github.io/book/crate-reprod.html#api-breaking-value-breaking-and-semver + +**Contributors**: @bionicles, @cuviper, @divergentdave + # Release 0.4.7 (2026-07-02) - [Inline single-digit values.][307] This reduces heap allocations, and diff --git a/thirdparty/crates/num-bigint-0.4.8/benches/bigint.rs b/thirdparty/crates/num-bigint-0.5.1/benches/bigint.rs similarity index 92% rename from thirdparty/crates/num-bigint-0.4.8/benches/bigint.rs rename to thirdparty/crates/num-bigint-0.5.1/benches/bigint.rs index d916a7de7..8c9f63d4d 100644 --- a/thirdparty/crates/num-bigint-0.4.8/benches/bigint.rs +++ b/thirdparty/crates/num-bigint-0.5.1/benches/bigint.rs @@ -1,9 +1,8 @@ #![feature(test)] -#![cfg(feature = "rand")] extern crate test; -use num_bigint::{BigInt, BigUint, RandBigInt}; +use num_bigint::{BigInt, BigRng010, BigUint}; use num_traits::{FromPrimitive, Num, One, Zero}; use std::mem::replace; use test::Bencher; @@ -13,24 +12,24 @@ use rng::get_rng; fn multiply_bench(b: &mut Bencher, xbits: u64, ybits: u64) { let mut rng = get_rng(); - let x = rng.gen_bigint(xbits); - let y = rng.gen_bigint(ybits); + let x = rng.random_bigint(xbits); + let y = rng.random_bigint(ybits); b.iter(|| &x * &y); } fn divide_bench(b: &mut Bencher, xbits: u64, ybits: u64) { let mut rng = get_rng(); - let x = rng.gen_bigint(xbits); - let y = rng.gen_bigint(ybits); + let x = rng.random_bigint(xbits); + let y = rng.random_bigint(ybits); b.iter(|| &x / &y); } fn remainder_bench(b: &mut Bencher, xbits: u64, ybits: u64) { let mut rng = get_rng(); - let x = rng.gen_bigint(xbits); - let y = rng.gen_bigint(ybits); + let x = rng.random_bigint(xbits); + let y = rng.random_bigint(ybits); b.iter(|| &x % &y); } @@ -191,7 +190,7 @@ fn fib_to_string(b: &mut Bencher) { fn to_str_radix_bench(b: &mut Bencher, radix: u32, bits: u64) { let mut rng = get_rng(); - let x = rng.gen_bigint(bits); + let x = rng.random_bigint(bits); b.iter(|| x.to_str_radix(radix)); } @@ -237,7 +236,7 @@ fn to_str_radix_36(b: &mut Bencher) { fn from_str_radix_bench(b: &mut Bencher, radix: u32) { let mut rng = get_rng(); - let x = rng.gen_bigint(1009); + let x = rng.random_bigint(1009); let s = x.to_str_radix(radix); assert_eq!(x, BigInt::from_str_radix(&s, radix).unwrap()); b.iter(|| BigInt::from_str_radix(&s, radix)); @@ -271,7 +270,7 @@ fn from_str_radix_36(b: &mut Bencher) { fn rand_bench(b: &mut Bencher, bits: u64) { let mut rng = get_rng(); - b.iter(|| rng.gen_bigint(bits)); + b.iter(|| rng.random_bigint(bits)); } #[bench] @@ -342,7 +341,7 @@ fn shr(b: &mut Bencher) { fn hash(b: &mut Bencher) { use std::collections::HashSet; let mut rng = get_rng(); - let v: Vec = (1000..2000).map(|bits| rng.gen_bigint(bits)).collect(); + let v: Vec = (1000..2000).map(|bits| rng.random_bigint(bits)).collect(); b.iter(|| { let h: HashSet<&BigInt> = v.iter().collect(); assert_eq!(h.len(), v.len()); @@ -414,8 +413,8 @@ const RFC3526_2048BIT_MODP_GROUP: &str = "\ #[bench] fn modpow(b: &mut Bencher) { let mut rng = get_rng(); - let base = rng.gen_biguint(2048); - let e = rng.gen_biguint(2048); + let base = rng.random_biguint(2048); + let e = rng.random_biguint(2048); let m = BigUint::from_str_radix(RFC3526_2048BIT_MODP_GROUP, 16).unwrap(); b.iter(|| base.modpow(&e, &m)); @@ -424,8 +423,8 @@ fn modpow(b: &mut Bencher) { #[bench] fn modpow_even(b: &mut Bencher) { let mut rng = get_rng(); - let base = rng.gen_biguint(2048); - let e = rng.gen_biguint(2048); + let base = rng.random_biguint(2048); + let e = rng.random_biguint(2048); // Make the modulus even, so monty (base-2^32) doesn't apply. let m = BigUint::from_str_radix(RFC3526_2048BIT_MODP_GROUP, 16).unwrap() - 1u32; @@ -435,7 +434,7 @@ fn modpow_even(b: &mut Bencher) { #[bench] fn to_u32_digits(b: &mut Bencher) { let mut rng = get_rng(); - let n = rng.gen_biguint(2048); + let n = rng.random_biguint(2048); b.iter(|| n.to_u32_digits()); } @@ -443,7 +442,7 @@ fn to_u32_digits(b: &mut Bencher) { #[bench] fn iter_u32_digits(b: &mut Bencher) { let mut rng = get_rng(); - let n = rng.gen_biguint(2048); + let n = rng.random_biguint(2048); b.iter(|| n.iter_u32_digits().max()); } @@ -451,7 +450,7 @@ fn iter_u32_digits(b: &mut Bencher) { #[bench] fn to_u64_digits(b: &mut Bencher) { let mut rng = get_rng(); - let n = rng.gen_biguint(2048); + let n = rng.random_biguint(2048); b.iter(|| n.to_u64_digits()); } @@ -459,7 +458,7 @@ fn to_u64_digits(b: &mut Bencher) { #[bench] fn iter_u64_digits(b: &mut Bencher) { let mut rng = get_rng(); - let n = rng.gen_biguint(2048); + let n = rng.random_biguint(2048); b.iter(|| n.iter_u64_digits().max()); } diff --git a/thirdparty/crates/num-bigint-0.4.8/benches/factorial.rs b/thirdparty/crates/num-bigint-0.5.1/benches/factorial.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/benches/factorial.rs rename to thirdparty/crates/num-bigint-0.5.1/benches/factorial.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/benches/gcd.rs b/thirdparty/crates/num-bigint-0.5.1/benches/gcd.rs similarity index 90% rename from thirdparty/crates/num-bigint-0.4.8/benches/gcd.rs rename to thirdparty/crates/num-bigint-0.5.1/benches/gcd.rs index c211b6ef2..aab87ac2e 100644 --- a/thirdparty/crates/num-bigint-0.4.8/benches/gcd.rs +++ b/thirdparty/crates/num-bigint-0.5.1/benches/gcd.rs @@ -1,9 +1,8 @@ #![feature(test)] -#![cfg(feature = "rand")] extern crate test; -use num_bigint::{BigUint, RandBigInt}; +use num_bigint::{BigRng010, BigUint}; use num_integer::Integer; use num_traits::Zero; use test::Bencher; @@ -13,8 +12,8 @@ use rng::get_rng; fn bench(b: &mut Bencher, bits: u64, gcd: fn(&BigUint, &BigUint) -> BigUint) { let mut rng = get_rng(); - let x = rng.gen_biguint(bits); - let y = rng.gen_biguint(bits); + let x = rng.random_biguint(bits); + let y = rng.random_biguint(bits); assert_eq!(euclid(&x, &y), x.gcd(&y)); diff --git a/thirdparty/crates/num-bigint-0.5.1/benches/rng/mod.rs b/thirdparty/crates/num-bigint-0.5.1/benches/rng/mod.rs new file mode 100644 index 000000000..506681049 --- /dev/null +++ b/thirdparty/crates/num-bigint-0.5.1/benches/rng/mod.rs @@ -0,0 +1,6 @@ +use rand_0_10::rngs::Xoshiro128PlusPlus; +use rand_0_10::{Rng, SeedableRng}; + +pub(crate) fn get_rng() -> impl Rng { + Xoshiro128PlusPlus::from_seed(*b"benching bigints") +} diff --git a/thirdparty/crates/num-bigint-0.4.8/benches/roots.rs b/thirdparty/crates/num-bigint-0.5.1/benches/roots.rs similarity index 93% rename from thirdparty/crates/num-bigint-0.4.8/benches/roots.rs rename to thirdparty/crates/num-bigint-0.5.1/benches/roots.rs index 7afc4f763..f5bb0b918 100644 --- a/thirdparty/crates/num-bigint-0.4.8/benches/roots.rs +++ b/thirdparty/crates/num-bigint-0.5.1/benches/roots.rs @@ -1,9 +1,8 @@ #![feature(test)] -#![cfg(feature = "rand")] extern crate test; -use num_bigint::{BigUint, RandBigInt}; +use num_bigint::{BigRng010, BigUint}; use test::Bencher; mod rng; @@ -37,7 +36,7 @@ fn check(x: &BigUint, n: u32) { } fn bench_sqrt(b: &mut Bencher, bits: u64) { - let x = get_rng().gen_biguint(bits); + let x = get_rng().random_biguint(bits); eprintln!("bench_sqrt({})", x); check(&x, 2); @@ -65,7 +64,7 @@ fn big4k_sqrt(b: &mut Bencher) { } fn bench_cbrt(b: &mut Bencher, bits: u64) { - let x = get_rng().gen_biguint(bits); + let x = get_rng().random_biguint(bits); eprintln!("bench_cbrt({})", x); check(&x, 3); @@ -93,7 +92,7 @@ fn big4k_cbrt(b: &mut Bencher) { } fn bench_nth_root(b: &mut Bencher, bits: u64, n: u32) { - let x = get_rng().gen_biguint(bits); + let x = get_rng().random_biguint(bits); eprintln!("bench_{}th_root({})", n, x); check(&x, n); diff --git a/thirdparty/crates/num-bigint-0.4.8/benches/shootout-pidigits.rs b/thirdparty/crates/num-bigint-0.5.1/benches/shootout-pidigits.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/benches/shootout-pidigits.rs rename to thirdparty/crates/num-bigint-0.5.1/benches/shootout-pidigits.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/big_digit.rs b/thirdparty/crates/num-bigint-0.5.1/src/big_digit.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/big_digit.rs rename to thirdparty/crates/num-bigint-0.5.1/src/big_digit.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/bigint.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigint.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/bigint.rs rename to thirdparty/crates/num-bigint-0.5.1/src/bigint.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/bigint/addition.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigint/addition.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/bigint/addition.rs rename to thirdparty/crates/num-bigint-0.5.1/src/bigint/addition.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/bigint/arbitrary.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigint/arbitrary.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/bigint/arbitrary.rs rename to thirdparty/crates/num-bigint-0.5.1/src/bigint/arbitrary.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/bigint/bits.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigint/bits.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/bigint/bits.rs rename to thirdparty/crates/num-bigint-0.5.1/src/bigint/bits.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/bigint/convert.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigint/convert.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/bigint/convert.rs rename to thirdparty/crates/num-bigint-0.5.1/src/bigint/convert.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/bigint/division.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigint/division.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/bigint/division.rs rename to thirdparty/crates/num-bigint-0.5.1/src/bigint/division.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/bigint/multiplication.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigint/multiplication.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/bigint/multiplication.rs rename to thirdparty/crates/num-bigint-0.5.1/src/bigint/multiplication.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/bigint/power.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigint/power.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/bigint/power.rs rename to thirdparty/crates/num-bigint-0.5.1/src/bigint/power.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/bigint/serde.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigint/serde.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/bigint/serde.rs rename to thirdparty/crates/num-bigint-0.5.1/src/bigint/serde.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/bigint/shift.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigint/shift.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/bigint/shift.rs rename to thirdparty/crates/num-bigint-0.5.1/src/bigint/shift.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/bigint/subtraction.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigint/subtraction.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/bigint/subtraction.rs rename to thirdparty/crates/num-bigint-0.5.1/src/bigint/subtraction.rs diff --git a/thirdparty/crates/num-bigint-0.5.1/src/bigrand.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigrand.rs new file mode 100644 index 000000000..ab7403b45 --- /dev/null +++ b/thirdparty/crates/num-bigint-0.5.1/src/bigrand.rs @@ -0,0 +1,76 @@ +//! Randomization of big integers + +#[cfg(any(feature = "rand_0_10", feature = "rand_0_9"))] +mod structs { + use crate::{BigInt, BigUint}; + + /// The back-end implementing rand's `UniformSampler` for [`BigUint`]. + #[derive(Clone, Debug)] + pub struct UniformBigUint { + pub(super) base: BigUint, + pub(super) len: BigUint, + } + + /// The back-end implementing rand's `UniformSampler` for [`BigInt`]. + #[derive(Clone, Debug)] + pub struct UniformBigInt { + pub(super) base: BigInt, + pub(super) len: BigUint, + } + + /// A random distribution for [`BigUint`] and [`BigInt`] values of a particular bit size. + #[derive(Clone, Copy, Debug)] + pub struct RandomBits { + pub(super) bits: u64, + } + + impl RandomBits { + #[inline] + pub fn new(bits: u64) -> RandomBits { + RandomBits { bits } + } + } +} + +#[cfg(any(feature = "rand_0_10", feature = "rand_0_9"))] +pub use structs::{RandomBits, UniformBigInt, UniformBigUint}; + +#[cfg(feature = "rand_core_0_10")] +#[path = "bigrand"] +mod impl_0_10 { + use rand_core_0_10::Rng; + + mod traits; + + pub use traits::BigRng; + + #[cfg(feature = "rand_0_10")] + use rand_0_10 as rand; + + #[cfg(feature = "rand_0_10")] + #[cfg_attr(docsrs, doc(cfg(feature = "rand_0_10")))] + mod distr; +} + +#[cfg(feature = "rand_core_0_10")] +pub use impl_0_10::BigRng as BigRng010; + +#[cfg(feature = "rand_core_0_9")] +#[path = "bigrand"] +mod impl_0_9 { + use rand_core_0_9::RngCore as Rng; + + mod traits; + + pub use traits::BigRng; + + #[cfg(feature = "rand_0_9")] + use rand_0_9 as rand; + + #[cfg(feature = "rand_0_9")] + #[cfg_attr(docsrs, doc(cfg(feature = "rand_0_9")))] + mod distr; +} + +#[cfg(feature = "rand_core_0_9")] +pub use impl_0_9::BigRng as BigRng09; diff --git a/thirdparty/crates/num-bigint-0.5.1/src/bigrand/distr.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigrand/distr.rs new file mode 100644 index 000000000..c8c639dee --- /dev/null +++ b/thirdparty/crates/num-bigint-0.5.1/src/bigrand/distr.rs @@ -0,0 +1,203 @@ +//! Random distributions of big integers +#![allow(clippy::duplicate_mod)] + +use super::{rand, BigRng}; +use crate::{BigInt, BigUint, RandomBits, UniformBigInt, UniformBigUint}; + +use rand::distr::uniform::{Error, SampleBorrow, SampleUniform, UniformSampler}; +use rand::distr::Distribution; +use rand::Rng; + +/// Registers [`UniformBigUint`] as the back-end enabling +/// [`Uniform`][rand::distr::Uniform] for [`BigUint`]. +impl SampleUniform for BigUint { + type Sampler = UniformBigUint; +} + +/// Enables [`Uniform`][rand::distr::Uniform] for [`BigUint`]. +impl UniformSampler for UniformBigUint { + type X = BigUint; + + #[inline] + fn new(low_b: B1, high_b: B2) -> Result + where + B1: SampleBorrow + Sized, + B2: SampleBorrow + Sized, + { + let low = low_b.borrow(); + let high = high_b.borrow(); + if low < high { + Ok(UniformBigUint { + len: high - low, + base: low.clone(), + }) + } else { + Err(Error::EmptyRange) + } + } + + #[inline] + fn new_inclusive(low_b: B1, high_b: B2) -> Result + where + B1: SampleBorrow + Sized, + B2: SampleBorrow + Sized, + { + let low = low_b.borrow(); + let high = high_b.borrow(); + if low <= high { + Ok(UniformBigUint { + len: high - low + 1u32, + base: low.clone(), + }) + } else { + Err(Error::EmptyRange) + } + } + + #[inline] + fn sample(&self, rng: &mut R) -> Self::X { + &self.base + rng.random_biguint_below(&self.len) + } + + #[inline] + fn sample_single( + low: B1, + high: B2, + rng: &mut R, + ) -> Result + where + B1: SampleBorrow + Sized, + B2: SampleBorrow + Sized, + { + let low = low.borrow(); + let high = high.borrow(); + if low < high { + Ok(rng.random_biguint_range(low, high)) + } else { + Err(Error::EmptyRange) + } + } + + #[inline] + fn sample_single_inclusive( + low: B1, + high: B2, + rng: &mut R, + ) -> Result + where + B1: SampleBorrow + Sized, + B2: SampleBorrow + Sized, + { + let low = low.borrow(); + let high = high.borrow(); + if low <= high { + Ok(rng.random_biguint_range(low, &(high + 1u32))) + } else { + Err(Error::EmptyRange) + } + } +} + +/// Registers [`UniformBigInt`] as the back-end enabling +/// [`Uniform`][rand::distr::Uniform] for [`BigInt`]. +impl SampleUniform for BigInt { + type Sampler = UniformBigInt; +} + +/// Enables [`Uniform`][rand::distr::Uniform] for [`BigInt`]. +impl UniformSampler for UniformBigInt { + type X = BigInt; + + #[inline] + fn new(low_b: B1, high_b: B2) -> Result + where + B1: SampleBorrow + Sized, + B2: SampleBorrow + Sized, + { + let low = low_b.borrow(); + let high = high_b.borrow(); + if low < high { + Ok(UniformBigInt { + len: (high - low).into_parts().1, + base: low.clone(), + }) + } else { + Err(Error::EmptyRange) + } + } + + #[inline] + fn new_inclusive(low_b: B1, high_b: B2) -> Result + where + B1: SampleBorrow + Sized, + B2: SampleBorrow + Sized, + { + let low = low_b.borrow(); + let high = high_b.borrow(); + if low <= high { + Ok(UniformBigInt { + len: (high - low).into_parts().1 + 1u32, + base: low.clone(), + }) + } else { + Err(Error::EmptyRange) + } + } + + #[inline] + fn sample(&self, rng: &mut R) -> Self::X { + &self.base + BigInt::from(rng.random_biguint_below(&self.len)) + } + + #[inline] + fn sample_single( + low: B1, + high: B2, + rng: &mut R, + ) -> Result + where + B1: SampleBorrow + Sized, + B2: SampleBorrow + Sized, + { + let low = low.borrow(); + let high = high.borrow(); + if low < high { + Ok(rng.random_bigint_range(low, high)) + } else { + Err(Error::EmptyRange) + } + } + + #[inline] + fn sample_single_inclusive( + low: B1, + high: B2, + rng: &mut R, + ) -> Result + where + B1: SampleBorrow + Sized, + B2: SampleBorrow + Sized, + { + let low = low.borrow(); + let high = high.borrow(); + if low <= high { + Ok(rng.random_bigint_range(low, &(high + 1u32))) + } else { + Err(Error::EmptyRange) + } + } +} + +impl Distribution for RandomBits { + #[inline] + fn sample(&self, rng: &mut R) -> BigUint { + rng.random_biguint(self.bits) + } +} + +impl Distribution for RandomBits { + #[inline] + fn sample(&self, rng: &mut R) -> BigInt { + rng.random_bigint(self.bits) + } +} diff --git a/thirdparty/crates/num-bigint-0.5.1/src/bigrand/traits.rs b/thirdparty/crates/num-bigint-0.5.1/src/bigrand/traits.rs new file mode 100644 index 000000000..a147cd186 --- /dev/null +++ b/thirdparty/crates/num-bigint-0.5.1/src/bigrand/traits.rs @@ -0,0 +1,148 @@ +//! Randomization of big integers +#![allow(clippy::duplicate_mod)] + +use super::Rng; +use crate::Sign::*; +use crate::{BigInt, BigUint}; + +use crate::big_digit::BigDigit; +use crate::biguint::biguint_from_vec; + +use core::mem::size_of; +use num_integer::Integer; +use num_traits::Zero; + +/// A trait extending [`Rng`] for sampling random big integers. +pub trait BigRng: Rng { + /// Generate a random [`BigUint`] of the given bit size. + fn random_biguint(&mut self, bit_size: u64) -> BigUint; + + /// Generate a random [`BigInt`] of the given bit size. + fn random_bigint(&mut self, bit_size: u64) -> BigInt; + + /// Generate a random [`BigUint`] less than the given bound. Fails + /// when the bound is zero. + fn random_biguint_below(&mut self, bound: &BigUint) -> BigUint; + + /// Generate a random [`BigUint`] within the given range. The lower + /// bound is inclusive; the upper bound is exclusive. Fails when + /// the upper bound is not greater than the lower bound. + fn random_biguint_range(&mut self, lbound: &BigUint, ubound: &BigUint) -> BigUint; + + /// Generate a random [`BigInt`] within the given range. The lower + /// bound is inclusive; the upper bound is exclusive. Fails when + /// the upper bound is not greater than the lower bound. + fn random_bigint_range(&mut self, lbound: &BigInt, ubound: &BigInt) -> BigInt; + + #[deprecated(since = "0.5.0", note = "Renamed to `random_biguint`")] + fn gen_biguint(&mut self, bit_size: u64) -> BigUint { + self.random_biguint(bit_size) + } + + #[deprecated(since = "0.5.0", note = "Renamed to `random_bigint`")] + fn gen_bigint(&mut self, bit_size: u64) -> BigInt { + self.random_bigint(bit_size) + } + + #[deprecated(since = "0.5.0", note = "Renamed to `random_biguint_below`")] + fn gen_biguint_below(&mut self, bound: &BigUint) -> BigUint { + self.random_biguint_below(bound) + } + + #[deprecated(since = "0.5.0", note = "Renamed to `random_biguint_range`")] + fn gen_biguint_range(&mut self, lbound: &BigUint, ubound: &BigUint) -> BigUint { + self.random_biguint_range(lbound, ubound) + } + + #[deprecated(since = "0.5.0", note = "Renamed to `random_bigint_range`")] + fn gen_bigint_range(&mut self, lbound: &BigInt, ubound: &BigInt) -> BigInt { + self.random_bigint_range(lbound, ubound) + } +} + +impl BigRng for R { + fn random_biguint(&mut self, bit_size: u64) -> BigUint { + let mask = (1 << (bit_size % 8)) - 1; + let bytes = Integer::div_ceil(&bit_size, &8); + let bytes = usize::try_from(bytes).expect("capacity overflow"); + + let digits = Integer::div_ceil(&bit_size, &BigDigit::BITS.into()); + let digits = usize::try_from(digits).unwrap(); + debug_assert_eq!(digits, Integer::div_ceil(&bytes, &size_of::())); + + let mut data = vec![0 as BigDigit; digits]; + { + let ptr = data.as_mut_ptr().cast::(); + let slice = unsafe { core::slice::from_raw_parts_mut(ptr, bytes) }; + self.fill_bytes(slice); + if mask != 0 { + slice[bytes - 1] &= mask; + } + } + #[cfg(not(target_endian = "little"))] + for digit in &mut data { + *digit = BigDigit::from_le(*digit); + } + biguint_from_vec(data) + } + + fn random_bigint(&mut self, bit_size: u64) -> BigInt { + loop { + // Generate a random BigUint... + let biguint = self.random_biguint(bit_size); + // ...and then randomly assign it a Sign... + let negative = (self.next_u32() as i32) < 0; + let sign = if biguint.is_zero() { + // ...except that if the BigUint is zero, we need to try + // again with probability 0.5. This is because otherwise, + // the probability of generating a zero BigInt would be + // double that of any other number. + if negative { + continue; + } + NoSign + } else if negative { + Minus + } else { + Plus + }; + return BigInt::from_biguint(sign, biguint); + } + } + + fn random_biguint_below(&mut self, bound: &BigUint) -> BigUint { + assert!(!bound.is_zero()); + let bits = bound.bits(); + if bound.trailing_zeros() == Some(bits - 1) { + // The exclusive bound is trivially met in this case + return self.random_biguint(bits - 1); + } + loop { + let n = self.random_biguint(bits); + if n < *bound { + return n; + } + } + } + + fn random_biguint_range(&mut self, lbound: &BigUint, ubound: &BigUint) -> BigUint { + assert!(*lbound < *ubound); + if lbound.is_zero() { + self.random_biguint_below(ubound) + } else { + lbound + self.random_biguint_below(&(ubound - lbound)) + } + } + + fn random_bigint_range(&mut self, lbound: &BigInt, ubound: &BigInt) -> BigInt { + assert!(*lbound < *ubound); + if lbound.is_zero() { + BigInt::from(self.random_biguint_below(ubound.magnitude())) + } else if ubound.is_zero() { + lbound + BigInt::from(self.random_biguint_below(lbound.magnitude())) + } else { + let delta = ubound - lbound; + lbound + BigInt::from(self.random_biguint_below(delta.magnitude())) + } + } +} diff --git a/thirdparty/crates/num-bigint-0.4.8/src/biguint.rs b/thirdparty/crates/num-bigint-0.5.1/src/biguint.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/biguint.rs rename to thirdparty/crates/num-bigint-0.5.1/src/biguint.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/biguint/addition.rs b/thirdparty/crates/num-bigint-0.5.1/src/biguint/addition.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/biguint/addition.rs rename to thirdparty/crates/num-bigint-0.5.1/src/biguint/addition.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/biguint/arbitrary.rs b/thirdparty/crates/num-bigint-0.5.1/src/biguint/arbitrary.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/biguint/arbitrary.rs rename to thirdparty/crates/num-bigint-0.5.1/src/biguint/arbitrary.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/biguint/bits.rs b/thirdparty/crates/num-bigint-0.5.1/src/biguint/bits.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/biguint/bits.rs rename to thirdparty/crates/num-bigint-0.5.1/src/biguint/bits.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/biguint/convert.rs b/thirdparty/crates/num-bigint-0.5.1/src/biguint/convert.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/biguint/convert.rs rename to thirdparty/crates/num-bigint-0.5.1/src/biguint/convert.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/biguint/division.rs b/thirdparty/crates/num-bigint-0.5.1/src/biguint/division.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/biguint/division.rs rename to thirdparty/crates/num-bigint-0.5.1/src/biguint/division.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/biguint/iter.rs b/thirdparty/crates/num-bigint-0.5.1/src/biguint/iter.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/biguint/iter.rs rename to thirdparty/crates/num-bigint-0.5.1/src/biguint/iter.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/biguint/monty.rs b/thirdparty/crates/num-bigint-0.5.1/src/biguint/monty.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/biguint/monty.rs rename to thirdparty/crates/num-bigint-0.5.1/src/biguint/monty.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/biguint/multiplication.rs b/thirdparty/crates/num-bigint-0.5.1/src/biguint/multiplication.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/biguint/multiplication.rs rename to thirdparty/crates/num-bigint-0.5.1/src/biguint/multiplication.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/biguint/power.rs b/thirdparty/crates/num-bigint-0.5.1/src/biguint/power.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/biguint/power.rs rename to thirdparty/crates/num-bigint-0.5.1/src/biguint/power.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/biguint/serde.rs b/thirdparty/crates/num-bigint-0.5.1/src/biguint/serde.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/biguint/serde.rs rename to thirdparty/crates/num-bigint-0.5.1/src/biguint/serde.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/biguint/shift.rs b/thirdparty/crates/num-bigint-0.5.1/src/biguint/shift.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/biguint/shift.rs rename to thirdparty/crates/num-bigint-0.5.1/src/biguint/shift.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/biguint/subtraction.rs b/thirdparty/crates/num-bigint-0.5.1/src/biguint/subtraction.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/biguint/subtraction.rs rename to thirdparty/crates/num-bigint-0.5.1/src/biguint/subtraction.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/src/lib.rs b/thirdparty/crates/num-bigint-0.5.1/src/lib.rs similarity index 75% rename from thirdparty/crates/num-bigint-0.4.8/src/lib.rs rename to thirdparty/crates/num-bigint-0.5.1/src/lib.rs index bb9429fc6..771a27c3e 100644 --- a/thirdparty/crates/num-bigint-0.4.8/src/lib.rs +++ b/thirdparty/crates/num-bigint-0.5.1/src/lib.rs @@ -42,19 +42,24 @@ //! //! It's easy to generate large random numbers: //! -//! ```rust,ignore -//! use num_bigint::{ToBigInt, RandBigInt}; +#![cfg_attr(feature = "rand_0_10", doc = "```")] +#![cfg_attr(not(feature = "rand_0_10"), doc = "```ignore")] +//! # use ::rand_0_10 as rand; +//! use rand::{SeedableRng, rngs::SmallRng}; +//! use num_bigint::{BigInt, BigRng010}; //! -//! let mut rng = rand::thread_rng(); -//! let a = rng.gen_bigint(1000); +//! // This seed is just for demonstration, but in most cases +//! // you'll probably want a non-deterministic `rng`. +//! let mut rng = SmallRng::seed_from_u64(42); +//! let a = rng.random_bigint(1000); //! -//! let low = -10000.to_bigint().unwrap(); -//! let high = 10000.to_bigint().unwrap(); -//! let b = rng.gen_bigint_range(&low, &high); +//! let low = BigInt::from(-10000); +//! let high = BigInt::from(10000); +//! let b = rng.random_bigint_range(&low, &high); //! //! // Probably an even larger number. //! println!("{}", a * b); -//! ``` +#![doc = "```"] //! //! See the "Features" section for instructions for enabling random number generation. //! @@ -67,16 +72,26 @@ //! //! ### Random Generation //! -//! `num-bigint` supports the generation of random big integers when the `rand` -//! feature is enabled. To enable it include rand as +//! `num-bigint` supports the generation of random big integers when either of the `rand_0_9` or +//! `rand_0_10` features are enabled. The [`BigRng09`] and [`BigRng010`] traits provide extension +//! methods for any `rand_core` RNG of their respective version, while the structs [`RandomBits`], +//! [`UniformBigInt`], and [`UniformBigUint`] fulfill further functionality for random +//! distributions in `rand::distr`. +//! +//! For example, using `rand v0.10` in your `Cargo.toml` may look like this: //! //! ```toml -//! rand = "0.8" -//! num-bigint = { version = "0.4", features = ["rand"] } +//! rand = "0.10" +//! num-bigint = { version = "0.5", features = ["rand_0_10"] } //! ``` //! -//! Note that you must use the version of `rand` that `num-bigint` is compatible -//! with: `0.8`. +//! Note that you must use the same version of `rand` as the feature you enable in `num-bigint`. +//! It's also fine for multiple versions to be enabled at once -- the random-distribution structs +//! will be shared with trait implementations for each `rand` feature that is enabled, while the +//! `BigRng` traits are distinct. +//! +//! You can instead use `rand_core_0_9` or `rand_core_0_10` for a more restricted subset, with +//! *only* the `BigRng` traits. //! //! ### Arbitrary Big Integers //! @@ -96,7 +111,6 @@ //! The `num-bigint` crate is tested for rustc 1.60 and greater. #![cfg_attr(docsrs, feature(doc_cfg))] -#![doc(html_root_url = "https://docs.rs/num-bigint/0.4")] #![warn(rust_2018_idioms)] #![no_std] @@ -220,8 +234,13 @@ pub use crate::bigint::BigInt; pub use crate::bigint::Sign; pub use crate::bigint::ToBigInt; -#[cfg(feature = "rand")] -#[cfg_attr(docsrs, doc(cfg(feature = "rand")))] -pub use crate::bigrand::{RandBigInt, RandomBits, UniformBigInt, UniformBigUint}; +#[cfg(feature = "rand_core_0_10")] +pub use crate::bigrand::BigRng010; + +#[cfg(feature = "rand_core_0_9")] +pub use crate::bigrand::BigRng09; + +#[cfg(any(feature = "rand_0_10", feature = "rand_0_9"))] +pub use crate::bigrand::{RandomBits, UniformBigInt, UniformBigUint}; mod big_digit; diff --git a/thirdparty/crates/num-bigint-0.4.8/src/macros.rs b/thirdparty/crates/num-bigint-0.5.1/src/macros.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/src/macros.rs rename to thirdparty/crates/num-bigint-0.5.1/src/macros.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/tests/bigint.rs b/thirdparty/crates/num-bigint-0.5.1/tests/bigint.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/tests/bigint.rs rename to thirdparty/crates/num-bigint-0.5.1/tests/bigint.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/tests/bigint_bitwise.rs b/thirdparty/crates/num-bigint-0.5.1/tests/bigint_bitwise.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/tests/bigint_bitwise.rs rename to thirdparty/crates/num-bigint-0.5.1/tests/bigint_bitwise.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/tests/bigint_scalar.rs b/thirdparty/crates/num-bigint-0.5.1/tests/bigint_scalar.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/tests/bigint_scalar.rs rename to thirdparty/crates/num-bigint-0.5.1/tests/bigint_scalar.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/tests/biguint.rs b/thirdparty/crates/num-bigint-0.5.1/tests/biguint.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/tests/biguint.rs rename to thirdparty/crates/num-bigint-0.5.1/tests/biguint.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/tests/biguint_scalar.rs b/thirdparty/crates/num-bigint-0.5.1/tests/biguint_scalar.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/tests/biguint_scalar.rs rename to thirdparty/crates/num-bigint-0.5.1/tests/biguint_scalar.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/tests/consts/mod.rs b/thirdparty/crates/num-bigint-0.5.1/tests/consts/mod.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/tests/consts/mod.rs rename to thirdparty/crates/num-bigint-0.5.1/tests/consts/mod.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/tests/fuzzed.rs b/thirdparty/crates/num-bigint-0.5.1/tests/fuzzed.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/tests/fuzzed.rs rename to thirdparty/crates/num-bigint-0.5.1/tests/fuzzed.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/tests/macros/mod.rs b/thirdparty/crates/num-bigint-0.5.1/tests/macros/mod.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/tests/macros/mod.rs rename to thirdparty/crates/num-bigint-0.5.1/tests/macros/mod.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/tests/modpow.rs b/thirdparty/crates/num-bigint-0.5.1/tests/modpow.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/tests/modpow.rs rename to thirdparty/crates/num-bigint-0.5.1/tests/modpow.rs diff --git a/thirdparty/crates/num-bigint-0.4.8/tests/roots.rs b/thirdparty/crates/num-bigint-0.5.1/tests/roots.rs similarity index 100% rename from thirdparty/crates/num-bigint-0.4.8/tests/roots.rs rename to thirdparty/crates/num-bigint-0.5.1/tests/roots.rs diff --git a/thirdparty/crates/parquet-59.1.0/.cargo-checksum.json b/thirdparty/crates/parquet-59.1.0/.cargo-checksum.json deleted file mode 100644 index c6b29d82f..000000000 --- a/thirdparty/crates/parquet-59.1.0/.cargo-checksum.json +++ /dev/null @@ -1 +0,0 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{"CONTRIBUTING.md":"82832255fcf5ae17f11ddbe66e3fb0a413589017b127de5862dfcc69dcc4ab7e","Cargo.lock":"3ff8b0a1df5dda5f8750715002c350b7825369eee023e33d3524b253d2e91ee2","Cargo.toml":"2277e480e478d0cd7be4417848196f0bf72f03aa7a6fdb97bfcf696bd3299b40","Cargo.toml.orig":"85ab603dab9aa6fdfe8134118ba7333cdbae1f4b72067b38d021ce5543d11dd9","LICENSE.txt":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","NOTICE.txt":"e5b198d7f809311723889814d99a92f808c69e89a847efa7a7b65270f5fdeae6","README.md":"b13e919fe8af687cbcbd7a257886a21103d8484376916bbea6785fe17a67a96d","THRIFT.md":"3725bf644bd461d9bee6480128c1644d5fa47362a8f95683dda64acf99310c3a","benches/arrow_reader.rs":"bd605d7341307e3bf27902bcb3c7ce85ca916143dddde84f3b85e6bfd0b98085","benches/arrow_reader_clickbench.rs":"72486ef61c17fc2eb8177d2951df520128f42da928633bf5367a492e0ef07cbc","benches/arrow_reader_peak_memory.rs":"4f674f31d002708e0d0b9e3be02cf0cc35f884a8757f16386577a98da4222b40","benches/arrow_reader_row_filter.rs":"fb82ccb35e874d4edd78fd62c7d7d004ce7484447bfda3a490868edc382d036c","benches/arrow_statistics.rs":"92557f96a1057ec9de7ab4ecf7e74982e8454a221ee4e9180ef63da415d231fa","benches/arrow_writer.rs":"71ffee57a7561a35bc53dd22f702089ec7911bb62208b4e208341d733fe85fb8","benches/bloom_filter.rs":"6076c3aa376cbfd309cc2a03cce56c245564e036d38d1aa9b4354af6bda95db7","benches/compression.rs":"e316fdaee780d970862a66fdc62a748c081da7f762dc84df968061e62b6b9d43","benches/encoding.rs":"e0dc7244bf8e5adb6eb713384cba72d07ba8ee4ce57803d548de6ba757ec10c5","benches/metadata.rs":"4f35d4d4e7bb5b78a8d47ceb2e0f3c06bf626740dfb9d92dc6a9e5d47845dcc2","benches/parquet_round_trip.rs":"654200e7bddfc5ab55f98386a090fca55917d70a478b5ab90509ff1e7d68acc0","benches/push_decoder.rs":"c940d236dcbdbbfa1ff7efdd63e1e4e95fe78f538d25de1139e7f2bb56c1fb4d","benches/row_group_index_reader.rs":"358c2cba7d7dc3af874c8a22bc7a0a2988448d2344019efcba5e0ade6a91ce0b","benches/row_selection_cursor.rs":"af275bd1d7ffc3d5189b8b11802307ba94264ae38f05ae0abf337f19ac5ad7c5","benches/row_selector.rs":"377e5c0c5ee7abbb0d3ddce23cae26eab514d5c93d651e8055ebf5548532e075","benches/writer_overhead.rs":"db62402b994fbfd29b37d828dfd7bbca0bc28710384a3c4185a27f09f9e5f778","examples/external_metadata.rs":"33c3e8d6b7fbcbb4b910444d669ee955d8141c40966b99d61ae328412d17bb84","examples/read_parquet.rs":"2c98c4376e475b79802aaa6e4810353d07545ca01367bc934921b77262b175e9","examples/read_with_rowgroup.rs":"8d0650275b32a0cfd6c510fad334c0b5938f9e971eaf51ed8c3766bd7ae0e0d3","examples/write_parquet.rs":"2de9708be17539d99b8f53af09b0de34ad2baef31a0a382c84dcae9880d73f7f","pytest/requirements.in":"71720dc5110d9097ebff0b509c377876fd44964f7422d2084fa4ef72b8e7f5c1","pytest/requirements.txt":"7c1cec5ae612b752418c99a7df5794b7ab0aed2bd7ae194adae9050742680617","pytest/test_parquet_integration.py":"9f80d5f77476e3921d4b611348a6cf7f402e3702b128a7e4e5417ae4066d09bc","regen.sh":"a2be9fc42462e3704ccffed6e5d87301f4d4a9257138f7a05c62cb5f32d9ef02","src/arrow/array_reader/builder.rs":"46c65dc01c1d32de85d07f0d0619c1a0aa2e7659dc0cbbee4901828811c4f3ec","src/arrow/array_reader/byte_array.rs":"807d85470436d1bbefbf9080897989e41853b06fa49dc181d65858c325b6a46e","src/arrow/array_reader/byte_array_dictionary.rs":"a8eb50f292ce4fde74fdce1d977100f0055320667c009e2788b63440f02253a3","src/arrow/array_reader/byte_view_array.rs":"6aefed84348efaee0001b639bcc3f861b1957c41692eae116dae1821b65f00ec","src/arrow/array_reader/cached_array_reader.rs":"36ab0898b177bb3d1c006b535395b79857cb97d879ddb78749fb70a15a75624f","src/arrow/array_reader/empty_array.rs":"ccb30ef265039e1a750cb9a52d7836eeca55a658310f7f5a06d17dd5641546c8","src/arrow/array_reader/fixed_len_byte_array.rs":"5f1f2e772ed95f1026d6ff21cc018084ff16e659fe9157ae2818b443954baf03","src/arrow/array_reader/fixed_size_list_array.rs":"2a3d685a2d63a1b8dcd97c1cc1ff4648730759d555d5814201213d176f3ed83b","src/arrow/array_reader/list_array.rs":"96a8db9a89f28622a65039b58f039646e6e99db57f147ed505004a95ec150448","src/arrow/array_reader/list_view_array.rs":"c5e3845c7234522286873a72a3037ebdb52d52aa9020450e6f2db708cddae87f","src/arrow/array_reader/map_array.rs":"710787b1c4c317127992a54458c942ae9976de6908f78ae12fc5b34656216fd2","src/arrow/array_reader/mod.rs":"c1fa6975aae757e4cb9776a76136cb75a7f4ee93ccd1a1efc0c52036167e5a42","src/arrow/array_reader/null_array.rs":"a3bb3d6c9d5423e0e58223714aa27054881afcc63f096546f9e85dccfe1fae41","src/arrow/array_reader/primitive_array.rs":"9df99835aa4971ee68860ff30bb09d9abc945b6ecff68718f02795334cd48c47","src/arrow/array_reader/row_group_cache.rs":"b8e04e7bdd70f56bae258ca451f35fecaa7688079fda44ad5f3a7d6ccc0fd628","src/arrow/array_reader/row_group_index.rs":"b08e0742b50a4b98b73ed9fccbd585bf1e90310f14d5b1d599e73403fccd1369","src/arrow/array_reader/row_number.rs":"9504db4e61235daafdddfe16851c3e9c61ad420f51a2572839a6d039770b1c93","src/arrow/array_reader/struct_array.rs":"2bc5cd32c6e65e0ce4a3fa436ec052ec5a7f44befe5410ab38642c59463593d2","src/arrow/array_reader/test_util.rs":"353a16ad1a8db9a126ab1f9ed40d162b8210d1153e8ac2e9ba8af9b4fd48045b","src/arrow/arrow_reader/filter.rs":"346ecec64d0cb87a679a770ace05f806727b30d724efbee7d4ae64475b8800e0","src/arrow/arrow_reader/metrics.rs":"dbd85435fe323fe525d78cb00127099364a4f2de9271bb9d5ff9084674d7d12e","src/arrow/arrow_reader/mod.rs":"579d4241a533d71b51d459953cedb81e1faf3cd11fd55cab820ff92b1a3d6b40","src/arrow/arrow_reader/read_plan.rs":"04437c6c226a3c9a208b41d770ce262970abdaf35c39307a434ad94e0caed281","src/arrow/arrow_reader/selection.rs":"7cfd2b174d5a430b5e92b93e7e013d3a8ed68b775be5c37cc52f126b96162790","src/arrow/arrow_reader/statistics.rs":"7269a0e5c3efc1d3202bedf28ff9bd3c72b102d57092c12d433e87d1c5a48491","src/arrow/arrow_writer/byte_array.rs":"45bacdbdb328658aaa13bafa0c56151d9d9418c8e9d1e7887ee5c34c685efed0","src/arrow/arrow_writer/levels.rs":"d50295eeb54c9557642b99ae9205c317f59dfb42714a4c3e90c123389afba149","src/arrow/arrow_writer/mod.rs":"118630f0a8e3a0b4c6ae8cac63eefa922a546831fd50e1ec6e2da2354d1b0863","src/arrow/async_reader/metadata.rs":"04215161ec9ef03fd383a0d02879c65ddb24eea58188efec7a7c9c759bd8bd6c","src/arrow/async_reader/mod.rs":"45a9c90e40ccc80cbdda9cac3a89510d8221cc4219c044d3043583fd0f9709ec","src/arrow/async_reader/store.rs":"fe8ac2bd79554d900c5f52d2b3762cf75fd1601a2a177bf53db842ee932bfbf8","src/arrow/async_writer/mod.rs":"7fb9207d5931817623bc6d8a7186ad6a89b6a5b6554f4ed7b213acc8f628ed65","src/arrow/async_writer/store.rs":"2576c2e3f57d47f70ad1bc24ca7df6762029ea1da540a245185c34213c80cb37","src/arrow/buffer/bit_util.rs":"2293b3619f65a26bf236dc03e498f3efd568f7d6d7657e4805ce69cf575e5677","src/arrow/buffer/dictionary_buffer.rs":"0329a6f46a3f8b02a5c439e6d5933ac40160b7824351cc910ad1d1f4fcbebc76","src/arrow/buffer/mod.rs":"69e08e0b3347124397dcccd7fc53044629ea93868518aceb667e94040548349c","src/arrow/buffer/offset_buffer.rs":"69fdb496298a96abaa95e4bba9c820b31eaf90c7885bb8783f9bed49caebe2b7","src/arrow/buffer/view_buffer.rs":"e954bb9639eb16e0b61e460dc42ce30d6a424272784c3c3b298d3de310dd7d90","src/arrow/decoder/delta_byte_array.rs":"4a227b591c6f0cf68f60d77f91ac9cf888ea926530421278be42338dbe507497","src/arrow/decoder/dictionary_index.rs":"8a2c26327249a4316eec82438c65da00ea3610b8209565eb0cbdf72bbf73fb84","src/arrow/decoder/mod.rs":"7d1425a2a0818b7443dc89e0c3a749c4c6e1ab4ff1c4b1141c57deb1604ca29c","src/arrow/in_memory_row_group.rs":"c77cf07fbfd6613a2d4c8e23fa2a951d8c91d89b6fc23c792d51f9dc60292c38","src/arrow/mod.rs":"f59e61f3c602da05378ebd9116b2d531df8354dbfb0d8639118e70e489280ba2","src/arrow/push_decoder/mod.rs":"68aff720ac164e5a496bcea3e6c9ddd309da20cd4761f9738308d690a28769cb","src/arrow/push_decoder/reader_builder/data.rs":"3a06dc58a586800e98216dce3523538cc0262338dbcfc013e8e47c778d841380","src/arrow/push_decoder/reader_builder/filter.rs":"1fd54d79e140b0d05842caa28927dd534b3781fa4428ee5aa3f553e6c25a8c95","src/arrow/push_decoder/reader_builder/mod.rs":"ce1babc4b7f056597963fac9b9a287074fdb0866621ba176862d061db2140ed2","src/arrow/push_decoder/remaining.rs":"5e36c6a822c9a9af87b14f0b3136e1151e6b9b5bf1e9d0066c96a830e76bbb23","src/arrow/record_reader/buffer.rs":"ce0889931b4a8db732c488560cd8c5391be4508bfc4a08f59be495a17aed03ea","src/arrow/record_reader/definition_levels.rs":"7de8c5519d3e6b4979d310f1d5de5cc5609231b5f475940e7b0d1f928eef4ded","src/arrow/record_reader/mod.rs":"75a20fd49f7e2a2a064ffc50c0e1ad3cbd04c07a2d5e3a885b4faf990f7dc550","src/arrow/schema/complex.rs":"16bcccb27fdabe3982d37adbbf1e7a3ba33bdb152ceb62aa75e5f5453014f51d","src/arrow/schema/extension.rs":"ac9b4f1ff73212fe79801efb7fb12ae2c9ddad52183e09b889378d36e13aab84","src/arrow/schema/mod.rs":"8882135cffa3fac4fa0b81ddf6a125ed4db047f473885df0b9061eda693aad6b","src/arrow/schema/primitive.rs":"9ebf8d313c3df5720e8571ccaa1d75c19190405228cb52cd5536d1d1c95dae6d","src/arrow/schema/virtual_type.rs":"d97d7234a3bd1661b4cd7f5e849b56b505f4c7fef2715762d02a6081595fad22","src/basic.rs":"dac039b8b90a6693770f62d87dae7807042742dc02343ea379d73af7703dc88f","src/bin/parquet-concat.rs":"078be5a34dcf391e10d3c1ffcd9b16ddef0d9b79788849310cfe2287b31b3a56","src/bin/parquet-fromcsv-help.txt":"8a96bb57a021849802e61b0b9d07ff459acd7f7e0320330de4e77ae09a8a2e41","src/bin/parquet-fromcsv.rs":"f96cdea1adfbaec719efbbe42f4f99f225ad7b6ee66e709ab5eb04514229f6ae","src/bin/parquet-index.rs":"e0e6bf7b4b33850ec163f06762a35afe8d765e0fc397187eaa882421c3d74d3e","src/bin/parquet-layout.rs":"d4d0ce4e78cef1126b10c0a23694a28c7478c3da69243570cb5bc156a3094438","src/bin/parquet-read.rs":"a409b3b62675070d43bcddce1c1455bb417f5281a9eebb6dfe148c6f92d22ba9","src/bin/parquet-rewrite.rs":"93414b3e32374413dcfa8b9758097c05fb82d596d37c41f644d03f48955169e7","src/bin/parquet-rowcount.rs":"3940ee5a39790788dd14a089c3f56528c12ab509c7dd050f2078d58741c0209e","src/bin/parquet-schema.rs":"e2e679ead30cdf100c376fb462d109b6e8b0f18d57175cceeacc9eb5b1739e63","src/bin/parquet-show-bloom-filter.rs":"e03778dbaa1ae51cb7c58c711763ffc303f60e14e920b25ea708f3469ad398b1","src/bloom_filter/mod.rs":"1205117ba3fc0a702ace9a5c2361c79efc362ca035cde4b089ebabdd0b5214a0","src/column/chunker/cdc.rs":"f5c758ce3f8cc021c7bf0e8e170c51f5370ea5a4a4a4e373d2ae052e55684ee9","src/column/chunker/cdc_codegen.py":"a14f5291d9f96d893715ed80fda18f5cd50a6574c4b61cb1990d103cc7ac6192","src/column/chunker/cdc_generated.rs":"273529ca0d763d22ac8586ce23dd10941f9fef9d5e2f5f2e452f0131d363ebdf","src/column/chunker/mod.rs":"b071503ba1208bb8dc3cd0005b31d0ca198f60bae84ffcf98d6bcf7228a86560","src/column/mod.rs":"3d05cd64008d9c45cb8223d405368dd48df06e929ff93e623fb4e5bf3fabe00f","src/column/page.rs":"328539b6e2ff1c1aa66cd77d6c8af80393181fca1bf33221d4d6db9e954ba09f","src/column/page_encryption.rs":"34df686273e31872bbf5f33398a58d632ee378bde4706564fb58ec5e940dfdac","src/column/page_encryption_disabled.rs":"71a3f095939dde8451949f3c390a6862f0224db00403759fa80d47981bf14bc8","src/column/page_store.rs":"015811d51f70778c59b43aa0515ed9de7794191baa3d660bd91c01300f95f718","src/column/reader.rs":"f088a2a70a0adbf1dbd97f29fe401fd049b402c05ff6d6fc07f479c77e000972","src/column/reader/decoder.rs":"94483f56915f4a6f215fd02f315fe14e3285206730e2c85ef1ea56cf44a0a1a2","src/column/writer/byte_budget_chunker.rs":"8e1d215d2ae074e5258586813adb9ebc56a595db33f6188d32f435d0ec9ef8d0","src/column/writer/encoder.rs":"7722328b532cc83bc348ce3d00b1323b5cee870a9c41d1d5f833de70990027bb","src/column/writer/mod.rs":"b10dafcb34f117028daca370e6f641484efe9bf73972f20f0d0cde4c40e05840","src/compression.rs":"2dfa0eb205802baf1403578fe079088390b6d49fafa7fc9e50a03ec71ff1f095","src/data_type.rs":"656c4f97115e4bfbdcdc074a206c624006a46d05e5432a6e95aae0fe1e27fb46","src/encodings/decoding.rs":"40dd12aa522feecc910ea8132a84b745105190c044b6814c320146a6b4a5c735","src/encodings/decoding/byte_stream_split_decoder.rs":"017114b443e406d29fc66be8fcbc280295a3486802170820c548ed9b3ff50c58","src/encodings/encoding/byte_stream_split_encoder.rs":"8ea48728f12212c6fe75f705661e1deb7566a9f9e4cce0f021a411ddd2b635fa","src/encodings/encoding/dict_encoder.rs":"5e3ee6b230d6251370811e06e4897a370f38c085768fa819aaf8868edb8eadf6","src/encodings/encoding/mod.rs":"4f809107a677d0bcdca4ae514ef97f2869cb6f509da914e033892a2c7abcb84b","src/encodings/levels.rs":"7867d8873e8f537ae6c20f80f4230c16da8a9702c9ff7fafe5e5e954bcbfd483","src/encodings/mod.rs":"14df7b4bc46628bd874604ce22695832b012e2b59f4ea2912f590c169386821e","src/encodings/rle.rs":"4c62e58df99ec5daec7517a9e87ef870bf11d7b8b37cd453963875905fbee532","src/encryption/ciphers.rs":"fcc4c962795f7e1992d6838f1cd8163b7fb7d98a579f2cb5a0c5cf6f39106fcd","src/encryption/decrypt.rs":"e34fda5c9d3d8a25fad166077be6fc0e40aa382b41fde3b78e5ecae7151c0a5f","src/encryption/encrypt.rs":"11e6676d3c39813bd9f43bcebc3008170be6dfffb112a6d7c5033f07bd4c921d","src/encryption/mod.rs":"13822f0399262d5082eccaf5d16c2fca76e536bb28ac3077dd06d7ad3bc094e7","src/encryption/modules.rs":"7c0bee268abf8efb090c4530e9461cea629b60876877b7c96b050968a72b0d31","src/errors.rs":"f2644b92cdad56c7dc292ce8e17bab299881e0d63f98047f34c6acf6e4d50271","src/file/column_crypto_metadata.rs":"b986c78dcdceafbeac0af08ab9ccd53618aefd4192477391e807a6e9fe4cddb6","src/file/metadata/footer_tail.rs":"5dbb3ca3c621fb8bdce136c76c0ea98607e75d0969bb9277f696f55cd5722839","src/file/metadata/memory.rs":"efa6095020512a2539b604c78da0b01918f7b81459fd3b7179438e010c052457","src/file/metadata/mod.rs":"34f64fe9fa851edf14745d4ebdb126d00c29ad4dccb10dec90559e6bf943b84d","src/file/metadata/options.rs":"0e1d6d4d9f1df6d0eb78170947b2582cf53863b4c412257e800817ee0512b245","src/file/metadata/parser.rs":"bbe3eea0e27ab0e599faf62d151014ff25d67db12849d0f4b5f3facf81a73985","src/file/metadata/push_decoder.rs":"2989888905d872b0353029759e55b5800672bb8618b2c771f5d4585445ae1b85","src/file/metadata/reader.rs":"86d8ee33cb2744a6cd54e64200532a0012205da617668029f87db7cca8f853b7","src/file/metadata/thrift/encryption.rs":"7683f56fee986071721bf0cf76da55c8bcb1c1dfb91e37648e94146b1cf9c2d0","src/file/metadata/thrift/mod.rs":"bc1b818cc8174c4c5cf15ba0f7005d045b55622ac40b773db719ca6f5e09d4a0","src/file/metadata/writer.rs":"1031e71336d642d4711d1ef47bba417f238b975d1647df3eab51338055c07c72","src/file/mod.rs":"8ebca6e7555f4437bfdd45c97075fea6d9f4a18c32119bae6e84f155d506f5ac","src/file/page_index/column_index.rs":"836c61811abb3610a5b362aa397f162d15a7326ac05f28d8afa78f4115a169d0","src/file/page_index/index_reader.rs":"f438b2d254d464608c118b78800360ceea6ede79f443e015c0ccba55d45cf014","src/file/page_index/mod.rs":"87717035d2fbd0c8a338994d592e28f9e8e9fa502b4d3369b332ab3156ef3374","src/file/page_index/offset_index.rs":"262c11c7a13fda8e30341132872dfae3a30fe191c20ab2608bf0ccd3d9f33364","src/file/properties.rs":"658a755243aa7cedf297765c31e721c3a15058cae6e012448fa51030b45eaf7a","src/file/reader.rs":"5b921cb5c800ae6158200ffaafeb7e97f52528a606385ce8772c9cd4dd68836b","src/file/serialized_reader.rs":"ec64f581c0e20353e7f2854fa50f1a688097ad4e4ff0ab82627295f6d802244f","src/file/statistics.rs":"9e22a3c8e10cc3058b41b3262dfbfa2213899e09f52faec13991429957dd2c7b","src/file/writer.rs":"eee0dd42e86dd29ff42c920d7492cbb78419998c12c76f7ea69d5d73492b2aab","src/geospatial/accumulator.rs":"3abcb6ac5d7beacd888d88254f912ad1aa31dff0c88a399979470f0e5784ea66","src/geospatial/bounding_box.rs":"971e8be47f63e53d58581aec3da58ae2b50ff557a02f9467005258bff96e97b5","src/geospatial/mod.rs":"e19b53bc377eab2efb21f02e9980056abf6b4a830fe364af025b4fd9a92a31d8","src/geospatial/statistics.rs":"824a36f14b7a07fb180208f10f2470fdeae498ad187c1a05fbdafe5538064585","src/lib.rs":"2ee14d11c946e7b0d42dbd4116755afd4de03b8127580fc556d33016a991c362","src/parquet_macros.rs":"a3df3e4bb35f839285ba885dddceef24652bd9af8ccf29d7eec216e0f8a374fd","src/parquet_thrift.rs":"efdde5da47d94685096ae9c197bc657d15269cdd53f53ea212aff2cd4122075c","src/record/api.rs":"4fcb1670b8543d82dc9ceb0ad804031a453463669210da0f81b3a0b6ef838ad9","src/record/mod.rs":"b4f026402e005579250d97cb6238999e1ac22b87e2c075a3eaf311f169b35cdc","src/record/reader.rs":"86fd5cadd58f9b74bf1b669b17a7abf7454fd58c16d3c2cc2be1f845a8c4bfda","src/record/record_reader.rs":"cffc96f01028676ada1a555debafe4ba5b15d47253b7b1583b2455ee2b3db932","src/record/record_writer.rs":"41efd6c6aedeee01a3e8097c9216fcc337510ba608f3e6318658f3b916258c20","src/record/triplet.rs":"1ecc94fb17318aa998173e9e2d38876c4211990aefd8a2d29b97aad8ba53de00","src/schema/mod.rs":"a365a4b256a32ad1779e23f04252803c9da2f6579b77dc38d38c43fe7ec99fd4","src/schema/parser.rs":"fcce3efcc9db42a6f619235158dae4151e7377082ecdee3244a13631470ed0a3","src/schema/printer.rs":"245cfeffb454d273ece46f545535bd46541954db40eddf0a0f1d8aa5c0961847","src/schema/types.rs":"2ad50a0f758b46245448762ffe6be8af6f682b5ae30ff4ff4a6c1f2567d6291b","src/schema/visitor.rs":"452ff71b92d6fd42737c4da8004d0f98a6ecd805b4bf44633a19f0d3a7d31812","src/util/bit_pack.rs":"ee166cc8e9c93c16ee1e54f4c5ef60f387948d5fea248b61c1bf45c953a5d5af","src/util/bit_util.rs":"ef93cc39a384353f70a311efc916f86d94c35df5daed24b6e2507409b938ca56","src/util/interner.rs":"56ae30a7571fe47f36f077fd8df8b9eb0b654efa01e75ea66bd8238a37f40f79","src/util/mod.rs":"129f0cc534ba8ccb25f962fa068b197838d5b96258f0d27c1f057ccb9885b7e9","src/util/push_buffers.rs":"ddf81c09a6e54e849a3878242e39ac4d77c8c76dab21eff1613feb9be476f6d5","src/util/test_common/file_util.rs":"f44d07d280c9e473da2780d4d0860fc45d2e72e48afcf828eaed13efb3c17a0f","src/util/test_common/mod.rs":"e1193f2ddb43d626d01129a5fb11ef550d93bc129e1652a9df920a91bcada13d","src/util/test_common/page_util.rs":"5c31212e6c6d51075b8e921302b3f68a735c359ee8b11699283669914999b603","src/util/test_common/rand_gen.rs":"7fe918eceb3f21a341d483cfa8c54186e9e7536020ee01e552874be7dc6e034f","src/util/utf8.rs":"bfa5b876a43bc5d124ece8153a18ef08da244e1621961ba8e0fc03147c881ec0","src/variant.rs":"6494ee5e763ada61a3fb912c968b4798ca9e246a1c2430315060d58656d65b09","tests/arrow_reader/bad_data.rs":"23507069d19e325f985848b71d5e11fd63523373efee9b02ef48c097a44c173b","tests/arrow_reader/bad_raw_metadata.bin":"6b5ea4cf5c2c2098f59d658c65188089ab0f4db4434d3ad1176e9ec0f93b092c","tests/arrow_reader/bigdelta.parquet":"5c2d5f5125617fe57a8d65269e66bea5fc5680374f9f80fdf93aa48821ff0046","tests/arrow_reader/bloom_filter/async.rs":"69360b25596c6f17e1000b778c8fc0c39473fc87fc192d80eb476fa616b4ea5a","tests/arrow_reader/bloom_filter/mod.rs":"d8828e6555f080b2535459e17602db3dd28f1cf8421aec316f765a6d9b2d1bc9","tests/arrow_reader/bloom_filter/sync.rs":"dd82259a72a3081cc93515a79a7ea13c70ec42d697c293865a068b99e0f82ea7","tests/arrow_reader/checksum.rs":"93a87027886fd1460dbbcf349ac32fd82efca2f3bd1c961a9e7038d7555a6044","tests/arrow_reader/int96_stats_roundtrip.rs":"46c4ca1fe3fcc9e6f37c0e642c34ef3da81b0b14d9423d7617e9462c36d3696b","tests/arrow_reader/invalid_utf8.rs":"2c7f0e167b5df8eb6ef1801c2e6413cf0f0cf3725e08510cd201dc43d0895213","tests/arrow_reader/io/async_reader.rs":"28692a1e9b1676284cb48ad5022bbd8c1e6c763f62e1fd9d0da1ee4ab866329c","tests/arrow_reader/io/mod.rs":"0f8435cdde1e8fc064bb5fc78afb378b5f9f69b68aaecd0e90ba2de8f8d96b55","tests/arrow_reader/io/sync_reader.rs":"11c5f3b4a01846a252e3edc4b657e7f00b6a351d63506c19cc33d432c379af6a","tests/arrow_reader/large_string_overflow.rs":"a6a4dbecbd49a9c9c9a9056c588044d3b6fcebd48dbcbbaa1de59dcf7b01b8a9","tests/arrow_reader/mod.rs":"9fddc48e6cb389819b2b890be0281d403ae234c9d195862d187d2dd8894f7e90","tests/arrow_reader/new_types.bin":"1b99e7c5fb79cc7cf744306ac81bdea617e6071686eb0afe7935fc28b433f638","tests/arrow_reader/predicate_cache.rs":"56b18ebd6369b62c0fe9f08d587f361d4b1edcc48c863a0b4854c2b17c7d77ca","tests/arrow_reader/row_filter/async.rs":"988bab6c947688b61632891f801b406b6856e887e97a9614deea9160f70a456e","tests/arrow_reader/row_filter/mod.rs":"d8828e6555f080b2535459e17602db3dd28f1cf8421aec316f765a6d9b2d1bc9","tests/arrow_reader/row_filter/sync.rs":"55804a44d3997ca705907e66b37e67490327a87172af2e3a6a14ae2cf6ef87bc","tests/arrow_reader/statistics.rs":"d17e32df1314945a3ba0e31568e7f4995aca0b066b1c44b266aab858ca889ea2","tests/arrow_writer.rs":"d9f36bc3d40fca91c7f365def4096e28b6fde5cf837c4bfce10a365ca7ad24ba","tests/arrow_writer_layout.rs":"0dfe85631b32dede44eb101466aaa67436246ca456af18c71ae3167399664b2c","tests/encryption/encryption.rs":"1671702fd51181bbd61e6250dfb3bbf7b34812ddf57d71bfa67fb044288cba7f","tests/encryption/encryption_agnostic.rs":"6c2938dad5aee6c1a7ce034f04268f389af89d885f8927faee31be0544552f42","tests/encryption/encryption_async.rs":"25416ce6e4cf918237ed31b713265e5654823140f2ac4c4199f352389e99aabe","tests/encryption/encryption_disabled.rs":"c684f55f3c5d779d862a3fe1ea0fa811acfbee98bd8e4ba5dd9d276590468757","tests/encryption/encryption_util.rs":"cecae13fe258bf4b8907dac1c949b9e45249d01ebb37bdced7cb6b3fb2844b19","tests/encryption/mod.rs":"6112316d394e4288f8f8b80572f00c21f911191c331ca10e77079b513ce5f7b6","tests/geospatial.rs":"a33f1c8d49ae33684ad7b2c461df8ce82ff919547eafde93f46fa824c0e2f0aa","tests/variant_integration.rs":"88e3db39a4f335f2e9ee508677f155cd092fc884fb767892e0bf55f79cb024d9"},"package":"5302d4da74d6596a1f11f9928767995b53bca657cbeea1e4e8c5074f8a1157dd"} \ No newline at end of file diff --git a/thirdparty/crates/parquet-59.1.0/regen.sh b/thirdparty/crates/parquet-59.1.0/regen.sh deleted file mode 100755 index 1f2aee91b..000000000 --- a/thirdparty/crates/parquet-59.1.0/regen.sh +++ /dev/null @@ -1,44 +0,0 @@ -#!/usr/bin/env bash - -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the -# "License"); you may not use this file except in compliance -# with the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, -# software distributed under the License is distributed on an -# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -# KIND, either express or implied. See the License for the -# specific language governing permissions and limitations -# under the License. - -# using commit for parquet-format 2.11.0 -REVISION=848302e179d7bb52a64caea6a058b3c08212787c - -SOURCE_DIR="$(cd "$(dirname "${BASH_SOURCE[0]:-$0}")" && pwd)" - -COMMENT='//! See [`crate::file`] for easier to use APIs.' - -# Note: add argument --platform=linux/amd64 to run on mac -docker run -v $SOURCE_DIR:/thrift -it archlinux /bin/bash -c "\ - pacman -Sy --noconfirm wget thrift && \ - wget https://raw.githubusercontent.com/apache/parquet-format/$REVISION/src/main/thrift/parquet.thrift -O /tmp/parquet.thrift && \ - thrift --gen rs /tmp/parquet.thrift && \ - echo 'Removing TProcessor' && \ - sed -i '/use thrift::server::TProcessor;/d' parquet.rs && \ - echo 'Replacing TSerializable' && \ - sed -i 's/impl TSerializable for/impl crate::thrift::TSerializable for/g' parquet.rs && \ - echo 'Rewriting write_to_out_protocol' && \ - sed -i 's/fn write_to_out_protocol(&self, o_prot: &mut dyn TOutputProtocol)/fn write_to_out_protocol(\&self, o_prot: \&mut T)/g' parquet.rs && \ - echo 'Rewriting read_from_in_protocol' && \ - sed -i 's/fn read_from_in_protocol(i_prot: &mut dyn TInputProtocol)/fn read_from_in_protocol(i_prot: \&mut T)/g' parquet.rs && \ - echo 'Rewriting return value expectations' && \ - sed -i 's/Ok(ret.expect(\"return value should have been constructed\"))/ret.ok_or_else(|| thrift::Error::Protocol(ProtocolError::new(ProtocolErrorKind::InvalidData, \"return value should have been constructed\")))/g' parquet.rs && \ - sed -i '1i${COMMENT}' parquet.rs && \ - mv parquet.rs /thrift/src/format.rs - " diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/selection.rs b/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/selection.rs deleted file mode 100644 index 2ddf812f9..000000000 --- a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/selection.rs +++ /dev/null @@ -1,1704 +0,0 @@ -// Licensed to the Apache Software Foundation (ASF) under one -// or more contributor license agreements. See the NOTICE file -// distributed with this work for additional information -// regarding copyright ownership. The ASF licenses this file -// to you under the Apache License, Version 2.0 (the -// "License"); you may not use this file except in compliance -// with the License. You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, -// software distributed under the License is distributed on an -// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -// KIND, either express or implied. See the License for the -// specific language governing permissions and limitations -// under the License. - -use crate::arrow::ProjectionMask; -use crate::errors::ParquetError; -use crate::file::page_index::offset_index::{OffsetIndexMetaData, PageLocation}; -use arrow_array::{Array, BooleanArray}; -use arrow_buffer::{BooleanBuffer, BooleanBufferBuilder}; -use arrow_select::filter::SlicesIterator; -use std::cmp::Ordering; -use std::collections::VecDeque; -use std::ops::Range; - -/// Policy for picking a strategy to materialise [`RowSelection`] during execution. -/// -/// Note that this is a user-provided preference, and the actual strategy used -/// may differ based on safety considerations (e.g. page skipping). -#[derive(Clone, Copy, Debug, Eq, PartialEq)] -pub enum RowSelectionPolicy { - /// Use a queue of [`RowSelector`] values - Selectors, - /// Use a boolean mask to materialise the selection - Mask, - /// Choose between [`Self::Mask`] and [`Self::Selectors`] based on selector density - Auto { - /// Average selector length below which masks are preferred - threshold: usize, - }, -} - -impl Default for RowSelectionPolicy { - fn default() -> Self { - Self::Auto { threshold: 32 } - } -} - -/// Fully resolved strategy for materializing [`RowSelection`] during execution. -/// -/// This is determined from a combination of user preference (via [`RowSelectionPolicy`]) -/// and safety considerations (e.g. page skipping). -#[derive(Clone, Copy, Debug, Eq, PartialEq)] -pub(crate) enum RowSelectionStrategy { - /// Use a queue of [`RowSelector`] values - Selectors, - /// Use a boolean mask to materialise the selection - Mask, -} - -/// [`RowSelection`] is a collection of [`RowSelector`] used to skip rows when -/// scanning a parquet file -#[derive(Debug, Clone, Copy, Eq, PartialEq)] -pub struct RowSelector { - /// The number of rows - pub row_count: usize, - - /// If true, skip `row_count` rows - pub skip: bool, -} - -impl RowSelector { - /// Select `row_count` rows - pub fn select(row_count: usize) -> Self { - Self { - row_count, - skip: false, - } - } - - /// Skip `row_count` rows - pub fn skip(row_count: usize) -> Self { - Self { - row_count, - skip: true, - } - } -} - -/// [`RowSelection`] allows selecting or skipping a provided number of rows -/// when scanning the parquet file. -/// -/// This is applied prior to reading column data, and can therefore -/// be used to skip IO to fetch data into memory -/// -/// A typical use-case would be using the [`PageIndex`] to filter out rows -/// that don't satisfy a predicate -/// -/// # Example -/// ``` -/// use parquet::arrow::arrow_reader::{RowSelection, RowSelector}; -/// -/// let selectors = vec![ -/// RowSelector::skip(5), -/// RowSelector::select(5), -/// RowSelector::select(5), -/// RowSelector::skip(5), -/// ]; -/// -/// // Creating a selection will combine adjacent selectors -/// let selection: RowSelection = selectors.into(); -/// -/// let expected = vec![ -/// RowSelector::skip(5), -/// RowSelector::select(10), -/// RowSelector::skip(5), -/// ]; -/// -/// let actual: Vec = selection.into(); -/// assert_eq!(actual, expected); -/// -/// // you can also create a selection from consecutive ranges -/// let ranges = vec![5..10, 10..15]; -/// let selection = -/// RowSelection::from_consecutive_ranges(ranges.into_iter(), 20); -/// let actual: Vec = selection.into(); -/// assert_eq!(actual, expected); -/// ``` -/// -/// A [`RowSelection`] maintains the following invariants: -/// -/// * It contains no [`RowSelector`] of 0 rows -/// * Consecutive [`RowSelector`]s alternate skipping or selecting rows -/// -/// [`PageIndex`]: crate::file::page_index::column_index::ColumnIndexMetaData -#[derive(Debug, Clone, Default, Eq, PartialEq)] -pub struct RowSelection { - selectors: Vec, -} - -impl RowSelection { - /// Creates a [`RowSelection`] from a slice of [`BooleanArray`] - /// - /// # Panic - /// - /// Panics if any of the [`BooleanArray`] contain nulls - pub fn from_filters(filters: &[BooleanArray]) -> Self { - let mut next_offset = 0; - let total_rows = filters.iter().map(|x| x.len()).sum(); - - let iter = filters.iter().flat_map(|filter| { - let offset = next_offset; - next_offset += filter.len(); - assert_eq!(filter.null_count(), 0); - SlicesIterator::new(filter).map(move |(start, end)| start + offset..end + offset) - }); - - Self::from_consecutive_ranges(iter, total_rows) - } - - /// Creates a [`RowSelection`] from an iterator of consecutive ranges to keep - pub fn from_consecutive_ranges>>( - ranges: I, - total_rows: usize, - ) -> Self { - let mut selectors: Vec = Vec::with_capacity(ranges.size_hint().0); - let mut last_end = 0; - for range in ranges { - let len = range.end - range.start; - if len == 0 { - continue; - } - - match range.start.cmp(&last_end) { - Ordering::Equal => match selectors.last_mut() { - Some(last) => last.row_count = last.row_count.checked_add(len).unwrap(), - None => selectors.push(RowSelector::select(len)), - }, - Ordering::Greater => { - selectors.push(RowSelector::skip(range.start - last_end)); - selectors.push(RowSelector::select(len)) - } - Ordering::Less => panic!("out of order"), - } - last_end = range.end; - } - - if last_end != total_rows { - selectors.push(RowSelector::skip(total_rows - last_end)) - } - - Self { selectors } - } - - /// Given an offset index, return the byte ranges for all data pages selected by `self` - /// - /// This is useful for determining what byte ranges to fetch from underlying storage - /// - /// Note: this method does not make any effort to combine consecutive ranges, nor coalesce - /// ranges that are close together. This is instead delegated to the IO subsystem to optimise, - /// e.g. [`ObjectStore::get_ranges`](object_store::ObjectStore::get_ranges) - pub fn scan_ranges(&self, page_locations: &[PageLocation]) -> Vec> { - let mut ranges: Vec> = vec![]; - let mut row_offset = 0; - - let mut pages = page_locations.iter().peekable(); - let mut selectors = self.selectors.iter().cloned(); - let mut current_selector = selectors.next(); - let mut current_page = pages.next(); - - let mut current_page_included = false; - - while let Some((selector, page)) = current_selector.as_mut().zip(current_page) { - if !(selector.skip || current_page_included) { - let start = page.offset as u64; - let end = start + page.compressed_page_size as u64; - ranges.push(start..end); - current_page_included = true; - } - - if let Some(next_page) = pages.peek() { - if row_offset + selector.row_count > next_page.first_row_index as usize { - let remaining_in_page = next_page.first_row_index as usize - row_offset; - selector.row_count -= remaining_in_page; - row_offset += remaining_in_page; - current_page = pages.next(); - current_page_included = false; - - continue; - } else { - if row_offset + selector.row_count == next_page.first_row_index as usize { - current_page = pages.next(); - current_page_included = false; - } - row_offset += selector.row_count; - current_selector = selectors.next(); - } - } else { - if !(selector.skip || current_page_included) { - let start = page.offset as u64; - let end = start + page.compressed_page_size as u64; - ranges.push(start..end); - } - current_selector = selectors.next() - } - } - - ranges - } - - /// Returns true if this selection would skip any data pages within the provided columns - fn selection_skips_any_page( - &self, - projection: &ProjectionMask, - columns: &[OffsetIndexMetaData], - ) -> bool { - columns.iter().enumerate().any(|(leaf_idx, column)| { - if !projection.leaf_included(leaf_idx) { - return false; - } - - let locations = column.page_locations(); - if locations.is_empty() { - return false; - } - - let ranges = self.scan_ranges(locations); - !ranges.is_empty() && ranges.len() < locations.len() - }) - } - - /// Returns true if selectors should be forced, preventing mask materialisation - pub(crate) fn should_force_selectors( - &self, - projection: &ProjectionMask, - offset_index: Option<&[OffsetIndexMetaData]>, - ) -> bool { - match offset_index { - Some(columns) => self.selection_skips_any_page(projection, columns), - None => false, - } - } - - /// Splits off the first `row_count` from this [`RowSelection`] - pub fn split_off(&mut self, row_count: usize) -> Self { - let mut total_count = 0; - - // Find the index where the selector exceeds the row count - let find = self.selectors.iter().position(|selector| { - total_count += selector.row_count; - total_count > row_count - }); - - let split_idx = match find { - Some(idx) => idx, - None => { - let selectors = std::mem::take(&mut self.selectors); - return Self { selectors }; - } - }; - - let mut remaining = self.selectors.split_off(split_idx); - - // Always present as `split_idx < self.selectors.len` - let next = remaining.first_mut().unwrap(); - let overflow = total_count - row_count; - - if next.row_count != overflow { - self.selectors.push(RowSelector { - row_count: next.row_count - overflow, - skip: next.skip, - }) - } - next.row_count = overflow; - - std::mem::swap(&mut remaining, &mut self.selectors); - Self { - selectors: remaining, - } - } - /// returns a [`RowSelection`] representing rows that are selected in both - /// input [`RowSelection`]s. - /// - /// This is equivalent to the logical `AND` / conjunction of the two - /// selections. - /// - /// # Example - /// If `N` means the row is not selected, and `Y` means it is - /// selected: - /// - /// ```text - /// self: NNNNNNNNNNNNYYYYYYYYYYYYYYYYYYYYYYNNNYYYYY - /// other: YYYYYNNNNYYYYYYYYYYYYY YYNNN - /// - /// returned: NNNNNNNNNNNNYYYYYNNNNYYYYYYYYYYYYYNNNYYNNN - /// ``` - /// - /// # Panics - /// - /// Panics if `other` does not have a length equal to the number of rows selected - /// by this RowSelection - /// - pub fn and_then(&self, other: &Self) -> Self { - let mut selectors = vec![]; - let mut first = self.selectors.iter().cloned().peekable(); - let mut second = other.selectors.iter().cloned().peekable(); - - let mut to_skip = 0; - while let Some(b) = second.peek_mut() { - let a = first - .peek_mut() - .expect("selection exceeds the number of selected rows"); - - if b.row_count == 0 { - second.next().unwrap(); - continue; - } - - if a.row_count == 0 { - first.next().unwrap(); - continue; - } - - if a.skip { - // Records were skipped when producing second - to_skip += a.row_count; - first.next().unwrap(); - continue; - } - - let skip = b.skip; - let to_process = a.row_count.min(b.row_count); - - a.row_count -= to_process; - b.row_count -= to_process; - - match skip { - true => to_skip += to_process, - false => { - if to_skip != 0 { - selectors.push(RowSelector::skip(to_skip)); - to_skip = 0; - } - selectors.push(RowSelector::select(to_process)) - } - } - } - - for v in first { - if v.row_count != 0 { - assert!( - v.skip, - "selection contains less than the number of selected rows" - ); - to_skip += v.row_count - } - } - - if to_skip != 0 { - selectors.push(RowSelector::skip(to_skip)); - } - - Self { selectors } - } - - /// Compute the intersection of two [`RowSelection`] - /// For example: - /// self: NNYYYYNNYYNYN - /// other: NYNNNNNNY - /// - /// returned: NNNNNNNNYYNYN - pub fn intersection(&self, other: &Self) -> Self { - intersect_row_selections(&self.selectors, &other.selectors) - } - - /// Compute the union of two [`RowSelection`] - /// For example: - /// self: NNYYYYNNYYNYN - /// other: NYNNNNNNN - /// - /// returned: NYYYYYNNYYNYN - pub fn union(&self, other: &Self) -> Self { - union_row_selections(&self.selectors, &other.selectors) - } - - /// Returns `true` if this [`RowSelection`] selects any rows - pub fn selects_any(&self) -> bool { - self.selectors.iter().any(|x| !x.skip) - } - - /// Trims this [`RowSelection`] removing any trailing skips - pub(crate) fn trim(mut self) -> Self { - while self.selectors.last().map(|x| x.skip).unwrap_or(false) { - self.selectors.pop(); - } - self - } - - /// Applies an offset to this [`RowSelection`], skipping the first `offset` selected rows - pub(crate) fn offset(mut self, offset: usize) -> Self { - if offset == 0 { - return self; - } - - let mut selected_count = 0; - let mut skipped_count = 0; - - // Find the index where the selector exceeds the row count - let find = self - .selectors - .iter() - .position(|selector| match selector.skip { - true => { - skipped_count += selector.row_count; - false - } - false => { - selected_count += selector.row_count; - selected_count > offset - } - }); - - let split_idx = match find { - Some(idx) => idx, - None => { - self.selectors.clear(); - return self; - } - }; - - let mut selectors = Vec::with_capacity(self.selectors.len() - split_idx + 1); - selectors.push(RowSelector::skip(skipped_count + offset)); - selectors.push(RowSelector::select(selected_count - offset)); - selectors.extend_from_slice(&self.selectors[split_idx + 1..]); - - Self { selectors } - } - - /// Limit this [`RowSelection`] to only select `limit` rows - pub(crate) fn limit(mut self, mut limit: usize) -> Self { - if limit == 0 { - self.selectors.clear(); - } - - for (idx, selection) in self.selectors.iter_mut().enumerate() { - if !selection.skip { - if selection.row_count >= limit { - selection.row_count = limit; - self.selectors.truncate(idx + 1); - break; - } else { - limit -= selection.row_count; - } - } - } - self - } - - /// Returns an iterator over the [`RowSelector`]s for this - /// [`RowSelection`]. - pub fn iter(&self) -> impl Iterator { - self.selectors.iter() - } - - /// Returns the number of selected rows - pub fn row_count(&self) -> usize { - self.iter().filter(|s| !s.skip).map(|s| s.row_count).sum() - } - - /// Returns the number of de-selected rows - pub fn skipped_row_count(&self) -> usize { - self.iter().filter(|s| s.skip).map(|s| s.row_count).sum() - } - - /// Expands the selection to align with batch boundaries. - /// This is needed when using cached array readers to ensure that - /// the cached data covers full batches. - pub(crate) fn expand_to_batch_boundaries(&self, batch_size: usize, total_rows: usize) -> Self { - if batch_size == 0 { - return self.clone(); - } - - let mut expanded_ranges = Vec::new(); - let mut row_offset = 0; - - for selector in &self.selectors { - if selector.skip { - row_offset += selector.row_count; - } else { - let start = row_offset; - let end = row_offset + selector.row_count; - - // Expand start to batch boundary - let expanded_start = (start / batch_size) * batch_size; - // Expand end to batch boundary - let expanded_end = end.div_ceil(batch_size) * batch_size; - let expanded_end = expanded_end.min(total_rows); - - expanded_ranges.push(expanded_start..expanded_end); - row_offset += selector.row_count; - } - } - - // Sort ranges by start position - expanded_ranges.sort_by_key(|range| range.start); - - // Merge overlapping or consecutive ranges - let mut merged_ranges: Vec> = Vec::new(); - for range in expanded_ranges { - if let Some(last) = merged_ranges.last_mut() { - if range.start <= last.end { - // Overlapping or consecutive - merge them - last.end = last.end.max(range.end); - } else { - // No overlap - add new range - merged_ranges.push(range); - } - } else { - // First range - merged_ranges.push(range); - } - } - - Self::from_consecutive_ranges(merged_ranges.into_iter(), total_rows) - } -} - -impl From> for RowSelection { - fn from(selectors: Vec) -> Self { - selectors.into_iter().collect() - } -} - -impl FromIterator for RowSelection { - fn from_iter>(iter: T) -> Self { - let iter = iter.into_iter(); - - // Capacity before filter - let mut selectors = Vec::with_capacity(iter.size_hint().0); - - let mut filtered = iter.filter(|x| x.row_count != 0); - if let Some(x) = filtered.next() { - selectors.push(x); - } - - for s in filtered { - if s.row_count == 0 { - continue; - } - - // Combine consecutive selectors - let last = selectors.last_mut().unwrap(); - if last.skip == s.skip { - last.row_count = last.row_count.checked_add(s.row_count).unwrap(); - } else { - selectors.push(s) - } - } - - Self { selectors } - } -} - -impl From for Vec { - fn from(r: RowSelection) -> Self { - r.selectors - } -} - -impl From for VecDeque { - fn from(r: RowSelection) -> Self { - r.selectors.into() - } -} - -/// Combine two lists of `RowSelection` return the intersection of them -/// For example: -/// self: NNYYYYNNYYNYN -/// other: NYNNNNNNY -/// -/// returned: NNNNNNNNYYNYN -fn intersect_row_selections(left: &[RowSelector], right: &[RowSelector]) -> RowSelection { - let mut l_iter = left.iter().copied().peekable(); - let mut r_iter = right.iter().copied().peekable(); - - let iter = std::iter::from_fn(move || { - loop { - let l = l_iter.peek_mut(); - let r = r_iter.peek_mut(); - - match (l, r) { - (Some(a), _) if a.row_count == 0 => { - l_iter.next().unwrap(); - } - (_, Some(b)) if b.row_count == 0 => { - r_iter.next().unwrap(); - } - (Some(l), Some(r)) => { - return match (l.skip, r.skip) { - // Keep both ranges - (false, false) => { - if l.row_count < r.row_count { - r.row_count -= l.row_count; - l_iter.next() - } else { - l.row_count -= r.row_count; - r_iter.next() - } - } - // skip at least one - _ => { - if l.row_count < r.row_count { - let skip = l.row_count; - r.row_count -= l.row_count; - l_iter.next(); - Some(RowSelector::skip(skip)) - } else { - let skip = r.row_count; - l.row_count -= skip; - r_iter.next(); - Some(RowSelector::skip(skip)) - } - } - }; - } - (Some(_), None) => return l_iter.next(), - (None, Some(_)) => return r_iter.next(), - (None, None) => return None, - } - } - }); - - iter.collect() -} - -/// Combine two lists of `RowSelector` return the union of them -/// For example: -/// self: NNYYYYNNYYNYN -/// other: NYNNNNNNY -/// -/// returned: NYYYYYNNYYNYN -/// -/// This can be removed from here once RowSelection::union is in parquet::arrow -fn union_row_selections(left: &[RowSelector], right: &[RowSelector]) -> RowSelection { - let mut l_iter = left.iter().copied().peekable(); - let mut r_iter = right.iter().copied().peekable(); - - let iter = std::iter::from_fn(move || { - loop { - let l = l_iter.peek_mut(); - let r = r_iter.peek_mut(); - - match (l, r) { - (Some(a), _) if a.row_count == 0 => { - l_iter.next().unwrap(); - } - (_, Some(b)) if b.row_count == 0 => { - r_iter.next().unwrap(); - } - (Some(l), Some(r)) => { - return match (l.skip, r.skip) { - // Skip both ranges - (true, true) => { - if l.row_count < r.row_count { - let skip = l.row_count; - r.row_count -= l.row_count; - l_iter.next(); - Some(RowSelector::skip(skip)) - } else { - let skip = r.row_count; - l.row_count -= skip; - r_iter.next(); - Some(RowSelector::skip(skip)) - } - } - // Keep rows from left - (false, true) => { - if l.row_count < r.row_count { - r.row_count -= l.row_count; - l_iter.next() - } else { - let r_row_count = r.row_count; - l.row_count -= r_row_count; - r_iter.next(); - Some(RowSelector::select(r_row_count)) - } - } - // Keep rows from right - (true, false) => { - if l.row_count < r.row_count { - let l_row_count = l.row_count; - r.row_count -= l_row_count; - l_iter.next(); - Some(RowSelector::select(l_row_count)) - } else { - l.row_count -= r.row_count; - r_iter.next() - } - } - // Keep at least one - _ => { - if l.row_count < r.row_count { - r.row_count -= l.row_count; - l_iter.next() - } else { - l.row_count -= r.row_count; - r_iter.next() - } - } - }; - } - (Some(_), None) => return l_iter.next(), - (None, Some(_)) => return r_iter.next(), - (None, None) => return None, - } - } - }); - - iter.collect() -} - -/// Cursor for iterating a mask-backed [`RowSelection`] -/// -/// This is best for dense selections where there are many small skips -/// or selections. For example, selecting every other row. -#[derive(Debug)] -pub struct MaskCursor { - mask: BooleanBuffer, - /// Current absolute offset into the selection - position: usize, -} - -impl MaskCursor { - /// Returns `true` when no further rows remain - pub fn is_empty(&self) -> bool { - self.position >= self.mask.len() - } - - /// Advance through the mask representation, producing the next chunk summary - pub fn next_mask_chunk(&mut self, batch_size: usize) -> Option { - let (initial_skip, chunk_rows, selected_rows, mask_start, end_position) = { - let mask = &self.mask; - - if self.position >= mask.len() { - return None; - } - - let start_position = self.position; - let mut cursor = start_position; - let mut initial_skip = 0; - - while cursor < mask.len() && !mask.value(cursor) { - initial_skip += 1; - cursor += 1; - } - - let mask_start = cursor; - let mut chunk_rows = 0; - let mut selected_rows = 0; - - // Advance until enough rows have been selected to satisfy the batch size, - // or until the mask is exhausted. This mirrors the behaviour of the legacy - // `RowSelector` queue-based iteration. - while cursor < mask.len() && selected_rows < batch_size { - chunk_rows += 1; - if mask.value(cursor) { - selected_rows += 1; - } - cursor += 1; - } - - (initial_skip, chunk_rows, selected_rows, mask_start, cursor) - }; - - self.position = end_position; - - Some(MaskChunk { - initial_skip, - chunk_rows, - selected_rows, - mask_start, - }) - } - - /// Materialise the boolean values for a mask-backed chunk - pub fn mask_values_for(&self, chunk: &MaskChunk) -> Result { - if chunk.mask_start.saturating_add(chunk.chunk_rows) > self.mask.len() { - return Err(ParquetError::General( - "Internal Error: MaskChunk exceeds mask length".to_string(), - )); - } - Ok(BooleanArray::from( - self.mask.slice(chunk.mask_start, chunk.chunk_rows), - )) - } -} - -/// Cursor for iterating a selector-backed [`RowSelection`] -/// -/// This is best for sparse selections where large contiguous -/// blocks of rows are selected or skipped. -#[derive(Debug)] -pub struct SelectorsCursor { - selectors: VecDeque, - /// Current absolute offset into the selection - position: usize, -} - -impl SelectorsCursor { - /// Returns `true` when no further rows remain - pub fn is_empty(&self) -> bool { - self.selectors.is_empty() - } - - pub(crate) fn selectors_mut(&mut self) -> &mut VecDeque { - &mut self.selectors - } - - /// Return the next [`RowSelector`] - pub(crate) fn next_selector(&mut self) -> RowSelector { - let selector = self.selectors.pop_front().unwrap(); - self.position += selector.row_count; - selector - } - - /// Return a selector to the front, rewinding the position - pub(crate) fn return_selector(&mut self, selector: RowSelector) { - self.position = self.position.saturating_sub(selector.row_count); - self.selectors.push_front(selector); - } -} - -/// Result of computing the next chunk to read when using a [`MaskCursor`] -#[derive(Debug)] -pub struct MaskChunk { - /// Number of leading rows to skip before reaching selected rows - pub initial_skip: usize, - /// Total rows covered by this chunk (selected + skipped) - pub chunk_rows: usize, - /// Rows actually selected within the chunk - pub selected_rows: usize, - /// Starting offset within the mask where the chunk begins - pub mask_start: usize, -} - -/// Cursor for iterating a [`RowSelection`] during execution within a -/// [`ReadPlan`](crate::arrow::arrow_reader::ReadPlan). -/// -/// This keeps per-reader state such as the current position and delegates the -/// actual storage strategy to the internal `RowSelectionBacking`. -#[derive(Debug)] -pub enum RowSelectionCursor { - /// Reading all rows - All, - /// Use a bitmask to back the selection (dense selections) - Mask(MaskCursor), - /// Use a queue of selectors to back the selection (sparse selections) - Selectors(SelectorsCursor), -} - -impl RowSelectionCursor { - /// Create a [`MaskCursor`] cursor backed by a bitmask, from an existing set of selectors - pub(crate) fn new_mask_from_selectors(selectors: Vec) -> Self { - Self::Mask(MaskCursor { - mask: boolean_mask_from_selectors(&selectors), - position: 0, - }) - } - - /// Create a [`RowSelectionCursor::Selectors`] from the provided selectors - pub(crate) fn new_selectors(selectors: Vec) -> Self { - Self::Selectors(SelectorsCursor { - selectors: selectors.into(), - position: 0, - }) - } - - /// Create a cursor that selects all rows - pub(crate) fn new_all() -> Self { - Self::All - } -} - -fn boolean_mask_from_selectors(selectors: &[RowSelector]) -> BooleanBuffer { - let total_rows: usize = selectors.iter().map(|s| s.row_count).sum(); - let mut builder = BooleanBufferBuilder::new(total_rows); - for selector in selectors { - builder.append_n(selector.row_count, !selector.skip); - } - builder.finish() -} - -#[cfg(test)] -mod tests { - use super::*; - use rand::{Rng, rng}; - - #[test] - fn test_from_filters() { - let filters = vec![ - BooleanArray::from(vec![false, false, false, true, true, true, true]), - BooleanArray::from(vec![true, true, false, false, true, true, true]), - BooleanArray::from(vec![false, false, false, false]), - BooleanArray::from(Vec::::new()), - ]; - - let selection = RowSelection::from_filters(&filters[..1]); - assert!(selection.selects_any()); - assert_eq!( - selection.selectors, - vec![RowSelector::skip(3), RowSelector::select(4)] - ); - - let selection = RowSelection::from_filters(&filters[..2]); - assert!(selection.selects_any()); - assert_eq!( - selection.selectors, - vec![ - RowSelector::skip(3), - RowSelector::select(6), - RowSelector::skip(2), - RowSelector::select(3) - ] - ); - - let selection = RowSelection::from_filters(&filters); - assert!(selection.selects_any()); - assert_eq!( - selection.selectors, - vec![ - RowSelector::skip(3), - RowSelector::select(6), - RowSelector::skip(2), - RowSelector::select(3), - RowSelector::skip(4) - ] - ); - - let selection = RowSelection::from_filters(&filters[2..3]); - assert!(!selection.selects_any()); - assert_eq!(selection.selectors, vec![RowSelector::skip(4)]); - } - - #[test] - fn test_split_off() { - let mut selection = RowSelection::from(vec![ - RowSelector::skip(34), - RowSelector::select(12), - RowSelector::skip(3), - RowSelector::select(35), - ]); - - let split = selection.split_off(34); - assert_eq!(split.selectors, vec![RowSelector::skip(34)]); - assert_eq!( - selection.selectors, - vec![ - RowSelector::select(12), - RowSelector::skip(3), - RowSelector::select(35) - ] - ); - - let split = selection.split_off(5); - assert_eq!(split.selectors, vec![RowSelector::select(5)]); - assert_eq!( - selection.selectors, - vec![ - RowSelector::select(7), - RowSelector::skip(3), - RowSelector::select(35) - ] - ); - - let split = selection.split_off(8); - assert_eq!( - split.selectors, - vec![RowSelector::select(7), RowSelector::skip(1)] - ); - assert_eq!( - selection.selectors, - vec![RowSelector::skip(2), RowSelector::select(35)] - ); - - let split = selection.split_off(200); - assert_eq!( - split.selectors, - vec![RowSelector::skip(2), RowSelector::select(35)] - ); - assert!(selection.selectors.is_empty()); - } - - #[test] - fn test_offset() { - let selection = RowSelection::from(vec![ - RowSelector::select(5), - RowSelector::skip(23), - RowSelector::select(7), - RowSelector::skip(33), - RowSelector::select(6), - ]); - - let selection = selection.offset(2); - assert_eq!( - selection.selectors, - vec![ - RowSelector::skip(2), - RowSelector::select(3), - RowSelector::skip(23), - RowSelector::select(7), - RowSelector::skip(33), - RowSelector::select(6), - ] - ); - - let selection = selection.offset(5); - assert_eq!( - selection.selectors, - vec![ - RowSelector::skip(30), - RowSelector::select(5), - RowSelector::skip(33), - RowSelector::select(6), - ] - ); - - let selection = selection.offset(3); - assert_eq!( - selection.selectors, - vec![ - RowSelector::skip(33), - RowSelector::select(2), - RowSelector::skip(33), - RowSelector::select(6), - ] - ); - - let selection = selection.offset(2); - assert_eq!( - selection.selectors, - vec![RowSelector::skip(68), RowSelector::select(6),] - ); - - let selection = selection.offset(3); - assert_eq!( - selection.selectors, - vec![RowSelector::skip(71), RowSelector::select(3),] - ); - } - - #[test] - fn test_and() { - let mut a = RowSelection::from(vec![ - RowSelector::skip(12), - RowSelector::select(23), - RowSelector::skip(3), - RowSelector::select(5), - ]); - - let b = RowSelection::from(vec![ - RowSelector::select(5), - RowSelector::skip(4), - RowSelector::select(15), - RowSelector::skip(4), - ]); - - let mut expected = RowSelection::from(vec![ - RowSelector::skip(12), - RowSelector::select(5), - RowSelector::skip(4), - RowSelector::select(14), - RowSelector::skip(3), - RowSelector::select(1), - RowSelector::skip(4), - ]); - - assert_eq!(a.and_then(&b), expected); - - a.split_off(7); - expected.split_off(7); - assert_eq!(a.and_then(&b), expected); - - let a = RowSelection::from(vec![RowSelector::select(5), RowSelector::skip(3)]); - - let b = RowSelection::from(vec![ - RowSelector::select(2), - RowSelector::skip(1), - RowSelector::select(1), - RowSelector::skip(1), - ]); - - assert_eq!( - a.and_then(&b).selectors, - vec![ - RowSelector::select(2), - RowSelector::skip(1), - RowSelector::select(1), - RowSelector::skip(4) - ] - ); - } - - #[test] - fn test_combine() { - let a = vec![ - RowSelector::skip(3), - RowSelector::skip(3), - RowSelector::select(10), - RowSelector::skip(4), - ]; - - let b = vec![ - RowSelector::skip(3), - RowSelector::skip(3), - RowSelector::select(10), - RowSelector::skip(4), - RowSelector::skip(0), - ]; - - let c = vec![ - RowSelector::skip(2), - RowSelector::skip(4), - RowSelector::select(3), - RowSelector::select(3), - RowSelector::select(4), - RowSelector::skip(3), - RowSelector::skip(1), - RowSelector::skip(0), - ]; - - let expected = RowSelection::from(vec![ - RowSelector::skip(6), - RowSelector::select(10), - RowSelector::skip(4), - ]); - - assert_eq!(RowSelection::from_iter(a), expected); - assert_eq!(RowSelection::from_iter(b), expected); - assert_eq!(RowSelection::from_iter(c), expected); - } - - #[test] - fn test_combine_2elements() { - let a = vec![RowSelector::select(10), RowSelector::select(5)]; - let a_expect = vec![RowSelector::select(15)]; - assert_eq!(RowSelection::from_iter(a).selectors, a_expect); - - let b = vec![RowSelector::select(10), RowSelector::skip(5)]; - let b_expect = vec![RowSelector::select(10), RowSelector::skip(5)]; - assert_eq!(RowSelection::from_iter(b).selectors, b_expect); - - let c = vec![RowSelector::skip(10), RowSelector::select(5)]; - let c_expect = vec![RowSelector::skip(10), RowSelector::select(5)]; - assert_eq!(RowSelection::from_iter(c).selectors, c_expect); - - let d = vec![RowSelector::skip(10), RowSelector::skip(5)]; - let d_expect = vec![RowSelector::skip(15)]; - assert_eq!(RowSelection::from_iter(d).selectors, d_expect); - } - - #[test] - fn test_from_one_and_empty() { - let a = vec![RowSelector::select(10)]; - let selection1 = RowSelection::from(a.clone()); - assert_eq!(selection1.selectors, a); - - let b = vec![]; - let selection1 = RowSelection::from(b.clone()); - assert_eq!(selection1.selectors, b) - } - - #[test] - #[should_panic(expected = "selection exceeds the number of selected rows")] - fn test_and_longer() { - let a = RowSelection::from(vec![ - RowSelector::select(3), - RowSelector::skip(33), - RowSelector::select(3), - RowSelector::skip(33), - ]); - let b = RowSelection::from(vec![RowSelector::select(36)]); - a.and_then(&b); - } - - #[test] - #[should_panic(expected = "selection contains less than the number of selected rows")] - fn test_and_shorter() { - let a = RowSelection::from(vec![ - RowSelector::select(3), - RowSelector::skip(33), - RowSelector::select(3), - RowSelector::skip(33), - ]); - let b = RowSelection::from(vec![RowSelector::select(3)]); - a.and_then(&b); - } - - #[test] - fn test_intersect_row_selection_and_combine() { - // a size equal b size - let a = vec![ - RowSelector::select(5), - RowSelector::skip(4), - RowSelector::select(1), - ]; - let b = vec![ - RowSelector::select(8), - RowSelector::skip(1), - RowSelector::select(1), - ]; - - let res = intersect_row_selections(&a, &b); - assert_eq!( - res.selectors, - vec![ - RowSelector::select(5), - RowSelector::skip(4), - RowSelector::select(1), - ], - ); - - // a size larger than b size - let a = vec![ - RowSelector::select(3), - RowSelector::skip(33), - RowSelector::select(3), - RowSelector::skip(33), - ]; - let b = vec![RowSelector::select(36), RowSelector::skip(36)]; - let res = intersect_row_selections(&a, &b); - assert_eq!( - res.selectors, - vec![RowSelector::select(3), RowSelector::skip(69)] - ); - - // a size less than b size - let a = vec![RowSelector::select(3), RowSelector::skip(7)]; - let b = vec![ - RowSelector::select(2), - RowSelector::skip(2), - RowSelector::select(2), - RowSelector::skip(2), - RowSelector::select(2), - ]; - let res = intersect_row_selections(&a, &b); - assert_eq!( - res.selectors, - vec![RowSelector::select(2), RowSelector::skip(8)] - ); - - let a = vec![RowSelector::select(3), RowSelector::skip(7)]; - let b = vec![ - RowSelector::select(2), - RowSelector::skip(2), - RowSelector::select(2), - RowSelector::skip(2), - RowSelector::select(2), - ]; - let res = intersect_row_selections(&a, &b); - assert_eq!( - res.selectors, - vec![RowSelector::select(2), RowSelector::skip(8)] - ); - } - - #[test] - fn test_and_fuzz() { - let mut rand = rng(); - for _ in 0..100 { - let a_len = rand.random_range(10..100); - let a_bools: Vec<_> = (0..a_len).map(|_| rand.random_bool(0.2)).collect(); - let a = RowSelection::from_filters(&[BooleanArray::from(a_bools.clone())]); - - let b_len: usize = a_bools.iter().map(|x| *x as usize).sum(); - let b_bools: Vec<_> = (0..b_len).map(|_| rand.random_bool(0.8)).collect(); - let b = RowSelection::from_filters(&[BooleanArray::from(b_bools.clone())]); - - let mut expected_bools = vec![false; a_len]; - - let mut iter_b = b_bools.iter(); - for (idx, b) in a_bools.iter().enumerate() { - if *b && *iter_b.next().unwrap() { - expected_bools[idx] = true; - } - } - - let expected = RowSelection::from_filters(&[BooleanArray::from(expected_bools)]); - - let total_rows: usize = expected.selectors.iter().map(|s| s.row_count).sum(); - assert_eq!(a_len, total_rows); - - assert_eq!(a.and_then(&b), expected); - } - } - - #[test] - fn test_iter() { - // use the iter() API to show it does what is expected and - // avoid accidental deletion - let selectors = vec![ - RowSelector::select(3), - RowSelector::skip(33), - RowSelector::select(4), - ]; - - let round_tripped = RowSelection::from(selectors.clone()) - .iter() - .cloned() - .collect::>(); - assert_eq!(selectors, round_tripped); - } - - #[test] - fn test_limit() { - // Limit to existing limit should no-op - let selection = RowSelection::from(vec![RowSelector::select(10), RowSelector::skip(90)]); - let limited = selection.limit(10); - assert_eq!(RowSelection::from(vec![RowSelector::select(10)]), limited); - - let selection = RowSelection::from(vec![ - RowSelector::select(10), - RowSelector::skip(10), - RowSelector::select(10), - RowSelector::skip(10), - RowSelector::select(10), - ]); - - let limited = selection.clone().limit(5); - let expected = vec![RowSelector::select(5)]; - assert_eq!(limited.selectors, expected); - - let limited = selection.clone().limit(15); - let expected = vec![ - RowSelector::select(10), - RowSelector::skip(10), - RowSelector::select(5), - ]; - assert_eq!(limited.selectors, expected); - - let limited = selection.clone().limit(0); - let expected = vec![]; - assert_eq!(limited.selectors, expected); - - let limited = selection.clone().limit(30); - let expected = vec![ - RowSelector::select(10), - RowSelector::skip(10), - RowSelector::select(10), - RowSelector::skip(10), - RowSelector::select(10), - ]; - assert_eq!(limited.selectors, expected); - - let limited = selection.limit(100); - let expected = vec![ - RowSelector::select(10), - RowSelector::skip(10), - RowSelector::select(10), - RowSelector::skip(10), - RowSelector::select(10), - ]; - assert_eq!(limited.selectors, expected); - } - - #[test] - fn test_scan_ranges() { - let index = vec![ - PageLocation { - offset: 0, - compressed_page_size: 10, - first_row_index: 0, - }, - PageLocation { - offset: 10, - compressed_page_size: 10, - first_row_index: 10, - }, - PageLocation { - offset: 20, - compressed_page_size: 10, - first_row_index: 20, - }, - PageLocation { - offset: 30, - compressed_page_size: 10, - first_row_index: 30, - }, - PageLocation { - offset: 40, - compressed_page_size: 10, - first_row_index: 40, - }, - PageLocation { - offset: 50, - compressed_page_size: 10, - first_row_index: 50, - }, - PageLocation { - offset: 60, - compressed_page_size: 10, - first_row_index: 60, - }, - ]; - - let selection = RowSelection::from(vec![ - // Skip first page - RowSelector::skip(10), - // Multiple selects in same page - RowSelector::select(3), - RowSelector::skip(3), - RowSelector::select(4), - // Select to page boundary - RowSelector::skip(5), - RowSelector::select(5), - // Skip full page past page boundary - RowSelector::skip(12), - // Select across page boundaries - RowSelector::select(12), - // Skip final page - RowSelector::skip(12), - ]); - - let ranges = selection.scan_ranges(&index); - - // assert_eq!(mask, vec![false, true, true, false, true, true, false]); - assert_eq!(ranges, vec![10..20, 20..30, 40..50, 50..60]); - - let selection = RowSelection::from(vec![ - // Skip first page - RowSelector::skip(10), - // Multiple selects in same page - RowSelector::select(3), - RowSelector::skip(3), - RowSelector::select(4), - // Select to page boundary - RowSelector::skip(5), - RowSelector::select(5), - // Skip full page past page boundary - RowSelector::skip(12), - // Select across page boundaries - RowSelector::select(12), - RowSelector::skip(1), - // Select across page boundaries including final page - RowSelector::select(8), - ]); - - let ranges = selection.scan_ranges(&index); - - // assert_eq!(mask, vec![false, true, true, false, true, true, true]); - assert_eq!(ranges, vec![10..20, 20..30, 40..50, 50..60, 60..70]); - - let selection = RowSelection::from(vec![ - // Skip first page - RowSelector::skip(10), - // Multiple selects in same page - RowSelector::select(3), - RowSelector::skip(3), - RowSelector::select(4), - // Select to page boundary - RowSelector::skip(5), - RowSelector::select(5), - // Skip full page past page boundary - RowSelector::skip(12), - // Select to final page boundary - RowSelector::select(12), - RowSelector::skip(1), - // Skip across final page boundary - RowSelector::skip(8), - // Select from final page - RowSelector::select(4), - ]); - - let ranges = selection.scan_ranges(&index); - - // assert_eq!(mask, vec![false, true, true, false, true, true, true]); - assert_eq!(ranges, vec![10..20, 20..30, 40..50, 50..60, 60..70]); - - let selection = RowSelection::from(vec![ - // Skip first page - RowSelector::skip(10), - // Multiple selects in same page - RowSelector::select(3), - RowSelector::skip(3), - RowSelector::select(4), - // Select to remaining in page and first row of next page - RowSelector::skip(5), - RowSelector::select(6), - // Skip remaining - RowSelector::skip(50), - ]); - - let ranges = selection.scan_ranges(&index); - - // assert_eq!(mask, vec![false, true, true, false, true, true, true]); - assert_eq!(ranges, vec![10..20, 20..30, 30..40]); - } - - #[test] - fn test_from_ranges() { - let ranges = [1..3, 4..6, 6..6, 8..8, 9..10]; - let selection = RowSelection::from_consecutive_ranges(ranges.into_iter(), 10); - assert_eq!( - selection.selectors, - vec![ - RowSelector::skip(1), - RowSelector::select(2), - RowSelector::skip(1), - RowSelector::select(2), - RowSelector::skip(3), - RowSelector::select(1) - ] - ); - - let out_of_order_ranges = [1..3, 8..10, 4..7]; - let result = std::panic::catch_unwind(|| { - RowSelection::from_consecutive_ranges(out_of_order_ranges.into_iter(), 10) - }); - assert!(result.is_err()); - } - - #[test] - fn test_empty_selector() { - let selection = RowSelection::from(vec![ - RowSelector::skip(0), - RowSelector::select(2), - RowSelector::skip(0), - RowSelector::select(2), - ]); - assert_eq!(selection.selectors, vec![RowSelector::select(4)]); - - let selection = RowSelection::from(vec![ - RowSelector::select(0), - RowSelector::skip(2), - RowSelector::select(0), - RowSelector::skip(2), - ]); - assert_eq!(selection.selectors, vec![RowSelector::skip(4)]); - } - - #[test] - fn test_intersection() { - let selection = RowSelection::from(vec![RowSelector::select(1048576)]); - let result = selection.intersection(&selection); - assert_eq!(result, selection); - - let a = RowSelection::from(vec![ - RowSelector::skip(10), - RowSelector::select(10), - RowSelector::skip(10), - RowSelector::select(20), - ]); - - let b = RowSelection::from(vec![ - RowSelector::skip(20), - RowSelector::select(20), - RowSelector::skip(10), - ]); - - let result = a.intersection(&b); - assert_eq!( - result.selectors, - vec![ - RowSelector::skip(30), - RowSelector::select(10), - RowSelector::skip(10) - ] - ); - } - - #[test] - fn test_union() { - let selection = RowSelection::from(vec![RowSelector::select(1048576)]); - let result = selection.union(&selection); - assert_eq!(result, selection); - - // NYNYY - let a = RowSelection::from(vec![ - RowSelector::skip(10), - RowSelector::select(10), - RowSelector::skip(10), - RowSelector::select(20), - ]); - - // NNYYNYN - let b = RowSelection::from(vec![ - RowSelector::skip(20), - RowSelector::select(20), - RowSelector::skip(10), - RowSelector::select(10), - RowSelector::skip(10), - ]); - - let result = a.union(&b); - - // NYYYYYN - assert_eq!( - result.iter().collect::>(), - vec![ - &RowSelector::skip(10), - &RowSelector::select(50), - &RowSelector::skip(10), - ] - ); - } - - #[test] - fn test_row_count() { - let selection = RowSelection::from(vec![ - RowSelector::skip(34), - RowSelector::select(12), - RowSelector::skip(3), - RowSelector::select(35), - ]); - - assert_eq!(selection.row_count(), 12 + 35); - assert_eq!(selection.skipped_row_count(), 34 + 3); - - let selection = RowSelection::from(vec![RowSelector::select(12), RowSelector::select(35)]); - - assert_eq!(selection.row_count(), 12 + 35); - assert_eq!(selection.skipped_row_count(), 0); - - let selection = RowSelection::from(vec![RowSelector::skip(34), RowSelector::skip(3)]); - - assert_eq!(selection.row_count(), 0); - assert_eq!(selection.skipped_row_count(), 34 + 3); - - let selection = RowSelection::from(vec![]); - - assert_eq!(selection.row_count(), 0); - assert_eq!(selection.skipped_row_count(), 0); - } - - #[test] - fn test_trim() { - let selection = RowSelection::from(vec![ - RowSelector::skip(34), - RowSelector::select(12), - RowSelector::skip(3), - RowSelector::select(35), - ]); - - let expected = vec![ - RowSelector::skip(34), - RowSelector::select(12), - RowSelector::skip(3), - RowSelector::select(35), - ]; - - assert_eq!(selection.trim().selectors, expected); - - let selection = RowSelection::from(vec![ - RowSelector::skip(34), - RowSelector::select(12), - RowSelector::skip(3), - ]); - - let expected = vec![RowSelector::skip(34), RowSelector::select(12)]; - - assert_eq!(selection.trim().selectors, expected); - } -} diff --git a/thirdparty/crates/parquet-59.2.0/.cargo-checksum.json b/thirdparty/crates/parquet-59.2.0/.cargo-checksum.json new file mode 100644 index 000000000..37e1c57f1 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/.cargo-checksum.json @@ -0,0 +1 @@ +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{"CONTRIBUTING.md":"b98075433192fb2ab33b559c58ed18ce8e21dbd6f83c5592204f7faa414befe2","Cargo.lock":"1cb5da4f0722ebf4a81b67d1a737f5e5af1e2ba964ccb14b2fb27fec43f32294","Cargo.toml":"d209a1aec83c59a08da8b26078e2205e0292704b749c6720adea229b1b888c87","Cargo.toml.orig":"b72e67e5de4b00263cda12d0526911b16bffa2eb4137cc0db946d8fc262c6e17","LICENSE.txt":"cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30","NOTICE.txt":"e5b198d7f809311723889814d99a92f808c69e89a847efa7a7b65270f5fdeae6","README.md":"b13e919fe8af687cbcbd7a257886a21103d8484376916bbea6785fe17a67a96d","THRIFT.md":"3725bf644bd461d9bee6480128c1644d5fa47362a8f95683dda64acf99310c3a","benches/arrow_reader.rs":"bd605d7341307e3bf27902bcb3c7ce85ca916143dddde84f3b85e6bfd0b98085","benches/arrow_reader_clickbench.rs":"8c237277cd391f956a7209ab0468a75946eac230e98ca25625713b57f68d76fa","benches/arrow_reader_peak_memory.rs":"4f674f31d002708e0d0b9e3be02cf0cc35f884a8757f16386577a98da4222b40","benches/arrow_reader_row_filter.rs":"fb82ccb35e874d4edd78fd62c7d7d004ce7484447bfda3a490868edc382d036c","benches/arrow_reader_row_selection_policy.rs":"0ba474ff3b620b764a8c9fa5a170454fc783aad56930543d38bc39de03abb10a","benches/arrow_statistics.rs":"92557f96a1057ec9de7ab4ecf7e74982e8454a221ee4e9180ef63da415d231fa","benches/arrow_writer.rs":"e9415e45f98ecda23c57d7d23799dd972d07b691c60068e3b486ba97a6a03d4d","benches/bloom_filter.rs":"6076c3aa376cbfd309cc2a03cce56c245564e036d38d1aa9b4354af6bda95db7","benches/compression.rs":"e316fdaee780d970862a66fdc62a748c081da7f762dc84df968061e62b6b9d43","benches/encoding.rs":"e0dc7244bf8e5adb6eb713384cba72d07ba8ee4ce57803d548de6ba757ec10c5","benches/metadata.rs":"4f35d4d4e7bb5b78a8d47ceb2e0f3c06bf626740dfb9d92dc6a9e5d47845dcc2","benches/parquet_round_trip.rs":"654200e7bddfc5ab55f98386a090fca55917d70a478b5ab90509ff1e7d68acc0","benches/push_decoder.rs":"c940d236dcbdbbfa1ff7efdd63e1e4e95fe78f538d25de1139e7f2bb56c1fb4d","benches/row_group_index_reader.rs":"358c2cba7d7dc3af874c8a22bc7a0a2988448d2344019efcba5e0ade6a91ce0b","benches/row_selection_cursor.rs":"a5e285d7e7c8f21fa357cc848b0bc484607c0062b9ee7f7c18292709288dd211","benches/row_selection_policy_common/assertions.rs":"55747afcce443d62e7456fa32933cf330cb8b8c11a993358841720423d4e7d89","benches/row_selection_policy_common/cases.rs":"f79b69c500684797e4f88d8d14d79a17ba3767d389cb2ebd81dfc6e602a7ef37","benches/row_selection_policy_common/fixture.rs":"300bf5936a8c2635aeda9e31cfcd1afd06b420a341ab0418b25f41b6a73ce7cd","benches/row_selection_policy_common/mod.rs":"9345cbc668524a11e144e3ea163d34d4fa0d287e180e65f67d28fbafff4265b9","benches/row_selection_policy_common/model.rs":"7415e57bde8de3a681e17a9a4fe804395c4b6baf2a0960f818f5886792067fdc","benches/row_selection_policy_common/register.rs":"bec0cb5652fa16048540f909136ad995f2bd14439b10536fb06caccfbff3115a","benches/row_selection_policy_common/runner.rs":"d6a49aae7e3eb32f13246bd293d8fb65b7138ee54bbd0ac2bc86978b3764033e","benches/row_selection_policy_common/shapes.rs":"f11865079b19bcb7bbc10bf67d3dac063255bc8c9d9c0e0ceede09e70934e6bf","benches/row_selector.rs":"377e5c0c5ee7abbb0d3ddce23cae26eab514d5c93d651e8055ebf5548532e075","benches/row_selector_boolean_buffer.rs":"7044948d41774e5d2883476c76ef5bee494751f5617de97620a51047d2edeaf2","benches/writer_overhead.rs":"db62402b994fbfd29b37d828dfd7bbca0bc28710384a3c4185a27f09f9e5f778","examples/external_metadata.rs":"33c3e8d6b7fbcbb4b910444d669ee955d8141c40966b99d61ae328412d17bb84","examples/object_store.rs":"01aafed3f7b501d181aa201393af2f4baa9c074aaa1c8a7ea4fa0339b72afe42","examples/read_parquet.rs":"2c98c4376e475b79802aaa6e4810353d07545ca01367bc934921b77262b175e9","examples/read_with_rowgroup.rs":"8d0650275b32a0cfd6c510fad334c0b5938f9e971eaf51ed8c3766bd7ae0e0d3","examples/write_parquet.rs":"2de9708be17539d99b8f53af09b0de34ad2baef31a0a382c84dcae9880d73f7f","pytest/requirements.in":"71720dc5110d9097ebff0b509c377876fd44964f7422d2084fa4ef72b8e7f5c1","pytest/requirements.txt":"7c1cec5ae612b752418c99a7df5794b7ab0aed2bd7ae194adae9050742680617","pytest/test_parquet_integration.py":"26b854df59d5a03dafaf8b457afdb11a1fbded63172e6eb4b838945204e4be61","src/arrow/array_reader/builder.rs":"46c65dc01c1d32de85d07f0d0619c1a0aa2e7659dc0cbbee4901828811c4f3ec","src/arrow/array_reader/byte_array.rs":"807d85470436d1bbefbf9080897989e41853b06fa49dc181d65858c325b6a46e","src/arrow/array_reader/byte_array_dictionary.rs":"a8eb50f292ce4fde74fdce1d977100f0055320667c009e2788b63440f02253a3","src/arrow/array_reader/byte_view_array.rs":"6aefed84348efaee0001b639bcc3f861b1957c41692eae116dae1821b65f00ec","src/arrow/array_reader/cached_array_reader.rs":"36ab0898b177bb3d1c006b535395b79857cb97d879ddb78749fb70a15a75624f","src/arrow/array_reader/empty_array.rs":"ccb30ef265039e1a750cb9a52d7836eeca55a658310f7f5a06d17dd5641546c8","src/arrow/array_reader/fixed_len_byte_array.rs":"5f1f2e772ed95f1026d6ff21cc018084ff16e659fe9157ae2818b443954baf03","src/arrow/array_reader/fixed_size_list_array.rs":"2a3d685a2d63a1b8dcd97c1cc1ff4648730759d555d5814201213d176f3ed83b","src/arrow/array_reader/list_array.rs":"96a8db9a89f28622a65039b58f039646e6e99db57f147ed505004a95ec150448","src/arrow/array_reader/list_view_array.rs":"c5e3845c7234522286873a72a3037ebdb52d52aa9020450e6f2db708cddae87f","src/arrow/array_reader/map_array.rs":"710787b1c4c317127992a54458c942ae9976de6908f78ae12fc5b34656216fd2","src/arrow/array_reader/mod.rs":"c1fa6975aae757e4cb9776a76136cb75a7f4ee93ccd1a1efc0c52036167e5a42","src/arrow/array_reader/null_array.rs":"a3bb3d6c9d5423e0e58223714aa27054881afcc63f096546f9e85dccfe1fae41","src/arrow/array_reader/primitive_array.rs":"9df99835aa4971ee68860ff30bb09d9abc945b6ecff68718f02795334cd48c47","src/arrow/array_reader/row_group_cache.rs":"b8e04e7bdd70f56bae258ca451f35fecaa7688079fda44ad5f3a7d6ccc0fd628","src/arrow/array_reader/row_group_index.rs":"b08e0742b50a4b98b73ed9fccbd585bf1e90310f14d5b1d599e73403fccd1369","src/arrow/array_reader/row_number.rs":"9504db4e61235daafdddfe16851c3e9c61ad420f51a2572839a6d039770b1c93","src/arrow/array_reader/struct_array.rs":"2bc5cd32c6e65e0ce4a3fa436ec052ec5a7f44befe5410ab38642c59463593d2","src/arrow/array_reader/test_util.rs":"353a16ad1a8db9a126ab1f9ed40d162b8210d1153e8ac2e9ba8af9b4fd48045b","src/arrow/arrow_reader/filter.rs":"346ecec64d0cb87a679a770ace05f806727b30d724efbee7d4ae64475b8800e0","src/arrow/arrow_reader/metrics.rs":"dbd85435fe323fe525d78cb00127099364a4f2de9271bb9d5ff9084674d7d12e","src/arrow/arrow_reader/mod.rs":"5ef1fc5a8bd420646efbd918b0e6b2081508f291f9a9d1c934a34916d8943543","src/arrow/arrow_reader/read_plan.rs":"c6a24ce02c6ed4053ca05d6be6670467b4227949622226fcf84e14857668ac14","src/arrow/arrow_reader/selection/algebra.rs":"f72c754cd2a370d284a5b9462757db61ad79708f529c3b9e6086366366d09696","src/arrow/arrow_reader/selection/boolean.rs":"e0efed1eb87f40fbac31820681aad1315d9f6e8d6f669e292bd33667e545a006","src/arrow/arrow_reader/selection/cursor.rs":"6c99018be3a528d7c00906b5f6b0b4916923ce519081f7bc800eb801dbb9a075","src/arrow/arrow_reader/selection/mod.rs":"cc1e0cf56d31432c461238b490b13a802f10cc9e8c5a1928797d14135cad49e4","src/arrow/arrow_reader/selection/ranges.rs":"11feaec66d89c053bce2aeed9938c1d175061a5d74762af44bf85d9f78cdd6c6","src/arrow/arrow_reader/selection/selector.rs":"361968fddece9883f2c500b8cdf19eccfee7db9f97c17e8e256ffa0740151298","src/arrow/arrow_reader/statistics.rs":"dd023b3ce6f854133de1a2202083148fce882c723878c665d6f076ff225944cc","src/arrow/arrow_writer/byte_array.rs":"45bacdbdb328658aaa13bafa0c56151d9d9418c8e9d1e7887ee5c34c685efed0","src/arrow/arrow_writer/levels.rs":"940b69a818962387ed19701f641c3020a93bd9175dd69c22dcb7faa678001de0","src/arrow/arrow_writer/mod.rs":"5a9e199a90d7dc40aef1f0f722affb2c48c60c12e30b73b7cd91f70c6ca01b66","src/arrow/async_reader/metadata.rs":"04215161ec9ef03fd383a0d02879c65ddb24eea58188efec7a7c9c759bd8bd6c","src/arrow/async_reader/mod.rs":"aaae0c35bba4bf9f9c16dd370e0f4381699df5723a27599406e4b69e6469082b","src/arrow/async_reader/spawn.rs":"904b38c23e9a28ac57776f38589689726d4aa1a03426438bf669287ae0865fa7","src/arrow/async_reader/store.rs":"ad0aac3a23ce066ed719f36df91b2fb8686f2ab9af6dc7679a5f378a2ffe3180","src/arrow/async_writer/mod.rs":"d9f70b03bf5f69f670c75755c6b9044849199d0a61c07b2832f99dea6766aa4e","src/arrow/async_writer/store.rs":"dedee9daff3005e2787c1f67df28b1e582214b0cba0e25b0d626a68453e4a186","src/arrow/buffer/bit_util.rs":"2293b3619f65a26bf236dc03e498f3efd568f7d6d7657e4805ce69cf575e5677","src/arrow/buffer/dictionary_buffer.rs":"0329a6f46a3f8b02a5c439e6d5933ac40160b7824351cc910ad1d1f4fcbebc76","src/arrow/buffer/mod.rs":"69e08e0b3347124397dcccd7fc53044629ea93868518aceb667e94040548349c","src/arrow/buffer/offset_buffer.rs":"69fdb496298a96abaa95e4bba9c820b31eaf90c7885bb8783f9bed49caebe2b7","src/arrow/buffer/view_buffer.rs":"e954bb9639eb16e0b61e460dc42ce30d6a424272784c3c3b298d3de310dd7d90","src/arrow/decoder/delta_byte_array.rs":"4a227b591c6f0cf68f60d77f91ac9cf888ea926530421278be42338dbe507497","src/arrow/decoder/dictionary_index.rs":"8a2c26327249a4316eec82438c65da00ea3610b8209565eb0cbdf72bbf73fb84","src/arrow/decoder/mod.rs":"7d1425a2a0818b7443dc89e0c3a749c4c6e1ab4ff1c4b1141c57deb1604ca29c","src/arrow/in_memory_row_group.rs":"c77cf07fbfd6613a2d4c8e23fa2a951d8c91d89b6fc23c792d51f9dc60292c38","src/arrow/mod.rs":"f59e61f3c602da05378ebd9116b2d531df8354dbfb0d8639118e70e489280ba2","src/arrow/push_decoder/mod.rs":"68aff720ac164e5a496bcea3e6c9ddd309da20cd4761f9738308d690a28769cb","src/arrow/push_decoder/reader_builder/data.rs":"3a06dc58a586800e98216dce3523538cc0262338dbcfc013e8e47c778d841380","src/arrow/push_decoder/reader_builder/filter.rs":"1fd54d79e140b0d05842caa28927dd534b3781fa4428ee5aa3f553e6c25a8c95","src/arrow/push_decoder/reader_builder/mod.rs":"7ee1fb4c12eb03b780cb62232fa28e0a9223a7d9889e94104e73f3c610a1fb61","src/arrow/push_decoder/remaining.rs":"5e36c6a822c9a9af87b14f0b3136e1151e6b9b5bf1e9d0066c96a830e76bbb23","src/arrow/record_reader/buffer.rs":"ce0889931b4a8db732c488560cd8c5391be4508bfc4a08f59be495a17aed03ea","src/arrow/record_reader/definition_levels.rs":"c3a37d45fc58896fd5b73250c734f9da35132df062020bd817374b2d0c3f6207","src/arrow/record_reader/mod.rs":"75a20fd49f7e2a2a064ffc50c0e1ad3cbd04c07a2d5e3a885b4faf990f7dc550","src/arrow/schema/complex.rs":"16bcccb27fdabe3982d37adbbf1e7a3ba33bdb152ceb62aa75e5f5453014f51d","src/arrow/schema/extension.rs":"ac9b4f1ff73212fe79801efb7fb12ae2c9ddad52183e09b889378d36e13aab84","src/arrow/schema/mod.rs":"8882135cffa3fac4fa0b81ddf6a125ed4db047f473885df0b9061eda693aad6b","src/arrow/schema/primitive.rs":"9ebf8d313c3df5720e8571ccaa1d75c19190405228cb52cd5536d1d1c95dae6d","src/arrow/schema/virtual_type.rs":"d97d7234a3bd1661b4cd7f5e849b56b505f4c7fef2715762d02a6081595fad22","src/basic.rs":"dac039b8b90a6693770f62d87dae7807042742dc02343ea379d73af7703dc88f","src/bin/cli/mod.rs":"1c74892a7e19249ecded4157ad008d2aacf91413564a86b616087bb59670fbe4","src/bin/parquet-concat.rs":"078be5a34dcf391e10d3c1ffcd9b16ddef0d9b79788849310cfe2287b31b3a56","src/bin/parquet-fromcsv-help.txt":"8a96bb57a021849802e61b0b9d07ff459acd7f7e0320330de4e77ae09a8a2e41","src/bin/parquet-fromcsv.rs":"f96cdea1adfbaec719efbbe42f4f99f225ad7b6ee66e709ab5eb04514229f6ae","src/bin/parquet-index.rs":"b9c537c7aad86bb0b800b9e878fad1420f912d1f7f8199701abfd7e56cbae119","src/bin/parquet-layout.rs":"d4d0ce4e78cef1126b10c0a23694a28c7478c3da69243570cb5bc156a3094438","src/bin/parquet-read.rs":"a409b3b62675070d43bcddce1c1455bb417f5281a9eebb6dfe148c6f92d22ba9","src/bin/parquet-rewrite.rs":"93414b3e32374413dcfa8b9758097c05fb82d596d37c41f644d03f48955169e7","src/bin/parquet-rowcount.rs":"3940ee5a39790788dd14a089c3f56528c12ab509c7dd050f2078d58741c0209e","src/bin/parquet-schema.rs":"e2e679ead30cdf100c376fb462d109b6e8b0f18d57175cceeacc9eb5b1739e63","src/bin/parquet-show-bloom-filter.rs":"43dda4b1cc1018fac4ee26ed562777010abb1cda6dddf88eebbb7c749a6beb08","src/bloom_filter/mod.rs":"1205117ba3fc0a702ace9a5c2361c79efc362ca035cde4b089ebabdd0b5214a0","src/column/chunker/cdc.rs":"f5c758ce3f8cc021c7bf0e8e170c51f5370ea5a4a4a4e373d2ae052e55684ee9","src/column/chunker/cdc_codegen.py":"a14f5291d9f96d893715ed80fda18f5cd50a6574c4b61cb1990d103cc7ac6192","src/column/chunker/cdc_generated.rs":"273529ca0d763d22ac8586ce23dd10941f9fef9d5e2f5f2e452f0131d363ebdf","src/column/chunker/mod.rs":"b071503ba1208bb8dc3cd0005b31d0ca198f60bae84ffcf98d6bcf7228a86560","src/column/mod.rs":"3d05cd64008d9c45cb8223d405368dd48df06e929ff93e623fb4e5bf3fabe00f","src/column/page.rs":"328539b6e2ff1c1aa66cd77d6c8af80393181fca1bf33221d4d6db9e954ba09f","src/column/page_encryption.rs":"34df686273e31872bbf5f33398a58d632ee378bde4706564fb58ec5e940dfdac","src/column/page_encryption_disabled.rs":"71a3f095939dde8451949f3c390a6862f0224db00403759fa80d47981bf14bc8","src/column/page_store.rs":"015811d51f70778c59b43aa0515ed9de7794191baa3d660bd91c01300f95f718","src/column/reader.rs":"f088a2a70a0adbf1dbd97f29fe401fd049b402c05ff6d6fc07f479c77e000972","src/column/reader/decoder.rs":"94483f56915f4a6f215fd02f315fe14e3285206730e2c85ef1ea56cf44a0a1a2","src/column/writer/byte_budget_chunker.rs":"8e1d215d2ae074e5258586813adb9ebc56a595db33f6188d32f435d0ec9ef8d0","src/column/writer/encoder.rs":"7722328b532cc83bc348ce3d00b1323b5cee870a9c41d1d5f833de70990027bb","src/column/writer/mod.rs":"b10dafcb34f117028daca370e6f641484efe9bf73972f20f0d0cde4c40e05840","src/compression.rs":"9a22b05f5faa1f2c6c9152a59d2384d1929b655b4f9543a3fffe36be7d48322c","src/data_type.rs":"656c4f97115e4bfbdcdc074a206c624006a46d05e5432a6e95aae0fe1e27fb46","src/encodings/decoding.rs":"40dd12aa522feecc910ea8132a84b745105190c044b6814c320146a6b4a5c735","src/encodings/decoding/byte_stream_split_decoder.rs":"017114b443e406d29fc66be8fcbc280295a3486802170820c548ed9b3ff50c58","src/encodings/encoding/byte_stream_split_encoder.rs":"8ea48728f12212c6fe75f705661e1deb7566a9f9e4cce0f021a411ddd2b635fa","src/encodings/encoding/dict_encoder.rs":"5e3ee6b230d6251370811e06e4897a370f38c085768fa819aaf8868edb8eadf6","src/encodings/encoding/mod.rs":"4f809107a677d0bcdca4ae514ef97f2869cb6f509da914e033892a2c7abcb84b","src/encodings/levels.rs":"7867d8873e8f537ae6c20f80f4230c16da8a9702c9ff7fafe5e5e954bcbfd483","src/encodings/mod.rs":"14df7b4bc46628bd874604ce22695832b012e2b59f4ea2912f590c169386821e","src/encodings/rle.rs":"4c62e58df99ec5daec7517a9e87ef870bf11d7b8b37cd453963875905fbee532","src/encryption/ciphers.rs":"fcc4c962795f7e1992d6838f1cd8163b7fb7d98a579f2cb5a0c5cf6f39106fcd","src/encryption/decrypt.rs":"e34fda5c9d3d8a25fad166077be6fc0e40aa382b41fde3b78e5ecae7151c0a5f","src/encryption/encrypt.rs":"11e6676d3c39813bd9f43bcebc3008170be6dfffb112a6d7c5033f07bd4c921d","src/encryption/mod.rs":"13822f0399262d5082eccaf5d16c2fca76e536bb28ac3077dd06d7ad3bc094e7","src/encryption/modules.rs":"7c0bee268abf8efb090c4530e9461cea629b60876877b7c96b050968a72b0d31","src/errors.rs":"f2644b92cdad56c7dc292ce8e17bab299881e0d63f98047f34c6acf6e4d50271","src/file/column_crypto_metadata.rs":"b986c78dcdceafbeac0af08ab9ccd53618aefd4192477391e807a6e9fe4cddb6","src/file/metadata/footer_tail.rs":"5dbb3ca3c621fb8bdce136c76c0ea98607e75d0969bb9277f696f55cd5722839","src/file/metadata/memory.rs":"efa6095020512a2539b604c78da0b01918f7b81459fd3b7179438e010c052457","src/file/metadata/mod.rs":"34f64fe9fa851edf14745d4ebdb126d00c29ad4dccb10dec90559e6bf943b84d","src/file/metadata/options.rs":"0e1d6d4d9f1df6d0eb78170947b2582cf53863b4c412257e800817ee0512b245","src/file/metadata/parser.rs":"bbe3eea0e27ab0e599faf62d151014ff25d67db12849d0f4b5f3facf81a73985","src/file/metadata/push_decoder.rs":"2989888905d872b0353029759e55b5800672bb8618b2c771f5d4585445ae1b85","src/file/metadata/reader.rs":"86d8ee33cb2744a6cd54e64200532a0012205da617668029f87db7cca8f853b7","src/file/metadata/thrift/encryption.rs":"7683f56fee986071721bf0cf76da55c8bcb1c1dfb91e37648e94146b1cf9c2d0","src/file/metadata/thrift/mod.rs":"bc1b818cc8174c4c5cf15ba0f7005d045b55622ac40b773db719ca6f5e09d4a0","src/file/metadata/writer.rs":"1031e71336d642d4711d1ef47bba417f238b975d1647df3eab51338055c07c72","src/file/mod.rs":"8ebca6e7555f4437bfdd45c97075fea6d9f4a18c32119bae6e84f155d506f5ac","src/file/page_index/column_index.rs":"836c61811abb3610a5b362aa397f162d15a7326ac05f28d8afa78f4115a169d0","src/file/page_index/index_reader.rs":"f438b2d254d464608c118b78800360ceea6ede79f443e015c0ccba55d45cf014","src/file/page_index/mod.rs":"87717035d2fbd0c8a338994d592e28f9e8e9fa502b4d3369b332ab3156ef3374","src/file/page_index/offset_index.rs":"262c11c7a13fda8e30341132872dfae3a30fe191c20ab2608bf0ccd3d9f33364","src/file/properties.rs":"658a755243aa7cedf297765c31e721c3a15058cae6e012448fa51030b45eaf7a","src/file/reader.rs":"5b921cb5c800ae6158200ffaafeb7e97f52528a606385ce8772c9cd4dd68836b","src/file/serialized_reader.rs":"ec64f581c0e20353e7f2854fa50f1a688097ad4e4ff0ab82627295f6d802244f","src/file/statistics.rs":"9e22a3c8e10cc3058b41b3262dfbfa2213899e09f52faec13991429957dd2c7b","src/file/writer.rs":"6b89a5f8128c98344ad150ac38947ec6851f835fed8695c568f7edbe673f7bad","src/geospatial/accumulator.rs":"3abcb6ac5d7beacd888d88254f912ad1aa31dff0c88a399979470f0e5784ea66","src/geospatial/bounding_box.rs":"971e8be47f63e53d58581aec3da58ae2b50ff557a02f9467005258bff96e97b5","src/geospatial/mod.rs":"e19b53bc377eab2efb21f02e9980056abf6b4a830fe364af025b4fd9a92a31d8","src/geospatial/statistics.rs":"824a36f14b7a07fb180208f10f2470fdeae498ad187c1a05fbdafe5538064585","src/lib.rs":"a0aed6abdef5dad36e2c1d39047ee23f3b78b1aa99e78fb5b95680655b892c00","src/parquet_macros.rs":"a3df3e4bb35f839285ba885dddceef24652bd9af8ccf29d7eec216e0f8a374fd","src/parquet_thrift.rs":"efdde5da47d94685096ae9c197bc657d15269cdd53f53ea212aff2cd4122075c","src/record/api.rs":"4fcb1670b8543d82dc9ceb0ad804031a453463669210da0f81b3a0b6ef838ad9","src/record/mod.rs":"b4f026402e005579250d97cb6238999e1ac22b87e2c075a3eaf311f169b35cdc","src/record/reader.rs":"86fd5cadd58f9b74bf1b669b17a7abf7454fd58c16d3c2cc2be1f845a8c4bfda","src/record/record_reader.rs":"cffc96f01028676ada1a555debafe4ba5b15d47253b7b1583b2455ee2b3db932","src/record/record_writer.rs":"41efd6c6aedeee01a3e8097c9216fcc337510ba608f3e6318658f3b916258c20","src/record/triplet.rs":"1ecc94fb17318aa998173e9e2d38876c4211990aefd8a2d29b97aad8ba53de00","src/schema/mod.rs":"a365a4b256a32ad1779e23f04252803c9da2f6579b77dc38d38c43fe7ec99fd4","src/schema/parser.rs":"fcce3efcc9db42a6f619235158dae4151e7377082ecdee3244a13631470ed0a3","src/schema/printer.rs":"245cfeffb454d273ece46f545535bd46541954db40eddf0a0f1d8aa5c0961847","src/schema/types.rs":"2ad50a0f758b46245448762ffe6be8af6f682b5ae30ff4ff4a6c1f2567d6291b","src/schema/visitor.rs":"452ff71b92d6fd42737c4da8004d0f98a6ecd805b4bf44633a19f0d3a7d31812","src/util/bit_pack.rs":"ee166cc8e9c93c16ee1e54f4c5ef60f387948d5fea248b61c1bf45c953a5d5af","src/util/bit_util.rs":"ef93cc39a384353f70a311efc916f86d94c35df5daed24b6e2507409b938ca56","src/util/interner.rs":"56ae30a7571fe47f36f077fd8df8b9eb0b654efa01e75ea66bd8238a37f40f79","src/util/mod.rs":"129f0cc534ba8ccb25f962fa068b197838d5b96258f0d27c1f057ccb9885b7e9","src/util/push_buffers.rs":"ddf81c09a6e54e849a3878242e39ac4d77c8c76dab21eff1613feb9be476f6d5","src/util/test_common/file_util.rs":"f44d07d280c9e473da2780d4d0860fc45d2e72e48afcf828eaed13efb3c17a0f","src/util/test_common/mod.rs":"e1193f2ddb43d626d01129a5fb11ef550d93bc129e1652a9df920a91bcada13d","src/util/test_common/page_util.rs":"5c31212e6c6d51075b8e921302b3f68a735c359ee8b11699283669914999b603","src/util/test_common/rand_gen.rs":"7fe918eceb3f21a341d483cfa8c54186e9e7536020ee01e552874be7dc6e034f","src/util/utf8.rs":"bfa5b876a43bc5d124ece8153a18ef08da244e1621961ba8e0fc03147c881ec0","src/variant.rs":"6494ee5e763ada61a3fb912c968b4798ca9e246a1c2430315060d58656d65b09","tests/arrow_reader/bad_data.rs":"23507069d19e325f985848b71d5e11fd63523373efee9b02ef48c097a44c173b","tests/arrow_reader/bad_raw_metadata.bin":"6b5ea4cf5c2c2098f59d658c65188089ab0f4db4434d3ad1176e9ec0f93b092c","tests/arrow_reader/bigdelta.parquet":"5c2d5f5125617fe57a8d65269e66bea5fc5680374f9f80fdf93aa48821ff0046","tests/arrow_reader/bloom_filter/async.rs":"69360b25596c6f17e1000b778c8fc0c39473fc87fc192d80eb476fa616b4ea5a","tests/arrow_reader/bloom_filter/mod.rs":"d8828e6555f080b2535459e17602db3dd28f1cf8421aec316f765a6d9b2d1bc9","tests/arrow_reader/bloom_filter/sync.rs":"dd82259a72a3081cc93515a79a7ea13c70ec42d697c293865a068b99e0f82ea7","tests/arrow_reader/checksum.rs":"93a87027886fd1460dbbcf349ac32fd82efca2f3bd1c961a9e7038d7555a6044","tests/arrow_reader/int96_stats_roundtrip.rs":"46c4ca1fe3fcc9e6f37c0e642c34ef3da81b0b14d9423d7617e9462c36d3696b","tests/arrow_reader/invalid_utf8.rs":"2c7f0e167b5df8eb6ef1801c2e6413cf0f0cf3725e08510cd201dc43d0895213","tests/arrow_reader/io/async_reader.rs":"28692a1e9b1676284cb48ad5022bbd8c1e6c763f62e1fd9d0da1ee4ab866329c","tests/arrow_reader/io/mod.rs":"0f8435cdde1e8fc064bb5fc78afb378b5f9f69b68aaecd0e90ba2de8f8d96b55","tests/arrow_reader/io/sync_reader.rs":"11c5f3b4a01846a252e3edc4b657e7f00b6a351d63506c19cc33d432c379af6a","tests/arrow_reader/large_string_overflow.rs":"a6a4dbecbd49a9c9c9a9056c588044d3b6fcebd48dbcbbaa1de59dcf7b01b8a9","tests/arrow_reader/mod.rs":"9fddc48e6cb389819b2b890be0281d403ae234c9d195862d187d2dd8894f7e90","tests/arrow_reader/new_types.bin":"1b99e7c5fb79cc7cf744306ac81bdea617e6071686eb0afe7935fc28b433f638","tests/arrow_reader/predicate_cache.rs":"56b18ebd6369b62c0fe9f08d587f361d4b1edcc48c863a0b4854c2b17c7d77ca","tests/arrow_reader/row_filter/async.rs":"f57c15fcf2bd520e39cc153c704d67fe7049d4b84c4b52c69ae4d2683f9acca3","tests/arrow_reader/row_filter/mod.rs":"d8828e6555f080b2535459e17602db3dd28f1cf8421aec316f765a6d9b2d1bc9","tests/arrow_reader/row_filter/sync.rs":"40c2546686a59de3bcd10fb633753eed307bcdcd3854d592ac637e0b32fe98c3","tests/arrow_reader/statistics.rs":"d17e32df1314945a3ba0e31568e7f4995aca0b066b1c44b266aab858ca889ea2","tests/arrow_writer.rs":"d9f36bc3d40fca91c7f365def4096e28b6fde5cf837c4bfce10a365ca7ad24ba","tests/arrow_writer_layout.rs":"0dfe85631b32dede44eb101466aaa67436246ca456af18c71ae3167399664b2c","tests/encryption/encryption.rs":"1671702fd51181bbd61e6250dfb3bbf7b34812ddf57d71bfa67fb044288cba7f","tests/encryption/encryption_agnostic.rs":"6c2938dad5aee6c1a7ce034f04268f389af89d885f8927faee31be0544552f42","tests/encryption/encryption_async.rs":"371033e2736723e887fa4b1ef5c9851244fe32f537d71894ccaf3d0f83bd87d9","tests/encryption/encryption_disabled.rs":"c684f55f3c5d779d862a3fe1ea0fa811acfbee98bd8e4ba5dd9d276590468757","tests/encryption/encryption_util.rs":"cecae13fe258bf4b8907dac1c949b9e45249d01ebb37bdced7cb6b3fb2844b19","tests/encryption/mod.rs":"6112316d394e4288f8f8b80572f00c21f911191c331ca10e77079b513ce5f7b6","tests/geospatial.rs":"a33f1c8d49ae33684ad7b2c461df8ce82ff919547eafde93f46fa824c0e2f0aa","tests/variant_integration.rs":"a99ea247998343659311d76b806f77a5ab65bafcf689d0323cab5b39b0da0610"},"package":"7065842956a20c2a536924ce8e4d9955f7422451511b9eb7500d7bfe5077e59c"} \ No newline at end of file diff --git a/thirdparty/crates/parquet-59.1.0/BUILD.bazel b/thirdparty/crates/parquet-59.2.0/BUILD.bazel similarity index 99% rename from thirdparty/crates/parquet-59.1.0/BUILD.bazel rename to thirdparty/crates/parquet-59.2.0/BUILD.bazel index ba99f116d..94891ed29 100644 --- a/thirdparty/crates/parquet-59.1.0/BUILD.bazel +++ b/thirdparty/crates/parquet-59.2.0/BUILD.bazel @@ -37,7 +37,6 @@ rust_library( crate_root = "src/lib.rs", edition = "2024", proc_macro_deps = [ - "//thirdparty/crates/paste-1.0.15:paste", "//thirdparty/crates/seq-macro-0.3.6:seq_macro", ], rustc_env_files = [ @@ -110,13 +109,13 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "59.1.0", + version = "59.2.0", deps = [ "//thirdparty/crates/bytes-1.12.1:bytes", "//thirdparty/crates/chrono-0.4.45:chrono", "//thirdparty/crates/half-2.7.1:half", "//thirdparty/crates/hashbrown-0.17.1:hashbrown", - "//thirdparty/crates/num-bigint-0.4.8:num_bigint", + "//thirdparty/crates/num-bigint-0.5.1:num_bigint", "//thirdparty/crates/num-integer-0.1.46:num_integer", "//thirdparty/crates/num-traits-0.2.19:num_traits", "//thirdparty/crates/twox-hash-2.1.3:twox_hash", diff --git a/thirdparty/crates/parquet-59.1.0/CONTRIBUTING.md b/thirdparty/crates/parquet-59.2.0/CONTRIBUTING.md similarity index 92% rename from thirdparty/crates/parquet-59.1.0/CONTRIBUTING.md rename to thirdparty/crates/parquet-59.2.0/CONTRIBUTING.md index 922332b15..febe57e56 100644 --- a/thirdparty/crates/parquet-59.1.0/CONTRIBUTING.md +++ b/thirdparty/crates/parquet-59.2.0/CONTRIBUTING.md @@ -61,9 +61,3 @@ To build documentation, run `cargo doc --no-deps --all-features`. To compile and view in the browser, run `cargo doc --no-deps --all-features --open`. Before submitting a pull request, run `cargo fmt --all` to format the change. - -## Update Parquet Format - -To generate the parquet format (thrift definitions) code run [`./regen.sh`](./regen.sh). - -You may need to manually patch up doc comments that contain unescaped `[]` diff --git a/thirdparty/crates/parquet-59.1.0/Cargo.lock b/thirdparty/crates/parquet-59.2.0/Cargo.lock similarity index 92% rename from thirdparty/crates/parquet-59.1.0/Cargo.lock rename to thirdparty/crates/parquet-59.2.0/Cargo.lock index 1411e3050..1b1fddf22 100644 --- a/thirdparty/crates/parquet-59.1.0/Cargo.lock +++ b/thirdparty/crates/parquet-59.2.0/Cargo.lock @@ -78,9 +78,9 @@ checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anyhow" -version = "1.0.103" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" [[package]] name = "approx" @@ -93,9 +93,9 @@ dependencies = [ [[package]] name = "arrow" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b952ca5a8046ad741b60f142d6eca4aeebcad615694202bc64c5341f23e32c5b" +checksum = "61d285d16bce7d0be61912f7928342b673067b6b7d7ef6cc179258ba7de1fecf" dependencies = [ "arrow-arith", "arrow-array", @@ -115,9 +115,9 @@ dependencies = [ [[package]] name = "arrow-arith" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64a13b8d3008c4e9063c597a08f46446fe3fd5789277127672d6c0bdbb43b1ff" +checksum = "757ef1836251e88222542a7da2623bc1c9cb9e20afefa6db2c41e79991cd91d4" dependencies = [ "arrow-array", "arrow-buffer", @@ -129,9 +129,9 @@ dependencies = [ [[package]] name = "arrow-array" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9486151b2f0785bafc6fa04fc5c99fcb4495455662e58787ea32eaaed33c4192" +checksum = "bc9a4a4b2b5ecd0e04df03471661cb61f28bed3c7fd50994715129b01b2edb97" dependencies = [ "ahash", "arrow-buffer", @@ -147,9 +147,9 @@ dependencies = [ [[package]] name = "arrow-buffer" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4776577a87794bfdf0b4e90e2ea12454fa7738ea2823c4be5b9d1851da7b434" +checksum = "c12b576ef18c1deb80925a248b25ad84f419198d791b8e293fc6aaa60441fe90" dependencies = [ "bytes", "half", @@ -159,9 +159,9 @@ dependencies = [ [[package]] name = "arrow-cast" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9ad451ce4f98710828a455b96991b8f031deb2e67f5fcad6773f017e4a69c3a" +checksum = "68338a9096a5dc9bc11927c58c43a8526d96bf6abd2012ef6c0c9f505991cc79" dependencies = [ "arrow-array", "arrow-buffer", @@ -170,7 +170,7 @@ dependencies = [ "arrow-schema", "arrow-select", "atoi", - "base64", + "base64 0.23.0", "chrono", "comfy-table", "half", @@ -181,9 +181,9 @@ dependencies = [ [[package]] name = "arrow-csv" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8aa7bf96d6141a7bcca2eed57c7c9767d2a2175281857b8a7b68308992864784" +checksum = "25011b52b346407d497ef0030e12b45e4f2d0cc279efc09c4f3d09106db30e36" dependencies = [ "arrow-array", "arrow-cast", @@ -196,9 +196,9 @@ dependencies = [ [[package]] name = "arrow-data" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b38fe43e2e8704360f1464e6e8cc4fc381ef02cc4fb0192afa8df1aaa0115c66" +checksum = "723fe4aeed7604e00b9883a465af4ff0a0e6c44c03e41a68c3d1cbc403e0e44d" dependencies = [ "arrow-buffer", "arrow-schema", @@ -209,9 +209,9 @@ dependencies = [ [[package]] name = "arrow-ipc" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29dac499fcbc6ba74ee0324057821d381929a48526a3966bd9dffb44aa06d98c" +checksum = "149437b14371f5b9ec60f5ddc751483ae99d7a7072653c0075e5e469156eea7b" dependencies = [ "arrow-array", "arrow-buffer", @@ -223,9 +223,9 @@ dependencies = [ [[package]] name = "arrow-json" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fe05e916ddc50f4c7a363cd69c0ef5894fcee063517e9a0b8582f0c56746af6" +checksum = "f18b9123ccfec418a663f821c9a034af339711678c11ffe00d3ec07da5ff9f7e" dependencies = [ "arrow-array", "arrow-buffer", @@ -248,9 +248,9 @@ dependencies = [ [[package]] name = "arrow-ord" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e13dbdc2a9c053c10c7baa6e30faee04a180aa7ce88e471835850ce37abd20b" +checksum = "e6c08dff0686cf23ca4f562803f191ccbeb726dbae6309cd4b4aaf65e0f2c979" dependencies = [ "arrow-array", "arrow-buffer", @@ -261,9 +261,9 @@ dependencies = [ [[package]] name = "arrow-row" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d5a1f8c733d15260b305683472ee8ad89c62cbd706703ca873b90d051b41592" +checksum = "bbec439386df71ad570e6758a946111322b9e9dc8db83b5527321f0b4c9119c2" dependencies = [ "arrow-array", "arrow-buffer", @@ -274,9 +274,9 @@ dependencies = [ [[package]] name = "arrow-schema" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9e4969dc350d571766247143ab36a5187d095d3d3690970408bc630d47c69e5" +checksum = "e6fed2ca0d1eade57e811cbe73b98ad50cc08a1183e13b2d2aa43a7df593f40e" dependencies = [ "serde_core", "serde_json", @@ -284,9 +284,9 @@ dependencies = [ [[package]] name = "arrow-select" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "402770dba90865359d98d1ef92ef16e23d75c0cca9c2c880c8a05468b7743bf9" +checksum = "466b19cf75130b891dc1b23a84b343c714c62c64c9c62e365c76aa0ff90a53fb" dependencies = [ "ahash", "arrow-array", @@ -298,9 +298,9 @@ dependencies = [ [[package]] name = "arrow-string" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2b0afbb8b9016700938291123df30838b89decc3213dba00852021988b170d3" +checksum = "c838a25bb3691e919e0f617616ac51a4ff8517a952e29ca133cf0c22b2ce65b1" dependencies = [ "arrow-array", "arrow-buffer", @@ -321,7 +321,7 @@ checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -351,11 +351,17 @@ version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" +[[package]] +name = "base64" +version = "0.23.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b25655df2c3cdd83c5e5b293b88acd880332b2ddadd7c30ac43144fdc0033da9" + [[package]] name = "bitflags" -version = "2.13.0" +version = "2.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" +checksum = "b588b76d00fde79687d7646a9b5bdf3cc0f655e0bbd080335a95d7e96f3587da" [[package]] name = "brotli" @@ -392,9 +398,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.12.0" +version = "1.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae3f5d315924270530207e2a68396c3cc547f6dca3fbdca317cfb1a51edb593" +checksum = "fc652a48c352aef3ea3aed32080501cf3ef6ed5da78602a020c991775b0aff04" [[package]] name = "cast" @@ -478,9 +484,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.6.1" +version = "4.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ddb117e43bbf7dacf0a4190fef4d345b9bad68dfc649cb349e7d17d28428e51" +checksum = "d91e0c145792ef73a6ad36d27c75ac09f1832222a3c209689d90f534685ee5b7" dependencies = [ "clap_builder", "clap_derive", @@ -488,9 +494,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.6.0" +version = "4.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "714a53001bf66416adb0e2ef5ac857140e7dc3a0c48fb28b2f10762fc4b5069f" +checksum = "f09628afdcc538b57f3c6341e9c8e9970f18e4a481690a64974d7023bd33548b" dependencies = [ "anstyle", "clap_lex", @@ -498,14 +504,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.6.1" +version = "4.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2ce8604710f6733aa641a2b3731eaa1e8b3d9973d5e3565da11800813f997a9" +checksum = "d012d2b9d65aca7f18f4d9878a045bc17899bba951561ba5ec3c2ba1eed9a061" dependencies = [ "heck", "proc-macro2", "quote", - "syn", + "syn 3.0.3", ] [[package]] @@ -658,7 +664,7 @@ checksum = "97369cbbc041bc366949bc74d34658d6cda5621039731c6310521892a3a20ae0" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -745,9 +751,9 @@ dependencies = [ [[package]] name = "futures" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b147ee9d1f6d097cef9ce628cd2ee62288d963e16fb287bd9286455b241382d" +checksum = "a88cf1f829d945f548cf8fec32c61b1f202b6d93b45848602fc02af4b12ad218" dependencies = [ "futures-channel", "futures-core", @@ -760,9 +766,9 @@ dependencies = [ [[package]] name = "futures-channel" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07bbe89c50d7a535e539b8c17bc0b49bdb77747034daa8087407d655f3f7cc1d" +checksum = "262590f4fe6afeb0bc83be1daa64e52657fe185690a958af7f3ad0e92085c5ae" dependencies = [ "futures-core", "futures-sink", @@ -770,15 +776,15 @@ dependencies = [ [[package]] name = "futures-core" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e3450815272ef58cec6d564423f6e755e25379b217b0bc688e295ba24df6b1d" +checksum = "2cd50c473c80f6d7c3670a752354b8e569b1a7cbfdc0419ec88e5edad85e0dc7" [[package]] name = "futures-executor" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf29c38818342a3b26b5b923639e7b1f4a61fc5e76102d4b1981c6dc7a7579d" +checksum = "6754879cc9f2c66f88c6e5c35344bb0bdb0708b0352b1201815667c7eabc7458" dependencies = [ "futures-core", "futures-task", @@ -787,38 +793,38 @@ dependencies = [ [[package]] name = "futures-io" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cecba35d7ad927e23624b22ad55235f2239cfa44fd10428eecbeba6d6a717718" +checksum = "4577ecaa3c4f96589d473f679a71b596316f6641bc350038b962a5daf0085d7a" [[package]] name = "futures-macro" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835b70203e41293343137df5c0664546da5745f82ec9b84d40be8336958447b" +checksum = "2d6d3cde68c518367be28956066ddfef33813991b77a55005a69dae04bf3b10b" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] name = "futures-sink" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c39754e157331b013978ec91992bde1ac089843443c49cbc7f46150b0fad0893" +checksum = "e34418ac499d6305c2fb5ad0ed2f6ac998c5f8ca209b4510f7f94242c647e307" [[package]] name = "futures-task" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037711b3d59c33004d3856fbdc83b99d4ff37a24768fa1be9ce3538a1cde4393" +checksum = "b231ed28831efb4a61a08580c4bc233ec56bc009f4cd8f52da2c3cb97df0c109" [[package]] name = "futures-util" -version = "0.3.32" +version = "0.3.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "389ca41296e6190b48053de0321d02a77f32f8a5d2461dd38762c0593805c6d6" +checksum = "a77a90a256fce34da66415271e30f94ee91c57b04b8a2c042d9cf3220179deaa" dependencies = [ "futures-channel", "futures-core", @@ -948,9 +954,9 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" [[package]] name = "http" -version = "1.4.2" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6970f50e31d6fc17d3fa27329444bfa74e196cf62e95052a3f6fee181dba6425" +checksum = "918d3568bebf352712bc2ef3d46a8bcf1a75b373be6539de198e9105cbbf9ce0" dependencies = [ "bytes", "itoa", @@ -958,9 +964,9 @@ dependencies = [ [[package]] name = "http-body" -version = "1.0.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" +checksum = "ca2a8f2913ee65f60facd6a5905613afaa448497a0230cc41ce022d93290bc2c" dependencies = [ "bytes", "http", @@ -1034,7 +1040,7 @@ version = "0.1.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "96547c2556ec9d12fb1578c4eaf448b04993e7fb79cbaad930a656880a6bdfa0" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "futures-channel", "futures-util", @@ -1325,9 +1331,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.186" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] name = "libm" @@ -1370,18 +1376,18 @@ checksum = "112b39cec0b298b6c1999fee3e31427f74f676e4cb9879ed1a121b43661a4154" [[package]] name = "lz4_flex" -version = "0.13.1" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ef0d4ed8669f8f8826eb00dc878084aa8f253506c4fd5e8f58f5bce72ddb97e" +checksum = "ecbdfe44b1bd960b68170b417450a628c43f7cf56bb3c5317e61cb230ee7f226" dependencies = [ "twox-hash", ] [[package]] name = "memchr" -version = "2.8.2" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "miniz_oxide" @@ -1415,9 +1421,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.6" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +checksum = "93e7820bc0a80a0238e650327316f929ba18d5be054b647490a3a6a339f3e7c0" dependencies = [ "num-integer", "num-traits", @@ -1470,7 +1476,7 @@ dependencies = [ "proc-macro-crate", "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -1499,7 +1505,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "622acbc9100d3c10e2ee15804b0caa40e55c933d5aa53814cd520805b7958a49" dependencies = [ "async-trait", - "base64", + "base64 0.22.1", "bytes", "chrono", "form_urlencoded", @@ -1583,7 +1589,7 @@ dependencies = [ [[package]] name = "parquet" -version = "59.1.0" +version = "59.2.0" dependencies = [ "ahash", "arrow", @@ -1595,7 +1601,7 @@ dependencies = [ "arrow-ipc", "arrow-schema", "arrow-select", - "base64", + "base64 0.23.0", "brotli", "bytes", "chrono", @@ -1616,7 +1622,6 @@ dependencies = [ "parquet-variant", "parquet-variant-compute", "parquet-variant-json", - "paste", "rand 0.9.4", "ring", "seq-macro", @@ -1633,9 +1638,9 @@ dependencies = [ [[package]] name = "parquet-geospatial" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2aabcf721f7e2c68a5528e57c7c1f741b781f07834260e885f34a025ae2164e3" +checksum = "0e3383d7e5a8e846863f12dc78a292e62510fd216a70023f5c327f1d833bf690" dependencies = [ "arrow-schema", "geo-traits", @@ -1646,9 +1651,9 @@ dependencies = [ [[package]] name = "parquet-variant" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57db04c7f8598c9e12c935a7e953a441009189da3f1d504b63c5dc3346a4d59b" +checksum = "3f7e5fff3ed0c07514a7fb8bee3f2ea5a53f36939410ecac4a466620213539a8" dependencies = [ "arrow", "arrow-schema", @@ -1662,9 +1667,9 @@ dependencies = [ [[package]] name = "parquet-variant-compute" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ecebd5a05d4837104ae401977f5d8ad816045e01b367035c416df3c39540613" +checksum = "ba4d3de89dab8d1aaaf601ae8d71bd07ea88cfca9efc1df5815b982c30f631e1" dependencies = [ "arrow", "arrow-schema", @@ -1679,24 +1684,18 @@ dependencies = [ [[package]] name = "parquet-variant-json" -version = "59.1.0" +version = "59.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5fc56a025dc3d5537140fc95d80879750fc1aa4324cf2452f3d1471854c2f8d" +checksum = "fb19dfe1bd24c17addd761ba4f7000f615e2fa12525871c7baa835dbb3d7f147" dependencies = [ "arrow-schema", - "base64", + "base64 0.23.0", "chrono", "parquet-variant", "serde_json", "uuid", ] -[[package]] -name = "paste" -version = "1.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" - [[package]] name = "percent-encoding" version = "2.3.2" @@ -1740,7 +1739,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn", + "syn 2.0.119", ] [[package]] @@ -1754,9 +1753,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] @@ -1828,9 +1827,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] @@ -1914,9 +1913,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.4" +version = "1.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba" +checksum = "f020237b6c8eed93db2e2cb53c00c60a8e1bc73da7d073199a1180401450218d" dependencies = [ "aho-corasick", "memchr", @@ -1926,9 +1925,9 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.4.14" +version = "0.4.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f" +checksum = "8fcfdb36bda0c880c5931cdc7a2bcdc8ba4556847b9d912bca70bc94708711ad" dependencies = [ "aho-corasick", "memchr", @@ -1947,7 +1946,7 @@ version = "0.12.28" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "eddd3ca559203180a307f12d114c268abf583f59b03cb906fd0b3ff8646c1147" dependencies = [ - "base64", + "base64 0.22.1", "bytes", "futures-core", "futures-util", @@ -2145,9 +2144,9 @@ checksum = "1bc711410fbe7399f390ca1c3b60ad0f53f80e95c5eb935e52268a0e2cd49acc" [[package]] name = "serde" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ "serde_core", "serde_derive", @@ -2155,29 +2154,29 @@ dependencies = [ [[package]] name = "serde_core" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.3", ] [[package]] name = "serde_json" -version = "1.0.150" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" dependencies = [ "itoa", "memchr", @@ -2236,9 +2235,9 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "snap" -version = "1.1.1" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" +checksum = "199905e6153d6405f9728fe44daace35f8f837bbf830bb6e85fbd5828709a886" [[package]] name = "socket2" @@ -2264,9 +2263,20 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" [[package]] name = "syn" -version = "2.0.118" +version = "2.0.119" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" dependencies = [ "proc-macro2", "quote", @@ -2290,14 +2300,14 @@ checksum = "728a70f3dbaf5bab7f0c4b1ac8d7ae5ea60a4b5549c8a5914361c99147a709d2" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] name = "sysinfo" -version = "0.38.4" +version = "0.39.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ab6a2f8bfe508deb3c6406578252e491d299cbbf3bc0529ecc3313aee4a52f" +checksum = "d2071df9448915b71c4fe6d25deaf1c22f12bd234f01540b77312bb8e41361e6" dependencies = [ "libc", "memchr", @@ -2346,7 +2356,7 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -2357,7 +2367,7 @@ checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -2406,9 +2416,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.52.3" +version = "1.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fc7f01b389ac15039e4dc9531aa973a135d7a4135281b12d7c1bc79fd57fffe" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" dependencies = [ "bytes", "libc", @@ -2427,7 +2437,7 @@ checksum = "385a6cb71ab9ab790c5fe8d67f1645e6c450a7ce006a33de03daa956cf70a496" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -2547,7 +2557,7 @@ checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -2567,9 +2577,9 @@ checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" [[package]] name = "twox-hash" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea3136b675547379c4bd395ca6b938e5ad3c3d20fad76e7fe85f9e0d011419c" +checksum = "8464ec13c3691491391d9fce00f6416c9a48e46972f72d7865688be2080192c9" [[package]] name = "unicode-ident" @@ -2621,9 +2631,9 @@ checksum = "b6c140620e7ffbb22c2dee59cafe6084a59b5ffc27a8859a5f0d494b5d52b6be" [[package]] name = "uuid" -version = "1.23.4" +version = "1.24.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf80a72845275afea99e7f2b434723d3bc7e38470fcd1c7ed39a599c73319a53" +checksum = "bf3923a6f5c4c6382e0b653c4117f48d631ea17f38ed86e2a828e6f7412f5239" dependencies = [ "getrandom 0.4.2", "js-sys", @@ -2721,7 +2731,7 @@ dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn", + "syn 2.0.119", "wasm-bindgen-shared", ] @@ -2885,7 +2895,7 @@ checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -2896,7 +2906,7 @@ checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -3143,7 +3153,7 @@ dependencies = [ "heck", "indexmap", "prettyplease", - "syn", + "syn 2.0.119", "wasm-metadata", "wit-bindgen-core", "wit-component", @@ -3159,7 +3169,7 @@ dependencies = [ "prettyplease", "proc-macro2", "quote", - "syn", + "syn 2.0.119", "wit-bindgen-core", "wit-bindgen-rust", ] @@ -3238,7 +3248,7 @@ checksum = "de844c262c8848816172cef550288e7dc6c7b7814b4ee56b3e1553f275f1858e" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", "synstructure", ] @@ -3259,7 +3269,7 @@ checksum = "70e3cd084b1788766f53af483dd21f93881ff30d7320490ec3ef7526d203bad4" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] @@ -3279,7 +3289,7 @@ checksum = "11532158c46691caf0f2593ea8358fed6bbf68a0315e80aae9bd41fbade684a1" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", "synstructure", ] @@ -3319,7 +3329,7 @@ checksum = "625dc425cab0dca6dc3c3319506e6593dcb08a9f387ea3b284dbd52a92c40555" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 2.0.119", ] [[package]] diff --git a/thirdparty/crates/parquet-59.1.0/Cargo.toml b/thirdparty/crates/parquet-59.2.0/Cargo.toml similarity index 92% rename from thirdparty/crates/parquet-59.1.0/Cargo.toml rename to thirdparty/crates/parquet-59.2.0/Cargo.toml index 4ae2f4416..05da73df3 100644 --- a/thirdparty/crates/parquet-59.1.0/Cargo.toml +++ b/thirdparty/crates/parquet-59.2.0/Cargo.toml @@ -13,7 +13,7 @@ edition = "2024" rust-version = "1.85" name = "parquet" -version = "59.1.0" +version = "59.2.0" authors = ["Apache Arrow "] build = false autolib = false @@ -163,6 +163,14 @@ required-features = [ "async", ] +[[example]] +name = "object_store" +path = "examples/object_store.rs" +required-features = [ + "arrow", + "async", +] + [[example]] name = "read_parquet" path = "examples/read_parquet.rs" @@ -231,7 +239,6 @@ harness = false required-features = [ "arrow", "async", - "object_store", ] [[bench]] @@ -253,6 +260,15 @@ required-features = [ "async", ] +[[bench]] +name = "arrow_reader_row_selection_policy" +path = "benches/arrow_reader_row_selection_policy.rs" +harness = false +required-features = [ + "arrow", + "async", +] + [[bench]] name = "arrow_statistics" path = "benches/arrow_statistics.rs" @@ -323,6 +339,12 @@ path = "benches/row_selector.rs" harness = false required-features = ["arrow"] +[[bench]] +name = "row_selector_boolean_buffer" +path = "benches/row_selector_boolean_buffer.rs" +harness = false +required-features = ["arrow"] + [[bench]] name = "writer_overhead" path = "benches/writer_overhead.rs" @@ -330,35 +352,35 @@ harness = false required-features = ["arrow"] [dependencies.arrow-array] -version = "59.1.0" +version = "59.2.0" optional = true [dependencies.arrow-buffer] -version = "59.1.0" +version = "59.2.0" optional = true [dependencies.arrow-csv] -version = "59.1.0" +version = "59.2.0" optional = true [dependencies.arrow-data] -version = "59.1.0" +version = "59.2.0" optional = true [dependencies.arrow-ipc] -version = "59.1.0" +version = "59.2.0" optional = true [dependencies.arrow-schema] -version = "59.1.0" +version = "59.2.0" optional = true [dependencies.arrow-select] -version = "59.1.0" +version = "59.2.0" optional = true [dependencies.base64] -version = "0.22" +version = "0.23" features = ["std"] optional = true default-features = false @@ -418,7 +440,7 @@ version = "0.17" default-features = false [dependencies.lz4_flex] -version = "0.13" +version = "0.14" features = [ "std", "frame", @@ -427,7 +449,7 @@ optional = true default-features = false [dependencies.num-bigint] -version = "0.4" +version = "0.5" default-features = false [dependencies.num-integer] @@ -447,24 +469,21 @@ optional = true default-features = false [dependencies.parquet-geospatial] -version = "59.1.0" +version = "59.2.0" optional = true [dependencies.parquet-variant] -version = "59.1.0" +version = "59.2.0" optional = true [dependencies.parquet-variant-compute] -version = "59.1.0" +version = "59.2.0" optional = true [dependencies.parquet-variant-json] -version = "59.1.0" +version = "59.2.0" optional = true -[dependencies.paste] -version = "1.0" - [dependencies.ring] version = "0.17" features = ["std"] @@ -518,7 +537,7 @@ optional = true default-features = false [dev-dependencies.arrow] -version = "59.1.0" +version = "59.2.0" features = [ "ipc", "test_utils", @@ -528,10 +547,10 @@ features = [ default-features = false [dev-dependencies.arrow-cast] -version = "59.1.0" +version = "59.2.0" [dev-dependencies.base64] -version = "0.22" +version = "0.23" features = ["std"] default-features = false @@ -555,7 +574,7 @@ version = "1.46.3" default-features = true [dev-dependencies.lz4_flex] -version = "0.13" +version = "0.14" features = [ "std", "frame", @@ -589,7 +608,7 @@ version = "1.0" default-features = false [dev-dependencies.sysinfo] -version = "0.38.1" +version = "0.39.6" features = ["system"] default-features = false @@ -604,6 +623,7 @@ features = [ "rt-multi-thread", "io-util", "fs", + "sync", ] default-features = false diff --git a/thirdparty/crates/parquet-59.1.0/Cargo.toml.orig b/thirdparty/crates/parquet-59.2.0/Cargo.toml.orig similarity index 91% rename from thirdparty/crates/parquet-59.1.0/Cargo.toml.orig rename to thirdparty/crates/parquet-59.2.0/Cargo.toml.orig index eaf8b2920..b559b4bbc 100644 --- a/thirdparty/crates/parquet-59.1.0/Cargo.toml.orig +++ b/thirdparty/crates/parquet-59.2.0/Cargo.toml.orig @@ -56,13 +56,13 @@ snap = { version = "1.0", default-features = false, optional = true } brotli = { version = "8.0", default-features = false, features = ["std"], optional = true } # To use `flate2` you must enable either the `flate2-zlib-rs` or `flate2-rust_backend` backends flate2 = { version = "1.1", default-features = false, optional = true } -lz4_flex = { version = "0.13", default-features = false, features = ["std", "frame"], optional = true } +lz4_flex = { version = "0.14", default-features = false, features = ["std", "frame"], optional = true } zstd = { version = "0.13", optional = true, default-features = false } chrono = { workspace = true } -num-bigint = { version = "0.4", default-features = false } +num-bigint = { version = "0.5", default-features = false } num-integer = { version = "0.1.46", default-features = false, features = ["std"] } num-traits = { version = "0.2.19", default-features = false, features = ["std"] } -base64 = { version = "0.22", default-features = false, features = ["std", ], optional = true } +base64 = { version = "0.23", default-features = false, features = ["std", ], optional = true } clap = { version = "4.1", default-features = false, features = ["std", "derive", "env", "help", "error-context", "usage"], optional = true } serde = { version = "1.0", default-features = false, features = ["derive"], optional = true } serde_json = { version = "1.0", default-features = false, features = ["std"], optional = true } @@ -71,29 +71,28 @@ futures = { version = "0.3", default-features = false, features = ["std"], optio tokio = { version = "1.0", optional = true, default-features = false, features = ["macros", "rt", "io-util"] } hashbrown = { version = "0.17", default-features = false } twox-hash = { version = "2.0", default-features = false, features = ["xxhash64"] } -paste = { version = "1.0" } half = { version = "2.1", default-features = false, features = ["num-traits"] } crc32fast = { version = "1.4.2", optional = true, default-features = false } simdutf8 = { workspace = true , optional = true } ring = { version = "0.17", default-features = false, features = ["std"], optional = true } [dev-dependencies] -base64 = { version = "0.22", default-features = false, features = ["std"] } +base64 = { version = "0.23", default-features = false, features = ["std"] } criterion = { workspace = true, default-features = false, features = ["async_futures"] } snap = { version = "1.0", default-features = false } tempfile = { version = "3.0", default-features = false } insta = { workspace = true, default-features = true } brotli = { version = "8.0", default-features = false, features = ["std"] } flate2 = { version = "1.0", default-features = false, features = ["rust_backend"] } -lz4_flex = { version = "0.13", default-features = false, features = ["std", "frame"] } +lz4_flex = { version = "0.14", default-features = false, features = ["std", "frame"] } zstd = { version = "0.13", default-features = false } serde_json = { version = "1.0", features = ["std"], default-features = false } arrow = { workspace = true, features = ["ipc", "test_utils", "prettyprint", "json"] } arrow-cast = { workspace = true } -tokio = { version = "1.0", default-features = false, features = ["macros", "rt-multi-thread", "io-util", "fs"] } +tokio = { version = "1.0", default-features = false, features = ["macros", "rt-multi-thread", "io-util", "fs", "sync"] } rand = { version = "0.9", default-features = false, features = ["std", "std_rng", "thread_rng"] } object_store = { workspace = true, features = ["azure", "fs"] } -sysinfo = { version = "0.38.1", default-features = false, features = ["system"] } +sysinfo = { version = "0.39.6", default-features = false, features = ["system"] } [package.metadata.docs.rs] all-features = true @@ -117,6 +116,8 @@ experimental = ["variant_experimental"] # Enable async APIs async = ["futures", "tokio"] # Enable object_store integration +# This feature will be removed in a future release. +# See https://github.com/apache/arrow-rs/issues/10308 object_store = ["dep:object_store", "async"] # Group Zstd dependencies zstd = ["dep:zstd"] @@ -158,6 +159,11 @@ name = "read_with_rowgroup" required-features = ["arrow", "async"] path = "./examples/read_with_rowgroup.rs" +[[example]] +name = "object_store" +required-features = ["arrow", "async"] +path = "./examples/object_store.rs" + [[test]] name = "arrow_writer_layout" required-features = ["arrow"] @@ -248,9 +254,14 @@ name = "arrow_reader_row_filter" required-features = ["arrow", "async"] harness = false +[[bench]] +name = "arrow_reader_row_selection_policy" +required-features = ["arrow", "async"] +harness = false + [[bench]] name = "arrow_reader_clickbench" -required-features = ["arrow", "async", "object_store"] +required-features = ["arrow", "async"] harness = false [[bench]] @@ -277,6 +288,11 @@ name = "row_selector" harness = false required-features = ["arrow"] +[[bench]] +name = "row_selector_boolean_buffer" +harness = false +required-features = ["arrow"] + [[bench]] name = "row_group_index_reader" required-features = ["arrow"] diff --git a/thirdparty/crates/parquet-59.1.0/LICENSE.txt b/thirdparty/crates/parquet-59.2.0/LICENSE.txt similarity index 100% rename from thirdparty/crates/parquet-59.1.0/LICENSE.txt rename to thirdparty/crates/parquet-59.2.0/LICENSE.txt diff --git a/thirdparty/crates/parquet-59.1.0/NOTICE.txt b/thirdparty/crates/parquet-59.2.0/NOTICE.txt similarity index 100% rename from thirdparty/crates/parquet-59.1.0/NOTICE.txt rename to thirdparty/crates/parquet-59.2.0/NOTICE.txt diff --git a/thirdparty/crates/parquet-59.1.0/README.md b/thirdparty/crates/parquet-59.2.0/README.md similarity index 100% rename from thirdparty/crates/parquet-59.1.0/README.md rename to thirdparty/crates/parquet-59.2.0/README.md diff --git a/thirdparty/crates/parquet-59.1.0/THRIFT.md b/thirdparty/crates/parquet-59.2.0/THRIFT.md similarity index 100% rename from thirdparty/crates/parquet-59.1.0/THRIFT.md rename to thirdparty/crates/parquet-59.2.0/THRIFT.md diff --git a/thirdparty/crates/parquet-59.1.0/benches/arrow_reader.rs b/thirdparty/crates/parquet-59.2.0/benches/arrow_reader.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/benches/arrow_reader.rs rename to thirdparty/crates/parquet-59.2.0/benches/arrow_reader.rs diff --git a/thirdparty/crates/parquet-59.1.0/benches/arrow_reader_clickbench.rs b/thirdparty/crates/parquet-59.2.0/benches/arrow_reader_clickbench.rs similarity index 94% rename from thirdparty/crates/parquet-59.1.0/benches/arrow_reader_clickbench.rs rename to thirdparty/crates/parquet-59.2.0/benches/arrow_reader_clickbench.rs index 039829f1b..f411b9684 100644 --- a/thirdparty/crates/parquet-59.1.0/benches/arrow_reader_clickbench.rs +++ b/thirdparty/crates/parquet-59.2.0/benches/arrow_reader_clickbench.rs @@ -35,16 +35,21 @@ use arrow::compute::{like, nlike, or}; use arrow_array::types::{Int16Type, Int32Type, Int64Type}; use arrow_array::{ArrayRef, ArrowPrimitiveType, BooleanArray, PrimitiveArray, StringViewArray}; use arrow_schema::{ArrowError, DataType, Schema}; +use bytes::Bytes; use criterion::{Criterion, criterion_group, criterion_main}; -use futures::StreamExt; +use futures::future::BoxFuture; +use futures::{FutureExt, StreamExt, TryFutureExt}; use object_store::local::LocalFileSystem; +use object_store::{GetOptions, GetRange, ObjectStore, ObjectStoreExt}; use parquet::arrow::arrow_reader::{ ArrowPredicate, ArrowPredicateFn, ArrowReaderMetadata, ArrowReaderOptions, ParquetRecordBatchReaderBuilder, RowFilter, }; -use parquet::arrow::async_reader::ParquetObjectReader; +use parquet::arrow::async_reader::{AsyncFileReader, MetadataSuffixFetch}; use parquet::arrow::{ParquetRecordBatchStreamBuilder, ProjectionMask}; +use parquet::errors::ParquetError; use parquet::file::metadata::PageIndexPolicy; +use parquet::file::metadata::{ParquetMetaData, ParquetMetaDataReader}; use parquet::schema::types::SchemaDescriptor; use std::fmt::{Display, Formatter}; use std::path::{Path, PathBuf}; @@ -101,6 +106,75 @@ criterion_group!( ); criterion_main!(benches); +fn to_parquet_err(e: object_store::Error) -> ParquetError { + ParquetError::External(Box::new(e)) +} + +/// An [`AsyncFileReader`] reading via an [`ObjectStore`], mirroring the +/// example on the [`AsyncFileReader`] trait documentation +#[derive(Clone)] +struct ObjectStoreReader { + store: Arc, + path: object_store::path::Path, +} + +impl AsyncFileReader for ObjectStoreReader { + fn get_bytes( + &mut self, + range: std::ops::Range, + ) -> BoxFuture<'_, Result> { + self.store + .get_range(&self.path, range) + .map_err(to_parquet_err) + .boxed() + } + + fn get_byte_ranges( + &mut self, + ranges: Vec>, + ) -> BoxFuture<'_, Result, ParquetError>> { + async move { + self.store + .get_ranges(&self.path, &ranges) + .await + .map_err(to_parquet_err) + } + .boxed() + } + + fn get_metadata<'a>( + &'a mut self, + options: Option<&'a ArrowReaderOptions>, + ) -> BoxFuture<'a, Result, ParquetError>> { + async move { + let metadata = ParquetMetaDataReader::new() + .with_arrow_reader_options(options) + .load_via_suffix_and_finish(self) + .await?; + Ok(Arc::new(metadata)) + } + .boxed() + } +} + +impl MetadataSuffixFetch for &mut ObjectStoreReader { + fn fetch_suffix(&mut self, suffix: usize) -> BoxFuture<'_, Result> { + let options = GetOptions { + range: Some(GetRange::Suffix(suffix as u64)), + ..Default::default() + }; + async move { + let resp = self + .store + .get_opts(&self.path, options) + .await + .map_err(to_parquet_err)?; + resp.bytes().await.map_err(to_parquet_err) + } + .boxed() + } +} + /// Predicate Function. /// /// Functions are invoked with the requested array and return a [`BooleanArray`] @@ -736,7 +810,7 @@ impl ReadTest { self.check_row_count(row_count); } - /// Run the filter and projection using the async `ObjectStore` reader + /// Like [`Self::run_async`] but reading via an [`ObjectStore`] based reader async fn run_async_object_store(&self) { let hits_path = hits_1(); let parent = hits_path.parent().unwrap(); @@ -744,7 +818,10 @@ impl ReadTest { let store = Arc::new(LocalFileSystem::new_with_prefix(parent).unwrap()); let location = object_store::path::Path::from(file_name); - let reader = ParquetObjectReader::new(store, location); + let reader = ObjectStoreReader { + store, + path: location, + }; // setup the reader let mut stream = ParquetRecordBatchStreamBuilder::new_with_metadata( diff --git a/thirdparty/crates/parquet-59.1.0/benches/arrow_reader_peak_memory.rs b/thirdparty/crates/parquet-59.2.0/benches/arrow_reader_peak_memory.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/benches/arrow_reader_peak_memory.rs rename to thirdparty/crates/parquet-59.2.0/benches/arrow_reader_peak_memory.rs diff --git a/thirdparty/crates/parquet-59.1.0/benches/arrow_reader_row_filter.rs b/thirdparty/crates/parquet-59.2.0/benches/arrow_reader_row_filter.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/benches/arrow_reader_row_filter.rs rename to thirdparty/crates/parquet-59.2.0/benches/arrow_reader_row_filter.rs diff --git a/thirdparty/crates/parquet-59.2.0/benches/arrow_reader_row_selection_policy.rs b/thirdparty/crates/parquet-59.2.0/benches/arrow_reader_row_selection_policy.rs new file mode 100644 index 000000000..da3f4fc15 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/benches/arrow_reader_row_selection_policy.rs @@ -0,0 +1,57 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +//! Auto-policy benchmark for async Parquet `RowSelection` execution. +//! +//! This benchmark is intended for direct comparisons between `main` and +//! candidate branches. Forced row-selection policies and decode-then-filter +//! diagnostics intentionally belong in separate oracle benchmarks. +//! Page indexes are intentionally disabled so this benchmark isolates +//! row-selection execution from page-level I/O pruning. + +mod row_selection_policy_common; + +use criterion::{Criterion, criterion_group, criterion_main}; +use row_selection_policy_common::cases::{ + ORDER_CASES, SCALE_CASES, SHAPE_CASES, assert_order_cases_are_reverses, +}; +use row_selection_policy_common::register::register_auto_group; +use row_selection_policy_common::shapes::assert_shape_contracts; + +fn benchmark_auto(c: &mut Criterion) { + assert_shape_contracts(); + assert_order_cases_are_reverses(); + + register_auto_group( + c, + "arrow_reader_row_selection_policy/auto/shape", + SHAPE_CASES, + ); + register_auto_group( + c, + "arrow_reader_row_selection_policy/auto/order", + ORDER_CASES, + ); + register_auto_group( + c, + "arrow_reader_row_selection_policy/auto/scale", + SCALE_CASES, + ); +} + +criterion_group!(benches, benchmark_auto); +criterion_main!(benches); diff --git a/thirdparty/crates/parquet-59.1.0/benches/arrow_statistics.rs b/thirdparty/crates/parquet-59.2.0/benches/arrow_statistics.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/benches/arrow_statistics.rs rename to thirdparty/crates/parquet-59.2.0/benches/arrow_statistics.rs diff --git a/thirdparty/crates/parquet-59.1.0/benches/arrow_writer.rs b/thirdparty/crates/parquet-59.2.0/benches/arrow_writer.rs similarity index 94% rename from thirdparty/crates/parquet-59.1.0/benches/arrow_writer.rs rename to thirdparty/crates/parquet-59.2.0/benches/arrow_writer.rs index 073716e2f..adc4dcc9e 100644 --- a/thirdparty/crates/parquet-59.1.0/benches/arrow_writer.rs +++ b/thirdparty/crates/parquet-59.2.0/benches/arrow_writer.rs @@ -251,6 +251,22 @@ fn create_float_bench_batch_with_nans(size: usize, nan_density: f32) -> Result Result { + let fields = vec![ + Field::new("_1", Decimal32Type::DEFAULT_TYPE, false), + Field::new("_2", Decimal64Type::DEFAULT_TYPE, false), + Field::new("_3", Decimal128Type::DEFAULT_TYPE, false), + Field::new("_4", Decimal256Type::DEFAULT_TYPE, false), + ]; + let schema = Schema::new(fields); + Ok(create_random_batch( + Arc::new(schema), + size, + null_density, + 0.75, + )?) +} + fn create_list_primitive_bench_batch( size: usize, null_density: f32, @@ -332,6 +348,17 @@ fn create_struct_bench_batch(size: usize, null_density: f32) -> Result Result { + let fields = vec![Field::new("_1", DataType::FixedSizeBinary(len), true)]; + let schema = Schema::new(fields); + Ok(create_random_batch( + Arc::new(schema), + size, + null_density, + 0.75, + )?) +} + fn create_nested_list_bench_batch(size: usize, null_density: f32) -> Result { // List> — exercises the nested repetition (non-batched) path let fields = vec![Field::new( @@ -528,6 +555,9 @@ fn create_batches() -> Vec<(&'static str, RecordBatch)> { let batch = create_float_bench_batch_with_nans(BATCH_SIZE, 0.5).unwrap(); batches.push(("float_with_nans", batch)); + let batch = create_decimal_bench_batch(BATCH_SIZE, 0.75).unwrap(); + batches.push(("decimal", batch)); + let batch = create_list_primitive_bench_batch(BATCH_SIZE, 0.25, 0.75).unwrap(); batches.push(("list_primitive", batch)); @@ -552,6 +582,9 @@ fn create_batches() -> Vec<(&'static str, RecordBatch)> { let batch = create_struct_bench_batch(BATCH_SIZE, 1.0).unwrap(); batches.push(("struct_all_null", batch)); + let batch = create_fsb_bench_batch(BATCH_SIZE, 0.9, 16).unwrap(); + batches.push(("fsb", batch)); + let batch = create_nested_list_bench_batch(BATCH_SIZE, 0.25).unwrap(); batches.push(("list_nested", batch)); diff --git a/thirdparty/crates/parquet-59.1.0/benches/bloom_filter.rs b/thirdparty/crates/parquet-59.2.0/benches/bloom_filter.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/benches/bloom_filter.rs rename to thirdparty/crates/parquet-59.2.0/benches/bloom_filter.rs diff --git a/thirdparty/crates/parquet-59.1.0/benches/compression.rs b/thirdparty/crates/parquet-59.2.0/benches/compression.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/benches/compression.rs rename to thirdparty/crates/parquet-59.2.0/benches/compression.rs diff --git a/thirdparty/crates/parquet-59.1.0/benches/encoding.rs b/thirdparty/crates/parquet-59.2.0/benches/encoding.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/benches/encoding.rs rename to thirdparty/crates/parquet-59.2.0/benches/encoding.rs diff --git a/thirdparty/crates/parquet-59.1.0/benches/metadata.rs b/thirdparty/crates/parquet-59.2.0/benches/metadata.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/benches/metadata.rs rename to thirdparty/crates/parquet-59.2.0/benches/metadata.rs diff --git a/thirdparty/crates/parquet-59.1.0/benches/parquet_round_trip.rs b/thirdparty/crates/parquet-59.2.0/benches/parquet_round_trip.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/benches/parquet_round_trip.rs rename to thirdparty/crates/parquet-59.2.0/benches/parquet_round_trip.rs diff --git a/thirdparty/crates/parquet-59.1.0/benches/push_decoder.rs b/thirdparty/crates/parquet-59.2.0/benches/push_decoder.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/benches/push_decoder.rs rename to thirdparty/crates/parquet-59.2.0/benches/push_decoder.rs diff --git a/thirdparty/crates/parquet-59.1.0/benches/row_group_index_reader.rs b/thirdparty/crates/parquet-59.2.0/benches/row_group_index_reader.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/benches/row_group_index_reader.rs rename to thirdparty/crates/parquet-59.2.0/benches/row_group_index_reader.rs diff --git a/thirdparty/crates/parquet-59.1.0/benches/row_selection_cursor.rs b/thirdparty/crates/parquet-59.2.0/benches/row_selection_cursor.rs similarity index 87% rename from thirdparty/crates/parquet-59.1.0/benches/row_selection_cursor.rs rename to thirdparty/crates/parquet-59.2.0/benches/row_selection_cursor.rs index 49c9e6d68..a957f0b80 100644 --- a/thirdparty/crates/parquet-59.1.0/benches/row_selection_cursor.rs +++ b/thirdparty/crates/parquet-59.2.0/benches/row_selection_cursor.rs @@ -20,6 +20,7 @@ use std::sync::Arc; use arrow_array::builder::StringViewBuilder; use arrow_array::{ArrayRef, Float64Array, Int32Array, RecordBatch, StringViewArray}; +use arrow_buffer::BooleanBufferBuilder; use arrow_schema::{DataType, Field, Schema}; use bytes::Bytes; use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main}; @@ -36,7 +37,8 @@ const BASE_SEED: u64 = 0xA55AA55A; const AVG_SELECTOR_LENGTHS: &[usize] = &[4, 8, 12, 16, 20, 24, 28, 32, 36, 40]; const COLUMN_WIDTHS: &[usize] = &[2, 4, 8, 16, 32]; const UTF8VIEW_LENS: &[usize] = &[4, 8, 16, 32, 64, 128, 256]; -const BENCH_MODES: &[BenchMode] = &[BenchMode::ReadSelector, BenchMode::ReadMask]; +const BENCH_MODES: &[BenchMode] = &[BenchMode::Selector, BenchMode::Mask, BenchMode::Auto]; +const BACKINGS: &[Backing] = &[Backing::Selectors, Backing::Mask]; struct DataProfile { name: &'static str, @@ -228,22 +230,25 @@ fn bench_over_lengths( (stats.select_ratio * 100.0).round() as u32 ); - let bench_input = BenchInput { - parquet_data: parquet_data.clone(), - selection, - }; - - for &mode in BENCH_MODES { - c.bench_with_input( - BenchmarkId::new(mode.label(), &suffix), - &bench_input, - |b, input| { - b.iter(|| { - let total = run_read(&input.parquet_data, &input.selection, mode.policy()); - hint::black_box(total); - }); - }, - ); + for &backing in BACKINGS { + let bench_input = BenchInput { + parquet_data: parquet_data.clone(), + selection: backing.convert(&selection), + }; + + for &mode in BENCH_MODES { + c.bench_with_input( + BenchmarkId::new(backing.function_name(mode), &suffix), + &bench_input, + |b, input| { + b.iter(|| { + let total = + run_read(&input.parquet_data, &input.selection, mode.policy()); + hint::black_box(total); + }); + }, + ); + } } } } @@ -448,22 +453,57 @@ fn sample_length(mean: f64, distribution: &RunDistribution, rng: &mut StdRng) -> #[derive(Clone, Copy)] enum BenchMode { - ReadSelector, - ReadMask, + Selector, + Mask, + Auto, } impl BenchMode { fn label(self) -> &'static str { match self { - BenchMode::ReadSelector => "read_selector", - BenchMode::ReadMask => "read_mask", + BenchMode::Selector => "read_selector", + BenchMode::Mask => "read_mask", + BenchMode::Auto => "read_auto", } } fn policy(self) -> RowSelectionPolicy { match self { - BenchMode::ReadSelector => RowSelectionPolicy::Selectors, - BenchMode::ReadMask => RowSelectionPolicy::Mask, + BenchMode::Selector => RowSelectionPolicy::Selectors, + BenchMode::Mask => RowSelectionPolicy::Mask, + BenchMode::Auto => RowSelectionPolicy::default(), + } + } +} + +/// Which representation backs the input [`RowSelection`] handed to the reader. +#[derive(Clone, Copy)] +enum Backing { + Selectors, + Mask, +} + +impl Backing { + /// Benchmark function name for this backing/mode pair. Selector-backed + /// inputs keep the historical names so results stay comparable with runs + /// from before mask-backed selections existed. + fn function_name(self, mode: BenchMode) -> String { + match self { + Backing::Selectors => mode.label().to_string(), + Backing::Mask => format!("{}_mask_backed", mode.label()), + } + } + + fn convert(self, selection: &RowSelection) -> RowSelection { + match self { + Backing::Selectors => selection.clone(), + Backing::Mask => { + let mut builder = BooleanBufferBuilder::new(TOTAL_ROWS); + for selector in selection.iter() { + builder.append_n(selector.row_count, !selector.skip); + } + RowSelection::from_boolean_buffer(builder.finish()) + } } } } diff --git a/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/assertions.rs b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/assertions.rs new file mode 100644 index 000000000..057ce355e --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/assertions.rs @@ -0,0 +1,65 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use parquet::arrow::arrow_reader::RowSelectionPolicy; + +use super::fixture::CaseFixture; +use super::model::{CaseSpec, PAYLOAD_VALUE_MODULUS, ROWS_PER_GROUP}; +use super::runner::run_collect_payload0; +use super::shapes::expand_pattern; + +pub(crate) async fn preflight_auto(case: &CaseSpec, fixture: &CaseFixture) { + let actual = run_collect_payload0(fixture, RowSelectionPolicy::default()).await; + assert_eq!( + actual.row_count, fixture.expected_rows, + "{} returned an unexpected number of rows", + case.name + ); + + let expected = expected_selected_global_rows(case); + assert_eq!(actual.payload0.len(), expected.len(), "{}", case.name); + if let Some((output_row, (actual, expected))) = actual + .payload0 + .iter() + .zip(&expected) + .enumerate() + .find(|(_, (actual, expected))| actual != expected) + { + panic!( + "{} returned the wrong source row at output {output_row}: expected {expected}, got {actual}", + case.name + ); + } +} + +fn expected_selected_global_rows(case: &CaseSpec) -> Vec { + case.row_groups + .iter() + .copied() + .enumerate() + .flat_map(|(row_group_idx, pattern)| { + expand_pattern(pattern, ROWS_PER_GROUP) + .into_iter() + .enumerate() + .filter(|(_, selected)| *selected == 1) + .map(move |(row_idx, _)| { + let global_row = row_group_idx * ROWS_PER_GROUP + row_idx; + global_row.wrapping_rem(PAYLOAD_VALUE_MODULUS) as i32 + }) + }) + .collect() +} diff --git a/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/cases.rs b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/cases.rs new file mode 100644 index 000000000..99e906804 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/cases.rs @@ -0,0 +1,121 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use super::model::{CaseSpec, RowGroupPattern}; +use super::shapes::{ + BURSTY_50_SAME_SUMMARY, CLUSTERED_50_RUN128, DENSE_98_44_SKIP1_SELECT63, FRAGMENTED_50_RUN1, + MODERATE_12_5_RUN32, REGULAR_50_RUN32, SPARSE_1_56_RUN32, +}; + +const FOUR_SPARSE: &[RowGroupPattern] = &[RowGroupPattern::Cycle(SPARSE_1_56_RUN32); 4]; + +const FOUR_MODERATE: &[RowGroupPattern] = &[RowGroupPattern::Cycle(MODERATE_12_5_RUN32); 4]; + +const FOUR_FRAGMENTED: &[RowGroupPattern] = &[RowGroupPattern::Cycle(FRAGMENTED_50_RUN1); 4]; + +const FOUR_CLUSTERED: &[RowGroupPattern] = &[RowGroupPattern::Cycle(CLUSTERED_50_RUN128); 4]; + +const FOUR_REGULAR: &[RowGroupPattern] = &[RowGroupPattern::Cycle(REGULAR_50_RUN32); 4]; + +const FOUR_BURSTY: &[RowGroupPattern] = &[RowGroupPattern::Cycle(BURSTY_50_SAME_SUMMARY); 4]; + +const FOUR_DENSE: &[RowGroupPattern] = &[RowGroupPattern::Cycle(DENSE_98_44_SKIP1_SELECT63); 4]; + +const FOUR_ALL_SELECTED: &[RowGroupPattern] = &[RowGroupPattern::AllSelected; 4]; + +const SPARSE_TO_FRAGMENTED: &[RowGroupPattern] = &[ + RowGroupPattern::Cycle(SPARSE_1_56_RUN32), + RowGroupPattern::Cycle(SPARSE_1_56_RUN32), + RowGroupPattern::Cycle(FRAGMENTED_50_RUN1), + RowGroupPattern::Cycle(FRAGMENTED_50_RUN1), +]; + +const FRAGMENTED_TO_SPARSE: &[RowGroupPattern] = &[ + RowGroupPattern::Cycle(FRAGMENTED_50_RUN1), + RowGroupPattern::Cycle(FRAGMENTED_50_RUN1), + RowGroupPattern::Cycle(SPARSE_1_56_RUN32), + RowGroupPattern::Cycle(SPARSE_1_56_RUN32), +]; + +const ONE_FRAGMENTED: &[RowGroupPattern] = &[RowGroupPattern::Cycle(FRAGMENTED_50_RUN1)]; + +const EIGHT_FRAGMENTED: &[RowGroupPattern] = &[RowGroupPattern::Cycle(FRAGMENTED_50_RUN1); 8]; + +pub(crate) fn assert_order_cases_are_reverses() { + assert!( + SPARSE_TO_FRAGMENTED + .iter() + .eq(FRAGMENTED_TO_SPARSE.iter().rev()) + ); +} + +pub(crate) const SHAPE_CASES: &[CaseSpec] = &[ + CaseSpec { + name: "sparse_1_56_run32", + row_groups: FOUR_SPARSE, + }, + CaseSpec { + name: "moderate_12_5_run32", + row_groups: FOUR_MODERATE, + }, + CaseSpec { + name: "fragmented_50_run1", + row_groups: FOUR_FRAGMENTED, + }, + CaseSpec { + name: "clustered_50_run128", + row_groups: FOUR_CLUSTERED, + }, + CaseSpec { + name: "regular_50_run32", + row_groups: FOUR_REGULAR, + }, + CaseSpec { + name: "bursty_50_same_summary", + row_groups: FOUR_BURSTY, + }, + CaseSpec { + name: "dense_98_44_skip1_select63", + row_groups: FOUR_DENSE, + }, + CaseSpec { + name: "all_selected", + row_groups: FOUR_ALL_SELECTED, + }, +]; + +pub(crate) const ORDER_CASES: &[CaseSpec] = &[ + CaseSpec { + name: "sparse2_then_fragmented2", + row_groups: SPARSE_TO_FRAGMENTED, + }, + CaseSpec { + name: "fragmented2_then_sparse2", + row_groups: FRAGMENTED_TO_SPARSE, + }, +]; + +pub(crate) const SCALE_CASES: &[CaseSpec] = &[ + CaseSpec { + name: "fragmented_50_run1/rg01", + row_groups: ONE_FRAGMENTED, + }, + CaseSpec { + name: "fragmented_50_run1/rg08", + row_groups: EIGHT_FRAGMENTED, + }, +]; diff --git a/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/fixture.rs b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/fixture.rs new file mode 100644 index 000000000..1470f5b89 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/fixture.rs @@ -0,0 +1,163 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use std::ops::Range; +use std::sync::Arc; + +use arrow::array::{ArrayRef, Int32Array, RecordBatch}; +use arrow::datatypes::{DataType, Field, Schema, SchemaRef}; +use bytes::Bytes; +use futures::FutureExt; +use futures::future::BoxFuture; +use parquet::arrow::ArrowWriter; +use parquet::arrow::arrow_reader::ArrowReaderOptions; +use parquet::arrow::async_reader::AsyncFileReader; +use parquet::basic::Compression; +use parquet::errors::Result; +use parquet::file::metadata::{PageIndexPolicy, ParquetMetaData, ParquetMetaDataReader}; +use parquet::file::properties::WriterProperties; + +use super::model::{CaseSpec, PAYLOAD_COLUMNS, PAYLOAD_VALUE_MODULUS, ROWS_PER_GROUP}; +use super::shapes::{expand_pattern, selected_rows}; + +#[derive(Debug)] +pub(crate) struct CaseFixture { + bytes: Bytes, + metadata: Arc, + pub(crate) expected_rows: usize, +} + +impl CaseFixture { + pub(crate) fn reader(&self) -> InMemoryAsyncReader { + InMemoryAsyncReader { + bytes: self.bytes.clone(), + metadata: Arc::clone(&self.metadata), + } + } + + pub(crate) fn schema_descr(&self) -> &parquet::schema::types::SchemaDescriptor { + self.metadata.file_metadata().schema_descr() + } +} + +#[derive(Debug, Clone)] +pub(crate) struct InMemoryAsyncReader { + bytes: Bytes, + metadata: Arc, +} + +impl AsyncFileReader for InMemoryAsyncReader { + fn get_bytes(&mut self, range: Range) -> BoxFuture<'_, Result> { + let bytes = self.bytes.slice(range.start as usize..range.end as usize); + async move { Ok(bytes) }.boxed() + } + + fn get_metadata<'a>( + &'a mut self, + _options: Option<&'a ArrowReaderOptions>, + ) -> BoxFuture<'a, Result>> { + let metadata = Arc::clone(&self.metadata); + async move { Ok(metadata) }.boxed() + } +} + +pub(crate) fn build_fixture(case: &CaseSpec) -> Result { + assert!( + !case.row_groups.is_empty(), + "benchmark case must contain at least one row group" + ); + + let schema = build_schema(); + let properties = WriterProperties::builder() + .set_compression(Compression::UNCOMPRESSED) + .set_dictionary_enabled(false) + .set_max_row_group_row_count(Some(ROWS_PER_GROUP)) + .build(); + + let mut encoded = Vec::new(); + { + let mut writer = ArrowWriter::try_new(&mut encoded, Arc::clone(&schema), Some(properties))?; + for (row_group_idx, pattern) in case.row_groups.iter().copied().enumerate() { + writer.write(&build_row_group_batch( + Arc::clone(&schema), + pattern, + row_group_idx, + )?)?; + } + writer.close()?; + } + + let bytes = Bytes::from(encoded); + let mut metadata_reader = + ParquetMetaDataReader::new().with_page_index_policy(PageIndexPolicy::Skip); + metadata_reader.try_parse(&bytes)?; + let metadata = Arc::new(metadata_reader.finish()?); + + assert_eq!( + metadata.num_row_groups(), + case.row_groups.len(), + "writer did not preserve the requested row-group layout" + ); + for row_group in metadata.row_groups() { + assert_eq!(row_group.num_rows() as usize, ROWS_PER_GROUP); + } + + let expected_rows = case + .row_groups + .iter() + .copied() + .map(|pattern| selected_rows(pattern, ROWS_PER_GROUP)) + .sum(); + + Ok(CaseFixture { + bytes, + metadata, + expected_rows, + }) +} + +fn build_schema() -> SchemaRef { + let mut fields = Vec::with_capacity(PAYLOAD_COLUMNS + 1); + fields.push(Field::new("predicate", DataType::Int32, false)); + fields.extend( + (0..PAYLOAD_COLUMNS) + .map(|column_idx| Field::new(format!("payload_{column_idx}"), DataType::Int32, false)), + ); + Arc::new(Schema::new(fields)) +} + +fn build_row_group_batch( + schema: SchemaRef, + pattern: super::model::RowGroupPattern, + row_group_idx: usize, +) -> Result { + let predicate = expand_pattern(pattern, ROWS_PER_GROUP); + let mut columns = Vec::with_capacity(PAYLOAD_COLUMNS + 1); + columns.push(Arc::new(Int32Array::from(predicate)) as ArrayRef); + + for column_idx in 0..PAYLOAD_COLUMNS { + let values = Int32Array::from_iter_values((0..ROWS_PER_GROUP).map(|row_idx| { + let global_row = row_group_idx * ROWS_PER_GROUP + row_idx; + global_row + .wrapping_add(column_idx * 17) + .wrapping_rem(PAYLOAD_VALUE_MODULUS) as i32 + })); + columns.push(Arc::new(values) as ArrayRef); + } + + Ok(RecordBatch::try_new(schema, columns)?) +} diff --git a/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/mod.rs b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/mod.rs new file mode 100644 index 000000000..a4053e8c0 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/mod.rs @@ -0,0 +1,24 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +pub(crate) mod assertions; +pub(crate) mod cases; +pub(crate) mod fixture; +pub(crate) mod model; +pub(crate) mod register; +pub(crate) mod runner; +pub(crate) mod shapes; diff --git a/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/model.rs b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/model.rs new file mode 100644 index 000000000..e44462e71 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/model.rs @@ -0,0 +1,61 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +pub(crate) const ROWS_PER_GROUP: usize = 65_536; +pub(crate) const BATCH_SIZE: usize = 8_192; +pub(crate) const PAYLOAD_COLUMNS: usize = 8; +pub(crate) const PAYLOAD_VALUE_MODULUS: usize = 1_000_003; + +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +pub(crate) struct SelectionRun { + pub(crate) selected: bool, + pub(crate) len: usize, +} + +impl SelectionRun { + pub(crate) const fn select(len: usize) -> Self { + Self { + selected: true, + len, + } + } + + pub(crate) const fn skip(len: usize) -> Self { + Self { + selected: false, + len, + } + } +} + +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +pub(crate) enum RowGroupPattern { + Cycle(&'static [SelectionRun]), + AllSelected, +} + +#[derive(Clone, Copy, Debug)] +pub(crate) struct CaseSpec { + pub(crate) name: &'static str, + pub(crate) row_groups: &'static [RowGroupPattern], +} + +impl CaseSpec { + pub(crate) const fn total_rows(self) -> usize { + self.row_groups.len() * ROWS_PER_GROUP + } +} diff --git a/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/register.rs b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/register.rs new file mode 100644 index 000000000..7c2e8dc16 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/register.rs @@ -0,0 +1,59 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use std::hint; +use std::sync::{Arc, OnceLock}; + +use criterion::{Criterion, Throughput}; + +use super::assertions::preflight_auto; +use super::fixture::{CaseFixture, build_fixture}; +use super::model::CaseSpec; +use super::runner::run_auto; + +pub(crate) fn register_auto_group(c: &mut Criterion, group_name: &str, cases: &'static [CaseSpec]) { + let runtime = Arc::new( + tokio::runtime::Builder::new_current_thread() + .enable_all() + .build() + .unwrap(), + ); + let mut group = c.benchmark_group(group_name); + + for case in cases { + group.throughput(Throughput::Elements(case.total_rows() as u64)); + + let fixture: Arc>> = Arc::new(OnceLock::new()); + let preflight = Arc::new(OnceLock::new()); + let runtime = Arc::clone(&runtime); + + group.bench_function(case.name, move |b| { + let fixture = + Arc::clone(fixture.get_or_init(|| Arc::new(build_fixture(case).unwrap()))); + preflight.get_or_init(|| { + runtime.block_on(preflight_auto(case, &fixture)); + }); + + b.iter(|| { + let rows = runtime.block_on(run_auto(&fixture)); + hint::black_box(rows); + }); + }); + } + + group.finish(); +} diff --git a/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/runner.rs b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/runner.rs new file mode 100644 index 000000000..bf89fd8a6 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/runner.rs @@ -0,0 +1,92 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use arrow::array::{Int32Array, RecordBatch}; +use arrow::compute::kernels::cmp::eq; +use arrow::datatypes::Int32Type; +use arrow_array::cast::AsArray; +use futures::StreamExt; +use parquet::arrow::arrow_reader::{ArrowPredicateFn, RowFilter, RowSelectionPolicy}; +use parquet::arrow::{ParquetRecordBatchStreamBuilder, ProjectionMask}; + +use super::fixture::CaseFixture; +use super::model::{BATCH_SIZE, PAYLOAD_COLUMNS}; + +#[derive(Debug, Eq, PartialEq)] +pub(crate) struct RunResult { + pub(crate) row_count: usize, + pub(crate) payload0: Vec, +} + +async fn run_with_consumer( + fixture: &CaseFixture, + policy: RowSelectionPolicy, + mut consume: F, +) -> usize +where + F: FnMut(&RecordBatch), +{ + let predicate_projection = ProjectionMask::roots(fixture.schema_descr(), [0]); + let output_projection = ProjectionMask::roots(fixture.schema_descr(), 1..=PAYLOAD_COLUMNS); + let predicate = ArrowPredicateFn::new(predicate_projection, |batch: RecordBatch| { + eq(batch.column(0), &Int32Array::new_scalar(1)) + }); + let row_filter = RowFilter::new(vec![Box::new(predicate)]); + + let mut stream = ParquetRecordBatchStreamBuilder::new(fixture.reader()) + .await + .unwrap() + .with_batch_size(BATCH_SIZE) + .with_projection(output_projection) + .with_row_filter(row_filter) + .with_row_selection_policy(policy) + .build() + .unwrap(); + + let mut rows = 0; + while let Some(batch) = stream.next().await { + let batch = batch.unwrap(); + rows += batch.num_rows(); + consume(&batch); + } + rows +} + +pub(crate) async fn run(fixture: &CaseFixture, policy: RowSelectionPolicy) -> usize { + run_with_consumer(fixture, policy, |_| {}).await +} + +pub(crate) async fn run_auto(fixture: &CaseFixture) -> usize { + run(fixture, RowSelectionPolicy::default()).await +} + +pub(crate) async fn run_collect_payload0( + fixture: &CaseFixture, + policy: RowSelectionPolicy, +) -> RunResult { + let mut payload0 = Vec::with_capacity(fixture.expected_rows); + let row_count = run_with_consumer(fixture, policy, |batch| { + let values = batch.column(0).as_primitive::(); + payload0.extend(values.values().iter().copied()); + }) + .await; + + RunResult { + row_count, + payload0, + } +} diff --git a/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/shapes.rs b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/shapes.rs new file mode 100644 index 000000000..e83667ddb --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/benches/row_selection_policy_common/shapes.rs @@ -0,0 +1,150 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use super::model::{RowGroupPattern, SelectionRun}; + +pub(crate) const SPARSE_1_56_RUN32: &[SelectionRun] = + &[SelectionRun::skip(2_016), SelectionRun::select(32)]; + +pub(crate) const MODERATE_12_5_RUN32: &[SelectionRun] = + &[SelectionRun::skip(224), SelectionRun::select(32)]; + +pub(crate) const FRAGMENTED_50_RUN1: &[SelectionRun] = + &[SelectionRun::skip(1), SelectionRun::select(1)]; + +pub(crate) const CLUSTERED_50_RUN128: &[SelectionRun] = + &[SelectionRun::skip(128), SelectionRun::select(128)]; + +pub(crate) const REGULAR_50_RUN32: &[SelectionRun] = + &[SelectionRun::skip(32), SelectionRun::select(32)]; + +pub(crate) const DENSE_98_44_SKIP1_SELECT63: &[SelectionRun] = + &[SelectionRun::skip(1), SelectionRun::select(63)]; + +/// Has the same selectivity, run density, and mean selected/skipped run lengths +/// as [`REGULAR_50_RUN32`], but a different run variance and ordering. +pub(crate) const BURSTY_50_SAME_SUMMARY: &[SelectionRun] = &[ + SelectionRun::skip(1), + SelectionRun::select(1), + SelectionRun::skip(1), + SelectionRun::select(1), + SelectionRun::skip(1), + SelectionRun::select(1), + SelectionRun::skip(125), + SelectionRun::select(125), +]; + +#[derive(Clone, Copy, Debug, Default, Eq, PartialEq)] +struct ShapeSummary { + selected_rows: usize, + skipped_rows: usize, + selector_count: usize, + selected_run_count: usize, + skipped_run_count: usize, +} + +impl ShapeSummary { + fn from_cycle(cycle: &[SelectionRun]) -> Self { + cycle.iter().fold(Self::default(), |mut summary, run| { + assert!(run.len > 0, "selection run must be non-empty"); + summary.selector_count += 1; + if run.selected { + summary.selected_rows += run.len; + summary.selected_run_count += 1; + } else { + summary.skipped_rows += run.len; + summary.skipped_run_count += 1; + } + summary + }) + } + + fn total_rows(self) -> usize { + self.selected_rows + self.skipped_rows + } + + fn selected_ratio(self) -> f64 { + self.selected_rows as f64 / self.total_rows() as f64 + } + + fn run_density(self) -> f64 { + self.selector_count as f64 / self.total_rows() as f64 + } + + fn average_selected_run(self) -> f64 { + self.selected_rows as f64 / self.selected_run_count as f64 + } + + fn average_skipped_run(self) -> f64 { + self.skipped_rows as f64 / self.skipped_run_count as f64 + } +} + +pub(crate) fn assert_shape_contracts() { + let regular = ShapeSummary::from_cycle(REGULAR_50_RUN32); + let bursty = ShapeSummary::from_cycle(BURSTY_50_SAME_SUMMARY); + + assert_eq!(regular.selected_ratio(), bursty.selected_ratio()); + assert_eq!(regular.run_density(), bursty.run_density()); + assert_eq!( + regular.average_selected_run(), + bursty.average_selected_run() + ); + assert_eq!(regular.average_skipped_run(), bursty.average_skipped_run()); + + let dense = ShapeSummary::from_cycle(DENSE_98_44_SKIP1_SELECT63); + assert_eq!(dense.selected_rows, 63); + assert_eq!(dense.skipped_rows, 1); + assert_eq!(dense.selector_count, 2); + assert_eq!(dense.average_selected_run(), 63.0); + assert_eq!(dense.average_skipped_run(), 1.0); +} + +pub(crate) fn expand_pattern(pattern: RowGroupPattern, row_count: usize) -> Vec { + match pattern { + RowGroupPattern::AllSelected => vec![1; row_count], + RowGroupPattern::Cycle(cycle) => { + assert!(!cycle.is_empty(), "selection cycle must not be empty"); + let summary = ShapeSummary::from_cycle(cycle); + assert_eq!( + row_count % summary.total_rows(), + 0, + "row group size must be divisible by cycle size" + ); + + let mut values = Vec::with_capacity(row_count); + while values.len() < row_count { + for run in cycle { + values.extend(std::iter::repeat_n(i32::from(run.selected), run.len)); + } + } + assert_eq!(values.len(), row_count); + values + } + } +} + +pub(crate) fn selected_rows(pattern: RowGroupPattern, row_count: usize) -> usize { + match pattern { + RowGroupPattern::AllSelected => row_count, + RowGroupPattern::Cycle(cycle) => { + let summary = ShapeSummary::from_cycle(cycle); + assert_eq!(row_count % summary.total_rows(), 0); + summary.selected_rows * (row_count / summary.total_rows()) + } + } +} diff --git a/thirdparty/crates/parquet-59.1.0/benches/row_selector.rs b/thirdparty/crates/parquet-59.2.0/benches/row_selector.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/benches/row_selector.rs rename to thirdparty/crates/parquet-59.2.0/benches/row_selector.rs diff --git a/thirdparty/crates/parquet-59.2.0/benches/row_selector_boolean_buffer.rs b/thirdparty/crates/parquet-59.2.0/benches/row_selector_boolean_buffer.rs new file mode 100644 index 000000000..c5e1177b4 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/benches/row_selector_boolean_buffer.rs @@ -0,0 +1,233 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use arrow_array::{ArrayRef, BooleanArray, Int32Array, RecordBatch}; +use arrow_buffer::{BooleanBuffer, BooleanBufferBuilder}; +use arrow_schema::{DataType, Field, Schema}; +use bytes::Bytes; +use criterion::{BenchmarkId, Criterion, criterion_group, criterion_main}; +use parquet::arrow::ArrowWriter; +use parquet::arrow::arrow_reader::{ParquetRecordBatchReaderBuilder, RowSelection}; +use rand::rngs::StdRng; +use rand::{Rng, SeedableRng}; +use std::hint; +use std::sync::Arc; + +const TOTAL_ROWS: usize = 3_000_000; +const SELECTIVITY_CASES: &[Selectivity] = &[ + Selectivity::new("select01", 1, 100), + Selectivity::new("select10", 1, 10), + Selectivity::new("select33", 1, 3), + Selectivity::new("select80", 4, 5), +]; + +/// Generates a deterministic random row mask with the specified selectivity. +fn generate_random_row_selection(total_rows: usize, selectivity: Selectivity) -> BooleanBuffer { + let mut rng = StdRng::seed_from_u64(0x5E1EC7_u64 ^ selectivity.seed()); + let bools: Vec = (0..total_rows) + .map(|_| rng.random_bool(selectivity.ratio())) + .collect(); + BooleanBuffer::from(bools) +} + +fn generate_fragmented_selection(total_rows: usize, selectivity: Selectivity) -> BooleanBuffer { + let mut builder = BooleanBufferBuilder::new(total_rows); + for row in 0..total_rows { + builder.append(row % selectivity.denominator < selectivity.numerator); + } + builder.finish() +} + +fn generate_clustered_selection(total_rows: usize, selectivity: Selectivity) -> BooleanBuffer { + const RUN: usize = 8 * 1024; + const JITTER: usize = RUN / 2; + let mut rng = StdRng::seed_from_u64(0xC1057E_u64 ^ selectivity.seed()); + let mut builder = BooleanBufferBuilder::new(total_rows); + let mut rows_remaining = total_rows; + let mut run_idx = 0usize; + + while rows_remaining != 0 { + let run_len = rng + .random_range((RUN - JITTER)..=(RUN + JITTER)) + .min(rows_remaining); + let selected = run_idx % selectivity.denominator < selectivity.numerator; + builder.append_n(run_len, selected); + rows_remaining -= run_len; + run_idx += 1; + } + builder.finish() +} + +fn boolean_array(mask: &BooleanBuffer) -> BooleanArray { + BooleanArray::new(mask.clone(), None) +} + +fn criterion_benchmark(c: &mut Criterion) { + let patterns = build_patterns(); + + let mut construction = c.benchmark_group("row_selector_boolean_buffer/construction"); + for case in &patterns { + construction.bench_with_input( + BenchmarkId::new("from_filters", case.label()), + &case.mask, + |b, mask| { + b.iter(|| { + let array = boolean_array(mask); + let selection = RowSelection::from_filters(&[array]); + hint::black_box(selection); + }) + }, + ); + + construction.bench_with_input( + BenchmarkId::new("from_boolean_buffer", case.label()), + &case.mask, + |b, mask| { + b.iter(|| { + let selection = RowSelection::from_boolean_buffer(mask.clone()); + hint::black_box(selection); + }) + }, + ); + } + construction.finish(); + + let parquet_data = write_parquet_file(TOTAL_ROWS); + let mut reader = c.benchmark_group("row_selector_boolean_buffer/reader"); + for case in &patterns { + reader.bench_with_input( + BenchmarkId::new("from_filters", case.label()), + &case.mask, + |b, mask| { + b.iter(|| { + let selection = RowSelection::from_filters(&[boolean_array(mask)]); + let rows = read_rows(&parquet_data, selection); + hint::black_box(rows); + }) + }, + ); + + reader.bench_with_input( + BenchmarkId::new("from_boolean_buffer", case.label()), + &case.mask, + |b, mask| { + b.iter(|| { + let selection = RowSelection::from_boolean_buffer(mask.clone()); + let rows = read_rows(&parquet_data, selection); + hint::black_box(rows); + }) + }, + ); + } + reader.finish(); +} + +fn build_patterns() -> Vec { + let mut patterns = Vec::new(); + for selectivity in SELECTIVITY_CASES { + patterns.push(BenchCase::new( + "fragmented", + *selectivity, + generate_fragmented_selection(TOTAL_ROWS, *selectivity), + )); + patterns.push(BenchCase::new( + "clustered", + *selectivity, + generate_clustered_selection(TOTAL_ROWS, *selectivity), + )); + patterns.push(BenchCase::new( + "random", + *selectivity, + generate_random_row_selection(TOTAL_ROWS, *selectivity), + )); + } + patterns +} + +fn write_parquet_file(total_rows: usize) -> Bytes { + let schema = Arc::new(Schema::new(vec![Field::new( + "value", + DataType::Int32, + false, + )])); + let values: ArrayRef = Arc::new(Int32Array::from_iter_values( + (0..total_rows).map(|row| row as i32), + )); + let batch = RecordBatch::try_new(schema.clone(), vec![values]).unwrap(); + + let mut writer = ArrowWriter::try_new(Vec::new(), schema, None).unwrap(); + writer.write(&batch).unwrap(); + Bytes::from(writer.into_inner().unwrap()) +} + +fn read_rows(parquet_data: &Bytes, selection: RowSelection) -> usize { + let reader = ParquetRecordBatchReaderBuilder::try_new(parquet_data.clone()) + .unwrap() + .with_row_selection(selection) + .build() + .unwrap(); + + reader.map(|batch| batch.unwrap().num_rows()).sum::() +} + +struct BenchCase { + pattern: &'static str, + selectivity: Selectivity, + mask: BooleanBuffer, +} + +impl BenchCase { + fn new(pattern: &'static str, selectivity: Selectivity, mask: BooleanBuffer) -> Self { + Self { + pattern, + selectivity, + mask, + } + } + + fn label(&self) -> String { + format!("{}/{}", self.pattern, self.selectivity.label) + } +} + +#[derive(Clone, Copy)] +struct Selectivity { + label: &'static str, + numerator: usize, + denominator: usize, +} + +impl Selectivity { + const fn new(label: &'static str, numerator: usize, denominator: usize) -> Self { + Self { + label, + numerator, + denominator, + } + } + + fn ratio(self) -> f64 { + self.numerator as f64 / self.denominator as f64 + } + + fn seed(self) -> u64 { + ((self.numerator as u64) << 32) ^ self.denominator as u64 + } +} + +criterion_group!(benches, criterion_benchmark); +criterion_main!(benches); diff --git a/thirdparty/crates/parquet-59.1.0/benches/writer_overhead.rs b/thirdparty/crates/parquet-59.2.0/benches/writer_overhead.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/benches/writer_overhead.rs rename to thirdparty/crates/parquet-59.2.0/benches/writer_overhead.rs diff --git a/thirdparty/crates/parquet-59.1.0/examples/external_metadata.rs b/thirdparty/crates/parquet-59.2.0/examples/external_metadata.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/examples/external_metadata.rs rename to thirdparty/crates/parquet-59.2.0/examples/external_metadata.rs diff --git a/thirdparty/crates/parquet-59.2.0/examples/object_store.rs b/thirdparty/crates/parquet-59.2.0/examples/object_store.rs new file mode 100644 index 000000000..fa5293151 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/examples/object_store.rs @@ -0,0 +1,167 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use arrow_array::{ArrayRef, Int64Array, RecordBatch}; +use bytes::Bytes; +use futures::future::BoxFuture; +use futures::{FutureExt, TryFutureExt, TryStreamExt}; +use object_store::buffered::BufWriter; +use object_store::memory::InMemory; +use object_store::path::Path; +use object_store::{GetOptions, GetRange, ObjectStore, ObjectStoreExt}; +use parquet::arrow::arrow_reader::ArrowReaderOptions; +use parquet::arrow::async_reader::{AsyncFileReader, MetadataSuffixFetch, SpawnedReader}; +use parquet::arrow::{AsyncArrowWriter, ParquetRecordBatchStreamBuilder}; +use parquet::errors::{ParquetError, Result}; +use parquet::file::metadata::{ParquetMetaData, ParquetMetaDataReader}; +use std::ops::Range; +use std::sync::Arc; + +/// This example demonstrates reading and writing Parquet files on object +/// storage via the [`object_store`] crate. +/// +/// # Example Overview +/// +/// 1. Writes a Parquet file to an [`ObjectStore`] by passing an +/// [`object_store::buffered::BufWriter`] directly to [`AsyncArrowWriter`], +/// via the blanket [`AsyncFileWriter`] implementation for types +/// implementing [`AsyncWrite`] (equivalent of `ParquetObjectWriter`). +/// +/// 2. Reads it back with [`ObjectStoreReader`], a minimal [`AsyncFileReader`] +/// implementation on top of an [`ObjectStore`] (equivalent of +/// `ParquetObjectReader`). +/// +/// 3. Reads it again with the reader wrapped in a [`SpawnedReader`], which +/// performs all I/O on a separate tokio runtime so that the runtime +/// decoding Parquet is not also driving the I/O (equivalent of +/// `ParquetObjectReader::with_runtime`). +/// +/// [`AsyncFileWriter`]: parquet::arrow::async_writer::AsyncFileWriter +/// [`AsyncWrite`]: tokio::io::AsyncWrite +#[tokio::main] +async fn main() -> Result<()> { + let store: Arc = Arc::new(InMemory::new()); + let path = Path::from("example.parquet"); + + // 1. Write a Parquet file: a `BufWriter` implements `AsyncWrite` and can + // therefore be passed to `AsyncArrowWriter` directly. + let col = Arc::new(Int64Array::from_iter_values([1, 2, 3])) as ArrayRef; + let batch = RecordBatch::try_from_iter([("col", col)]).unwrap(); + + let writer = BufWriter::new(Arc::clone(&store), path.clone()); + let mut writer = AsyncArrowWriter::try_new(writer, batch.schema(), None)?; + writer.write(&batch).await?; + writer.close().await?; + + // 2. Read it back with an `AsyncFileReader` implemented on `ObjectStore`. + let reader = ObjectStoreReader::new(Arc::clone(&store), path.clone()); + let builder = ParquetRecordBatchStreamBuilder::new(reader).await?; + let read: Vec = builder.build()?.try_collect().await?; + assert_eq!(read, vec![batch.clone()]); + println!("read {} rows", read[0].num_rows()); + + // 3. Read again, performing the I/O on a dedicated runtime. + let io_runtime = tokio::runtime::Builder::new_multi_thread() + .worker_threads(1) + .enable_all() + .build() + .expect("failed to build I/O runtime"); + + let reader = ObjectStoreReader::new(Arc::clone(&store), path); + let reader = SpawnedReader::new(reader, io_runtime.handle().clone()); + let builder = ParquetRecordBatchStreamBuilder::new(reader).await?; + let read: Vec = builder.build()?.try_collect().await?; + assert_eq!(read, vec![batch]); + println!("read {} rows via dedicated I/O runtime", read[0].num_rows()); + + io_runtime.shutdown_background(); + Ok(()) +} + +fn to_parquet_err(e: object_store::Error) -> ParquetError { + ParquetError::External(Box::new(e)) +} + +/// An [`AsyncFileReader`] for a location in an [`ObjectStore`] +/// +/// This mirrors the example on the [`AsyncFileReader`] trait documentation. +#[derive(Clone, Debug)] +struct ObjectStoreReader { + store: Arc, + path: Path, +} + +impl ObjectStoreReader { + fn new(store: Arc, path: Path) -> Self { + Self { store, path } + } +} + +impl AsyncFileReader for ObjectStoreReader { + fn get_bytes(&mut self, range: Range) -> BoxFuture<'_, Result> { + self.store + .get_range(&self.path, range) + .map_err(to_parquet_err) + .boxed() + } + + fn get_byte_ranges(&mut self, ranges: Vec>) -> BoxFuture<'_, Result>> { + async move { + self.store + .get_ranges(&self.path, &ranges) + .await + .map_err(to_parquet_err) + } + .boxed() + } + + /// Loads the metadata, respecting the provided [`ArrowReaderOptions`] via + /// [`ParquetMetaDataReader::with_arrow_reader_options`] + fn get_metadata<'a>( + &'a mut self, + options: Option<&'a ArrowReaderOptions>, + ) -> BoxFuture<'a, Result>> { + async move { + let metadata = ParquetMetaDataReader::new() + .with_arrow_reader_options(options) + .load_via_suffix_and_finish(self) + .await?; + Ok(Arc::new(metadata)) + } + .boxed() + } +} + +/// Supports fetching the Parquet footer without knowing the file size upfront, +/// via suffix range requests +impl MetadataSuffixFetch for &mut ObjectStoreReader { + fn fetch_suffix(&mut self, suffix: usize) -> BoxFuture<'_, Result> { + let options = GetOptions { + range: Some(GetRange::Suffix(suffix as u64)), + ..Default::default() + }; + async move { + let resp = self + .store + .get_opts(&self.path, options) + .await + .map_err(to_parquet_err)?; + resp.bytes().await.map_err(to_parquet_err) + } + .boxed() + } +} diff --git a/thirdparty/crates/parquet-59.1.0/examples/read_parquet.rs b/thirdparty/crates/parquet-59.2.0/examples/read_parquet.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/examples/read_parquet.rs rename to thirdparty/crates/parquet-59.2.0/examples/read_parquet.rs diff --git a/thirdparty/crates/parquet-59.1.0/examples/read_with_rowgroup.rs b/thirdparty/crates/parquet-59.2.0/examples/read_with_rowgroup.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/examples/read_with_rowgroup.rs rename to thirdparty/crates/parquet-59.2.0/examples/read_with_rowgroup.rs diff --git a/thirdparty/crates/parquet-59.1.0/examples/write_parquet.rs b/thirdparty/crates/parquet-59.2.0/examples/write_parquet.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/examples/write_parquet.rs rename to thirdparty/crates/parquet-59.2.0/examples/write_parquet.rs diff --git a/thirdparty/crates/parquet-59.1.0/pytest/requirements.in b/thirdparty/crates/parquet-59.2.0/pytest/requirements.in similarity index 100% rename from thirdparty/crates/parquet-59.1.0/pytest/requirements.in rename to thirdparty/crates/parquet-59.2.0/pytest/requirements.in diff --git a/thirdparty/crates/parquet-59.1.0/pytest/requirements.txt b/thirdparty/crates/parquet-59.2.0/pytest/requirements.txt similarity index 100% rename from thirdparty/crates/parquet-59.1.0/pytest/requirements.txt rename to thirdparty/crates/parquet-59.2.0/pytest/requirements.txt diff --git a/thirdparty/crates/parquet-59.1.0/pytest/test_parquet_integration.py b/thirdparty/crates/parquet-59.2.0/pytest/test_parquet_integration.py similarity index 69% rename from thirdparty/crates/parquet-59.1.0/pytest/test_parquet_integration.py rename to thirdparty/crates/parquet-59.2.0/pytest/test_parquet_integration.py index e7e6c64b0..4ff016315 100755 --- a/thirdparty/crates/parquet-59.1.0/pytest/test_parquet_integration.py +++ b/thirdparty/crates/parquet-59.2.0/pytest/test_parquet_integration.py @@ -15,8 +15,16 @@ # specific language governing permissions and limitations # under the License. import pyspark.sql -from pyspark.sql.types import StructType, StructField, StringType, IntegerType, LongType +from pyspark.sql.types import ( + ArrayType, + StructType, + StructField, + StringType, + IntegerType, + LongType, +) import pandas as pd +import re from tempfile import NamedTemporaryFile, TemporaryDirectory import subprocess import pathlib @@ -41,6 +49,27 @@ def create_data_and_spark_df(n): return data, df +def create_spark_df_with_arrays(n): + def make_list(x): + return [x for _ in range(8)] + + spark = pyspark.sql.SparkSession.builder.getOrCreate() + data = [ + (f"id-{i % 10}", f"name-{i%10}", make_list(i + 1), make_list(i + 2)) + for i in range(n) + ] + schema = StructType( + [ + StructField("id", StringType(), True), + StructField("name", StringType(), True), + StructField("int32_list", ArrayType(IntegerType()), True), + StructField("int64_list", ArrayType(LongType()), True), + ] + ) + df = spark.createDataFrame(data, schema).repartition(1) + return data, df + + def create_data_and_pandas_df(n): data = [(f"id-{i % 10}", f"name-{i%10}", i * 2, i * 2 + 1) for i in range(n)] df = pd.DataFrame(data, columns=["id", "name", "int32", "int64"]) @@ -85,6 +114,12 @@ def get_show_filter_cli_output(output_dir, col_name, test_values): return subprocess.check_output(args) +def get_index_cli_output(output_dir, col_name): + (parquet_file,) = sorted(pathlib.Path(output_dir).glob("*.parquet")) + args = ["parquet-index", parquet_file, col_name] + return subprocess.check_output(args) + + SCHEMA = b"""message schema { required binary id (UTF8); required binary name (UTF8); @@ -156,3 +191,35 @@ def _test_int64_col_filter(self, output_dir, data): expected_results.append((v[2], False)) cli_output = get_show_filter_cli_output(output_dir, "int64", test_values) assert cli_output == get_expected_output(expected_results) + + +class TestParquetPageIndexIntegration: + @staticmethod + def _assert_cli_output(out, pattern): + normalized = re.sub(r"\s+", " ", out.decode("utf-8")).strip() + if re.search(pattern, normalized): + return + raise AssertionError("Failed to find expected pattern in cli output") + + def test_index(self): + _, df = create_spark_df_with_arrays(10) + with TemporaryDirectory() as output_dir: + df.write.parquet(output_dir, mode="overwrite") + + name_index_expected_pattern = r""" + Page 0 at offset \d+ with length \d+ and row count 10, min id-0, max id-9 + """.strip() + cli_output = get_index_cli_output(output_dir, "id") + self._assert_cli_output(cli_output, name_index_expected_pattern) + + int32_list_index_expected_pattern = r""" + Page 0 at offset \d+ with length \d+ and row count 10, min 1, max 10 + """.strip() + cli_output = get_index_cli_output(output_dir, "int32_list.list.element") + self._assert_cli_output(cli_output, int32_list_index_expected_pattern) + + cli_output = get_index_cli_output(output_dir, "int64_list.list.element") + int64_list_index_expected_pattern = r""" + Page 0 at offset \d+ with length \d+ and row count 10, min 2, max 11 + """.strip() + self._assert_cli_output(cli_output, int64_list_index_expected_pattern) diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/builder.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/builder.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/builder.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/builder.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/byte_array.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/byte_array.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/byte_array.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/byte_array.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/byte_array_dictionary.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/byte_array_dictionary.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/byte_array_dictionary.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/byte_array_dictionary.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/byte_view_array.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/byte_view_array.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/byte_view_array.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/byte_view_array.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/cached_array_reader.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/cached_array_reader.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/cached_array_reader.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/cached_array_reader.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/empty_array.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/empty_array.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/empty_array.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/empty_array.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/fixed_len_byte_array.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/fixed_len_byte_array.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/fixed_len_byte_array.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/fixed_len_byte_array.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/fixed_size_list_array.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/fixed_size_list_array.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/fixed_size_list_array.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/fixed_size_list_array.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/list_array.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/list_array.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/list_array.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/list_array.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/list_view_array.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/list_view_array.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/list_view_array.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/list_view_array.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/map_array.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/map_array.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/map_array.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/map_array.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/mod.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/null_array.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/null_array.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/null_array.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/null_array.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/primitive_array.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/primitive_array.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/primitive_array.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/primitive_array.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/row_group_cache.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/row_group_cache.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/row_group_cache.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/row_group_cache.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/row_group_index.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/row_group_index.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/row_group_index.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/row_group_index.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/row_number.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/row_number.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/row_number.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/row_number.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/struct_array.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/struct_array.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/struct_array.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/struct_array.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/test_util.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/test_util.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/array_reader/test_util.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/array_reader/test_util.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/filter.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/filter.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/filter.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/filter.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/metrics.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/metrics.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/metrics.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/metrics.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/mod.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/mod.rs similarity index 96% rename from thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/mod.rs index 814b82505..2517e892f 100644 --- a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/mod.rs +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/mod.rs @@ -18,11 +18,15 @@ //! Contains reader which reads parquet data into arrow [`RecordBatch`] use arrow_array::cast::AsArray; -use arrow_array::{Array, RecordBatch, RecordBatchReader}; +use arrow_array::{BooleanArray, RecordBatch, RecordBatchReader}; +use arrow_buffer::{BooleanBuffer, BooleanBufferBuilder}; use arrow_schema::{ArrowError, DataType as ArrowType, FieldRef, Schema, SchemaRef}; use arrow_select::filter::filter_record_batch; pub use filter::{ArrowPredicate, ArrowPredicateFn, RowFilter}; -pub use selection::{RowSelection, RowSelectionCursor, RowSelectionPolicy, RowSelector}; +use selection::MaskCursor; +pub use selection::{ + MaskRunIter, RowSelection, RowSelectionCursor, RowSelectionPolicy, RowSelector, +}; use std::fmt::{Debug, Formatter}; use std::sync::Arc; @@ -841,6 +845,44 @@ impl ArrowReaderOptions { } } +impl ParquetMetaDataReader { + /// Applies the metadata related settings from [`ArrowReaderOptions`], + /// such as the [`ParquetMetaDataOptions`], decryption properties, and + /// [`PageIndexPolicy`] to this reader. + /// + /// The page index policies are only applied if at least one of them is not + /// [`PageIndexPolicy::Skip`], so policies previously configured on this + /// reader (e.g. from a preload setting) are preserved when the options do + /// not request the page index. + /// + /// This encodes the canonical way to construct a `ParquetMetaDataReader` + /// inside `AsyncFileReader::get_metadata` (available with the `async` + /// feature), so implementations outside this crate do not need to + /// duplicate it. + pub fn with_arrow_reader_options(mut self, options: Option<&ArrowReaderOptions>) -> Self { + let Some(options) = options else { return self }; + + self = self.with_metadata_options(Some(options.metadata_options().clone())); + + #[cfg(feature = "encryption")] + { + self = self.with_decryption_properties( + options.file_decryption_properties.as_ref().map(Arc::clone), + ); + } + + if options.column_index_policy() != PageIndexPolicy::Skip + || options.offset_index_policy() != PageIndexPolicy::Skip + { + self = self + .with_column_index_policy(options.column_index_policy()) + .with_offset_index_policy(options.offset_index_policy()); + } + + self + } +} + /// The metadata necessary to construct a [`ArrowReaderBuilder`] /// /// Note this structure is cheaply clone-able as it consists of several arcs. @@ -1349,6 +1391,140 @@ pub struct ParquetRecordBatchReader { read_plan: ReadPlan, } +/// Accumulates filter masks for decoded chunks in one logical output batch. +/// +/// The first chunk keeps its [`BooleanBuffer`] without copying. A second chunk +/// promotes the accumulator to a [`BooleanBufferBuilder`], and later chunks are +/// appended to it. For example, chunks `1000` and `1` become `10001`: +/// +/// ```text +/// append(1000) append(1) +/// Empty ───────────────▶ Single ───────────────▶ Combined +/// 1000 10001 +/// (zero copy) (promoted to builder) +/// ``` +/// +/// The combined mask lines up with the rows that [`ArrayReader::read_records`] +/// buffered across the decoded chunks (see [`read_mask_batch`]). Consuming the +/// buffered batch and filtering it with the accumulated mask yields the output. +/// +/// ```text +/// decoded rows: 0 1 2 3 11 <-- buffered by the array reader +/// chunk masks: [1 0 0 0] [1] +/// finish(): 1 0 0 0 1 <-- filters the whole batch in one pass +/// ``` +#[derive(Default)] +enum FilterMaskAccumulator { + #[default] + Empty, + Single(BooleanBuffer), + Combined(BooleanBufferBuilder), +} + +impl FilterMaskAccumulator { + fn append(&mut self, mask: BooleanBuffer) { + *self = match std::mem::take(self) { + Self::Empty => Self::Single(mask), + Self::Single(first) => { + let mut combined = BooleanBufferBuilder::new(first.len() + mask.len()); + combined.append_buffer(&first); + combined.append_buffer(&mask); + Self::Combined(combined) + } + Self::Combined(mut combined) => { + combined.append_buffer(&mask); + Self::Combined(combined) + } + }; + } + + fn finish(self) -> Option { + match self { + Self::Empty => None, + Self::Single(mask) => Some(mask), + Self::Combined(combined) => Some(combined.build()), + } + } +} + +/// Converts the projection buffered by `array_reader` into a record batch. +fn consume_record_batch(array_reader: &mut dyn ArrayReader) -> Result { + let array = array_reader.consume_batch()?; + let struct_array = array.as_struct_opt().ok_or_else(|| { + ArrowError::ParquetError("Struct array reader should return struct array".to_string()) + })?; + Ok(RecordBatch::from(struct_array)) +} + +/// Reads one logical Mask batch, potentially spanning multiple loaded ranges. +/// +/// Each [`MaskCursor`] chunk is safe to decode because it stays within loaded +/// pages. Gaps are crossed with [`ArrayReader::skip_records`], while decoded +/// arrays and their mask fragments remain buffered. Once `batch_size` selected +/// rows have accumulated, this consumes the underlying batch and filters it +/// once with the combined mask. +fn read_mask_batch( + array_reader: &mut dyn ArrayReader, + mask_cursor: &mut MaskCursor, + batch_size: usize, +) -> Result> { + let mut selected_rows = 0; + let mut filter_mask = FilterMaskAccumulator::default(); + + while selected_rows < batch_size && !mask_cursor.is_empty() { + let mask_chunk = mask_cursor.next_chunk(batch_size - selected_rows)?; + + if mask_chunk.initial_skip > 0 { + let skipped = array_reader.skip_records(mask_chunk.initial_skip)?; + if skipped != mask_chunk.initial_skip { + return Err(general_err!( + "failed to skip rows, expected {}, got {}", + mask_chunk.initial_skip, + skipped + )); + } + } + + let mask = mask_cursor.mask_values_for(&mask_chunk)?; + let read = array_reader.read_records(mask_chunk.chunk_rows)?; + if read == 0 { + return Err(general_err!( + "reached end of column while expecting {} rows", + mask_chunk.chunk_rows + )); + } + if read != mask_chunk.chunk_rows { + return Err(general_err!( + "insufficient rows read from array reader - expected {}, got {}", + mask_chunk.chunk_rows, + read + )); + } + + filter_mask.append(mask.values().clone()); + selected_rows += mask_chunk.selected_rows; + } + + if selected_rows == 0 { + return Ok(None); + } + + let filter_mask = filter_mask + .finish() + .ok_or_else(|| general_err!("Internal Error: decoded Mask batch has no filter values"))?; + let batch = consume_record_batch(array_reader)?; + let filtered_batch = filter_record_batch(&batch, &BooleanArray::from(filter_mask))?; + if filtered_batch.num_rows() != selected_rows { + return Err(general_err!( + "filtered rows mismatch selection - expected {}, got {}", + selected_rows, + filtered_batch.num_rows() + )); + } + + Ok(Some(filtered_batch)) +} + impl Debug for ParquetRecordBatchReader { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { f.debug_struct("ParquetRecordBatchReader") @@ -1383,74 +1559,7 @@ impl ParquetRecordBatchReader { } match self.read_plan.row_selection_cursor_mut() { RowSelectionCursor::Mask(mask_cursor) => { - // Stream the record batch reader using contiguous segments of the selection - // mask, avoiding the need to materialize intermediate `RowSelector` ranges. - while !mask_cursor.is_empty() { - let Some(mask_chunk) = mask_cursor.next_mask_chunk(batch_size) else { - return Ok(None); - }; - - if mask_chunk.initial_skip > 0 { - let skipped = self.array_reader.skip_records(mask_chunk.initial_skip)?; - if skipped != mask_chunk.initial_skip { - return Err(general_err!( - "failed to skip rows, expected {}, got {}", - mask_chunk.initial_skip, - skipped - )); - } - } - - if mask_chunk.chunk_rows == 0 { - if mask_cursor.is_empty() && mask_chunk.selected_rows == 0 { - return Ok(None); - } - continue; - } - - let mask = mask_cursor.mask_values_for(&mask_chunk)?; - - let read = self.array_reader.read_records(mask_chunk.chunk_rows)?; - if read == 0 { - return Err(general_err!( - "reached end of column while expecting {} rows", - mask_chunk.chunk_rows - )); - } - if read != mask_chunk.chunk_rows { - return Err(general_err!( - "insufficient rows read from array reader - expected {}, got {}", - mask_chunk.chunk_rows, - read - )); - } - - let array = self.array_reader.consume_batch()?; - // The column reader exposes the projection as a struct array; convert this - // into a record batch before applying the boolean filter mask. - let struct_array = array.as_struct_opt().ok_or_else(|| { - ArrowError::ParquetError( - "Struct array reader should return struct array".to_string(), - ) - })?; - - let filtered_batch = - filter_record_batch(&RecordBatch::from(struct_array), &mask)?; - - if filtered_batch.num_rows() != mask_chunk.selected_rows { - return Err(general_err!( - "filtered rows mismatch selection - expected {}, got {}", - mask_chunk.selected_rows, - filtered_batch.num_rows() - )); - } - - if filtered_batch.num_rows() == 0 { - continue; - } - - return Ok(Some(filtered_batch)); - } + return read_mask_batch(self.array_reader.as_mut(), mask_cursor, batch_size); } RowSelectionCursor::Selectors(selectors_cursor) => { while read_records < batch_size && !selectors_cursor.is_empty() { @@ -1494,15 +1603,11 @@ impl ParquetRecordBatchReader { RowSelectionCursor::All => { self.array_reader.read_records(batch_size)?; } - }; - - let array = self.array_reader.consume_batch()?; - let struct_array = array.as_struct_opt().ok_or_else(|| { - ArrowError::ParquetError("Struct array reader should return struct array".to_string()) - })?; + } - Ok(if struct_array.len() > 0 { - Some(RecordBatch::from(struct_array)) + let batch = consume_record_batch(self.array_reader.as_mut())?; + Ok(if batch.num_rows() > 0 { + Some(batch) } else { None }) @@ -1623,7 +1728,7 @@ pub(crate) mod tests { Time64MicrosecondType, }; use arrow_array::*; - use arrow_buffer::{ArrowNativeType, Buffer, IntervalDayTime, NullBuffer, i256}; + use arrow_buffer::{ArrowNativeType, BooleanBuffer, Buffer, IntervalDayTime, NullBuffer, i256}; use arrow_data::{ArrayData, ArrayDataBuilder}; use arrow_schema::{DataType as ArrowDataType, Field, Fields, Schema, SchemaRef, TimeUnit}; use arrow_select::concat::concat_batches; @@ -1631,6 +1736,28 @@ pub(crate) mod tests { use half::f16; use num_traits::PrimInt; + #[test] + fn filter_mask_accumulator_handles_empty_single_and_multiple_chunks() { + let first = BooleanBuffer::from(vec![true, false, false, false]); + let second = BooleanBuffer::from(vec![true]); + let third = BooleanBuffer::from(vec![false, true]); + + assert!(super::FilterMaskAccumulator::default().finish().is_none()); + + let mut single = super::FilterMaskAccumulator::default(); + single.append(first.clone()); + assert_eq!(single.finish().unwrap(), first); + + let mut combined = super::FilterMaskAccumulator::default(); + combined.append(BooleanBuffer::from(vec![true, false, false, false])); + combined.append(second); + combined.append(third); + assert_eq!( + combined.finish().unwrap(), + BooleanBuffer::from(vec![true, false, false, false, true, false, true]) + ); + } + #[test] fn test_arrow_reader_all_columns() { let file = get_test_file("parquet/generated_simple_numerics/blogs.parquet"); diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/read_plan.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/read_plan.rs similarity index 64% rename from thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/read_plan.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/read_plan.rs index 3d80526c8..04f132e1b 100644 --- a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/read_plan.rs +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/read_plan.rs @@ -19,16 +19,18 @@ //! from a Parquet file use crate::arrow::array_reader::ArrayReader; -use crate::arrow::arrow_reader::selection::RowSelectionPolicy; -use crate::arrow::arrow_reader::selection::RowSelectionStrategy; +use crate::arrow::arrow_reader::selection::{ + LoadedRowRanges, RowSelectionInner, RowSelectionPolicy, RowSelectionStrategy, mask_to_selectors, +}; use crate::arrow::arrow_reader::{ ArrowPredicate, ParquetRecordBatchReader, RowSelection, RowSelectionCursor, RowSelector, }; use crate::errors::{ParquetError, Result}; use arrow_array::{Array, BooleanArray}; -use arrow_buffer::BooleanBuffer; +use arrow_buffer::{BooleanBuffer, BooleanBufferBuilder}; use arrow_select::filter::prep_null_mask_filter; use std::collections::VecDeque; +use std::sync::Arc; /// Options for [`ReadPlanBuilder::with_predicate_options`]. pub struct PredicateOptions<'a> { @@ -84,6 +86,8 @@ pub struct ReadPlanBuilder { selection: Option, /// Policy to use when materializing the row selection row_selection_policy: RowSelectionPolicy, + /// Row ranges with page data loaded for the current projection. + loaded_row_ranges: Option>, } impl ReadPlanBuilder { @@ -93,6 +97,7 @@ impl ReadPlanBuilder { batch_size, selection: None, row_selection_policy: RowSelectionPolicy::default(), + loaded_row_ranges: None, } } @@ -110,6 +115,11 @@ impl ReadPlanBuilder { self } + pub(crate) fn with_loaded_row_ranges(mut self, ranges: Option) -> Self { + self.loaded_row_ranges = ranges.map(Arc::new); + self + } + /// Returns the current row selection policy pub fn row_selection_policy(&self) -> &RowSelectionPolicy { &self.row_selection_policy @@ -157,26 +167,7 @@ impl ReadPlanBuilder { None => return RowSelectionStrategy::Selectors, }; - // total_rows: total number of rows selected / skipped - // effective_count: number of non-empty selectors - let (total_rows, effective_count) = - selection.iter().fold((0usize, 0usize), |(rows, count), s| { - if s.row_count > 0 { - (rows + s.row_count, count + 1) - } else { - (rows, count) - } - }); - - if effective_count == 0 { - return RowSelectionStrategy::Mask; - } - - if total_rows < effective_count.saturating_mul(threshold) { - RowSelectionStrategy::Mask - } else { - RowSelectionStrategy::Selectors - } + selection.auto_selection_strategy(threshold) } } } @@ -275,14 +266,23 @@ impl ReadPlanBuilder { } } - // If the predicate selected all rows and there is no prior selection, - // skip creating a RowSelection entirely — this avoids the allocation - // and keeps selection as None which enables coalesced page fetches. + // If the predicate selected all rows, applying it is a no-op. With no + // prior selection this keeps selection as None, enabling coalesced page + // fetches; with a prior selection it avoids rebuilding the same + // selection. let all_selected = filters.iter().all(|f| f.true_count() == f.len()); - if all_selected && self.selection.is_none() { + if all_selected { return Ok(self); } - let raw = RowSelection::from_filters(&filters); + let raw = if self + .selection + .as_ref() + .is_some_and(|s| s.as_mask().is_some()) + { + RowSelection::from_boolean_buffer(filters_to_boolean_buffer(&filters)) + } else { + RowSelection::from_filters(&filters) + }; self.selection = match self.selection.take() { Some(selection) => Some(selection.and_then(&raw)), None => Some(raw), @@ -304,21 +304,11 @@ impl ReadPlanBuilder { batch_size, selection, row_selection_policy: _, + loaded_row_ranges, } = self; - let selection = selection.map(|s| s.trim()); - let row_selection_cursor = selection - .map(|s| { - let trimmed = s.trim(); - let selectors: Vec = trimmed.into(); - match selection_strategy { - RowSelectionStrategy::Mask => { - RowSelectionCursor::new_mask_from_selectors(selectors) - } - RowSelectionStrategy::Selectors => RowSelectionCursor::new_selectors(selectors), - } - }) + .map(|s| build_cursor(s.trim(), selection_strategy, loaded_row_ranges)) .unwrap_or(RowSelectionCursor::new_all()); ReadPlan { @@ -328,6 +318,28 @@ impl ReadPlanBuilder { } } +/// Lower a [`RowSelection`] to the cursor form requested by the resolved strategy. +fn build_cursor( + selection: RowSelection, + strategy: RowSelectionStrategy, + loaded_row_ranges: Option>, +) -> RowSelectionCursor { + match (strategy, selection.into_inner()) { + (RowSelectionStrategy::Mask, RowSelectionInner::Mask(mask)) => { + RowSelectionCursor::new_mask_from_buffer((*mask).into_mask(), loaded_row_ranges) + } + (RowSelectionStrategy::Mask, RowSelectionInner::Selectors(selectors)) => { + RowSelectionCursor::new_mask_from_selectors(selectors, loaded_row_ranges) + } + (RowSelectionStrategy::Selectors, RowSelectionInner::Selectors(selectors)) => { + RowSelectionCursor::new_selectors(selectors) + } + (RowSelectionStrategy::Selectors, RowSelectionInner::Mask(mask)) => { + RowSelectionCursor::new_selectors(mask_to_selectors(mask.mask())) + } + } +} + /// Builder for [`ReadPlan`] that applies a limit and offset to the read plan /// /// See [`ReadPlanBuilder::limited`] to create this builder. @@ -413,6 +425,16 @@ impl LimitedReadPlanBuilder { } } +fn filters_to_boolean_buffer(filters: &[BooleanArray]) -> BooleanBuffer { + let total_rows = filters.iter().map(|f| f.len()).sum(); + let mut builder = BooleanBufferBuilder::new(total_rows); + for filter in filters { + assert_eq!(filter.null_count(), 0); + builder.append_buffer(filter.values()); + } + builder.finish() +} + /// A plan reading specific rows from a Parquet Row Group. /// /// See [`ReadPlanBuilder`] to create `ReadPlan`s @@ -476,6 +498,168 @@ mod tests { ); } + #[test] + fn preferred_selection_strategy_handles_dense_mask_backing() { + let bits: Vec<_> = (0..16).map(|i| i % 2 == 0).collect(); + let selection = RowSelection::from_boolean_buffer(BooleanBuffer::from(bits)); + let builder = builder_with_selection(selection) + .with_row_selection_policy(RowSelectionPolicy::Auto { threshold: 4 }); + assert_eq!( + builder.resolve_selection_strategy(), + RowSelectionStrategy::Mask + ); + } + + #[test] + fn preferred_selection_strategy_handles_sparse_mask_backing() { + let bits: Vec<_> = (0..128).map(|i| i < 64).collect(); + let selection = RowSelection::from_boolean_buffer(BooleanBuffer::from(bits)); + let builder = builder_with_selection(selection) + .with_row_selection_policy(RowSelectionPolicy::Auto { threshold: 32 }); + assert_eq!( + builder.resolve_selection_strategy(), + RowSelectionStrategy::Selectors + ); + } + + #[test] + fn preferred_selection_strategy_preserves_mask_threshold_boundaries() { + let mask = BooleanBuffer::from(vec![true; 8]); + + let empty = builder_with_selection(RowSelection::from_boolean_buffer( + BooleanBuffer::new_unset(0), + )); + assert_eq!( + empty.resolve_selection_strategy(), + RowSelectionStrategy::Mask + ); + + let disabled = builder_with_selection(RowSelection::from_boolean_buffer(mask.clone())) + .with_row_selection_policy(RowSelectionPolicy::Auto { threshold: 0 }); + assert_eq!( + disabled.resolve_selection_strategy(), + RowSelectionStrategy::Selectors + ); + + // Equality does not satisfy the policy's strict inequality: 8 < 1 * 8. + let equal = builder_with_selection(RowSelection::from_boolean_buffer(mask.clone())) + .with_row_selection_policy(RowSelectionPolicy::Auto { threshold: 8 }); + assert_eq!( + equal.resolve_selection_strategy(), + RowSelectionStrategy::Selectors + ); + + let above = builder_with_selection(RowSelection::from_boolean_buffer(mask)) + .with_row_selection_policy(RowSelectionPolicy::Auto { threshold: 9 }); + assert_eq!( + above.resolve_selection_strategy(), + RowSelectionStrategy::Mask + ); + } + + #[test] + fn preferred_selection_strategy_mask_matches_selector_backing() { + use rand::{Rng, rng}; + + let mut rand = rng(); + for _ in 0..200 { + let len = rand.random_range(0..256); + let bits: Vec<_> = (0..len).map(|_| rand.random_bool(0.5)).collect(); + let mask_backed = RowSelection::from_boolean_buffer(BooleanBuffer::from(bits.clone())); + let selector_backed = RowSelection::from_filters(&[BooleanArray::from(bits)]); + + for threshold in [0, 1, 2, 8, 32, 64, usize::MAX] { + assert_eq!( + mask_backed.auto_selection_strategy(threshold), + selector_backed.auto_selection_strategy(threshold), + "strategy differs for len {len} and threshold {threshold}" + ); + } + } + } + + #[test] + fn mask_plan_trims_trailing_skips_before_chunking() { + let mut plan = ReadPlanBuilder::new(8) + .with_selection(Some(RowSelection::from(vec![ + RowSelector::select(1), + RowSelector::skip(7), + ]))) + .with_row_selection_policy(RowSelectionPolicy::Mask) + .build(); + let RowSelectionCursor::Mask(cursor) = plan.row_selection_cursor_mut() else { + panic!("expected a Mask cursor"); + }; + + let chunk = cursor.next_chunk(8).unwrap(); + assert_eq!(chunk.chunk_rows, 1); + assert_eq!(chunk.selected_rows, 1); + assert!(cursor.is_empty()); + } + + #[test] + fn selectors_policy_lowers_mask_backed_selection() { + let selection = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![ + true, false, false, true, true, + ])); + let mut plan = ReadPlanBuilder::new(4) + .with_selection(Some(selection)) + .with_row_selection_policy(RowSelectionPolicy::Selectors) + .build(); + let RowSelectionCursor::Selectors(cursor) = plan.row_selection_cursor_mut() else { + panic!("expected a Selectors cursor"); + }; + + assert_eq!(cursor.next_selector(), RowSelector::select(1)); + assert_eq!(cursor.next_selector(), RowSelector::skip(2)); + assert_eq!(cursor.next_selector(), RowSelector::select(2)); + assert!(cursor.is_empty()); + } + + #[test] + fn mask_backed_plan_respects_loaded_row_ranges() { + // Start from a non-byte-aligned BooleanBuffer::slice so the mask-backed + // cursor path (new_mask_from_buffer) is exercised with a bit offset. + // Rows 0 and 11 of 12 are selected; pages for rows [4, 10) are unloaded. + let mut bits = vec![false; 5]; + bits.push(true); // row 0 + bits.extend(std::iter::repeat_n(false, 10)); // rows 1..=10 + bits.push(true); // row 11 + bits.extend([true, false, true]); // trailing padding outside the slice + let mask = BooleanBuffer::from(bits).slice(5, 12); + let selection = RowSelection::from_boolean_buffer(mask); + assert!(selection.as_mask().is_some()); + + let loaded = LoadedRowRanges::from_selection(RowSelection::from(vec![ + RowSelector::select(4), + RowSelector::skip(6), + RowSelector::select(2), + ])); + + let mut plan = ReadPlanBuilder::new(12) + .with_selection(Some(selection)) + .with_row_selection_policy(RowSelectionPolicy::Mask) + .with_loaded_row_ranges(Some(loaded)) + .build(); + let RowSelectionCursor::Mask(cursor) = plan.row_selection_cursor_mut() else { + panic!("expected a Mask cursor"); + }; + + // The first chunk must end at the loaded range boundary (row 4), not + // continue into the unloaded gap. + let first = cursor.next_chunk(12).unwrap(); + assert_eq!(first.initial_skip, 0); + assert_eq!(first.chunk_rows, 4); + assert_eq!(first.selected_rows, 1); + + // The second chunk skips the gap and decodes only within [10, 12). + let second = cursor.next_chunk(12).unwrap(); + assert_eq!(second.initial_skip, 7); + assert_eq!(second.chunk_rows, 1); + assert_eq!(second.selected_rows, 1); + assert!(cursor.is_empty()); + } + #[test] fn with_predicate_options_limit_pads_tail_when_no_prior_selection() { use crate::arrow::ProjectionMask; @@ -528,6 +712,50 @@ mod tests { ); } + #[test] + fn with_predicate_options_preserves_mask_selection() { + use crate::arrow::ProjectionMask; + use crate::arrow::array_reader::StructArrayReader; + use crate::arrow::array_reader::test_util::make_int32_page_reader; + use crate::arrow::arrow_reader::ArrowPredicateFn; + use arrow_schema::{DataType as ArrowType, Field, Fields}; + + let data: Vec = (0..6).collect(); + let levels = vec![0; data.len()]; + let leaf = make_int32_page_reader(&data, &levels, &levels, 0, 0, None); + let struct_type = ArrowType::Struct(Fields::from(vec![Field::new( + "c0", + ArrowType::Int32, + false, + )])); + let struct_reader = StructArrayReader::new(struct_type, vec![leaf], 0, 0, false, None); + + let prior = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![ + true, false, true, true, false, true, + ])); + let mut filters = vec![BooleanArray::from(vec![true, false, true, false])]; + let mut predicate = ArrowPredicateFn::new(ProjectionMask::all(), move |batch| { + assert_eq!(batch.num_rows(), 4); + Ok(filters.remove(0)) + }); + + let builder = ReadPlanBuilder::new(16) + .with_selection(Some(prior)) + .with_predicate_options(PredicateOptions::new( + Box::new(struct_reader), + &mut predicate, + )) + .unwrap(); + + let selection = builder.selection().unwrap(); + assert!(selection.as_mask().is_some()); + + let expected = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![ + true, false, false, true, false, false, + ])); + assert_eq!(selection, &expected); + } + #[test] fn with_predicate_options_limit_handles_null_filters() { use crate::arrow::ProjectionMask; diff --git a/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/algebra.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/algebra.rs new file mode 100644 index 000000000..9c25afbd3 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/algebra.rs @@ -0,0 +1,828 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +//! Set algebra backing [`RowSelection::and_then`], [`RowSelection::intersection`] +//! and [`RowSelection::union`] +//! +//! Each operation has two implementations, picked by the backing of its +//! operands: a merge of the [`RowSelector`] runs, and a bitwise variant over +//! [`BooleanBuffer`] masks. + +use super::{MaskRunIter, RowSelection, RowSelectionInner, RowSelector}; +use arrow_buffer::{BooleanBuffer, BooleanBufferBuilder}; +use std::cmp::Ordering; +use std::iter::Peekable; + +/// Applies `second` to the rows selected by `first`, both selector-backed. +pub(super) fn and_then_row_selections( + first: &[RowSelector], + second: &[RowSelector], +) -> RowSelection { + let mut selectors = vec![]; + let mut first = first.iter().copied().peekable(); + let mut second = second.iter().copied().peekable(); + and_then_iter(&mut selectors, &mut first, &mut second); + RowSelection::from_selectors(selectors) +} + +/// Applies the mask `second` to the rows selected by the selector-backed `first`. +/// +/// The mask is streamed as [`RowSelector`] runs, so it is never materialized. +pub(super) fn and_then_selectors_with_mask( + first: &[RowSelector], + second: &BooleanBuffer, +) -> RowSelection { + let mut selectors = vec![]; + let mut first = first.iter().copied().peekable(); + let mut second = MaskRunIter::new(second).peekable(); + and_then_iter(&mut selectors, &mut first, &mut second); + RowSelection::from_selectors(selectors) +} + +fn and_then_iter( + selectors: &mut Vec, + first: &mut Peekable, + second: &mut Peekable, +) where + I: Iterator, + J: Iterator, +{ + let mut to_skip = 0; + while let Some(b) = second.peek_mut() { + let a = first + .peek_mut() + .expect("selection exceeds the number of selected rows"); + + if b.row_count == 0 { + second.next().unwrap(); + continue; + } + + if a.row_count == 0 { + first.next().unwrap(); + continue; + } + + if a.skip { + // Records were skipped when producing second + to_skip += a.row_count; + first.next().unwrap(); + continue; + } + + let skip = b.skip; + let to_process = a.row_count.min(b.row_count); + + a.row_count -= to_process; + b.row_count -= to_process; + + match skip { + true => to_skip += to_process, + false => { + if to_skip != 0 { + selectors.push(RowSelector::skip(to_skip)); + to_skip = 0; + } + selectors.push(RowSelector::select(to_process)) + } + } + } + + for v in first { + if v.row_count != 0 { + assert!( + v.skip, + "selection contains less than the number of selected rows" + ); + to_skip += v.row_count + } + } + + if to_skip != 0 { + selectors.push(RowSelector::skip(to_skip)); + } +} + +/// Combine two lists of `RowSelection` return the intersection of them +/// For example: +/// self: NNYYYYNNYYNYN +/// other: NYNNNNNNY +/// +/// returned: NNNNNNNNYYNYN +pub(super) fn intersect_row_selections( + left: &[RowSelector], + right: &[RowSelector], +) -> RowSelection { + let mut l_iter = left.iter().copied().peekable(); + let mut r_iter = right.iter().copied().peekable(); + + let iter = std::iter::from_fn(move || { + loop { + let l = l_iter.peek_mut(); + let r = r_iter.peek_mut(); + + match (l, r) { + (Some(a), _) if a.row_count == 0 => { + l_iter.next().unwrap(); + } + (_, Some(b)) if b.row_count == 0 => { + r_iter.next().unwrap(); + } + (Some(l), Some(r)) => { + return match (l.skip, r.skip) { + // Keep both ranges + (false, false) => { + if l.row_count < r.row_count { + r.row_count -= l.row_count; + l_iter.next() + } else { + l.row_count -= r.row_count; + r_iter.next() + } + } + // skip at least one + _ => { + if l.row_count < r.row_count { + let skip = l.row_count; + r.row_count -= l.row_count; + l_iter.next(); + Some(RowSelector::skip(skip)) + } else { + let skip = r.row_count; + l.row_count -= skip; + r_iter.next(); + Some(RowSelector::skip(skip)) + } + } + }; + } + (Some(_), None) => return l_iter.next(), + (None, Some(_)) => return r_iter.next(), + (None, None) => return None, + } + } + }); + + iter.collect() +} + +/// Combine two lists of `RowSelector` return the union of them +/// For example: +/// self: NNYYYYNNYYNYN +/// other: NYNNNNNNY +/// +/// returned: NYYYYYNNYYNYN +/// +/// This can be removed from here once RowSelection::union is in parquet::arrow +pub(super) fn union_row_selections(left: &[RowSelector], right: &[RowSelector]) -> RowSelection { + let mut l_iter = left.iter().copied().peekable(); + let mut r_iter = right.iter().copied().peekable(); + + let iter = std::iter::from_fn(move || { + loop { + let l = l_iter.peek_mut(); + let r = r_iter.peek_mut(); + + match (l, r) { + (Some(a), _) if a.row_count == 0 => { + l_iter.next().unwrap(); + } + (_, Some(b)) if b.row_count == 0 => { + r_iter.next().unwrap(); + } + (Some(l), Some(r)) => { + return match (l.skip, r.skip) { + // Skip both ranges + (true, true) => { + if l.row_count < r.row_count { + let skip = l.row_count; + r.row_count -= l.row_count; + l_iter.next(); + Some(RowSelector::skip(skip)) + } else { + let skip = r.row_count; + l.row_count -= skip; + r_iter.next(); + Some(RowSelector::skip(skip)) + } + } + // Keep rows from left + (false, true) => { + if l.row_count < r.row_count { + r.row_count -= l.row_count; + l_iter.next() + } else { + let r_row_count = r.row_count; + l.row_count -= r_row_count; + r_iter.next(); + Some(RowSelector::select(r_row_count)) + } + } + // Keep rows from right + (true, false) => { + if l.row_count < r.row_count { + let l_row_count = l.row_count; + r.row_count -= l_row_count; + l_iter.next(); + Some(RowSelector::select(l_row_count)) + } else { + l.row_count -= r.row_count; + r_iter.next() + } + } + // Keep at least one + _ => { + if l.row_count < r.row_count { + r.row_count -= l.row_count; + l_iter.next() + } else { + l.row_count -= r.row_count; + r_iter.next() + } + } + }; + } + (Some(_), None) => return l_iter.next(), + (None, Some(_)) => return r_iter.next(), + (None, None) => return None, + } + } + }); + + iter.collect() +} + +/// Bitwise AND of two mask-backed selections. Longer side's tail passes through. +pub(super) fn intersect_masks(l: &BooleanBuffer, r: &BooleanBuffer) -> BooleanBuffer { + if l.len() == r.len() { + return l & r; + } + let common = l.len().min(r.len()); + let head = &l.slice(0, common) & &r.slice(0, common); + let (longer, longer_len) = if l.len() > r.len() { + (l, l.len()) + } else { + (r, r.len()) + }; + let tail = longer.slice(common, longer_len - common); + let mut builder = BooleanBufferBuilder::new(longer_len); + builder.append_buffer(&head); + builder.append_buffer(&tail); + builder.finish() +} + +/// Bitwise OR of two mask-backed selections. Longer side's tail passes through. +pub(super) fn union_masks(l: &BooleanBuffer, r: &BooleanBuffer) -> BooleanBuffer { + if l.len() == r.len() { + return l | r; + } + let common = l.len().min(r.len()); + let head = &l.slice(0, common) | &r.slice(0, common); + let (longer, longer_len) = if l.len() > r.len() { + (l, l.len()) + } else { + (r, r.len()) + }; + let tail = longer.slice(common, longer_len - common); + let mut builder = BooleanBufferBuilder::new(longer_len); + builder.append_buffer(&head); + builder.append_buffer(&tail); + builder.finish() +} + +/// Applies `other` to the selected rows of `mask`, preserving the original row domain. +pub(super) fn and_then_mask(mask: &BooleanBuffer, other: &RowSelection) -> BooleanBuffer { + match &other.inner { + RowSelectionInner::Mask(other_mask) => and_then_masks(mask, other_mask.mask()), + RowSelectionInner::Selectors(selectors) => { + and_then_mask_from_selectors(mask, selectors.iter().copied()) + } + } +} + +fn and_then_mask_from_selectors(mask: &BooleanBuffer, other: I) -> BooleanBuffer +where + I: IntoIterator, +{ + let mut builder = BooleanBufferBuilder::new(mask.len()); + let mut other_iter = other.into_iter(); + let mut current = other_iter.next(); + let mut cursor = 0usize; + + // Iterate only over the set positions in `mask`; the gaps of unset bits + // are filled in bulk with `append_n` instead of bit-by-bit. + for set_idx in mask.set_indices() { + if set_idx > cursor { + builder.append_n(set_idx - cursor, false); + } + cursor = set_idx + 1; + + while current.as_ref().is_some_and(|s| s.row_count == 0) { + current = other_iter.next(); + } + let selector = current + .as_mut() + .expect("selection contains less than the number of selected rows"); + let selected = !selector.skip; + selector.row_count -= 1; + builder.append(selected); + } + if cursor < mask.len() { + builder.append_n(mask.len() - cursor, false); + } + + if current.is_some_and(|s| s.row_count != 0) || other_iter.any(|s| s.row_count != 0) { + panic!("selection exceeds the number of selected rows"); + } + + builder.finish() +} + +fn and_then_masks(mask: &BooleanBuffer, other: &BooleanBuffer) -> BooleanBuffer { + let selected_count = mask.count_set_bits(); + match other.len().cmp(&selected_count) { + Ordering::Less => panic!("selection contains less than the number of selected rows"), + Ordering::Greater => panic!("selection exceeds the number of selected rows"), + Ordering::Equal => {} + } + + let other_true_count = other.count_set_bits(); + if other_true_count == 0 { + return BooleanBuffer::new_unset(mask.len()); + } + if other_true_count == selected_count { + return mask.clone(); + } + + let mut builder = BooleanBufferBuilder::new(mask.len()); + let mut outer_set_indices = mask.set_indices(); + let mut next_selected_ordinal = 0usize; + let mut cursor = 0usize; + + for selected_ordinal in other.set_indices() { + let skip = selected_ordinal - next_selected_ordinal; + let set_idx = outer_set_indices + .nth(skip) + .expect("validated other length matches selected row count"); + if set_idx > cursor { + builder.append_n(set_idx - cursor, false); + } + builder.append(true); + cursor = set_idx + 1; + next_selected_ordinal = selected_ordinal + 1; + } + + if cursor < mask.len() { + builder.append_n(mask.len() - cursor, false); + } + + builder.finish() +} + +#[cfg(test)] +mod tests { + use super::*; + use arrow_array::BooleanArray; + use rand::{Rng, rng}; + + #[test] + fn test_and() { + let mut a = RowSelection::from(vec![ + RowSelector::skip(12), + RowSelector::select(23), + RowSelector::skip(3), + RowSelector::select(5), + ]); + + let b = RowSelection::from(vec![ + RowSelector::select(5), + RowSelector::skip(4), + RowSelector::select(15), + RowSelector::skip(4), + ]); + + let mut expected = RowSelection::from(vec![ + RowSelector::skip(12), + RowSelector::select(5), + RowSelector::skip(4), + RowSelector::select(14), + RowSelector::skip(3), + RowSelector::select(1), + RowSelector::skip(4), + ]); + + assert_eq!(a.and_then(&b), expected); + + a.split_off(7); + expected.split_off(7); + assert_eq!(a.and_then(&b), expected); + + let a = RowSelection::from(vec![RowSelector::select(5), RowSelector::skip(3)]); + + let b = RowSelection::from(vec![ + RowSelector::select(2), + RowSelector::skip(1), + RowSelector::select(1), + RowSelector::skip(1), + ]); + + assert_eq!( + a.and_then(&b).selectors(), + vec![ + RowSelector::select(2), + RowSelector::skip(1), + RowSelector::select(1), + RowSelector::skip(4) + ] + ); + } + + #[test] + #[should_panic(expected = "selection exceeds the number of selected rows")] + fn test_and_longer() { + let a = RowSelection::from(vec![ + RowSelector::select(3), + RowSelector::skip(33), + RowSelector::select(3), + RowSelector::skip(33), + ]); + let b = RowSelection::from(vec![RowSelector::select(36)]); + a.and_then(&b); + } + + #[test] + #[should_panic(expected = "selection contains less than the number of selected rows")] + fn test_and_shorter() { + let a = RowSelection::from(vec![ + RowSelector::select(3), + RowSelector::skip(33), + RowSelector::select(3), + RowSelector::skip(33), + ]); + let b = RowSelection::from(vec![RowSelector::select(3)]); + a.and_then(&b); + } + + #[test] + fn test_intersect_row_selection_and_combine() { + // a size equal b size + let a = vec![ + RowSelector::select(5), + RowSelector::skip(4), + RowSelector::select(1), + ]; + let b = vec![ + RowSelector::select(8), + RowSelector::skip(1), + RowSelector::select(1), + ]; + + let res = intersect_row_selections(&a, &b); + assert_eq!( + res.selectors(), + vec![ + RowSelector::select(5), + RowSelector::skip(4), + RowSelector::select(1), + ], + ); + + // a size larger than b size + let a = vec![ + RowSelector::select(3), + RowSelector::skip(33), + RowSelector::select(3), + RowSelector::skip(33), + ]; + let b = vec![RowSelector::select(36), RowSelector::skip(36)]; + let res = intersect_row_selections(&a, &b); + assert_eq!( + res.selectors(), + vec![RowSelector::select(3), RowSelector::skip(69)] + ); + + // a size less than b size + let a = vec![RowSelector::select(3), RowSelector::skip(7)]; + let b = vec![ + RowSelector::select(2), + RowSelector::skip(2), + RowSelector::select(2), + RowSelector::skip(2), + RowSelector::select(2), + ]; + let res = intersect_row_selections(&a, &b); + assert_eq!( + res.selectors(), + vec![RowSelector::select(2), RowSelector::skip(8)] + ); + + let a = vec![RowSelector::select(3), RowSelector::skip(7)]; + let b = vec![ + RowSelector::select(2), + RowSelector::skip(2), + RowSelector::select(2), + RowSelector::skip(2), + RowSelector::select(2), + ]; + let res = intersect_row_selections(&a, &b); + assert_eq!( + res.selectors(), + vec![RowSelector::select(2), RowSelector::skip(8)] + ); + } + + #[test] + fn test_and_fuzz() { + let mut rand = rng(); + for _ in 0..100 { + let a_len = rand.random_range(10..100); + let a_bools: Vec<_> = (0..a_len).map(|_| rand.random_bool(0.2)).collect(); + let a = RowSelection::from_filters(&[BooleanArray::from(a_bools.clone())]); + + let b_len: usize = a_bools.iter().map(|x| *x as usize).sum(); + let b_bools: Vec<_> = (0..b_len).map(|_| rand.random_bool(0.8)).collect(); + let b = RowSelection::from_filters(&[BooleanArray::from(b_bools.clone())]); + + let mut expected_bools = vec![false; a_len]; + + let mut iter_b = b_bools.iter(); + for (idx, b) in a_bools.iter().enumerate() { + if *b && *iter_b.next().unwrap() { + expected_bools[idx] = true; + } + } + + let expected = RowSelection::from_filters(&[BooleanArray::from(expected_bools)]); + + let total_rows: usize = expected.selectors().iter().map(|s| s.row_count).sum(); + assert_eq!(a_len, total_rows); + + assert_eq!(a.and_then(&b), expected); + } + } + + #[test] + fn test_intersection() { + let selection = RowSelection::from(vec![RowSelector::select(1048576)]); + let result = selection.intersection(&selection); + assert_eq!(result, selection); + + let a = RowSelection::from(vec![ + RowSelector::skip(10), + RowSelector::select(10), + RowSelector::skip(10), + RowSelector::select(20), + ]); + + let b = RowSelection::from(vec![ + RowSelector::skip(20), + RowSelector::select(20), + RowSelector::skip(10), + ]); + + let result = a.intersection(&b); + assert_eq!( + result.selectors(), + vec![ + RowSelector::skip(30), + RowSelector::select(10), + RowSelector::skip(10) + ] + ); + } + + #[test] + fn test_union() { + let selection = RowSelection::from(vec![RowSelector::select(1048576)]); + let result = selection.union(&selection); + assert_eq!(result, selection); + + // NYNYY + let a = RowSelection::from(vec![ + RowSelector::skip(10), + RowSelector::select(10), + RowSelector::skip(10), + RowSelector::select(20), + ]); + + // NNYYNYN + let b = RowSelection::from(vec![ + RowSelector::skip(20), + RowSelector::select(20), + RowSelector::skip(10), + RowSelector::select(10), + RowSelector::skip(10), + ]); + + let result = a.union(&b); + + // NYYYYYN + assert_eq!( + result.iter().copied().collect::>(), + vec![ + RowSelector::skip(10), + RowSelector::select(50), + RowSelector::skip(10), + ] + ); + } + + #[test] + fn test_mask_and_then_preserves_backing() { + let outer_bits = vec![false, true, true, false, true, false, true]; + let inner_bits = vec![true, false, true, false]; + let outer_mask = RowSelection::from_boolean_buffer(BooleanBuffer::from(outer_bits.clone())); + let inner = RowSelection::from_filters(&[BooleanArray::from(inner_bits.clone())]); + + let result = outer_mask.and_then(&inner); + assert!(result.as_mask().is_some()); + + let outer_selectors = RowSelection::from_filters(&[BooleanArray::from(outer_bits)]); + let expected = outer_selectors.and_then(&inner); + assert_eq!(result, expected); + + let result_mask = result.as_mask().unwrap(); + let actual_bits: Vec<_> = (0..result_mask.len()) + .map(|i| result_mask.value(i)) + .collect(); + assert_eq!( + actual_bits, + vec![false, true, false, false, true, false, false] + ); + } + + #[test] + fn test_mask_and_then_mask_preserves_backing() { + let outer_bits = vec![false, true, true, false, true, false, true, true]; + let inner_bits = vec![false, true, false, true, false]; + let outer_mask = RowSelection::from_boolean_buffer(BooleanBuffer::from(outer_bits.clone())); + let inner_mask = RowSelection::from_boolean_buffer(BooleanBuffer::from(inner_bits)); + + let result = outer_mask.and_then(&inner_mask); + assert!(result.as_mask().is_some()); + + let outer_selectors = RowSelection::from_filters(&[BooleanArray::from(outer_bits)]); + let inner_selectors = RowSelection::from_filters(&[BooleanArray::from(vec![ + false, true, false, true, false, + ])]); + assert_eq!(result, outer_selectors.and_then(&inner_selectors)); + + let result_mask = result.as_mask().unwrap(); + let actual_bits: Vec<_> = (0..result_mask.len()) + .map(|i| result_mask.value(i)) + .collect(); + assert_eq!( + actual_bits, + vec![false, false, true, false, false, false, true, false] + ); + } + + #[test] + fn test_selector_and_then_mask() { + let outer = + RowSelection::from_filters(&[BooleanArray::from(vec![false, true, true, false, true])]); + let inner = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![true, false, true])); + + let result = outer.and_then(&inner); + assert!(result.as_mask().is_none()); + assert_eq!( + result, + RowSelection::from_filters(&[BooleanArray::from(vec![ + false, true, false, false, true, + ])]) + ); + } + + #[test] + fn test_mask_and_then_none_selected_returns_all_unset() { + let outer = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![ + false, true, true, false, true, + ])); + let inner = + RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![false, false, false])); + + let result = outer.and_then(&inner); + let mask = result.as_mask().unwrap(); + assert_eq!(mask.len(), 5); + assert_eq!(mask.count_set_bits(), 0); + } + + #[test] + fn test_mask_intersection_uses_bitwise() { + let a_bits = vec![true, true, false, true, false, true]; + let b_bits = vec![true, false, true, true, true, false]; + let a = RowSelection::from_boolean_buffer(BooleanBuffer::from(a_bits.clone())); + let b = RowSelection::from_boolean_buffer(BooleanBuffer::from(b_bits.clone())); + + let r = a.intersection(&b); + assert!(r.as_mask().is_some()); + + let expected: Vec = a_bits.iter().zip(&b_bits).map(|(x, y)| *x && *y).collect(); + let expected_sel = RowSelection::from_filters(&[BooleanArray::from(expected)]); + assert_eq!(r, expected_sel); + } + + #[test] + fn test_mask_union_uses_bitwise() { + let a_bits = vec![true, false, false, true, false, false]; + let b_bits = vec![false, true, false, false, true, false]; + let a = RowSelection::from_boolean_buffer(BooleanBuffer::from(a_bits.clone())); + let b = RowSelection::from_boolean_buffer(BooleanBuffer::from(b_bits.clone())); + + let r = a.union(&b); + assert!(r.as_mask().is_some()); + + let expected: Vec = a_bits.iter().zip(&b_bits).map(|(x, y)| *x || *y).collect(); + let expected_sel = RowSelection::from_filters(&[BooleanArray::from(expected)]); + assert_eq!(r, expected_sel); + } + + #[test] + fn test_mixed_mask_selector_intersection_and_union() { + let mask_bits = vec![true, false, true, false, true, false]; + let selector_bits = vec![false, true, true, false, false, true]; + let mask = RowSelection::from_boolean_buffer(BooleanBuffer::from(mask_bits.clone())); + let selectors = RowSelection::from_filters(&[BooleanArray::from(selector_bits.clone())]); + + let intersection_bits: Vec<_> = mask_bits + .iter() + .zip(&selector_bits) + .map(|(x, y)| *x && *y) + .collect(); + let expected_intersection = + RowSelection::from_filters(&[BooleanArray::from(intersection_bits)]); + assert_eq!(mask.intersection(&selectors), expected_intersection); + assert_eq!(selectors.intersection(&mask), expected_intersection); + + let union_bits: Vec<_> = mask_bits + .iter() + .zip(&selector_bits) + .map(|(x, y)| *x || *y) + .collect(); + let expected_union = RowSelection::from_filters(&[BooleanArray::from(union_bits)]); + assert_eq!(mask.union(&selectors), expected_union); + assert_eq!(selectors.union(&mask), expected_union); + } + + #[test] + fn test_mask_intersection_uneven_passes_tail_through() { + let a_bits = vec![true, true, true, true, true]; + let b_bits = vec![true, false, true]; + let a = RowSelection::from_boolean_buffer(BooleanBuffer::from(a_bits)); + let b = RowSelection::from_boolean_buffer(BooleanBuffer::from(b_bits)); + + let r = a.intersection(&b); + let r_mask = r.as_mask().unwrap(); + assert_eq!(r_mask.len(), 5); + let bits: Vec = (0..5).map(|i| r_mask.value(i)).collect(); + assert_eq!(bits, vec![true, false, true, true, true]); + + // Swapped operands: the right side is longer and its tail passes through. + let a = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![true, false, true])); + let b = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![ + true, true, true, false, true, + ])); + let r = a.intersection(&b); + let r_mask = r.as_mask().unwrap(); + assert_eq!(r_mask.len(), 5); + let bits: Vec = (0..5).map(|i| r_mask.value(i)).collect(); + assert_eq!(bits, vec![true, false, true, false, true]); + } + + #[test] + fn test_mask_union_uneven_passes_tail_through() { + let a_bits = vec![true, false, true]; + let b_bits = vec![false, true, false, true, false]; + let a = RowSelection::from_boolean_buffer(BooleanBuffer::from(a_bits)); + let b = RowSelection::from_boolean_buffer(BooleanBuffer::from(b_bits)); + + let r = a.union(&b); + let r_mask = r.as_mask().unwrap(); + assert_eq!(r_mask.len(), 5); + let bits: Vec = (0..5).map(|i| r_mask.value(i)).collect(); + assert_eq!(bits, vec![true, true, true, true, false]); + + let a = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![ + false, true, false, false, true, + ])); + let b = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![true, false, false])); + let r = a.union(&b); + let r_mask = r.as_mask().unwrap(); + let bits: Vec = (0..5).map(|i| r_mask.value(i)).collect(); + assert_eq!(bits, vec![true, true, false, false, true]); + } +} diff --git a/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/boolean.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/boolean.rs new file mode 100644 index 000000000..2ac879eba --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/boolean.rs @@ -0,0 +1,746 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +//! The bitmap backed representation of a [`RowSelection`] and the primitives +//! operating on it: conversion to and from the run length ([`RowSelector`]) +//! form, and the transforms backing `split_off`, `trim`, `offset` and `limit`. +//! +//! The bitwise set algebra lives in the `algebra` module. +//! +//! [`RowSelection`]: crate::arrow::arrow_reader::RowSelection + +use super::RowSelector; +use arrow_buffer::bit_iterator::BitSliceIterator; +use arrow_buffer::{BooleanBuffer, BooleanBufferBuilder, Buffer}; +use std::sync::OnceLock; + +/// Mask-backed [`RowSelection`] storage. +/// +/// `selectors` is only populated if callers use the borrowed +/// [`RowSelection::iter`] compatibility API. Internal paths that can stream or +/// consume the bitmap avoid this cache. +/// +/// `count` caches the popcount; [`RowSelection::split_off`] propagates it to +/// both halves so repeated `row_count()` calls do not rescan the bitmap. +/// +/// [`RowSelection`]: crate::arrow::arrow_reader::RowSelection +/// [`RowSelection::iter`]: crate::arrow::arrow_reader::RowSelection::iter +/// [`RowSelection::split_off`]: crate::arrow::arrow_reader::RowSelection::split_off +#[derive(Debug)] +pub(crate) struct MaskSelection { + mask: BooleanBuffer, + selectors: OnceLock>, + count: OnceLock, +} + +impl MaskSelection { + pub(super) fn new(mask: BooleanBuffer) -> Self { + Self { + mask, + selectors: OnceLock::new(), + count: OnceLock::new(), + } + } + + /// Create a selection whose selected-row count is already known. + pub(super) fn with_count(mask: BooleanBuffer, count: usize) -> Self { + debug_assert!(count <= mask.len()); + let cell = OnceLock::new(); + let _ = cell.set(count); + Self { + mask, + selectors: OnceLock::new(), + count: cell, + } + } + + pub(crate) fn mask(&self) -> &BooleanBuffer { + &self.mask + } + + pub(crate) fn into_mask(self) -> BooleanBuffer { + let Self { mask, .. } = self; + mask + } + + /// Number of selected rows, computed once and cached. + pub(super) fn count(&self) -> usize { + *self.count.get_or_init(|| self.mask.count_set_bits()) + } + + /// The cached selected-row count, if it has been computed. + pub(super) fn cached_count(&self) -> Option { + self.count.get().copied() + } + + pub(super) fn selectors(&self) -> &[RowSelector] { + self.selectors + .get_or_init(|| mask_to_selectors(&self.mask)) + .as_slice() + } +} + +impl Clone for MaskSelection { + fn clone(&self) -> Self { + // Drop the selector cache but keep the cheap count cache. + Self { + mask: self.mask.clone(), + selectors: OnceLock::new(), + count: self.count.clone(), + } + } +} + +/// Streaming RLE view of a [`BooleanBuffer`], yielding owned [`RowSelector`]s +/// without allocation. +/// +/// Useful as a zero-cost alternative to [`RowSelection::iter`] for mask-backed +/// selections, via [`RowSelection::as_mask`]: +/// +/// ```ignore +/// if let Some(mask) = selection.as_mask() { +/// for run in MaskRunIter::new(mask) { ... } +/// } +/// ``` +/// +/// [`RowSelection::iter`]: crate::arrow::arrow_reader::RowSelection::iter +/// [`RowSelection::as_mask`]: crate::arrow::arrow_reader::RowSelection::as_mask +#[derive(Debug)] +pub struct MaskRunIter<'a> { + slices: BitSliceIterator<'a>, + cursor: usize, + total: usize, + pending: Option, + finished: bool, +} + +impl<'a> MaskRunIter<'a> { + /// Create a streaming RLE iterator over a [`BooleanBuffer`]. + pub fn new(mask: &'a BooleanBuffer) -> Self { + Self { + slices: mask.set_slices(), + cursor: 0, + total: mask.len(), + pending: None, + finished: false, + } + } +} + +impl Iterator for MaskRunIter<'_> { + type Item = RowSelector; + + fn next(&mut self) -> Option { + if let Some(p) = self.pending.take() { + return Some(p); + } + if self.finished { + return None; + } + match self.slices.next() { + Some((start, end)) => { + let select = RowSelector::select(end - start); + if start > self.cursor { + let skip = RowSelector::skip(start - self.cursor); + self.pending = Some(select); + self.cursor = end; + Some(skip) + } else { + self.cursor = end; + Some(select) + } + } + None => { + self.finished = true; + if self.cursor < self.total { + let skip = RowSelector::skip(self.total - self.cursor); + self.cursor = self.total; + Some(skip) + } else { + None + } + } + } + } +} + +/// Materialize a [`BooleanBuffer`] into its RLE form. +pub(crate) fn mask_to_selectors(mask: &BooleanBuffer) -> Vec { + let total_rows = mask.len(); + if total_rows == 0 { + return Vec::new(); + } + let mut selectors: Vec = Vec::new(); + let mut last_end = 0; + for (start, end) in mask.set_slices() { + if start > last_end { + selectors.push(RowSelector::skip(start - last_end)); + } + selectors.push(RowSelector::select(end - start)); + last_end = end; + } + if last_end != total_rows { + selectors.push(RowSelector::skip(total_rows - last_end)); + } + selectors +} + +/// Returns whether `mask` contains at least `min_runs` alternating set/unset runs. +/// +/// Stops as soon as the requested number of runs is found, avoiding a full scan +/// when callers only need to know whether a boundary has been crossed. +pub(super) fn mask_has_at_least_runs(mask: &BooleanBuffer, min_runs: usize) -> bool { + if min_runs == 0 { + return true; + } + + let total_rows = mask.len(); + if total_rows == 0 { + return false; + } + + let mut run_count = 0; + let mut last_end = 0; + for (start, end) in mask.set_slices() { + run_count += usize::from(start > last_end) + 1; + if run_count >= min_runs { + return true; + } + last_end = end; + } + + run_count + usize::from(last_end < total_rows) >= min_runs +} + +/// Split a mask into `(head, tail)` at `row_count`, preserving an empty mask tail +/// when the split point is past the end. +pub(super) fn split_off_mask( + mask: BooleanBuffer, + row_count: usize, +) -> (BooleanBuffer, BooleanBuffer) { + let total = mask.len(); + if row_count >= total { + return (mask, BooleanBuffer::new_unset(0)); + } + + let head = mask.slice(0, row_count); + let tail = mask.slice(row_count, total - row_count); + (head, tail) +} + +/// Position of the highest set bit in `mask`, scanning bytes from the end. +fn last_set_bit_position(mask: &BooleanBuffer) -> Option { + let values = mask.values(); + let offset = mask.offset(); + let end = offset + mask.len(); + for byte_idx in (offset / 8..end.div_ceil(8)).rev() { + let byte_start = byte_idx * 8; + let mut byte = values[byte_idx]; + if end - byte_start < 8 { + byte &= (1u8 << (end - byte_start)) - 1; + } + if byte_start < offset { + byte &= !((1u8 << (offset - byte_start)) - 1); + } + if byte != 0 { + return Some(byte_start + 7 - byte.leading_zeros() as usize - offset); + } + } + None +} + +/// Trims trailing unset bits from a mask-backed selection. +pub(super) fn trim_mask(mask: &BooleanBuffer) -> Option { + let len = mask.len(); + // Fast path: final bit set means there is nothing to trim. + if len == 0 || mask.value(len - 1) { + return None; + } + let new_len = last_set_bit_position(mask).map_or(0, |pos| pos + 1); + Some(mask.slice(0, new_len)) +} + +/// Skips the first `offset` selected rows of a mask-backed selection. +/// `popcount` is the caller's (possibly cached) set-bit count of `mask`. +pub(super) fn offset_mask(mask: BooleanBuffer, offset: usize, popcount: usize) -> BooleanBuffer { + if offset >= popcount { + return BooleanBuffer::new_unset(0); + } + // Position one past the `offset`-th set bit, i.e. the index of the first + // selected row to keep. + let pos = mask.find_nth_set_bit_position(0, offset); + let mut builder = BooleanBufferBuilder::new(mask.len()); + builder.append_n(pos, false); + builder.append_buffer(&mask.slice(pos, mask.len() - pos)); + builder.finish() +} + +/// Keeps only the first `limit` selected rows of a mask-backed selection. +pub(super) fn limit_mask(mask: BooleanBuffer, limit: usize) -> BooleanBuffer { + // `find_nth_set_bit_position` returns `mask.len()` when there are fewer + // than `limit` set bits, so the slice naturally degrades to the original + // mask in that case. + let cut = mask.find_nth_set_bit_position(0, limit); + mask.slice(0, cut) +} + +/// Set bits `[start, start + len)` in a zero-initialized little-endian bitmap. +fn set_bit_run(buf: &mut [u8], start: usize, len: usize) { + if len == 0 { + return; + } + let end = start + len; + let first_byte = start / 8; + let last_byte = (end - 1) / 8; + let start_mask = 0xFFu8 << (start % 8); + let end_mask = 0xFFu8 >> (8 - (end - last_byte * 8)); + if first_byte == last_byte { + buf[first_byte] |= start_mask & end_mask; + } else { + buf[first_byte] |= start_mask; + buf[first_byte + 1..last_byte].fill(0xFF); + buf[last_byte] |= end_mask; + } +} + +/// Build a bitmap from a selector sequence by filling bytes directly. +/// +/// This sits on the read hot path (`Mask` strategy over a selector-backed +/// selection) where per-selector `append_n` calls are too slow. +pub(super) fn boolean_mask_from_selectors(selectors: &[RowSelector]) -> BooleanBuffer { + let total_rows: usize = selectors.iter().map(|s| s.row_count).sum(); + let mut buf = vec![0u8; total_rows.div_ceil(8)]; + let mut position = 0usize; + for selector in selectors { + if !selector.skip { + set_bit_run(&mut buf, position, selector.row_count); + } + position += selector.row_count; + } + BooleanBuffer::new(Buffer::from(buf), 0, total_rows) +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::arrow::arrow_reader::selection::{RowSelection, RowSelectionInner}; + use arrow_array::BooleanArray; + use rand::{Rng, rng}; + + #[test] + fn test_mask_iter_yields_borrowed_selectors() { + let selection = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![ + false, false, true, true, false, true, false, false, + ])); + + let borrowed: Vec<&RowSelector> = selection.iter().collect(); + assert_eq!( + borrowed, + vec![ + &RowSelector::skip(2), + &RowSelector::select(2), + &RowSelector::skip(1), + &RowSelector::select(1), + &RowSelector::skip(2), + ] + ); + } + + #[test] + fn test_mask_iter_clone_drops_cache() { + let selection = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![ + false, false, true, true, false, true, false, false, + ])); + + let _ = selection.iter().count(); + match &selection.inner { + RowSelectionInner::Mask(m) => assert!(m.selectors.get().is_some()), + _ => unreachable!(), + } + + let cloned = selection.clone(); + match &cloned.inner { + RowSelectionInner::Mask(m) => assert!(m.selectors.get().is_none()), + _ => unreachable!(), + } + + let round_tripped: Vec = cloned.iter().copied().collect(); + assert_eq!( + round_tripped, + vec![ + RowSelector::skip(2), + RowSelector::select(2), + RowSelector::skip(1), + RowSelector::select(1), + RowSelector::skip(2), + ] + ); + } + + #[test] + fn test_mask_run_iter_streams_without_cache() { + let selection = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![ + false, false, true, true, false, true, false, false, + ])); + let mut iter = MaskRunIter::new(selection.as_mask().unwrap()); + + assert_eq!(iter.next(), Some(RowSelector::skip(2))); + assert_eq!(iter.next(), Some(RowSelector::select(2))); + assert_eq!(iter.next(), Some(RowSelector::skip(1))); + assert_eq!(iter.next(), Some(RowSelector::select(1))); + assert_eq!(iter.next(), Some(RowSelector::skip(2))); + assert_eq!(iter.next(), None); + assert_eq!(iter.next(), None); + + let selection = + RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![true, true, false])); + let mut iter = MaskRunIter::new(selection.as_mask().unwrap()); + assert_eq!(iter.next(), Some(RowSelector::select(2))); + assert_eq!(iter.next(), Some(RowSelector::skip(1))); + assert_eq!(iter.next(), None); + } + + #[test] + fn test_from_boolean_buffer() { + let bits = vec![ + false, false, true, true, false, true, false, false, true, false, false, false, false, + false, false, true, + ]; + let buf = BooleanBuffer::from(bits.clone()); + let selection = RowSelection::from_boolean_buffer(buf.clone()); + + assert!(selection.as_mask().is_some()); + assert_eq!(selection.row_count(), 5); + assert_eq!(selection.skipped_row_count(), 11); + assert!(selection.selects_any()); + + let from_filters = RowSelection::from_filters(&[BooleanArray::from(bits)]); + assert_eq!(selection, from_filters); + + let bits_tail = vec![true, false, true, false, false, false]; + let trimmed = RowSelection::from_boolean_buffer(BooleanBuffer::from(bits_tail)).trim(); + assert!(trimmed.as_mask().is_some()); + assert_eq!(trimmed.as_mask().unwrap().len(), 3); + } + + #[test] + fn test_from_boolean_buffer_empty() { + let empty = RowSelection::from_boolean_buffer(BooleanBuffer::from(Vec::::new())); + assert!(empty.as_mask().is_some()); + assert_eq!(empty.row_count(), 0); + assert_eq!(empty.skipped_row_count(), 0); + assert!(!empty.selects_any()); + assert!(empty.selectors().is_empty()); + } + + #[test] + fn test_from_boolean_buffer_all_unset_does_not_select() { + let all_zero = RowSelection::from_boolean_buffer(BooleanBuffer::new_unset(1024)); + assert!(all_zero.as_mask().is_some()); + assert!(!all_zero.selects_any()); + assert_eq!(all_zero.row_count(), 0); + assert_eq!(all_zero.skipped_row_count(), 1024); + } + + #[test] + fn test_from_boolean_buffer_via_from_impl() { + let buf = BooleanBuffer::from(vec![true, false, true, true]); + let a = RowSelection::from(buf.clone()); + let b = RowSelection::from_boolean_buffer(buf); + assert_eq!(a, b); + assert!(a.as_mask().is_some()); + } + + #[test] + fn test_mask_backing_clone_preserves_backing() { + let buf = BooleanBuffer::from(vec![true, false, true]); + let original = RowSelection::from_boolean_buffer(buf); + let cloned = original.clone(); + assert!(cloned.as_mask().is_some()); + assert_eq!(original, cloned); + } + + #[test] + fn test_mask_backing_mutation_equivalence() { + let bits = vec![true, true, false, false, true, false, true, true]; + + let from_mask = { + let mut s = RowSelection::from_boolean_buffer(BooleanBuffer::from(bits.clone())); + let split = s.split_off(3); + (split, s) + }; + let from_selectors = { + let mut s = RowSelection::from_filters(&[BooleanArray::from(bits.clone())]); + let split = s.split_off(3); + (split, s) + }; + assert_eq!(from_mask.0, from_selectors.0); + assert_eq!(from_mask.1, from_selectors.1); + assert!(from_mask.0.as_mask().is_some()); + assert!(from_mask.1.as_mask().is_some()); + + let limited_mask = + RowSelection::from_boolean_buffer(BooleanBuffer::from(bits.clone())).limit(3); + let limited_sel = RowSelection::from_filters(&[BooleanArray::from(bits.clone())]).limit(3); + assert!(limited_mask.as_mask().is_some()); + assert_eq!(limited_mask, limited_sel); + + let offset_mask = + RowSelection::from_boolean_buffer(BooleanBuffer::from(bits.clone())).offset(2); + let offset_sel = RowSelection::from_filters(&[BooleanArray::from(bits)]).offset(2); + assert!(offset_mask.as_mask().is_some()); + assert_eq!(offset_mask, offset_sel); + } + + #[test] + fn test_mask_backing_fuzz_equivalence() { + let mut rand = rng(); + for _ in 0..100 { + let len = rand.random_range(0..200); + let bits: Vec<_> = (0..len).map(|_| rand.random_bool(0.35)).collect(); + + let from_mask = RowSelection::from_boolean_buffer(BooleanBuffer::from(bits.clone())); + let from_filters = RowSelection::from_filters(&[BooleanArray::from(bits.clone())]); + + assert_eq!(from_mask, from_filters); + assert_eq!(from_mask.row_count(), from_filters.row_count()); + assert_eq!( + from_mask.skipped_row_count(), + from_filters.skipped_row_count() + ); + assert_eq!(from_mask.selects_any(), from_filters.selects_any()); + + let inner_len: usize = bits.iter().map(|b| *b as usize).sum(); + let inner_bits: Vec<_> = (0..inner_len).map(|_| rand.random_bool(0.7)).collect(); + let inner = RowSelection::from_filters(&[BooleanArray::from(inner_bits.clone())]); + let inner_mask = RowSelection::from_boolean_buffer(BooleanBuffer::from(inner_bits)); + let and_then_mask = from_mask.and_then(&inner); + let and_then_both_masks = from_mask.and_then(&inner_mask); + assert!(and_then_mask.as_mask().is_some()); + assert!(and_then_both_masks.as_mask().is_some()); + assert_eq!(and_then_mask, from_filters.and_then(&inner)); + assert_eq!(and_then_both_masks, and_then_mask); + } + } + + #[test] + fn test_mask_offset_past_end_preserves_empty_mask_backing() { + let selection = + RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![true, false, true])) + .offset(2); + + assert!(selection.as_mask().is_some()); + assert_eq!(selection.as_mask().unwrap().len(), 0); + assert_eq!(selection.row_count(), 0); + assert_eq!(selection.skipped_row_count(), 0); + } + + #[test] + fn test_mask_limit_truncates_at_nth_selected_row() { + let selection = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![ + false, true, false, true, false, true, false, + ])) + .limit(2); + + let mask = selection.as_mask().unwrap(); + assert_eq!(mask.len(), 4); + let actual_bits: Vec<_> = (0..mask.len()).map(|i| mask.value(i)).collect(); + assert_eq!(actual_bits, vec![false, true, false, true]); + } + + #[test] + fn test_mask_split_off_preserves_backing() { + let bits: Vec = (0..40).map(|i| i % 3 == 0).collect(); + let mut s = RowSelection::from_boolean_buffer(BooleanBuffer::from(bits.clone())); + let head = s.split_off(15); + + assert!(head.as_mask().is_some()); + assert!(s.as_mask().is_some()); + + let head_sel = RowSelection::from_filters(&[BooleanArray::from(bits[..15].to_vec())]); + let tail_sel = RowSelection::from_filters(&[BooleanArray::from(bits[15..].to_vec())]); + assert_eq!(head, head_sel); + assert_eq!(s, tail_sel); + } + + #[test] + fn test_mask_split_off_past_end_returns_whole() { + let bits = vec![true, false, true]; + let mut s = RowSelection::from_boolean_buffer(BooleanBuffer::from(bits.clone())); + let head = s.split_off(100); + + assert!(head.as_mask().is_some()); + assert_eq!(head.as_mask().unwrap().len(), 3); + // `self` keeps its mask backing and is left empty. + assert!(s.as_mask().is_some()); + assert_eq!(s.as_mask().unwrap().len(), 0); + assert_eq!(s.row_count(), 0); + assert_eq!(s.skipped_row_count(), 0); + } + + #[test] + fn test_mask_offset_exceeds_selected_returns_empty() { + let s = + RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![true, true, false, true])); + let r = s.offset(10); + assert_eq!(r.row_count(), 0); + assert_eq!(r.skipped_row_count(), 0); + + let from_selectors = + RowSelection::from_filters(&[BooleanArray::from(vec![true, true, false, true])]) + .offset(10); + assert_eq!(r, from_selectors); + } + + #[test] + fn test_mask_limit_exceeds_selected_returns_all() { + let bits = vec![true, true, false, true]; + let s = RowSelection::from_boolean_buffer(BooleanBuffer::from(bits.clone())); + let r = s.limit(10); + assert_eq!(r.row_count(), 3); + + let from_selectors = RowSelection::from_filters(&[BooleanArray::from(bits)]).limit(10); + assert_eq!(r, from_selectors); + } + + #[test] + fn test_mask_trim_all_zero_collapses_to_empty() { + let s = RowSelection::from_boolean_buffer(BooleanBuffer::new_unset(128)); + let trimmed = s.trim(); + assert!(trimmed.as_mask().is_some()); + assert_eq!(trimmed.as_mask().unwrap().len(), 0); + } + + #[test] + fn test_boolean_mask_from_selectors_fuzz_equivalence() { + let mut rand = rng(); + for _ in 0..200 { + let n_selectors = rand.random_range(0..30); + let mut selectors = Vec::with_capacity(n_selectors); + for _ in 0..n_selectors { + selectors.push(RowSelector { + row_count: rand.random_range(0..40), + skip: rand.random_bool(0.5), + }); + } + + let expected = { + let total_rows: usize = selectors.iter().map(|s| s.row_count).sum(); + let mut builder = BooleanBufferBuilder::new(total_rows); + for selector in &selectors { + builder.append_n(selector.row_count, !selector.skip); + } + builder.finish() + }; + + assert_eq!(boolean_mask_from_selectors(&selectors), expected); + } + } + + #[test] + fn test_mask_has_at_least_runs() { + fn assert_run_count(bits: Vec, expected_runs: usize) { + let mask = BooleanBuffer::from(bits); + for min_runs in 0..=expected_runs + 2 { + assert_eq!( + mask_has_at_least_runs(&mask, min_runs), + expected_runs >= min_runs, + "expected {expected_runs} runs with boundary {min_runs}" + ); + } + } + + assert_run_count(vec![], 0); + assert_run_count(vec![false; 8], 1); + assert_run_count(vec![true; 8], 1); + assert_run_count(vec![false, false, true, true, false], 3); + assert_run_count(vec![true, false, true, false, true, false], 6); + + // Exercise the unaligned iterator path as mask-backed selections can be slices. + let mask = BooleanBuffer::from(vec![true, false, false, true, true, false, true, true]) + .slice(1, 6); + for min_runs in 0..=6 { + assert_eq!(mask_has_at_least_runs(&mask, min_runs), 4 >= min_runs); + } + } + + #[test] + fn test_trim_mask_fuzz_equivalence() { + let mut rand = rng(); + for _ in 0..200 { + let len = rand.random_range(0..200); + let bits: Vec = (0..len).map(|_| rand.random_bool(0.3)).collect(); + let full = BooleanBuffer::from(bits.clone()); + // Exercise non-zero bit offsets via slicing + let start = rand.random_range(0..=len); + let slice_len = rand.random_range(0..=(len - start)); + let mask = full.slice(start, slice_len); + + let expected_len = bits[start..start + slice_len] + .iter() + .rposition(|&b| b) + .map_or(0, |pos| pos + 1); + + match trim_mask(&mask) { + Some(trimmed) => { + assert_ne!(expected_len, mask.len()); + assert_eq!(trimmed.len(), expected_len); + assert_eq!(trimmed, mask.slice(0, expected_len)); + } + None => assert_eq!(expected_len, mask.len()), + } + } + } + + #[test] + fn test_split_off_propagates_cached_count() { + let bits = vec![true, false, true, true, false, false, true, false]; + let mut selection = RowSelection::from_boolean_buffer(BooleanBuffer::from(bits)); + // Populate the count cache, then verify both split halves. + assert_eq!(selection.row_count(), 4); + let head = selection.split_off(3); + assert_eq!(head.row_count(), 2); + assert_eq!(selection.row_count(), 2); + let tail_fresh = RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![ + true, false, false, true, false, + ])); + assert_eq!(selection, tail_fresh); + + // Splitting past the end keeps the whole selection as the head + let head = selection.split_off(100); + assert_eq!(head.row_count(), 2); + assert_eq!(selection.row_count(), 0); + } + + #[test] + fn test_trim_and_offset_and_limit_preserve_cached_count() { + let bits = vec![true, true, false, true, false, false]; + let selection = RowSelection::from_boolean_buffer(BooleanBuffer::from(bits.clone())); + assert_eq!(selection.row_count(), 3); + + let trimmed = selection.trim(); + assert!(trimmed.as_mask().is_some()); + assert_eq!(trimmed.as_mask().unwrap().len(), 4); + assert_eq!(trimmed.row_count(), 3); + + let offset = trimmed.clone().offset(1); + assert_eq!(offset.row_count(), 2); + + let limited = trimmed.limit(2); + assert_eq!(limited.row_count(), 2); + } +} diff --git a/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/cursor.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/cursor.rs new file mode 100644 index 000000000..dcb490746 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/cursor.rs @@ -0,0 +1,419 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +//! Execution time iteration over a [`RowSelection`]. +//! +//! A [`ReadPlan`](crate::arrow::arrow_reader::ReadPlan) resolves a +//! [`RowSelectionPolicy`] into a [`RowSelectionStrategy`] and builds the +//! matching [`RowSelectionCursor`], which keeps the per-reader position while +//! the selection itself stays immutable. + +use super::boolean::boolean_mask_from_selectors; +use super::{RowSelection, RowSelector}; +use crate::errors::ParquetError; +use arrow_array::BooleanArray; +use arrow_buffer::BooleanBuffer; +use std::collections::VecDeque; +use std::ops::Range; +use std::sync::Arc; + +/// Policy for picking a strategy to materialize [`RowSelection`] during execution. +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +pub enum RowSelectionPolicy { + /// Use a queue of [`RowSelector`] values + Selectors, + /// Use a boolean mask to materialize the selection + Mask, + /// Choose between [`Self::Mask`] and [`Self::Selectors`] based on selector density + Auto { + /// Average selector length below which masks are preferred + threshold: usize, + }, +} + +impl Default for RowSelectionPolicy { + fn default() -> Self { + Self::Auto { threshold: 32 } + } +} + +/// Fully resolved strategy for materializing [`RowSelection`] during execution. +/// +/// This is determined by [`RowSelectionPolicy`], including selector density for +/// [`RowSelectionPolicy::Auto`]. +#[derive(Clone, Copy, Debug, Eq, PartialEq)] +pub(crate) enum RowSelectionStrategy { + /// Use a queue of [`RowSelector`] values + Selectors, + /// Use a boolean mask to materialize the selection + Mask, +} + +/// Cursor for iterating a [`RowSelection`] during execution within a +/// [`ReadPlan`](crate::arrow::arrow_reader::ReadPlan). +/// +/// This keeps per-reader state such as the current position and delegates the +/// actual storage strategy to the internal `RowSelectionInner`. +#[derive(Debug)] +pub enum RowSelectionCursor { + /// Reading all rows + All, + /// Use a bitmask to back the selection (dense selections) + Mask(MaskCursor), + /// Use a queue of selectors to back the selection (sparse selections) + Selectors(SelectorsCursor), +} + +impl RowSelectionCursor { + /// Create a [`MaskCursor`] cursor backed by a bitmask, from an existing set of selectors + pub(crate) fn new_mask_from_selectors( + selectors: Vec, + loaded_row_ranges: Option>, + ) -> Self { + debug_assert!( + selectors + .last() + .map(|selector| !selector.skip) + .unwrap_or(true), + "Mask selectors must not end with a skip" + ); + Self::Mask(MaskCursor { + mask: boolean_mask_from_selectors(&selectors), + position: 0, + loaded_row_ranges, + }) + } + + /// Create a [`MaskCursor`] cursor backed by an existing bitmask. + pub(crate) fn new_mask_from_buffer( + mask: BooleanBuffer, + loaded_row_ranges: Option>, + ) -> Self { + debug_assert!( + mask.is_empty() || mask.value(mask.len() - 1), + "Mask selections must not end with a skip" + ); + Self::Mask(MaskCursor { + mask, + position: 0, + loaded_row_ranges, + }) + } + + /// Create a [`RowSelectionCursor::Selectors`] from the provided selectors + pub(crate) fn new_selectors(selectors: Vec) -> Self { + Self::Selectors(SelectorsCursor { + selectors: selectors.into(), + position: 0, + }) + } + + /// Create a cursor that selects all rows + pub(crate) fn new_all() -> Self { + Self::All + } +} + +/// Cursor for iterating a selector-backed [`RowSelection`] +/// +/// This is best for sparse selections where large contiguous +/// blocks of rows are selected or skipped. +#[derive(Debug)] +pub struct SelectorsCursor { + selectors: VecDeque, + /// Current absolute offset into the selection + position: usize, +} + +impl SelectorsCursor { + /// Returns `true` when no further rows remain + pub fn is_empty(&self) -> bool { + self.selectors.is_empty() + } + + pub(crate) fn selectors_mut(&mut self) -> &mut VecDeque { + &mut self.selectors + } + + /// Return the next [`RowSelector`] + pub(crate) fn next_selector(&mut self) -> RowSelector { + let selector = self.selectors.pop_front().unwrap(); + self.position += selector.row_count; + selector + } + + /// Return a selector to the front, rewinding the position + pub(crate) fn return_selector(&mut self, selector: RowSelector) { + self.position = self.position.saturating_sub(selector.row_count); + self.selectors.push_front(selector); + } +} + +/// Cursor for iterating a mask-backed [`RowSelection`] +/// +/// This is best for dense selections where there are many small skips +/// or selections. For example, selecting every other row. +/// +/// When page pruning produces sparse column data, `loaded_row_ranges` limits +/// each decoded chunk to rows whose pages are loaded for every projected leaf. +/// For example, two projected columns can have different page boundaries: +/// +/// ```text +/// Row ranges: [0, 4) [4, 6) [6, 8) [8, 10) [10, 12) +/// Selection mask: 1000 00 00 00 01 +/// Column A pages: loaded | missing [4, 8) | loaded [8, 12) +/// Column B pages: loaded [0, 6) | missing [6, 10) | loaded +/// LoadedRowRanges: [0, 4) [10, 12) +/// ``` +/// +/// The first chunk decodes `[0, 4)` with mask `1000`. The next chunk skips to +/// row 11 and decodes `[11, 12)` with mask `1`. The loaded ranges are decode +/// boundaries, not output batch boundaries: [`ParquetRecordBatchReader`] +/// accumulates both chunks and applies the combined mask `10001` once. +/// +/// [`ParquetRecordBatchReader`]: crate::arrow::arrow_reader::ParquetRecordBatchReader +#[derive(Debug)] +pub struct MaskCursor { + mask: BooleanBuffer, + /// Current absolute offset into the selection + position: usize, + /// Row ranges whose backing pages are loaded for every projected column. + loaded_row_ranges: Option>, +} + +impl MaskCursor { + /// Returns `true` when no further rows remain + pub fn is_empty(&self) -> bool { + self.position >= self.mask.len() + } + + /// Advance through the mask representation, producing the next chunk summary + pub fn next_mask_chunk(&mut self, batch_size: usize) -> Option { + if self.is_empty() { + return None; + } + + Some(self.next_mask_chunk_non_empty(batch_size)) + } + + /// Produces the next chunk for a non-empty, trailing-skip-free mask. + fn next_mask_chunk_non_empty(&mut self, batch_size: usize) -> MaskChunk { + debug_assert!(!self.is_empty()); + + let (initial_skip, chunk_rows, selected_rows, mask_start, end_position) = { + let mask = &self.mask; + let start_position = self.position; + let mut cursor = start_position; + let mut initial_skip = 0; + + while cursor < mask.len() && !mask.value(cursor) { + initial_skip += 1; + cursor += 1; + } + debug_assert!( + cursor < mask.len(), + "ReadPlan must remove trailing skips from Mask selections" + ); + + let mask_start = cursor; + let mut chunk_rows = 0; + let mut selected_rows = 0; + + // Advance until enough rows have been selected to satisfy the batch size, + // or until the mask is exhausted. This mirrors the behaviour of the legacy + // `RowSelector` queue-based iteration. + while cursor < mask.len() && selected_rows < batch_size { + chunk_rows += 1; + if mask.value(cursor) { + selected_rows += 1; + } + cursor += 1; + } + + (initial_skip, chunk_rows, selected_rows, mask_start, cursor) + }; + + self.position = end_position; + + MaskChunk { + initial_skip, + chunk_rows, + selected_rows, + mask_start, + } + } + + /// Returns the next non-empty mask chunk without crossing an unloaded row range. + /// + /// The [`ReadPlan`](crate::arrow::arrow_reader::ReadPlan) removes trailing + /// skips before constructing this cursor. Callers therefore only invoke + /// this method for a non-empty mask that has another selected row. + pub(crate) fn next_chunk(&mut self, batch_size: usize) -> Result { + debug_assert!(batch_size > 0); + debug_assert!(!self.is_empty()); + + if self.loaded_row_ranges.is_none() { + return Ok(self.next_mask_chunk_non_empty(batch_size)); + } + + let start_position = self.position; + let mut cursor = start_position; + while cursor < self.mask.len() && !self.mask.value(cursor) { + cursor += 1; + } + + debug_assert!( + cursor < self.mask.len(), + "ReadPlan must remove trailing skips from Mask selections" + ); + + let loaded_range_end = self + .loaded_row_ranges + .as_ref() + .and_then(|ranges| ranges.end_containing(cursor)) + .ok_or_else(|| { + ParquetError::General(format!( + "Internal Error: selected row {cursor} has no loaded page range" + )) + })?; + + let mask_start = cursor; + let mut selected_rows = 0; + while cursor < loaded_range_end && cursor < self.mask.len() && selected_rows < batch_size { + if self.mask.value(cursor) { + selected_rows += 1; + } + cursor += 1; + } + + self.position = cursor; + Ok(MaskChunk { + initial_skip: mask_start - start_position, + chunk_rows: cursor - mask_start, + selected_rows, + mask_start, + }) + } + + /// Materialise the boolean values for a mask-backed chunk + pub fn mask_values_for(&self, chunk: &MaskChunk) -> Result { + if chunk.mask_start.saturating_add(chunk.chunk_rows) > self.mask.len() { + return Err(ParquetError::General( + "Internal Error: MaskChunk exceeds mask length".to_string(), + )); + } + Ok(BooleanArray::from( + self.mask.slice(chunk.mask_start, chunk.chunk_rows), + )) + } +} + +/// Result of computing the next chunk to read when using a [`MaskCursor`] +#[derive(Debug)] +pub struct MaskChunk { + /// Number of leading rows to skip before reaching selected rows + pub initial_skip: usize, + /// Total rows covered by this chunk (selected + skipped) + pub chunk_rows: usize, + /// Rows actually selected within the chunk + pub selected_rows: usize, + /// Starting offset within the mask where the chunk begins + pub mask_start: usize, +} + +/// Row ranges whose backing pages are loaded for every projected column. +#[derive(Clone, Debug)] +pub(crate) struct LoadedRowRanges(Vec>); + +impl LoadedRowRanges { + pub(crate) fn from_selection(selection: RowSelection) -> Self { + let selectors: Vec = selection.into(); + let mut position = 0; + let ranges = selectors + .into_iter() + .filter_map(|selector| { + let start = position; + position += selector.row_count; + (!selector.skip).then_some(start..position) + }) + .collect(); + Self(ranges) + } + + fn end_containing(&self, row: usize) -> Option { + let idx = self.0.partition_point(|range| range.end <= row); + self.0 + .get(idx) + .filter(|range| range.start <= row) + .map(|range| range.end) + } + + #[cfg(test)] + pub(crate) fn ranges(&self) -> &[Range] { + &self.0 + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_loaded_mask_chunk_stops_at_trimmed_mask_end() { + let loaded = LoadedRowRanges::from_selection(RowSelection::from_consecutive_ranges( + std::iter::once(0..5), + 10, + )); + let RowSelectionCursor::Mask(mut cursor) = RowSelectionCursor::new_mask_from_selectors( + vec![RowSelector::select(1)], + Some(loaded.into()), + ) else { + unreachable!() + }; + + let chunk = cursor.next_chunk(10).unwrap(); + assert_eq!(chunk.chunk_rows, 1); + assert!(cursor.is_empty()); + } + + #[test] + fn test_next_mask_chunk_until_cursor_is_empty() { + let RowSelectionCursor::Mask(mut cursor) = RowSelectionCursor::new_mask_from_selectors( + vec![ + RowSelector::skip(2), + RowSelector::select(2), + RowSelector::skip(1), + RowSelector::select(1), + ], + None, + ) else { + unreachable!() + }; + + let first = cursor.next_mask_chunk(2).unwrap(); + assert_eq!(first.initial_skip, 2); + assert_eq!(first.chunk_rows, 2); + assert_eq!(first.selected_rows, 2); + + let second = cursor.next_mask_chunk(2).unwrap(); + assert_eq!(second.initial_skip, 1); + assert_eq!(second.chunk_rows, 1); + assert_eq!(second.selected_rows, 1); + + assert!(cursor.next_mask_chunk(2).is_none()); + } +} diff --git a/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/mod.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/mod.rs new file mode 100644 index 000000000..ff8d5e9a6 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/mod.rs @@ -0,0 +1,954 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +//! Logic for selecting which rows to read: [`RowSelection`] and [`RowSelector`] +//! +//! This module holds [`RowSelection`] and its public API, which dispatches to +//! one of the two backings depending on how the selection is stored: +//! +//! * `selector`: the run length backing, [`RowSelector`] and its primitives +//! * `boolean`: the bitmap backing, `MaskSelection` and its primitives +//! +//! The remaining modules hold the operations that are common to both: +//! +//! * `algebra`: `and_then`, `intersection` and `union` +//! * `ranges`: mapping a [`RowSelection`] onto page and batch ranges +//! * `cursor`: iterating a [`RowSelection`] while reading + +use crate::file::page_index::offset_index::PageLocation; +use arrow_array::{Array, BooleanArray}; +use arrow_buffer::{BooleanBuffer, BooleanBufferBuilder}; +use arrow_select::filter::SlicesIterator; +use std::cmp::Ordering; +use std::collections::VecDeque; +use std::ops::Range; + +mod algebra; +mod boolean; +mod cursor; +mod ranges; +mod selector; + +use algebra::{ + and_then_mask, and_then_row_selections, and_then_selectors_with_mask, intersect_masks, + intersect_row_selections, union_masks, union_row_selections, +}; +pub use boolean::MaskRunIter; +pub(crate) use boolean::mask_to_selectors; +use boolean::{ + MaskSelection, limit_mask, mask_has_at_least_runs, offset_mask, split_off_mask, trim_mask, +}; +pub(crate) use cursor::{LoadedRowRanges, MaskCursor, RowSelectionStrategy}; +pub use cursor::{RowSelectionCursor, RowSelectionPolicy}; +use ranges::{expand_to_batch_boundaries_from_selectors, scan_ranges_from_selectors}; +pub use selector::RowSelector; +use selector::{limit_selectors, offset_selectors, split_off_selectors}; + +/// [`RowSelection`] represents selecting a subset of rows +/// when scanning a parquet file. +/// +/// This is applied prior to reading column data, and can therefore +/// be used to skip IO to fetch data into memory +/// +/// A typical use-case would be using the [`PageIndex`] to filter out rows +/// that don't satisfy a predicate +/// +/// Depending on the pattern of rows to be selected, [`RowSelection`] has +/// either a bitmap or an RLE ([`RowSelector`]) based implementation. +/// +/// # Example +/// ``` +/// use parquet::arrow::arrow_reader::{RowSelection, RowSelector}; +/// +/// let selectors = vec![ +/// RowSelector::skip(5), +/// RowSelector::select(5), +/// RowSelector::select(5), +/// RowSelector::skip(5), +/// ]; +/// +/// // Creating a selection will combine adjacent selectors +/// let selection: RowSelection = selectors.into(); +/// +/// let expected = vec![ +/// RowSelector::skip(5), +/// RowSelector::select(10), +/// RowSelector::skip(5), +/// ]; +/// +/// let actual: Vec = selection.into(); +/// assert_eq!(actual, expected); +/// +/// // you can also create a selection from consecutive ranges +/// let ranges = vec![5..10, 10..15]; +/// let selection = +/// RowSelection::from_consecutive_ranges(ranges.into_iter(), 20); +/// let actual: Vec = selection.into(); +/// assert_eq!(actual, expected); +/// +/// // or directly from a packed bitmap, when the upstream producer already +/// // has one. The bitmap is kept as-is rather than run-length-encoded. +/// use arrow_buffer::BooleanBuffer; +/// let mask = BooleanBuffer::from(vec![true, false, true, true]); +/// let selection = RowSelection::from_boolean_buffer(mask); +/// assert_eq!(selection.row_count(), 3); +/// ``` +/// +/// An RLE ([`RowSelector`]) backed [`RowSelection`] maintains the following +/// invariants (they do not apply to the bitmap backed implementation): +/// +/// * It contains no [`RowSelector`] of 0 rows +/// * Consecutive [`RowSelector`]s alternate skipping or selecting rows +/// +/// [`PageIndex`]: crate::file::page_index::column_index::ColumnIndexMetaData +#[derive(Default, Clone)] +pub struct RowSelection { + inner: RowSelectionInner, +} + +/// Internal storage for [`RowSelection`]. +#[derive(Debug, Clone)] +pub(crate) enum RowSelectionInner { + Selectors(Vec), + Mask(Box), +} + +impl Default for RowSelectionInner { + fn default() -> Self { + Self::Selectors(Vec::new()) + } +} + +impl std::fmt::Debug for RowSelection { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + match &self.inner { + RowSelectionInner::Selectors(s) => f + .debug_struct("RowSelection") + .field("selectors", s) + .finish(), + RowSelectionInner::Mask(m) => f + .debug_struct("RowSelection") + .field("mask_len", &m.mask().len()) + .finish_non_exhaustive(), + } + } +} + +impl PartialEq for RowSelection { + fn eq(&self, other: &Self) -> bool { + match (&self.inner, &other.inner) { + (RowSelectionInner::Selectors(a), RowSelectionInner::Selectors(b)) => a == b, + (RowSelectionInner::Mask(a), RowSelectionInner::Mask(b)) => a.mask() == b.mask(), + (RowSelectionInner::Mask(mask), RowSelectionInner::Selectors(selectors)) + | (RowSelectionInner::Selectors(selectors), RowSelectionInner::Mask(mask)) => { + if selectors + .iter() + .try_fold(0usize, |acc, selector| acc.checked_add(selector.row_count)) + != Some(mask.mask().len()) + { + return false; + } + + let mut slices = mask.mask().set_slices().peekable(); + let mut cursor = 0usize; + + for selector in selectors { + let end = cursor + selector.row_count; + + if selector.skip { + if slices.peek().is_some_and(|(start, _)| *start < end) { + return false; + } + } else { + match slices.next() { + Some((start, slice_end)) if start == cursor && slice_end == end => {} + _ => return false, + } + } + + cursor = end; + } + + slices.next().is_none() + } + } + } +} + +impl Eq for RowSelection {} + +impl RowSelection { + /// Not `pub`: unlike `From>`, this performs no + /// validation/normalization of the selectors (e.g. combining adjacent + /// selectors), so callers must uphold the invariants themselves. + fn from_selectors(selectors: Vec) -> Self { + Self { + inner: RowSelectionInner::Selectors(selectors), + } + } + + /// Create a [`RowSelection`] from a packed [`BooleanBuffer`]. + /// + /// Each set bit selects a row, each unset bit skips one. Unlike + /// [`Self::from_filters`], the bitmap is kept as-is rather than + /// eagerly run-length-encoded. [`Self::iter`] materializes and caches the + /// RLE form on first use; use [`MaskRunIter`] to stream the RLE form + /// directly from the bitmap. + pub fn from_boolean_buffer(mask: BooleanBuffer) -> Self { + Self { + inner: RowSelectionInner::Mask(Box::new(MaskSelection::new(mask))), + } + } + + fn from_mask_selection(mask: MaskSelection) -> Self { + Self { + inner: RowSelectionInner::Mask(Box::new(mask)), + } + } + + /// Returns the underlying mask if this selection is mask-backed. + /// + /// Public so that engines composing selections (e.g. DataFusion's + /// [`ParquetAccessPlan::into_overall_row_selection`]) can concatenate + /// mask-backed selections without materialising the RLE form. + /// + /// [`ParquetAccessPlan::into_overall_row_selection`]: https://docs.rs/datafusion-datasource-parquet/latest/datafusion_datasource_parquet/access_plan/struct.ParquetAccessPlan.html#method.into_overall_row_selection + pub fn as_mask(&self) -> Option<&BooleanBuffer> { + match &self.inner { + RowSelectionInner::Mask(m) => Some(m.mask()), + _ => None, + } + } + + /// Consume the selection and return its internal storage. + pub(crate) fn into_inner(self) -> RowSelectionInner { + self.inner + } + + /// Choose the automatic materialisation strategy without converting between + /// selector and mask backing. + #[inline] + pub(crate) fn auto_selection_strategy(&self, threshold: usize) -> RowSelectionStrategy { + let (total_rows, effective_count) = match &self.inner { + RowSelectionInner::Selectors(selectors) => { + selectors.iter().fold((0usize, 0usize), |(rows, count), s| { + if s.row_count > 0 { + (rows + s.row_count, count + 1) + } else { + (rows, count) + } + }) + } + RowSelectionInner::Mask(mask) => { + let mask = mask.mask(); + let total_rows = mask.len(); + + if total_rows == 0 { + return RowSelectionStrategy::Mask; + } + + // A mask is preferred when: + // + // total_rows < run_count * threshold + // + // Therefore only scan until the first run count that can make + // the inequality true. Fragmented masks normally reach this + // boundary near the start instead of enumerating every run. + let min_mask_runs = total_rows + .checked_div(threshold) + .and_then(|max_selector_runs| max_selector_runs.checked_add(1)); + + return match min_mask_runs { + Some(min_runs) if mask_has_at_least_runs(mask, min_runs) => { + RowSelectionStrategy::Mask + } + _ => RowSelectionStrategy::Selectors, + }; + } + }; + + if effective_count == 0 { + return RowSelectionStrategy::Mask; + } + + if total_rows < effective_count.saturating_mul(threshold) { + RowSelectionStrategy::Mask + } else { + RowSelectionStrategy::Selectors + } + } + + #[cfg(test)] + fn selectors(&self) -> Vec { + self.iter().copied().collect() + } + + fn into_selectors_vec(self) -> Vec { + match self.inner { + RowSelectionInner::Selectors(s) => s, + RowSelectionInner::Mask(m) => mask_to_selectors(m.mask()), + } + } + + /// Creates a [`RowSelection`] from a slice of [`BooleanArray`] + /// + /// # Panic + /// + /// Panics if any of the [`BooleanArray`] contain nulls + pub fn from_filters(filters: &[BooleanArray]) -> Self { + let mut next_offset = 0; + let total_rows = filters.iter().map(|x| x.len()).sum(); + + let iter = filters.iter().flat_map(|filter| { + let offset = next_offset; + next_offset += filter.len(); + assert_eq!(filter.null_count(), 0); + SlicesIterator::new(filter).map(move |(start, end)| start + offset..end + offset) + }); + + Self::from_consecutive_ranges(iter, total_rows) + } + + /// Creates a [`RowSelection`] from an iterator of consecutive ranges to keep + pub fn from_consecutive_ranges>>( + ranges: I, + total_rows: usize, + ) -> Self { + let mut selectors: Vec = Vec::with_capacity(ranges.size_hint().0); + let mut last_end = 0; + for range in ranges { + let len = range.end - range.start; + if len == 0 { + continue; + } + + match range.start.cmp(&last_end) { + Ordering::Equal => match selectors.last_mut() { + Some(last) => last.row_count = last.row_count.checked_add(len).unwrap(), + None => selectors.push(RowSelector::select(len)), + }, + Ordering::Greater => { + selectors.push(RowSelector::skip(range.start - last_end)); + selectors.push(RowSelector::select(len)) + } + Ordering::Less => panic!("out of order"), + } + last_end = range.end; + } + + if last_end != total_rows { + selectors.push(RowSelector::skip(total_rows - last_end)) + } + + Self::from_selectors(selectors) + } + + /// Given an offset index, return the byte ranges for all data pages selected by `self` + /// + /// This is useful for determining what byte ranges to fetch from underlying storage + /// + /// Note: this method does not make any effort to combine consecutive ranges, nor coalesce + /// ranges that are close together. This is instead delegated to the IO subsystem to optimise, + /// e.g. `ObjectStore::get_ranges` in the [`object_store`] crate + /// + /// [`object_store`]: https://crates.io/crates/object_store + pub fn scan_ranges(&self, page_locations: &[PageLocation]) -> Vec> { + match &self.inner { + RowSelectionInner::Selectors(selectors) => { + scan_ranges_from_selectors(selectors.iter().copied(), page_locations) + } + RowSelectionInner::Mask(mask) => { + scan_ranges_from_selectors(MaskRunIter::new(mask.mask()), page_locations) + } + } + } + + /// Returns the complete row ranges of the pages selected by [`Self::scan_ranges`]. + pub(crate) fn row_ranges_for_selected_pages( + &self, + page_locations: &[PageLocation], + total_rows: usize, + ) -> Vec> { + let mut selected_pages = self.scan_ranges(page_locations).into_iter().peekable(); + let mut row_ranges = Vec::new(); + + for (idx, page) in page_locations.iter().enumerate() { + let Some(selected_page) = selected_pages.peek() else { + break; + }; + if selected_page.start != page.offset as u64 { + continue; + } + selected_pages.next(); + + let end = page_locations + .get(idx + 1) + .map(|next| next.first_row_index as usize) + .unwrap_or(total_rows); + row_ranges.push(page.first_row_index as usize..end); + } + + row_ranges + } + + /// Splits off the first `row_count` from this [`RowSelection`] + pub fn split_off(&mut self, row_count: usize) -> Self { + match std::mem::take(&mut self.inner) { + RowSelectionInner::Mask(mask) => { + let total = mask.cached_count(); + let (head, tail) = split_off_mask((*mask).into_mask(), row_count); + // Popcount only the head and derive the tail by subtraction, so + // repeated splits stay O(bitmap) overall. + let (head, tail) = match total { + Some(total) => { + let head_count = if tail.is_empty() { + total + } else { + head.count_set_bits() + }; + ( + MaskSelection::with_count(head, head_count), + MaskSelection::with_count(tail, total - head_count), + ) + } + None => (MaskSelection::new(head), MaskSelection::new(tail)), + }; + self.inner = RowSelectionInner::Mask(Box::new(tail)); + Self::from_mask_selection(head) + } + RowSelectionInner::Selectors(selectors) => { + let (head, tail) = split_off_selectors(selectors, row_count); + self.inner = RowSelectionInner::Selectors(tail); + Self::from_selectors(head) + } + } + } + + /// returns a [`RowSelection`] representing rows that are selected in both + /// input [`RowSelection`]s. + /// + /// This is equivalent to the logical `AND` / conjunction of the two + /// selections. + /// + /// # Example + /// If `N` means the row is not selected, and `Y` means it is + /// selected: + /// + /// ```text + /// self: NNNNNNNNNNNNYYYYYYYYYYYYYYYYYYYYYYNNNYYYYY + /// other: YYYYYNNNNYYYYYYYYYYYYY YYNNN + /// + /// returned: NNNNNNNNNNNNYYYYYNNNNYYYYYYYYYYYYYNNNYYNNN + /// ``` + /// + /// # Panics + /// + /// Panics if `other` does not have a length equal to the number of rows selected + /// by this RowSelection + /// + pub fn and_then(&self, other: &Self) -> Self { + match (&self.inner, &other.inner) { + (RowSelectionInner::Mask(mask), _) => { + Self::from_boolean_buffer(and_then_mask(mask.mask(), other)) + } + (RowSelectionInner::Selectors(first), RowSelectionInner::Selectors(second)) => { + and_then_row_selections(first, second) + } + (RowSelectionInner::Selectors(first), RowSelectionInner::Mask(second)) => { + and_then_selectors_with_mask(first, second.mask()) + } + } + } + + /// Compute the intersection of two [`RowSelection`] + /// For example: + /// self: NNYYYYNNYYNYN + /// other: NYNNNNNNY + /// + /// returned: NNNNNNNNYYNYN + pub fn intersection(&self, other: &Self) -> Self { + match (&self.inner, &other.inner) { + (RowSelectionInner::Mask(l), RowSelectionInner::Mask(r)) => { + Self::from_boolean_buffer(intersect_masks(l.mask(), r.mask())) + } + (RowSelectionInner::Selectors(l), RowSelectionInner::Selectors(r)) => { + intersect_row_selections(l, r) + } + (RowSelectionInner::Selectors(l), RowSelectionInner::Mask(r)) => { + let r = mask_to_selectors(r.mask()); + intersect_row_selections(l, &r) + } + (RowSelectionInner::Mask(l), RowSelectionInner::Selectors(r)) => { + let l = mask_to_selectors(l.mask()); + intersect_row_selections(&l, r) + } + } + } + + /// Compute the union of two [`RowSelection`] + /// For example: + /// self: NNYYYYNNYYNYN + /// other: NYNNNNNNN + /// + /// returned: NYYYYYNNYYNYN + pub fn union(&self, other: &Self) -> Self { + match &self.inner { + RowSelectionInner::Mask(l) => match &other.inner { + RowSelectionInner::Mask(r) => { + Self::from_boolean_buffer(union_masks(l.mask(), r.mask())) + } + RowSelectionInner::Selectors(r) => { + let l = mask_to_selectors(l.mask()); + union_row_selections(&l, r) + } + }, + RowSelectionInner::Selectors(l) => match &other.inner { + RowSelectionInner::Mask(r) => { + let r = mask_to_selectors(r.mask()); + union_row_selections(l, &r) + } + RowSelectionInner::Selectors(r) => union_row_selections(l, r), + }, + } + } + + /// Returns `true` if this [`RowSelection`] selects any rows + pub fn selects_any(&self) -> bool { + match &self.inner { + RowSelectionInner::Selectors(s) => s.iter().any(|x| !x.skip), + RowSelectionInner::Mask(m) => match m.cached_count() { + Some(count) => count > 0, + None => m.mask().set_indices().next().is_some(), + }, + } + } + + /// Trims this [`RowSelection`] removing any trailing skips + pub(crate) fn trim(self) -> Self { + match self.inner { + RowSelectionInner::Mask(m) => { + let trimmed = trim_mask(m.mask()); + let cached_count = m.cached_count(); + match trimmed { + // Trimming only drops trailing unset bits; the count is unchanged. + Some(mask) => match cached_count { + Some(count) => { + Self::from_mask_selection(MaskSelection::with_count(mask, count)) + } + None => Self::from_boolean_buffer(mask), + }, + // Nothing to trim, hand the existing box back untouched. + None => Self { + inner: RowSelectionInner::Mask(m), + }, + } + } + RowSelectionInner::Selectors(mut selectors) => { + while selectors.last().map(|x| x.skip).unwrap_or(false) { + selectors.pop(); + } + Self::from_selectors(selectors) + } + } + } + + /// Applies an offset to this [`RowSelection`], skipping the first `offset` selected rows + pub(crate) fn offset(self, offset: usize) -> Self { + if offset == 0 { + return self; + } + + match self.inner { + RowSelectionInner::Mask(mask) => { + let count = mask.count(); + let buffer = offset_mask((*mask).into_mask(), offset, count); + Self::from_mask_selection(MaskSelection::with_count( + buffer, + count.saturating_sub(offset), + )) + } + RowSelectionInner::Selectors(selectors) => { + Self::from_selectors(offset_selectors(selectors, offset)) + } + } + } + + /// Limit this [`RowSelection`] to only select `limit` rows + pub(crate) fn limit(self, limit: usize) -> Self { + match self.inner { + RowSelectionInner::Mask(mask) => { + let cached = mask.cached_count(); + let buffer = limit_mask((*mask).into_mask(), limit); + match cached { + Some(count) => Self::from_mask_selection(MaskSelection::with_count( + buffer, + count.min(limit), + )), + None => Self::from_boolean_buffer(buffer), + } + } + RowSelectionInner::Selectors(selectors) => { + Self::from_selectors(limit_selectors(selectors, limit)) + } + } + } + + /// Returns an iterator over the [`RowSelector`]s for this + /// [`RowSelection`]. + /// + /// Mask-backed selections materialize a `Vec` cache on first + /// call (one allocation, `O(set_slices)` work) so the iterator can hand out + /// `&RowSelector`; the cache is not copied on clone. For single-pass walks + /// over mask-backed selections, prefer streaming directly via + /// [`Self::as_mask`] + [`MaskRunIter::new`] — that path is allocation-free + /// and avoids populating the cache. + pub fn iter(&self) -> impl Iterator { + match &self.inner { + RowSelectionInner::Selectors(s) => s.iter(), + RowSelectionInner::Mask(m) => m.selectors().iter(), + } + } + + /// Returns the number of selected rows + pub fn row_count(&self) -> usize { + match &self.inner { + RowSelectionInner::Selectors(s) => { + s.iter().filter(|x| !x.skip).map(|x| x.row_count).sum() + } + RowSelectionInner::Mask(m) => m.count(), + } + } + + /// Returns the number of de-selected rows + pub fn skipped_row_count(&self) -> usize { + match &self.inner { + RowSelectionInner::Selectors(s) => { + s.iter().filter(|x| x.skip).map(|x| x.row_count).sum() + } + RowSelectionInner::Mask(m) => m.mask().len() - m.count(), + } + } + + /// Expands the selection to align with batch boundaries. + /// This is needed when using cached array readers to ensure that + /// the cached data covers full batches. + pub(crate) fn expand_to_batch_boundaries(&self, batch_size: usize, total_rows: usize) -> Self { + if batch_size == 0 { + return self.clone(); + } + + match &self.inner { + RowSelectionInner::Selectors(selectors) => expand_to_batch_boundaries_from_selectors( + selectors.iter().copied(), + batch_size, + total_rows, + ), + RowSelectionInner::Mask(mask) => expand_to_batch_boundaries_from_selectors( + MaskRunIter::new(mask.mask()), + batch_size, + total_rows, + ), + } + } +} + +impl From> for RowSelection { + fn from(selectors: Vec) -> Self { + selectors.into_iter().collect() + } +} + +impl From for RowSelection { + fn from(mask: BooleanBuffer) -> Self { + Self::from_boolean_buffer(mask) + } +} + +impl FromIterator for RowSelection { + fn from_iter>(iter: T) -> Self { + let iter = iter.into_iter(); + + // Capacity before filter + let mut selectors = Vec::with_capacity(iter.size_hint().0); + + let mut filtered = iter.filter(|x| x.row_count != 0); + if let Some(x) = filtered.next() { + selectors.push(x); + } + + for s in filtered { + if s.row_count == 0 { + continue; + } + + // Combine consecutive selectors + let last = selectors.last_mut().unwrap(); + if last.skip == s.skip { + last.row_count = last.row_count.checked_add(s.row_count).unwrap(); + } else { + selectors.push(s) + } + } + + Self::from_selectors(selectors) + } +} + +impl From for Vec { + fn from(r: RowSelection) -> Self { + r.into_selectors_vec() + } +} + +impl From for VecDeque { + fn from(r: RowSelection) -> Self { + r.into_selectors_vec().into() + } +} + +impl FromIterator for RowSelection { + /// Concatenate multiple [`RowSelection`]s in iterator order. + /// + /// When every input is mask-backed the result stays mask-backed + /// (`BooleanBuffer`s are appended); otherwise falls back to flattening + /// through the per-`RowSelector` form. + fn from_iter>(iter: T) -> Self { + let items: Vec = iter.into_iter().collect(); + + let all_mask = items + .iter() + .all(|s| matches!(&s.inner, RowSelectionInner::Mask(_))); + + if all_mask { + let total_len: usize = items + .iter() + .map(|s| match &s.inner { + RowSelectionInner::Mask(m) => m.mask().len(), + RowSelectionInner::Selectors(_) => unreachable!(), + }) + .sum(); + let mut builder = BooleanBufferBuilder::new(total_len); + for item in items { + match item.into_inner() { + RowSelectionInner::Mask(m) => builder.append_buffer(m.mask()), + RowSelectionInner::Selectors(_) => unreachable!(), + } + } + return Self::from_boolean_buffer(builder.finish()); + } + + items + .into_iter() + .flat_map(|s| s.into_selectors_vec()) + .collect() + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_offset_zero_and_zero_batch_expand_are_identity() { + let selection = + RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![true, false, true])); + assert_eq!(selection.clone().offset(0), selection); + assert_eq!(selection.expand_to_batch_boundaries(0, 3), selection); + } + + #[test] + fn test_from_filters() { + let filters = vec![ + BooleanArray::from(vec![false, false, false, true, true, true, true]), + BooleanArray::from(vec![true, true, false, false, true, true, true]), + BooleanArray::from(vec![false, false, false, false]), + BooleanArray::from(Vec::::new()), + ]; + + let selection = RowSelection::from_filters(&filters[..1]); + assert!(selection.selects_any()); + assert_eq!( + selection.selectors(), + vec![RowSelector::skip(3), RowSelector::select(4)] + ); + + let selection = RowSelection::from_filters(&filters[..2]); + assert!(selection.selects_any()); + assert_eq!( + selection.selectors(), + vec![ + RowSelector::skip(3), + RowSelector::select(6), + RowSelector::skip(2), + RowSelector::select(3) + ] + ); + + let selection = RowSelection::from_filters(&filters); + assert!(selection.selects_any()); + assert_eq!( + selection.selectors(), + vec![ + RowSelector::skip(3), + RowSelector::select(6), + RowSelector::skip(2), + RowSelector::select(3), + RowSelector::skip(4) + ] + ); + + let selection = RowSelection::from_filters(&filters[2..3]); + assert!(!selection.selects_any()); + assert_eq!(selection.selectors(), vec![RowSelector::skip(4)]); + } + + #[test] + fn test_iter() { + // use the iter() API to show it does what is expected and + // avoid accidental deletion + let selectors = vec![ + RowSelector::select(3), + RowSelector::skip(33), + RowSelector::select(4), + ]; + + let round_tripped: Vec = RowSelection::from(selectors.clone()) + .iter() + .copied() + .collect(); + assert_eq!(selectors, round_tripped); + } + + #[test] + fn test_row_count() { + let selection = RowSelection::from(vec![ + RowSelector::skip(34), + RowSelector::select(12), + RowSelector::skip(3), + RowSelector::select(35), + ]); + + assert_eq!(selection.row_count(), 12 + 35); + assert_eq!(selection.skipped_row_count(), 34 + 3); + + let selection = RowSelection::from(vec![RowSelector::select(12), RowSelector::select(35)]); + + assert_eq!(selection.row_count(), 12 + 35); + assert_eq!(selection.skipped_row_count(), 0); + + let selection = RowSelection::from(vec![RowSelector::skip(34), RowSelector::skip(3)]); + + assert_eq!(selection.row_count(), 0); + assert_eq!(selection.skipped_row_count(), 34 + 3); + + let selection = RowSelection::from(vec![]); + + assert_eq!(selection.row_count(), 0); + assert_eq!(selection.skipped_row_count(), 0); + } + + #[test] + fn test_mixed_backing_equality_mismatches() { + let mask = + RowSelection::from_boolean_buffer(BooleanBuffer::from(vec![true, false, true, true])); + + // Total row counts differ + let longer = RowSelection::from(vec![ + RowSelector::select(1), + RowSelector::skip(1), + RowSelector::select(2), + RowSelector::skip(1), + ]); + assert_ne!(mask, longer); + assert_ne!(longer, mask); + + // A selected bit falls inside a skip run + let skip_overlap = RowSelection::from(vec![RowSelector::skip(2), RowSelector::select(2)]); + assert_ne!(mask, skip_overlap); + + // Select run boundaries do not line up + let misaligned = RowSelection::from(vec![ + RowSelector::select(2), + RowSelector::skip(1), + RowSelector::select(1), + ]); + assert_ne!(mask, misaligned); + + let equal = RowSelection::from(vec![ + RowSelector::select(1), + RowSelector::skip(1), + RowSelector::select(2), + ]); + assert_eq!(mask, equal); + assert_eq!(equal, mask); + } + + #[test] + fn test_from_iter_all_mask_preserves_mask_backing() { + let a_bits = vec![true, false, true, true]; + let b_bits = vec![false, true, false]; + let c_bits = vec![true, true, false, false, true]; + + let parts = vec![ + RowSelection::from_boolean_buffer(BooleanBuffer::from(a_bits.clone())), + RowSelection::from_boolean_buffer(BooleanBuffer::from(b_bits.clone())), + RowSelection::from_boolean_buffer(BooleanBuffer::from(c_bits.clone())), + ]; + let collected: RowSelection = parts.into_iter().collect(); + + let combined = a_bits + .iter() + .chain(b_bits.iter()) + .chain(c_bits.iter()) + .copied() + .collect::>(); + let expected = RowSelection::from_filters(&[BooleanArray::from(combined)]); + + assert!(collected.as_mask().is_some()); + assert_eq!(collected, expected); + } + + #[test] + fn test_from_iter_mixed_backing_falls_back_to_selectors() { + let a_bits = vec![true, false, true]; + let b_selectors = vec![RowSelector::skip(2), RowSelector::select(3)]; + let c_bits = vec![false, true]; + + let parts = vec![ + RowSelection::from_boolean_buffer(BooleanBuffer::from(a_bits.clone())), + RowSelection::from(b_selectors), + RowSelection::from_boolean_buffer(BooleanBuffer::from(c_bits.clone())), + ]; + let collected: RowSelection = parts.into_iter().collect(); + + assert!(collected.as_mask().is_none()); + + let combined_bits = vec![ + true, false, true, false, false, true, true, true, false, true, + ]; + let expected = RowSelection::from_filters(&[BooleanArray::from(combined_bits)]); + assert_eq!(collected, expected); + } + + #[test] + fn test_from_iter_empty_yields_empty_selection() { + let collected: RowSelection = std::iter::empty::().collect(); + assert_eq!(collected, RowSelection::default()); + assert!(collected.as_mask().is_some()); + assert_eq!(collected.as_mask().unwrap().len(), 0); + } +} diff --git a/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/ranges.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/ranges.rs new file mode 100644 index 000000000..4c7860d09 --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/ranges.rs @@ -0,0 +1,283 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +//! Mapping the [`RowSelector`] runs of a selection onto ranges: the byte ranges +//! of the data pages that must be fetched ([`RowSelection::scan_ranges`]) and +//! the expansion of a selection to batch boundaries. +//! +//! Both are shared by the selector and mask backings, which stream their runs +//! from a slice and a [`MaskRunIter`] respectively. +//! +//! [`MaskRunIter`]: crate::arrow::arrow_reader::MaskRunIter + +use super::{RowSelection, RowSelector}; +use crate::file::page_index::offset_index::PageLocation; +use std::ops::Range; + +/// Byte ranges of the data pages containing at least one selected row. +#[inline] +pub(super) fn scan_ranges_from_selectors( + selectors: I, + page_locations: &[PageLocation], +) -> Vec> +where + I: IntoIterator, +{ + let mut ranges: Vec> = vec![]; + let mut row_offset = 0; + + let mut pages = page_locations.iter().peekable(); + let mut selectors = selectors.into_iter(); + let mut current_selector = selectors.next(); + let mut current_page = pages.next(); + + let mut current_page_included = false; + + while let Some((selector, page)) = current_selector.as_mut().zip(current_page) { + if !(selector.skip || current_page_included) { + let start = page.offset as u64; + let end = start + page.compressed_page_size as u64; + ranges.push(start..end); + current_page_included = true; + } + + if let Some(next_page) = pages.peek() { + if row_offset + selector.row_count > next_page.first_row_index as usize { + let remaining_in_page = next_page.first_row_index as usize - row_offset; + selector.row_count -= remaining_in_page; + row_offset += remaining_in_page; + current_page = pages.next(); + current_page_included = false; + + continue; + } else { + if row_offset + selector.row_count == next_page.first_row_index as usize { + current_page = pages.next(); + current_page_included = false; + } + row_offset += selector.row_count; + current_selector = selectors.next(); + } + } else { + if !(selector.skip || current_page_included) { + let start = page.offset as u64; + let end = start + page.compressed_page_size as u64; + ranges.push(start..end); + } + current_selector = selectors.next() + } + } + + ranges +} + +/// Grows each selected run to the batch boundaries containing it, merging the +/// runs that overlap as a result. +#[inline] +pub(super) fn expand_to_batch_boundaries_from_selectors( + selectors: I, + batch_size: usize, + total_rows: usize, +) -> RowSelection +where + I: IntoIterator, +{ + let mut expanded_ranges = Vec::new(); + let mut row_offset = 0; + + for selector in selectors { + if selector.skip { + row_offset += selector.row_count; + } else { + let start = row_offset; + let end = row_offset + selector.row_count; + + // Expand start to batch boundary + let expanded_start = (start / batch_size) * batch_size; + // Expand end to batch boundary + let expanded_end = end.div_ceil(batch_size) * batch_size; + let expanded_end = expanded_end.min(total_rows); + + expanded_ranges.push(expanded_start..expanded_end); + row_offset += selector.row_count; + } + } + + // Sort ranges by start position + expanded_ranges.sort_by_key(|range| range.start); + + // Merge overlapping or consecutive ranges + let mut merged_ranges: Vec> = Vec::new(); + for range in expanded_ranges { + if let Some(last) = merged_ranges.last_mut() { + if range.start <= last.end { + // Overlapping or consecutive - merge them + last.end = last.end.max(range.end); + } else { + // No overlap - add new range + merged_ranges.push(range); + } + } else { + // First range + merged_ranges.push(range); + } + } + + RowSelection::from_consecutive_ranges(merged_ranges.into_iter(), total_rows) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn test_scan_ranges() { + let index = vec![ + PageLocation { + offset: 0, + compressed_page_size: 10, + first_row_index: 0, + }, + PageLocation { + offset: 10, + compressed_page_size: 10, + first_row_index: 10, + }, + PageLocation { + offset: 20, + compressed_page_size: 10, + first_row_index: 20, + }, + PageLocation { + offset: 30, + compressed_page_size: 10, + first_row_index: 30, + }, + PageLocation { + offset: 40, + compressed_page_size: 10, + first_row_index: 40, + }, + PageLocation { + offset: 50, + compressed_page_size: 10, + first_row_index: 50, + }, + PageLocation { + offset: 60, + compressed_page_size: 10, + first_row_index: 60, + }, + ]; + + let selection = RowSelection::from(vec![ + // Skip first page + RowSelector::skip(10), + // Multiple selects in same page + RowSelector::select(3), + RowSelector::skip(3), + RowSelector::select(4), + // Select to page boundary + RowSelector::skip(5), + RowSelector::select(5), + // Skip full page past page boundary + RowSelector::skip(12), + // Select across page boundaries + RowSelector::select(12), + // Skip final page + RowSelector::skip(12), + ]); + + let ranges = selection.scan_ranges(&index); + + // assert_eq!(mask, vec![false, true, true, false, true, true, false]); + assert_eq!(ranges, vec![10..20, 20..30, 40..50, 50..60]); + assert_eq!( + selection.row_ranges_for_selected_pages(&index, 70), + vec![10..20, 20..30, 40..50, 50..60] + ); + + let selection = RowSelection::from(vec![ + // Skip first page + RowSelector::skip(10), + // Multiple selects in same page + RowSelector::select(3), + RowSelector::skip(3), + RowSelector::select(4), + // Select to page boundary + RowSelector::skip(5), + RowSelector::select(5), + // Skip full page past page boundary + RowSelector::skip(12), + // Select across page boundaries + RowSelector::select(12), + RowSelector::skip(1), + // Select across page boundaries including final page + RowSelector::select(8), + ]); + + let ranges = selection.scan_ranges(&index); + + // assert_eq!(mask, vec![false, true, true, false, true, true, true]); + assert_eq!(ranges, vec![10..20, 20..30, 40..50, 50..60, 60..70]); + + let selection = RowSelection::from(vec![ + // Skip first page + RowSelector::skip(10), + // Multiple selects in same page + RowSelector::select(3), + RowSelector::skip(3), + RowSelector::select(4), + // Select to page boundary + RowSelector::skip(5), + RowSelector::select(5), + // Skip full page past page boundary + RowSelector::skip(12), + // Select to final page boundary + RowSelector::select(12), + RowSelector::skip(1), + // Skip across final page boundary + RowSelector::skip(8), + // Select from final page + RowSelector::select(4), + ]); + + let ranges = selection.scan_ranges(&index); + + // assert_eq!(mask, vec![false, true, true, false, true, true, true]); + assert_eq!(ranges, vec![10..20, 20..30, 40..50, 50..60, 60..70]); + + let selection = RowSelection::from(vec![ + // Skip first page + RowSelector::skip(10), + // Multiple selects in same page + RowSelector::select(3), + RowSelector::skip(3), + RowSelector::select(4), + // Select to remaining in page and first row of next page + RowSelector::skip(5), + RowSelector::select(6), + // Skip remaining + RowSelector::skip(50), + ]); + + let ranges = selection.scan_ranges(&index); + + // assert_eq!(mask, vec![false, true, true, false, true, true, true]); + assert_eq!(ranges, vec![10..20, 20..30, 30..40]); + } +} diff --git a/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/selector.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/selector.rs new file mode 100644 index 000000000..a7ba939ae --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/selection/selector.rs @@ -0,0 +1,469 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +//! The run length backed representation of a [`RowSelection`]: [`RowSelector`] +//! and the primitives operating on a sequence of them. +//! +//! This is the counterpart of the bitmap backing in the `boolean` module, and +//! provides the same set of transforms (`split_off`, `trim`, `offset`, +//! `limit`) over `Vec` instead of a `BooleanBuffer`. +//! +//! [`RowSelection`]: crate::arrow::arrow_reader::RowSelection + +/// [`RowSelection`] is a collection of [`RowSelector`] used to skip rows when +/// scanning a parquet file +/// +/// [`RowSelection`]: crate::arrow::arrow_reader::RowSelection +#[derive(Debug, Clone, Copy, Eq, PartialEq)] +pub struct RowSelector { + /// The number of rows + pub row_count: usize, + + /// If true, skip `row_count` rows + pub skip: bool, +} + +impl RowSelector { + /// Select `row_count` rows + pub fn select(row_count: usize) -> Self { + Self { + row_count, + skip: false, + } + } + + /// Skip `row_count` rows + pub fn skip(row_count: usize) -> Self { + Self { + row_count, + skip: true, + } + } +} + +/// Splits `selectors` at the first `row_count` rows, returning `(head, tail)`. +pub(super) fn split_off_selectors( + mut selectors: Vec, + row_count: usize, +) -> (Vec, Vec) { + let mut total_count = 0; + + // Find the index where the selector exceeds the row count + let find = selectors.iter().position(|selector| { + total_count += selector.row_count; + total_count > row_count + }); + + let split_idx = match find { + Some(idx) => idx, + None => return (selectors, Vec::new()), + }; + + // `selectors` keeps the head, `tail` takes the rest. The selector straddling + // the boundary is split between the two. + let mut tail = selectors.split_off(split_idx); + + // Always present as `split_idx < selectors.len` + let next = tail.first_mut().unwrap(); + let overflow = total_count - row_count; + + if next.row_count != overflow { + selectors.push(RowSelector { + row_count: next.row_count - overflow, + skip: next.skip, + }) + } + next.row_count = overflow; + + (selectors, tail) +} + +/// Skips the first `offset` selected rows of `selectors`. +pub(super) fn offset_selectors(mut selectors: Vec, offset: usize) -> Vec { + let mut selected_count = 0; + let mut skipped_count = 0; + + // Find the index where the selector exceeds the row count + let find = selectors.iter().position(|selector| match selector.skip { + true => { + skipped_count += selector.row_count; + false + } + false => { + selected_count += selector.row_count; + selected_count > offset + } + }); + + let split_idx = match find { + Some(idx) => idx, + None => { + selectors.clear(); + return selectors; + } + }; + + let mut new_selectors = Vec::with_capacity(selectors.len() - split_idx + 1); + new_selectors.push(RowSelector::skip(skipped_count + offset)); + new_selectors.push(RowSelector::select(selected_count - offset)); + new_selectors.extend_from_slice(&selectors[split_idx + 1..]); + + new_selectors +} + +/// Keeps only the first `limit` selected rows of `selectors`. +pub(super) fn limit_selectors( + mut selectors: Vec, + mut limit: usize, +) -> Vec { + if limit == 0 { + selectors.clear(); + } + + for (idx, selection) in selectors.iter_mut().enumerate() { + if !selection.skip { + if selection.row_count >= limit { + selection.row_count = limit; + selectors.truncate(idx + 1); + break; + } else { + limit -= selection.row_count; + } + } + } + selectors +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::arrow::arrow_reader::selection::RowSelection; + + #[test] + fn test_from_selectors_skips_empty_selectors() { + let selection = RowSelection::from(vec![ + RowSelector::select(0), + RowSelector::skip(0), + RowSelector::select(2), + RowSelector::select(0), + RowSelector::skip(1), + ]); + assert_eq!( + selection.selectors(), + vec![RowSelector::select(2), RowSelector::skip(1)] + ); + } + + #[test] + fn test_split_off() { + let mut selection = RowSelection::from(vec![ + RowSelector::skip(34), + RowSelector::select(12), + RowSelector::skip(3), + RowSelector::select(35), + ]); + + let split = selection.split_off(34); + assert_eq!(split.selectors(), vec![RowSelector::skip(34)]); + assert_eq!( + selection.selectors(), + vec![ + RowSelector::select(12), + RowSelector::skip(3), + RowSelector::select(35) + ] + ); + + let split = selection.split_off(5); + assert_eq!(split.selectors(), vec![RowSelector::select(5)]); + assert_eq!( + selection.selectors(), + vec![ + RowSelector::select(7), + RowSelector::skip(3), + RowSelector::select(35) + ] + ); + + let split = selection.split_off(8); + assert_eq!( + split.selectors(), + vec![RowSelector::select(7), RowSelector::skip(1)] + ); + assert_eq!( + selection.selectors(), + vec![RowSelector::skip(2), RowSelector::select(35)] + ); + + let split = selection.split_off(200); + assert_eq!( + split.selectors(), + vec![RowSelector::skip(2), RowSelector::select(35)] + ); + assert!(selection.selectors().is_empty()); + } + + #[test] + fn test_offset() { + let selection = RowSelection::from(vec![ + RowSelector::select(5), + RowSelector::skip(23), + RowSelector::select(7), + RowSelector::skip(33), + RowSelector::select(6), + ]); + + let selection = selection.offset(2); + assert_eq!( + selection.selectors(), + vec![ + RowSelector::skip(2), + RowSelector::select(3), + RowSelector::skip(23), + RowSelector::select(7), + RowSelector::skip(33), + RowSelector::select(6), + ] + ); + + let selection = selection.offset(5); + assert_eq!( + selection.selectors(), + vec![ + RowSelector::skip(30), + RowSelector::select(5), + RowSelector::skip(33), + RowSelector::select(6), + ] + ); + + let selection = selection.offset(3); + assert_eq!( + selection.selectors(), + vec![ + RowSelector::skip(33), + RowSelector::select(2), + RowSelector::skip(33), + RowSelector::select(6), + ] + ); + + let selection = selection.offset(2); + assert_eq!( + selection.selectors(), + vec![RowSelector::skip(68), RowSelector::select(6),] + ); + + let selection = selection.offset(3); + assert_eq!( + selection.selectors(), + vec![RowSelector::skip(71), RowSelector::select(3),] + ); + } + + #[test] + fn test_combine() { + let a = vec![ + RowSelector::skip(3), + RowSelector::skip(3), + RowSelector::select(10), + RowSelector::skip(4), + ]; + + let b = vec![ + RowSelector::skip(3), + RowSelector::skip(3), + RowSelector::select(10), + RowSelector::skip(4), + RowSelector::skip(0), + ]; + + let c = vec![ + RowSelector::skip(2), + RowSelector::skip(4), + RowSelector::select(3), + RowSelector::select(3), + RowSelector::select(4), + RowSelector::skip(3), + RowSelector::skip(1), + RowSelector::skip(0), + ]; + + let expected = RowSelection::from(vec![ + RowSelector::skip(6), + RowSelector::select(10), + RowSelector::skip(4), + ]); + + assert_eq!(RowSelection::from_iter(a), expected); + assert_eq!(RowSelection::from_iter(b), expected); + assert_eq!(RowSelection::from_iter(c), expected); + } + + #[test] + fn test_combine_2elements() { + let a = vec![RowSelector::select(10), RowSelector::select(5)]; + let a_expect = vec![RowSelector::select(15)]; + assert_eq!(RowSelection::from_iter(a).selectors(), a_expect); + + let b = vec![RowSelector::select(10), RowSelector::skip(5)]; + let b_expect = vec![RowSelector::select(10), RowSelector::skip(5)]; + assert_eq!(RowSelection::from_iter(b).selectors(), b_expect); + + let c = vec![RowSelector::skip(10), RowSelector::select(5)]; + let c_expect = vec![RowSelector::skip(10), RowSelector::select(5)]; + assert_eq!(RowSelection::from_iter(c).selectors(), c_expect); + + let d = vec![RowSelector::skip(10), RowSelector::skip(5)]; + let d_expect = vec![RowSelector::skip(15)]; + assert_eq!(RowSelection::from_iter(d).selectors(), d_expect); + } + + #[test] + fn test_from_one_and_empty() { + let a = vec![RowSelector::select(10)]; + let selection1 = RowSelection::from(a.clone()); + assert_eq!(selection1.selectors(), a); + + let b = vec![]; + let selection1 = RowSelection::from(b.clone()); + assert_eq!(selection1.selectors(), b) + } + + #[test] + fn test_limit() { + // Limit to existing limit should no-op + let selection = RowSelection::from(vec![RowSelector::select(10), RowSelector::skip(90)]); + let limited = selection.limit(10); + assert_eq!(RowSelection::from(vec![RowSelector::select(10)]), limited); + + let selection = RowSelection::from(vec![ + RowSelector::select(10), + RowSelector::skip(10), + RowSelector::select(10), + RowSelector::skip(10), + RowSelector::select(10), + ]); + + let limited = selection.clone().limit(5); + let expected = vec![RowSelector::select(5)]; + assert_eq!(limited.selectors(), expected); + + let limited = selection.clone().limit(15); + let expected = vec![ + RowSelector::select(10), + RowSelector::skip(10), + RowSelector::select(5), + ]; + assert_eq!(limited.selectors(), expected); + + let limited = selection.clone().limit(0); + let expected = vec![]; + assert_eq!(limited.selectors(), expected); + + let limited = selection.clone().limit(30); + let expected = vec![ + RowSelector::select(10), + RowSelector::skip(10), + RowSelector::select(10), + RowSelector::skip(10), + RowSelector::select(10), + ]; + assert_eq!(limited.selectors(), expected); + + let limited = selection.limit(100); + let expected = vec![ + RowSelector::select(10), + RowSelector::skip(10), + RowSelector::select(10), + RowSelector::skip(10), + RowSelector::select(10), + ]; + assert_eq!(limited.selectors(), expected); + } + + #[test] + fn test_from_ranges() { + let ranges = [1..3, 4..6, 6..6, 8..8, 9..10]; + let selection = RowSelection::from_consecutive_ranges(ranges.into_iter(), 10); + assert_eq!( + selection.selectors(), + vec![ + RowSelector::skip(1), + RowSelector::select(2), + RowSelector::skip(1), + RowSelector::select(2), + RowSelector::skip(3), + RowSelector::select(1) + ] + ); + + let out_of_order_ranges = [1..3, 8..10, 4..7]; + let result = std::panic::catch_unwind(|| { + RowSelection::from_consecutive_ranges(out_of_order_ranges.into_iter(), 10) + }); + assert!(result.is_err()); + } + + #[test] + fn test_empty_selector() { + let selection = RowSelection::from(vec![ + RowSelector::skip(0), + RowSelector::select(2), + RowSelector::skip(0), + RowSelector::select(2), + ]); + assert_eq!(selection.selectors(), vec![RowSelector::select(4)]); + + let selection = RowSelection::from(vec![ + RowSelector::select(0), + RowSelector::skip(2), + RowSelector::select(0), + RowSelector::skip(2), + ]); + assert_eq!(selection.selectors(), vec![RowSelector::skip(4)]); + } + + #[test] + fn test_trim() { + let selection = RowSelection::from(vec![ + RowSelector::skip(34), + RowSelector::select(12), + RowSelector::skip(3), + RowSelector::select(35), + ]); + + let expected = vec![ + RowSelector::skip(34), + RowSelector::select(12), + RowSelector::skip(3), + RowSelector::select(35), + ]; + + assert_eq!(selection.trim().selectors(), expected); + + let selection = RowSelection::from(vec![ + RowSelector::skip(34), + RowSelector::select(12), + RowSelector::skip(3), + ]); + + let expected = vec![RowSelector::skip(34), RowSelector::select(12)]; + + assert_eq!(selection.trim().selectors(), expected); + } +} diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/statistics.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/statistics.rs similarity index 90% rename from thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/statistics.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/statistics.rs index 99bf28c8c..c096448b6 100644 --- a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_reader/statistics.rs +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_reader/statistics.rs @@ -47,7 +47,6 @@ use arrow_array::{ use arrow_buffer::{NullBufferBuilder, i256}; use arrow_schema::{DataType, Field, Schema, TimeUnit}; use half::f16; -use paste::paste; use std::sync::Arc; // Convert the bytes array to i32. @@ -356,73 +355,125 @@ make_decimal_stats_iterator!( from_bytes_to_i256 ); -/// Special macro to combine the statistics iterators for min and max using the [`mod@paste`] macro. +/// Special macro to combine the statistics iterators for min and max. /// This is used to avoid repeating the same code for min and max statistics extractions /// /// Parameters: -/// stat_type_prefix: The prefix of the statistics iterator type (e.g. `Min` or `Max`) /// data_type: The data type of the statistics (e.g. `DataType::Int32`) /// iterator: The iterator of [`ParquetStatistics`] to extract the statistics from. macro_rules! get_statistics { - ($stat_type_prefix: ident, $data_type: ident, $iterator: ident, $physical_type: ident) => { - paste! { + (Min, $data_type: ident, $iterator: ident, $physical_type: ident) => { + get_statistics!( + $data_type, + $iterator, + $physical_type, + MinBooleanStatsIterator, + MinInt32StatsIterator, + MinInt64StatsIterator, + MinFloatStatsIterator, + MinDoubleStatsIterator, + MinByteArrayStatsIterator, + MinFixedLenByteArrayStatsIterator, + MinDecimal32StatsIterator, + MinDecimal64StatsIterator, + MinDecimal128StatsIterator, + MinDecimal256StatsIterator, + min_statistics + ) + }; + (Max, $data_type: ident, $iterator: ident, $physical_type: ident) => { + get_statistics!( + $data_type, + $iterator, + $physical_type, + MaxBooleanStatsIterator, + MaxInt32StatsIterator, + MaxInt64StatsIterator, + MaxFloatStatsIterator, + MaxDoubleStatsIterator, + MaxByteArrayStatsIterator, + MaxFixedLenByteArrayStatsIterator, + MaxDecimal32StatsIterator, + MaxDecimal64StatsIterator, + MaxDecimal128StatsIterator, + MaxDecimal256StatsIterator, + max_statistics + ) + }; + ( + $data_type: ident, + $iterator: ident, + $physical_type: ident, + $boolean_iter: ident, + $int32_iter: ident, + $int64_iter: ident, + $float_iter: ident, + $double_iter: ident, + $byte_array_iter: ident, + $fixed_len_byte_array_iter: ident, + $decimal32_iter: ident, + $decimal64_iter: ident, + $decimal128_iter: ident, + $decimal256_iter: ident, + $dictionary_statistics: ident + ) => { match $data_type { DataType::Boolean => Ok(Arc::new(BooleanArray::from_iter( - [<$stat_type_prefix BooleanStatsIterator>]::new($iterator).map(|x| x.copied()), + $boolean_iter::new($iterator).map(|x| x.copied()), ))), DataType::Int8 => Ok(Arc::new(Int8Array::from_iter( - [<$stat_type_prefix Int32StatsIterator>]::new($iterator).map(|x| { + $int32_iter::new($iterator).map(|x| { x.and_then(|x| i8::try_from(*x).ok()) }), ))), DataType::Int16 => Ok(Arc::new(Int16Array::from_iter( - [<$stat_type_prefix Int32StatsIterator>]::new($iterator).map(|x| { + $int32_iter::new($iterator).map(|x| { x.and_then(|x| i16::try_from(*x).ok()) }), ))), DataType::Int32 => Ok(Arc::new(Int32Array::from_iter( - [<$stat_type_prefix Int32StatsIterator>]::new($iterator).map(|x| x.copied()), + $int32_iter::new($iterator).map(|x| x.copied()), ))), DataType::Int64 => Ok(Arc::new(Int64Array::from_iter( - [<$stat_type_prefix Int64StatsIterator>]::new($iterator).map(|x| x.copied()), + $int64_iter::new($iterator).map(|x| x.copied()), ))), DataType::UInt8 => Ok(Arc::new(UInt8Array::from_iter( - [<$stat_type_prefix Int32StatsIterator>]::new($iterator).map(|x| { + $int32_iter::new($iterator).map(|x| { x.and_then(|x| u8::try_from(*x).ok()) }), ))), DataType::UInt16 => Ok(Arc::new(UInt16Array::from_iter( - [<$stat_type_prefix Int32StatsIterator>]::new($iterator).map(|x| { + $int32_iter::new($iterator).map(|x| { x.and_then(|x| u16::try_from(*x).ok()) }), ))), DataType::UInt32 => Ok(Arc::new(UInt32Array::from_iter( - [<$stat_type_prefix Int32StatsIterator>]::new($iterator).map(|x| x.map(|x| *x as u32)), + $int32_iter::new($iterator).map(|x| x.map(|x| *x as u32)), ))), DataType::UInt64 => Ok(Arc::new(UInt64Array::from_iter( - [<$stat_type_prefix Int64StatsIterator>]::new($iterator).map(|x| x.map(|x| *x as u64)), + $int64_iter::new($iterator).map(|x| x.map(|x| *x as u64)), ))), DataType::Float16 => Ok(Arc::new(Float16Array::from_iter( - [<$stat_type_prefix FixedLenByteArrayStatsIterator>]::new($iterator).map(|x| x.and_then(|x| { + $fixed_len_byte_array_iter::new($iterator).map(|x| x.and_then(|x| { from_bytes_to_f16(x) })), ))), DataType::Float32 => Ok(Arc::new(Float32Array::from_iter( - [<$stat_type_prefix FloatStatsIterator>]::new($iterator).map(|x| x.copied()), + $float_iter::new($iterator).map(|x| x.copied()), ))), DataType::Float64 => Ok(Arc::new(Float64Array::from_iter( - [<$stat_type_prefix DoubleStatsIterator>]::new($iterator).map(|x| x.copied()), + $double_iter::new($iterator).map(|x| x.copied()), ))), DataType::Date32 => Ok(Arc::new(Date32Array::from_iter( - [<$stat_type_prefix Int32StatsIterator>]::new($iterator).map(|x| x.copied()), + $int32_iter::new($iterator).map(|x| x.copied()), ))), DataType::Date64 if $physical_type == Some(PhysicalType::INT32) => Ok(Arc::new(Date64Array::from_iter( - [<$stat_type_prefix Int32StatsIterator>]::new($iterator) + $int32_iter::new($iterator) .map(|x| x.map(|x| i64::from(*x) * 24 * 60 * 60 * 1000))))), DataType::Date64 if $physical_type == Some(PhysicalType::INT64) => Ok(Arc::new(Date64Array::from_iter( - [<$stat_type_prefix Int64StatsIterator>]::new($iterator).map(|x| x.copied()),))), + $int64_iter::new($iterator).map(|x| x.copied()),))), DataType::Timestamp(unit, timezone) =>{ - let iter = [<$stat_type_prefix Int64StatsIterator>]::new($iterator).map(|x| x.copied()); + let iter = $int64_iter::new($iterator).map(|x| x.copied()); Ok(match unit { TimeUnit::Second => Arc::new(TimestampSecondArray::from_iter(iter).with_timezone_opt(timezone.clone())), TimeUnit::Millisecond => Arc::new(TimestampMillisecondArray::from_iter(iter).with_timezone_opt(timezone.clone())), @@ -433,10 +484,10 @@ macro_rules! get_statistics { DataType::Time32(unit) => { Ok(match unit { TimeUnit::Second => Arc::new(Time32SecondArray::from_iter( - [<$stat_type_prefix Int32StatsIterator>]::new($iterator).map(|x| x.copied()), + $int32_iter::new($iterator).map(|x| x.copied()), )), TimeUnit::Millisecond => Arc::new(Time32MillisecondArray::from_iter( - [<$stat_type_prefix Int32StatsIterator>]::new($iterator).map(|x| x.copied()), + $int32_iter::new($iterator).map(|x| x.copied()), )), _ => { let len = $iterator.count(); @@ -448,10 +499,10 @@ macro_rules! get_statistics { DataType::Time64(unit) => { Ok(match unit { TimeUnit::Microsecond => Arc::new(Time64MicrosecondArray::from_iter( - [<$stat_type_prefix Int64StatsIterator>]::new($iterator).map(|x| x.copied()), + $int64_iter::new($iterator).map(|x| x.copied()), )), TimeUnit::Nanosecond => Arc::new(Time64NanosecondArray::from_iter( - [<$stat_type_prefix Int64StatsIterator>]::new($iterator).map(|x| x.copied()), + $int64_iter::new($iterator).map(|x| x.copied()), )), _ => { let len = $iterator.count(); @@ -461,13 +512,13 @@ macro_rules! get_statistics { }) }, DataType::Binary => Ok(Arc::new(BinaryArray::from_iter( - [<$stat_type_prefix ByteArrayStatsIterator>]::new($iterator) + $byte_array_iter::new($iterator) ))), DataType::LargeBinary => Ok(Arc::new(LargeBinaryArray::from_iter( - [<$stat_type_prefix ByteArrayStatsIterator>]::new($iterator) + $byte_array_iter::new($iterator) ))), DataType::Utf8 => { - let iterator = [<$stat_type_prefix ByteArrayStatsIterator>]::new($iterator); + let iterator = $byte_array_iter::new($iterator); let mut builder = StringBuilder::new(); for x in iterator { let Some(x) = x else { @@ -485,7 +536,7 @@ macro_rules! get_statistics { Ok(Arc::new(builder.finish())) }, DataType::LargeUtf8 => { - let iterator = [<$stat_type_prefix ByteArrayStatsIterator>]::new($iterator); + let iterator = $byte_array_iter::new($iterator); let mut builder = LargeStringBuilder::new(); for x in iterator { let Some(x) = x else { @@ -503,7 +554,7 @@ macro_rules! get_statistics { Ok(Arc::new(builder.finish())) }, DataType::FixedSizeBinary(size) => { - let iterator = [<$stat_type_prefix FixedLenByteArrayStatsIterator>]::new($iterator); + let iterator = $fixed_len_byte_array_iter::new($iterator); let mut builder = FixedSizeBinaryBuilder::new(*size); for x in iterator { let Some(x) = x else { @@ -523,33 +574,33 @@ macro_rules! get_statistics { }, DataType::Decimal32(precision, scale) => { let arr = Decimal32Array::from_iter( - [<$stat_type_prefix Decimal32StatsIterator>]::new($iterator) + $decimal32_iter::new($iterator) ).with_precision_and_scale(*precision, *scale)?; Ok(Arc::new(arr)) }, DataType::Decimal64(precision, scale) => { let arr = Decimal64Array::from_iter( - [<$stat_type_prefix Decimal64StatsIterator>]::new($iterator) + $decimal64_iter::new($iterator) ).with_precision_and_scale(*precision, *scale)?; Ok(Arc::new(arr)) }, DataType::Decimal128(precision, scale) => { let arr = Decimal128Array::from_iter( - [<$stat_type_prefix Decimal128StatsIterator>]::new($iterator) + $decimal128_iter::new($iterator) ).with_precision_and_scale(*precision, *scale)?; Ok(Arc::new(arr)) }, DataType::Decimal256(precision, scale) => { let arr = Decimal256Array::from_iter( - [<$stat_type_prefix Decimal256StatsIterator>]::new($iterator) + $decimal256_iter::new($iterator) ).with_precision_and_scale(*precision, *scale)?; Ok(Arc::new(arr)) }, DataType::Dictionary(_, value_type) => { - [<$stat_type_prefix:lower _ statistics>](value_type, $iterator, $physical_type) + $dictionary_statistics(value_type, $iterator, $physical_type) }, DataType::Utf8View => { - let iterator = [<$stat_type_prefix ByteArrayStatsIterator>]::new($iterator); + let iterator = $byte_array_iter::new($iterator); let mut builder = StringViewBuilder::new(); for x in iterator { let Some(x) = x else { @@ -567,7 +618,7 @@ macro_rules! get_statistics { Ok(Arc::new(builder.finish())) }, DataType::BinaryView => { - let iterator = [<$stat_type_prefix ByteArrayStatsIterator>]::new($iterator); + let iterator = $byte_array_iter::new($iterator); let mut builder = BinaryViewBuilder::new(); for x in iterator { let Some(x) = x else { @@ -597,22 +648,45 @@ macro_rules! get_statistics { // don't know how to extract statistics, so return a null array Ok(new_null_array($data_type, len)) } - }}} + } + }; } macro_rules! get_data_page_statistics { - ($stat_type_prefix: ident, $data_type: ident, $iterator: ident, $physical_type: ident) => { - { - let chunks: Vec<(usize, &ColumnIndexMetaData)> = $iterator.collect(); - let capacity: usize = chunks.iter().map(|c| c.0).sum(); - paste! { - match $data_type { + (Min, $data_type: ident, $iterator: ident, $physical_type: ident) => { + get_data_page_statistics!( + $data_type, + $iterator, + $physical_type, + min_values_iter, + min_page_statistics + ) + }; + (Max, $data_type: ident, $iterator: ident, $physical_type: ident) => { + get_data_page_statistics!( + $data_type, + $iterator, + $physical_type, + max_values_iter, + max_page_statistics + ) + }; + ( + $data_type: ident, + $iterator: ident, + $physical_type: ident, + $values_iter: ident, + $page_statistics: ident + ) => {{ + let chunks: Vec<(usize, &ColumnIndexMetaData)> = $iterator.collect(); + let capacity: usize = chunks.iter().map(|c| c.0).sum(); + match $data_type { DataType::Boolean => { let mut b = BooleanBuilder::with_capacity(capacity); for (len, index) in chunks { match index { ColumnIndexMetaData::BOOLEAN(index) => { - for val in index.[<$stat_type_prefix:lower _values_iter>]() { + for val in index.$values_iter() { b.append_option(val.copied()); } } @@ -627,7 +701,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.and_then(|&x| u8::try_from(x).ok())), ); } @@ -642,7 +716,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.and_then(|&x| u16::try_from(x).ok())), ); } @@ -657,7 +731,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|&x| x as u32)), ); } @@ -672,7 +746,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT64(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|&x| x as u64)), ); } @@ -687,7 +761,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.and_then(|&x| i8::try_from(x).ok())), ); } @@ -702,7 +776,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.and_then(|&x| i16::try_from(x).ok())), ); } @@ -717,7 +791,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -732,7 +806,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT64(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -747,7 +821,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::FIXED_LEN_BYTE_ARRAY(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.and_then(|x| from_bytes_to_f16(x))), ); } @@ -762,7 +836,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::FLOAT(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -777,7 +851,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::DOUBLE(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -791,7 +865,7 @@ macro_rules! get_data_page_statistics { for (len, index) in chunks { match index { ColumnIndexMetaData::BYTE_ARRAY(index) => { - for val in index.[<$stat_type_prefix:lower _values_iter>]() { + for val in index.$values_iter() { b.append_option(val.map(|x| x.as_ref())); } } @@ -805,7 +879,7 @@ macro_rules! get_data_page_statistics { for (len, index) in chunks { match index { ColumnIndexMetaData::BYTE_ARRAY(index) => { - for val in index.[<$stat_type_prefix:lower _values_iter>]() { + for val in index.$values_iter() { b.append_option(val.map(|x| x.as_ref())); } } @@ -819,7 +893,7 @@ macro_rules! get_data_page_statistics { for (len, index) in chunks { match index { ColumnIndexMetaData::BYTE_ARRAY(index) => { - for val in index.[<$stat_type_prefix:lower _values_iter>]() { + for val in index.$values_iter() { match val { Some(x) => match std::str::from_utf8(x.as_ref()) { Ok(s) => b.append_value(s), @@ -839,7 +913,7 @@ macro_rules! get_data_page_statistics { for (len, index) in chunks { match index { ColumnIndexMetaData::BYTE_ARRAY(index) => { - for val in index.[<$stat_type_prefix:lower _values_iter>]() { + for val in index.$values_iter() { match val { Some(x) => match std::str::from_utf8(x.as_ref()) { Ok(s) => b.append_value(s), @@ -855,7 +929,7 @@ macro_rules! get_data_page_statistics { Ok(Arc::new(b.finish())) }, DataType::Dictionary(_, value_type) => { - [<$stat_type_prefix:lower _ page_statistics>](value_type, chunks.into_iter(), $physical_type) + $page_statistics(value_type, chunks.into_iter(), $physical_type) }, DataType::Timestamp(unit, timezone) => { match unit { @@ -865,7 +939,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT64(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -880,7 +954,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT64(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -895,7 +969,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT64(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -910,7 +984,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT64(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -927,7 +1001,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -942,7 +1016,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|&x| (x as i64) * 24 * 60 * 60 * 1000)), ); } @@ -957,7 +1031,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT64(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -972,25 +1046,25 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } ColumnIndexMetaData::INT64(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.and_then(|&x| i32::try_from(x).ok())), ); } ColumnIndexMetaData::BYTE_ARRAY(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|x| from_bytes_to_i32(x.as_ref()))), ); } ColumnIndexMetaData::FIXED_LEN_BYTE_ARRAY(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|x| from_bytes_to_i32(x.as_ref()))), ); } @@ -1005,25 +1079,25 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|x| *x as i64)), ); } ColumnIndexMetaData::INT64(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } ColumnIndexMetaData::BYTE_ARRAY(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|x| from_bytes_to_i64(x.as_ref()))), ); } ColumnIndexMetaData::FIXED_LEN_BYTE_ARRAY(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|x| from_bytes_to_i64(x.as_ref()))), ); } @@ -1038,25 +1112,25 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|x| *x as i128)), ); } ColumnIndexMetaData::INT64(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|x| *x as i128)), ); } ColumnIndexMetaData::BYTE_ARRAY(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|x| from_bytes_to_i128(x.as_ref()))), ); } ColumnIndexMetaData::FIXED_LEN_BYTE_ARRAY(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|x| from_bytes_to_i128(x.as_ref()))), ); } @@ -1071,25 +1145,25 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|x| i256::from_i128(*x as i128))), ); } ColumnIndexMetaData::INT64(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|x| i256::from_i128(*x as i128))), ); } ColumnIndexMetaData::BYTE_ARRAY(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|x| from_bytes_to_i256(x.as_ref()))), ); } ColumnIndexMetaData::FIXED_LEN_BYTE_ARRAY(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.map(|x| from_bytes_to_i256(x.as_ref()))), ); } @@ -1106,7 +1180,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -1121,7 +1195,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT32(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -1143,7 +1217,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT64(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -1158,7 +1232,7 @@ macro_rules! get_data_page_statistics { match index { ColumnIndexMetaData::INT64(index) => { b.extend_from_iter_option( - index.[<$stat_type_prefix:lower _values_iter>]() + index.$values_iter() .map(|val| val.copied()), ); } @@ -1177,7 +1251,7 @@ macro_rules! get_data_page_statistics { for (len, index) in chunks { match index { ColumnIndexMetaData::FIXED_LEN_BYTE_ARRAY(index) => { - for val in index.[<$stat_type_prefix:lower _values_iter>]() { + for val in index.$values_iter() { match val { Some(v) => { if v.len() == *size as usize { @@ -1200,7 +1274,7 @@ macro_rules! get_data_page_statistics { for (len, index) in chunks { match index { ColumnIndexMetaData::BYTE_ARRAY(index) => { - for val in index.[<$stat_type_prefix:lower _values_iter>]() { + for val in index.$values_iter() { match val { Some(x) => match std::str::from_utf8(x.as_ref()) { Ok(s) => b.append_value(s), @@ -1222,7 +1296,7 @@ macro_rules! get_data_page_statistics { for (len, index) in chunks { match index { ColumnIndexMetaData::BYTE_ARRAY(index) => { - for val in index.[<$stat_type_prefix:lower _values_iter>]() { + for val in index.$values_iter() { match val { Some(v) => b.append_value(v.as_ref()), None => b.append_null(), @@ -1254,8 +1328,7 @@ macro_rules! get_data_page_statistics { }, } } - } - } + }; } /// Extracts the min statistics from an iterator of [`ParquetStatistics`] to an /// [`ArrayRef`] diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_writer/byte_array.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_writer/byte_array.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/arrow_writer/byte_array.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/arrow_writer/byte_array.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_writer/levels.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_writer/levels.rs similarity index 95% rename from thirdparty/crates/parquet-59.1.0/src/arrow/arrow_writer/levels.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/arrow_writer/levels.rs index 8abdbcc77..278189869 100644 --- a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_writer/levels.rs +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_writer/levels.rs @@ -384,131 +384,134 @@ impl LevelInfoBuilder { return; } - // Fast path for "last-level list": when the child has no nested rep_levels, - // each child element produces exactly one rep_level entry. We can batch - // contiguous non-empty list slots into a single child.write() call, then - // fix up the rep_levels at list-slot boundaries using offsets directly. - // - // Kept as a separate function so the compiler can optimize write_list's + // Dispatch to separate functions so the compiler can optimize each // hot loop independently (function body size affects codegen quality). if is_last_level { - Self::write_list_last_level(child, ctx, offsets, nulls, range); - return; + Self::write_list_direct(child, ctx, offsets, nulls, range); + } else { + Self::write_list_scan(child, ctx, offsets, nulls, range); } + } - let offsets = &offsets[range.start..range.end + 1]; - - let write_non_null_slice = - |child: &mut LevelInfoBuilder, start_idx: usize, end_idx: usize| { - child.write(start_idx..end_idx); - child.visit_leaves(|leaf| { - let rep_levels = leaf.rep_levels.materialize_mut().unwrap(); - let mut rev = rep_levels.iter_mut().rev(); - let mut remaining = end_idx - start_idx; + /// Batch write for lists whose child has no nested repetition. + /// + /// "direct" means writing the child rep levels using offsets without scanning. + fn write_list_direct( + child: &mut LevelInfoBuilder, + ctx: &LevelContext, + offsets: &[O], + nulls: Option<&NullBuffer>, + range: Range, + ) { + let list_start_rep = ctx.rep_level - 1; - loop { - let next = rev.next().unwrap(); - if *next > ctx.rep_level { - // Nested element - ignore - continue; - } + let emit_non_empty_run = |child: &mut LevelInfoBuilder, run_offsets: &[O]| { + debug_assert!(run_offsets.len() >= 2); + let values_start = run_offsets[0].as_usize(); + let values_end = run_offsets[run_offsets.len() - 1].as_usize(); + debug_assert!(values_end > values_start); - remaining -= 1; - if remaining == 0 { - *next = ctx.rep_level - 1; - break; - } - } - }) - }; + child.write(values_start..values_end); - // In a list column, each row falls into one of three categories: - // - "null": the list slot is absent (!is_valid), encoded at def_level - 2 - // - "empty": the list slot is present but has zero elements - // (offsets[i] == offsets[i+1]), encoded at def_level - 1 - // - non-empty: the list slot has child values, which are recursed into - // - // Consecutive runs of null or empty rows are batched and written together. - let write_null_run = |child: &mut LevelInfoBuilder, count: usize| { - if count > 0 { - child.visit_leaves(|leaf| { - leaf.append_rep_level_run(ctx.rep_level - 1, count); - leaf.append_def_level_run(ctx.def_level - 2, count); - }); - } + // The first element of each list slot needs rep_level = + // list_start_rep to mark a new list boundary. Because there's a 1:1 + // mapping between child elements and rep_level entries, the position + // of each slot's first element is directly computable from offsets. + child.visit_leaves(|leaf| { + debug_assert!(leaf.max_rep_level == ctx.rep_level); + let rep_levels = leaf.rep_levels.materialize_mut().unwrap(); + let batch_len = values_end - values_start; + let batch_base = rep_levels.len() - batch_len; + for slot_offset in run_offsets.iter().take(run_offsets.len() - 1) { + let pos = batch_base + (slot_offset.as_usize() - values_start); + rep_levels[pos] = list_start_rep; + } + }); }; - let write_empty_run = |child: &mut LevelInfoBuilder, count: usize| { - if count > 0 { - child.visit_leaves(|leaf| { - leaf.append_rep_level_run(ctx.rep_level - 1, count); - leaf.append_def_level_run(ctx.def_level - 1, count); - }); - } - }; + Self::write_list_impl(child, ctx, offsets, nulls, range, emit_non_empty_run); + } - match nulls { - Some(nulls) => { - let null_offset = range.start; - let mut pending_nulls: usize = 0; - let mut pending_empties: usize = 0; + /// Batch write for lists whose child has nested repetition. + /// + /// After batch-writing child elements, scans backward through rep_levels + /// counting child-element starts to find and stamp slot boundaries. + /// + /// Scan backward because we don't know start offset before writing. + fn write_list_scan( + child: &mut LevelInfoBuilder, + ctx: &LevelContext, + offsets: &[O], + nulls: Option<&NullBuffer>, + range: Range, + ) { + let list_start_rep = ctx.rep_level - 1; - // TODO: Faster bitmask iteration (#1757) - for (idx, w) in offsets.windows(2).enumerate() { - let is_valid = nulls.is_valid(idx + null_offset); - let start_idx = w[0].as_usize(); - let end_idx = w[1].as_usize(); + let emit_non_empty_run = |child: &mut LevelInfoBuilder, run_offsets: &[O]| { + debug_assert!(run_offsets.len() >= 2); + let values_start = run_offsets[0].as_usize(); + let values_end = run_offsets[run_offsets.len() - 1].as_usize(); + debug_assert!(values_end > values_start); - if !is_valid { - write_empty_run(child, pending_empties); - pending_empties = 0; - pending_nulls += 1; - } else if start_idx == end_idx { - write_null_run(child, pending_nulls); - pending_nulls = 0; - pending_empties += 1; - } else { - write_null_run(child, pending_nulls); - pending_nulls = 0; - write_empty_run(child, pending_empties); - pending_empties = 0; - write_non_null_slice(child, start_idx, end_idx); + child.write(values_start..values_end); + + child.visit_leaves(|leaf| { + let rep_levels = leaf.rep_levels.materialize_mut().unwrap(); + + if leaf.max_rep_level == ctx.rep_level { + // This algorithm is the same as write_list_direct. + // Use a separate function because the branch code size would affect codegen + // quality of the hot loop of write_list_direct. + let batch_len = values_end - values_start; + let batch_base = rep_levels.len() - batch_len; + for slot_offset in run_offsets.iter().take(run_offsets.len() - 1) { + let pos = batch_base + (slot_offset.as_usize() - values_start); + rep_levels[pos] = list_start_rep; } - } - write_null_run(child, pending_nulls); - write_empty_run(child, pending_empties); - } - None => { - let mut pending_empties: usize = 0; - for w in offsets.windows(2) { - let start_idx = w[0].as_usize(); - let end_idx = w[1].as_usize(); - if start_idx == end_idx { - pending_empties += 1; - } else { - write_empty_run(child, pending_empties); - pending_empties = 0; - write_non_null_slice(child, start_idx, end_idx); + } else { + // Backward scan: count child-element starts (rep <= ctx.rep_level) + // and stamp list_start_rep at slot boundaries. + let mut slot_bounds = run_offsets[..run_offsets.len() - 1].iter().rev(); + let mut next_stamp_at = values_end - slot_bounds.next().unwrap().as_usize(); + let mut seen = 0usize; + + for rep in rep_levels.iter_mut().rev() { + // Asserting rep >= ctx.rep_level to ensure low level depth haven't + // being written. + debug_assert!(*rep >= ctx.rep_level); + // Count element starts by skipping nested reps (rep > ctx.rep_level). + // + // `==` would also work here: the child is written before the + // parent, so no entry within the batch has rep < ctx.rep_level. + // Benchmarks show no difference, so keep the more defensive `<=`. + if *rep <= ctx.rep_level { + seen += 1; + if seen == next_stamp_at { + *rep = list_start_rep; + match slot_bounds.next() { + Some(offset) => next_stamp_at = values_end - offset.as_usize(), + None => break, + } + } + } } } - write_empty_run(child, pending_empties); - } - } + }); + }; + + Self::write_list_impl(child, ctx, offsets, nulls, range, emit_non_empty_run); } - /// Optimized write path for lists whose child has no nested repetition levels. - /// - /// When the child is a leaf (or a struct of leaves), each child element maps to - /// exactly one rep_level entry. This lets us batch contiguous non-empty list - /// slots into a single `child.write()` call, then stamp the list-start markers - /// at positions computed directly from offsets — avoiding per-slot `write` + - /// reverse-scan overhead. - fn write_list_last_level( + /// Shared run-classification loop for write_list_direct and write_list_scan. + /// Monomorphized per `emit_non_empty_run` closure type, giving the compiler + /// separate optimization contexts for each backfill strategy. + fn write_list_impl( child: &mut LevelInfoBuilder, ctx: &LevelContext, offsets: &[O], nulls: Option<&NullBuffer>, range: Range, + mut emit_non_empty_run: impl FnMut(&mut LevelInfoBuilder, &[O]), ) { let null_offset = range.start; let offsets = &offsets[range.start..range.end + 1]; @@ -528,33 +531,6 @@ impl LevelInfoBuilder { }); }; - let emit_non_empty_run = |child: &mut LevelInfoBuilder, run_offsets: &[O]| { - debug_assert!(run_offsets.len() >= 2); - let values_start = run_offsets[0].as_usize(); - let values_end = run_offsets[run_offsets.len() - 1].as_usize(); - debug_assert!(values_end > values_start); - - // Write all leaf values in one batch. Since the child has no nested - // rep, this emits (values_end - values_start) rep_levels all equal - // to ctx.rep_level (= "continuation within list"). - child.write(values_start..values_end); - - // The first element of each list slot needs rep_level = - // list_start_rep to mark a new list boundary. Because there's a 1:1 - // mapping between child elements and rep_level entries, the position - // of each slot's first element is directly computable from offsets. - child.visit_leaves(|leaf| { - let rep_levels = leaf.rep_levels.materialize_mut().unwrap(); - let batch_len = values_end - values_start; - let batch_base = rep_levels.len() - batch_len; - - for slot_offset in run_offsets.iter().take(run_offsets.len() - 1) { - let list_start_pos = batch_base + (slot_offset.as_usize() - values_start); - rep_levels[list_start_pos] = list_start_rep; - } - }); - }; - // Classify each slot, detect run boundaries, flush on transition. #[derive(Clone, Copy, PartialEq)] enum SlotKind { @@ -591,7 +567,9 @@ impl LevelInfoBuilder { } match nulls { - Some(nulls) => { + // A null buffer without any null can skip the per-slot validity + // checks and use the null-free classification loop below. + Some(nulls) if nulls.null_count() > 0 => { let mut run_kind = classify!(0, nulls); let mut run_start: usize = 0; for i in 1..num_slots { @@ -604,7 +582,7 @@ impl LevelInfoBuilder { } flush_run!(run_kind, run_start, num_slots); } - None => { + _ => { let mut run_kind = if offsets[0] == offsets[1] { SlotKind::Empty } else { diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_writer/mod.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_writer/mod.rs similarity index 97% rename from thirdparty/crates/parquet-59.1.0/src/arrow/arrow_writer/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/arrow_writer/mod.rs index e985c183e..8b9aea2e1 100644 --- a/thirdparty/crates/parquet-59.1.0/src/arrow/arrow_writer/mod.rs +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/arrow_writer/mod.rs @@ -20,14 +20,14 @@ use crate::column::chunker::ContentDefinedChunker; use bytes::Bytes; -use std::io::{Read, Write}; +use std::io::Write; use std::slice::Iter; use std::sync::{Arc, Mutex}; use std::vec::IntoIter; use arrow_array::cast::AsArray; -use arrow_array::types::*; use arrow_array::{ArrayRef, Int32Array, RecordBatch, RecordBatchWriter}; +use arrow_array::{PrimitiveArray, types::*}; use arrow_schema::{ ArrowError, DataType as ArrowDataType, Field, IntervalUnit, SchemaRef, TimeUnit, }; @@ -769,24 +769,22 @@ impl ArrowColumnChunkData { } } -/// A streaming [`Read`] over one column chunk's buffered pages, in final file -/// order: the dictionary page (if any) first, then the data pages. +/// A streaming iterator over one column chunk's buffered page blobs, in final +/// file order: the dictionary page (if any) first, then the data pages. /// /// Each blob is taken back out of the [`PageStore`] *as it is /// consumed* and released immediately afterwards, so splicing a chunk into the /// output file never materializes more than a single page in memory at a time. /// This is what keeps the splice phase within the memory bound for a spilling /// backend (an in-memory store already holds the bytes, so it is unaffected). -struct StreamingColumnChunkReader { +struct StreamingColumnChunkPages { store: Box, /// Page handles in final file order: the dictionary page first (if any), /// then the data pages. keys: IntoIter, - /// The blob currently being drained into the output; emptied as it is read. - current: Bytes, } -impl StreamingColumnChunkReader { +impl StreamingColumnChunkPages { fn new(data: ArrowColumnChunkData) -> Self { // The dictionary page must be emitted first, ahead of the data pages, // even though it was the last page produced. @@ -801,27 +799,16 @@ impl StreamingColumnChunkReader { Self { store: data.store, keys: keys.into_iter(), - current: Bytes::new(), } } } -impl Read for StreamingColumnChunkReader { - fn read(&mut self, out: &mut [u8]) -> std::io::Result { - // Refill from the next blob whenever the current one is drained: the - // dictionary page first, then each data page, all taken from the store. - while self.current.is_empty() { - if let Some(key) = self.keys.next() { - self.current = self.store.take(key).map_err(std::io::Error::other)?; - } else { - return Ok(0); - } - } +impl Iterator for StreamingColumnChunkPages { + type Item = Result; - let len = self.current.len().min(out.len()); - let b = self.current.split_to(len); - out[..len].copy_from_slice(&b); - Ok(len) + fn next(&mut self) -> Option { + let key = self.keys.next()?; + Some(self.store.take(key)) } } @@ -998,8 +985,8 @@ impl ArrowColumnChunk { // it ahead of the data pages in the recorded offsets before the splice. let close = close.update_dictionary_location(data.dictionary_len)?; - let reader = StreamingColumnChunkReader::new(data); - writer.append_column_from_read(reader, close) + let pages = StreamingColumnChunkPages::new(data); + writer.append_column_from_pages(pages, close) } } @@ -1764,19 +1751,19 @@ fn write_leaf( } ArrowDataType::Decimal32(_, _) => { let array = column.as_primitive::(); - get_decimal_32_array_slice(array, indices.iter().copied()) + get_decimal_array_slice(array, indices.iter().copied()) } ArrowDataType::Decimal64(_, _) => { let array = column.as_primitive::(); - get_decimal_64_array_slice(array, indices.iter().copied()) + get_decimal_array_slice(array, indices.iter().copied()) } ArrowDataType::Decimal128(_, _) => { let array = column.as_primitive::(); - get_decimal_128_array_slice(array, indices.iter().copied()) + get_decimal_array_slice(array, indices.iter().copied()) } ArrowDataType::Decimal256(_, _) => { let array = column.as_primitive::(); - get_decimal_256_array_slice(array, indices.iter().copied()) + get_decimal_array_slice(array, indices.iter().copied()) } ArrowDataType::Float16 => { let array = column.as_primitive::(); @@ -1834,14 +1821,10 @@ fn get_interval_ym_array_slice( array: &arrow_array::IntervalYearMonthArray, indices: impl ExactSizeIterator, ) -> Vec { - let mut values = Vec::with_capacity(indices.len()); - for i in indices { - let mut value = array.value(i).to_le_bytes().to_vec(); - let mut suffix = vec![0; 8]; - value.append(&mut suffix); - values.push(FixedLenByteArray::from(ByteArray::from(value))) - } - values + chunk_array_slice(12, indices, move |i, chunk| { + let value = array.value(i); + chunk[0..4].copy_from_slice(&value.to_le_bytes()); + }) } /// Returns 12-byte values representing 3 values of months, days and milliseconds (4-bytes each). @@ -1850,93 +1833,111 @@ fn get_interval_dt_array_slice( array: &arrow_array::IntervalDayTimeArray, indices: impl ExactSizeIterator, ) -> Vec { - let mut values = Vec::with_capacity(indices.len()); - for i in indices { - let mut out = [0; 12]; + chunk_array_slice(12, indices, move |i, chunk| { let value = array.value(i); - out[4..8].copy_from_slice(&value.days.to_le_bytes()); - out[8..12].copy_from_slice(&value.milliseconds.to_le_bytes()); - values.push(FixedLenByteArray::from(ByteArray::from(out.to_vec()))); + chunk[4..8].copy_from_slice(&value.days.to_le_bytes()); + chunk[8..12].copy_from_slice(&value.milliseconds.to_le_bytes()); + }) +} + +trait NativeDecimalType: DecimalType { + type NativeBytes: AsRef<[u8]>; + + fn to_be_bytes(value: Self::Native) -> Self::NativeBytes; +} +impl NativeDecimalType for Decimal32Type { + type NativeBytes = [u8; Self::BYTE_LENGTH]; + + fn to_be_bytes(value: Self::Native) -> Self::NativeBytes { + value.to_be_bytes() } - values } +impl NativeDecimalType for Decimal64Type { + type NativeBytes = [u8; Self::BYTE_LENGTH]; -fn get_decimal_32_array_slice( - array: &arrow_array::Decimal32Array, - indices: impl ExactSizeIterator, -) -> Vec { - let mut values = Vec::with_capacity(indices.len()); - let size = decimal_length_from_precision(array.precision()); - for i in indices { - let as_be_bytes = array.value(i).to_be_bytes(); - let resized_value = as_be_bytes[(4 - size)..].to_vec(); - values.push(FixedLenByteArray::from(ByteArray::from(resized_value))); + fn to_be_bytes(value: Self::Native) -> Self::NativeBytes { + value.to_be_bytes() } - values } +impl NativeDecimalType for Decimal128Type { + type NativeBytes = [u8; Self::BYTE_LENGTH]; -fn get_decimal_64_array_slice( - array: &arrow_array::Decimal64Array, - indices: impl ExactSizeIterator, -) -> Vec { - let mut values = Vec::with_capacity(indices.len()); - let size = decimal_length_from_precision(array.precision()); - for i in indices { - let as_be_bytes = array.value(i).to_be_bytes(); - let resized_value = as_be_bytes[(8 - size)..].to_vec(); - values.push(FixedLenByteArray::from(ByteArray::from(resized_value))); + fn to_be_bytes(value: Self::Native) -> Self::NativeBytes { + value.to_be_bytes() } - values } +impl NativeDecimalType for Decimal256Type { + type NativeBytes = [u8; Self::BYTE_LENGTH]; -fn get_decimal_128_array_slice( - array: &arrow_array::Decimal128Array, - indices: impl ExactSizeIterator, -) -> Vec { - let mut values = Vec::with_capacity(indices.len()); - let size = decimal_length_from_precision(array.precision()); - for i in indices { - let as_be_bytes = array.value(i).to_be_bytes(); - let resized_value = as_be_bytes[(16 - size)..].to_vec(); - values.push(FixedLenByteArray::from(ByteArray::from(resized_value))); + fn to_be_bytes(value: Self::Native) -> Self::NativeBytes { + value.to_be_bytes() } - values } -fn get_decimal_256_array_slice( - array: &arrow_array::Decimal256Array, +fn get_decimal_array_slice( + array: &PrimitiveArray, indices: impl ExactSizeIterator, ) -> Vec { - let mut values = Vec::with_capacity(indices.len()); - let size = decimal_length_from_precision(array.precision()); - for i in indices { - let as_be_bytes = array.value(i).to_be_bytes(); - let resized_value = as_be_bytes[(32 - size)..].to_vec(); - values.push(FixedLenByteArray::from(ByteArray::from(resized_value))); + let chunk_size = decimal_length_from_precision(array.precision()); + assert!(chunk_size <= T::BYTE_LENGTH); + + if chunk_size == T::BYTE_LENGTH { + // Special-case that allows inlining memcpy. + chunk_array_slice(chunk_size, indices, move |i, chunk| { + let as_be_bytes = T::to_be_bytes(array.value(i)); + chunk.copy_from_slice(as_be_bytes.as_ref()); + }) + } else { + chunk_array_slice(chunk_size, indices, move |i, chunk| { + let as_be_bytes = T::to_be_bytes(array.value(i)); + let resized_value = &as_be_bytes.as_ref()[(T::BYTE_LENGTH - chunk.len())..]; + chunk.copy_from_slice(resized_value); + }) } - values } fn get_float_16_array_slice( array: &arrow_array::Float16Array, indices: impl ExactSizeIterator, ) -> Vec { - let mut values = Vec::with_capacity(indices.len()); - for i in indices { - let value = array.value(i).to_le_bytes().to_vec(); - values.push(FixedLenByteArray::from(ByteArray::from(value))); - } - values + chunk_array_slice(2, indices, move |i, chunk| { + let value = array.value(i).to_le_bytes(); + chunk.copy_from_slice(&value); + }) } fn get_fsb_array_slice( array: &arrow_array::FixedSizeBinaryArray, indices: impl ExactSizeIterator, ) -> Vec { - let mut values = Vec::with_capacity(indices.len()); - for i in indices { - let value = array.value(i).to_vec(); - values.push(FixedLenByteArray::from(ByteArray::from(value))) + chunk_array_slice(array.value_size(), indices, move |i, chunk| { + let value = array.value(i); + chunk.copy_from_slice(value); + }) +} + +#[inline] +fn chunk_array_slice( + chunk_size: usize, + indices: impl ExactSizeIterator, + writer: impl Fn(usize, &mut [u8]), +) -> Vec { + let capacity = indices.len() * chunk_size; + // TODO: This could be done with Vec::spare_capacity_mut, + // but [MaybeUninit]::write_copy_of_slice is gated behind MSRV 1.93 + let mut arena = vec![0; capacity]; + for (i, chunk) in indices.zip(arena.chunks_exact_mut(chunk_size)) { + writer(i, chunk); + } + chunk_contiguous_vec(arena, chunk_size) +} + +fn chunk_contiguous_vec(arena: Vec, chunk_size: usize) -> Vec { + let mut values = Vec::with_capacity(arena.len() / chunk_size); + let mut arena = Bytes::from(arena); + while arena.len() >= chunk_size { + let slice = arena.split_to(chunk_size); + values.push(FixedLenByteArray::from(ByteArray::from(slice))); } values } @@ -3862,6 +3863,23 @@ mod tests { one_column_roundtrip(Arc::new(list), true); } + #[test] + fn list_utf8_view_selective_padding_roundtrip() { + let item = Arc::new(Field::new_list_field(DataType::Utf8View, true)); + let mut builder = ListBuilder::new(StringViewBuilder::new()).with_field(item); + builder.values().append_value("a"); + builder.values().append_null(); + builder.append(true); + // The null parent list covers selective padding dropping values below + // the list definition level while preserving the preceding item null. + builder.append(false); + // The long string covers the non-inlined Utf8View buffer path. + builder.values().append_value("large payload over 12 bytes"); + builder.append(true); + + one_column_roundtrip(Arc::new(builder.finish()), true); + } + #[test] fn struct_single_column() { let a_values = Int32Array::from(vec![1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/async_reader/metadata.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/async_reader/metadata.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/async_reader/metadata.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/async_reader/metadata.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/async_reader/mod.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/async_reader/mod.rs similarity index 95% rename from thirdparty/crates/parquet-59.1.0/src/arrow/async_reader/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/async_reader/mod.rs index 5a0083b71..1d276df2a 100644 --- a/thirdparty/crates/parquet-59.1.0/src/arrow/async_reader/mod.rs +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/async_reader/mod.rs @@ -50,11 +50,15 @@ use crate::file::metadata::{ParquetMetaData, ParquetMetaDataReader}; mod metadata; pub use metadata::*; +mod spawn; +pub use spawn::SpawnedReader; + #[cfg(feature = "object_store")] mod store; use crate::DecodeResult; use crate::arrow::push_decoder::{ParquetPushDecoder, ParquetPushDecoderBuilder, PushDecoderInput}; +#[allow(deprecated)] #[cfg(feature = "object_store")] pub use store::*; @@ -65,10 +69,94 @@ pub use store::*; /// 1. There is a default implementation for types that implement [`AsyncRead`] /// and [`AsyncSeek`], for example [`tokio::fs::File`]. /// -/// 2. [`ParquetObjectReader`], available when the `object_store` crate feature -/// is enabled, implements this interface for [`ObjectStore`]. +/// 2. Implementations for remote storage, such as the `object_store` crate, +/// can implement this interface directly, typically by pairing a store +/// handle with an object path and delegating [`Self::get_bytes`] and +/// [`Self::get_byte_ranges`] to ranged reads. [`SpawnedReader`] can wrap +/// such a reader to perform its I/O on a dedicated runtime, and +/// [`ParquetMetaDataReader::with_arrow_reader_options`] simplifies +/// implementing [`Self::get_metadata`]. +/// +/// # Example: implementing `AsyncFileReader` for the `object_store` crate +/// +/// ```no_run +/// # use std::ops::Range; +/// # use std::sync::Arc; +/// use bytes::Bytes; +/// use futures::future::BoxFuture; +/// use futures::{FutureExt, TryFutureExt}; +/// use object_store::path::Path; +/// use object_store::{GetOptions, GetRange, ObjectStore, ObjectStoreExt}; +/// use parquet::arrow::arrow_reader::ArrowReaderOptions; +/// use parquet::arrow::async_reader::{AsyncFileReader, MetadataSuffixFetch}; +/// use parquet::errors::{ParquetError, Result}; +/// use parquet::file::metadata::{ParquetMetaData, ParquetMetaDataReader}; +/// +/// fn to_parquet_err(e: object_store::Error) -> ParquetError { +/// ParquetError::External(Box::new(e)) +/// } +/// +/// #[derive(Clone)] +/// struct ObjectStoreReader { +/// store: Arc, +/// path: Path, +/// } +/// +/// impl AsyncFileReader for ObjectStoreReader { +/// fn get_bytes(&mut self, range: Range) -> BoxFuture<'_, Result> { +/// self.store +/// .get_range(&self.path, range) +/// .map_err(to_parquet_err) +/// .boxed() +/// } +/// +/// fn get_byte_ranges(&mut self, ranges: Vec>) -> BoxFuture<'_, Result>> { +/// async move { +/// self.store +/// .get_ranges(&self.path, &ranges) +/// .await +/// .map_err(to_parquet_err) +/// } +/// .boxed() +/// } /// -/// [`ObjectStore`]: object_store::ObjectStore +/// fn get_metadata<'a>( +/// &'a mut self, +/// options: Option<&'a ArrowReaderOptions>, +/// ) -> BoxFuture<'a, Result>> { +/// async move { +/// let metadata = ParquetMetaDataReader::new() +/// .with_arrow_reader_options(options) +/// .load_via_suffix_and_finish(self) +/// .await?; +/// Ok(Arc::new(metadata)) +/// } +/// .boxed() +/// } +/// } +/// +/// /// Supports fetching the parquet footer without knowing the file size, +/// /// via suffix range requests +/// impl MetadataSuffixFetch for &mut ObjectStoreReader { +/// fn fetch_suffix(&mut self, suffix: usize) -> BoxFuture<'_, Result> { +/// let options = GetOptions { +/// range: Some(GetRange::Suffix(suffix as u64)), +/// ..Default::default() +/// }; +/// async move { +/// let resp = self +/// .store +/// .get_opts(&self.path, options) +/// .await +/// .map_err(to_parquet_err)?; +/// resp.bytes().await.map_err(to_parquet_err) +/// } +/// .boxed() +/// } +/// } +/// ``` +/// +/// [`ParquetMetaDataReader::with_arrow_reader_options`]: crate::file::metadata::ParquetMetaDataReader::with_arrow_reader_options /// /// [`tokio::fs::File`]: https://docs.rs/tokio/latest/tokio/fs/struct.File.html pub trait AsyncFileReader: Send { @@ -164,21 +252,7 @@ impl AsyncFileReader for T { options: Option<&'a ArrowReaderOptions>, ) -> BoxFuture<'a, Result>> { async move { - let metadata_opts = options.map(|o| o.metadata_options().clone()); - let mut metadata_reader = - ParquetMetaDataReader::new().with_metadata_options(metadata_opts); - - if let Some(opts) = options { - metadata_reader = metadata_reader - .with_column_index_policy(opts.column_index_policy()) - .with_offset_index_policy(opts.offset_index_policy()); - } - - #[cfg(feature = "encryption")] - let metadata_reader = metadata_reader.with_decryption_properties( - options.and_then(|o| o.file_decryption_properties.as_ref().map(Arc::clone)), - ); - + let metadata_reader = ParquetMetaDataReader::new().with_arrow_reader_options(options); let parquet_metadata = metadata_reader.load_via_suffix_and_finish(self).await?; Ok(Arc::new(parquet_metadata)) } @@ -922,12 +996,7 @@ mod tests { &'a mut self, options: Option<&'a ArrowReaderOptions>, ) -> BoxFuture<'a, Result>> { - let mut metadata_reader = ParquetMetaDataReader::new(); - if let Some(opts) = options { - metadata_reader = metadata_reader - .with_column_index_policy(opts.column_index_policy()) - .with_offset_index_policy(opts.offset_index_policy()); - } + let metadata_reader = ParquetMetaDataReader::new().with_arrow_reader_options(options); self.metadata = Some(Arc::new( metadata_reader.parse_and_finish(&self.data).unwrap(), )); diff --git a/thirdparty/crates/parquet-59.2.0/src/arrow/async_reader/spawn.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/async_reader/spawn.rs new file mode 100644 index 000000000..927e11e5c --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/async_reader/spawn.rs @@ -0,0 +1,227 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +use std::future::Future; +use std::ops::Range; +use std::sync::Arc; + +use bytes::Bytes; +use futures::future::BoxFuture; +use futures::{FutureExt, TryFutureExt}; +use tokio::runtime::Handle; + +use crate::arrow::arrow_reader::ArrowReaderOptions; +use crate::arrow::async_reader::{AsyncFileReader, MetadataSuffixFetch}; +use crate::errors::{ParquetError, Result}; +use crate::file::metadata::ParquetMetaData; + +/// An [`AsyncFileReader`] that performs I/O on a separate tokio runtime. +/// +/// Tokio is a cooperative scheduler, and relies on tasks yielding in a timely +/// manner to service IO. Therefore, running IO and CPU-bound tasks, such as +/// parquet decoding, on the same tokio runtime can lead to degraded +/// throughput, dropped connections and other issues. For more information see +/// [here]. +/// +/// This wrapper spawns each operation of the inner reader onto the provided +/// runtime [`Handle`], so that the runtime driving the parquet decoding does +/// not also drive the I/O. +/// +/// Note that [`Self::get_metadata`] spawns the entire metadata load, so the +/// footer is also decoded on the provided runtime. +/// +/// The inner reader must be [`Clone`] (typically an `Arc`'d handle to some +/// shared resource) as each spawned task requires a `'static` copy of it. +/// +/// [here]: https://www.influxdata.com/blog/using-rustlangs-async-tokio-runtime-for-cpu-bound-tasks/ +#[derive(Clone, Debug)] +pub struct SpawnedReader { + inner: R, + handle: Handle, +} + +impl SpawnedReader { + /// Creates a new [`SpawnedReader`] that performs the I/O of `inner` on `handle` + pub fn new(inner: R, handle: Handle) -> Self { + Self { inner, handle } + } + + /// Returns the inner reader + pub fn into_inner(self) -> R { + self.inner + } +} + +/// Spawns `fut` on `handle`, propagating panics and mapping task cancellation +/// to [`ParquetError::External`] +fn spawn( + handle: &Handle, + fut: impl Future> + Send + 'static, +) -> BoxFuture<'static, Result> +where + T: Send + 'static, +{ + handle + .spawn(fut) + .map_ok_or_else( + |e| match e.try_into_panic() { + Err(e) => Err(ParquetError::External(Box::new(e))), + Ok(p) => std::panic::resume_unwind(p), + }, + |res| res, + ) + .boxed() +} + +impl AsyncFileReader for SpawnedReader +where + R: AsyncFileReader + Clone + Send + 'static, +{ + fn get_bytes(&mut self, range: Range) -> BoxFuture<'_, Result> { + let mut inner = self.inner.clone(); + spawn(&self.handle, async move { inner.get_bytes(range).await }) + } + + fn get_byte_ranges(&mut self, ranges: Vec>) -> BoxFuture<'_, Result>> { + let mut inner = self.inner.clone(); + spawn( + &self.handle, + async move { inner.get_byte_ranges(ranges).await }, + ) + } + + fn get_metadata<'a>( + &'a mut self, + options: Option<&'a ArrowReaderOptions>, + ) -> BoxFuture<'a, Result>> { + let mut inner = self.inner.clone(); + let options = options.cloned(); + spawn(&self.handle, async move { + inner.get_metadata(options.as_ref()).await + }) + } +} + +impl MetadataSuffixFetch for &mut SpawnedReader +where + R: AsyncFileReader + Clone + Send + 'static, + for<'a> &'a mut R: MetadataSuffixFetch, +{ + fn fetch_suffix(&mut self, suffix: usize) -> BoxFuture<'_, Result> { + let mut inner = self.inner.clone(); + spawn(&self.handle, async move { + (&mut inner).fetch_suffix(suffix).await + }) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use crate::arrow::ParquetRecordBatchStreamBuilder; + use crate::file::metadata::ParquetMetaDataReader; + use futures::TryStreamExt; + use std::thread::ThreadId; + + /// An in-memory [`AsyncFileReader`] that records the thread each request ran on + #[derive(Clone)] + struct InMemoryReader { + data: Bytes, + threads: Arc>>, + } + + impl InMemoryReader { + fn new(data: Bytes) -> Self { + Self { + data, + threads: Default::default(), + } + } + } + + impl AsyncFileReader for InMemoryReader { + fn get_bytes(&mut self, range: Range) -> BoxFuture<'_, Result> { + self.threads + .lock() + .unwrap() + .push(std::thread::current().id()); + let data = self.data.slice(range.start as usize..range.end as usize); + futures::future::ready(Ok(data)).boxed() + } + + fn get_metadata<'a>( + &'a mut self, + options: Option<&'a ArrowReaderOptions>, + ) -> BoxFuture<'a, Result>> { + self.threads + .lock() + .unwrap() + .push(std::thread::current().id()); + let metadata = ParquetMetaDataReader::new() + .with_arrow_reader_options(options) + .parse_and_finish(&self.data); + futures::future::ready(metadata.map(Arc::new)).boxed() + } + } + + #[tokio::test] + async fn test_spawned_reader() { + let testdata = arrow::util::test_util::parquet_test_data(); + let path = format!("{testdata}/alltypes_plain.parquet"); + let data = Bytes::from(std::fs::read(path).unwrap()); + + let rt = tokio::runtime::Builder::new_multi_thread() + .worker_threads(1) + .build() + .unwrap(); + + let inner = InMemoryReader::new(data); + let threads = inner.threads.clone(); + let reader = SpawnedReader::new(inner, rt.handle().clone()); + + let builder = ParquetRecordBatchStreamBuilder::new(reader).await.unwrap(); + let batches: Vec<_> = builder.build().unwrap().try_collect().await.unwrap(); + + assert_eq!(batches.len(), 1); + assert_eq!(batches[0].num_rows(), 8); + + // All I/O must have run on the spawned runtime, not the current one + let current_id = std::thread::current().id(); + let threads = threads.lock().unwrap(); + assert!(!threads.is_empty()); + assert!(threads.iter().all(|id| *id != current_id)); + + // Runtimes have to be dropped in blocking contexts + tokio::runtime::Handle::current().spawn_blocking(move || drop(rt)); + } + + #[tokio::test] + async fn test_spawned_reader_fails_on_shutdown_runtime() { + let rt = tokio::runtime::Builder::new_multi_thread() + .worker_threads(1) + .build() + .unwrap(); + + let inner = InMemoryReader::new(Bytes::from_static(b"PAR1")); + let mut reader = SpawnedReader::new(inner, rt.handle().clone()); + + rt.shutdown_background(); + + let err = reader.get_bytes(0..1).await.unwrap_err().to_string(); + assert!(err.contains("was cancelled"), "{err}"); + } +} diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/async_reader/store.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/async_reader/store.rs similarity index 97% rename from thirdparty/crates/parquet-59.1.0/src/arrow/async_reader/store.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/async_reader/store.rs index d47ca744d..fe9cb65bf 100644 --- a/thirdparty/crates/parquet-59.1.0/src/arrow/async_reader/store.rs +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/async_reader/store.rs @@ -51,6 +51,10 @@ use tokio::runtime::Handle; /// print_parquet_metadata(&mut stdout(), builder.metadata()); /// # } /// ``` +#[deprecated( + since = "59.2.0", + note = "Implement `AsyncFileReader` directly instead; see the example on the `AsyncFileReader` trait documentation and `parquet/examples/object_store.rs`. Use `SpawnedReader` to perform I/O on a dedicated runtime. See https://github.com/apache/arrow-rs/issues/10308" +)] #[derive(Clone, Debug)] pub struct ParquetObjectReader { store: Arc, @@ -62,6 +66,7 @@ pub struct ParquetObjectReader { runtime: Option, } +#[allow(deprecated)] impl ParquetObjectReader { /// Creates a new [`ParquetObjectReader`] for the provided [`ObjectStore`] and [`Path`]. pub fn new(store: Arc, path: Path) -> Self { @@ -133,6 +138,10 @@ impl ParquetObjectReader { /// other issues. For more information see [here]. /// /// [here]: https://www.influxdata.com/blog/using-rustlangs-async-tokio-runtime-for-cpu-bound-tasks/ + #[deprecated( + since = "59.2.0", + note = "Wrap the reader in a `SpawnedReader` instead, e.g. `SpawnedReader::new(reader, handle)`. See https://github.com/apache/arrow-rs/issues/10308" + )] pub fn with_runtime(self, handle: Handle) -> Self { Self { runtime: Some(handle), @@ -168,6 +177,7 @@ impl ParquetObjectReader { } } +#[allow(deprecated)] impl MetadataSuffixFetch for &mut ParquetObjectReader { fn fetch_suffix(&mut self, suffix: usize) -> BoxFuture<'_, Result> { let options = GetOptions { @@ -184,6 +194,7 @@ impl MetadataSuffixFetch for &mut ParquetObjectReader { } } +#[allow(deprecated)] impl AsyncFileReader for ParquetObjectReader { fn get_bytes(&mut self, range: Range) -> BoxFuture<'_, Result> { self.spawn(|store, path| store.get_range(path, range).boxed()) @@ -247,6 +258,7 @@ impl AsyncFileReader for ParquetObjectReader { } #[cfg(test)] +#[allow(deprecated)] mod tests { use crate::arrow::async_reader::ArrowReaderOptions; use crate::file::metadata::PageIndexPolicy; diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/async_writer/mod.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/async_writer/mod.rs similarity index 98% rename from thirdparty/crates/parquet-59.1.0/src/arrow/async_writer/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/async_writer/mod.rs index a050ef77c..d9124417d 100644 --- a/thirdparty/crates/parquet-59.1.0/src/arrow/async_writer/mod.rs +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/async_writer/mod.rs @@ -53,10 +53,14 @@ //! # } //! ``` //! -//! [`object_store`] provides it's native implementation of [`AsyncFileWriter`] by [`ParquetObjectWriter`]. +//! There is a blanket implementation of [`AsyncFileWriter`] for all types that +//! implement [`AsyncWrite`], so writers such as `tokio::fs::File`, or +//! `object_store::buffered::BufWriter` for writing to object storage, can be +//! passed to [`AsyncArrowWriter`] directly. #[cfg(feature = "object_store")] mod store; +#[allow(deprecated)] #[cfg(feature = "object_store")] pub use store::*; diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/async_writer/store.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/async_writer/store.rs similarity index 86% rename from thirdparty/crates/parquet-59.1.0/src/arrow/async_writer/store.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/async_writer/store.rs index 698248e61..ad674268a 100644 --- a/thirdparty/crates/parquet-59.1.0/src/arrow/async_writer/store.rs +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/async_writer/store.rs @@ -28,15 +28,19 @@ use tokio::io::AsyncWriteExt; /// [`ParquetObjectWriter`] for writing to parquet to [`ObjectStore`] /// +/// This type is deprecated: [`BufWriter`] implements [`AsyncWrite`] and can +/// therefore be passed to [`AsyncArrowWriter`] directly via the blanket +/// [`AsyncFileWriter`] implementation for [`AsyncWrite`] types: +/// /// ``` /// # use arrow_array::{ArrayRef, Int64Array, RecordBatch}; +/// # use object_store::buffered::BufWriter; /// # use object_store::memory::InMemory; /// # use object_store::path::Path; /// # use object_store::{ObjectStore, ObjectStoreExt}; /// # use std::sync::Arc; /// /// # use parquet::arrow::arrow_reader::ParquetRecordBatchReaderBuilder; -/// # use parquet::arrow::async_writer::ParquetObjectWriter; /// # use parquet::arrow::AsyncArrowWriter; /// /// # #[tokio::main(flavor="current_thread")] @@ -46,7 +50,7 @@ use tokio::io::AsyncWriteExt; /// let col = Arc::new(Int64Array::from_iter_values([1, 2, 3])) as ArrayRef; /// let to_write = RecordBatch::try_from_iter([("col", col)]).unwrap(); /// -/// let object_store_writer = ParquetObjectWriter::new(store.clone(), Path::from("test")); +/// let object_store_writer = BufWriter::new(store.clone(), Path::from("test")); /// let mut writer = /// AsyncArrowWriter::try_new(object_store_writer, to_write.schema(), None).unwrap(); /// writer.write(&to_write).await.unwrap(); @@ -68,11 +72,19 @@ use tokio::io::AsyncWriteExt; /// assert_eq!(to_write, read); /// # } /// ``` +/// +/// [`AsyncWrite`]: tokio::io::AsyncWrite +/// [`AsyncArrowWriter`]: crate::arrow::async_writer::AsyncArrowWriter +#[deprecated( + since = "59.2.0", + note = "Pass an `object_store::buffered::BufWriter` to `AsyncArrowWriter` directly instead; see https://github.com/apache/arrow-rs/issues/10308 and `parquet/examples/object_store.rs`." +)] #[derive(Debug)] pub struct ParquetObjectWriter { w: BufWriter, } +#[allow(deprecated)] impl ParquetObjectWriter { /// Create a new [`ParquetObjectWriter`] that writes to the specified path in the given store. /// @@ -92,6 +104,7 @@ impl ParquetObjectWriter { } } +#[allow(deprecated)] impl AsyncFileWriter for ParquetObjectWriter { fn write(&mut self, bs: Bytes) -> BoxFuture<'_, Result<()>> { Box::pin(async { @@ -111,12 +124,14 @@ impl AsyncFileWriter for ParquetObjectWriter { }) } } +#[allow(deprecated)] impl From for ParquetObjectWriter { fn from(w: BufWriter) -> Self { Self::from_buf_writer(w) } } #[cfg(test)] +#[allow(deprecated)] mod tests { use arrow_array::{ArrayRef, Int64Array, RecordBatch}; use object_store::memory::InMemory; diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/buffer/bit_util.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/buffer/bit_util.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/buffer/bit_util.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/buffer/bit_util.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/buffer/dictionary_buffer.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/buffer/dictionary_buffer.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/buffer/dictionary_buffer.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/buffer/dictionary_buffer.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/buffer/mod.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/buffer/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/buffer/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/buffer/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/buffer/offset_buffer.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/buffer/offset_buffer.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/buffer/offset_buffer.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/buffer/offset_buffer.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/buffer/view_buffer.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/buffer/view_buffer.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/buffer/view_buffer.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/buffer/view_buffer.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/decoder/delta_byte_array.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/decoder/delta_byte_array.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/decoder/delta_byte_array.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/decoder/delta_byte_array.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/decoder/dictionary_index.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/decoder/dictionary_index.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/decoder/dictionary_index.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/decoder/dictionary_index.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/decoder/mod.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/decoder/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/decoder/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/decoder/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/in_memory_row_group.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/in_memory_row_group.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/in_memory_row_group.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/in_memory_row_group.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/mod.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/push_decoder/mod.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/push_decoder/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/push_decoder/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/push_decoder/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/push_decoder/reader_builder/data.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/push_decoder/reader_builder/data.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/push_decoder/reader_builder/data.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/push_decoder/reader_builder/data.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/push_decoder/reader_builder/filter.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/push_decoder/reader_builder/filter.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/push_decoder/reader_builder/filter.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/push_decoder/reader_builder/filter.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/push_decoder/reader_builder/mod.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/push_decoder/reader_builder/mod.rs similarity index 87% rename from thirdparty/crates/parquet-59.1.0/src/arrow/push_decoder/reader_builder/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/push_decoder/reader_builder/mod.rs index dacf1a2ca..b773f95fd 100644 --- a/thirdparty/crates/parquet-59.1.0/src/arrow/push_decoder/reader_builder/mod.rs +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/push_decoder/reader_builder/mod.rs @@ -21,7 +21,7 @@ mod filter; use crate::arrow::ProjectionMask; use crate::arrow::array_reader::{ArrayReaderBuilder, CacheOptions, RowGroupCache}; use crate::arrow::arrow_reader::metrics::ArrowReaderMetrics; -use crate::arrow::arrow_reader::selection::RowSelectionStrategy; +use crate::arrow::arrow_reader::selection::{LoadedRowRanges, RowSelectionStrategy}; use crate::arrow::arrow_reader::{ ParquetRecordBatchReader, PredicateOptions, ReadPlanBuilder, RowFilter, RowSelection, RowSelectionPolicy, @@ -613,20 +613,16 @@ impl RowGroupReaderBuilder { .with_parquet_metadata(&self.metadata) .build_array_reader(self.fields.as_deref(), predicate.projection())?; - // Reset to original policy before each predicate so the override - // can detect page skipping for THIS predicate's columns. - // Without this reset, a prior predicate's override (e.g. Mask) - // carries forward and the check returns early, missing unfetched - // pages for subsequent predicates. + // Auto resolution and loaded ranges are projection-specific, so restore the + // configured policy before preparing each predicate. plan_builder = plan_builder.with_row_selection_policy(self.row_selection_policy); - // Prepare to evaluate the filter. - // Note: first update the selection strategy to properly handle any pages - // pruned during fetch - plan_builder = override_selector_strategy_if_needed( + // Prepare selection execution for pages pruned during fetch. + plan_builder = prepare_selection_for_page_skipping( plan_builder, predicate.projection(), self.row_group_offset_index(row_group_idx), + row_count, ); // When this is the final predicate in the chain and an output @@ -729,10 +725,11 @@ impl RowGroupReaderBuilder { plan_builder = plan_builder.with_row_selection_policy(self.row_selection_policy); - plan_builder = override_selector_strategy_if_needed( + plan_builder = prepare_selection_for_page_skipping( plan_builder, &self.projection, self.row_group_offset_index(row_group_idx), + row_count, ); let row_group_info = RowGroupInfo { @@ -857,7 +854,7 @@ impl RowGroupReaderBuilder { } } -/// Override the selection strategy if needed. +/// Prepare row selection execution when page pruning produced sparse column data. /// /// Some pages can be skipped during row-group construction if they are not read /// by the selections. This means that the data pages for those rows are never @@ -865,58 +862,147 @@ impl RowGroupReaderBuilder { /// `RowSelections` selection works because `skip_records()` handles this /// case and skips the page accordingly. /// -/// However, with the current mask design, all values must be read and decoded -/// and then a mask filter is applied. Thus if any pages are skipped during -/// row-group construction, the data pages are missing and cannot be decoded. +/// However, with the current mask design, all values covered by a mask chunk +/// are decoded before the mask filter is applied. Thus a chunk cannot cross a +/// page that was skipped during row-group construction. /// /// A simple example: /// * the page size is 2, the mask is 100001, row selection should be read(1) skip(4) read(1) /// * the `ColumnChunkData` would be page1(10), page2(skipped), page3(01) /// -/// Using the row selection to skip(4), page2 won't be read at all, so in this -/// case we can't decode all the rows and apply a mask. To correctly apply the -/// bit mask, we need all 6 values be read, but page2 is not in memory. -fn override_selector_strategy_if_needed( +/// Mask execution records the row ranges loaded for every projected column, so +/// each mask chunk stays within loaded data and `skip_records()` crosses the +/// gaps. This applies both to an explicit mask policy and to Auto when it +/// resolves to mask execution. +fn prepare_selection_for_page_skipping( plan_builder: ReadPlanBuilder, projection_mask: &ProjectionMask, offset_index: Option<&[OffsetIndexMetaData]>, + total_rows: usize, ) -> ReadPlanBuilder { - // override only applies to Auto policy, If the policy is already Mask or Selectors, respect that - let RowSelectionPolicy::Auto { .. } = plan_builder.row_selection_policy() else { - return plan_builder; - }; - - let preferred_strategy = plan_builder.resolve_selection_strategy(); - - let force_selectors = matches!(preferred_strategy, RowSelectionStrategy::Mask) - && plan_builder.selection().is_some_and(|selection| { - selection.should_force_selectors(projection_mask, offset_index) - }); - - let resolved_strategy = if force_selectors { - RowSelectionStrategy::Selectors - } else { - preferred_strategy - }; - - // override the plan builder strategy with the resolved one - let new_policy = match resolved_strategy { - RowSelectionStrategy::Mask => RowSelectionPolicy::Mask, - RowSelectionStrategy::Selectors => RowSelectionPolicy::Selectors, - }; - - plan_builder.with_row_selection_policy(new_policy) + match plan_builder.resolve_selection_strategy() { + RowSelectionStrategy::Mask => { + let loaded = loaded_row_ranges_for_projection( + plan_builder.selection(), + projection_mask, + offset_index, + total_rows, + ); + plan_builder + .with_row_selection_policy(RowSelectionPolicy::Mask) + .with_loaded_row_ranges(loaded) + } + RowSelectionStrategy::Selectors => { + plan_builder.with_row_selection_policy(RowSelectionPolicy::Selectors) + } + } +} + +/// Computes row ranges for which every projected column has page data loaded. +fn loaded_row_ranges_for_projection( + selection: Option<&RowSelection>, + projection_mask: &ProjectionMask, + offset_index: Option<&[OffsetIndexMetaData]>, + total_rows: usize, +) -> Option { + let selection = selection?; + let columns = offset_index?; + + columns + .iter() + .enumerate() + .filter_map(|(leaf_idx, column)| { + let pages = column.page_locations(); + (projection_mask.leaf_included(leaf_idx) && !pages.is_empty()).then(|| { + RowSelection::from_consecutive_ranges( + selection + .row_ranges_for_selected_pages(pages, total_rows) + .into_iter(), + total_rows, + ) + }) + }) + .reduce(|loaded, column| loaded.intersection(&column)) + .filter(|loaded| loaded.skipped_row_count() != 0) + .map(LoadedRowRanges::from_selection) } #[cfg(test)] mod tests { use super::*; use crate::arrow::arrow_reader::{RowSelection, RowSelector}; + use crate::file::page_index::offset_index::PageLocation; #[test] // Verify that the size of RowGroupDecoderState does not grow too large fn test_structure_size() { - assert_eq!(std::mem::size_of::(), 232); + assert_eq!(std::mem::size_of::(), 240); + } + + #[test] + fn test_loaded_row_ranges_intersect_column_page_boundaries() { + let column = |first_rows: &[i64]| OffsetIndexMetaData { + page_locations: first_rows + .iter() + .enumerate() + .map(|(idx, first_row_index)| PageLocation { + offset: (idx * 10) as i64, + compressed_page_size: 10, + first_row_index: *first_row_index, + }) + .collect(), + unencoded_byte_array_data_bytes: None, + }; + let columns = vec![column(&[0, 4, 8]), column(&[0, 6, 10])]; + let selection = RowSelection::from(vec![ + RowSelector::skip(1), + RowSelector::select(1), + RowSelector::skip(9), + RowSelector::select(1), + ]); + + let loaded = loaded_row_ranges_for_projection( + Some(&selection), + &ProjectionMask::all(), + Some(&columns), + 12, + ) + .unwrap(); + + assert_eq!(loaded.ranges(), &[0..4, 10..12]); + } + + #[test] + fn test_auto_keeps_mask_when_page_pruning_skips_pages() { + let columns = vec![OffsetIndexMetaData { + page_locations: [0, 2, 4, 6, 8, 10] + .into_iter() + .enumerate() + .map(|(idx, first_row_index)| PageLocation { + offset: (idx * 10) as i64, + compressed_page_size: 10, + first_row_index, + }) + .collect(), + unencoded_byte_array_data_bytes: None, + }]; + let selection = RowSelection::from(vec![ + RowSelector::select(1), + RowSelector::skip(10), + RowSelector::select(1), + ]); + let plan_builder = ReadPlanBuilder::new(12) + .with_selection(Some(selection)) + .with_row_selection_policy(RowSelectionPolicy::Auto { threshold: 32 }); + + let prepared = prepare_selection_for_page_skipping( + plan_builder, + &ProjectionMask::all(), + Some(&columns), + 12, + ); + + assert_eq!(prepared.row_selection_policy(), &RowSelectionPolicy::Mask); } #[test] diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/push_decoder/remaining.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/push_decoder/remaining.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/push_decoder/remaining.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/push_decoder/remaining.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/record_reader/buffer.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/record_reader/buffer.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/record_reader/buffer.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/record_reader/buffer.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/record_reader/definition_levels.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/record_reader/definition_levels.rs similarity index 97% rename from thirdparty/crates/parquet-59.1.0/src/arrow/record_reader/definition_levels.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/record_reader/definition_levels.rs index 0720c6cdb..a104c93a2 100644 --- a/thirdparty/crates/parquet-59.1.0/src/arrow/record_reader/definition_levels.rs +++ b/thirdparty/crates/parquet-59.2.0/src/arrow/record_reader/definition_levels.rs @@ -504,6 +504,26 @@ mod tests { use crate::encodings::rle::RleEncoder; use rand::{Rng, rng}; + #[test] + fn test_build_validity_bitmap_unfiltered_word_chunk() { + // 65 levels forces the unfiltered path to process one full u64 word + // with append_word, plus a remainder bit. + let def_levels = (0..65) + .map(|i| if i % 3 == 0 { 2 } else { 1 }) + .collect::>(); + let mut bitmap = BooleanBufferBuilder::new(0); + + assert_eq!( + build_filtered_validity_bitmap(&def_levels, None, None, 2, &mut bitmap), + def_levels.len() + ); + + let bitmap = bitmap.finish(); + for (idx, def) in def_levels.iter().enumerate() { + assert_eq!(bitmap.value(idx), *def >= 2); + } + } + #[test] fn test_packed_decoder() { let mut rng = rng(); diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/record_reader/mod.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/record_reader/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/record_reader/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/record_reader/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/schema/complex.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/schema/complex.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/schema/complex.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/schema/complex.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/schema/extension.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/schema/extension.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/schema/extension.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/schema/extension.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/schema/mod.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/schema/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/schema/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/schema/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/schema/primitive.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/schema/primitive.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/schema/primitive.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/schema/primitive.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/arrow/schema/virtual_type.rs b/thirdparty/crates/parquet-59.2.0/src/arrow/schema/virtual_type.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/arrow/schema/virtual_type.rs rename to thirdparty/crates/parquet-59.2.0/src/arrow/schema/virtual_type.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/basic.rs b/thirdparty/crates/parquet-59.2.0/src/basic.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/basic.rs rename to thirdparty/crates/parquet-59.2.0/src/basic.rs diff --git a/thirdparty/crates/parquet-59.2.0/src/bin/cli/mod.rs b/thirdparty/crates/parquet-59.2.0/src/bin/cli/mod.rs new file mode 100644 index 000000000..e04b285ac --- /dev/null +++ b/thirdparty/crates/parquet-59.2.0/src/bin/cli/mod.rs @@ -0,0 +1,91 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. + +/// Parses a dot-separated Parquet column path, using `\` as an escape character +/// for literal dots and backslashes. +pub fn parse_column_path(path: &str) -> Result, String> { + let mut parts = Vec::new(); + let mut current = String::new(); + let mut escaped = false; + + for c in path.chars() { + if escaped { + match c { + '.' | '\\' => current.push(c), + _ => { + return Err(format!( + "Invalid escape sequence \\{c} in column path {}", + path + )); + } + } + escaped = false; + continue; + } + + match c { + '\\' => escaped = true, + '.' => { + parts.push(current); + current = String::new(); + } + _ => current.push(c), + } + } + + if escaped { + return Err(format!( + "Column path {} ends with an incomplete escape sequence", + path + )); + } + + parts.push(current); + Ok(parts) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn parse_column_path_splits_unescaped_dots() { + assert_eq!(parse_column_path("a.b.c").unwrap(), vec!["a", "b", "c"]); + } + + #[test] + fn parse_column_path_allows_escaped_dots() { + assert_eq!(parse_column_path(r"a\.b.c").unwrap(), vec!["a.b", "c"]); + } + + #[test] + fn parse_column_path_allows_escaped_backslashes() { + assert_eq!(parse_column_path(r"a\\b.c").unwrap(), vec![r"a\b", "c"]); + } + + #[test] + fn parse_column_path_invalid_escape_sequence() { + let err = parse_column_path(r"a.\b.c").unwrap_err(); + assert!(err.contains("Invalid escape sequence")); + } + + #[test] + fn parse_column_path_incomplete_escape_sequence() { + let err = parse_column_path(r"a.b.c\").unwrap_err(); + assert!(err.contains("incomplete escape sequence")); + } +} diff --git a/thirdparty/crates/parquet-59.1.0/src/bin/parquet-concat.rs b/thirdparty/crates/parquet-59.2.0/src/bin/parquet-concat.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/bin/parquet-concat.rs rename to thirdparty/crates/parquet-59.2.0/src/bin/parquet-concat.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/bin/parquet-fromcsv-help.txt b/thirdparty/crates/parquet-59.2.0/src/bin/parquet-fromcsv-help.txt similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/bin/parquet-fromcsv-help.txt rename to thirdparty/crates/parquet-59.2.0/src/bin/parquet-fromcsv-help.txt diff --git a/thirdparty/crates/parquet-59.1.0/src/bin/parquet-fromcsv.rs b/thirdparty/crates/parquet-59.2.0/src/bin/parquet-fromcsv.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/bin/parquet-fromcsv.rs rename to thirdparty/crates/parquet-59.2.0/src/bin/parquet-fromcsv.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/bin/parquet-index.rs b/thirdparty/crates/parquet-59.2.0/src/bin/parquet-index.rs similarity index 93% rename from thirdparty/crates/parquet-59.1.0/src/bin/parquet-index.rs rename to thirdparty/crates/parquet-59.2.0/src/bin/parquet-index.rs index 397a75c76..241fc2053 100644 --- a/thirdparty/crates/parquet-59.1.0/src/bin/parquet-index.rs +++ b/thirdparty/crates/parquet-59.2.0/src/bin/parquet-index.rs @@ -25,15 +25,17 @@ //! ``` //! After this `parquet-index` should be available: //! ``` -//! parquet-index XYZ.parquet COLUMN_NAME +//! parquet-index XYZ.parquet COLUMN_PATH //! ``` //! //! The binary can also be built from the source code and run as follows: //! ``` -//! cargo run --features=cli --bin parquet-index XYZ.parquet COLUMN_NAME +//! cargo run --features=cli --bin parquet-index XYZ.parquet COLUMN_PATH //! //! [page index]: https://github.com/apache/parquet-format/blob/master/PageIndex.md +mod cli; + use clap::Parser; use parquet::data_type::ByteArray; use parquet::errors::{ParquetError, Result}; @@ -51,7 +53,9 @@ struct Args { #[clap(help("Path to a parquet file"))] file: String, - #[clap(help("Column name to print"))] + #[clap(help( + "Dot-separated column path to get index for. Literal dots can be escaped as `\\.`" + ))] column: String, } @@ -62,10 +66,11 @@ impl Args { let reader = SerializedFileReader::new_with_options(file, options)?; let schema = reader.metadata().file_metadata().schema_descr(); + let column_path = cli::parse_column_path(&self.column).map_err(ParquetError::General)?; let column_idx = schema .columns() .iter() - .position(|x| x.name() == self.column.as_str()) + .position(|x| x.path().parts() == column_path.as_slice()) .ok_or_else(|| { ParquetError::General(format!("Failed to find column {}", self.column)) })?; @@ -158,7 +163,7 @@ fn print_index( .enumerate() { print!( - "Page {:>5} at offset {:#010x} with length {:>10} and row count {:>10}", + "Page {:>5} at offset {:>10} with length {:>10} and row count {:>10}", idx, o.offset, o.compressed_page_size, row_count ); match min { @@ -197,7 +202,7 @@ fn print_bytes_index( .enumerate() { print!( - "Page {:>5} at offset {:#010x} with length {:>10} and row count {:>10}", + "Page {:>5} at offset {:>10} with length {:>10} and row count {:>10}", idx, o.offset, o.compressed_page_size, row_count ); match min { diff --git a/thirdparty/crates/parquet-59.1.0/src/bin/parquet-layout.rs b/thirdparty/crates/parquet-59.2.0/src/bin/parquet-layout.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/bin/parquet-layout.rs rename to thirdparty/crates/parquet-59.2.0/src/bin/parquet-layout.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/bin/parquet-read.rs b/thirdparty/crates/parquet-59.2.0/src/bin/parquet-read.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/bin/parquet-read.rs rename to thirdparty/crates/parquet-59.2.0/src/bin/parquet-read.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/bin/parquet-rewrite.rs b/thirdparty/crates/parquet-59.2.0/src/bin/parquet-rewrite.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/bin/parquet-rewrite.rs rename to thirdparty/crates/parquet-59.2.0/src/bin/parquet-rewrite.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/bin/parquet-rowcount.rs b/thirdparty/crates/parquet-59.2.0/src/bin/parquet-rowcount.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/bin/parquet-rowcount.rs rename to thirdparty/crates/parquet-59.2.0/src/bin/parquet-rowcount.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/bin/parquet-schema.rs b/thirdparty/crates/parquet-59.2.0/src/bin/parquet-schema.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/bin/parquet-schema.rs rename to thirdparty/crates/parquet-59.2.0/src/bin/parquet-schema.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/bin/parquet-show-bloom-filter.rs b/thirdparty/crates/parquet-59.2.0/src/bin/parquet-show-bloom-filter.rs similarity index 90% rename from thirdparty/crates/parquet-59.1.0/src/bin/parquet-show-bloom-filter.rs rename to thirdparty/crates/parquet-59.2.0/src/bin/parquet-show-bloom-filter.rs index 2b052a45f..436436d9a 100644 --- a/thirdparty/crates/parquet-59.1.0/src/bin/parquet-show-bloom-filter.rs +++ b/thirdparty/crates/parquet-59.2.0/src/bin/parquet-show-bloom-filter.rs @@ -33,6 +33,8 @@ //! cargo run --features=cli --bin parquet-show-bloom-filter -- --file-name XYZ.parquet --column id --values a //! ``` +mod cli; + use clap::Parser; use parquet::basic::Type; use parquet::bloom_filter::Sbbf; @@ -49,8 +51,10 @@ use std::{fs::File, path::Path}; struct Args { #[clap(help("Path to the parquet file"))] file_name: String, - #[clap(help( - "Check the bloom filter indexes for the given column. Only string typed columns or columns with an Int32 or Int64 physical type are supported" + #[clap(help(concat!( + "Dot-separated column path to check bloom filter for. Literal dots can be escaped as `\\.`. ", + "Only string typed columns or columns with an Int32 or Int64 physical type are supported." + ) ))] column: String, #[clap( @@ -80,6 +84,14 @@ fn main() { ) .expect("Unable to open file as Parquet"); let metadata = file_reader.metadata(); + let column_path = match cli::parse_column_path(&args.column) { + Ok(path) => path, + Err(err) => { + eprintln!("{}", err); + std::process::exit(1); + } + }; + for (ri, row_group) in metadata.row_groups().iter().enumerate() { println!("Row group #{ri}"); println!("{}", "=".repeat(80)); @@ -87,7 +99,7 @@ fn main() { .columns() .iter() .enumerate() - .find(|(_, column)| column.column_path().string() == args.column) + .find(|(_, column)| column.column_path().parts() == column_path.as_slice()) { let row_group_reader = file_reader .get_row_group(ri) diff --git a/thirdparty/crates/parquet-59.1.0/src/bloom_filter/mod.rs b/thirdparty/crates/parquet-59.2.0/src/bloom_filter/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/bloom_filter/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/bloom_filter/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/column/chunker/cdc.rs b/thirdparty/crates/parquet-59.2.0/src/column/chunker/cdc.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/chunker/cdc.rs rename to thirdparty/crates/parquet-59.2.0/src/column/chunker/cdc.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/column/chunker/cdc_codegen.py b/thirdparty/crates/parquet-59.2.0/src/column/chunker/cdc_codegen.py similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/chunker/cdc_codegen.py rename to thirdparty/crates/parquet-59.2.0/src/column/chunker/cdc_codegen.py diff --git a/thirdparty/crates/parquet-59.1.0/src/column/chunker/cdc_generated.rs b/thirdparty/crates/parquet-59.2.0/src/column/chunker/cdc_generated.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/chunker/cdc_generated.rs rename to thirdparty/crates/parquet-59.2.0/src/column/chunker/cdc_generated.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/column/chunker/mod.rs b/thirdparty/crates/parquet-59.2.0/src/column/chunker/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/chunker/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/column/chunker/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/column/mod.rs b/thirdparty/crates/parquet-59.2.0/src/column/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/column/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/column/page.rs b/thirdparty/crates/parquet-59.2.0/src/column/page.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/page.rs rename to thirdparty/crates/parquet-59.2.0/src/column/page.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/column/page_encryption.rs b/thirdparty/crates/parquet-59.2.0/src/column/page_encryption.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/page_encryption.rs rename to thirdparty/crates/parquet-59.2.0/src/column/page_encryption.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/column/page_encryption_disabled.rs b/thirdparty/crates/parquet-59.2.0/src/column/page_encryption_disabled.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/page_encryption_disabled.rs rename to thirdparty/crates/parquet-59.2.0/src/column/page_encryption_disabled.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/column/page_store.rs b/thirdparty/crates/parquet-59.2.0/src/column/page_store.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/page_store.rs rename to thirdparty/crates/parquet-59.2.0/src/column/page_store.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/column/reader.rs b/thirdparty/crates/parquet-59.2.0/src/column/reader.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/reader.rs rename to thirdparty/crates/parquet-59.2.0/src/column/reader.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/column/reader/decoder.rs b/thirdparty/crates/parquet-59.2.0/src/column/reader/decoder.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/reader/decoder.rs rename to thirdparty/crates/parquet-59.2.0/src/column/reader/decoder.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/column/writer/byte_budget_chunker.rs b/thirdparty/crates/parquet-59.2.0/src/column/writer/byte_budget_chunker.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/writer/byte_budget_chunker.rs rename to thirdparty/crates/parquet-59.2.0/src/column/writer/byte_budget_chunker.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/column/writer/encoder.rs b/thirdparty/crates/parquet-59.2.0/src/column/writer/encoder.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/writer/encoder.rs rename to thirdparty/crates/parquet-59.2.0/src/column/writer/encoder.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/column/writer/mod.rs b/thirdparty/crates/parquet-59.2.0/src/column/writer/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/column/writer/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/column/writer/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/compression.rs b/thirdparty/crates/parquet-59.2.0/src/compression.rs similarity index 96% rename from thirdparty/crates/parquet-59.1.0/src/compression.rs rename to thirdparty/crates/parquet-59.2.0/src/compression.rs index fe2fb59c5..6f3a18fe6 100644 --- a/thirdparty/crates/parquet-59.1.0/src/compression.rs +++ b/thirdparty/crates/parquet-59.2.0/src/compression.rs @@ -505,6 +505,7 @@ pub use lz4_codec::*; mod zstd_codec { use crate::compression::{Codec, ZstdLevel}; use crate::errors::Result; + use std::io::Cursor; /// Codec for Zstandard compression algorithm. /// @@ -534,22 +535,34 @@ mod zstd_codec { output_buf: &mut Vec, uncompress_size: Option, ) -> Result { - let capacity = uncompress_size.unwrap_or_else(|| { - // Get the decompressed size from the zstd frame header - zstd::zstd_safe::get_frame_content_size(input_buf) - .ok() - .flatten() - .unwrap_or(input_buf.len() as u64 * 4) as usize - }); - let decompressed = self.decompressor.decompress(input_buf, capacity)?; - let len = decompressed.len(); - output_buf.extend_from_slice(&decompressed); + let offset = output_buf.len(); + let len = uncompress_size + .or_else(|| { + // Get the decompressed size from the zstd frame header + zstd::zstd_safe::get_frame_content_size(input_buf) + .ok() + .flatten() + .map(|size| size as usize) + }) + .unwrap_or(input_buf.len().saturating_mul(4)); + output_buf.reserve(len); + + let mut cursor = Cursor::new(output_buf); + cursor.set_position(offset as u64); + let len = self + .decompressor + .decompress_to_buffer(input_buf, &mut cursor)?; Ok(len) } fn compress(&mut self, input_buf: &[u8], output_buf: &mut Vec) -> Result<()> { - let compressed = self.compressor.compress(input_buf)?; - output_buf.extend_from_slice(&compressed); + let offset = output_buf.len(); + let len = zstd::zstd_safe::compress_bound(input_buf.len()); + output_buf.reserve(len); + + let mut cursor = Cursor::new(output_buf); + cursor.set_position(offset as u64); + let _written = self.compressor.compress_to_buffer(input_buf, &mut cursor)?; Ok(()) } } diff --git a/thirdparty/crates/parquet-59.1.0/src/data_type.rs b/thirdparty/crates/parquet-59.2.0/src/data_type.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/data_type.rs rename to thirdparty/crates/parquet-59.2.0/src/data_type.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/encodings/decoding.rs b/thirdparty/crates/parquet-59.2.0/src/encodings/decoding.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/encodings/decoding.rs rename to thirdparty/crates/parquet-59.2.0/src/encodings/decoding.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/encodings/decoding/byte_stream_split_decoder.rs b/thirdparty/crates/parquet-59.2.0/src/encodings/decoding/byte_stream_split_decoder.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/encodings/decoding/byte_stream_split_decoder.rs rename to thirdparty/crates/parquet-59.2.0/src/encodings/decoding/byte_stream_split_decoder.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/encodings/encoding/byte_stream_split_encoder.rs b/thirdparty/crates/parquet-59.2.0/src/encodings/encoding/byte_stream_split_encoder.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/encodings/encoding/byte_stream_split_encoder.rs rename to thirdparty/crates/parquet-59.2.0/src/encodings/encoding/byte_stream_split_encoder.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/encodings/encoding/dict_encoder.rs b/thirdparty/crates/parquet-59.2.0/src/encodings/encoding/dict_encoder.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/encodings/encoding/dict_encoder.rs rename to thirdparty/crates/parquet-59.2.0/src/encodings/encoding/dict_encoder.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/encodings/encoding/mod.rs b/thirdparty/crates/parquet-59.2.0/src/encodings/encoding/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/encodings/encoding/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/encodings/encoding/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/encodings/levels.rs b/thirdparty/crates/parquet-59.2.0/src/encodings/levels.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/encodings/levels.rs rename to thirdparty/crates/parquet-59.2.0/src/encodings/levels.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/encodings/mod.rs b/thirdparty/crates/parquet-59.2.0/src/encodings/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/encodings/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/encodings/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/encodings/rle.rs b/thirdparty/crates/parquet-59.2.0/src/encodings/rle.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/encodings/rle.rs rename to thirdparty/crates/parquet-59.2.0/src/encodings/rle.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/encryption/ciphers.rs b/thirdparty/crates/parquet-59.2.0/src/encryption/ciphers.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/encryption/ciphers.rs rename to thirdparty/crates/parquet-59.2.0/src/encryption/ciphers.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/encryption/decrypt.rs b/thirdparty/crates/parquet-59.2.0/src/encryption/decrypt.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/encryption/decrypt.rs rename to thirdparty/crates/parquet-59.2.0/src/encryption/decrypt.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/encryption/encrypt.rs b/thirdparty/crates/parquet-59.2.0/src/encryption/encrypt.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/encryption/encrypt.rs rename to thirdparty/crates/parquet-59.2.0/src/encryption/encrypt.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/encryption/mod.rs b/thirdparty/crates/parquet-59.2.0/src/encryption/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/encryption/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/encryption/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/encryption/modules.rs b/thirdparty/crates/parquet-59.2.0/src/encryption/modules.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/encryption/modules.rs rename to thirdparty/crates/parquet-59.2.0/src/encryption/modules.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/errors.rs b/thirdparty/crates/parquet-59.2.0/src/errors.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/errors.rs rename to thirdparty/crates/parquet-59.2.0/src/errors.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/column_crypto_metadata.rs b/thirdparty/crates/parquet-59.2.0/src/file/column_crypto_metadata.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/column_crypto_metadata.rs rename to thirdparty/crates/parquet-59.2.0/src/file/column_crypto_metadata.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/metadata/footer_tail.rs b/thirdparty/crates/parquet-59.2.0/src/file/metadata/footer_tail.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/metadata/footer_tail.rs rename to thirdparty/crates/parquet-59.2.0/src/file/metadata/footer_tail.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/metadata/memory.rs b/thirdparty/crates/parquet-59.2.0/src/file/metadata/memory.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/metadata/memory.rs rename to thirdparty/crates/parquet-59.2.0/src/file/metadata/memory.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/metadata/mod.rs b/thirdparty/crates/parquet-59.2.0/src/file/metadata/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/metadata/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/file/metadata/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/metadata/options.rs b/thirdparty/crates/parquet-59.2.0/src/file/metadata/options.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/metadata/options.rs rename to thirdparty/crates/parquet-59.2.0/src/file/metadata/options.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/metadata/parser.rs b/thirdparty/crates/parquet-59.2.0/src/file/metadata/parser.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/metadata/parser.rs rename to thirdparty/crates/parquet-59.2.0/src/file/metadata/parser.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/metadata/push_decoder.rs b/thirdparty/crates/parquet-59.2.0/src/file/metadata/push_decoder.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/metadata/push_decoder.rs rename to thirdparty/crates/parquet-59.2.0/src/file/metadata/push_decoder.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/metadata/reader.rs b/thirdparty/crates/parquet-59.2.0/src/file/metadata/reader.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/metadata/reader.rs rename to thirdparty/crates/parquet-59.2.0/src/file/metadata/reader.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/metadata/thrift/encryption.rs b/thirdparty/crates/parquet-59.2.0/src/file/metadata/thrift/encryption.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/metadata/thrift/encryption.rs rename to thirdparty/crates/parquet-59.2.0/src/file/metadata/thrift/encryption.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/metadata/thrift/mod.rs b/thirdparty/crates/parquet-59.2.0/src/file/metadata/thrift/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/metadata/thrift/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/file/metadata/thrift/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/metadata/writer.rs b/thirdparty/crates/parquet-59.2.0/src/file/metadata/writer.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/metadata/writer.rs rename to thirdparty/crates/parquet-59.2.0/src/file/metadata/writer.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/mod.rs b/thirdparty/crates/parquet-59.2.0/src/file/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/file/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/page_index/column_index.rs b/thirdparty/crates/parquet-59.2.0/src/file/page_index/column_index.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/page_index/column_index.rs rename to thirdparty/crates/parquet-59.2.0/src/file/page_index/column_index.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/page_index/index_reader.rs b/thirdparty/crates/parquet-59.2.0/src/file/page_index/index_reader.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/page_index/index_reader.rs rename to thirdparty/crates/parquet-59.2.0/src/file/page_index/index_reader.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/page_index/mod.rs b/thirdparty/crates/parquet-59.2.0/src/file/page_index/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/page_index/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/file/page_index/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/page_index/offset_index.rs b/thirdparty/crates/parquet-59.2.0/src/file/page_index/offset_index.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/page_index/offset_index.rs rename to thirdparty/crates/parquet-59.2.0/src/file/page_index/offset_index.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/properties.rs b/thirdparty/crates/parquet-59.2.0/src/file/properties.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/properties.rs rename to thirdparty/crates/parquet-59.2.0/src/file/properties.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/reader.rs b/thirdparty/crates/parquet-59.2.0/src/file/reader.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/reader.rs rename to thirdparty/crates/parquet-59.2.0/src/file/reader.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/serialized_reader.rs b/thirdparty/crates/parquet-59.2.0/src/file/serialized_reader.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/serialized_reader.rs rename to thirdparty/crates/parquet-59.2.0/src/file/serialized_reader.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/statistics.rs b/thirdparty/crates/parquet-59.2.0/src/file/statistics.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/file/statistics.rs rename to thirdparty/crates/parquet-59.2.0/src/file/statistics.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/file/writer.rs b/thirdparty/crates/parquet-59.2.0/src/file/writer.rs similarity index 97% rename from thirdparty/crates/parquet-59.1.0/src/file/writer.rs rename to thirdparty/crates/parquet-59.2.0/src/file/writer.rs index 8ec16ba36..b62d8886c 100644 --- a/thirdparty/crates/parquet-59.1.0/src/file/writer.rs +++ b/thirdparty/crates/parquet-59.2.0/src/file/writer.rs @@ -22,6 +22,8 @@ use crate::file::metadata::thrift::PageHeader; use crate::file::page_index::column_index::ColumnIndexMetaData; use crate::file::page_index::offset_index::OffsetIndexMetaData; use crate::parquet_thrift::{ThriftCompactOutputProtocol, WriteThrift}; +#[cfg(feature = "arrow")] +use bytes::Bytes; use std::fmt::Debug; use std::io::{BufWriter, IoSlice, Read}; use std::{io::Write, sync::Arc}; @@ -708,14 +710,75 @@ impl<'a, W: Write + Send> SerializedRowGroupWriter<'a, W> { pub(crate) fn append_column_from_read( &mut self, read: R, - mut close: ColumnCloseResult, + close: ColumnCloseResult, ) -> Result<()> { + let (src_offset, src_length, write_offset) = self.begin_appended_column(&close)?; + + let mut read = read.take(src_length as _); + let write_length = std::io::copy(&mut read, &mut self.buf)?; + + if src_length as u64 != write_length { + return Err(general_err!( + "Failed to splice column data, expected {src_length} got {write_length}" + )); + } + + self.finish_appended_column(close, src_offset, write_offset) + } + + /// Splice an already-encoded column chunk into the row group from an + /// in-order sequence of byte buffers (typically its serialized pages). + /// + /// This is a lower-overhead alternative to [`Self::append_column`] / + /// [`Self::append_column_from_read`] for callers that already hold the + /// chunk as owned [`Bytes`]: each buffer is written straight to the output + /// with a single `write_all`, skipping the intermediate copy through + /// [`std::io::copy`]'s fixed-size buffer. + /// + /// `pages` must yield the chunk's compressed bytes in final file order + /// (the dictionary page, if any, first) and together total exactly the + /// compressed size recorded in `close`. + #[cfg(feature = "arrow")] + pub(crate) fn append_column_from_pages( + &mut self, + pages: I, + close: ColumnCloseResult, + ) -> Result<()> + where + I: IntoIterator>, + { + let (src_offset, src_length, write_offset) = self.begin_appended_column(&close)?; + + let mut write_length = 0u64; + for page in pages { + let page = page?; + self.buf.write_all(&page)?; + write_length += page.len() as u64; + } + + if src_length as u64 != write_length { + return Err(general_err!( + "Failed to splice column data, expected {src_length} got {write_length}" + )); + } + + self.finish_appended_column(close, src_offset, write_offset) + } + + /// [`Self::append_column_from_read`] / [`Self::append_column_from_pages`] + /// preamble: validates the writer state and that `close` matches the next + /// expected column. + /// + /// Returns `(src_offset, src_length, write_offset)`: the chunk's start + /// offset and length in the source buffer, and the offset at which it will + /// land in the output file. + fn begin_appended_column(&mut self, close: &ColumnCloseResult) -> Result<(i64, i64, usize)> { self.assert_previous_writer_closed()?; let desc = self .next_column_desc() .ok_or_else(|| general_err!("exhausted columns in SerializedRowGroupWriter"))?; - let metadata = close.metadata; + let metadata = &close.metadata; if metadata.column_descr() != desc.as_ref() { return Err(general_err!( @@ -725,20 +788,26 @@ impl<'a, W: Write + Send> SerializedRowGroupWriter<'a, W> { )); } - let src_dictionary_offset = metadata.dictionary_page_offset(); - let src_data_offset = metadata.data_page_offset(); - let src_offset = src_dictionary_offset.unwrap_or(src_data_offset); + let src_offset = metadata + .dictionary_page_offset() + .unwrap_or_else(|| metadata.data_page_offset()); let src_length = metadata.compressed_size(); - let write_offset = self.buf.bytes_written(); - let mut read = read.take(src_length as _); - let write_length = std::io::copy(&mut read, &mut self.buf)?; + Ok((src_offset, src_length, write_offset)) + } - if src_length as u64 != write_length { - return Err(general_err!( - "Failed to splice column data, expected {read_length} got {write_length}" - )); - } + /// [`Self::append_column_from_read`] / [`Self::append_column_from_pages`] + /// epilogue: rewrites the buffer-relative page offsets recorded in `close` + /// to their final positions in the output file and closes the column. + fn finish_appended_column( + &mut self, + mut close: ColumnCloseResult, + src_offset: i64, + write_offset: usize, + ) -> Result<()> { + let metadata = close.metadata; + let src_dictionary_offset = metadata.dictionary_page_offset(); + let src_data_offset = metadata.data_page_offset(); let map_offset = |x| x - src_offset + write_offset as i64; let mut builder = ColumnChunkMetaData::builder(metadata.column_descr_ptr()) diff --git a/thirdparty/crates/parquet-59.1.0/src/geospatial/accumulator.rs b/thirdparty/crates/parquet-59.2.0/src/geospatial/accumulator.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/geospatial/accumulator.rs rename to thirdparty/crates/parquet-59.2.0/src/geospatial/accumulator.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/geospatial/bounding_box.rs b/thirdparty/crates/parquet-59.2.0/src/geospatial/bounding_box.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/geospatial/bounding_box.rs rename to thirdparty/crates/parquet-59.2.0/src/geospatial/bounding_box.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/geospatial/mod.rs b/thirdparty/crates/parquet-59.2.0/src/geospatial/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/geospatial/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/geospatial/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/geospatial/statistics.rs b/thirdparty/crates/parquet-59.2.0/src/geospatial/statistics.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/geospatial/statistics.rs rename to thirdparty/crates/parquet-59.2.0/src/geospatial/statistics.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/lib.rs b/thirdparty/crates/parquet-59.2.0/src/lib.rs similarity index 94% rename from thirdparty/crates/parquet-59.1.0/src/lib.rs rename to thirdparty/crates/parquet-59.2.0/src/lib.rs index 55eebfa37..3acdb6188 100644 --- a/thirdparty/crates/parquet-59.1.0/src/lib.rs +++ b/thirdparty/crates/parquet-59.2.0/src/lib.rs @@ -101,15 +101,18 @@ //! read and write [`RecordBatch`]es asynchronously. //! //! Most users will use [`AsyncArrowWriter`] for writing and [`ParquetRecordBatchStreamBuilder`] -//! for reading. When the `object_store` feature is enabled, [`ParquetObjectReader`] -//! provides efficient integration with object storage services such as S3 via the [object_store] -//! crate, automatically optimizing IO based on any predicates or projections provided. +//! for reading, automatically optimizing IO based on any predicates or projections provided. +//! Object storage services such as S3 can be integrated by implementing +//! [`AsyncFileReader`] on top of a client such as the [object_store] crate, +//! or by passing a writer implementing [`AsyncWrite`] (such as +//! `object_store::buffered::BufWriter`) to [`AsyncArrowWriter`]. //! //! [`async_reader`]: arrow::async_reader //! [`async_writer`]: arrow::async_writer //! [`AsyncArrowWriter`]: arrow::async_writer::AsyncArrowWriter +//! [`AsyncFileReader`]: arrow::async_reader::AsyncFileReader +//! [`AsyncWrite`]: https://docs.rs/tokio/latest/tokio/io/trait.AsyncWrite.html //! [`ParquetRecordBatchStreamBuilder`]: arrow::async_reader::ParquetRecordBatchStreamBuilder -//! [`ParquetObjectReader`]: arrow::async_reader::ParquetObjectReader //! //! ## Variant Logical Type (`variant_experimental` feature) //! diff --git a/thirdparty/crates/parquet-59.1.0/src/parquet_macros.rs b/thirdparty/crates/parquet-59.2.0/src/parquet_macros.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/parquet_macros.rs rename to thirdparty/crates/parquet-59.2.0/src/parquet_macros.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/parquet_thrift.rs b/thirdparty/crates/parquet-59.2.0/src/parquet_thrift.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/parquet_thrift.rs rename to thirdparty/crates/parquet-59.2.0/src/parquet_thrift.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/record/api.rs b/thirdparty/crates/parquet-59.2.0/src/record/api.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/record/api.rs rename to thirdparty/crates/parquet-59.2.0/src/record/api.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/record/mod.rs b/thirdparty/crates/parquet-59.2.0/src/record/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/record/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/record/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/record/reader.rs b/thirdparty/crates/parquet-59.2.0/src/record/reader.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/record/reader.rs rename to thirdparty/crates/parquet-59.2.0/src/record/reader.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/record/record_reader.rs b/thirdparty/crates/parquet-59.2.0/src/record/record_reader.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/record/record_reader.rs rename to thirdparty/crates/parquet-59.2.0/src/record/record_reader.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/record/record_writer.rs b/thirdparty/crates/parquet-59.2.0/src/record/record_writer.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/record/record_writer.rs rename to thirdparty/crates/parquet-59.2.0/src/record/record_writer.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/record/triplet.rs b/thirdparty/crates/parquet-59.2.0/src/record/triplet.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/record/triplet.rs rename to thirdparty/crates/parquet-59.2.0/src/record/triplet.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/schema/mod.rs b/thirdparty/crates/parquet-59.2.0/src/schema/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/schema/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/schema/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/schema/parser.rs b/thirdparty/crates/parquet-59.2.0/src/schema/parser.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/schema/parser.rs rename to thirdparty/crates/parquet-59.2.0/src/schema/parser.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/schema/printer.rs b/thirdparty/crates/parquet-59.2.0/src/schema/printer.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/schema/printer.rs rename to thirdparty/crates/parquet-59.2.0/src/schema/printer.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/schema/types.rs b/thirdparty/crates/parquet-59.2.0/src/schema/types.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/schema/types.rs rename to thirdparty/crates/parquet-59.2.0/src/schema/types.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/schema/visitor.rs b/thirdparty/crates/parquet-59.2.0/src/schema/visitor.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/schema/visitor.rs rename to thirdparty/crates/parquet-59.2.0/src/schema/visitor.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/util/bit_pack.rs b/thirdparty/crates/parquet-59.2.0/src/util/bit_pack.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/util/bit_pack.rs rename to thirdparty/crates/parquet-59.2.0/src/util/bit_pack.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/util/bit_util.rs b/thirdparty/crates/parquet-59.2.0/src/util/bit_util.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/util/bit_util.rs rename to thirdparty/crates/parquet-59.2.0/src/util/bit_util.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/util/interner.rs b/thirdparty/crates/parquet-59.2.0/src/util/interner.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/util/interner.rs rename to thirdparty/crates/parquet-59.2.0/src/util/interner.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/util/mod.rs b/thirdparty/crates/parquet-59.2.0/src/util/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/util/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/util/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/util/push_buffers.rs b/thirdparty/crates/parquet-59.2.0/src/util/push_buffers.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/util/push_buffers.rs rename to thirdparty/crates/parquet-59.2.0/src/util/push_buffers.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/util/test_common/file_util.rs b/thirdparty/crates/parquet-59.2.0/src/util/test_common/file_util.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/util/test_common/file_util.rs rename to thirdparty/crates/parquet-59.2.0/src/util/test_common/file_util.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/util/test_common/mod.rs b/thirdparty/crates/parquet-59.2.0/src/util/test_common/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/util/test_common/mod.rs rename to thirdparty/crates/parquet-59.2.0/src/util/test_common/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/util/test_common/page_util.rs b/thirdparty/crates/parquet-59.2.0/src/util/test_common/page_util.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/util/test_common/page_util.rs rename to thirdparty/crates/parquet-59.2.0/src/util/test_common/page_util.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/util/test_common/rand_gen.rs b/thirdparty/crates/parquet-59.2.0/src/util/test_common/rand_gen.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/util/test_common/rand_gen.rs rename to thirdparty/crates/parquet-59.2.0/src/util/test_common/rand_gen.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/util/utf8.rs b/thirdparty/crates/parquet-59.2.0/src/util/utf8.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/util/utf8.rs rename to thirdparty/crates/parquet-59.2.0/src/util/utf8.rs diff --git a/thirdparty/crates/parquet-59.1.0/src/variant.rs b/thirdparty/crates/parquet-59.2.0/src/variant.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/src/variant.rs rename to thirdparty/crates/parquet-59.2.0/src/variant.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/bad_data.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/bad_data.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/bad_data.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/bad_data.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/bad_raw_metadata.bin b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/bad_raw_metadata.bin similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/bad_raw_metadata.bin rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/bad_raw_metadata.bin diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/bigdelta.parquet b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/bigdelta.parquet similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/bigdelta.parquet rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/bigdelta.parquet diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/bloom_filter/async.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/bloom_filter/async.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/bloom_filter/async.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/bloom_filter/async.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/bloom_filter/mod.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/bloom_filter/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/bloom_filter/mod.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/bloom_filter/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/bloom_filter/sync.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/bloom_filter/sync.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/bloom_filter/sync.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/bloom_filter/sync.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/checksum.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/checksum.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/checksum.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/checksum.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/int96_stats_roundtrip.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/int96_stats_roundtrip.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/int96_stats_roundtrip.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/int96_stats_roundtrip.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/invalid_utf8.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/invalid_utf8.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/invalid_utf8.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/invalid_utf8.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/io/async_reader.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/io/async_reader.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/io/async_reader.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/io/async_reader.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/io/mod.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/io/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/io/mod.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/io/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/io/sync_reader.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/io/sync_reader.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/io/sync_reader.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/io/sync_reader.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/large_string_overflow.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/large_string_overflow.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/large_string_overflow.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/large_string_overflow.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/mod.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/mod.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/new_types.bin b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/new_types.bin similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/new_types.bin rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/new_types.bin diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/predicate_cache.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/predicate_cache.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/predicate_cache.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/predicate_cache.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/row_filter/async.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/row_filter/async.rs similarity index 62% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/row_filter/async.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/row_filter/async.rs index 66840bb81..fe16e426e 100644 --- a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/row_filter/async.rs +++ b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/row_filter/async.rs @@ -16,7 +16,7 @@ // under the License. use crate::io::TestReader; -use std::sync::Arc; +use std::sync::{Arc, Mutex}; use arrow::{ array::AsArray, @@ -44,25 +44,13 @@ use parquet::{ }, }; -#[tokio::test] -async fn test_row_filter_full_page_skip_is_handled_async() { - let first_value: i64 = 1111; - let last_value: i64 = 9999; - let num_rows: usize = 12; - - // build data with row selection average length 4 - // The result would be (1111 XXXX) ... (4 page in the middle)... (XXXX 9999) - // The Row Selection would be [1111, (skip 10), 9999] +fn make_two_column_i64_file(values: &[i64], rows_per_page: usize) -> Bytes { let schema = Arc::new(Schema::new(vec![ Field::new("key", DataType::Int64, false), Field::new("value", DataType::Int64, false), ])); - - let mut int_values: Vec = (0..num_rows as i64).collect(); - int_values[0] = first_value; - int_values[num_rows - 1] = last_value; - let keys = Int64Array::from(int_values.clone()); - let values = Int64Array::from(int_values.clone()); + let keys = Int64Array::from(values.to_vec()); + let values = Int64Array::from(values.to_vec()); let batch = RecordBatch::try_new( Arc::clone(&schema), vec![Arc::new(keys) as ArrayRef, Arc::new(values) as ArrayRef], @@ -70,15 +58,29 @@ async fn test_row_filter_full_page_skip_is_handled_async() { .unwrap(); let props = WriterProperties::builder() - .set_write_batch_size(2) - .set_data_page_row_count_limit(2) + .set_write_batch_size(rows_per_page) + .set_data_page_row_count_limit(rows_per_page) .build(); - let mut buffer = Vec::new(); let mut writer = ArrowWriter::try_new(&mut buffer, schema, Some(props)).unwrap(); writer.write(&batch).unwrap(); writer.close().unwrap(); - let data = Bytes::from(buffer); + Bytes::from(buffer) +} + +#[tokio::test] +async fn test_row_filter_full_page_skip_is_handled_async() { + let first_value: i64 = 1111; + let last_value: i64 = 9999; + let num_rows: usize = 12; + + // build data with row selection average length 4 + // The result would be (1111 XXXX) ... (4 page in the middle)... (XXXX 9999) + // The Row Selection would be [1111, (skip 10), 9999] + let mut int_values: Vec = (0..num_rows as i64).collect(); + int_values[0] = first_value; + int_values[num_rows - 1] = last_value; + let data = make_two_column_i64_file(&int_values, 2); let builder = ParquetRecordBatchStreamBuilder::new_with_options( TestReader::new(data.clone()), @@ -89,35 +91,282 @@ async fn test_row_filter_full_page_skip_is_handled_async() { let schema = builder.parquet_schema().clone(); let filter_mask = ProjectionMask::leaves(&schema, [0]); - let make_predicate = |mask: ProjectionMask| { - ArrowPredicateFn::new(mask, move |batch: RecordBatch| { - let column = batch.column(0); - let match_first = eq(column, &Int64Array::new_scalar(first_value))?; - let match_second = eq(column, &Int64Array::new_scalar(last_value))?; - or(&match_first, &match_second) - }) - }; + for policy in [ + RowSelectionPolicy::Auto { threshold: 32 }, + RowSelectionPolicy::Mask, + ] { + for max_predicate_cache_size in [None, Some(0)] { + for with_initial_selection in [false, true] { + let predicate_batch_sizes = Arc::new(Mutex::new(Vec::new())); + let observed_batch_sizes = Arc::clone(&predicate_batch_sizes); + let predicate = + ArrowPredicateFn::new(filter_mask.clone(), move |batch: RecordBatch| { + observed_batch_sizes.lock().unwrap().push(batch.num_rows()); + let column = batch.column(0); + let match_first = eq(column, &Int64Array::new_scalar(first_value))?; + let match_second = eq(column, &Int64Array::new_scalar(last_value))?; + or(&match_first, &match_second) + }); + + let stream = ParquetRecordBatchStreamBuilder::new_with_options( + TestReader::new(data.clone()), + ArrowReaderOptions::new().with_page_index_policy(PageIndexPolicy::Required), + ) + .await + .unwrap() + .with_row_filter(RowFilter::new(vec![Box::new(predicate)])) + .with_batch_size(12) + .with_row_selection_policy(policy); + let stream = if with_initial_selection { + stream.with_row_selection(RowSelection::from(vec![ + RowSelector::select(1), + RowSelector::skip(10), + RowSelector::select(1), + ])) + } else { + stream + }; + let stream = match max_predicate_cache_size { + Some(size) => stream.with_max_predicate_cache_size(size), + None => stream, + } + .build() + .unwrap(); - let predicate = make_predicate(filter_mask.clone()); + let schema = stream.schema().clone(); + let batches: Vec<_> = stream.try_collect().await.unwrap(); + let batch_sizes = batches + .iter() + .map(RecordBatch::num_rows) + .collect::>(); + assert_eq!( + batch_sizes, + vec![2], + "policy={policy:?}, cache={max_predicate_cache_size:?}, initial={with_initial_selection}" + ); + assert_eq!( + *predicate_batch_sizes.lock().unwrap(), + if with_initial_selection { + vec![2] + } else { + vec![12] + }, + "policy={policy:?}, cache={max_predicate_cache_size:?}, initial={with_initial_selection}" + ); + + let result = concat_batches(&schema, &batches).unwrap(); + assert_eq!(result.num_rows(), 2); + assert_eq!( + result + .column(0) + .as_any() + .downcast_ref::() + .unwrap(), + &Int64Array::from(vec![first_value, last_value]) + ); + } + } + } +} - // The batch size is set to 12 to read all rows in one go after filtering - // If the Reader chooses mask to handle filter, it might cause panic because the mid 4 pages may not be decoded. +#[tokio::test] +async fn test_mask_coalesces_loaded_ranges_to_batch_size() { + let values = (0..12).collect::>(); + let data = make_two_column_i64_file(&values, 2); let stream = ParquetRecordBatchStreamBuilder::new_with_options( - TestReader::new(data.clone()), + TestReader::new(data), ArrowReaderOptions::new().with_page_index_policy(PageIndexPolicy::Required), ) .await .unwrap() - .with_row_filter(RowFilter::new(vec![Box::new(predicate)])) - .with_batch_size(12) - .with_row_selection_policy(RowSelectionPolicy::Auto { threshold: 32 }) + .with_row_selection(RowSelection::from(vec![ + RowSelector::select(1), + RowSelector::skip(4), + RowSelector::select(1), + RowSelector::skip(5), + RowSelector::select(1), + ])) + .with_batch_size(2) + .with_row_selection_policy(RowSelectionPolicy::Mask) .build() .unwrap(); let schema = stream.schema().clone(); - let batches: Vec<_> = stream.try_collect().await.unwrap(); - let result = concat_batches(&schema, &batches).unwrap(); - assert_eq!(result.num_rows(), 2); + let batches: Vec = stream.try_collect().await.unwrap(); + assert_eq!( + batches + .iter() + .map(RecordBatch::num_rows) + .collect::>(), + vec![2, 1] + ); + + let batch = concat_batches(&schema, &batches).unwrap(); + assert_eq!( + batch + .column(0) + .as_any() + .downcast_ref::() + .unwrap() + .values(), + &[0, 5, 11] + ); +} + +#[tokio::test] +async fn test_mask_stops_after_trailing_skipped_pages() { + let values = (0..8).collect::>(); + let data = make_two_column_i64_file(&values, 2); + let stream = ParquetRecordBatchStreamBuilder::new_with_options( + TestReader::new(data), + ArrowReaderOptions::new().with_page_index_policy(PageIndexPolicy::Required), + ) + .await + .unwrap() + .with_row_selection(RowSelection::from(vec![ + RowSelector::select(1), + RowSelector::skip(4), + RowSelector::select(1), + RowSelector::skip(2), + ])) + .with_batch_size(8) + .with_row_selection_policy(RowSelectionPolicy::Mask) + .build() + .unwrap(); + + let batches: Vec = stream.try_collect().await.unwrap(); + assert_eq!( + batches + .iter() + .map(RecordBatch::num_rows) + .collect::>(), + vec![2] + ); + assert_eq!( + batches[0] + .column(0) + .as_any() + .downcast_ref::() + .unwrap() + .values(), + &[0, 5] + ); +} + +#[tokio::test] +async fn test_mask_nested_projection_with_different_page_boundaries() { + use arrow_array::{ + Array, UInt32Array, + builder::{Int32Builder, ListBuilder, StringBuilder, StructBuilder}, + }; + use arrow_schema::Fields; + use parquet::file::properties::WriterVersion; + + let num_rows = 14usize; + let long_prefix = "x".repeat(500); + let struct_fields = Fields::from(vec![ + Field::new("x", DataType::Int32, false), + Field::new("y", DataType::Utf8, false), + ]); + let mut list_builder = ListBuilder::new(StructBuilder::from_fields(struct_fields, 0)); + for row in 0..num_rows { + let values = list_builder.values(); + for item in 0..if row % 2 == 0 { 2 } else { 3 } { + values + .field_builder::(0) + .unwrap() + .append_value(row as i32 * 10 + item); + values + .field_builder::(1) + .unwrap() + .append_value(format!("{long_prefix}_{row}_{item}")); + values.append(true); + } + list_builder.append(true); + } + let values = list_builder.finish(); + let schema = Arc::new(Schema::new(vec![Field::new( + "values", + values.data_type().clone(), + false, + )])); + let input = RecordBatch::try_new(schema.clone(), vec![Arc::new(values) as ArrayRef]).unwrap(); + + // The fixed-width leaf fits in one page, while the long string leaf flushes + // frequently and therefore has different page boundaries. + let props = WriterProperties::builder() + .set_writer_version(WriterVersion::PARQUET_2_0) + .set_write_batch_size(2) + .set_dictionary_enabled(false) + .set_data_page_size_limit(512) + .build(); + let mut buffer = Vec::new(); + let mut writer = ArrowWriter::try_new(&mut buffer, schema, Some(props)).unwrap(); + writer.write(&input).unwrap(); + writer.close().unwrap(); + + let builder = ParquetRecordBatchStreamBuilder::new_with_options( + TestReader::new(Bytes::from(buffer)), + ArrowReaderOptions::new().with_page_index_policy(PageIndexPolicy::Required), + ) + .await + .unwrap(); + let page_first_rows = builder.metadata().offset_index().unwrap()[0] + .iter() + .map(|column| { + column + .page_locations() + .iter() + .map(|page| page.first_row_index) + .collect::>() + }) + .collect::>(); + assert_eq!(page_first_rows.len(), 2); + assert_eq!(page_first_rows[0], vec![0]); + assert_ne!(page_first_rows[0], page_first_rows[1]); + + let variable_width_pages = &page_first_rows[1]; + assert_eq!(variable_width_pages.first(), Some(&0)); + let selected_pages = [0, 6, 13] + .map(|row| variable_width_pages.partition_point(|first_row| *first_row <= row) - 1); + assert!( + selected_pages + .windows(2) + .all(|pages| pages[1] > pages[0] + 1), + "selected rows must leave unloaded pages between them: {page_first_rows:?}" + ); + + let stream = builder + .with_row_selection(RowSelection::from(vec![ + RowSelector::select(1), + RowSelector::skip(5), + RowSelector::select(1), + RowSelector::skip(6), + RowSelector::select(1), + ])) + .with_batch_size(2) + .with_row_selection_policy(RowSelectionPolicy::Mask) + .build() + .unwrap(); + + let output_schema = stream.schema().clone(); + let batches: Vec = stream.try_collect().await.unwrap(); + assert_eq!( + batches + .iter() + .map(RecordBatch::num_rows) + .collect::>(), + vec![2, 1] + ); + + let output = concat_batches(&output_schema, &batches).unwrap(); + let expected = arrow::compute::take( + input.column(0).as_ref(), + &UInt32Array::from(vec![0, 6, 13]), + None, + ) + .unwrap(); + assert_eq!(output.column(0).to_data(), expected.to_data()); } #[tokio::test] @@ -526,19 +775,16 @@ async fn test_predicate_pushdown_with_skipped_pages() { } } -/// Regression test: when multiple predicates are used, the first predicate's -/// override of the selection strategy (to Mask) must NOT carry forward to -/// subsequent predicates. Each predicate must get a fresh Auto policy so the -/// override can detect page skipping for that predicate's specific columns. +/// Regression test: Auto resolution and loaded row ranges must be refreshed for +/// each predicate's current selection and projection. /// /// Scenario: /// - Dense initial RowSelection (alternating select/skip) covers all pages → Auto resolves to Mask /// - Predicate 1 evaluates on column A, narrows selection to skip middle pages /// - Predicate 2's column B is fetched sparsely with the narrowed selection (missing middle pages) -/// - Without the fix, the override for predicate 2 returns early (policy=Mask, not Auto), -/// so Mask is used and tries to read missing pages → "Invalid offset" error +/// - Predicate 2 remains safe with Mask because its loaded row ranges are recomputed for column B #[tokio::test] -async fn test_multi_predicate_mask_policy_carryover() { +async fn test_multi_predicate_auto_mask_with_sparse_pages() { // 300 rows, 1 row group, 100 rows per page (3 pages) let num_rows = 300usize; let rows_per_page = 100; @@ -604,7 +850,10 @@ async fn test_multi_predicate_mask_policy_carryover() { // Predicate 2 on value_col: keeps rows where value_col < 250 // This column is fetched AFTER predicate 1 narrows the selection. // Its sparse data will be missing the middle page. - let pred2 = ArrowPredicateFn::new(ProjectionMask::roots(&schema_descr, [1]), |batch| { + let predicate_batch_sizes = Arc::new(Mutex::new(Vec::new())); + let observed_batch_sizes = Arc::clone(&predicate_batch_sizes); + let pred2 = ArrowPredicateFn::new(ProjectionMask::roots(&schema_descr, [1]), move |batch| { + observed_batch_sizes.lock().unwrap().push(batch.num_rows()); let col = batch.column(0).as_primitive::(); Ok(BooleanArray::from_iter( col.iter().map(|v| v.map(|val| val < 250)), @@ -612,8 +861,6 @@ async fn test_multi_predicate_mask_policy_carryover() { }); let row_filter = RowFilter::new(vec![Box::new(pred1), Box::new(pred2)]); - - // Output projection: both columns let projection = ProjectionMask::roots(&schema_descr, [0, 1]); let stream = builder @@ -624,9 +871,17 @@ async fn test_multi_predicate_mask_policy_carryover() { .build() .unwrap(); - // Without the fix, this panics with: - // "Invalid offset in sparse column chunk data: ..., no matching page found." + // Without loaded-range-aware Mask reads, this panics with an invalid sparse-page offset. let batches: Vec = stream.try_collect().await.unwrap(); + assert_eq!(*predicate_batch_sizes.lock().unwrap(), vec![100]); + assert_eq!( + batches + .iter() + .map(RecordBatch::num_rows) + .collect::>(), + vec![75] + ); + let batch = concat_batches(&batches[0].schema(), &batches).unwrap(); // Verify results: rows where filter_col==0 AND value_col<250 AND original alternating selection @@ -634,3 +889,70 @@ async fn test_multi_predicate_mask_policy_carryover() { // Plus even-indexed rows in [200,250) with value<250 → rows 200,202,...,248 (25 rows) assert_eq!(batch.num_rows(), 75); } + +/// Regression test: a Mask cursor built directly from a `BooleanBuffer` +/// (rather than from `Vec`) must also stay within loaded row +/// ranges when page pruning leaves sparse column data. +/// +/// The buffer is a non-byte-aligned `BooleanBuffer::slice(...)` so the direct +/// `BooleanBuffer -> MaskCursor` path is exercised with a bit offset. The +/// selection keeps only the first and last of 12 rows (2 rows per page), so +/// the four middle pages are never fetched. Without loaded-range propagation +/// in `new_mask_from_buffer`, decoding would cross the unloaded pages and fail +/// with an invalid sparse-page offset. +#[tokio::test] +async fn test_mask_from_boolean_buffer_slice_with_sparse_pages() { + use arrow_buffer::BooleanBuffer; + + let num_rows = 12; + let values = (0..num_rows).collect::>(); + let data = make_two_column_i64_file(&values, 2); + + // 5 padding bits force the sliced mask to start mid-byte. + let mut bits = vec![true; 5]; + bits.push(true); // row 0 selected + bits.extend(std::iter::repeat_n(false, 10)); // rows 1..=10 skipped + bits.push(true); // row 11 selected + bits.extend([false, true, false]); // trailing padding outside the slice + let mask = BooleanBuffer::from(bits).slice(5, num_rows as usize); + + for policy in [ + RowSelectionPolicy::Mask, + RowSelectionPolicy::Auto { threshold: 32 }, + ] { + let stream = ParquetRecordBatchStreamBuilder::new_with_options( + TestReader::new(data.clone()), + ArrowReaderOptions::new().with_page_index_policy(PageIndexPolicy::Required), + ) + .await + .unwrap() + .with_row_selection(RowSelection::from_boolean_buffer(mask.clone())) + .with_batch_size(num_rows as usize) + .with_row_selection_policy(policy) + .build() + .unwrap(); + + let schema = stream.schema().clone(); + let batches: Vec = stream.try_collect().await.unwrap(); + assert_eq!( + batches + .iter() + .map(RecordBatch::num_rows) + .collect::>(), + vec![2], + "policy={policy:?}" + ); + + let batch = concat_batches(&schema, &batches).unwrap(); + assert_eq!( + batch + .column(0) + .as_any() + .downcast_ref::() + .unwrap() + .values(), + &[0, 11], + "policy={policy:?}" + ); + } +} diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/row_filter/mod.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/row_filter/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/row_filter/mod.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/row_filter/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/row_filter/sync.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/row_filter/sync.rs similarity index 99% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/row_filter/sync.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/row_filter/sync.rs index 77a75220d..a224c95c8 100644 --- a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/row_filter/sync.rs +++ b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/row_filter/sync.rs @@ -191,7 +191,7 @@ fn test_row_filter_full_page_skip_is_handled() { .unwrap(); // Predicate pruning used to panic once mask-backed plans removed whole pages. - // Collecting into batches validates the plan now downgrades to selectors instead. + // Collecting into batches validates that Mask can read around unloaded pages. let schema = reader.schema().clone(); let batches = reader.collect::, _>>().unwrap(); let result = concat_batches(&schema, &batches).unwrap(); diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_reader/statistics.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_reader/statistics.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_reader/statistics.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_reader/statistics.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_writer.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_writer.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_writer.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_writer.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/arrow_writer_layout.rs b/thirdparty/crates/parquet-59.2.0/tests/arrow_writer_layout.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/arrow_writer_layout.rs rename to thirdparty/crates/parquet-59.2.0/tests/arrow_writer_layout.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/encryption/encryption.rs b/thirdparty/crates/parquet-59.2.0/tests/encryption/encryption.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/encryption/encryption.rs rename to thirdparty/crates/parquet-59.2.0/tests/encryption/encryption.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/encryption/encryption_agnostic.rs b/thirdparty/crates/parquet-59.2.0/tests/encryption/encryption_agnostic.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/encryption/encryption_agnostic.rs rename to thirdparty/crates/parquet-59.2.0/tests/encryption/encryption_agnostic.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/encryption/encryption_async.rs b/thirdparty/crates/parquet-59.2.0/tests/encryption/encryption_async.rs similarity index 92% rename from thirdparty/crates/parquet-59.1.0/tests/encryption/encryption_async.rs rename to thirdparty/crates/parquet-59.2.0/tests/encryption/encryption_async.rs index f86ab59bf..a2ec2ed29 100644 --- a/thirdparty/crates/parquet-59.1.0/tests/encryption/encryption_async.rs +++ b/thirdparty/crates/parquet-59.2.0/tests/encryption/encryption_async.rs @@ -420,32 +420,100 @@ async fn test_write_non_uniform_encryption() { .await; } -#[cfg(feature = "object_store")] -async fn get_encrypted_meta_store() -> ( - object_store::ObjectMeta, - std::sync::Arc, -) { - use object_store::local::LocalFileSystem; +/// An [`AsyncFileReader`] reading via an [`ObjectStore`], mirroring the +/// example on the [`AsyncFileReader`] trait documentation +/// +/// [`AsyncFileReader`]: parquet::arrow::async_reader::AsyncFileReader +/// [`ObjectStore`]: object_store::ObjectStore +mod object_store_reader { + use bytes::Bytes; + use futures::future::BoxFuture; + use futures::{FutureExt, TryFutureExt}; use object_store::path::Path; - use object_store::{ObjectStore, ObjectStoreExt}; - + use object_store::{GetOptions, GetRange, ObjectStore, ObjectStoreExt}; + use parquet::arrow::arrow_reader::ArrowReaderOptions; + use parquet::arrow::async_reader::{AsyncFileReader, MetadataSuffixFetch}; + use parquet::errors::{ParquetError, Result}; + use parquet::file::metadata::{ParquetMetaData, ParquetMetaDataReader}; + use std::ops::Range; use std::sync::Arc; - let test_data = arrow::util::test_util::parquet_test_data(); - let store = LocalFileSystem::new_with_prefix(test_data).unwrap(); - let meta = store - .head(&Path::from("uniform_encryption.parquet.encrypted")) - .await - .unwrap(); + fn to_parquet_err(e: object_store::Error) -> ParquetError { + ParquetError::External(Box::new(e)) + } + + #[derive(Clone)] + pub struct ObjectStoreReader { + pub store: Arc, + pub path: Path, + } + + impl AsyncFileReader for ObjectStoreReader { + fn get_bytes(&mut self, range: Range) -> BoxFuture<'_, Result> { + self.store + .get_range(&self.path, range) + .map_err(to_parquet_err) + .boxed() + } + + fn get_byte_ranges( + &mut self, + ranges: Vec>, + ) -> BoxFuture<'_, Result>> { + async move { + self.store + .get_ranges(&self.path, &ranges) + .await + .map_err(to_parquet_err) + } + .boxed() + } - (meta, Arc::new(store) as Arc) + fn get_metadata<'a>( + &'a mut self, + options: Option<&'a ArrowReaderOptions>, + ) -> BoxFuture<'a, Result>> { + async move { + let metadata = ParquetMetaDataReader::new() + .with_arrow_reader_options(options) + .load_via_suffix_and_finish(self) + .await?; + Ok(Arc::new(metadata)) + } + .boxed() + } + } + + impl MetadataSuffixFetch for &mut ObjectStoreReader { + fn fetch_suffix(&mut self, suffix: usize) -> BoxFuture<'_, Result> { + let options = GetOptions { + range: Some(GetRange::Suffix(suffix as u64)), + ..Default::default() + }; + async move { + let resp = self + .store + .get_opts(&self.path, options) + .await + .map_err(to_parquet_err)?; + resp.bytes().await.map_err(to_parquet_err) + } + .boxed() + } + } } #[tokio::test] -#[cfg(feature = "object_store")] async fn test_read_encrypted_file_from_object_store() { - use parquet::arrow::async_reader::{AsyncFileReader, ParquetObjectReader}; - let (meta, store) = get_encrypted_meta_store().await; + use object_store::local::LocalFileSystem; + use object_store::path::Path; + use object_store_reader::ObjectStoreReader; + use parquet::arrow::async_reader::AsyncFileReader; + use std::sync::Arc; + + let test_data = arrow::util::test_util::parquet_test_data(); + let store = Arc::new(LocalFileSystem::new_with_prefix(test_data).unwrap()); + let path = Path::from("uniform_encryption.parquet.encrypted"); let key_code: &[u8] = "0123456789012345".as_bytes(); let decryption_properties = FileDecryptionProperties::builder(key_code.to_vec()) @@ -453,7 +521,7 @@ async fn test_read_encrypted_file_from_object_store() { .unwrap(); let options = ArrowReaderOptions::new().with_file_decryption_properties(decryption_properties); - let mut reader = ParquetObjectReader::new(store, meta.location).with_file_size(meta.size); + let mut reader = ObjectStoreReader { store, path }; let metadata = reader.get_metadata(Some(&options)).await.unwrap(); let builder = ParquetRecordBatchStreamBuilder::new_with_options(reader, options) .await diff --git a/thirdparty/crates/parquet-59.1.0/tests/encryption/encryption_disabled.rs b/thirdparty/crates/parquet-59.2.0/tests/encryption/encryption_disabled.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/encryption/encryption_disabled.rs rename to thirdparty/crates/parquet-59.2.0/tests/encryption/encryption_disabled.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/encryption/encryption_util.rs b/thirdparty/crates/parquet-59.2.0/tests/encryption/encryption_util.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/encryption/encryption_util.rs rename to thirdparty/crates/parquet-59.2.0/tests/encryption/encryption_util.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/encryption/mod.rs b/thirdparty/crates/parquet-59.2.0/tests/encryption/mod.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/encryption/mod.rs rename to thirdparty/crates/parquet-59.2.0/tests/encryption/mod.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/geospatial.rs b/thirdparty/crates/parquet-59.2.0/tests/geospatial.rs similarity index 100% rename from thirdparty/crates/parquet-59.1.0/tests/geospatial.rs rename to thirdparty/crates/parquet-59.2.0/tests/geospatial.rs diff --git a/thirdparty/crates/parquet-59.1.0/tests/variant_integration.rs b/thirdparty/crates/parquet-59.2.0/tests/variant_integration.rs similarity index 94% rename from thirdparty/crates/parquet-59.1.0/tests/variant_integration.rs rename to thirdparty/crates/parquet-59.2.0/tests/variant_integration.rs index b97b3f225..e06426a7a 100644 --- a/thirdparty/crates/parquet-59.1.0/tests/variant_integration.rs +++ b/thirdparty/crates/parquet-59.2.0/tests/variant_integration.rs @@ -41,13 +41,13 @@ type Result = std::result::Result; /// Note the index is zero-based, while the case number is one-based macro_rules! variant_test_case { ($case_num:literal $(, $expected_error:literal )? ) => { - paste::paste! { + seq_macro::seq!(N in $case_num..=$case_num { #[test] $( #[should_panic(expected = $expected_error)] )? - fn []() { - all_cases()[$case_num - 1].run() + fn test_variant_integration_case_~N() { + all_cases()[N - 1].run() } - } + }); }; } @@ -55,6 +55,8 @@ macro_rules! variant_test_case { // Notes // - case 3 is empty in cases.json for some reason // - cases 40, 42, 87, 127 and 128 are expected to fail always (they include invalid variants) +// - cases 41, 131 and 138 omit the spec-required `value` column. They are read leniently by +// synthesizing an all-null `value` (https://github.com/apache/arrow-rs/issues/10306) // - the remaining cases are expected to (eventually) pass variant_test_case!(1); @@ -104,6 +106,8 @@ variant_test_case!(38); variant_test_case!(39); // Is an error case (should be failing as the expected error message indicates) variant_test_case!(40, "both value and typed_value are non-null"); +// Schema omits the spec-required `value` column. Read leniently by synthesizing an +// all-null `value` (testArrayMissingValueColumn, https://github.com/apache/arrow-rs/issues/10306) variant_test_case!(41); // Is an error case (should be failing as the expected error message indicates) variant_test_case!(42, "both value and typed_value are non-null"); @@ -201,6 +205,8 @@ variant_test_case!(127, "Illegal shredded value type: UInt32"); variant_test_case!(128, "Expected object in value field"); variant_test_case!(129); variant_test_case!(130); +// Schema omits the spec-required `value` column. Read leniently by synthesizing an +// all-null `value` (testMissingValueColumn, https://github.com/apache/arrow-rs/issues/10306) variant_test_case!(131); variant_test_case!(132); variant_test_case!(133); @@ -209,6 +215,8 @@ variant_test_case!(135); variant_test_case!(136); // Is an error case (should be failing as the expected error message indicates) variant_test_case!(137, "Illegal shredded value type: FixedSizeBinary(4)"); +// Schema omits the spec-required `value` column. Read leniently by synthesizing an +// all-null `value` (testShreddedObjectMissingValueColumn, https://github.com/apache/arrow-rs/issues/10306) variant_test_case!(138); /// Test case definition structure matching the format from diff --git a/thirdparty/crates/paste-1.0.15/.cargo-checksum.json b/thirdparty/crates/paste-1.0.15/.cargo-checksum.json deleted file mode 100644 index 94191cfeb..000000000 --- a/thirdparty/crates/paste-1.0.15/.cargo-checksum.json +++ /dev/null @@ -1 +0,0 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"7e77363b21d4f614eb3292289ef0816d753bbed1f3a3253698f2d548defa1bfd",".github/FUNDING.yml":"b017158736b3c9751a2d21edfce7fe61c8954e2fced8da8dd3013c2f3e295bd9",".github/workflows/ci.yml":"8cddd19b88f90df53271d384c62997ba13fe1e9a017e6ff082401c81d46f3be6","Cargo.toml":"b639e399e32159609ed573ffdb1a4edf06fba8aee208d9259e9dba031834aaaa","Cargo.toml.orig":"0a9a6dd2be15fb91d0ad7c545a99a509bdd3a32a4ff795f85fd70b60e91fad0a","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"cd8f304fa9cca9566dff0bb3492beae55f47f3972ddfb8f1fa38c3da1068b4a8","build.rs":"dba46ae4291317fb644ba2143f44eaf54a8ab946ba1367a33d055d694715f68a","src/attr.rs":"e8301f019e107ef9f5d8a3bbed355ffa9c0fd73396646d7fedbba333d341b7bc","src/error.rs":"be08d9d48b4cb9984b5141b12f21c31bd7293942c18b3ce25754723930cf54f5","src/lib.rs":"12a0578bb1d011ae759a94aa4850e970fc1c74102d1ede62b9f405675d7e182e","src/segment.rs":"462be04eea3ad48028d0841e8000c13205eb049522b8003bcc2926f21e93cb78","tests/compiletest.rs":"022a8e400ef813d7ea1875b944549cee5125f6a995dc33e93b48cba3e1b57bd1","tests/test_attr.rs":"39a55dcce5a127b2f85e9127a810b4aa3318e408cac93ff678301a2120aac5b5","tests/test_doc.rs":"7afb22427cb1c54fcf75a581fec5503404d8e93274027040b4d901f8caa597bb","tests/test_expr.rs":"d25ff118a78bd8e7d38ff532f0b9abb046bd0fbe61db8080b973bff67743af4e","tests/test_item.rs":"ee373a6658b384d1b2a0053653ac18e19d4053bbd04c8024980340894c04dcdc","tests/ui/case-warning.rs":"6b7cb803527911fe698e7fbe080160bc5d07c0da36fac0ec29d599753ce8bd10","tests/ui/case-warning.stderr":"7b7d470edc2a11b0864534099b360e0c42d423e068f49cea7858e0b340c2ef3d","tests/ui/env-empty.rs":"093fb0844475f4710580b5e4cad162918896d4fb48d1516bae04eb39dddd265a","tests/ui/env-empty.stderr":"3462f06f6f21130a81efff3be3bc838b395f6107bfbf753e479ec5a60e09b15d","tests/ui/env-non-string.rs":"516460860e7790b412b0fcd203289720a155dfba2498616967e4d7e6e6ab4990","tests/ui/env-non-string.stderr":"fea08d588a238e0f4c06de5c5ae97ac195bb2bcfc070040fb8087bdf4d1f4eee","tests/ui/env-suffix.rs":"0f1756608efc7a6c5810b8b21528092546ac95371e048c6060064e747c1b0a27","tests/ui/env-suffix.stderr":"287fecb2a91abc61501e0bd71d7f111670a526960ab18a554f4d16ed83d940b5","tests/ui/env-unexpected.rs":"18f06317e72ea16dae6ebe7c20bf5ef26b46e01a5c54fd31dc2a351ba68e8ca5","tests/ui/env-unexpected.stderr":"14d9a40160daf0191efc2b53be5fdde5b066674053e76af170e58af08f4022aa","tests/ui/invalid-ident.rs":"c3f375cac04d56684e427834076128b6e77eeeb9e99067a06307e27693b0ff51","tests/ui/invalid-ident.stderr":"b56d1c26253dec71ba1f97ffa01602b3a4429fc85a6b5c87f5290aab0568ea30","tests/ui/missing-paren-on-env.rs":"05cafef972e8c99f82834e164e7713f6056ac1a24b1f31d0320ac4fe361a53bd","tests/ui/missing-paren-on-env.stderr":"baf7b420d201f033e2113eaebd85376047397d991c35c441f07e5c6f1ec2b685","tests/ui/no-env-var.rs":"330bb71f2f3d98d23176acc5aeb1c0b66443af14c0857bb5bc92bfd130eb4a62","tests/ui/no-env-var.stderr":"68af072d3ccb2537bca9a5cd6d5796bb5ab5408f59564c8e8c66b1590ac7c5a5","tests/ui/no-ident-after-colon.rs":"a5af9548ab8d7f5b6130e1410c90f2cc589c595eb99f6939e6deb3f54e7262a2","tests/ui/no-ident-after-colon.stderr":"efac036a78f077c9c10a1ed048d69531293dcb97784ed784af0b24788ecbab54","tests/ui/unexpected-group.rs":"6b2e398a9ad3e077ea49c68b7c134ec3268e398723f4d9d5ef7b4d7b8513ac44","tests/ui/unexpected-group.stderr":"1260b5a4c295639958e3dd0da475c385184f0a916f5fdc4f1f2bfe232688f43c","tests/ui/unexpected-modifier.rs":"8b7e4c93f06fe7e7be469375e8bbaf19fec5fdffe688a0c29d2de2944a420337","tests/ui/unexpected-modifier.stderr":"581212b89358ac6bd38632bfd4322c25c171046875711fd639cfb498e01629c8","tests/ui/unexpected-punct.rs":"430e98bc03abdcc46f72cea01264c278a9c25f3d1d63064a6d78f4ae71b6a2d9","tests/ui/unexpected-punct.stderr":"24ab2e32d2da8dad93ef04dc05a2ecf6fdeb11bdebeae9454ad4759cc2b16551","tests/ui/unsupported-literal.rs":"1b2d3634fba5dc35d5ac9012d488aa93e329d1fa4489df1eadee65613a010e59","tests/ui/unsupported-literal.stderr":"6b137ccd6bc2a341aeb1e0d5321a896aa6c8db9a4e2571f4e41bd744511760bf","tests/ui/unsupported-modifier.rs":"03bb0239880070e8b470a6072c06094e1483ea91256e7cb4b9f2e8761696fa5a","tests/ui/unsupported-modifier.stderr":"890d7f484fdbd46da72923db4d7aba0ac3eaece253bb7195b7a36ae9a918027e"},"package":"57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a"} \ No newline at end of file diff --git a/thirdparty/crates/paste-1.0.15/.cargo_vcs_info.json b/thirdparty/crates/paste-1.0.15/.cargo_vcs_info.json deleted file mode 100644 index 535446518..000000000 --- a/thirdparty/crates/paste-1.0.15/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "a2c7e27875277450ed28147623ba5218dd23e732" - }, - "path_in_vcs": "" -} \ No newline at end of file diff --git a/thirdparty/crates/paste-1.0.15/.github/FUNDING.yml b/thirdparty/crates/paste-1.0.15/.github/FUNDING.yml deleted file mode 100644 index 750707701..000000000 --- a/thirdparty/crates/paste-1.0.15/.github/FUNDING.yml +++ /dev/null @@ -1 +0,0 @@ -github: dtolnay diff --git a/thirdparty/crates/paste-1.0.15/.github/workflows/ci.yml b/thirdparty/crates/paste-1.0.15/.github/workflows/ci.yml deleted file mode 100644 index 2b39c8f59..000000000 --- a/thirdparty/crates/paste-1.0.15/.github/workflows/ci.yml +++ /dev/null @@ -1,97 +0,0 @@ -name: CI - -on: - push: - pull_request: - workflow_dispatch: - schedule: [cron: "40 1 * * *"] - -permissions: - contents: read - -env: - RUSTFLAGS: -Dwarnings - -jobs: - pre_ci: - uses: dtolnay/.github/.github/workflows/pre_ci.yml@master - - test: - name: Rust ${{matrix.rust}} - needs: pre_ci - if: needs.pre_ci.outputs.continue - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - rust: [nightly, beta, stable, 1.56.0] - timeout-minutes: 45 - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@master - with: - toolchain: ${{matrix.rust}} - - name: Enable type layout randomization - run: echo RUSTFLAGS=${RUSTFLAGS}\ -Zrandomize-layout >> $GITHUB_ENV - if: matrix.rust == 'nightly' - - run: cargo test - - msrv: - name: Rust 1.31.0 - needs: pre_ci - if: needs.pre_ci.outputs.continue - runs-on: ubuntu-latest - timeout-minutes: 45 - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@1.31.0 - - run: cargo check - - doc: - name: Documentation - needs: pre_ci - if: needs.pre_ci.outputs.continue - runs-on: ubuntu-latest - timeout-minutes: 45 - env: - RUSTDOCFLAGS: -Dwarnings - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@nightly - - uses: dtolnay/install@cargo-docs-rs - - run: cargo docs-rs - - clippy: - name: Clippy - runs-on: ubuntu-latest - if: github.event_name != 'pull_request' - timeout-minutes: 45 - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@clippy - - run: cargo clippy --tests -- -Dclippy::all -Dclippy::pedantic - - miri: - name: Miri - needs: pre_ci - if: needs.pre_ci.outputs.continue - runs-on: ubuntu-latest - timeout-minutes: 45 - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@miri - - run: cargo miri setup - - run: cargo miri test - env: - MIRIFLAGS: -Zmiri-strict-provenance - - outdated: - name: Outdated - runs-on: ubuntu-latest - if: github.event_name != 'pull_request' - timeout-minutes: 45 - steps: - - uses: actions/checkout@v4 - - uses: dtolnay/rust-toolchain@stable - - uses: dtolnay/install@cargo-outdated - - run: cargo outdated --workspace --exit-code 1 diff --git a/thirdparty/crates/paste-1.0.15/BUILD.bazel b/thirdparty/crates/paste-1.0.15/BUILD.bazel deleted file mode 100644 index 783a1f6c2..000000000 --- a/thirdparty/crates/paste-1.0.15/BUILD.bazel +++ /dev/null @@ -1,176 +0,0 @@ -############################################################################### -# @generated -# DO NOT MODIFY: This file is auto-generated by a crate_universe tool. To -# regenerate this file, run the following: -# -# bazel run @@//thirdparty:crates_vendor -############################################################################### - -load( - "@rules_rust//cargo:defs.bzl", - "cargo_build_script", - "cargo_toml_env_vars", -) -load("@rules_rust//rust:defs.bzl", "rust_proc_macro") - -package(default_visibility = ["//visibility:public"]) - -cargo_toml_env_vars( - name = "cargo_toml_env_vars", - src = "Cargo.toml", -) - -rust_proc_macro( - name = "paste", - srcs = glob( - include = ["**/*.rs"], - allow_empty = False, - ), - compile_data = glob( - include = ["**"], - allow_empty = True, - exclude = [ - "**/* *", - ".tmp_git_root/**/*", - "BUILD", - "BUILD.bazel", - "WORKSPACE", - "WORKSPACE.bazel", - ], - ), - crate_root = "src/lib.rs", - edition = "2018", - rustc_env_files = [ - ":cargo_toml_env_vars", - ], - rustc_flags = [ - "--cap-lints=allow", - ], - tags = [ - "cargo-bazel", - "crate-name=paste", - "manual", - "noclippy", - "norustfmt", - ], - target_compatible_with = select({ - "@rules_rust//rust/platform:aarch64-apple-darwin": [], - "@rules_rust//rust/platform:aarch64-apple-ios": [], - "@rules_rust//rust/platform:aarch64-apple-ios-macabi": [], - "@rules_rust//rust/platform:aarch64-apple-ios-sim": [], - "@rules_rust//rust/platform:aarch64-linux-android": [], - "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [], - "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [], - "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [], - "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [], - "@rules_rust//rust/platform:aarch64-unknown-none": [], - "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [], - "@rules_rust//rust/platform:aarch64-unknown-uefi": [], - "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [], - "@rules_rust//rust/platform:arm-unknown-linux-musleabi": [], - "@rules_rust//rust/platform:armv7-linux-androideabi": [], - "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [], - "@rules_rust//rust/platform:i686-apple-darwin": [], - "@rules_rust//rust/platform:i686-linux-android": [], - "@rules_rust//rust/platform:i686-pc-windows-msvc": [], - "@rules_rust//rust/platform:i686-unknown-freebsd": [], - "@rules_rust//rust/platform:i686-unknown-linux-gnu": [], - "@rules_rust//rust/platform:loongarch64-unknown-linux-gnu": [], - "@rules_rust//rust/platform:mips-unknown-linux-gnu": [], - "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [], - "@rules_rust//rust/platform:riscv32imac-unknown-none-elf": [], - "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [], - "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [], - "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [], - "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [], - "@rules_rust//rust/platform:sparc64-unknown-linux-gnu": [], - "@rules_rust//rust/platform:sparc64-unknown-netbsd": [], - "@rules_rust//rust/platform:sparc64-unknown-openbsd": [], - "@rules_rust//rust/platform:thumbv6m-none-eabi": [], - "@rules_rust//rust/platform:thumbv7em-none-eabi": [], - "@rules_rust//rust/platform:thumbv7em-none-eabihf": [], - "@rules_rust//rust/platform:thumbv7m-none-eabi": [], - "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [], - "@rules_rust//rust/platform:thumbv8m.main-none-eabihf": [], - "@rules_rust//rust/platform:wasm32-unknown-emscripten": [], - "@rules_rust//rust/platform:wasm32-unknown-unknown": [], - "@rules_rust//rust/platform:wasm32-wasip1": [], - "@rules_rust//rust/platform:wasm32-wasip1-threads": [], - "@rules_rust//rust/platform:wasm32-wasip2": [], - "@rules_rust//rust/platform:x86_64-apple-darwin": [], - "@rules_rust//rust/platform:x86_64-apple-ios": [], - "@rules_rust//rust/platform:x86_64-apple-ios-macabi": [], - "@rules_rust//rust/platform:x86_64-linux-android": [], - "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [], - "@rules_rust//rust/platform:x86_64-unknown-freebsd": [], - "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [], - "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [], - "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [], - "@rules_rust//rust/platform:x86_64-unknown-none": [], - "@rules_rust//rust/platform:x86_64-unknown-uefi": [], - "//conditions:default": ["@platforms//:incompatible"], - }), - version = "1.0.15", - deps = [ - "//thirdparty/crates/paste-1.0.15:build_script_build", - ], -) - -cargo_build_script( - name = "_bs", - srcs = glob( - include = ["**/*.rs"], - allow_empty = False, - ), - compile_data = glob( - include = ["**"], - allow_empty = True, - exclude = [ - "**/* *", - "**/*.rs", - ".tmp_git_root/**/*", - "BUILD", - "BUILD.bazel", - "WORKSPACE", - "WORKSPACE.bazel", - ], - ), - crate_name = "build_script_build", - crate_root = "build.rs", - data = glob( - include = ["**"], - allow_empty = True, - exclude = [ - "**/* *", - ".tmp_git_root/**/*", - "BUILD", - "BUILD.bazel", - "WORKSPACE", - "WORKSPACE.bazel", - ], - ), - edition = "2018", - emit_warnings = False, - pkg_name = "paste", - rustc_env_files = [ - ":cargo_toml_env_vars", - ], - rustc_flags = [ - "--cap-lints=allow", - ], - tags = [ - "cargo-bazel", - "crate-name=paste", - "manual", - "noclippy", - "norustfmt", - ], - version = "1.0.15", - visibility = ["//visibility:private"], -) - -alias( - name = "build_script_build", - actual = ":_bs", - tags = ["manual"], -) diff --git a/thirdparty/crates/paste-1.0.15/Cargo.toml b/thirdparty/crates/paste-1.0.15/Cargo.toml deleted file mode 100644 index c58728715..000000000 --- a/thirdparty/crates/paste-1.0.15/Cargo.toml +++ /dev/null @@ -1,72 +0,0 @@ -# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO -# -# When uploading crates to the registry Cargo will automatically -# "normalize" Cargo.toml files for maximal compatibility -# with all versions of Cargo and also rewrite `path` dependencies -# to registry (e.g., crates.io) dependencies. -# -# If you are reading this file be aware that the original Cargo.toml -# will likely look very different (and much more reasonable). -# See Cargo.toml.orig for the original contents. - -[package] -edition = "2018" -rust-version = "1.31" -name = "paste" -version = "1.0.15" -authors = ["David Tolnay "] -build = "build.rs" -autobins = false -autoexamples = false -autotests = false -autobenches = false -description = "Macros for all your token pasting needs" -documentation = "https://docs.rs/paste" -readme = "README.md" -keywords = ["macros"] -categories = [ - "development-tools", - "no-std", - "no-std::no-alloc", -] -license = "MIT OR Apache-2.0" -repository = "https://github.com/dtolnay/paste" - -[package.metadata.docs.rs] -rustdoc-args = ["--generate-link-to-definition"] -targets = ["x86_64-unknown-linux-gnu"] - -[lib] -name = "paste" -path = "src/lib.rs" -proc-macro = true - -[[test]] -name = "test_item" -path = "tests/test_item.rs" - -[[test]] -name = "test_attr" -path = "tests/test_attr.rs" - -[[test]] -name = "compiletest" -path = "tests/compiletest.rs" - -[[test]] -name = "test_doc" -path = "tests/test_doc.rs" - -[[test]] -name = "test_expr" -path = "tests/test_expr.rs" - -[dev-dependencies.paste-test-suite] -version = "0" - -[dev-dependencies.rustversion] -version = "1.0" - -[dev-dependencies.trybuild] -version = "1.0.49" -features = ["diff"] diff --git a/thirdparty/crates/paste-1.0.15/Cargo.toml.orig b/thirdparty/crates/paste-1.0.15/Cargo.toml.orig deleted file mode 100644 index f72737589..000000000 --- a/thirdparty/crates/paste-1.0.15/Cargo.toml.orig +++ /dev/null @@ -1,24 +0,0 @@ -[package] -name = "paste" -version = "1.0.15" -authors = ["David Tolnay "] -categories = ["development-tools", "no-std", "no-std::no-alloc"] -description = "Macros for all your token pasting needs" -documentation = "https://docs.rs/paste" -edition = "2018" -keywords = ["macros"] -license = "MIT OR Apache-2.0" -repository = "https://github.com/dtolnay/paste" -rust-version = "1.31" - -[lib] -proc-macro = true - -[dev-dependencies] -paste-test-suite = { version = "0", path = "tests/macros" } -rustversion = "1.0" -trybuild = { version = "1.0.49", features = ["diff"] } - -[package.metadata.docs.rs] -targets = ["x86_64-unknown-linux-gnu"] -rustdoc-args = ["--generate-link-to-definition"] diff --git a/thirdparty/crates/paste-1.0.15/README.md b/thirdparty/crates/paste-1.0.15/README.md deleted file mode 100644 index c32d4245d..000000000 --- a/thirdparty/crates/paste-1.0.15/README.md +++ /dev/null @@ -1,157 +0,0 @@ -Macros for all your token pasting needs -======================================= - -[github](https://github.com/dtolnay/paste) -[crates.io](https://crates.io/crates/paste) -[docs.rs](https://docs.rs/paste) -[build status](https://github.com/dtolnay/paste/actions?query=branch%3Amaster) - -The nightly-only [`concat_idents!`] macro in the Rust standard library is -notoriously underpowered in that its concatenated identifiers can only refer to -existing items, they can never be used to define something new. - -[`concat_idents!`]: https://doc.rust-lang.org/std/macro.concat_idents.html - -This crate provides a flexible way to paste together identifiers in a macro, -including using pasted identifiers to define new items. - -```toml -[dependencies] -paste = "1.0" -``` - -This approach works with any Rust compiler 1.31+. - -
- -## Pasting identifiers - -Within the `paste!` macro, identifiers inside `[<`...`>]` are pasted together to -form a single identifier. - -```rust -use paste::paste; - -paste! { - // Defines a const called `QRST`. - const []: &str = "success!"; -} - -fn main() { - assert_eq!( - paste! { [].len() }, - 8, - ); -} -``` - -
- -## More elaborate example - -The next example shows a macro that generates accessor methods for some struct -fields. It demonstrates how you might find it useful to bundle a paste -invocation inside of a macro\_rules macro. - -```rust -use paste::paste; - -macro_rules! make_a_struct_and_getters { - ($name:ident { $($field:ident),* }) => { - // Define a struct. This expands to: - // - // pub struct S { - // a: String, - // b: String, - // c: String, - // } - pub struct $name { - $( - $field: String, - )* - } - - // Build an impl block with getters. This expands to: - // - // impl S { - // pub fn get_a(&self) -> &str { &self.a } - // pub fn get_b(&self) -> &str { &self.b } - // pub fn get_c(&self) -> &str { &self.c } - // } - paste! { - impl $name { - $( - pub fn [](&self) -> &str { - &self.$field - } - )* - } - } - } -} - -make_a_struct_and_getters!(S { a, b, c }); - -fn call_some_getters(s: &S) -> bool { - s.get_a() == s.get_b() && s.get_c().is_empty() -} -``` - -
- -## Case conversion - -Use `$var:lower` or `$var:upper` in the segment list to convert an interpolated -segment to lower- or uppercase as part of the paste. For example, `[]` would paste to `ld_bc_expr` if invoked with $reg=`Bc`. - -Use `$var:snake` to convert CamelCase input to snake\_case. -Use `$var:camel` to convert snake\_case to CamelCase. -These compose, so for example `$var:snake:upper` would give you SCREAMING\_CASE. - -The precise Unicode conversions are as defined by [`str::to_lowercase`] and -[`str::to_uppercase`]. - -[`str::to_lowercase`]: https://doc.rust-lang.org/std/primitive.str.html#method.to_lowercase -[`str::to_uppercase`]: https://doc.rust-lang.org/std/primitive.str.html#method.to_uppercase - -
- -## Pasting documentation strings - -Within the `paste!` macro, arguments to a #\[doc ...\] attribute are implicitly -concatenated together to form a coherent documentation string. - -```rust -use paste::paste; - -macro_rules! method_new { - ($ret:ident) => { - paste! { - #[doc = "Create a new `" $ret "` object."] - pub fn new() -> $ret { todo!() } - } - }; -} - -pub struct Paste {} - -method_new!(Paste); // expands to #[doc = "Create a new `Paste` object"] -``` - -
- -#### License - - -Licensed under either of Apache License, Version -2.0 or MIT license at your option. - - -
- - -Unless you explicitly state otherwise, any contribution intentionally submitted -for inclusion in this crate by you, as defined in the Apache-2.0 license, shall -be dual licensed as above, without any additional terms or conditions. - diff --git a/thirdparty/crates/paste-1.0.15/build.rs b/thirdparty/crates/paste-1.0.15/build.rs deleted file mode 100644 index c9e5fe1c0..000000000 --- a/thirdparty/crates/paste-1.0.15/build.rs +++ /dev/null @@ -1,38 +0,0 @@ -use std::env; -use std::process::Command; -use std::str; - -fn main() { - println!("cargo:rerun-if-changed=build.rs"); - - let version = match rustc_version() { - Some(version) => version, - None => return, - }; - - if version.minor >= 80 { - println!("cargo:rustc-check-cfg=cfg(no_literal_fromstr)"); - println!("cargo:rustc-check-cfg=cfg(feature, values(\"protocol_feature_paste\"))"); - } - - if version.minor < 54 { - // https://github.com/rust-lang/rust/pull/84717 - println!("cargo:rustc-cfg=no_literal_fromstr"); - } -} - -struct RustcVersion { - minor: u32, -} - -fn rustc_version() -> Option { - let rustc = env::var_os("RUSTC")?; - let output = Command::new(rustc).arg("--version").output().ok()?; - let version = str::from_utf8(&output.stdout).ok()?; - let mut pieces = version.split('.'); - if pieces.next() != Some("rustc 1") { - return None; - } - let minor = pieces.next()?.parse().ok()?; - Some(RustcVersion { minor }) -} diff --git a/thirdparty/crates/paste-1.0.15/src/attr.rs b/thirdparty/crates/paste-1.0.15/src/attr.rs deleted file mode 100644 index d66b843b2..000000000 --- a/thirdparty/crates/paste-1.0.15/src/attr.rs +++ /dev/null @@ -1,164 +0,0 @@ -use crate::error::Result; -use crate::segment::{self, Segment}; -use proc_macro::{Delimiter, Group, Spacing, Span, TokenStream, TokenTree}; -use std::iter; -use std::mem; -use std::str::FromStr; - -pub fn expand_attr( - attr: TokenStream, - span: Span, - contains_paste: &mut bool, -) -> Result { - let mut tokens = attr.clone().into_iter(); - let mut leading_colons = 0; // $(::)? - let mut leading_path = 0; // $($ident)::+ - - let mut token; - let group = loop { - token = tokens.next(); - match token { - // colon after `$(:)?` - Some(TokenTree::Punct(ref punct)) - if punct.as_char() == ':' && leading_colons < 2 && leading_path == 0 => - { - leading_colons += 1; - } - // ident after `$(::)? $($ident ::)*` - Some(TokenTree::Ident(_)) if leading_colons != 1 && leading_path % 3 == 0 => { - leading_path += 1; - } - // colon after `$(::)? $($ident ::)* $ident $(:)?` - Some(TokenTree::Punct(ref punct)) if punct.as_char() == ':' && leading_path % 3 > 0 => { - leading_path += 1; - } - // eq+value after `$(::)? $($ident)::+` - Some(TokenTree::Punct(ref punct)) - if punct.as_char() == '=' && leading_path % 3 == 1 => - { - let mut count = 0; - if tokens.inspect(|_| count += 1).all(|tt| is_stringlike(&tt)) && count > 1 { - *contains_paste = true; - let leading = leading_colons + leading_path; - return do_paste_name_value_attr(attr, span, leading); - } - return Ok(attr); - } - // parens after `$(::)? $($ident)::+` - Some(TokenTree::Group(ref group)) - if group.delimiter() == Delimiter::Parenthesis && leading_path % 3 == 1 => - { - break group; - } - // bail out - _ => return Ok(attr), - } - }; - - // There can't be anything else after the first group in a valid attribute. - if tokens.next().is_some() { - return Ok(attr); - } - - let mut group_contains_paste = false; - let mut expanded = TokenStream::new(); - let mut nested_attr = TokenStream::new(); - for tt in group.stream() { - match &tt { - TokenTree::Punct(punct) if punct.as_char() == ',' => { - expanded.extend(expand_attr( - nested_attr, - group.span(), - &mut group_contains_paste, - )?); - expanded.extend(iter::once(tt)); - nested_attr = TokenStream::new(); - } - _ => nested_attr.extend(iter::once(tt)), - } - } - - if !nested_attr.is_empty() { - expanded.extend(expand_attr( - nested_attr, - group.span(), - &mut group_contains_paste, - )?); - } - - if group_contains_paste { - *contains_paste = true; - let mut group = Group::new(Delimiter::Parenthesis, expanded); - group.set_span(span); - Ok(attr - .into_iter() - // Just keep the initial ident in `#[ident(...)]`. - .take(leading_colons + leading_path) - .chain(iter::once(TokenTree::Group(group))) - .collect()) - } else { - Ok(attr) - } -} - -fn do_paste_name_value_attr(attr: TokenStream, span: Span, leading: usize) -> Result { - let mut expanded = TokenStream::new(); - let mut tokens = attr.into_iter().peekable(); - expanded.extend(tokens.by_ref().take(leading + 1)); // `doc =` - - let mut segments = segment::parse(&mut tokens)?; - - for segment in &mut segments { - if let Segment::String(string) = segment { - if let Some(open_quote) = string.value.find('"') { - if open_quote == 0 { - string.value.truncate(string.value.len() - 1); - string.value.remove(0); - } else { - let begin = open_quote + 1; - let end = string.value.rfind('"').unwrap(); - let raw_string = mem::replace(&mut string.value, String::new()); - for ch in raw_string[begin..end].chars() { - string.value.extend(ch.escape_default()); - } - } - } - } - } - - let mut lit = segment::paste(&segments)?; - lit.insert(0, '"'); - lit.push('"'); - - let mut lit = TokenStream::from_str(&lit) - .unwrap() - .into_iter() - .next() - .unwrap(); - lit.set_span(span); - expanded.extend(iter::once(lit)); - Ok(expanded) -} - -fn is_stringlike(token: &TokenTree) -> bool { - match token { - TokenTree::Ident(_) => true, - TokenTree::Literal(literal) => { - let repr = literal.to_string(); - !repr.starts_with('b') && !repr.starts_with('\'') - } - TokenTree::Group(group) => { - if group.delimiter() != Delimiter::None { - return false; - } - let mut inner = group.stream().into_iter(); - match inner.next() { - Some(first) => inner.next().is_none() && is_stringlike(&first), - None => false, - } - } - TokenTree::Punct(punct) => { - punct.as_char() == '\'' || punct.as_char() == ':' && punct.spacing() == Spacing::Alone - } - } -} diff --git a/thirdparty/crates/paste-1.0.15/src/error.rs b/thirdparty/crates/paste-1.0.15/src/error.rs deleted file mode 100644 index 7c5badb25..000000000 --- a/thirdparty/crates/paste-1.0.15/src/error.rs +++ /dev/null @@ -1,47 +0,0 @@ -use proc_macro::{Delimiter, Group, Ident, Literal, Punct, Spacing, Span, TokenStream, TokenTree}; -use std::iter::FromIterator; - -pub type Result = std::result::Result; - -pub struct Error { - begin: Span, - end: Span, - msg: String, -} - -impl Error { - pub fn new(span: Span, msg: &str) -> Self { - Self::new2(span, span, msg) - } - - pub fn new2(begin: Span, end: Span, msg: &str) -> Self { - Error { - begin, - end, - msg: msg.to_owned(), - } - } - - pub fn to_compile_error(&self) -> TokenStream { - // compile_error! { $msg } - TokenStream::from_iter(vec![ - TokenTree::Ident(Ident::new("compile_error", self.begin)), - TokenTree::Punct({ - let mut punct = Punct::new('!', Spacing::Alone); - punct.set_span(self.begin); - punct - }), - TokenTree::Group({ - let mut group = Group::new(Delimiter::Brace, { - TokenStream::from_iter(vec![TokenTree::Literal({ - let mut string = Literal::string(&self.msg); - string.set_span(self.end); - string - })]) - }); - group.set_span(self.end); - group - }), - ]) - } -} diff --git a/thirdparty/crates/paste-1.0.15/src/lib.rs b/thirdparty/crates/paste-1.0.15/src/lib.rs deleted file mode 100644 index 9bb86bfe0..000000000 --- a/thirdparty/crates/paste-1.0.15/src/lib.rs +++ /dev/null @@ -1,454 +0,0 @@ -//! [![github]](https://github.com/dtolnay/paste) [![crates-io]](https://crates.io/crates/paste) [![docs-rs]](https://docs.rs/paste) -//! -//! [github]: https://img.shields.io/badge/github-8da0cb?style=for-the-badge&labelColor=555555&logo=github -//! [crates-io]: https://img.shields.io/badge/crates.io-fc8d62?style=for-the-badge&labelColor=555555&logo=rust -//! [docs-rs]: https://img.shields.io/badge/docs.rs-66c2a5?style=for-the-badge&labelColor=555555&logo=docs.rs -//! -//!
-//! -//! The nightly-only [`concat_idents!`] macro in the Rust standard library is -//! notoriously underpowered in that its concatenated identifiers can only refer to -//! existing items, they can never be used to define something new. -//! -//! [`concat_idents!`]: https://doc.rust-lang.org/std/macro.concat_idents.html -//! -//! This crate provides a flexible way to paste together identifiers in a macro, -//! including using pasted identifiers to define new items. -//! -//! This approach works with any Rust compiler 1.31+. -//! -//!
-//! -//! # Pasting identifiers -//! -//! Within the `paste!` macro, identifiers inside `[<`...`>]` are pasted -//! together to form a single identifier. -//! -//! ``` -//! use paste::paste; -//! -//! paste! { -//! // Defines a const called `QRST`. -//! const []: &str = "success!"; -//! } -//! -//! fn main() { -//! assert_eq!( -//! paste! { [].len() }, -//! 8, -//! ); -//! } -//! ``` -//! -//!

-//! -//! # More elaborate example -//! -//! The next example shows a macro that generates accessor methods for some -//! struct fields. It demonstrates how you might find it useful to bundle a -//! paste invocation inside of a macro\_rules macro. -//! -//! ``` -//! use paste::paste; -//! -//! macro_rules! make_a_struct_and_getters { -//! ($name:ident { $($field:ident),* }) => { -//! // Define a struct. This expands to: -//! // -//! // pub struct S { -//! // a: String, -//! // b: String, -//! // c: String, -//! // } -//! pub struct $name { -//! $( -//! $field: String, -//! )* -//! } -//! -//! // Build an impl block with getters. This expands to: -//! // -//! // impl S { -//! // pub fn get_a(&self) -> &str { &self.a } -//! // pub fn get_b(&self) -> &str { &self.b } -//! // pub fn get_c(&self) -> &str { &self.c } -//! // } -//! paste! { -//! impl $name { -//! $( -//! pub fn [](&self) -> &str { -//! &self.$field -//! } -//! )* -//! } -//! } -//! } -//! } -//! -//! make_a_struct_and_getters!(S { a, b, c }); -//! -//! fn call_some_getters(s: &S) -> bool { -//! s.get_a() == s.get_b() && s.get_c().is_empty() -//! } -//! # -//! # fn main() {} -//! ``` -//! -//!

-//! -//! # Case conversion -//! -//! Use `$var:lower` or `$var:upper` in the segment list to convert an -//! interpolated segment to lower- or uppercase as part of the paste. For -//! example, `[]` would paste to `ld_bc_expr` if invoked -//! with $reg=`Bc`. -//! -//! Use `$var:snake` to convert CamelCase input to snake\_case. -//! Use `$var:camel` to convert snake\_case to CamelCase. -//! These compose, so for example `$var:snake:upper` would give you SCREAMING\_CASE. -//! -//! The precise Unicode conversions are as defined by [`str::to_lowercase`] and -//! [`str::to_uppercase`]. -//! -//! [`str::to_lowercase`]: https://doc.rust-lang.org/std/primitive.str.html#method.to_lowercase -//! [`str::to_uppercase`]: https://doc.rust-lang.org/std/primitive.str.html#method.to_uppercase -//! -//!
-//! -//! # Pasting documentation strings -//! -//! Within the `paste!` macro, arguments to a #\[doc ...\] attribute are -//! implicitly concatenated together to form a coherent documentation string. -//! -//! ``` -//! use paste::paste; -//! -//! macro_rules! method_new { -//! ($ret:ident) => { -//! paste! { -//! #[doc = "Create a new `" $ret "` object."] -//! pub fn new() -> $ret { todo!() } -//! } -//! }; -//! } -//! -//! pub struct Paste {} -//! -//! method_new!(Paste); // expands to #[doc = "Create a new `Paste` object"] -//! ``` - -#![doc(html_root_url = "https://docs.rs/paste/1.0.15")] -#![allow( - clippy::derive_partial_eq_without_eq, - clippy::doc_markdown, - clippy::match_same_arms, - clippy::module_name_repetitions, - clippy::needless_doctest_main, - clippy::too_many_lines -)] - -extern crate proc_macro; - -mod attr; -mod error; -mod segment; - -use crate::attr::expand_attr; -use crate::error::{Error, Result}; -use crate::segment::Segment; -use proc_macro::{Delimiter, Group, Ident, Punct, Spacing, Span, TokenStream, TokenTree}; -use std::char; -use std::iter; -use std::panic; - -#[proc_macro] -pub fn paste(input: TokenStream) -> TokenStream { - let mut contains_paste = false; - let flatten_single_interpolation = true; - match expand( - input.clone(), - &mut contains_paste, - flatten_single_interpolation, - ) { - Ok(expanded) => { - if contains_paste { - expanded - } else { - input - } - } - Err(err) => err.to_compile_error(), - } -} - -#[doc(hidden)] -#[proc_macro] -pub fn item(input: TokenStream) -> TokenStream { - paste(input) -} - -#[doc(hidden)] -#[proc_macro] -pub fn expr(input: TokenStream) -> TokenStream { - paste(input) -} - -fn expand( - input: TokenStream, - contains_paste: &mut bool, - flatten_single_interpolation: bool, -) -> Result { - let mut expanded = TokenStream::new(); - let mut lookbehind = Lookbehind::Other; - let mut prev_none_group = None::; - let mut tokens = input.into_iter().peekable(); - loop { - let token = tokens.next(); - if let Some(group) = prev_none_group.take() { - if match (&token, tokens.peek()) { - (Some(TokenTree::Punct(fst)), Some(TokenTree::Punct(snd))) => { - fst.as_char() == ':' && snd.as_char() == ':' && fst.spacing() == Spacing::Joint - } - _ => false, - } { - expanded.extend(group.stream()); - *contains_paste = true; - } else { - expanded.extend(iter::once(TokenTree::Group(group))); - } - } - match token { - Some(TokenTree::Group(group)) => { - let delimiter = group.delimiter(); - let content = group.stream(); - let span = group.span(); - if delimiter == Delimiter::Bracket && is_paste_operation(&content) { - let segments = parse_bracket_as_segments(content, span)?; - let pasted = segment::paste(&segments)?; - let tokens = pasted_to_tokens(pasted, span)?; - expanded.extend(tokens); - *contains_paste = true; - } else if flatten_single_interpolation - && delimiter == Delimiter::None - && is_single_interpolation_group(&content) - { - expanded.extend(content); - *contains_paste = true; - } else { - let mut group_contains_paste = false; - let is_attribute = delimiter == Delimiter::Bracket - && (lookbehind == Lookbehind::Pound || lookbehind == Lookbehind::PoundBang); - let mut nested = expand( - content, - &mut group_contains_paste, - flatten_single_interpolation && !is_attribute, - )?; - if is_attribute { - nested = expand_attr(nested, span, &mut group_contains_paste)?; - } - let group = if group_contains_paste { - let mut group = Group::new(delimiter, nested); - group.set_span(span); - *contains_paste = true; - group - } else { - group.clone() - }; - if delimiter != Delimiter::None { - expanded.extend(iter::once(TokenTree::Group(group))); - } else if lookbehind == Lookbehind::DoubleColon { - expanded.extend(group.stream()); - *contains_paste = true; - } else { - prev_none_group = Some(group); - } - } - lookbehind = Lookbehind::Other; - } - Some(TokenTree::Punct(punct)) => { - lookbehind = match punct.as_char() { - ':' if lookbehind == Lookbehind::JointColon => Lookbehind::DoubleColon, - ':' if punct.spacing() == Spacing::Joint => Lookbehind::JointColon, - '#' => Lookbehind::Pound, - '!' if lookbehind == Lookbehind::Pound => Lookbehind::PoundBang, - _ => Lookbehind::Other, - }; - expanded.extend(iter::once(TokenTree::Punct(punct))); - } - Some(other) => { - lookbehind = Lookbehind::Other; - expanded.extend(iter::once(other)); - } - None => return Ok(expanded), - } - } -} - -#[derive(PartialEq)] -enum Lookbehind { - JointColon, - DoubleColon, - Pound, - PoundBang, - Other, -} - -// https://github.com/dtolnay/paste/issues/26 -fn is_single_interpolation_group(input: &TokenStream) -> bool { - #[derive(PartialEq)] - enum State { - Init, - Ident, - Literal, - Apostrophe, - Lifetime, - Colon1, - Colon2, - } - - let mut state = State::Init; - for tt in input.clone() { - state = match (state, &tt) { - (State::Init, TokenTree::Ident(_)) => State::Ident, - (State::Init, TokenTree::Literal(_)) => State::Literal, - (State::Init, TokenTree::Punct(punct)) if punct.as_char() == '\'' => State::Apostrophe, - (State::Apostrophe, TokenTree::Ident(_)) => State::Lifetime, - (State::Ident, TokenTree::Punct(punct)) - if punct.as_char() == ':' && punct.spacing() == Spacing::Joint => - { - State::Colon1 - } - (State::Colon1, TokenTree::Punct(punct)) - if punct.as_char() == ':' && punct.spacing() == Spacing::Alone => - { - State::Colon2 - } - (State::Colon2, TokenTree::Ident(_)) => State::Ident, - _ => return false, - }; - } - - state == State::Ident || state == State::Literal || state == State::Lifetime -} - -fn is_paste_operation(input: &TokenStream) -> bool { - let mut tokens = input.clone().into_iter(); - - match &tokens.next() { - Some(TokenTree::Punct(punct)) if punct.as_char() == '<' => {} - _ => return false, - } - - let mut has_token = false; - loop { - match &tokens.next() { - Some(TokenTree::Punct(punct)) if punct.as_char() == '>' => { - return has_token && tokens.next().is_none(); - } - Some(_) => has_token = true, - None => return false, - } - } -} - -fn parse_bracket_as_segments(input: TokenStream, scope: Span) -> Result> { - let mut tokens = input.into_iter().peekable(); - - match &tokens.next() { - Some(TokenTree::Punct(punct)) if punct.as_char() == '<' => {} - Some(wrong) => return Err(Error::new(wrong.span(), "expected `<`")), - None => return Err(Error::new(scope, "expected `[< ... >]`")), - } - - let mut segments = segment::parse(&mut tokens)?; - - match &tokens.next() { - Some(TokenTree::Punct(punct)) if punct.as_char() == '>' => {} - Some(wrong) => return Err(Error::new(wrong.span(), "expected `>`")), - None => return Err(Error::new(scope, "expected `[< ... >]`")), - } - - if let Some(unexpected) = tokens.next() { - return Err(Error::new( - unexpected.span(), - "unexpected input, expected `[< ... >]`", - )); - } - - for segment in &mut segments { - if let Segment::String(string) = segment { - if string.value.starts_with("'\\u{") { - let hex = &string.value[4..string.value.len() - 2]; - if let Ok(unsigned) = u32::from_str_radix(hex, 16) { - if let Some(ch) = char::from_u32(unsigned) { - string.value.clear(); - string.value.push(ch); - continue; - } - } - } - if string.value.contains(&['#', '\\', '.', '+'][..]) - || string.value.starts_with("b'") - || string.value.starts_with("b\"") - || string.value.starts_with("br\"") - { - return Err(Error::new(string.span, "unsupported literal")); - } - let mut range = 0..string.value.len(); - if string.value.starts_with("r\"") { - range.start += 2; - range.end -= 1; - } else if string.value.starts_with(&['"', '\''][..]) { - range.start += 1; - range.end -= 1; - } - string.value = string.value[range].replace('-', "_"); - } - } - - Ok(segments) -} - -fn pasted_to_tokens(mut pasted: String, span: Span) -> Result { - let mut tokens = TokenStream::new(); - - #[cfg(not(no_literal_fromstr))] - { - use proc_macro::{LexError, Literal}; - use std::str::FromStr; - - if pasted.starts_with(|ch: char| ch.is_ascii_digit()) { - let literal = match panic::catch_unwind(|| Literal::from_str(&pasted)) { - Ok(Ok(literal)) => TokenTree::Literal(literal), - Ok(Err(LexError { .. })) | Err(_) => { - return Err(Error::new( - span, - &format!("`{:?}` is not a valid literal", pasted), - )); - } - }; - tokens.extend(iter::once(literal)); - return Ok(tokens); - } - } - - if pasted.starts_with('\'') { - let mut apostrophe = TokenTree::Punct(Punct::new('\'', Spacing::Joint)); - apostrophe.set_span(span); - tokens.extend(iter::once(apostrophe)); - pasted.remove(0); - } - - let ident = match panic::catch_unwind(|| Ident::new(&pasted, span)) { - Ok(ident) => TokenTree::Ident(ident), - Err(_) => { - return Err(Error::new( - span, - &format!("`{:?}` is not a valid identifier", pasted), - )); - } - }; - - tokens.extend(iter::once(ident)); - Ok(tokens) -} diff --git a/thirdparty/crates/paste-1.0.15/src/segment.rs b/thirdparty/crates/paste-1.0.15/src/segment.rs deleted file mode 100644 index 592a04702..000000000 --- a/thirdparty/crates/paste-1.0.15/src/segment.rs +++ /dev/null @@ -1,233 +0,0 @@ -use crate::error::{Error, Result}; -use proc_macro::{token_stream, Delimiter, Ident, Span, TokenTree}; -use std::iter::Peekable; - -pub(crate) enum Segment { - String(LitStr), - Apostrophe(Span), - Env(LitStr), - Modifier(Colon, Ident), -} - -pub(crate) struct LitStr { - pub value: String, - pub span: Span, -} - -pub(crate) struct Colon { - pub span: Span, -} - -pub(crate) fn parse(tokens: &mut Peekable) -> Result> { - let mut segments = Vec::new(); - while match tokens.peek() { - None => false, - Some(TokenTree::Punct(punct)) => punct.as_char() != '>', - Some(_) => true, - } { - match tokens.next().unwrap() { - TokenTree::Ident(ident) => { - let mut fragment = ident.to_string(); - if fragment.starts_with("r#") { - fragment = fragment.split_off(2); - } - if fragment == "env" - && match tokens.peek() { - Some(TokenTree::Punct(punct)) => punct.as_char() == '!', - _ => false, - } - { - let bang = tokens.next().unwrap(); // `!` - let expect_group = tokens.next(); - let parenthesized = match &expect_group { - Some(TokenTree::Group(group)) - if group.delimiter() == Delimiter::Parenthesis => - { - group - } - Some(wrong) => return Err(Error::new(wrong.span(), "expected `(`")), - None => { - return Err(Error::new2( - ident.span(), - bang.span(), - "expected `(` after `env!`", - )); - } - }; - let mut inner = parenthesized.stream().into_iter(); - let lit = match inner.next() { - Some(TokenTree::Literal(lit)) => lit, - Some(wrong) => { - return Err(Error::new(wrong.span(), "expected string literal")) - } - None => { - return Err(Error::new2( - ident.span(), - parenthesized.span(), - "expected string literal as argument to env! macro", - )) - } - }; - let lit_string = lit.to_string(); - if lit_string.starts_with('"') - && lit_string.ends_with('"') - && lit_string.len() >= 2 - { - // TODO: maybe handle escape sequences in the string if - // someone has a use case. - segments.push(Segment::Env(LitStr { - value: lit_string[1..lit_string.len() - 1].to_owned(), - span: lit.span(), - })); - } else { - return Err(Error::new(lit.span(), "expected string literal")); - } - if let Some(unexpected) = inner.next() { - return Err(Error::new( - unexpected.span(), - "unexpected token in env! macro", - )); - } - } else { - segments.push(Segment::String(LitStr { - value: fragment, - span: ident.span(), - })); - } - } - TokenTree::Literal(lit) => { - segments.push(Segment::String(LitStr { - value: lit.to_string(), - span: lit.span(), - })); - } - TokenTree::Punct(punct) => match punct.as_char() { - '_' => segments.push(Segment::String(LitStr { - value: "_".to_owned(), - span: punct.span(), - })), - '\'' => segments.push(Segment::Apostrophe(punct.span())), - ':' => { - let colon_span = punct.span(); - let colon = Colon { span: colon_span }; - let ident = match tokens.next() { - Some(TokenTree::Ident(ident)) => ident, - wrong => { - let span = wrong.as_ref().map_or(colon_span, TokenTree::span); - return Err(Error::new(span, "expected identifier after `:`")); - } - }; - segments.push(Segment::Modifier(colon, ident)); - } - _ => return Err(Error::new(punct.span(), "unexpected punct")), - }, - TokenTree::Group(group) => { - if group.delimiter() == Delimiter::None { - let mut inner = group.stream().into_iter().peekable(); - let nested = parse(&mut inner)?; - if let Some(unexpected) = inner.next() { - return Err(Error::new(unexpected.span(), "unexpected token")); - } - segments.extend(nested); - } else { - return Err(Error::new(group.span(), "unexpected token")); - } - } - } - } - Ok(segments) -} - -pub(crate) fn paste(segments: &[Segment]) -> Result { - let mut evaluated = Vec::new(); - let mut is_lifetime = false; - - for segment in segments { - match segment { - Segment::String(segment) => { - evaluated.push(segment.value.clone()); - } - Segment::Apostrophe(span) => { - if is_lifetime { - return Err(Error::new(*span, "unexpected lifetime")); - } - is_lifetime = true; - } - Segment::Env(var) => { - let resolved = match std::env::var(&var.value) { - Ok(resolved) => resolved, - Err(_) => { - return Err(Error::new( - var.span, - &format!("no such env var: {:?}", var.value), - )); - } - }; - let resolved = resolved.replace('-', "_"); - evaluated.push(resolved); - } - Segment::Modifier(colon, ident) => { - let last = match evaluated.pop() { - Some(last) => last, - None => { - return Err(Error::new2(colon.span, ident.span(), "unexpected modifier")) - } - }; - match ident.to_string().as_str() { - "lower" => { - evaluated.push(last.to_lowercase()); - } - "upper" => { - evaluated.push(last.to_uppercase()); - } - "snake" => { - let mut acc = String::new(); - let mut prev = '_'; - for ch in last.chars() { - if ch.is_uppercase() && prev != '_' { - acc.push('_'); - } - acc.push(ch); - prev = ch; - } - evaluated.push(acc.to_lowercase()); - } - "camel" => { - let mut acc = String::new(); - let mut prev = '_'; - for ch in last.chars() { - if ch != '_' { - if prev == '_' { - for chu in ch.to_uppercase() { - acc.push(chu); - } - } else if prev.is_uppercase() { - for chl in ch.to_lowercase() { - acc.push(chl); - } - } else { - acc.push(ch); - } - } - prev = ch; - } - evaluated.push(acc); - } - _ => { - return Err(Error::new2( - colon.span, - ident.span(), - "unsupported modifier", - )); - } - } - } - } - } - - let mut pasted = evaluated.into_iter().collect::(); - if is_lifetime { - pasted.insert(0, '\''); - } - Ok(pasted) -} diff --git a/thirdparty/crates/paste-1.0.15/tests/compiletest.rs b/thirdparty/crates/paste-1.0.15/tests/compiletest.rs deleted file mode 100644 index 7974a6249..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/compiletest.rs +++ /dev/null @@ -1,7 +0,0 @@ -#[rustversion::attr(not(nightly), ignore)] -#[cfg_attr(miri, ignore)] -#[test] -fn ui() { - let t = trybuild::TestCases::new(); - t.compile_fail("tests/ui/*.rs"); -} diff --git a/thirdparty/crates/paste-1.0.15/tests/test_attr.rs b/thirdparty/crates/paste-1.0.15/tests/test_attr.rs deleted file mode 100644 index 6c4980865..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/test_attr.rs +++ /dev/null @@ -1,62 +0,0 @@ -#![allow(clippy::let_underscore_untyped)] - -use paste::paste; -use paste_test_suite::paste_test; - -#[test] -fn test_attr() { - paste! { - #[paste_test(k = "val" "ue")] - struct A; - - #[paste_test_suite::paste_test(k = "val" "ue")] - struct B; - - #[::paste_test_suite::paste_test(k = "val" "ue")] - struct C; - - #[paste_test(k = "va" [] e)] - struct D; - } - - let _ = A; - let _ = B; - let _ = C; - let _ = D; -} - -#[test] -fn test_paste_cfg() { - macro_rules! m { - ($ret:ident, $width:expr) => { - paste! { - #[cfg(any(feature = "protocol_feature_" $ret:snake, target_pointer_width = "" $width))] - fn new() -> $ret { todo!() } - } - }; - } - - struct Paste; - - #[cfg(target_pointer_width = "64")] - m!(Paste, 64); - #[cfg(target_pointer_width = "32")] - m!(Paste, 32); - - let _ = new; -} - -#[test] -fn test_path_in_attr() { - macro_rules! m { - (#[x = $x:ty]) => { - stringify!($x) - }; - } - - let ty = paste! { - m!(#[x = foo::Bar]) - }; - - assert_eq!("foo::Bar", ty); -} diff --git a/thirdparty/crates/paste-1.0.15/tests/test_doc.rs b/thirdparty/crates/paste-1.0.15/tests/test_doc.rs deleted file mode 100644 index 3dd66aabd..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/test_doc.rs +++ /dev/null @@ -1,79 +0,0 @@ -#![allow(clippy::let_underscore_untyped)] - -use paste::paste; - -#[test] -fn test_paste_doc() { - macro_rules! m { - ($ret:ident) => { - paste! { - #[doc = "Create a new [`" $ret "`] object."] - fn new() -> $ret { todo!() } - } - }; - } - - struct Paste; - m!(Paste); - - let _ = new; -} - -macro_rules! get_doc { - (#[doc = $literal:tt]) => { - $literal - }; -} - -#[test] -fn test_escaping() { - let doc = paste! { - get_doc!(#[doc = "s\"" r#"r#""#]) - }; - - let expected = "s\"r#\""; - assert_eq!(doc, expected); -} - -#[test] -fn test_literals() { - let doc = paste! { - get_doc!(#[doc = "int=" 0x1 " bool=" true " float=" 0.01]) - }; - - let expected = "int=0x1 bool=true float=0.01"; - assert_eq!(doc, expected); -} - -#[test] -fn test_case() { - let doc = paste! { - get_doc!(#[doc = "HTTP " get:upper "!"]) - }; - - let expected = "HTTP GET!"; - assert_eq!(doc, expected); -} - -// https://github.com/dtolnay/paste/issues/63 -#[test] -fn test_stringify() { - macro_rules! create { - ($doc:expr) => { - paste! { - #[doc = $doc] - pub struct Struct; - } - }; - } - - macro_rules! forward { - ($name:ident) => { - create!(stringify!($name)); - }; - } - - forward!(documentation); - - let _ = Struct; -} diff --git a/thirdparty/crates/paste-1.0.15/tests/test_expr.rs b/thirdparty/crates/paste-1.0.15/tests/test_expr.rs deleted file mode 100644 index a8e6bd860..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/test_expr.rs +++ /dev/null @@ -1,285 +0,0 @@ -#![allow(clippy::let_underscore_untyped)] - -use paste::paste; - -#[test] -fn test_shared_hygiene() { - paste! { - let [] = 1; - assert_eq!([], 1); - } -} - -#[test] -fn test_repeat() { - const ROCKET_A: &str = "/a"; - const ROCKET_B: &str = "/b"; - - macro_rules! routes { - ($($route:ident),*) => {{ - paste! { - vec![$( [] ),*] - } - }} - } - - let routes = routes!(A, B); - assert_eq!(routes, vec!["/a", "/b"]); -} - -#[test] -fn test_literal_to_identifier() { - const CONST0: &str = "const0"; - - let pasted = paste!([]); - assert_eq!(pasted, CONST0); - - let pasted = paste!([]); - assert_eq!(pasted, CONST0); - - let pasted = paste!([]); - assert_eq!(pasted, CONST0); - - let pasted = paste!([]); - assert_eq!(pasted, CONST0); - - let pasted = paste!([]); - assert_eq!(pasted, CONST0); -} - -#[test] -fn test_literal_suffix() { - macro_rules! literal { - ($bit:tt) => { - paste!([<1_u $bit>]) - }; - } - - assert_eq!(literal!(32), 1); -} - -#[test] -fn test_underscore() { - paste! { - const A_B: usize = 0; - assert_eq!([], 0); - } -} - -#[test] -fn test_lifetime() { - paste! { - #[allow(dead_code)] - struct S<[<'d e>]> { - q: &[<'d e>] str, - } - } -} - -#[test] -fn test_keyword() { - paste! { - struct []; - - let _ = Fmove; - } -} - -#[test] -fn test_literal_str() { - paste! { - #[allow(non_camel_case_types)] - struct []; - - let _ = FooBar_Baz; - } -} - -#[test] -fn test_env_literal() { - paste! { - struct []; - - let _ = Libenvbar; - } -} - -#[test] -fn test_env_present() { - paste! { - struct []; - - let _ = Libpaste; - } -} - -#[test] -fn test_raw_identifier() { - paste! { - struct []; - - let _ = Fmove; - } -} - -#[test] -fn test_false_start() { - trait Trait { - fn f() -> usize; - } - - struct S; - - impl Trait for S { - fn f() -> usize { - 0 - } - } - - paste! { - let x = [::f()]; - assert_eq!(x[0], 0); - } -} - -#[test] -fn test_local_variable() { - let yy = 0; - - paste! { - assert_eq!([], 0); - } -} - -#[test] -fn test_empty() { - paste! { - assert_eq!(stringify!([]), "yy"); - assert_eq!(stringify!([<>]).replace(' ', ""), "[<>]"); - } -} - -#[test] -fn test_env_to_lower() { - paste! { - struct []; - - let _ = Libpaste; - } -} - -#[test] -fn test_env_to_upper() { - paste! { - const []: &str = "libpaste"; - - let _ = LIBPASTE; - } -} - -#[test] -fn test_env_to_snake() { - paste! { - const []: &str = "libpaste"; - - let _ = LIBPASTE; - } -} - -#[test] -fn test_env_to_camel() { - paste! { - #[allow(non_upper_case_globals)] - const []: &str = "libpaste"; - - let _ = LIBPaste; - } -} - -mod test_x86_feature_literal { - // work around https://github.com/rust-lang/rust/issues/72726 - - #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] - macro_rules! my_is_x86_feature_detected { - ($feat:literal) => { - use paste::paste; - - paste! { - #[test] - fn test() { - let _ = is_x86_feature_detected!($feat); - } - } - }; - } - - #[cfg(not(any(target_arch = "x86", target_arch = "x86_64")))] - macro_rules! my_is_x86_feature_detected { - ($feat:literal) => { - #[ignore] - #[test] - fn test() {} - }; - } - - my_is_x86_feature_detected!("mmx"); -} - -#[rustversion::since(1.46)] -mod test_local_setter { - // https://github.com/dtolnay/paste/issues/7 - - use paste::paste; - - #[derive(Default)] - struct Test { - val: i32, - } - - impl Test { - fn set_val(&mut self, arg: i32) { - self.val = arg; - } - } - - macro_rules! setter { - ($obj:expr, $field:ident, $value:expr) => { - paste! { $obj.[]($value); } - }; - - ($field:ident, $value:expr) => {{ - let mut new = Test::default(); - setter!(new, val, $value); - new - }}; - } - - #[test] - fn test_local_setter() { - let a = setter!(val, 42); - assert_eq!(a.val, 42); - } -} - -// https://github.com/dtolnay/paste/issues/85 -#[test] -fn test_top_level_none_delimiter() { - macro_rules! clone { - ($val:expr) => { - paste! { - $val.clone() - } - }; - } - - #[derive(Clone)] - struct A; - - impl A { - fn consume_self(self) { - let _ = self; - } - } - - clone!(&A).consume_self(); -} diff --git a/thirdparty/crates/paste-1.0.15/tests/test_item.rs b/thirdparty/crates/paste-1.0.15/tests/test_item.rs deleted file mode 100644 index 4f26c9cfe..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/test_item.rs +++ /dev/null @@ -1,271 +0,0 @@ -#![allow(clippy::let_underscore_untyped)] - -mod test_basic { - use paste::paste; - - struct Struct; - - paste! { - impl Struct { - fn []() {} - } - } - - #[test] - fn test() { - Struct::abc(); - } -} - -mod test_in_impl { - use paste::paste; - - struct Struct; - - impl Struct { - paste! { - fn []() {} - } - } - - #[test] - fn test() { - Struct::abc(); - } -} - -mod test_none_delimited_single_ident { - use paste::paste; - - macro_rules! m { - ($id:ident) => { - paste! { - fn f() -> &'static str { - stringify!($id) - } - } - }; - } - - m!(i32x4); - - #[test] - fn test() { - assert_eq!(f(), "i32x4"); - } -} - -mod test_none_delimited_single_lifetime { - use paste::paste; - - macro_rules! m { - ($life:lifetime) => { - paste! { - pub struct S<$life>(#[allow(dead_code)] pub &$life ()); - impl<$life> S<$life> { - fn f() {} - } - } - }; - } - - m!('a); - - #[test] - fn test() { - S::f(); - } -} - -mod test_to_lower { - use paste::paste; - - macro_rules! m { - ($id:ident) => { - paste! { - fn [](_arg: u8) -> &'static str { - stringify!([<$id:lower>]) - } - } - }; - } - - m!(Test); - - #[test] - fn test_to_lower() { - assert_eq!(my_test_here(0), "test"); - } -} - -mod test_to_upper { - use paste::paste; - - macro_rules! m { - ($id:ident) => { - paste! { - const []: &str = stringify!([<$id:upper>]); - } - }; - } - - m!(Test); - - #[test] - fn test_to_upper() { - assert_eq!(MY_TEST_HERE, "TEST"); - } -} - -mod test_to_snake { - use paste::paste; - - macro_rules! m { - ($id:ident) => { - paste! { - const DEFAULT_SNAKE: &str = stringify!([<$id:snake>]); - const LOWER_SNAKE: &str = stringify!([<$id:snake:lower>]); - const UPPER_SNAKE: &str = stringify!([<$id:snake:upper>]); - } - }; - } - - m!(ThisIsButATest); - - #[test] - fn test_to_snake() { - assert_eq!(DEFAULT_SNAKE, "this_is_but_a_test"); - assert_eq!(LOWER_SNAKE, "this_is_but_a_test"); - assert_eq!(UPPER_SNAKE, "THIS_IS_BUT_A_TEST"); - } -} - -mod test_to_camel { - use paste::paste; - - macro_rules! m { - ($id:ident) => { - paste! { - const DEFAULT_CAMEL: &str = stringify!([<$id:camel>]); - const LOWER_CAMEL: &str = stringify!([<$id:camel:lower>]); - const UPPER_CAMEL: &str = stringify!([<$id:camel:upper>]); - } - }; - } - - m!(this_is_but_a_test); - - #[test] - fn test_to_camel() { - assert_eq!(DEFAULT_CAMEL, "ThisIsButATest"); - assert_eq!(LOWER_CAMEL, "thisisbutatest"); - assert_eq!(UPPER_CAMEL, "THISISBUTATEST"); - } -} - -mod test_doc_expr { - // https://github.com/dtolnay/paste/issues/29 - - use paste::paste; - - macro_rules! doc_expr { - ($doc:expr) => { - paste! { - #[doc = $doc] - pub struct S; - } - }; - } - - doc_expr!(stringify!(...)); - - #[test] - fn test_doc_expr() { - let _: S; - } -} - -mod test_type_in_path { - // https://github.com/dtolnay/paste/issues/31 - - use paste::paste; - - mod keys { - #[derive(Default)] - pub struct Mib(std::marker::PhantomData); - } - - macro_rules! types { - ($mib:ty) => { - paste! { - #[derive(Default)] - pub struct S(pub keys::$mib); - } - }; - } - - macro_rules! write { - ($fn:ident, $field:ty) => { - paste! { - pub fn $fn() -> $field { - $field::default() - } - } - }; - } - - types! {Mib<[usize; 2]>} - write! {get_a, keys::Mib} - write! {get_b, usize} - - #[test] - fn test_type_in_path() { - let _: S; - let _ = get_a; - let _ = get_b; - } -} - -mod test_type_in_fn_arg { - // https://github.com/dtolnay/paste/issues/38 - - use paste::paste; - - fn _jit_address(_node: ()) {} - - macro_rules! jit_reexport { - ($fn:ident, $arg:ident : $typ:ty) => { - paste! { - pub fn $fn($arg: $typ) { - [<_jit_ $fn>]($arg); - } - } - }; - } - - jit_reexport!(address, node: ()); - - #[test] - fn test_type_in_fn_arg() { - let _ = address; - } -} - -mod test_pat_in_expr_position { - // https://github.com/xiph/rav1e/pull/2324/files - - use paste::paste; - - macro_rules! rav1e_bad { - ($e:pat) => { - paste! { - #[test] - fn test() { - let _ = $e; - } - } - }; - } - - rav1e_bad!(std::fmt::Error); -} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/case-warning.rs b/thirdparty/crates/paste-1.0.15/tests/ui/case-warning.rs deleted file mode 100644 index fdea4d619..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/case-warning.rs +++ /dev/null @@ -1,15 +0,0 @@ -#![deny(warnings)] - -use paste::paste; - -macro_rules! m { - ($i:ident) => { - paste! { - pub fn []() {} - } - }; -} - -m!(Bar); - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/case-warning.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/case-warning.stderr deleted file mode 100644 index 83099129d..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/case-warning.stderr +++ /dev/null @@ -1,16 +0,0 @@ -error: function `fooBar` should have a snake case name - --> tests/ui/case-warning.rs:8:20 - | -8 | pub fn []() {} - | ^^^^^^^^^^ help: convert the identifier to snake case: `foo_bar` -... -13 | m!(Bar); - | ------- in this macro invocation - | -note: the lint level is defined here - --> tests/ui/case-warning.rs:1:9 - | -1 | #![deny(warnings)] - | ^^^^^^^^ - = note: `#[deny(non_snake_case)]` implied by `#[deny(warnings)]` - = note: this error originates in the macro `m` (in Nightly builds, run with -Z macro-backtrace for more info) diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/env-empty.rs b/thirdparty/crates/paste-1.0.15/tests/ui/env-empty.rs deleted file mode 100644 index 1e9f2d0a2..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/env-empty.rs +++ /dev/null @@ -1,7 +0,0 @@ -use paste::paste; - -paste! { - fn []() {} -} - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/env-empty.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/env-empty.stderr deleted file mode 100644 index a1ef2e2f5..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/env-empty.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: expected string literal as argument to env! macro - --> tests/ui/env-empty.rs:4:10 - | -4 | fn []() {} - | ^^^^^^ diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/env-non-string.rs b/thirdparty/crates/paste-1.0.15/tests/ui/env-non-string.rs deleted file mode 100644 index 55255ef90..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/env-non-string.rs +++ /dev/null @@ -1,7 +0,0 @@ -use paste::paste; - -paste! { - fn []() {} -} - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/env-non-string.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/env-non-string.stderr deleted file mode 100644 index 05b8deba8..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/env-non-string.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: expected string literal - --> tests/ui/env-non-string.rs:4:15 - | -4 | fn []() {} - | ^^^^ diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/env-suffix.rs b/thirdparty/crates/paste-1.0.15/tests/ui/env-suffix.rs deleted file mode 100644 index b5c60af45..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/env-suffix.rs +++ /dev/null @@ -1,7 +0,0 @@ -use paste::paste; - -paste! { - fn []() {} -} - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/env-suffix.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/env-suffix.stderr deleted file mode 100644 index d723cbc7e..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/env-suffix.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: expected string literal - --> tests/ui/env-suffix.rs:4:15 - | -4 | fn []() {} - | ^^^^^^^^^^^ diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/env-unexpected.rs b/thirdparty/crates/paste-1.0.15/tests/ui/env-unexpected.rs deleted file mode 100644 index 39cb770d9..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/env-unexpected.rs +++ /dev/null @@ -1,7 +0,0 @@ -use paste::paste; - -paste! { - fn []() {} -} - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/env-unexpected.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/env-unexpected.stderr deleted file mode 100644 index 25387b114..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/env-unexpected.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: unexpected token in env! macro - --> tests/ui/env-unexpected.rs:4:21 - | -4 | fn []() {} - | ^^^^^ diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/invalid-ident.rs b/thirdparty/crates/paste-1.0.15/tests/ui/invalid-ident.rs deleted file mode 100644 index 6a8cf3c44..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/invalid-ident.rs +++ /dev/null @@ -1,15 +0,0 @@ -use paste::paste; - -paste! { - fn [<0 f>]() {} -} - -paste! { - fn []() {} -} - -paste! { - fn []() {} -} - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/invalid-ident.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/invalid-ident.stderr deleted file mode 100644 index ca1585e8c..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/invalid-ident.stderr +++ /dev/null @@ -1,26 +0,0 @@ -error: expected identifier, found `0f` - --> tests/ui/invalid-ident.rs:3:1 - | -3 | / paste! { -4 | | fn [<0 f>]() {} -5 | | } - | |_^ expected identifier - | -help: identifiers cannot start with a number - --> tests/ui/invalid-ident.rs:3:1 - | -3 | paste! { - | ^ - = note: this error originates in the macro `paste` (in Nightly builds, run with -Z macro-backtrace for more info) - -error: `"f\""` is not a valid identifier - --> tests/ui/invalid-ident.rs:8:8 - | -8 | fn []() {} - | ^^^^^^^^^ - -error: `"f'"` is not a valid identifier - --> tests/ui/invalid-ident.rs:12:8 - | -12 | fn []() {} - | ^^^^^^^^^ diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/missing-paren-on-env.rs b/thirdparty/crates/paste-1.0.15/tests/ui/missing-paren-on-env.rs deleted file mode 100644 index 44fefbd3e..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/missing-paren-on-env.rs +++ /dev/null @@ -1,7 +0,0 @@ -use paste::paste; - -paste! { - fn []() {} -} - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/missing-paren-on-env.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/missing-paren-on-env.stderr deleted file mode 100644 index 7b4bc4604..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/missing-paren-on-env.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: expected `(` - --> tests/ui/missing-paren-on-env.rs:4:15 - | -4 | fn []() {} - | ^^^ diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/no-env-var.rs b/thirdparty/crates/paste-1.0.15/tests/ui/no-env-var.rs deleted file mode 100644 index c6d8c3d59..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/no-env-var.rs +++ /dev/null @@ -1,7 +0,0 @@ -use paste::paste; - -paste! { - fn []() {} -} - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/no-env-var.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/no-env-var.stderr deleted file mode 100644 index 60de9ede2..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/no-env-var.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: no such env var: "PASTE_UNKNOWN" - --> tests/ui/no-env-var.rs:4:17 - | -4 | fn []() {} - | ^^^^^^^^^^^^^^^ diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/no-ident-after-colon.rs b/thirdparty/crates/paste-1.0.15/tests/ui/no-ident-after-colon.rs deleted file mode 100644 index 50b3b0dd0..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/no-ident-after-colon.rs +++ /dev/null @@ -1,7 +0,0 @@ -use paste::paste; - -paste! { - fn []() {} -} - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/no-ident-after-colon.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/no-ident-after-colon.stderr deleted file mode 100644 index 9db91eb51..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/no-ident-after-colon.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: expected identifier after `:` - --> tests/ui/no-ident-after-colon.rs:4:15 - | -4 | fn []() {} - | ^ diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-group.rs b/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-group.rs deleted file mode 100644 index 63ee5161c..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-group.rs +++ /dev/null @@ -1,7 +0,0 @@ -use paste::paste; - -paste! { - fn []() {} -} - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-group.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-group.stderr deleted file mode 100644 index f66f5c15e..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-group.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: unexpected token - --> tests/ui/unexpected-group.rs:4:12 - | -4 | fn []() {} - | ^^ diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-modifier.rs b/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-modifier.rs deleted file mode 100644 index 99fe68f1f..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-modifier.rs +++ /dev/null @@ -1,7 +0,0 @@ -use paste::paste; - -paste! { - fn [<:lower x>]() {} -} - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-modifier.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-modifier.stderr deleted file mode 100644 index 1eaba3147..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-modifier.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: unexpected modifier - --> tests/ui/unexpected-modifier.rs:4:10 - | -4 | fn [<:lower x>]() {} - | ^^^^^^ diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-punct.rs b/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-punct.rs deleted file mode 100644 index d0edb9243..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-punct.rs +++ /dev/null @@ -1,7 +0,0 @@ -use paste::paste; - -paste! { - fn []() {} -} - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-punct.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-punct.stderr deleted file mode 100644 index 1a74a61d7..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/unexpected-punct.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: unexpected punct - --> tests/ui/unexpected-punct.rs:4:12 - | -4 | fn []() {} - | ^ diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/unsupported-literal.rs b/thirdparty/crates/paste-1.0.15/tests/ui/unsupported-literal.rs deleted file mode 100644 index 7a9c490d8..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/unsupported-literal.rs +++ /dev/null @@ -1,21 +0,0 @@ -use paste::paste; - -paste! { - fn []() {} -} - -paste! { - // `xyz` is not correct. `xbyz` is certainly not correct. Maybe `x121z` - // would be justifiable but for now don't accept this. - fn []() {} -} - -paste! { - fn []() {} -} - -paste! { - fn []() {} -} - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/unsupported-literal.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/unsupported-literal.stderr deleted file mode 100644 index a802b4580..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/unsupported-literal.stderr +++ /dev/null @@ -1,23 +0,0 @@ -error: unsupported literal - --> tests/ui/unsupported-literal.rs:4:12 - | -4 | fn []() {} - | ^^^^^^ - -error: unsupported literal - --> tests/ui/unsupported-literal.rs:10:12 - | -10 | fn []() {} - | ^^^^ - -error: unsupported literal - --> tests/ui/unsupported-literal.rs:14:12 - | -14 | fn []() {} - | ^^^^ - -error: unsupported literal - --> tests/ui/unsupported-literal.rs:18:12 - | -18 | fn []() {} - | ^^^^^ diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/unsupported-modifier.rs b/thirdparty/crates/paste-1.0.15/tests/ui/unsupported-modifier.rs deleted file mode 100644 index a65b36ae8..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/unsupported-modifier.rs +++ /dev/null @@ -1,7 +0,0 @@ -use paste::paste; - -paste! { - fn []() {} -} - -fn main() {} diff --git a/thirdparty/crates/paste-1.0.15/tests/ui/unsupported-modifier.stderr b/thirdparty/crates/paste-1.0.15/tests/ui/unsupported-modifier.stderr deleted file mode 100644 index 3c7043541..000000000 --- a/thirdparty/crates/paste-1.0.15/tests/ui/unsupported-modifier.stderr +++ /dev/null @@ -1,5 +0,0 @@ -error: unsupported modifier - --> tests/ui/unsupported-modifier.rs:4:11 - | -4 | fn []() {} - | ^^^^^^^ diff --git a/thirdparty/crates/rustix-1.1.4/BUILD.bazel b/thirdparty/crates/rustix-1.1.4/BUILD.bazel index 50a471285..4e83098c0 100644 --- a/thirdparty/crates/rustix-1.1.4/BUILD.bazel +++ b/thirdparty/crates/rustix-1.1.4/BUILD.bazel @@ -261,23 +261,23 @@ rust_library( ] + select({ "@rules_rust//rust/platform:aarch64-apple-darwin": [ "//thirdparty/crates/errno-0.3.14:errno", # aarch64-apple-darwin, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # aarch64-apple-darwin, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # aarch64-apple-darwin, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:aarch64-apple-ios": [ "//thirdparty/crates/errno-0.3.14:errno", # aarch64-apple-ios, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # aarch64-apple-ios, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # aarch64-apple-ios, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:aarch64-apple-ios-macabi": [ "//thirdparty/crates/errno-0.3.14:errno", # aarch64-apple-ios-macabi, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # aarch64-apple-ios-macabi, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # aarch64-apple-ios-macabi, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ "//thirdparty/crates/errno-0.3.14:errno", # aarch64-apple-ios-sim, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # aarch64-apple-ios-sim, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # aarch64-apple-ios-sim, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:aarch64-linux-android": [ "//thirdparty/crates/errno-0.3.14:errno", # aarch64-linux-android, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # aarch64-linux-android, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # aarch64-linux-android, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(any(target_os = "linux", target_os = "android"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:aarch64-pc-windows-msvc": [ @@ -286,7 +286,7 @@ rust_library( ], "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [ "//thirdparty/crates/errno-0.3.14:errno", # aarch64-unknown-fuchsia, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # aarch64-unknown-fuchsia, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # aarch64-unknown-fuchsia, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64")))) @@ -296,15 +296,15 @@ rust_library( ], "@rules_rust//rust/platform:aarch64-unknown-none": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [ "//thirdparty/crates/errno-0.3.14:errno", # aarch64-unknown-nto-qnx710, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # aarch64-unknown-nto-qnx710, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # aarch64-unknown-nto-qnx710, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:aarch64-unknown-uefi": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64")))) @@ -314,7 +314,7 @@ rust_library( ], "@rules_rust//rust/platform:armv7-linux-androideabi": [ "//thirdparty/crates/errno-0.3.14:errno", # armv7-linux-androideabi, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # armv7-linux-androideabi, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # armv7-linux-androideabi, cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(any(target_os = "linux", target_os = "android"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ @@ -322,11 +322,11 @@ rust_library( ], "@rules_rust//rust/platform:i686-apple-darwin": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), i686-apple-darwin - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), i686-apple-darwin + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), i686-apple-darwin ], "@rules_rust//rust/platform:i686-linux-android": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), i686-linux-android - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), i686-linux-android + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), i686-linux-android "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(any(target_os = "linux", target_os = "android"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:i686-pc-windows-msvc": [ @@ -335,118 +335,118 @@ rust_library( ], "@rules_rust//rust/platform:i686-unknown-freebsd": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), i686-unknown-freebsd - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), i686-unknown-freebsd + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), i686-unknown-freebsd ], "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64")))) ], "@rules_rust//rust/platform:loongarch64-unknown-linux-gnu": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), loongarch64-unknown-linux-gnu - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), loongarch64-unknown-linux-gnu + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), loongarch64-unknown-linux-gnu "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(any(target_os = "linux", target_os = "android"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:mips-unknown-linux-gnu": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), mips-unknown-linux-gnu - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), mips-unknown-linux-gnu + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), mips-unknown-linux-gnu "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(any(target_os = "linux", target_os = "android"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), powerpc-unknown-linux-gnu - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), powerpc-unknown-linux-gnu + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), powerpc-unknown-linux-gnu "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(any(target_os = "linux", target_os = "android"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:riscv32imac-unknown-none-elf": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:riscv32imc-unknown-none-elf": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [ "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64")))) ], "@rules_rust//rust/platform:riscv64gc-unknown-none-elf": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), s390x-unknown-linux-gnu - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), s390x-unknown-linux-gnu + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), s390x-unknown-linux-gnu "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(any(target_os = "linux", target_os = "android"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:sparc64-unknown-linux-gnu": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), sparc64-unknown-linux-gnu - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), sparc64-unknown-linux-gnu + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), sparc64-unknown-linux-gnu "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(any(target_os = "linux", target_os = "android"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:sparc64-unknown-netbsd": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), sparc64-unknown-netbsd - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), sparc64-unknown-netbsd + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), sparc64-unknown-netbsd ], "@rules_rust//rust/platform:sparc64-unknown-openbsd": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), sparc64-unknown-openbsd - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), sparc64-unknown-openbsd + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), sparc64-unknown-openbsd ], "@rules_rust//rust/platform:thumbv6m-none-eabi": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:thumbv7em-none-eabi": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:thumbv7em-none-eabihf": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:thumbv7m-none-eabi": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:thumbv8m.main-none-eabi": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:thumbv8m.main-none-eabihf": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:wasm32-unknown-emscripten": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), wasm32-unknown-emscripten - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), wasm32-unknown-emscripten + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), wasm32-unknown-emscripten ], "@rules_rust//rust/platform:wasm32-unknown-unknown": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:wasm32-wasip1": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), wasm32-wasip1 - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), wasm32-wasip1 + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), wasm32-wasip1 ], "@rules_rust//rust/platform:wasm32-wasip1-threads": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), wasm32-wasip1-threads - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), wasm32-wasip1-threads + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), wasm32-wasip1-threads ], "@rules_rust//rust/platform:wasm32-wasip2": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), wasm32-wasip2 - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), wasm32-wasip2 + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), wasm32-wasip2 ], "@rules_rust//rust/platform:x86_64-apple-darwin": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-apple-darwin - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-apple-darwin + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-apple-darwin ], "@rules_rust//rust/platform:x86_64-apple-ios": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-apple-ios - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-apple-ios + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-apple-ios ], "@rules_rust//rust/platform:x86_64-apple-ios-macabi": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-apple-ios-macabi - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-apple-ios-macabi + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-apple-ios-macabi ], "@rules_rust//rust/platform:x86_64-linux-android": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-linux-android - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-linux-android + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-linux-android "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(any(target_os = "linux", target_os = "android"), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:x86_64-pc-windows-msvc": [ @@ -455,11 +455,11 @@ rust_library( ], "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-unknown-freebsd - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-unknown-freebsd + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-unknown-freebsd ], "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-unknown-fuchsia - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-unknown-fuchsia + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))), x86_64-unknown-fuchsia ], "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ "//thirdparty/crates/linux-raw-sys-0.12.1:linux_raw_sys", # cfg(all(not(rustix_use_libc), not(miri), target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64")))) @@ -469,11 +469,11 @@ rust_library( ], "@rules_rust//rust/platform:x86_64-unknown-none": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "@rules_rust//rust/platform:x86_64-unknown-uefi": [ "//thirdparty/crates/errno-0.3.14:errno", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) - "//thirdparty/crates/libc-0.2.186:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(all(not(windows), any(rustix_use_libc, miri, not(all(target_os = "linux", any(target_endian = "little", any(target_arch = "s390x", target_arch = "powerpc")), any(target_arch = "arm", all(target_arch = "aarch64", target_pointer_width = "64"), target_arch = "riscv64", all(rustix_use_experimental_asm, target_arch = "powerpc"), all(rustix_use_experimental_asm, target_arch = "powerpc64"), all(rustix_use_experimental_asm, target_arch = "s390x"), all(rustix_use_experimental_asm, target_arch = "mips"), all(rustix_use_experimental_asm, target_arch = "mips32r6"), all(rustix_use_experimental_asm, target_arch = "mips64"), all(rustix_use_experimental_asm, target_arch = "mips64r6"), target_arch = "x86", all(target_arch = "x86_64", target_pointer_width = "64"))))))) ], "//conditions:default": [], }), diff --git a/thirdparty/crates/serde_derive-1.0.229/BUILD.bazel b/thirdparty/crates/serde_derive-1.0.229/BUILD.bazel index 7c499e01d..8c0ee6f88 100644 --- a/thirdparty/crates/serde_derive-1.0.229/BUILD.bazel +++ b/thirdparty/crates/serde_derive-1.0.229/BUILD.bazel @@ -110,6 +110,6 @@ rust_proc_macro( deps = [ "//thirdparty/crates/proc-macro2-1.0.107:proc_macro2", "//thirdparty/crates/quote-1.0.47:quote", - "//thirdparty/crates/syn-3.0.0:syn", + "//thirdparty/crates/syn-3.0.3:syn", ], ) diff --git a/thirdparty/crates/syn-3.0.0/.cargo_vcs_info.json b/thirdparty/crates/syn-3.0.0/.cargo_vcs_info.json deleted file mode 100644 index b4653b220..000000000 --- a/thirdparty/crates/syn-3.0.0/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "51d6959bdd00bc096180ff59c4c9fe6cd96a7661" - }, - "path_in_vcs": "" -} \ No newline at end of file diff --git a/thirdparty/crates/syn-3.0.0/LICENSE-APACHE b/thirdparty/crates/syn-3.0.0/LICENSE-APACHE deleted file mode 100644 index 1b5ec8b78..000000000 --- a/thirdparty/crates/syn-3.0.0/LICENSE-APACHE +++ /dev/null @@ -1,176 +0,0 @@ - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - -TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - -1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - -2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - -3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - -4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - -5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - -6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - -7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - -8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - -9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - -END OF TERMS AND CONDITIONS diff --git a/thirdparty/crates/syn-3.0.0/LICENSE-MIT b/thirdparty/crates/syn-3.0.0/LICENSE-MIT deleted file mode 100644 index 31aa79387..000000000 --- a/thirdparty/crates/syn-3.0.0/LICENSE-MIT +++ /dev/null @@ -1,23 +0,0 @@ -Permission is hereby granted, free of charge, to any -person obtaining a copy of this software and associated -documentation files (the "Software"), to deal in the -Software without restriction, including without -limitation the rights to use, copy, modify, merge, -publish, distribute, sublicense, and/or sell copies of -the Software, and to permit persons to whom the Software -is furnished to do so, subject to the following -conditions: - -The above copyright notice and this permission notice -shall be included in all copies or substantial portions -of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF -ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED -TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A -PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT -SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR -IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER -DEALINGS IN THE SOFTWARE. diff --git a/thirdparty/crates/syn-3.0.0/.cargo-checksum.json b/thirdparty/crates/syn-3.0.3/.cargo-checksum.json similarity index 76% rename from thirdparty/crates/syn-3.0.0/.cargo-checksum.json rename to thirdparty/crates/syn-3.0.3/.cargo-checksum.json index 23890bb63..9384e5f8d 100644 --- a/thirdparty/crates/syn-3.0.0/.cargo-checksum.json +++ b/thirdparty/crates/syn-3.0.3/.cargo-checksum.json @@ -1 +1 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"880c85b740b528b322c4e93adffef61b4f1da1448f822bfac1bb0e6e43e349e7","Cargo.lock":"eefcd6da163d7566661cb7d75f23c9ed3aaaa9b7422af5a12aa03ebf174557b3","Cargo.toml":"ae2b7c1638123a3456b6a804d5c4176c74ebe22420e4f758c367d52dc783daf6","Cargo.toml.orig":"86d831f79e395ec96f07eaf0691bb10cb89677c94e8830fcd9d50307993c3df1","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"4a62d5b80f287dbd19cdfcc8c115fe49873a9208575cb87a7b3574895502fd51","benches/file.rs":"6f2ae7748d1576cff48e4ef55d4e87e2f5bb7898a36aa99ea6dd6ed0f72a4e3c","benches/rust.rs":"4ad250087795831d7c79b130d47927b5c733052c9659de039c08835b74be72b1","src/attr.rs":"2108cf48c98ed0a7833ec73b841fccc254c733453a7e69127b0255541bbc9572","src/bigint.rs":"21cf6cf0c8e175421a6579321878e140d6cd2c975e5bdac4eadde25907d7e879","src/buffer.rs":"5b4daf35958f18dd389bcd49be73087b2c6f1971412eac32c1b66968ec786912","src/classify.rs":"980e81540ddf0414bbfa6fc4f543127d39da84337732a6353473afbd547267f0","src/custom_keyword.rs":"322114e36ae43a2f8605506fb4568efdbc2986853e2fee74bd10a4ca0fb60c69","src/custom_punctuation.rs":"67134b7685ce89eddb7bf4ee3c9a48e5eb8ecbb1703cd49a01cbb115239fb814","src/data.rs":"5d7e9ebb868ed22a955a4a3b4b562f5b6b6d3a43f5fc0a9d7901db0444e2c04b","src/derive.rs":"4927cfd64d2c61bb9ee8462b83d5bbce77e3f85c3a03a5565ecf6f08d55367c3","src/discouraged.rs":"7b5ca0fb3120970d028ddd4efc69363fea278a0b6ed5160d82295c326b3b08ac","src/drops.rs":"c48e679507424c08716b48256a06d59fe55e877de336c40f0df56cfd80e23826","src/error.rs":"34a045645056452a76862f08084ae9a92aa24a38daa25586e9ab12f5fa9c3b23","src/export.rs":"d9039ba7f1455089139cf8a6871159f0ec57949cc730b42fe3c318a8397d3368","src/expr.rs":"d5b8d0a407db015e8012957077a06df28c183b007486e445d614b1322d4d6d5d","src/ext.rs":"8bc0d0ffab88c73d2305c9f588e6b5285501de8869308162f91019c83bc5bdf1","src/file.rs":"4513d0f1f4a4d78ba94c0895e97aadc0c2ebcf6f5da36abf762e77e813bc9aea","src/fixup.rs":"7647cde30efdce96b1488ae805788c168d4499b464b7d421abc17ea8ffde66f2","src/gen/clone.rs":"342704f87c06f11b4b6b60689df5f55e7a9a67d656b9286cc23a364f485c135f","src/gen/debug.rs":"29782ea05d86b95e98bb664d6688c413c871dc78f5dc9ee81f584aaa63e85558","src/gen/eq.rs":"15f2b5070ea8fccf07dbff6bf2fdc027c6d913599b5c1a8e8a5bc9e39e601133","src/gen/fold.rs":"4804ee04ce6ed8437a9e5d2a54a3ca91f711098034f95ac7102ca0928783dc3e","src/gen/hash.rs":"ac638e8b56722dd890bd06297a2902b9015cf85e2c50432258b050e43cc1d4cf","src/gen/token.css":"f79afb8272b8c9b6fe63716c6be5c53d8e7c5ca5473bf3ec891b6e1be9887716","src/gen/visit.rs":"32414282294ae0d0fbbe863c51cf26c2fc3fb6843dbf715d96f5ad69f3048c2c","src/gen/visit_mut.rs":"1d76d69baddc4f1354399cab7309a5a2738b3850ad249f793b596fc854c4e8d1","src/generics.rs":"60ad64f7ca90c77abd789a62bb86bf6ea5bf3eb39a8c44281bfa17af0857277b","src/group.rs":"61e067094aa930b6550dc3717a5aaeef7dabfdcf1a177f83fb636598fa7e4e72","src/ident.rs":"a17e32b0d997649c4c986d1c9eef24be5331cd9ab478604932297b55f785487a","src/item.rs":"deb341ba405689ec36b32381e31a3d61809a6f7930dcd0f1ef091b55538dae99","src/lib.rs":"29ff938ec34c6e90dc707232eb90a8ebe961af48a60a82e62a5e9b89fbd49dee","src/lifetime.rs":"2f3a240a4a0d9536dd1e3255d5ae0d64efcc46f295cf565a09e8ac33cd3d3487","src/lit.rs":"b4afa58a52cba945f9c55c4ccf6c27b32637f89fa114b4d6ed254664e6cd1d22","src/lookahead.rs":"ea51bbf9a23d68238f8324a51675f5815fb3e5fc08c6bab93bc2648d3342c38f","src/mac.rs":"fdce8291f71adef3f69975f229156dca2309ca232ed943061afaf96220908ab8","src/macros.rs":"dfc278625948d727ef06e058a94483bbcc551b62b8eb736dc7cd9e0a4777866f","src/meta.rs":"d8703f8cbc5fd6465c367214eac38efca0f8388bdef8ac5e6f863835fbd3b30f","src/op.rs":"a61757370f802e44efa3c4a1057ae2cd26e64e273f7d76c06d5ffb49602319e2","src/parse.rs":"e692d6e895ac79a14680b89a7c29611995126953238176bdb50d2a3c2fb2d9e3","src/parse_macro_input.rs":"e4e22b63d0496d06a4ca17742a22467ed93f08a739081324773828bad63175ee","src/parse_quote.rs":"c0ae210cfe6d6b8f6758cff1f44283acd9df5ed67d88911875079fb28d4d1b67","src/pat.rs":"90f1c0f8f2c699eca6bca8f1ebb955df899c1f5c22fd69679992d66b606a92c5","src/path.rs":"088ff7dc2cd278efc32017722887d6849866e54ab7d7ae47710edf785c0cc478","src/precedence.rs":"301f5cc51e1bbb35aeb64f6ed1b21d6f61d83f6c048aec9896976ee0011b948e","src/print.rs":"22910bf0521ab868ebd7c62601c55912d12cfb400c65723e08e5cfa3a2d111c0","src/punctuated.rs":"6b70fd15cc662260c2c0f20cd35a777351b2c5199b299cf5c8d8972723bd0f04","src/restriction.rs":"9506f1dd5710a380a8298dc8b345a0849a011e447e1aca08c4ca29543a65273b","src/scan_expr.rs":"1afda43a7f4e9d426859a90d8a62a58c6654f3be41bb274d4884a56ac08f8eee","src/sealed.rs":"6ece3b3dcb30f6bb98b93d83759ca7712ee8592bef9c0511141039c38765db0e","src/span.rs":"0a48e375e5c9768f6f64174a91ba6a255f4b021e2fb3548d8494e617f142601b","src/spanned.rs":"b53ce23f10935cf202da0f5a430e9feca9f4858bbd6efbe896acf17d3cfce540","src/stmt.rs":"60718ffd8e4b72bae9ea620670276af3bd407f248f2c5e3bd945a2ea8c541661","src/thread.rs":"b91e33c563c2ea584fcd7c5454998303173f4227bdb19504776e61d09b60675c","src/token.rs":"d6863cfd354257b70da9a75ac8d588b81aed7ef86918fe317ba6f7d468537f57","src/tt.rs":"d5b9df076504b1506e0b05dafb9006fd0772fdb8d4b8b8dcc315dbca3277331a","src/ty.rs":"a3dea4cf1daac3da5fde1775d4d90b9d2a3bc112c30d14c31e6fc4e8b19a9a80","src/verbatim.rs":"503055ba92ebb97da71a8a7cae1e6606969aadfb965b0d6c7e56693f9ef66b0a","src/whitespace.rs":"9cdcbfe9045b259046329a795bc1105ab5a871471a6d3f7318d275ee53f7a825","tests/common/eq.rs":"f8f63bc2df6b11137ee397bf50f4cad5eccccfcae45cb4921903c550a00a8a91","tests/common/mod.rs":"b752aa8f1faf8c6abf1286a12fb50b6c257ec1889d81bcdb3dc3257134695a89","tests/common/parse.rs":"b1685e9e0f0569f48d66ddd92d787a12933a1d2f95e7c9ae974a3648763f989b","tests/common/visit.rs":"a260ecd2ce7853cd3644e19aba08e8d358a656fd3fb0f1287cea40c59c9e62c9","tests/debug/gen.rs":"75b59398bb58e8d05c5ee5598b88163564b480c866af3dddb9bcc69e8df8459a","tests/debug/mod.rs":"1259df940bbcaa968a837e402d6853f2efa38d2260e306d42f17f9e8ef74fae5","tests/macros/mod.rs":"d2294a79e341c623ae671dd363e99965d78dda7f340b0cc038267207adfacae2","tests/regression.rs":"e9565ea0efecb4136f099164ffcfa26e1996b0a27fb9c6659e90ad9bdd42e7b6","tests/regression/issue1108.rs":"f32db35244a674e22ff824ca9e5bbec2184e287b59f022db68c418b5878a2edc","tests/regression/issue1235.rs":"a2266b10c3f7c7af5734817ab0a3e8b309b51e7d177b63f26e67e6b744d280b0","tests/repo/mod.rs":"bcd20be00f46711740e37cbe246e519f42eba087c73e5ccd3b20f567b0179b6b","tests/repo/progress.rs":"11219e4ae5e0175d5ddc743907a57b8c4e750e709687c3df53728d6af994a86f","tests/snapshot/mod.rs":"4a101272c5abe6ca9f3501e0cacacee9a0ccf7ca773348a239e5b046d0316a7e","tests/test_attribute.rs":"8a4429b7cfe2360bb73beae54a62ae3255ebbd5181467a8608d6f858c2711728","tests/test_derive_input.rs":"ac6fff053bded4ca30f88343cbf984a319119b58805f56058bd6ad61a1f60972","tests/test_expr.rs":"8fde868c1cbfbf48604735eb872cc3f85a59e2c306a579c45a8112e57d9ebf51","tests/test_generics.rs":"2bd20cbaab8ff268e6e283ae9564f064f352deab7d3d4beafb7f41baa2b862cf","tests/test_grouping.rs":"fe3de6e8824f0722ab6450c6dfc374f6e0f8fe75c87c4dd56b2cb00a2197ed58","tests/test_ident.rs":"d5850e817720e774cd397a46dbc5298c57933823c18e20805e84503fc9387e8f","tests/test_item.rs":"a782047d00fa0eeb73482f81e14f3e2a1410abd1ce9104f9c5edc928bbcddfab","tests/test_lit.rs":"4130efa425d14ed3ad9a1c2a00ef4b29782c9d1cf9e29ff9dddd3b23b2e3ddee","tests/test_meta.rs":"5b0fdee0decbd07476c9673403a662de385901b4bf60600c26ac879893f5bf9c","tests/test_parse_buffer.rs":"1c8cbbf457603bd0a83348079591f843f7ef0533a6275a0c76533e2d07dd321a","tests/test_parse_quote.rs":"2fc6fcd5f6ab063fb26dd64e087a8a0799f0650b7249c1c4f3b08b870b89ed22","tests/test_parse_stream.rs":"b6b533432173123d6d01d8d2cb33714bc50b30b16ffbb6116f93937221ad4594","tests/test_pat.rs":"91458c108f6d8a1660e5633cde6441b0e583f7fa8f36375dcf0a051301eb3d34","tests/test_path.rs":"4957de8bd9e0c158cfa91dc12ec3b16132d243f0d1f3184d827ac6da5ab1739f","tests/test_precedence.rs":"957a896afe99f33fb6f680b880a1eb9f4fe500722eb4ed619f9a995cc5106e7c","tests/test_punctuated.rs":"efed2c281b6965d71b065c7606631ba1989af6e7b5f5d1ca1033f8b968dc076c","tests/test_receiver.rs":"c94e39e57b21844b9c89f9da672da33e83046a409f6d8d00422652f92e703d43","tests/test_round_trip.rs":"aecd7b37cf937f005ee0858f38482782341d7fa037ec8f15b3e8b26bfd6f6104","tests/test_shebang.rs":"785345c798689328060d59a715ed1a54f7a72e9d0305f2f2a1ed84102bcf100b","tests/test_size.rs":"2928bfc73c6a1dc1a7a4fc31bbd1ce8583f97aea4b3adf747dad325bfa748ef0","tests/test_stmt.rs":"17a3f6f7bbd25b428e8761de34b628c99afceacd339350909bbad13614a96cec","tests/test_token_trees.rs":"c30b921a96739c9334ec2bdd06552729891e0251b9d8fbdf0b8f5cc897babee5","tests/test_ty.rs":"5b70d0bc3a02ef6b06f39e4ba5a29df56f1e2237b365f9a0ea1f146b1e2386d2","tests/test_unparenthesize.rs":"e5c047819afd5f70fde1bdd095467b1291d0854641f21e8183e50919986d8ce7","tests/test_visibility.rs":"811a5df8923426bc24f1bc5e6e346dbbde5ce2ae3143867d81332200ad082494","tests/zzz_stable.rs":"2a862e59cb446235ed99aec0e6ada8e16d3ecc30229b29d825b7c0bbc2602989"},"package":"f2fac314a64dc9a36e61a9eb4261a5e9bbfbc922b27e518af97bc32b926cf967"} \ No newline at end of file +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"c005ec6217c91836ef610cdf176ebdf9adaa6a6efd97277cd59a4a3ef486f945","Cargo.lock":"036946b2e706008c61c5cedf0e64eff7fa625cdfb6c48ebe608af6fea284d5bf","Cargo.toml":"9c4333cfb04f5573864b24a9108e5dcbf3dc24051d13256753ccfb4f5baca7f2","Cargo.toml.orig":"da671d51e7459e3fee9acd4b335e50aa69f4389092448f470265fe4fea7c5253","LICENSE-APACHE":"62c7a1e35f56406896d7aa7ca52d0cc0d272ac022b5d2796e7d6905db8a3636a","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"a00f270c7f468863f28b9984547872efb57c7db1b9beb6e685852dc24de6846e","benches/file.rs":"6f2ae7748d1576cff48e4ef55d4e87e2f5bb7898a36aa99ea6dd6ed0f72a4e3c","benches/rust.rs":"4ad250087795831d7c79b130d47927b5c733052c9659de039c08835b74be72b1","src/attr.rs":"2108cf48c98ed0a7833ec73b841fccc254c733453a7e69127b0255541bbc9572","src/bigint.rs":"21cf6cf0c8e175421a6579321878e140d6cd2c975e5bdac4eadde25907d7e879","src/buffer.rs":"ddb6d50a9e79dc1db86d819d41dbf532e172997c8e0101d73c95052835756c50","src/classify.rs":"980e81540ddf0414bbfa6fc4f543127d39da84337732a6353473afbd547267f0","src/custom_keyword.rs":"322114e36ae43a2f8605506fb4568efdbc2986853e2fee74bd10a4ca0fb60c69","src/custom_punctuation.rs":"67134b7685ce89eddb7bf4ee3c9a48e5eb8ecbb1703cd49a01cbb115239fb814","src/data.rs":"78280858745d59b721098c7d7f8aa99dddd9e519908d75a1c4444c9c455875d6","src/derive.rs":"4927cfd64d2c61bb9ee8462b83d5bbce77e3f85c3a03a5565ecf6f08d55367c3","src/discouraged.rs":"7b5ca0fb3120970d028ddd4efc69363fea278a0b6ed5160d82295c326b3b08ac","src/drops.rs":"c48e679507424c08716b48256a06d59fe55e877de336c40f0df56cfd80e23826","src/error.rs":"5ed698f9dd63f16775e48455919a626a246d2ac38d682c1ba37a0ff561ed0a7b","src/export.rs":"d9039ba7f1455089139cf8a6871159f0ec57949cc730b42fe3c318a8397d3368","src/expr.rs":"5a3dc478d7b76a13f2bd7632ccb8f2f9733c1081fce527a17dabd7a7e99161a2","src/ext.rs":"8bc0d0ffab88c73d2305c9f588e6b5285501de8869308162f91019c83bc5bdf1","src/file.rs":"4513d0f1f4a4d78ba94c0895e97aadc0c2ebcf6f5da36abf762e77e813bc9aea","src/fixup.rs":"7647cde30efdce96b1488ae805788c168d4499b464b7d421abc17ea8ffde66f2","src/gen/clone.rs":"342704f87c06f11b4b6b60689df5f55e7a9a67d656b9286cc23a364f485c135f","src/gen/debug.rs":"29782ea05d86b95e98bb664d6688c413c871dc78f5dc9ee81f584aaa63e85558","src/gen/eq.rs":"15f2b5070ea8fccf07dbff6bf2fdc027c6d913599b5c1a8e8a5bc9e39e601133","src/gen/fold.rs":"4804ee04ce6ed8437a9e5d2a54a3ca91f711098034f95ac7102ca0928783dc3e","src/gen/hash.rs":"ac638e8b56722dd890bd06297a2902b9015cf85e2c50432258b050e43cc1d4cf","src/gen/token.css":"f79afb8272b8c9b6fe63716c6be5c53d8e7c5ca5473bf3ec891b6e1be9887716","src/gen/visit.rs":"32414282294ae0d0fbbe863c51cf26c2fc3fb6843dbf715d96f5ad69f3048c2c","src/gen/visit_mut.rs":"1d76d69baddc4f1354399cab7309a5a2738b3850ad249f793b596fc854c4e8d1","src/generics.rs":"a563693b6c9ec11d61b2ce7f869763a3c967879dd9306743f01203cd9555cda1","src/group.rs":"61e067094aa930b6550dc3717a5aaeef7dabfdcf1a177f83fb636598fa7e4e72","src/ident.rs":"a17e32b0d997649c4c986d1c9eef24be5331cd9ab478604932297b55f785487a","src/item.rs":"a2da8d9b7c92688d03102a0840104e59f2cfdb93369ed104a1efefe309b4519f","src/lib.rs":"f8615291f116385ff3a55c16fe089a5cbcc87d7cdc6b3769e0786f8f34379ff4","src/lifetime.rs":"2f3a240a4a0d9536dd1e3255d5ae0d64efcc46f295cf565a09e8ac33cd3d3487","src/lit.rs":"b4afa58a52cba945f9c55c4ccf6c27b32637f89fa114b4d6ed254664e6cd1d22","src/lookahead.rs":"ea51bbf9a23d68238f8324a51675f5815fb3e5fc08c6bab93bc2648d3342c38f","src/mac.rs":"fdce8291f71adef3f69975f229156dca2309ca232ed943061afaf96220908ab8","src/macros.rs":"dfc278625948d727ef06e058a94483bbcc551b62b8eb736dc7cd9e0a4777866f","src/meta.rs":"d8703f8cbc5fd6465c367214eac38efca0f8388bdef8ac5e6f863835fbd3b30f","src/op.rs":"a61757370f802e44efa3c4a1057ae2cd26e64e273f7d76c06d5ffb49602319e2","src/parse.rs":"e692d6e895ac79a14680b89a7c29611995126953238176bdb50d2a3c2fb2d9e3","src/parse_macro_input.rs":"e4e22b63d0496d06a4ca17742a22467ed93f08a739081324773828bad63175ee","src/parse_quote.rs":"c0ae210cfe6d6b8f6758cff1f44283acd9df5ed67d88911875079fb28d4d1b67","src/pat.rs":"3258bdaca2be2c692cd9bb09a89f811f53b176939a57ce46c0d89284628fc830","src/path.rs":"088ff7dc2cd278efc32017722887d6849866e54ab7d7ae47710edf785c0cc478","src/precedence.rs":"301f5cc51e1bbb35aeb64f6ed1b21d6f61d83f6c048aec9896976ee0011b948e","src/print.rs":"22910bf0521ab868ebd7c62601c55912d12cfb400c65723e08e5cfa3a2d111c0","src/punctuated.rs":"6b70fd15cc662260c2c0f20cd35a777351b2c5199b299cf5c8d8972723bd0f04","src/restriction.rs":"9506f1dd5710a380a8298dc8b345a0849a011e447e1aca08c4ca29543a65273b","src/scan_expr.rs":"1afda43a7f4e9d426859a90d8a62a58c6654f3be41bb274d4884a56ac08f8eee","src/sealed.rs":"6ece3b3dcb30f6bb98b93d83759ca7712ee8592bef9c0511141039c38765db0e","src/span.rs":"0a48e375e5c9768f6f64174a91ba6a255f4b021e2fb3548d8494e617f142601b","src/spanned.rs":"b53ce23f10935cf202da0f5a430e9feca9f4858bbd6efbe896acf17d3cfce540","src/stmt.rs":"60718ffd8e4b72bae9ea620670276af3bd407f248f2c5e3bd945a2ea8c541661","src/thread.rs":"b91e33c563c2ea584fcd7c5454998303173f4227bdb19504776e61d09b60675c","src/token.rs":"fddf7540f6c87e088ca2e4cd59a4769bc99989907a71e0d7cb42ee6ec067a6ac","src/tt.rs":"d5b9df076504b1506e0b05dafb9006fd0772fdb8d4b8b8dcc315dbca3277331a","src/ty.rs":"63bbf2272575d40ba632b54ca51857f43410bc22c20ff3ecedee3d3f52dd84e5","src/verbatim.rs":"503055ba92ebb97da71a8a7cae1e6606969aadfb965b0d6c7e56693f9ef66b0a","src/whitespace.rs":"9cdcbfe9045b259046329a795bc1105ab5a871471a6d3f7318d275ee53f7a825","tests/common/eq.rs":"112f43d0b996f40267e3352c672acd0fe71ecbb68e6144915c2ce9087494b651","tests/common/mod.rs":"b752aa8f1faf8c6abf1286a12fb50b6c257ec1889d81bcdb3dc3257134695a89","tests/common/parse.rs":"b1685e9e0f0569f48d66ddd92d787a12933a1d2f95e7c9ae974a3648763f989b","tests/common/visit.rs":"a260ecd2ce7853cd3644e19aba08e8d358a656fd3fb0f1287cea40c59c9e62c9","tests/debug/gen.rs":"75b59398bb58e8d05c5ee5598b88163564b480c866af3dddb9bcc69e8df8459a","tests/debug/mod.rs":"1259df940bbcaa968a837e402d6853f2efa38d2260e306d42f17f9e8ef74fae5","tests/macros/mod.rs":"d2294a79e341c623ae671dd363e99965d78dda7f340b0cc038267207adfacae2","tests/regression.rs":"e9565ea0efecb4136f099164ffcfa26e1996b0a27fb9c6659e90ad9bdd42e7b6","tests/regression/issue1108.rs":"f32db35244a674e22ff824ca9e5bbec2184e287b59f022db68c418b5878a2edc","tests/regression/issue1235.rs":"a2266b10c3f7c7af5734817ab0a3e8b309b51e7d177b63f26e67e6b744d280b0","tests/repo/mod.rs":"b5e0c83cee8fd9016b5ea65f727b831468a56b646b46c95d19702e1bd27b9a4d","tests/repo/progress.rs":"11219e4ae5e0175d5ddc743907a57b8c4e750e709687c3df53728d6af994a86f","tests/snapshot/mod.rs":"4a101272c5abe6ca9f3501e0cacacee9a0ccf7ca773348a239e5b046d0316a7e","tests/test_attribute.rs":"8a4429b7cfe2360bb73beae54a62ae3255ebbd5181467a8608d6f858c2711728","tests/test_derive_input.rs":"ac6fff053bded4ca30f88343cbf984a319119b58805f56058bd6ad61a1f60972","tests/test_expr.rs":"8fde868c1cbfbf48604735eb872cc3f85a59e2c306a579c45a8112e57d9ebf51","tests/test_generics.rs":"2bd20cbaab8ff268e6e283ae9564f064f352deab7d3d4beafb7f41baa2b862cf","tests/test_grouping.rs":"fe3de6e8824f0722ab6450c6dfc374f6e0f8fe75c87c4dd56b2cb00a2197ed58","tests/test_ident.rs":"d5850e817720e774cd397a46dbc5298c57933823c18e20805e84503fc9387e8f","tests/test_item.rs":"49f7130127da9077dc39cb1c3b9a70b55f62c39555b48bf9c7f5bb07fc506531","tests/test_lit.rs":"4130efa425d14ed3ad9a1c2a00ef4b29782c9d1cf9e29ff9dddd3b23b2e3ddee","tests/test_meta.rs":"5b0fdee0decbd07476c9673403a662de385901b4bf60600c26ac879893f5bf9c","tests/test_parse_buffer.rs":"1c8cbbf457603bd0a83348079591f843f7ef0533a6275a0c76533e2d07dd321a","tests/test_parse_quote.rs":"2fc6fcd5f6ab063fb26dd64e087a8a0799f0650b7249c1c4f3b08b870b89ed22","tests/test_parse_stream.rs":"b6b533432173123d6d01d8d2cb33714bc50b30b16ffbb6116f93937221ad4594","tests/test_pat.rs":"91458c108f6d8a1660e5633cde6441b0e583f7fa8f36375dcf0a051301eb3d34","tests/test_path.rs":"4957de8bd9e0c158cfa91dc12ec3b16132d243f0d1f3184d827ac6da5ab1739f","tests/test_precedence.rs":"957a896afe99f33fb6f680b880a1eb9f4fe500722eb4ed619f9a995cc5106e7c","tests/test_punctuated.rs":"efed2c281b6965d71b065c7606631ba1989af6e7b5f5d1ca1033f8b968dc076c","tests/test_receiver.rs":"c94e39e57b21844b9c89f9da672da33e83046a409f6d8d00422652f92e703d43","tests/test_round_trip.rs":"aecd7b37cf937f005ee0858f38482782341d7fa037ec8f15b3e8b26bfd6f6104","tests/test_shebang.rs":"785345c798689328060d59a715ed1a54f7a72e9d0305f2f2a1ed84102bcf100b","tests/test_size.rs":"2928bfc73c6a1dc1a7a4fc31bbd1ce8583f97aea4b3adf747dad325bfa748ef0","tests/test_stmt.rs":"17a3f6f7bbd25b428e8761de34b628c99afceacd339350909bbad13614a96cec","tests/test_token_trees.rs":"c30b921a96739c9334ec2bdd06552729891e0251b9d8fbdf0b8f5cc897babee5","tests/test_ty.rs":"5b70d0bc3a02ef6b06f39e4ba5a29df56f1e2237b365f9a0ea1f146b1e2386d2","tests/test_unparenthesize.rs":"e5c047819afd5f70fde1bdd095467b1291d0854641f21e8183e50919986d8ce7","tests/test_visibility.rs":"811a5df8923426bc24f1bc5e6e346dbbde5ce2ae3143867d81332200ad082494","tests/zzz_stable.rs":"2a862e59cb446235ed99aec0e6ada8e16d3ecc30229b29d825b7c0bbc2602989"},"package":"53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3"} \ No newline at end of file diff --git a/thirdparty/crates/syn-3.0.3/.cargo_vcs_info.json b/thirdparty/crates/syn-3.0.3/.cargo_vcs_info.json new file mode 100644 index 000000000..4724f4218 --- /dev/null +++ b/thirdparty/crates/syn-3.0.3/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "23dbaab4b0c43f56cd803894054cf366661e53b0" + }, + "path_in_vcs": "" +} \ No newline at end of file diff --git a/thirdparty/crates/syn-3.0.0/BUILD.bazel b/thirdparty/crates/syn-3.0.3/BUILD.bazel similarity index 99% rename from thirdparty/crates/syn-3.0.0/BUILD.bazel rename to thirdparty/crates/syn-3.0.3/BUILD.bazel index 552230000..0c08ff81d 100644 --- a/thirdparty/crates/syn-3.0.0/BUILD.bazel +++ b/thirdparty/crates/syn-3.0.3/BUILD.bazel @@ -113,7 +113,7 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "3.0.0", + version = "3.0.3", deps = [ "//thirdparty/crates/proc-macro2-1.0.107:proc_macro2", "//thirdparty/crates/quote-1.0.47:quote", diff --git a/thirdparty/crates/syn-3.0.0/Cargo.lock b/thirdparty/crates/syn-3.0.3/Cargo.lock similarity index 96% rename from thirdparty/crates/syn-3.0.0/Cargo.lock rename to thirdparty/crates/syn-3.0.3/Cargo.lock index 99d65a582..9cd257270 100644 --- a/thirdparty/crates/syn-3.0.0/Cargo.lock +++ b/thirdparty/crates/syn-3.0.3/Cargo.lock @@ -10,9 +10,9 @@ checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "anyhow" -version = "1.0.103" +version = "1.0.104" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" +checksum = "330a5ed07fa54e4702c9d6c4174f74427fc0ef6e214bbd677ae50a5099946470" [[package]] name = "atomic-waker" @@ -268,9 +268,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.4.1" +version = "2.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6" +checksum = "da7c62ceae207dd37ea5b845da6a0696c799f85e97da1ab5b7910be3c1c80223" [[package]] name = "filetime" @@ -461,9 +461,9 @@ checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" [[package]] name = "hyper" -version = "1.10.1" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55281c53a1894c864990125767da440a4e630446785086f52523b20033b74498" +checksum = "d22053281f852e11534f5198498373cbb59295120a20771d90f7ed1897490a72" dependencies = [ "atomic-waker", "bytes", @@ -729,9 +729,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.186" +version = "0.2.189" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" +checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2" [[package]] name = "linux-raw-sys" @@ -831,9 +831,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] @@ -897,9 +897,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] @@ -958,22 +958,22 @@ dependencies = [ [[package]] name = "ref-cast" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f354300ae66f76f1c85c5f84693f0ce81d747e2c3f21a45fef496d89c960bf7d" +checksum = "216e8f773d7923bcba9ceb86a86c93cabb3903a11872fc3f138c49630e50b96d" dependencies = [ "ref-cast-impl", ] [[package]] name = "ref-cast-impl" -version = "1.0.25" +version = "1.0.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7186006dcb21920990093f30e3dea63b7d6e977bf1256be20c3563a5db070da" +checksum = "2c9283685feec7d69af75fb0e858d5e7378f33fe4fc699383b2916ab9273e03c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.2", ] [[package]] @@ -1188,31 +1188,31 @@ checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" [[package]] name = "serde" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ "serde_core", ] [[package]] name = "serde_core" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.2", ] [[package]] @@ -1296,7 +1296,18 @@ dependencies = [ [[package]] name = "syn" -version = "3.0.0" +version = "3.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a207d6d6a2b7fc470b80443726053f18a2481b7e1eee970597051596567987a3" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" dependencies = [ "anyhow", "automod", @@ -1397,22 +1408,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.18" +version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" +checksum = "09a43598840e33d5b0331f38c5e30d13bb11c11210a4b58f0d9b18a5a5eefcd9" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.18" +version = "2.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" +checksum = "43cbfe0cf76104d42a574802844187e84a305e531ed54455f11fbde0f10541cd" dependencies = [ "proc-macro2", "quote", - "syn 2.0.119", + "syn 3.0.2", ] [[package]] @@ -1442,9 +1453,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.53.0" +version = "1.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d988bcd52dbe076d3d46903332f58c912b87a2c49b1428419a5845154762ffee" +checksum = "202caea871b69668250d242070849eb495be178ed697a3e98aebce5bc81a0bed" dependencies = [ "bytes", "libc", @@ -1466,13 +1477,14 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.18" +version = "0.7.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ae9cec805b01e8fc3fd2fe289f89149a9b66dd16786abd8b19cfa7b48cb0098" +checksum = "494815d09bf52b5548659851081238f0ca39ff638363907596da739561c62c52" dependencies = [ "bytes", "futures-core", "futures-sink", + "libc", "pin-project-lite", "tokio", ] diff --git a/thirdparty/crates/syn-3.0.0/Cargo.toml b/thirdparty/crates/syn-3.0.3/Cargo.toml similarity index 99% rename from thirdparty/crates/syn-3.0.0/Cargo.toml rename to thirdparty/crates/syn-3.0.3/Cargo.toml index 7b7e94953..7c5ea39c8 100644 --- a/thirdparty/crates/syn-3.0.0/Cargo.toml +++ b/thirdparty/crates/syn-3.0.3/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.71" name = "syn" -version = "3.0.0" +version = "3.0.3" authors = ["David Tolnay "] build = false include = [ diff --git a/thirdparty/crates/syn-3.0.0/Cargo.toml.orig b/thirdparty/crates/syn-3.0.3/Cargo.toml.orig similarity index 99% rename from thirdparty/crates/syn-3.0.0/Cargo.toml.orig rename to thirdparty/crates/syn-3.0.3/Cargo.toml.orig index fb3c23a8e..81d686518 100644 --- a/thirdparty/crates/syn-3.0.0/Cargo.toml.orig +++ b/thirdparty/crates/syn-3.0.3/Cargo.toml.orig @@ -1,6 +1,6 @@ [package] name = "syn" -version = "3.0.0" +version = "3.0.3" authors = ["David Tolnay "] categories = ["development-tools::procedural-macro-helpers", "parser-implementations"] description = "Parser for Rust source code" diff --git a/thirdparty/crates/paste-1.0.15/LICENSE-APACHE b/thirdparty/crates/syn-3.0.3/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/paste-1.0.15/LICENSE-APACHE rename to thirdparty/crates/syn-3.0.3/LICENSE-APACHE diff --git a/thirdparty/crates/paste-1.0.15/LICENSE-MIT b/thirdparty/crates/syn-3.0.3/LICENSE-MIT similarity index 100% rename from thirdparty/crates/paste-1.0.15/LICENSE-MIT rename to thirdparty/crates/syn-3.0.3/LICENSE-MIT diff --git a/thirdparty/crates/syn-3.0.0/README.md b/thirdparty/crates/syn-3.0.3/README.md similarity index 96% rename from thirdparty/crates/syn-3.0.0/README.md rename to thirdparty/crates/syn-3.0.3/README.md index 47d58f5d3..9618ce8f6 100644 --- a/thirdparty/crates/syn-3.0.0/README.md +++ b/thirdparty/crates/syn-3.0.3/README.md @@ -39,12 +39,12 @@ contains some APIs that may be useful more generally. procedural macros enable only what they need, and do not pay in compile time for all the rest. -[`syn::File`]: https://docs.rs/syn/2.0/syn/struct.File.html -[`syn::Item`]: https://docs.rs/syn/2.0/syn/enum.Item.html -[`syn::Expr`]: https://docs.rs/syn/2.0/syn/enum.Expr.html -[`syn::Type`]: https://docs.rs/syn/2.0/syn/enum.Type.html -[`syn::DeriveInput`]: https://docs.rs/syn/2.0/syn/struct.DeriveInput.html -[parser functions]: https://docs.rs/syn/2.0/syn/parse/index.html +[`syn::File`]: https://docs.rs/syn/3/syn/struct.File.html +[`syn::Item`]: https://docs.rs/syn/3/syn/enum.Item.html +[`syn::Expr`]: https://docs.rs/syn/3/syn/enum.Expr.html +[`syn::Type`]: https://docs.rs/syn/3/syn/enum.Type.html +[`syn::DeriveInput`]: https://docs.rs/syn/3/syn/struct.DeriveInput.html +[parser functions]: https://docs.rs/syn/3/syn/parse/index.html [*Release notes*](https://github.com/dtolnay/syn/releases) diff --git a/thirdparty/crates/syn-3.0.0/benches/file.rs b/thirdparty/crates/syn-3.0.3/benches/file.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/benches/file.rs rename to thirdparty/crates/syn-3.0.3/benches/file.rs diff --git a/thirdparty/crates/syn-3.0.0/benches/rust.rs b/thirdparty/crates/syn-3.0.3/benches/rust.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/benches/rust.rs rename to thirdparty/crates/syn-3.0.3/benches/rust.rs diff --git a/thirdparty/crates/syn-3.0.0/src/attr.rs b/thirdparty/crates/syn-3.0.3/src/attr.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/attr.rs rename to thirdparty/crates/syn-3.0.3/src/attr.rs diff --git a/thirdparty/crates/syn-3.0.0/src/bigint.rs b/thirdparty/crates/syn-3.0.3/src/bigint.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/bigint.rs rename to thirdparty/crates/syn-3.0.3/src/bigint.rs diff --git a/thirdparty/crates/syn-3.0.0/src/buffer.rs b/thirdparty/crates/syn-3.0.3/src/buffer.rs similarity index 94% rename from thirdparty/crates/syn-3.0.0/src/buffer.rs rename to thirdparty/crates/syn-3.0.3/src/buffer.rs index 277093dc9..f2e205bd3 100644 --- a/thirdparty/crates/syn-3.0.0/src/buffer.rs +++ b/thirdparty/crates/syn-3.0.3/src/buffer.rs @@ -197,6 +197,14 @@ impl<'a> Cursor<'a> { } } + pub(crate) fn peek_keyword(mut self, token: &str) -> bool { + self.ignore_none(); + match self.entry() { + Entry::Ident(ident) => ident == token, + _ => false, + } + } + /// If the cursor is pointing at a `Punct`, returns it along with a cursor /// pointing at the next `TokenTree`. pub fn punct(mut self) -> Option<(Punct, Cursor<'a>)> { @@ -209,6 +217,24 @@ impl<'a> Cursor<'a> { } } + pub(crate) fn peek_punct(mut self, token: &str) -> bool { + for (i, ch) in token.chars().enumerate() { + self.ignore_none(); + match self.entry() { + Entry::Punct(punct) if punct.as_char() == ch => { + if i == token.len() - 1 { + return true; + } else if punct.spacing() != Spacing::Joint { + break; + } + self = unsafe { self.bump_ignore_group() }; + } + _ => break, + } + } + false + } + /// If the cursor is pointing at a `Literal`, return it along with a cursor /// pointing at the next `TokenTree`. pub fn literal(mut self) -> Option<(Literal, Cursor<'a>)> { @@ -338,8 +364,7 @@ impl<'a> Cursor<'a> { /// Returns the `Span` of the token immediately prior to the position of /// this cursor, or of the current token if there is no previous one. - #[cfg(any(feature = "full", feature = "derive"))] - pub(crate) fn prev_span(mut self) -> Span { + pub fn prev_span(mut self) -> Span { if start_of_buffer(self) < self.ptr { self.ptr = unsafe { self.ptr.sub(1) }; } diff --git a/thirdparty/crates/syn-3.0.0/src/classify.rs b/thirdparty/crates/syn-3.0.3/src/classify.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/classify.rs rename to thirdparty/crates/syn-3.0.3/src/classify.rs diff --git a/thirdparty/crates/syn-3.0.0/src/custom_keyword.rs b/thirdparty/crates/syn-3.0.3/src/custom_keyword.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/custom_keyword.rs rename to thirdparty/crates/syn-3.0.3/src/custom_keyword.rs diff --git a/thirdparty/crates/syn-3.0.0/src/custom_punctuation.rs b/thirdparty/crates/syn-3.0.3/src/custom_punctuation.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/custom_punctuation.rs rename to thirdparty/crates/syn-3.0.3/src/custom_punctuation.rs diff --git a/thirdparty/crates/syn-3.0.0/src/data.rs b/thirdparty/crates/syn-3.0.3/src/data.rs similarity index 98% rename from thirdparty/crates/syn-3.0.0/src/data.rs rename to thirdparty/crates/syn-3.0.3/src/data.rs index 1e73f7ecb..e2e936ab2 100644 --- a/thirdparty/crates/syn-3.0.0/src/data.rs +++ b/thirdparty/crates/syn-3.0.3/src/data.rs @@ -276,7 +276,7 @@ impl<'a> Clone for Members<'a> { pub(crate) mod parsing { use crate::attr::Attribute; use crate::data::{Field, FieldModifiers, Fields, FieldsNamed, FieldsUnnamed, Variant}; - use crate::error::Result; + use crate::error::{Error, Result}; use crate::expr::Expr; use crate::ext::IdentExt as _; use crate::ident::Ident; @@ -410,12 +410,11 @@ pub(crate) mod parsing { if input.peek(Token![=]) { input.parse::()?; - let start_span = input.span(); + let expr_start = input.cursor(); input.parse::()?; - let end_span = input.cursor().prev_span(); - return Err(crate::error::new2( - start_span, - end_span, + let expr_end = input.cursor(); + return Err(Error::new_range( + expr_start..expr_end, "field default value is only supported in structs with named fields", )); } diff --git a/thirdparty/crates/syn-3.0.0/src/derive.rs b/thirdparty/crates/syn-3.0.3/src/derive.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/derive.rs rename to thirdparty/crates/syn-3.0.3/src/derive.rs diff --git a/thirdparty/crates/syn-3.0.0/src/discouraged.rs b/thirdparty/crates/syn-3.0.3/src/discouraged.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/discouraged.rs rename to thirdparty/crates/syn-3.0.3/src/discouraged.rs diff --git a/thirdparty/crates/syn-3.0.0/src/drops.rs b/thirdparty/crates/syn-3.0.3/src/drops.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/drops.rs rename to thirdparty/crates/syn-3.0.3/src/drops.rs diff --git a/thirdparty/crates/syn-3.0.0/src/error.rs b/thirdparty/crates/syn-3.0.3/src/error.rs similarity index 82% rename from thirdparty/crates/syn-3.0.0/src/error.rs rename to thirdparty/crates/syn-3.0.3/src/error.rs index 2b753ea60..16fb7d943 100644 --- a/thirdparty/crates/syn-3.0.0/src/error.rs +++ b/thirdparty/crates/syn-3.0.3/src/error.rs @@ -8,6 +8,8 @@ use alloc::string::{String, ToString}; use alloc::vec; use alloc::vec::Vec; use core::fmt::{self, Debug, Display}; +#[cfg(feature = "parsing")] +use core::ops::Range; use core::slice; use proc_macro2::{ Delimiter, Group, Ident, LexError, Literal, Punct, Spacing, Span, TokenStream, TokenTree, @@ -160,7 +162,7 @@ impl Error { /// Ok(s) /// } /// ``` - pub fn new(span: Span, message: T) -> Self { + pub fn new(span: Span, message: impl Display) -> Self { return new(span, message.to_string()); fn new(span: Span, message: String) -> Error { @@ -191,7 +193,7 @@ impl Error { /// `ParseStream::error`)! #[cfg(feature = "printing")] #[cfg_attr(docsrs, doc(cfg(feature = "printing")))] - pub fn new_spanned(tokens: T, message: U) -> Self { + pub fn new_spanned(tokens: impl ToTokens, message: impl Display) -> Self { return new_spanned(tokens.into_token_stream(), message.to_string()); fn new_spanned(tokens: TokenStream, message: String) -> Error { @@ -207,6 +209,83 @@ impl Error { } } + /// Creates an error spanning the given cursor range. + /// + /// # Example + /// + /// This parses a sequence of '+'-separated lifetimes and types like + /// `Vec + dyn Display + 'static`, at least one of which must be a type. + /// + /// ``` + /// use syn::{Lifetime, Token, Type}; + /// use syn::parse::{Error, ParseStream, Result}; + /// + /// enum Thing { + /// Lifetime(Lifetime), + /// Type(Type), + /// } + /// + /// fn parse_things(input: ParseStream) -> Result> { + /// let things_begin = input.cursor(); + /// let things_end; + /// let mut things = Vec::new(); + /// let mut has_type = false; + /// loop { + /// if input.peek(Lifetime) { + /// let lifetime: Lifetime = input.parse()?; + /// things.push(Thing::Lifetime(lifetime)); + /// } else { + /// let ty = input.call(Type::without_plus)?; + /// things.push(Thing::Type(ty)); + /// has_type = true; + /// } + /// let plus_token: Option = input.parse()?; + /// if plus_token.is_none() { + /// things_end = input.cursor(); + /// break; + /// } + /// } + /// + /// if has_type { + /// Ok(things) + /// } else { + /// let msg = "things must not be all lifetimes, at least one type is required"; + /// Err(Error::new_range(things_begin..things_end, msg)) + /// } + /// } + /// ``` + /// + /// ```text + /// error: things must not be all lifetimes, at least one type is required + /// --> example.rs:4:23 + /// | + /// 4 | example!(THINGS = 'a + 'b, ...); + /// | ^^^^^^^ + /// ``` + #[cfg(feature = "parsing")] + #[cfg_attr(docsrs, doc(cfg(feature = "parsing")))] + pub fn new_range<'a>(span: impl Into>>, message: impl Display) -> Self { + return new_range(span.into(), message.to_string()); + + fn new_range(span: Range, message: String) -> Error { + assert!(crate::buffer::same_buffer(span.start, span.end)); + assert!(span.start <= span.end); + Error { + messages: vec![ErrorMessage { + span: ThreadBound::new(SpanRange { + start: span.start.span(), + end: if span.start == span.end { + span.end.span() + } else { + span.end.prev_span() + }, + }), + message, + }], + } + } + } + /// The source location of the error. /// /// Spans are not thread-safe so this function returns `Span::call_site()` diff --git a/thirdparty/crates/syn-3.0.0/src/export.rs b/thirdparty/crates/syn-3.0.3/src/export.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/export.rs rename to thirdparty/crates/syn-3.0.3/src/export.rs diff --git a/thirdparty/crates/syn-3.0.0/src/expr.rs b/thirdparty/crates/syn-3.0.3/src/expr.rs similarity index 99% rename from thirdparty/crates/syn-3.0.0/src/expr.rs rename to thirdparty/crates/syn-3.0.3/src/expr.rs index 5303b4f81..c9437d50c 100644 --- a/thirdparty/crates/syn-3.0.0/src/expr.rs +++ b/thirdparty/crates/syn-3.0.3/src/expr.rs @@ -288,6 +288,12 @@ ast_enum_of_structs! { Unsafe(ExprUnsafe), /// Tokens in expression position not interpreted by Syn. + /// + ///
+ /// + /// Important: see [Compatibility notes][crate#verbatim-variants]. + /// + ///
Verbatim(TokenStream), /// A while loop: `while expr { ... }`. @@ -1907,8 +1913,7 @@ pub(crate) mod parsing { || input.peek(Token![async]) && (input.peek2(Token![|]) || input.peek2(Token![move])) { expr_closure(input, allow_struct).map(Expr::Closure) - } else if token::parsing::peek_keyword(input.cursor(), "builtin") && input.peek2(Token![#]) - { + } else if input.cursor().peek_keyword("builtin") && input.peek2(Token![#]) { expr_builtin(input) } else if input.peek(Ident) || input.peek(Token![::]) @@ -2818,16 +2823,14 @@ pub(crate) mod parsing { let break_token: Token![break] = input.parse()?; let ahead = input.fork(); + let label_begin = ahead.cursor(); let label = Lifetime::parse_optional_any(&ahead); if label.is_some() && ahead.peek(Token![:]) { // Not allowed: `break 'label: loop {...}` // Parentheses are required. `break ('label: loop {...})` let _: Expr = input.parse()?; - let start_span = label.unwrap().apostrophe; - let end_span = input.cursor().prev_span(); - return Err(crate::error::new2( - start_span, - end_span, + return Err(Error::new_range( + label_begin..input.cursor(), "parentheses required", )); } diff --git a/thirdparty/crates/syn-3.0.0/src/ext.rs b/thirdparty/crates/syn-3.0.3/src/ext.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/ext.rs rename to thirdparty/crates/syn-3.0.3/src/ext.rs diff --git a/thirdparty/crates/syn-3.0.0/src/file.rs b/thirdparty/crates/syn-3.0.3/src/file.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/file.rs rename to thirdparty/crates/syn-3.0.3/src/file.rs diff --git a/thirdparty/crates/syn-3.0.0/src/fixup.rs b/thirdparty/crates/syn-3.0.3/src/fixup.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/fixup.rs rename to thirdparty/crates/syn-3.0.3/src/fixup.rs diff --git a/thirdparty/crates/syn-3.0.0/src/gen/clone.rs b/thirdparty/crates/syn-3.0.3/src/gen/clone.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/gen/clone.rs rename to thirdparty/crates/syn-3.0.3/src/gen/clone.rs diff --git a/thirdparty/crates/syn-3.0.0/src/gen/debug.rs b/thirdparty/crates/syn-3.0.3/src/gen/debug.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/gen/debug.rs rename to thirdparty/crates/syn-3.0.3/src/gen/debug.rs diff --git a/thirdparty/crates/syn-3.0.0/src/gen/eq.rs b/thirdparty/crates/syn-3.0.3/src/gen/eq.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/gen/eq.rs rename to thirdparty/crates/syn-3.0.3/src/gen/eq.rs diff --git a/thirdparty/crates/syn-3.0.0/src/gen/fold.rs b/thirdparty/crates/syn-3.0.3/src/gen/fold.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/gen/fold.rs rename to thirdparty/crates/syn-3.0.3/src/gen/fold.rs diff --git a/thirdparty/crates/syn-3.0.0/src/gen/hash.rs b/thirdparty/crates/syn-3.0.3/src/gen/hash.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/gen/hash.rs rename to thirdparty/crates/syn-3.0.3/src/gen/hash.rs diff --git a/thirdparty/crates/syn-3.0.0/src/gen/token.css b/thirdparty/crates/syn-3.0.3/src/gen/token.css similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/gen/token.css rename to thirdparty/crates/syn-3.0.3/src/gen/token.css diff --git a/thirdparty/crates/syn-3.0.0/src/gen/visit.rs b/thirdparty/crates/syn-3.0.3/src/gen/visit.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/gen/visit.rs rename to thirdparty/crates/syn-3.0.3/src/gen/visit.rs diff --git a/thirdparty/crates/syn-3.0.0/src/gen/visit_mut.rs b/thirdparty/crates/syn-3.0.3/src/gen/visit_mut.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/gen/visit_mut.rs rename to thirdparty/crates/syn-3.0.3/src/gen/visit_mut.rs diff --git a/thirdparty/crates/syn-3.0.0/src/generics.rs b/thirdparty/crates/syn-3.0.3/src/generics.rs similarity index 99% rename from thirdparty/crates/syn-3.0.0/src/generics.rs rename to thirdparty/crates/syn-3.0.3/src/generics.rs index 9a7e352e3..37094a89a 100644 --- a/thirdparty/crates/syn-3.0.0/src/generics.rs +++ b/thirdparty/crates/syn-3.0.3/src/generics.rs @@ -403,6 +403,14 @@ ast_enum_of_structs! { Trait(TraitBound), Lifetime(Lifetime), PreciseCapture(PreciseCapture), + + /// Tokens in bound position not interpreted by Syn. + /// + ///
+ /// + /// Important: see [Compatibility notes][crate#verbatim-variants]. + /// + ///
Verbatim(TokenStream), } } @@ -540,8 +548,6 @@ ast_struct! { #[cfg(feature = "parsing")] pub(crate) mod parsing { use crate::attr::Attribute; - #[cfg(feature = "full")] - use crate::error; use crate::error::{Error, Result}; use crate::ext::IdentExt as _; use crate::generics::{ @@ -788,16 +794,13 @@ pub(crate) mod parsing { #[cfg(feature = "full")] { if input.peek(Token![use]) { + let precise_capture_begin = input.cursor(); let precise_capture: PreciseCapture = input.parse()?; return if allow_precise_capture { Ok(TypeParamBound::PreciseCapture(precise_capture)) } else { let msg = "`use<...>` precise capturing syntax is not allowed here"; - Err(error::new2( - precise_capture.use_token.span, - precise_capture.gt_token.span, - msg, - )) + Err(Error::new_range(precise_capture_begin..input.cursor(), msg)) }; } } diff --git a/thirdparty/crates/syn-3.0.0/src/group.rs b/thirdparty/crates/syn-3.0.3/src/group.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/group.rs rename to thirdparty/crates/syn-3.0.3/src/group.rs diff --git a/thirdparty/crates/syn-3.0.0/src/ident.rs b/thirdparty/crates/syn-3.0.3/src/ident.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/ident.rs rename to thirdparty/crates/syn-3.0.3/src/ident.rs diff --git a/thirdparty/crates/syn-3.0.0/src/item.rs b/thirdparty/crates/syn-3.0.3/src/item.rs similarity index 94% rename from thirdparty/crates/syn-3.0.0/src/item.rs rename to thirdparty/crates/syn-3.0.3/src/item.rs index 7edcdb549..8cddee034 100644 --- a/thirdparty/crates/syn-3.0.0/src/item.rs +++ b/thirdparty/crates/syn-3.0.3/src/item.rs @@ -80,25 +80,13 @@ ast_enum_of_structs! { Use(ItemUse), /// Tokens forming an item not interpreted by Syn. + /// + ///
+ /// + /// Important: see [Compatibility notes][crate#verbatim-variants]. + /// + ///
Verbatim(TokenStream), - - // For testing exhaustiveness in downstream code, use the following idiom: - // - // match item { - // #![cfg_attr(test, deny(non_exhaustive_omitted_patterns))] - // - // Item::Const(item) => {...} - // Item::Enum(item) => {...} - // ... - // Item::Verbatim(item) => {...} - // - // _ => { /* some sane fallback */ } - // } - // - // This way we fail your tests but don't break your library when adding - // a variant. You will be notified by a test failure when a variant is - // added, so that you can add code to handle it, but your library will - // continue to compile and work for downstream users in the interim. } } @@ -729,25 +717,13 @@ ast_enum_of_structs! { Macro(ForeignItemMacro), /// Tokens in an `extern` block not interpreted by Syn. + /// + ///
+ /// + /// Important: see [Compatibility notes][crate#verbatim-variants]. + /// + ///
Verbatim(TokenStream), - - // For testing exhaustiveness in downstream code, use the following idiom: - // - // match item { - // #![cfg_attr(test, deny(non_exhaustive_omitted_patterns))] - // - // ForeignItem::Fn(item) => {...} - // ForeignItem::Static(item) => {...} - // ... - // ForeignItem::Verbatim(item) => {...} - // - // _ => { /* some sane fallback */ } - // } - // - // This way we fail your tests but don't break your library when adding - // a variant. You will be notified by a test failure when a variant is - // added, so that you can add code to handle it, but your library will - // continue to compile and work for downstream users in the interim. } } @@ -829,25 +805,13 @@ ast_enum_of_structs! { Macro(TraitItemMacro), /// Tokens within the definition of a trait not interpreted by Syn. + /// + ///
+ /// + /// Important: see [Compatibility notes][crate#verbatim-variants]. + /// + ///
Verbatim(TokenStream), - - // For testing exhaustiveness in downstream code, use the following idiom: - // - // match item { - // #![cfg_attr(test, deny(non_exhaustive_omitted_patterns))] - // - // TraitItem::Const(item) => {...} - // TraitItem::Fn(item) => {...} - // ... - // TraitItem::Verbatim(item) => {...} - // - // _ => { /* some sane fallback */ } - // } - // - // This way we fail your tests but don't break your library when adding - // a variant. You will be notified by a test failure when a variant is - // added, so that you can add code to handle it, but your library will - // continue to compile and work for downstream users in the interim. } } @@ -932,25 +896,13 @@ ast_enum_of_structs! { Macro(ImplItemMacro), /// Tokens within an impl block not interpreted by Syn. + /// + ///
+ /// + /// Important: see [Compatibility notes][crate#verbatim-variants]. + /// + ///
Verbatim(TokenStream), - - // For testing exhaustiveness in downstream code, use the following idiom: - // - // match item { - // #![cfg_attr(test, deny(non_exhaustive_omitted_patterns))] - // - // ImplItem::Const(item) => {...} - // ImplItem::Fn(item) => {...} - // ... - // ImplItem::Verbatim(item) => {...} - // - // _ => { /* some sane fallback */ } - // } - // - // This way we fail your tests but don't break your library when adding - // a variant. You will be notified by a test failure when a variant is - // added, so that you can add code to handle it, but your library will - // continue to compile and work for downstream users in the interim. } } @@ -1298,44 +1250,66 @@ pub(crate) mod parsing { } } } else if lookahead.peek(Token![const]) { - let vis = input.parse()?; + let vis: Visibility = input.parse()?; let const_token: Token![const] = input.parse()?; let lookahead = input.lookahead1(); - let ident = if lookahead.peek(Ident) || lookahead.peek(Token![_]) { - input.call(Ident::parse_any)? + if (lookahead.peek(Ident) && !(input.peek(Token![auto]) && input.peek2(Token![trait]))) + || lookahead.peek(Token![_]) + { + let ident = input.call(Ident::parse_any)?; + let mut generics: Generics = input.parse()?; + let colon_token = input.parse()?; + let ty = input.parse()?; + let value = if let Some(eq_token) = input.parse::>()? { + let expr: Expr = input.parse()?; + Some((eq_token, expr)) + } else { + None + }; + generics.where_clause = input.parse()?; + let semi_token: Token![;] = input.parse()?; + match value { + Some((eq_token, expr)) + if generics.lt_token.is_none() && generics.where_clause.is_none() => + { + Ok(Item::Const(ItemConst { + attrs: Vec::new(), + vis, + modifiers: ConstModifiers { defaultness: None }, + const_token, + ident, + generics, + colon_token, + ty, + eq_token, + expr: Box::new(expr), + semi_token, + })) + } + _ => Ok(Item::Verbatim(verbatim::between(begin, input.cursor()))), + } + } else if lookahead.peek(Token![trait]) + || (lookahead.peek(Token![unsafe]) && !input.peek2(Token![impl])) + || lookahead.peek(Token![auto]) + { + let has_impl_restriction = false; + parse_trait_or_trait_alias(input, Vec::new(), vis, has_impl_restriction)?; + Ok(Item::Verbatim(verbatim::between(begin, input.cursor()))) + } else if lookahead.peek(Token![impl]) || input.peek(Token![unsafe]) { + let defaultness = None; + let unsafety: Option = input.parse()?; + let allow_verbatim_impl = true; + parse_impl( + input, + Vec::new(), + defaultness, + Some(const_token), + unsafety, + allow_verbatim_impl, + )?; + Ok(Item::Verbatim(verbatim::between(begin, input.cursor()))) } else { return Err(lookahead.error()); - }; - let mut generics: Generics = input.parse()?; - let colon_token = input.parse()?; - let ty = input.parse()?; - let value = if let Some(eq_token) = input.parse::>()? { - let expr: Expr = input.parse()?; - Some((eq_token, expr)) - } else { - None - }; - generics.where_clause = input.parse()?; - let semi_token: Token![;] = input.parse()?; - match value { - Some((eq_token, expr)) - if generics.lt_token.is_none() && generics.where_clause.is_none() => - { - Ok(Item::Const(ItemConst { - attrs: Vec::new(), - vis, - modifiers: ConstModifiers { defaultness: None }, - const_token, - ident, - generics, - colon_token, - ty, - eq_token, - expr: Box::new(expr), - semi_token, - })) - } - _ => Ok(Item::Verbatim(verbatim::between(begin, input.cursor()))), } } else if lookahead.peek(Token![unsafe]) { ahead.parse::()?; @@ -1344,9 +1318,19 @@ pub(crate) mod parsing { || lookahead.peek(Token![auto]) && ahead.peek2(Token![trait]) { input.parse().map(Item::Trait) - } else if lookahead.peek(Token![impl]) { + } else if vis.is_inherited() && lookahead.peek(Token![impl]) { + let defaultness: Option = None; + let constness: Option = None; + let unsafety: Token![unsafe] = input.parse()?; let allow_verbatim_impl = true; - if let Some(item) = parse_impl(input, allow_verbatim_impl)? { + if let Some(item) = parse_impl( + input, + Vec::new(), + defaultness, + constness, + Some(unsafety), + allow_verbatim_impl, + )? { Ok(Item::Impl(item)) } else { Ok(Item::Verbatim(verbatim::between(begin, input.cursor()))) @@ -1368,15 +1352,55 @@ pub(crate) mod parsing { input.parse().map(Item::Enum) } else if lookahead.peek(Token![union]) && ahead.peek2(Ident) { input.parse().map(Item::Union) + } else if lookahead.peek(Token![impl]) + && ahead.peek2(token::Paren) + && (ahead.peek3(Token![const]) + || ahead.peek3(Token![unsafe]) + || ahead.peek3(Token![auto]) + || ahead.peek3(Token![trait])) + { + let vis: Visibility = input.parse()?; + input.parse::()?; + let restriction; + parenthesized!(restriction in input); + let lookahead = restriction.lookahead1(); + if lookahead.peek(Token![crate]) + || lookahead.peek(Token![self]) + || lookahead.peek(Token![super]) + { + Ident::parse_any(&restriction)?; + } else if lookahead.peek(Token![in]) { + restriction.parse::()?; + Path::parse_mod_style(&restriction)?; + } else { + return Err(lookahead.error()); + } + input.parse::>()?; + let has_impl_restriction = true; + parse_trait_or_trait_alias(input, Vec::new(), vis, has_impl_restriction)?; + Ok(Item::Verbatim(verbatim::between(begin, input.cursor()))) } else if lookahead.peek(Token![trait]) { - input.call(parse_trait_or_trait_alias) + let vis: Visibility = input.parse()?; + let has_impl_restriction = false; + parse_trait_or_trait_alias(input, Vec::new(), vis, has_impl_restriction) } else if lookahead.peek(Token![auto]) && ahead.peek2(Token![trait]) { input.parse().map(Item::Trait) - } else if lookahead.peek(Token![impl]) - || lookahead.peek(Token![default]) && !ahead.peek2(Token![!]) + } else if vis.is_inherited() + && (ahead.peek(Token![impl]) + || lookahead.peek(Token![default]) && !ahead.peek2(Token![!])) { + let defaultness: Option = input.parse()?; + let constness: Option = input.parse()?; + let unsafety: Option = input.parse()?; let allow_verbatim_impl = true; - if let Some(item) = parse_impl(input, allow_verbatim_impl)? { + if let Some(item) = parse_impl( + input, + Vec::new(), + defaultness, + constness, + unsafety, + allow_verbatim_impl, + )? { Ok(Item::Impl(item)) } else { Ok(Item::Verbatim(verbatim::between(begin, input.cursor()))) @@ -2188,8 +2212,7 @@ pub(crate) mod parsing { })) } } else if lookahead.peek(Token![static]) - || ((ahead.peek(Token![unsafe]) - || token::parsing::peek_keyword(ahead.cursor(), "safe")) + || ((ahead.peek(Token![unsafe]) || ahead.peek(Token![safe])) && ahead.peek2(Token![static])) { let vis = input.parse()?; @@ -2504,15 +2527,25 @@ pub(crate) mod parsing { } } - fn parse_trait_or_trait_alias(input: ParseStream) -> Result { - let (attrs, vis, trait_token, ident, generics) = parse_start_of_trait_alias(input)?; + fn parse_trait_or_trait_alias( + input: ParseStream, + attrs: Vec, + vis: Visibility, + has_impl_restriction: bool, + ) -> Result { + let unsafety: Option = input.parse()?; + let auto_token: Option = input.parse()?; + let trait_token: Token![trait] = input.parse()?; + let ident: Ident = input.parse()?; + let generics: Generics = input.parse()?; let lookahead = input.lookahead1(); - if lookahead.peek(token::Brace) + if has_impl_restriction + || unsafety.is_some() + || auto_token.is_some() + || lookahead.peek(token::Brace) || lookahead.peek(Token![:]) || lookahead.peek(Token![where]) { - let unsafety = None; - let auto_token = None; parse_rest_of_trait( input, attrs, @@ -2613,22 +2646,15 @@ pub(crate) mod parsing { #[cfg_attr(docsrs, doc(cfg(feature = "parsing")))] impl Parse for ItemTraitAlias { fn parse(input: ParseStream) -> Result { - let (attrs, vis, trait_token, ident, generics) = parse_start_of_trait_alias(input)?; + let attrs = input.call(Attribute::parse_outer)?; + let vis: Visibility = input.parse()?; + let trait_token: Token![trait] = input.parse()?; + let ident: Ident = input.parse()?; + let generics: Generics = input.parse()?; parse_rest_of_trait_alias(input, attrs, vis, trait_token, ident, generics) } } - fn parse_start_of_trait_alias( - input: ParseStream, - ) -> Result<(Vec, Visibility, Token![trait], Ident, Generics)> { - let attrs = input.call(Attribute::parse_outer)?; - let vis: Visibility = input.parse()?; - let trait_token: Token![trait] = input.parse()?; - let ident: Ident = input.parse()?; - let generics: Generics = input.parse()?; - Ok((attrs, vis, trait_token, ident, generics)) - } - fn parse_rest_of_trait_alias( input: ParseStream, attrs: Vec, @@ -2646,7 +2672,7 @@ pub(crate) mod parsing { } bounds.push_value({ let allow_precise_capture = false; - let allow_const = false; + let allow_const = true; TypeParamBound::parse_single(input, allow_precise_capture, allow_const)? }); if input.peek(Token![where]) || input.peek(Token![;]) { @@ -2917,16 +2943,32 @@ pub(crate) mod parsing { #[cfg_attr(docsrs, doc(cfg(feature = "parsing")))] impl Parse for ItemImpl { fn parse(input: ParseStream) -> Result { + let attrs = input.call(Attribute::parse_outer)?; + let defaultness: Option = input.parse()?; + let constness: Option = None; + let unsafety: Option = input.parse()?; + let allow_verbatim_impl = false; - parse_impl(input, allow_verbatim_impl).map(Option::unwrap) + parse_impl( + input, + attrs, + defaultness, + constness, + unsafety, + allow_verbatim_impl, + ) + .map(Option::unwrap) } } - fn parse_impl(input: ParseStream, allow_verbatim_impl: bool) -> Result> { - let mut attrs = input.call(Attribute::parse_outer)?; - let has_visibility = allow_verbatim_impl && input.parse::()?.is_some(); - let defaultness: Option = input.parse()?; - let unsafety: Option = input.parse()?; + fn parse_impl( + input: ParseStream, + mut attrs: Vec, + defaultness: Option, + constness: Option, + unsafety: Option, + allow_verbatim_impl: bool, + ) -> Result> { let impl_token: Token![impl] = input.parse()?; let has_generics = generics::parsing::choose_generics_over_qpath(input); @@ -2936,22 +2978,15 @@ pub(crate) mod parsing { Generics::default() }; - let is_const_impl = allow_verbatim_impl - && (input.peek(Token![const]) || input.peek(Token![?]) && input.peek2(Token![const])); - if is_const_impl { - input.parse::>()?; - input.parse::()?; - } - let polarity = if input.peek(Token![!]) && !input.peek2(token::Brace) { Some(input.parse::()?) } else { None }; - #[cfg(not(feature = "printing"))] - let first_ty_span = input.span(); + let first_ty_begin = input.cursor(); let mut first_ty: Type = input.parse()?; + let first_ty_end = input.cursor(); let self_ty: Type; let trait_; @@ -2982,10 +3017,10 @@ pub(crate) mod parsing { unreachable!(); } } else if !allow_verbatim_impl { - #[cfg(feature = "printing")] - return Err(Error::new_spanned(first_ty_ref, "expected trait path")); - #[cfg(not(feature = "printing"))] - return Err(Error::new(first_ty_span, "expected trait path")); + return Err(Error::new_range( + first_ty_begin..first_ty_end, + "expected trait path", + )); } else { trait_ = None; } @@ -3011,7 +3046,7 @@ pub(crate) mod parsing { items.push(content.parse()?); } - if has_visibility || is_const_impl || is_impl_for && trait_.is_none() { + if constness.is_some() || is_impl_for && trait_.is_none() { Ok(None) } else { Ok(Some(ItemImpl { diff --git a/thirdparty/crates/syn-3.0.0/src/lib.rs b/thirdparty/crates/syn-3.0.3/src/lib.rs similarity index 88% rename from thirdparty/crates/syn-3.0.0/src/lib.rs rename to thirdparty/crates/syn-3.0.3/src/lib.rs index 64818e4ad..e711cdfec 100644 --- a/thirdparty/crates/syn-3.0.0/src/lib.rs +++ b/thirdparty/crates/syn-3.0.3/src/lib.rs @@ -262,9 +262,109 @@ //! types. //! - **`proc-macro`** *(enabled by default)* — Runtime dependency on the //! dynamic library libproc_macro from rustc toolchain. +//! +//!
+//! +//! # Compatibility notes +//! +//! Syn is able to accommodate most kinds of Rust grammar changes without a new +//! major release through the following mechanisms. +//! +//! #### Modifiers +//! +//! Syntax tree structs which are expected to grow over the course of future +//! releases of the Rust language, such as [`ItemTrait`], contain a `modifiers` +//! field of one of several "Modifiers" types, in that case [`TraitModifiers`]. +//! +//! All modifiers structs have the following commonalities: +//! +//! - Type name ending with "Modifiers". +//! +//! - Implements [`Default`]. The default value is guaranteed to comprise no +//! tokens. +//! +//! - Non-exhaustive. Can only be instantiated by Syn's parser or by creating +//! and then mutating an empty default value. +//! +//! - Does not implement [`Parse`][parse::Parse]. When parsing, they are parsed +//! by the enclosing syntax tree node. +//! +//! - Does not implement [`ToTokens`][quote::ToTokens]. In some cases the syntax +//! that might be held in modifiers in the future is not necessarily +//! contiguous tokens. +//! +//! - Provides `.require_empty() -> Result<()>` which returns a meaningfully +//! spanned error if the modifiers are different from the empty default. This +//! enables a caller to reject syntax it does not recognize without knowing +//! what that syntax may be. +//! +//! Across major versions, fields may be promoted out of a "Modifiers" struct +//! into the enclosing syntax tree node(s), typically for syntax that has +//! already been incorporated into a stable release of Rust or is deemed +//! sufficiently on track for stabilization. +//! +//! #### Verbatim variants +//! +//! Syntax tree enums which are expected to grow over the course of future +//! releases of the Rust language are declared non-exhaustive and may contain a +//! variant named `Verbatim` that holds [`TokenStream`]. For example +//! [`Expr::Verbatim`]. +//! +//! Unstable language syntax for which a dedicated syntax tree node does not yet +//! exist will get parsed to `Verbatim`, thus allowing unstable syntax to +//! round-trip through parsing and printing of a syntax tree. For example you +//! might parse token input to [`ItemTrait`] (a trait definition) in order to +//! read or modify its method signatures, or insert associated types, or insert +//! default function bodies. All of this would work even if there is some +//! `Expr::Verbatim` syntax somewhere in one of the function bodies in the macro +//! input. +//! +//! Verbatim variants are not intended to be constructed other than by Syn's +//! parser. Do not rely on passing one containing arbitrary tokens through Syn's +//! `ToTokens` implementations or through any other library, as it may panic or +//! otherwise misbehave, such as failing to accurately parenthesize +//! subexpressions to preserve precedence. +//! +//! It is important not to write code that expects Syn's parser to continue to +//! produce `Verbatim` when parsing some particular syntax construct, as that +//! behavior changes across patch releases of Syn. Patch releases can promote +//! something that used to be parsed as `Verbatim` into a new dedicated syntax +//! tree node. Verbatim variants are specifically only for round-tripping code +//! not acted on by the caller. +//! +//! #### Non-exhaustive enums +//! +//! Some enums in the syntax tree are declared #\[non_exhaustive\] and cannot +//! be pattern-matched using an exhaustive match; a default case (`_ => ...`) is +//! required. New variants of these enums will be added over time corresponding +//! to new Rust syntax. +//! +//! For testing the exhaustiveness of a match on such an enum in downstream +//! code, it is recommended to use the following idiom. +//! +//! ``` +//! # use syn::Expr; +//! # +//! # fn example(expr: Expr) { +//! match expr { +//! #![cfg_attr(test, deny(non_exhaustive_omitted_patterns))] +//! +//! Expr::Array(expr) => { /*...*/ } +//! Expr::Assign(expr) => { /*...*/ } +#![cfg_attr(not(doctest), doc = " ...")] +//! Expr::Yield(expr) => { /*...*/ } +//! +//! _ => { /* some sane fallback */ } +//! } +//! # } +//! ``` +//! +//! This way you will be notified by a test failure when a variant is added, so +//! that you can add code to handle it, but your library will continue to +//! compile and work for downstream users in the interim. #![no_std] -#![doc(html_root_url = "https://docs.rs/syn/3.0.0")] +#![doc(html_root_url = "https://docs.rs/syn/3.0.3")] #![cfg_attr(docsrs, feature(doc_cfg), doc(auto_cfg = false))] #![deny(unsafe_op_in_unsafe_fn)] #![allow(non_camel_case_types)] diff --git a/thirdparty/crates/syn-3.0.0/src/lifetime.rs b/thirdparty/crates/syn-3.0.3/src/lifetime.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/lifetime.rs rename to thirdparty/crates/syn-3.0.3/src/lifetime.rs diff --git a/thirdparty/crates/syn-3.0.0/src/lit.rs b/thirdparty/crates/syn-3.0.3/src/lit.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/lit.rs rename to thirdparty/crates/syn-3.0.3/src/lit.rs diff --git a/thirdparty/crates/syn-3.0.0/src/lookahead.rs b/thirdparty/crates/syn-3.0.3/src/lookahead.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/lookahead.rs rename to thirdparty/crates/syn-3.0.3/src/lookahead.rs diff --git a/thirdparty/crates/syn-3.0.0/src/mac.rs b/thirdparty/crates/syn-3.0.3/src/mac.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/mac.rs rename to thirdparty/crates/syn-3.0.3/src/mac.rs diff --git a/thirdparty/crates/syn-3.0.0/src/macros.rs b/thirdparty/crates/syn-3.0.3/src/macros.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/macros.rs rename to thirdparty/crates/syn-3.0.3/src/macros.rs diff --git a/thirdparty/crates/syn-3.0.0/src/meta.rs b/thirdparty/crates/syn-3.0.3/src/meta.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/meta.rs rename to thirdparty/crates/syn-3.0.3/src/meta.rs diff --git a/thirdparty/crates/syn-3.0.0/src/op.rs b/thirdparty/crates/syn-3.0.3/src/op.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/op.rs rename to thirdparty/crates/syn-3.0.3/src/op.rs diff --git a/thirdparty/crates/syn-3.0.0/src/parse.rs b/thirdparty/crates/syn-3.0.3/src/parse.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/parse.rs rename to thirdparty/crates/syn-3.0.3/src/parse.rs diff --git a/thirdparty/crates/syn-3.0.0/src/parse_macro_input.rs b/thirdparty/crates/syn-3.0.3/src/parse_macro_input.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/parse_macro_input.rs rename to thirdparty/crates/syn-3.0.3/src/parse_macro_input.rs diff --git a/thirdparty/crates/syn-3.0.0/src/parse_quote.rs b/thirdparty/crates/syn-3.0.3/src/parse_quote.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/parse_quote.rs rename to thirdparty/crates/syn-3.0.3/src/parse_quote.rs diff --git a/thirdparty/crates/syn-3.0.0/src/pat.rs b/thirdparty/crates/syn-3.0.3/src/pat.rs similarity index 97% rename from thirdparty/crates/syn-3.0.0/src/pat.rs rename to thirdparty/crates/syn-3.0.3/src/pat.rs index 7acdca9ef..a190614d8 100644 --- a/thirdparty/crates/syn-3.0.0/src/pat.rs +++ b/thirdparty/crates/syn-3.0.3/src/pat.rs @@ -81,28 +81,16 @@ ast_enum_of_structs! { Type(PatType), /// Tokens in pattern position not interpreted by Syn. + /// + ///
+ /// + /// Important: see [Compatibility notes][crate#verbatim-variants]. + /// + ///
Verbatim(TokenStream), /// A pattern that matches any value: `_`. Wild(PatWild), - - // For testing exhaustiveness in downstream code, use the following idiom: - // - // match pat { - // #![cfg_attr(test, deny(non_exhaustive_omitted_patterns))] - // - // Pat::Box(pat) => {...} - // Pat::Ident(pat) => {...} - // ... - // Pat::Wild(pat) => {...} - // - // _ => { /* some sane fallback */ } - // } - // - // This way we fail your tests but don't break your library when adding - // a variant. You will be notified by a test failure when a variant is - // added, so that you can add code to handle it, but your library will - // continue to compile and work for downstream users in the interim. } } diff --git a/thirdparty/crates/syn-3.0.0/src/path.rs b/thirdparty/crates/syn-3.0.3/src/path.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/path.rs rename to thirdparty/crates/syn-3.0.3/src/path.rs diff --git a/thirdparty/crates/syn-3.0.0/src/precedence.rs b/thirdparty/crates/syn-3.0.3/src/precedence.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/precedence.rs rename to thirdparty/crates/syn-3.0.3/src/precedence.rs diff --git a/thirdparty/crates/syn-3.0.0/src/print.rs b/thirdparty/crates/syn-3.0.3/src/print.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/print.rs rename to thirdparty/crates/syn-3.0.3/src/print.rs diff --git a/thirdparty/crates/syn-3.0.0/src/punctuated.rs b/thirdparty/crates/syn-3.0.3/src/punctuated.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/punctuated.rs rename to thirdparty/crates/syn-3.0.3/src/punctuated.rs diff --git a/thirdparty/crates/syn-3.0.0/src/restriction.rs b/thirdparty/crates/syn-3.0.3/src/restriction.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/restriction.rs rename to thirdparty/crates/syn-3.0.3/src/restriction.rs diff --git a/thirdparty/crates/syn-3.0.0/src/scan_expr.rs b/thirdparty/crates/syn-3.0.3/src/scan_expr.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/scan_expr.rs rename to thirdparty/crates/syn-3.0.3/src/scan_expr.rs diff --git a/thirdparty/crates/syn-3.0.0/src/sealed.rs b/thirdparty/crates/syn-3.0.3/src/sealed.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/sealed.rs rename to thirdparty/crates/syn-3.0.3/src/sealed.rs diff --git a/thirdparty/crates/syn-3.0.0/src/span.rs b/thirdparty/crates/syn-3.0.3/src/span.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/span.rs rename to thirdparty/crates/syn-3.0.3/src/span.rs diff --git a/thirdparty/crates/syn-3.0.0/src/spanned.rs b/thirdparty/crates/syn-3.0.3/src/spanned.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/spanned.rs rename to thirdparty/crates/syn-3.0.3/src/spanned.rs diff --git a/thirdparty/crates/syn-3.0.0/src/stmt.rs b/thirdparty/crates/syn-3.0.3/src/stmt.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/stmt.rs rename to thirdparty/crates/syn-3.0.3/src/stmt.rs diff --git a/thirdparty/crates/syn-3.0.0/src/thread.rs b/thirdparty/crates/syn-3.0.3/src/thread.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/thread.rs rename to thirdparty/crates/syn-3.0.3/src/thread.rs diff --git a/thirdparty/crates/syn-3.0.0/src/token.rs b/thirdparty/crates/syn-3.0.3/src/token.rs similarity index 99% rename from thirdparty/crates/syn-3.0.0/src/token.rs rename to thirdparty/crates/syn-3.0.3/src/token.rs index e1eb3f8b1..20e3b99f1 100644 --- a/thirdparty/crates/syn-3.0.0/src/token.rs +++ b/thirdparty/crates/syn-3.0.3/src/token.rs @@ -291,7 +291,7 @@ macro_rules! define_keywords { #[cfg(feature = "parsing")] impl Token for $name { fn peek(cursor: Cursor) -> bool { - parsing::peek_keyword(cursor, $token) + cursor.peek_keyword($token) } fn display() -> &'static str { @@ -435,7 +435,7 @@ macro_rules! define_punctuation { #[cfg(feature = "parsing")] impl Token for $name { fn peek(cursor: Cursor) -> bool { - parsing::peek_punct(cursor, $token) + cursor.peek_punct($token) } fn display() -> &'static str { @@ -1009,14 +1009,6 @@ pub(crate) mod parsing { }) } - pub(crate) fn peek_keyword(cursor: Cursor, token: &str) -> bool { - if let Some((ident, _rest)) = cursor.ident() { - ident == token - } else { - false - } - } - #[doc(hidden)] pub fn punct(input: ParseStream, token: &str) -> Result<[Span; N]> { let mut spans = [input.span(); N]; diff --git a/thirdparty/crates/syn-3.0.0/src/tt.rs b/thirdparty/crates/syn-3.0.3/src/tt.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/tt.rs rename to thirdparty/crates/syn-3.0.3/src/tt.rs diff --git a/thirdparty/crates/syn-3.0.0/src/ty.rs b/thirdparty/crates/syn-3.0.3/src/ty.rs similarity index 94% rename from thirdparty/crates/syn-3.0.0/src/ty.rs rename to thirdparty/crates/syn-3.0.3/src/ty.rs index 13e023824..c68296f42 100644 --- a/thirdparty/crates/syn-3.0.0/src/ty.rs +++ b/thirdparty/crates/syn-3.0.3/src/ty.rs @@ -69,25 +69,13 @@ ast_enum_of_structs! { Tuple(TypeTuple), /// Tokens in type position not interpreted by Syn. + /// + ///
+ /// + /// Important: see [Compatibility notes][crate#verbatim-variants]. + /// + ///
Verbatim(TokenStream), - - // For testing exhaustiveness in downstream code, use the following idiom: - // - // match ty { - // #![cfg_attr(test, deny(non_exhaustive_omitted_patterns))] - // - // Type::Array(ty) => {...} - // Type::FnPtr(ty) => {...} - // ... - // Type::Verbatim(ty) => {...} - // - // _ => { /* some sane fallback */ } - // } - // - // This way we fail your tests but don't break your library when adding - // a variant. You will be notified by a test failure when a variant is - // added, so that you can add code to handle it, but your library will - // continue to compile and work for downstream users in the interim. } } @@ -309,7 +297,8 @@ ast_enum! { #[cfg(feature = "parsing")] pub(crate) mod parsing { use crate::attr::Attribute; - use crate::error::{self, Result}; + use crate::buffer::Cursor; + use crate::error::{Error, Result}; use crate::ext::IdentExt as _; use crate::generics::{BoundLifetimes, TraitBound, TraitBoundModifiers, TypeParamBound}; use crate::ident::Ident; @@ -328,7 +317,7 @@ pub(crate) mod parsing { use crate::verbatim; use alloc::boxed::Box; use alloc::vec::Vec; - use proc_macro2::{Span, TokenStream}; + use proc_macro2::TokenStream; #[cfg_attr(docsrs, doc(cfg(feature = "parsing")))] impl Parse for Type { @@ -547,15 +536,28 @@ pub(crate) mod parsing { paren_token, elem: Box::new(first), })) + } else if lookahead.peek(Token![unsafe]) && input.peek2(Token![<]) { + input.parse::()?; + input.parse::()?; + while !input.peek(Token![>]) { + Lifetime::parse_any(input)?; + if input.peek(Token![>]) { + break; + } + input.parse::()?; + } + input.parse::]>()?; + ambig_ty(input, allow_plus, allow_group_generic)?; + Ok(Type::Verbatim(verbatim::between(begin, input.cursor()))) } else if lookahead.peek(Token![fn]) - || lookahead.peek(Token![unsafe]) + || input.peek(Token![unsafe]) || lookahead.peek(Token![extern]) { let mut fn_ptr: TypeFnPtr = input.parse()?; fn_ptr.lifetimes = lifetimes; Ok(Type::FnPtr(fn_ptr)) } else if cfg!(feature = "full") - && token::parsing::peek_keyword(input.cursor(), "builtin") + && input.cursor().peek_keyword("builtin") && input.peek2(Token![#]) { token::parsing::keyword(input, "builtin")?; @@ -628,10 +630,10 @@ pub(crate) mod parsing { Ok(Type::Path(ty)) } else if lookahead.peek(Token![dyn]) { + let dyn_begin = input.cursor(); let dyn_token: Token![dyn] = input.parse()?; - let dyn_span = dyn_token.span; let star_token: Option = input.parse()?; - let bounds = TypeTraitObject::parse_bounds(dyn_span, input, allow_plus)?; + let bounds = TypeTraitObject::parse_bounds(dyn_begin, input, allow_plus)?; Ok(if star_token.is_some() { Type::Verbatim(verbatim::between(begin, input.cursor())) } else { @@ -899,12 +901,9 @@ pub(crate) mod parsing { // Only allow multiple trait references if allow_plus is true. pub(crate) fn parse(input: ParseStream, allow_plus: bool) -> Result { + let dyn_begin = input.cursor(); let dyn_token: Option = input.parse()?; - let dyn_span = match &dyn_token { - Some(token) => token.span, - None => input.span(), - }; - let bounds = Self::parse_bounds(dyn_span, input, allow_plus)?; + let bounds = Self::parse_bounds(dyn_begin, input, allow_plus)?; Ok(TypeTraitObject { attrs: Vec::new(), dyn_token, @@ -913,7 +912,7 @@ pub(crate) mod parsing { } fn parse_bounds( - dyn_span: Span, + dyn_begin: Cursor, input: ParseStream, allow_plus: bool, ) -> Result> { @@ -925,7 +924,6 @@ pub(crate) mod parsing { allow_precise_capture, allow_const, )?; - let mut last_lifetime_span = None; let mut at_least_one_trait = false; for bound in &bounds { match bound { @@ -933,9 +931,7 @@ pub(crate) mod parsing { at_least_one_trait = true; break; } - TypeParamBound::Lifetime(lifetime) => { - last_lifetime_span = Some(lifetime.ident.span()); - } + TypeParamBound::Lifetime(_) => {} TypeParamBound::PreciseCapture(_) | TypeParamBound::Verbatim(_) => { unreachable!() } @@ -944,7 +940,7 @@ pub(crate) mod parsing { // Just lifetimes like `'a + 'b` is not a TraitObject. if !at_least_one_trait { let msg = "at least one trait is required for an object type"; - return Err(error::new2(dyn_span, last_lifetime_span.unwrap(), msg)); + return Err(Error::new_range(dyn_begin..input.cursor(), msg)); } Ok(bounds) } @@ -966,6 +962,7 @@ pub(crate) mod parsing { } pub(crate) fn parse(input: ParseStream, allow_plus: bool) -> Result { + let impl_begin = input.cursor(); let impl_token: Token![impl] = input.parse()?; let allow_precise_capture = true; let allow_const = true; @@ -975,7 +972,6 @@ pub(crate) mod parsing { allow_precise_capture, allow_const, )?; - let mut last_nontrait_span = None; let mut at_least_one_trait = false; for bound in &bounds { match bound { @@ -983,20 +979,7 @@ pub(crate) mod parsing { at_least_one_trait = true; break; } - TypeParamBound::Lifetime(lifetime) => { - last_nontrait_span = Some(lifetime.ident.span()); - } - TypeParamBound::PreciseCapture(precise_capture) => { - #[cfg(feature = "full")] - { - last_nontrait_span = Some(precise_capture.gt_token.span); - } - #[cfg(not(feature = "full"))] - { - _ = precise_capture; - unreachable!(); - } - } + TypeParamBound::Lifetime(_) | TypeParamBound::PreciseCapture(_) => {} TypeParamBound::Verbatim(_) => { // `[const] Trait` at_least_one_trait = true; @@ -1006,11 +989,7 @@ pub(crate) mod parsing { } if !at_least_one_trait { let msg = "at least one trait must be specified"; - return Err(error::new2( - impl_token.span, - last_nontrait_span.unwrap(), - msg, - )); + return Err(Error::new_range(impl_begin..input.cursor(), msg)); } Ok(TypeImplTrait { attrs: Vec::new(), diff --git a/thirdparty/crates/syn-3.0.0/src/verbatim.rs b/thirdparty/crates/syn-3.0.3/src/verbatim.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/verbatim.rs rename to thirdparty/crates/syn-3.0.3/src/verbatim.rs diff --git a/thirdparty/crates/syn-3.0.0/src/whitespace.rs b/thirdparty/crates/syn-3.0.3/src/whitespace.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/src/whitespace.rs rename to thirdparty/crates/syn-3.0.3/src/whitespace.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/common/eq.rs b/thirdparty/crates/syn-3.0.3/tests/common/eq.rs similarity index 99% rename from thirdparty/crates/syn-3.0.0/tests/common/eq.rs rename to thirdparty/crates/syn-3.0.3/tests/common/eq.rs index ceb3f96ca..bd033efee 100644 --- a/thirdparty/crates/syn-3.0.0/tests/common/eq.rs +++ b/thirdparty/crates/syn-3.0.3/tests/common/eq.rs @@ -492,7 +492,7 @@ spanless_eq_struct!(AngleBracketedArgs; span args); spanless_eq_struct!(AnonConst; id value); spanless_eq_struct!(Arm; attrs pat guard body span id is_placeholder); spanless_eq_struct!(AssocItemConstraint; id ident gen_args kind span); -spanless_eq_struct!(AttrItem; unsafety path args); +spanless_eq_struct!(AttrItem; unsafety path args span); spanless_eq_struct!(AttrTokenStream; 0); spanless_eq_struct!(Attribute; kind id style span); spanless_eq_struct!(AttrsTarget; attrs tokens); diff --git a/thirdparty/crates/syn-3.0.0/tests/common/mod.rs b/thirdparty/crates/syn-3.0.3/tests/common/mod.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/common/mod.rs rename to thirdparty/crates/syn-3.0.3/tests/common/mod.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/common/parse.rs b/thirdparty/crates/syn-3.0.3/tests/common/parse.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/common/parse.rs rename to thirdparty/crates/syn-3.0.3/tests/common/parse.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/common/visit.rs b/thirdparty/crates/syn-3.0.3/tests/common/visit.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/common/visit.rs rename to thirdparty/crates/syn-3.0.3/tests/common/visit.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/debug/gen.rs b/thirdparty/crates/syn-3.0.3/tests/debug/gen.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/debug/gen.rs rename to thirdparty/crates/syn-3.0.3/tests/debug/gen.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/debug/mod.rs b/thirdparty/crates/syn-3.0.3/tests/debug/mod.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/debug/mod.rs rename to thirdparty/crates/syn-3.0.3/tests/debug/mod.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/macros/mod.rs b/thirdparty/crates/syn-3.0.3/tests/macros/mod.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/macros/mod.rs rename to thirdparty/crates/syn-3.0.3/tests/macros/mod.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/regression.rs b/thirdparty/crates/syn-3.0.3/tests/regression.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/regression.rs rename to thirdparty/crates/syn-3.0.3/tests/regression.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/regression/issue1108.rs b/thirdparty/crates/syn-3.0.3/tests/regression/issue1108.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/regression/issue1108.rs rename to thirdparty/crates/syn-3.0.3/tests/regression/issue1108.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/regression/issue1235.rs b/thirdparty/crates/syn-3.0.3/tests/regression/issue1235.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/regression/issue1235.rs rename to thirdparty/crates/syn-3.0.3/tests/regression/issue1235.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/repo/mod.rs b/thirdparty/crates/syn-3.0.3/tests/repo/mod.rs similarity index 77% rename from thirdparty/crates/syn-3.0.0/tests/repo/mod.rs rename to thirdparty/crates/syn-3.0.3/tests/repo/mod.rs index a0f275521..d4362a575 100644 --- a/thirdparty/crates/syn-3.0.0/tests/repo/mod.rs +++ b/thirdparty/crates/syn-3.0.3/tests/repo/mod.rs @@ -20,202 +20,6 @@ const REVISION: &str = "b6839f4d0e2bd63b960bbff8619c6fdea27d81e5"; #[rustfmt::skip] static EXCLUDE_FILES: &[&str] = &[ - // TODO: const traits: `pub const trait Trait {}` - // https://github.com/dtolnay/syn/issues/1887 - "library/core/src/alloc/mod.rs", - "library/core/src/borrow.rs", - "library/core/src/clone.rs", - "library/core/src/cmp.rs", - "library/core/src/cmp/bytewise.rs", - "library/core/src/convert/mod.rs", - "library/core/src/default.rs", - "library/core/src/intrinsics/fallback.rs", - "library/core/src/iter/range.rs", - "library/core/src/iter/traits/accum.rs", - "library/core/src/iter/traits/collect.rs", - "library/core/src/iter/traits/double_ended.rs", - "library/core/src/iter/traits/iterator.rs", - "library/core/src/iter/traits/marker.rs", - "library/core/src/ops/arith.rs", - "library/core/src/ops/bit.rs", - "library/core/src/ops/deref.rs", - "library/core/src/ops/drop.rs", - "library/core/src/ops/function.rs", - "library/core/src/ops/index.rs", - "library/core/src/ops/range.rs", - "library/core/src/ops/try_trait.rs", - "library/core/src/pat.rs", - "library/core/src/slice/mod.rs", - "library/stdarch/crates/core_arch/src/loongarch64/simd.rs", - "src/tools/clippy/tests/ui/assign_ops.rs", - "src/tools/clippy/tests/ui/missing_const_for_fn/const_trait.rs", - "src/tools/clippy/tests/ui/trait_duplication_in_bounds.rs", - "src/tools/rust-analyzer/crates/test-utils/src/minicore.rs", - "src/tools/rustfmt/tests/target/const_trait.rs", - "tests/rustdoc-html/constant/const-effect-param.rs", - "tests/rustdoc-html/constant/const-trait-and-impl-methods.rs", - "tests/rustdoc-html/constant/rfc-2632-const-trait-impl.rs", - "tests/rustdoc-html/inline_cross/auxiliary/const-effect-param.rs", - "tests/rustdoc-json/attrs/stability/const_traits.rs", - "tests/ui/comptime/comptime_method_bounds.rs", - "tests/ui/const-generics/const_trait_fn-issue-88433.rs", - "tests/ui/const-generics/issues/issue-88119.rs", - "tests/ui/consts/const-closure-in-trait-impl.rs", - "tests/ui/consts/trait_alias_method_call.rs", - "tests/ui/generic-const-items/const-trait-impl.rs", - "tests/ui/parser/impls-nested-within-fns-semantic-1.rs", - "tests/ui/structs/default-field-values/support.rs", - "tests/ui/traits/const-traits/assoc-type-const-bound-usage-0.rs", - "tests/ui/traits/const-traits/assoc-type-const-bound-usage-1.rs", - "tests/ui/traits/const-traits/auxiliary/associated-const-stability.rs", - "tests/ui/traits/const-traits/auxiliary/cross-crate.rs", - "tests/ui/traits/const-traits/auxiliary/minicore.rs", - "tests/ui/traits/const-traits/auxiliary/staged-api.rs", - "tests/ui/traits/const-traits/call-generic-in-impl.rs", - "tests/ui/traits/const-traits/conditionally-const-assoc-fn-in-trait-impl.rs", - "tests/ui/traits/const-traits/conditionally-const-inherent-assoc-const-fn.rs", - "tests/ui/traits/const-traits/conditionally-const-trait-bound-assoc-tys.rs", - "tests/ui/traits/const-traits/const-assoc-bound-in-trait-wc.rs", - "tests/ui/traits/const-traits/const-bound-in-host.rs", - "tests/ui/traits/const-traits/const-closure-inherited-const-condition.rs", - "tests/ui/traits/const-traits/const-closure-trait-method.rs", - "tests/ui/traits/const-traits/const-cond-for-rpitit.rs", - "tests/ui/traits/const-traits/const-impl-inherent-bounds.rs", - "tests/ui/traits/const-traits/const-impl-recovery.rs", - "tests/ui/traits/const-traits/const-impl-trait-not-impl-const-trait.rs", - "tests/ui/traits/const-traits/const-impl-trait.rs", - "tests/ui/traits/const-traits/const-in-closure.rs", - "tests/ui/traits/const-traits/const-via-item-bound.rs", - "tests/ui/traits/const-traits/default-method-body-is-const-with-staged-api.rs", - "tests/ui/traits/const-traits/do-not-const-check-override.rs", - "tests/ui/traits/const-traits/do-not-const-check.rs", - "tests/ui/traits/const-traits/dont-ice-on-const-pred-for-bounds.rs", - "tests/ui/traits/const-traits/dont-observe-host.rs", - "tests/ui/traits/const-traits/dont-prefer-param-env-for-infer-self-ty.rs", - "tests/ui/traits/const-traits/effect-param-infer.rs", - "tests/ui/traits/const-traits/function-pointer-does-not-require-const.rs", - "tests/ui/traits/const-traits/hir-const-check.rs", - "tests/ui/traits/const-traits/impl-with-default-fn-pass.rs", - "tests/ui/traits/const-traits/imply-always-const.rs", - "tests/ui/traits/const-traits/inherent-impl-const-bounds.rs", - "tests/ui/traits/const-traits/issue-100222.rs", - "tests/ui/traits/const-traits/issue-92230-wf-super-trait-env.rs", - "tests/ui/traits/const-traits/item-bound-entailment.rs", - "tests/ui/traits/const-traits/non-const-op-in-closure-in-const.rs", - "tests/ui/traits/const-traits/parse-const-unsafe-trait.rs", - "tests/ui/traits/const-traits/predicate-entailment-passes.rs", - "tests/ui/traits/const-traits/project.rs", - "tests/ui/traits/const-traits/specialization/const-default-const-specialized.rs", - "tests/ui/traits/const-traits/specialization/default-keyword.rs", - "tests/ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs", - "tests/ui/traits/const-traits/specialization/non-const-default-const-specialized.rs", - "tests/ui/traits/const-traits/specialization/pass.rs", - "tests/ui/traits/const-traits/specialization/specialize-on-conditionally-const.rs", - "tests/ui/traits/const-traits/super-traits.rs", - "tests/ui/traits/const-traits/trait-where-clause-run.rs", - "tests/ui/traits/const-traits/trait-where-clause-self-referential.rs", - "tests/ui/traits/const-traits/unconstrained-var-specialization.rs", - "tests/ui/traits/next-solver/canonical/effect-var.rs", - - // TODO: const impls: `const impl Trait for T {}` - // https://github.com/dtolnay/syn/issues/1980 - "compiler/rustc_data_structures/src/unord.rs", - "compiler/rustc_middle/src/middle/codegen_fn_attrs.rs", - "library/alloc/src/alloc.rs", - "library/alloc/src/collections/btree/map.rs", - "library/alloc/src/collections/mod.rs", - "library/alloc/src/raw_vec/mod.rs", - "library/alloc/src/string.rs", - "library/alloc/src/vec/mod.rs", - "library/core/src/any.rs", - "library/core/src/array/drain.rs", - "library/core/src/array/equality.rs", - "library/core/src/array/mod.rs", - "library/core/src/bstr/mod.rs", - "library/core/src/cell.rs", - "library/core/src/cell/lazy.rs", - "library/core/src/cell/once.rs", - "library/core/src/char/convert.rs", - "library/core/src/ffi/c_str.rs", - "library/core/src/ffi/va_list.rs", - "library/core/src/hash/mod.rs", - "library/core/src/hash/sip.rs", - "library/core/src/iter/adapters/cycle.rs", - "library/core/src/iter/adapters/flatten.rs", - "library/core/src/iter/sources/empty.rs", - "library/core/src/marker.rs", - "library/core/src/mem/alignment.rs", - "library/core/src/mem/drop_guard.rs", - "library/core/src/mem/manually_drop.rs", - "library/core/src/net/ip_addr.rs", - "library/core/src/net/socket_addr.rs", - "library/core/src/num/error.rs", - "library/core/src/num/niche_types.rs", - "library/core/src/ops/control_flow.rs", - "library/core/src/option.rs", - "library/core/src/panic/unwind_safe.rs", - "library/core/src/pin.rs", - "library/core/src/pin/unsafe_pinned.rs", - "library/core/src/ptr/non_null.rs", - "library/core/src/ptr/unique.rs", - "library/core/src/range.rs", - "library/core/src/result.rs", - "library/core/src/slice/cmp.rs", - "library/core/src/slice/index.rs", - "library/core/src/str/mod.rs", - "library/core/src/str/traits.rs", - "library/core/src/sync/sync_view.rs", - "library/core/src/task/poll.rs", - "library/core/src/task/wake.rs", - "library/core/src/time.rs", - "library/coretests/tests/array.rs", - "library/coretests/tests/cmp.rs", - "library/coretests/tests/hint.rs", - "library/coretests/tests/manually_drop.rs", - "library/std/src/collections/hash/map.rs", - "library/std/src/collections/hash/set.rs", - "library/std/src/ffi/os_str.rs", - "library/std/src/hash/random.rs", - "library/std/src/path.rs", - "library/std/src/sync/lazy_lock.rs", - "library/std/src/sync/once_lock.rs", - "library/stdarch/crates/core_arch/src/simd.rs", - "src/tools/clippy/tests/ui/derivable_impls.rs", - "src/tools/clippy/tests/ui/derivable_impls_derive_const.rs", - "src/tools/clippy/tests/ui/equatable_if_let_const_cmp.rs", - "src/tools/rustfmt/tests/source/impls.rs", - "src/tools/rustfmt/tests/target/impls.rs", - "tests/ui/consts/const-try.rs", - "tests/ui/traits/const-traits/call-const-trait-method-pass.rs", - "tests/ui/traits/const-traits/call-generic-method-chain.rs", - "tests/ui/traits/const-traits/call-generic-method-dup-bound.rs", - "tests/ui/traits/const-traits/call-generic-method-pass.rs", - "tests/ui/traits/const-traits/const-drop.rs", - "tests/ui/traits/const-traits/const-impl-inherent.rs", - "tests/ui/traits/const-traits/const-unsafe-impl.rs", - "tests/ui/traits/const-traits/const_derives/derive-const-use.rs", - "tests/ui/traits/const-traits/drop-manually-drop.rs", - "tests/ui/traits/const-traits/enforce-deref-on-adjust.rs", - "tests/ui/traits/const-traits/generic-bound.rs", - "tests/ui/traits/const-traits/inherent-impl.rs", - "tests/ui/traits/const-traits/minicore-works.rs", - "tests/ui/traits/const-traits/rustc-impl-const-stability.rs", - "tests/ui/traits/const-traits/trait-default-body-stability.rs", - - // TODO: unsafe binders: `unsafe<'a> &'a T` - // https://github.com/dtolnay/syn/issues/1791 - "src/tools/rustfmt/tests/source/unsafe-binders.rs", - "src/tools/rustfmt/tests/target/unsafe-binders.rs", - "tests/debuginfo/unsafe-binders.rs", - "tests/mir-opt/gvn_on_unsafe_binder.rs", - "tests/rustdoc-html/auxiliary/unsafe-binder-dep.rs", - "tests/rustdoc-html/unsafe-binder.rs", - "tests/ui/unsafe-binders/binder-sized-crit.rs", - "tests/ui/unsafe-binders/cat-projection.rs", - "tests/ui/unsafe-binders/expr.rs", - "tests/ui/unsafe-binders/simple.rs", - "tests/ui/unsafe-binders/unsafe-binders-debuginfo.rs", - // TODO: unsafe fields: `struct S { unsafe field: T }` // https://github.com/dtolnay/syn/issues/1792 "src/tools/clippy/tests/ui/derive.rs", @@ -223,6 +27,7 @@ static EXCLUDE_FILES: &[&str] = &[ "src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/record_field_list.rs", "src/tools/rustfmt/tests/source/unsafe-field.rs", "src/tools/rustfmt/tests/target/unsafe-field.rs", + "tests/ui/unsafe-binders/unsafe-binders-debuginfo.rs", "tests/ui/unsafe-fields/auxiliary/unsafe-fields-crate-dep.rs", // TODO: guard patterns: `match expr { (A if f()) | (B if g()) => {} }` @@ -235,45 +40,13 @@ static EXCLUDE_FILES: &[&str] = &[ // TODO: final associated functions: `final fn` // https://github.com/dtolnay/syn/issues/1981 + "library/core/src/clone.rs", "library/core/src/io/size_hint.rs", "src/tools/rustfmt/tests/target/final-kw.rs", "tests/rustdoc-html/final-trait-method.rs", "tests/ui/traits/final/dyn-compat.rs", "tests/ui/traits/final/works.rs", - // TODO: impl restrictions: `pub impl(self) trait Trait` - // https://github.com/dtolnay/syn/issues/1982 - "library/core/src/convert/num.rs", - "library/core/src/num/nonzero.rs", - "library/core/src/num/traits.rs", - "library/core/src/sync/atomic.rs", - "library/std/src/io/stdio.rs", - "library/std/src/os/darwin/fs.rs", - "library/std/src/os/freebsd/net.rs", - "library/std/src/os/illumos/net.rs", - "library/std/src/os/linux/process.rs", - "library/std/src/os/motor/ffi.rs", - "library/std/src/os/motor/process.rs", - "library/std/src/os/net/linux_ext/addr.rs", - "library/std/src/os/net/linux_ext/socket.rs", - "library/std/src/os/net/linux_ext/tcp.rs", - "library/std/src/os/netbsd/net.rs", - "library/std/src/os/solaris/net.rs", - "library/std/src/os/unix/ffi/os_str.rs", - "library/std/src/os/unix/fs.rs", - "library/std/src/os/unix/io/mod.rs", - "library/std/src/os/unix/process.rs", - "library/std/src/os/windows/ffi.rs", - "library/std/src/os/windows/fs.rs", - "library/std/src/os/windows/process.rs", - "src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/impl_restrictions.rs", - "src/tools/rustfmt/tests/source/impl-restriction.rs", - "src/tools/rustfmt/tests/target/impl-restriction.rs", - "tests/pretty/hir-impl-restriction.rs", - "tests/rustdoc-html/impl/impl-restriction-document-private.rs", - "tests/rustdoc-html/impl/impl-restriction.rs", - "tests/ui/impl-restriction/auxiliary/external-impl-restriction.rs", - // TODO: return type notation: `where T: Trait` and `where T::method(..): Send` // https://github.com/dtolnay/syn/issues/1434 "src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/return_type_syntax_in_path.rs", @@ -665,6 +438,10 @@ static EXCLUDE_FILES: &[&str] = &[ "src/tools/rustfmt/tests/target/negative-bounds.rs", "tests/ui/traits/negative-bounds/supertrait.rs", + // Outdated const impl syntax: `impl const Trait for Type` + "src/tools/rust-analyzer/crates/parser/test_data/parser/inline/ok/impl_item_const.rs", + "src/tools/rust-analyzer/crates/test-utils/src/minicore.rs", + // Const impl that is not a trait impl: `impl ~const T {}` "tests/ui/traits/const-traits/syntax.rs", @@ -810,9 +587,12 @@ static EXCLUDE_FILES: &[&str] = &[ "src/tools/rustfmt/tests/source/configs/disable_all_formatting/true.rs", "src/tools/rustfmt/tests/source/configs/spaces_around_ranges/false.rs", "src/tools/rustfmt/tests/source/configs/spaces_around_ranges/true.rs", + "src/tools/rustfmt/tests/source/impls.rs", "src/tools/rustfmt/tests/source/type.rs", "src/tools/rustfmt/tests/target/configs/spaces_around_ranges/false.rs", "src/tools/rustfmt/tests/target/configs/spaces_around_ranges/true.rs", + "src/tools/rustfmt/tests/target/impl.rs", + "src/tools/rustfmt/tests/target/impls.rs", "src/tools/rustfmt/tests/target/type.rs", "src/tools/rustfmt/tests/target/unsafe_extern_blocks.rs", "tests/ui/generics/issue-94432-garbage-ice.rs", diff --git a/thirdparty/crates/syn-3.0.0/tests/repo/progress.rs b/thirdparty/crates/syn-3.0.3/tests/repo/progress.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/repo/progress.rs rename to thirdparty/crates/syn-3.0.3/tests/repo/progress.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/snapshot/mod.rs b/thirdparty/crates/syn-3.0.3/tests/snapshot/mod.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/snapshot/mod.rs rename to thirdparty/crates/syn-3.0.3/tests/snapshot/mod.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_attribute.rs b/thirdparty/crates/syn-3.0.3/tests/test_attribute.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_attribute.rs rename to thirdparty/crates/syn-3.0.3/tests/test_attribute.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_derive_input.rs b/thirdparty/crates/syn-3.0.3/tests/test_derive_input.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_derive_input.rs rename to thirdparty/crates/syn-3.0.3/tests/test_derive_input.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_expr.rs b/thirdparty/crates/syn-3.0.3/tests/test_expr.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_expr.rs rename to thirdparty/crates/syn-3.0.3/tests/test_expr.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_generics.rs b/thirdparty/crates/syn-3.0.3/tests/test_generics.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_generics.rs rename to thirdparty/crates/syn-3.0.3/tests/test_generics.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_grouping.rs b/thirdparty/crates/syn-3.0.3/tests/test_grouping.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_grouping.rs rename to thirdparty/crates/syn-3.0.3/tests/test_grouping.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_ident.rs b/thirdparty/crates/syn-3.0.3/tests/test_ident.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_ident.rs rename to thirdparty/crates/syn-3.0.3/tests/test_ident.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_item.rs b/thirdparty/crates/syn-3.0.3/tests/test_item.rs similarity index 98% rename from thirdparty/crates/syn-3.0.0/tests/test_item.rs rename to thirdparty/crates/syn-3.0.3/tests/test_item.rs index 5e79f3b10..a60f3fd5a 100644 --- a/thirdparty/crates/syn-3.0.0/tests/test_item.rs +++ b/thirdparty/crates/syn-3.0.3/tests/test_item.rs @@ -256,15 +256,6 @@ fn test_type_empty_bounds() { "#); } -#[test] -fn test_impl_visibility() { - let tokens = quote! { - pub default unsafe impl union {} - }; - - snapshot!(tokens as Item, @"Item::Verbatim(`pub default unsafe impl union { }`)"); -} - #[test] fn test_impl_type_parameter_defaults() { #[cfg(any())] diff --git a/thirdparty/crates/syn-3.0.0/tests/test_lit.rs b/thirdparty/crates/syn-3.0.3/tests/test_lit.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_lit.rs rename to thirdparty/crates/syn-3.0.3/tests/test_lit.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_meta.rs b/thirdparty/crates/syn-3.0.3/tests/test_meta.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_meta.rs rename to thirdparty/crates/syn-3.0.3/tests/test_meta.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_parse_buffer.rs b/thirdparty/crates/syn-3.0.3/tests/test_parse_buffer.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_parse_buffer.rs rename to thirdparty/crates/syn-3.0.3/tests/test_parse_buffer.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_parse_quote.rs b/thirdparty/crates/syn-3.0.3/tests/test_parse_quote.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_parse_quote.rs rename to thirdparty/crates/syn-3.0.3/tests/test_parse_quote.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_parse_stream.rs b/thirdparty/crates/syn-3.0.3/tests/test_parse_stream.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_parse_stream.rs rename to thirdparty/crates/syn-3.0.3/tests/test_parse_stream.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_pat.rs b/thirdparty/crates/syn-3.0.3/tests/test_pat.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_pat.rs rename to thirdparty/crates/syn-3.0.3/tests/test_pat.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_path.rs b/thirdparty/crates/syn-3.0.3/tests/test_path.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_path.rs rename to thirdparty/crates/syn-3.0.3/tests/test_path.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_precedence.rs b/thirdparty/crates/syn-3.0.3/tests/test_precedence.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_precedence.rs rename to thirdparty/crates/syn-3.0.3/tests/test_precedence.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_punctuated.rs b/thirdparty/crates/syn-3.0.3/tests/test_punctuated.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_punctuated.rs rename to thirdparty/crates/syn-3.0.3/tests/test_punctuated.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_receiver.rs b/thirdparty/crates/syn-3.0.3/tests/test_receiver.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_receiver.rs rename to thirdparty/crates/syn-3.0.3/tests/test_receiver.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_round_trip.rs b/thirdparty/crates/syn-3.0.3/tests/test_round_trip.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_round_trip.rs rename to thirdparty/crates/syn-3.0.3/tests/test_round_trip.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_shebang.rs b/thirdparty/crates/syn-3.0.3/tests/test_shebang.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_shebang.rs rename to thirdparty/crates/syn-3.0.3/tests/test_shebang.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_size.rs b/thirdparty/crates/syn-3.0.3/tests/test_size.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_size.rs rename to thirdparty/crates/syn-3.0.3/tests/test_size.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_stmt.rs b/thirdparty/crates/syn-3.0.3/tests/test_stmt.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_stmt.rs rename to thirdparty/crates/syn-3.0.3/tests/test_stmt.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_token_trees.rs b/thirdparty/crates/syn-3.0.3/tests/test_token_trees.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_token_trees.rs rename to thirdparty/crates/syn-3.0.3/tests/test_token_trees.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_ty.rs b/thirdparty/crates/syn-3.0.3/tests/test_ty.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_ty.rs rename to thirdparty/crates/syn-3.0.3/tests/test_ty.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_unparenthesize.rs b/thirdparty/crates/syn-3.0.3/tests/test_unparenthesize.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_unparenthesize.rs rename to thirdparty/crates/syn-3.0.3/tests/test_unparenthesize.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/test_visibility.rs b/thirdparty/crates/syn-3.0.3/tests/test_visibility.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/test_visibility.rs rename to thirdparty/crates/syn-3.0.3/tests/test_visibility.rs diff --git a/thirdparty/crates/syn-3.0.0/tests/zzz_stable.rs b/thirdparty/crates/syn-3.0.3/tests/zzz_stable.rs similarity index 100% rename from thirdparty/crates/syn-3.0.0/tests/zzz_stable.rs rename to thirdparty/crates/syn-3.0.3/tests/zzz_stable.rs diff --git a/thirdparty/crates/tempfile-3.27.0/BUILD.bazel b/thirdparty/crates/tempfile-3.27.0/BUILD.bazel index 96a943efa..832a084a6 100644 --- a/thirdparty/crates/tempfile-3.27.0/BUILD.bazel +++ b/thirdparty/crates/tempfile-3.27.0/BUILD.bazel @@ -112,7 +112,7 @@ rust_library( }), version = "3.27.0", deps = [ - "//thirdparty/crates/fastrand-2.4.1:fastrand", + "//thirdparty/crates/fastrand-2.5.0:fastrand", "//thirdparty/crates/once_cell-1.21.4:once_cell", ] + select({ "@rules_rust//rust/platform:aarch64-apple-darwin": [ diff --git a/thirdparty/crates/wait-timeout-0.2.1/BUILD.bazel b/thirdparty/crates/wait-timeout-0.2.1/BUILD.bazel index ff811f782..035cd1a31 100644 --- a/thirdparty/crates/wait-timeout-0.2.1/BUILD.bazel +++ b/thirdparty/crates/wait-timeout-0.2.1/BUILD.bazel @@ -109,106 +109,106 @@ rust_library( version = "0.2.1", deps = select({ "@rules_rust//rust/platform:aarch64-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-apple-ios": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-apple-ios-macabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-apple-ios-sim": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-unknown-fuchsia": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-unknown-nixos-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:aarch64-unknown-nto-qnx710": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:arm-unknown-linux-gnueabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:arm-unknown-linux-musleabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:armv7-linux-androideabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:armv7-unknown-linux-gnueabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:i686-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:i686-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:i686-unknown-freebsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:i686-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:loongarch64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:mips-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:powerpc-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:riscv64gc-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:s390x-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:sparc64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:sparc64-unknown-netbsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:sparc64-unknown-openbsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:wasm32-unknown-emscripten": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-apple-darwin": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-apple-ios": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-apple-ios-macabi": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-linux-android": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-unknown-freebsd": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-unknown-fuchsia": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-unknown-linux-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "@rules_rust//rust/platform:x86_64-unknown-nixos-gnu": [ - "//thirdparty/crates/libc-0.2.186:libc", # cfg(unix) + "//thirdparty/crates/libc-0.2.189:libc", # cfg(unix) ], "//conditions:default": [], }), diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/.cargo_vcs_info.json b/thirdparty/crates/wasm-bindgen-0.2.126/.cargo_vcs_info.json deleted file mode 100644 index aebd2537e..000000000 --- a/thirdparty/crates/wasm-bindgen-0.2.126/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "21ac804a96c0c5c5d6459084686a9a17a8a3c865" - }, - "path_in_vcs": "" -} \ No newline at end of file diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/.cargo-checksum.json b/thirdparty/crates/wasm-bindgen-0.2.127/.cargo-checksum.json similarity index 60% rename from thirdparty/crates/wasm-bindgen-0.2.126/.cargo-checksum.json rename to thirdparty/crates/wasm-bindgen-0.2.127/.cargo-checksum.json index 15f1b87f2..888dfeb81 100644 --- a/thirdparty/crates/wasm-bindgen-0.2.126/.cargo-checksum.json +++ b/thirdparty/crates/wasm-bindgen-0.2.127/.cargo-checksum.json @@ -1 +1 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"cb3e014e8ed6b750351c01a7eb103fab983367b7d20917bb058d7e7b1f1b71c5","Cargo.lock":"e5139a4ddb1d617edd49aa23d915af008409f81f9f246a296aca35e0a08d9923","Cargo.toml":"97f2a3cf67d36d1f94880de0d1ca70063e81a5d977cc6289b34c222a4f715ba6","Cargo.toml.orig":"3e18862ec9ff0cf81583cf74fff44596a36a63e5a3a71cc048ee87a18a7b8fc0","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"006f14ae5ec54943737bddd9342eb24975a0e95b808f76d4c98258d3fea75d2d","build.rs":"33c90a6eb1745c53f9047e0ecde135b249b0ea3d9e1a2a40c9610a33f225e6c9","src/cache/intern.rs":"b354990c27d418b201a918782f1aa736c2cafd31fcde694bb19aa58c5bc47449","src/cache/mod.rs":"8989143b55160dbc142cb20c6e066cf0a3f70d6c97fbc9aa0fac59bd62bd865b","src/cast.rs":"156a9b71bf9af03c5c378a1939032dfc628edbefce4aa8c37fb14948abf7a9f4","src/closure.rs":"d3a2e285b7c582c970594dfd9edd9ee822c7c9b86ee8b236497b296c441ef5b7","src/convert/closures.rs":"f1004f4a022f4d063414bc67720fbb04327955c02837241b37fb8298f5fd345e","src/convert/impls.rs":"5d4e3bfaf2e4a3152b8a1b0b2883ee3658317e3f70aa3426d3625dfadcb1b007","src/convert/mod.rs":"a284115f8080ee36ea60d6a111d4247856bdee76c4a5b738465f60a97c593eca","src/convert/slices.rs":"3d6ac72ff8e49c10d77878cc79678ce48f12af0d23cf753e3f76a1092c2cb2bb","src/convert/traits.rs":"2fa56c946544eb6b09e16977ee6efbcf11d5af35039a21041095ff83b9621cdb","src/describe.rs":"fe9fbef496f7908156a522d781f813cfc258e39ecdc15c40ba666a4ef24ea624","src/externref.rs":"40d3a6011ff7341c9b1a4bcecc7ddc459f8bf9e7ba37e6a523bcfc66a3ba87d3","src/handler.rs":"fd187aadf360c2d13e9153fd58a5b640b656dfa892e9bdbe726f96b0636a7f09","src/lib.rs":"b41c47675d6cc4c1ef423341b6b28b932ddf11bdff477f191129305c2cafc972","src/link.rs":"96fdb40e29ffae7b9621d78eec24437bdc6db2473f6d2f8eff1f987d2b566852","src/parent.rs":"d9f90c6eaa6bf00cae48858305eff077947e6558f02da493033f4e4fc09ac7ce","src/rt/marker.rs":"145fbe1e446b18abe405b8fc4a87ec2b3fea17dd9e48491d1d698f08f5e0e3bb","src/rt/mod.rs":"17fc0f950d8800a9aa5979fe84be213019385e9b17e5a7e17c2fb702777cdb56","src/sys.rs":"7450229d24b97ca80f9880c1413437644b82ca1141627ef959b39d8a652cb380"},"package":"4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4"} \ No newline at end of file +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"07325dbbd9f6ca89a66aa2cd45f0ae9bd424552ab3ecf4dadf82a809a288b323","Cargo.lock":"6047a89709dfa779982f017e888c7d90cde14021cd8921339674db4f5c4aa4ea","Cargo.toml":"fe957e94c254b663e45e73f80c3e8e7712085a594d63e2c97778be345141e845","Cargo.toml.orig":"bc320cf05d78853e10fa179dd1a61aa09976811be2b10c15597ed5a9c3d87742","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"006f14ae5ec54943737bddd9342eb24975a0e95b808f76d4c98258d3fea75d2d","build.rs":"33c90a6eb1745c53f9047e0ecde135b249b0ea3d9e1a2a40c9610a33f225e6c9","src/cache/intern.rs":"b354990c27d418b201a918782f1aa736c2cafd31fcde694bb19aa58c5bc47449","src/cache/mod.rs":"8989143b55160dbc142cb20c6e066cf0a3f70d6c97fbc9aa0fac59bd62bd865b","src/cast.rs":"156a9b71bf9af03c5c378a1939032dfc628edbefce4aa8c37fb14948abf7a9f4","src/closure.rs":"d3a2e285b7c582c970594dfd9edd9ee822c7c9b86ee8b236497b296c441ef5b7","src/convert/closures.rs":"f1004f4a022f4d063414bc67720fbb04327955c02837241b37fb8298f5fd345e","src/convert/impls.rs":"ac05832029e8d9646a86964139fc1809c05758896c61c800268339eae8bd040c","src/convert/mod.rs":"a284115f8080ee36ea60d6a111d4247856bdee76c4a5b738465f60a97c593eca","src/convert/slices.rs":"3d6ac72ff8e49c10d77878cc79678ce48f12af0d23cf753e3f76a1092c2cb2bb","src/convert/traits.rs":"9ad9dc048d484f8ccec0ab86b4a8c68f875cd57ff0f8d2b63c611e5a223ed756","src/describe.rs":"fe9fbef496f7908156a522d781f813cfc258e39ecdc15c40ba666a4ef24ea624","src/externref.rs":"40d3a6011ff7341c9b1a4bcecc7ddc459f8bf9e7ba37e6a523bcfc66a3ba87d3","src/handler.rs":"fd187aadf360c2d13e9153fd58a5b640b656dfa892e9bdbe726f96b0636a7f09","src/lib.rs":"29f4cfd26b435f2b30de664aab9312e55157c1cc9f0772921a1c55ea1be0dcc7","src/link.rs":"96fdb40e29ffae7b9621d78eec24437bdc6db2473f6d2f8eff1f987d2b566852","src/parent.rs":"d9f90c6eaa6bf00cae48858305eff077947e6558f02da493033f4e4fc09ac7ce","src/rt/marker.rs":"145fbe1e446b18abe405b8fc4a87ec2b3fea17dd9e48491d1d698f08f5e0e3bb","src/rt/mod.rs":"17fc0f950d8800a9aa5979fe84be213019385e9b17e5a7e17c2fb702777cdb56","src/sys.rs":"6a9a677faab18f40ab30fb5f0a2a0f655ebdcec1ab6688fdb4ec269e7642dd76"},"package":"1b70935747edd64d89de3efa29d73789b806c15798f8e7dca4d8ac356b50ce70"} \ No newline at end of file diff --git a/thirdparty/crates/wasm-bindgen-0.2.127/.cargo_vcs_info.json b/thirdparty/crates/wasm-bindgen-0.2.127/.cargo_vcs_info.json new file mode 100644 index 000000000..53c81bfe1 --- /dev/null +++ b/thirdparty/crates/wasm-bindgen-0.2.127/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "a579ee62b631fd1fa96c7740b52a2952b07c0219" + }, + "path_in_vcs": "" +} \ No newline at end of file diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/BUILD.bazel b/thirdparty/crates/wasm-bindgen-0.2.127/BUILD.bazel similarity index 95% rename from thirdparty/crates/wasm-bindgen-0.2.126/BUILD.bazel rename to thirdparty/crates/wasm-bindgen-0.2.127/BUILD.bazel index 9293e2902..0ef742650 100644 --- a/thirdparty/crates/wasm-bindgen-0.2.126/BUILD.bazel +++ b/thirdparty/crates/wasm-bindgen-0.2.127/BUILD.bazel @@ -41,7 +41,7 @@ rust_library( crate_root = "src/lib.rs", edition = "2021", proc_macro_deps = [ - "//thirdparty/crates/wasm-bindgen-macro-0.2.126:wasm_bindgen_macro", + "//thirdparty/crates/wasm-bindgen-macro-0.2.127:wasm_bindgen_macro", ], rustc_env_files = [ ":cargo_toml_env_vars", @@ -113,12 +113,12 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.2.126", + version = "0.2.127", deps = [ "//thirdparty/crates/cfg-if-1.0.4:cfg_if", "//thirdparty/crates/once_cell-1.21.4:once_cell", - "//thirdparty/crates/wasm-bindgen-0.2.126:build_script_build", - "//thirdparty/crates/wasm-bindgen-shared-0.2.126:wasm_bindgen_shared", + "//thirdparty/crates/wasm-bindgen-0.2.127:build_script_build", + "//thirdparty/crates/wasm-bindgen-shared-0.2.127:wasm_bindgen_shared", ], ) @@ -161,7 +161,7 @@ cargo_build_script( edition = "2021", emit_warnings = False, link_deps = [ - "//thirdparty/crates/wasm-bindgen-shared-0.2.126:wasm_bindgen_shared", + "//thirdparty/crates/wasm-bindgen-shared-0.2.127:wasm_bindgen_shared", ], pkg_name = "wasm-bindgen", proc_macro_deps = [ @@ -180,7 +180,7 @@ cargo_build_script( "noclippy", "norustfmt", ], - version = "0.2.126", + version = "0.2.127", visibility = ["//visibility:private"], ) diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/Cargo.lock b/thirdparty/crates/wasm-bindgen-0.2.127/Cargo.lock similarity index 67% rename from thirdparty/crates/wasm-bindgen-0.2.126/Cargo.lock rename to thirdparty/crates/wasm-bindgen-0.2.127/Cargo.lock index eb97ebf33..8d5d1c8ae 100644 --- a/thirdparty/crates/wasm-bindgen-0.2.126/Cargo.lock +++ b/thirdparty/crates/wasm-bindgen-0.2.127/Cargo.lock @@ -22,9 +22,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "memchr" -version = "2.8.2" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "once_cell" @@ -40,62 +40,62 @@ checksum = "57c0d7b74b563b49d38dae00a0c37d4d6de9b432382b2892f0574ddcae73fd0a" [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] [[package]] name = "rustversion" -version = "1.0.22" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" +checksum = "cf54715a573b99ac80df0bc206da022bcd442c974952c7b9720069370852e21f" [[package]] name = "serde" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ "serde_core", ] [[package]] name = "serde_core" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.3", ] [[package]] name = "serde_json" -version = "1.0.150" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" dependencies = [ "itoa", "memchr", @@ -106,9 +106,20 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.118" +version = "2.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" dependencies = [ "proc-macro2", "quote", @@ -123,7 +134,7 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "wasm-bindgen" -version = "0.2.126" +version = "0.2.127" dependencies = [ "cfg-if", "once_cell", @@ -138,9 +149,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" +checksum = "77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -148,28 +159,28 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" +checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn", + "syn 2.0.119", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" +checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" dependencies = [ "unicode-ident", ] [[package]] name = "zmij" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/Cargo.toml b/thirdparty/crates/wasm-bindgen-0.2.127/Cargo.toml similarity index 97% rename from thirdparty/crates/wasm-bindgen-0.2.126/Cargo.toml rename to thirdparty/crates/wasm-bindgen-0.2.127/Cargo.toml index b92e43d2c..e5e09f8d3 100644 --- a/thirdparty/crates/wasm-bindgen-0.2.126/Cargo.toml +++ b/thirdparty/crates/wasm-bindgen-0.2.127/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.77" name = "wasm-bindgen" -version = "0.2.126" +version = "0.2.127" authors = ["The wasm-bindgen Developers"] build = "build.rs" include = [ @@ -76,10 +76,10 @@ version = "1.0" optional = true [dependencies.wasm-bindgen-macro] -version = "=0.2.126" +version = "=0.2.127" [dependencies.wasm-bindgen-shared] -version = "=0.2.126" +version = "=0.2.127" [dev-dependencies.once_cell] version = "1" diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/Cargo.toml.orig b/thirdparty/crates/wasm-bindgen-0.2.127/Cargo.toml.orig similarity index 99% rename from thirdparty/crates/wasm-bindgen-0.2.126/Cargo.toml.orig rename to thirdparty/crates/wasm-bindgen-0.2.127/Cargo.toml.orig index 6d7ca68f3..7f7b5139b 100644 --- a/thirdparty/crates/wasm-bindgen-0.2.126/Cargo.toml.orig +++ b/thirdparty/crates/wasm-bindgen-0.2.127/Cargo.toml.orig @@ -13,7 +13,7 @@ name = "wasm-bindgen" readme = "README.md" repository = "https://github.com/wasm-bindgen/wasm-bindgen" rust-version = "1.77" -version = "0.2.126" +version = "0.2.127" [package.metadata.docs.rs] features = ["serde-serialize"] @@ -46,8 +46,8 @@ cfg-if = "1.0.0" once_cell = { version = "1.12", default-features = false } serde = { version = "1.0", optional = true } serde_json = { version = "1.0", optional = true } -wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.126" } -wasm-bindgen-shared = { path = "crates/shared", version = "=0.2.126" } +wasm-bindgen-macro = { path = "crates/macro", version = "=0.2.127" } +wasm-bindgen-shared = { path = "crates/shared", version = "=0.2.127" } [build-dependencies] # In older MSRVs, dependencies and crate features can't have the same name. diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/LICENSE-APACHE b/thirdparty/crates/wasm-bindgen-0.2.127/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/LICENSE-APACHE rename to thirdparty/crates/wasm-bindgen-0.2.127/LICENSE-APACHE diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/LICENSE-MIT b/thirdparty/crates/wasm-bindgen-0.2.127/LICENSE-MIT similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/LICENSE-MIT rename to thirdparty/crates/wasm-bindgen-0.2.127/LICENSE-MIT diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/README.md b/thirdparty/crates/wasm-bindgen-0.2.127/README.md similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/README.md rename to thirdparty/crates/wasm-bindgen-0.2.127/README.md diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/build.rs b/thirdparty/crates/wasm-bindgen-0.2.127/build.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/build.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/build.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/cache/intern.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/cache/intern.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/cache/intern.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/cache/intern.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/cache/mod.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/cache/mod.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/cache/mod.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/cache/mod.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/cast.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/cast.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/cast.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/cast.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/closure.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/closure.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/closure.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/closure.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/convert/closures.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/convert/closures.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/convert/closures.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/convert/closures.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/convert/impls.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/convert/impls.rs similarity index 90% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/convert/impls.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/convert/impls.rs index 5b1ff0f15..dda951b20 100644 --- a/thirdparty/crates/wasm-bindgen-0.2.126/src/convert/impls.rs +++ b/thirdparty/crates/wasm-bindgen-0.2.127/src/convert/impls.rs @@ -12,7 +12,7 @@ use crate::convert::{ RefFromWasmAbi, ReturnWasmAbi, TryFromJsValue, UpcastFrom, }; use crate::sys::Promising; -use crate::sys::{JsOption, Undefined}; +use crate::sys::{JsNullable, JsOption, Undefined}; use crate::{Clamped, JsError, JsValue, UnwrapThrowExt}; // Primitive types can always be passed over the ABI. @@ -139,6 +139,7 @@ macro_rules! type_wasm_native { impl UpcastFrom<$t> for JsValue {} impl UpcastFrom<$t> for JsOption {} + impl UpcastFrom<$t> for JsNullable {} impl UpcastFrom<$t> for $t {} )*) } @@ -153,8 +154,10 @@ type_wasm_native!( impl UpcastFrom for u128 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for i128 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} /// Sentinel value used to encode `None` for optional pointer-sized and /// 32-bit numeric values transferred over the JS `number` ABI. @@ -215,6 +218,7 @@ macro_rules! type_wasm_native_f64_option { impl UpcastFrom<$t> for JsValue {} impl UpcastFrom<$t> for JsOption {} + impl UpcastFrom<$t> for JsNullable {} impl UpcastFrom<$t> for $t {} )*) } @@ -231,37 +235,52 @@ type_wasm_native_f64_option!( impl UpcastFrom for i32 {} #[cfg(target_pointer_width = "32")] impl UpcastFrom for JsOption {} +#[cfg(target_pointer_width = "32")] +impl UpcastFrom for JsNullable {} impl UpcastFrom for i64 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for i128 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for isize {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for i64 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for i128 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for usize {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for u64 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for u128 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} #[cfg(target_pointer_width = "32")] impl UpcastFrom for u32 {} #[cfg(target_pointer_width = "32")] impl UpcastFrom for JsOption {} +#[cfg(target_pointer_width = "32")] +impl UpcastFrom for JsNullable {} impl UpcastFrom for u64 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for u128 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for f64 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} /// The sentinel value is 0xFF_FFFF for primitives with less than 32 bits. /// @@ -306,6 +325,7 @@ macro_rules! type_abi_as_u32 { impl UpcastFrom<$t> for JsValue {} impl UpcastFrom<$t> for JsOption {} + impl UpcastFrom<$t> for JsNullable {} impl UpcastFrom<$t> for $t {} )*) } @@ -314,35 +334,49 @@ type_abi_as_u32!(i8 u8 i16 u16); impl UpcastFrom for i16 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for i32 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for i64 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for i128 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for u16 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for u32 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for u64 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for u128 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for i32 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for i64 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for i128 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for u32 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for u64 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for u128 {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl IntoWasmAbi for bool { type Abi = u32; @@ -386,6 +420,7 @@ impl Promising for bool { impl UpcastFrom for JsValue {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for bool {} impl IntoWasmAbi for char { @@ -431,6 +466,7 @@ impl Promising for char { impl UpcastFrom for JsValue {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for char {} impl IntoWasmAbi for *const T { @@ -457,6 +493,7 @@ unsafe impl ErasableGeneric for *const T { impl UpcastFrom<*const T> for *const Target where Target: UpcastFrom {} impl UpcastFrom<*const T> for JsOption<*const Target> where Target: UpcastFrom {} +impl UpcastFrom<*const T> for JsNullable<*const Target> where Target: UpcastFrom {} impl IntoWasmAbi for Option<*const T> { type Abi = f64; @@ -474,6 +511,7 @@ unsafe impl ErasableGeneric for Option { impl UpcastFrom> for Option where Target: UpcastFrom {} impl UpcastFrom> for JsOption> where Target: UpcastFrom {} +impl UpcastFrom> for JsNullable> where Target: UpcastFrom {} impl FromWasmAbi for Option<*const T> { type Abi = f64; @@ -778,6 +816,12 @@ where TargetE: UpcastFrom, { } +impl UpcastFrom> for JsNullable> +where + TargetT: UpcastFrom, + TargetE: UpcastFrom, +{ +} unsafe impl ErasableGeneric for JsError { type Repr = JsValue; @@ -809,6 +853,7 @@ impl Promising for JsError { impl UpcastFrom for JsValue {} impl UpcastFrom for JsOption {} +impl UpcastFrom for JsNullable {} impl UpcastFrom for JsError {} /// # ⚠️ Unstable diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/convert/mod.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/convert/mod.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/convert/mod.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/convert/mod.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/convert/slices.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/convert/slices.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/convert/slices.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/convert/slices.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/convert/traits.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/convert/traits.rs similarity index 98% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/convert/traits.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/convert/traits.rs index baf34ff8f..17a8dc06e 100644 --- a/thirdparty/crates/wasm-bindgen-0.2.126/src/convert/traits.rs +++ b/thirdparty/crates/wasm-bindgen-0.2.127/src/convert/traits.rs @@ -2,7 +2,7 @@ use core::borrow::Borrow; use core::ops::{Deref, DerefMut}; use core::panic::AssertUnwindSafe; -use crate::sys::JsOption; +use crate::sys::{JsNullable, JsOption}; use crate::{describe::*, JsCast}; use crate::{ErasableGeneric, JsValue}; @@ -522,6 +522,12 @@ macro_rules! impl_tuple_upcast { $($T: JsGeneric,)+ { } + impl<$($T: JsGeneric,)+ $($Target: JsGeneric,)+> UpcastFrom<($($T,)+)> for JsNullable<($($Target,)+)> + where + $($Target: JsGeneric + UpcastFrom<$T>,)+ + $($T: JsGeneric,)+ + { + } }; } impl_tuple_upcast!([T1][Target1]); diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/describe.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/describe.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/describe.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/describe.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/externref.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/externref.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/externref.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/externref.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/handler.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/handler.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/handler.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/handler.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/lib.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/lib.rs similarity index 99% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/lib.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/lib.rs index 494a6cfb8..7908dfb2b 100644 --- a/thirdparty/crates/wasm-bindgen-0.2.126/src/lib.rs +++ b/thirdparty/crates/wasm-bindgen-0.2.127/src/lib.rs @@ -88,6 +88,11 @@ const _: () = { /// exported function. #[no_mangle] pub extern "C" fn __wbindgen_skip_interpret_calls() {} + + /// A custom data section used to detect Emscripten. + #[cfg(target_os = "emscripten")] + #[link_section = "__wasm_bindgen_emscripten_marker"] + static __WASM_BINDGEN_EMSCRIPTEN_MARKER: [u8; 1] = [1]; }; macro_rules! externs { @@ -1880,10 +1885,3 @@ impl From>> for JsValue { JsValue::from(Clamped(vector.0.into_boxed_slice())) } } - -#[cfg(target_os = "emscripten")] -#[doc(hidden)] -#[used] -#[link_section = "__wasm_bindgen_emscripten_marker"] -/// A custom data section used to detect Emscripten. -pub static __WASM_BINDGEN_EMSCRIPTEN_MARKER: [u8; 1] = [1]; diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/link.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/link.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/link.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/link.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/parent.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/parent.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/parent.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/parent.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/rt/marker.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/rt/marker.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/rt/marker.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/rt/marker.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/rt/mod.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/rt/mod.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/rt/mod.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/rt/mod.rs diff --git a/thirdparty/crates/wasm-bindgen-0.2.126/src/sys.rs b/thirdparty/crates/wasm-bindgen-0.2.127/src/sys.rs similarity index 59% rename from thirdparty/crates/wasm-bindgen-0.2.126/src/sys.rs rename to thirdparty/crates/wasm-bindgen-0.2.127/src/sys.rs index cfd889ce8..f6d88fd34 100644 --- a/thirdparty/crates/wasm-bindgen-0.2.126/src/sys.rs +++ b/thirdparty/crates/wasm-bindgen-0.2.127/src/sys.rs @@ -270,3 +270,173 @@ impl UpcastFrom for JsOption {} impl UpcastFrom<()> for JsOption {} impl UpcastFrom> for JsValue {} impl UpcastFrom> for JsOption where T: UpcastFrom {} + +// JsNullable +#[wasm_bindgen(wasm_bindgen = crate)] +extern "C" { + /// A nullable JS value of type `T`. + /// + /// Unlike `Option`, which is a Rust-side construct, `JsNullable` + /// represents a JS value that may be `T` or `null`, where the presence + /// status is not yet known in Rust. The value remains in JS until inspected + /// via methods like [`is_empty`](Self::is_empty), + /// [`as_option`](Self::as_option), or [`into_option`](Self::into_option). + /// + /// This models WebIDL nullable types (`T?`). Following WebIDL's + /// ECMAScript conversion rules, where `undefined` coerces to `null` at + /// nullable positions, both `null` and `undefined` are treated as absent. + /// The canonical empty value produced from Rust is `null`. + /// + /// For TypeScript-style `T | undefined` with strict undefined-only + /// emptiness, use [`JsOption`] instead. + /// + /// `T` must implement [`JsGeneric`], meaning it is any type that can be + /// represented as a `JsValue` (e.g., `JsString`, `Number`, `Object`, etc.). + /// `JsNullable` itself implements `JsGeneric`, so it can be used in all + /// generic positions that accept JS types. + #[wasm_bindgen(typescript_type = "any", no_upcast)] + #[derive(Clone, PartialEq)] + pub type JsNullable; +} + +impl JsNullable { + /// Creates an empty `JsNullable` representing `null`. + #[inline] + pub fn new() -> Self { + Null::NULL.unchecked_into() + } + + /// Wraps a value in a `JsNullable`. + #[inline] + pub fn wrap(val: T) -> Self { + val.unchecked_into() + } + + /// Creates a `JsNullable` from an `Option`. + /// + /// Returns `JsNullable::wrap(val)` if `Some(val)`, otherwise `JsNullable::new()`. + #[inline] + pub fn from_option(opt: Option) -> Self { + match opt { + Some(val) => Self::wrap(val), + None => Self::new(), + } + } + + /// Tests whether this `JsNullable` is empty (`null` or `undefined`). + #[inline] + pub fn is_empty(&self) -> bool { + JsValue::is_null(self) || JsValue::is_undefined(self) + } + + /// Converts this `JsNullable` to an `Option` by cloning the inner value. + /// + /// Returns `None` if the value is `null` or `undefined`, otherwise returns + /// `Some(T)` with a clone of the contained value. + #[inline] + pub fn as_option(&self) -> Option { + if self.is_empty() { + None + } else { + let cloned = self.deref().clone(); + Some(cloned.unchecked_into()) + } + } + + /// Converts this `JsNullable` into an `Option`, consuming `self`. + /// + /// Returns `None` if the value is `null` or `undefined`, otherwise returns + /// `Some(T)` with the contained value. + #[inline] + pub fn into_option(self) -> Option { + if self.is_empty() { + None + } else { + Some(self.unchecked_into()) + } + } + + /// Returns the contained value, consuming `self`. + /// + /// # Panics + /// + /// Panics if the value is `null` or `undefined`. + #[inline] + pub fn unwrap(self) -> T { + self.expect("called `JsNullable::unwrap()` on an empty value") + } + + /// Returns the contained value, consuming `self`. + /// + /// # Panics + /// + /// Panics if the value is `null` or `undefined`, with a panic message + /// including the passed message. + #[inline] + pub fn expect(self, msg: &str) -> T { + match self.into_option() { + Some(val) => val, + None => panic!("{}", msg), + } + } + + /// Returns the contained value or a default. + /// + /// Returns the contained value if not `null` or `undefined`, otherwise + /// returns the default value of `T`. + #[inline] + pub fn unwrap_or_default(self) -> T + where + T: Default, + { + self.into_option().unwrap_or_default() + } + + /// Returns the contained value or computes it from a closure. + /// + /// Returns the contained value if not `null` or `undefined`, otherwise + /// calls `f` and returns the result. + #[inline] + pub fn unwrap_or_else(self, f: F) -> T + where + F: FnOnce() -> T, + { + self.into_option().unwrap_or_else(f) + } +} + +impl Default for JsNullable { + fn default() -> Self { + Self::new() + } +} + +impl fmt::Debug for JsNullable { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}?(", core::any::type_name::())?; + match self.as_option() { + Some(v) => write!(f, "{v:?}")?, + None => f.write_str("null")?, + } + f.write_str(")") + } +} + +impl fmt::Display for JsNullable { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}?(", core::any::type_name::())?; + match self.as_option() { + Some(v) => write!(f, "{v}")?, + None => f.write_str("null")?, + } + f.write_str(")") + } +} + +impl UpcastFrom for JsNullable {} +impl UpcastFrom for JsNullable {} +impl UpcastFrom for JsNullable {} +impl UpcastFrom<()> for JsNullable {} +impl UpcastFrom> for JsValue {} +impl UpcastFrom> for JsNullable where T: UpcastFrom {} +impl UpcastFrom> for JsNullable where T: UpcastFrom {} diff --git a/thirdparty/crates/wasm-bindgen-macro-0.2.126/.cargo_vcs_info.json b/thirdparty/crates/wasm-bindgen-macro-0.2.126/.cargo_vcs_info.json deleted file mode 100644 index 463a4949b..000000000 --- a/thirdparty/crates/wasm-bindgen-macro-0.2.126/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "21ac804a96c0c5c5d6459084686a9a17a8a3c865" - }, - "path_in_vcs": "crates/macro" -} \ No newline at end of file diff --git a/thirdparty/crates/wasm-bindgen-macro-0.2.126/.cargo-checksum.json b/thirdparty/crates/wasm-bindgen-macro-0.2.127/.cargo-checksum.json similarity index 52% rename from thirdparty/crates/wasm-bindgen-macro-0.2.126/.cargo-checksum.json rename to thirdparty/crates/wasm-bindgen-macro-0.2.127/.cargo-checksum.json index dc92cda65..28c432713 100644 --- a/thirdparty/crates/wasm-bindgen-macro-0.2.126/.cargo-checksum.json +++ b/thirdparty/crates/wasm-bindgen-macro-0.2.127/.cargo-checksum.json @@ -1 +1 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"fe949a1c2a07eb8814b5b97c15d68d0334802421f7630107f5424f910332fbd6","Cargo.lock":"cfbd546b48f65dcd512d5c84935092567e39bdcb415009b29356ff5a629cd79f","Cargo.toml":"0b87a00b67a63cd51d385ca1908c95ba96a39b7a8e60df84a9d1dc39aa7d6f69","Cargo.toml.orig":"232beb2505af58b0bb98557d88bdfb8a6a2fa9219292f5ccfa5f7d28332021a0","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"5e8d81c7bfeb6d08e0781bf572b652f064af0bf82eb030ece7af3140b135b0ef","src/lib.rs":"1e0bcfc96e940ed67ec83895f987eb7cfb1e603435f3f9537ec0485154a9c8b5","src/worker.js":"cb5c33dd41cfad622abce5464a3ceae478904ea16ddc3c6c769ee33e0c086692"},"package":"167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1"} \ No newline at end of file +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"b65cf5c5f80f3889dfaec3180ac27384410d9dbb6a4e68dba0ef713965c6065d","Cargo.lock":"0ca1aeae025a11cabe4c3a4853c3697fc03492ba5e83594b9c3051f785eb9829","Cargo.toml":"67adac45182c7fb126aec20d6cbcf04c7bb7a71379bf24bc35b325dd128a4042","Cargo.toml.orig":"adace76065bc81145e99ce4bc4a30b35e43cd286da13ae458ab8c36d8dedb463","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","README.md":"5e8d81c7bfeb6d08e0781bf572b652f064af0bf82eb030ece7af3140b135b0ef","src/lib.rs":"1e0bcfc96e940ed67ec83895f987eb7cfb1e603435f3f9537ec0485154a9c8b5","src/worker.js":"cb5c33dd41cfad622abce5464a3ceae478904ea16ddc3c6c769ee33e0c086692"},"package":"77775f8f3f7217702089053b94958f8f54061a3f663417df76e19cbdcca29bc1"} \ No newline at end of file diff --git a/thirdparty/crates/wasm-bindgen-macro-0.2.127/.cargo_vcs_info.json b/thirdparty/crates/wasm-bindgen-macro-0.2.127/.cargo_vcs_info.json new file mode 100644 index 000000000..ea907de80 --- /dev/null +++ b/thirdparty/crates/wasm-bindgen-macro-0.2.127/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "a579ee62b631fd1fa96c7740b52a2952b07c0219" + }, + "path_in_vcs": "crates/macro" +} \ No newline at end of file diff --git a/thirdparty/crates/wasm-bindgen-macro-0.2.126/BUILD.bazel b/thirdparty/crates/wasm-bindgen-macro-0.2.127/BUILD.bazel similarity index 98% rename from thirdparty/crates/wasm-bindgen-macro-0.2.126/BUILD.bazel rename to thirdparty/crates/wasm-bindgen-macro-0.2.127/BUILD.bazel index 5789396d9..8a1fc2b10 100644 --- a/thirdparty/crates/wasm-bindgen-macro-0.2.126/BUILD.bazel +++ b/thirdparty/crates/wasm-bindgen-macro-0.2.127/BUILD.bazel @@ -106,9 +106,9 @@ rust_proc_macro( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.2.126", + version = "0.2.127", deps = [ "//thirdparty/crates/quote-1.0.47:quote", - "//thirdparty/crates/wasm-bindgen-macro-support-0.2.126:wasm_bindgen_macro_support", + "//thirdparty/crates/wasm-bindgen-macro-support-0.2.127:wasm_bindgen_macro_support", ], ) diff --git a/thirdparty/crates/wasm-bindgen-macro-0.2.126/Cargo.lock b/thirdparty/crates/wasm-bindgen-macro-0.2.127/Cargo.lock similarity index 71% rename from thirdparty/crates/wasm-bindgen-macro-0.2.126/Cargo.lock rename to thirdparty/crates/wasm-bindgen-macro-0.2.127/Cargo.lock index 8ab2937c1..dd8d3d943 100644 --- a/thirdparty/crates/wasm-bindgen-macro-0.2.126/Cargo.lock +++ b/thirdparty/crates/wasm-bindgen-macro-0.2.127/Cargo.lock @@ -16,9 +16,9 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "glob" -version = "0.3.3" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" +checksum = "e4eba85ea1d0a966a983acd07deee566e67395d2d96b6fb39e62b5a833f1eb0b" [[package]] name = "hashbrown" @@ -44,62 +44,62 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "memchr" -version = "2.8.2" +version = "2.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" +checksum = "cf8baf1c55e62ffcace7a9f06f4bd9cd3f0c4beb022d3b367256b91b87513d98" [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] [[package]] name = "serde" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" +checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba" dependencies = [ "serde_core", ] [[package]] name = "serde_core" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" +checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.228" +version = "1.0.229" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" +checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348" dependencies = [ "proc-macro2", "quote", - "syn", + "syn 3.0.3", ] [[package]] name = "serde_json" -version = "1.0.150" +version = "1.0.151" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8014e44b4736ed0538adeecded0fce2a272f22dc9578a7eb6b2d9993c74cfb9" +checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14" dependencies = [ "itoa", "memchr", @@ -119,9 +119,20 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.118" +version = "2.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" +dependencies = [ + "proc-macro2", + "quote", + "unicode-ident", +] + +[[package]] +name = "syn" +version = "3.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "53e9bae58849f64dfa4f5d5ae372c8341f7305f82a3868709269343628b659a3" dependencies = [ "proc-macro2", "quote", @@ -130,9 +141,9 @@ dependencies = [ [[package]] name = "target-triple" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "591ef38edfb78ca4771ee32cf494cb8771944bee237a9b91fc9c1424ac4b777b" +checksum = "c3a6bfce3d99adfa72d24750a61f782f3036a81e7f86d8841ee1326deaebd171" [[package]] name = "termcolor" @@ -145,9 +156,9 @@ dependencies = [ [[package]] name = "toml" -version = "1.1.2+spec-1.1.0" +version = "1.1.4+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" +checksum = "3aace63f4bbcdfc2c965b059de67119c89c4017a70d633be6c104910f67056f5" dependencies = [ "indexmap", "serde_core", @@ -169,24 +180,24 @@ dependencies = [ [[package]] name = "toml_parser" -version = "1.1.2+spec-1.1.0" +version = "1.1.3+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2abe9b86193656635d2411dc43050282ca48aa31c2451210f4202550afb7526" +checksum = "1d38ac1cf9b95face32296c0a3ede1fdc270627c9d9c02a7274dd6d960dc4d56" dependencies = [ "winnow", ] [[package]] name = "toml_writer" -version = "1.1.1+spec-1.1.0" +version = "1.1.2+spec-1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" +checksum = "7d56353a2a665ad0f41a421187180aab746c8c325620617ad883a99a1cbe66d2" [[package]] name = "trybuild" -version = "1.0.117" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0710d4dfbeae4f9c390baa784c49858a7468fa433f3fe5d0ec5ebef651cf59f9" +checksum = "1e605bf6b39357663d8ba4e984f8be8da8df6bb32e81031d6889024ea8fd68e4" dependencies = [ "glob", "serde", @@ -205,7 +216,7 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "wasm-bindgen-macro" -version = "0.2.126" +version = "0.2.127" dependencies = [ "quote", "trybuild", @@ -214,22 +225,22 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" +checksum = "e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284" dependencies = [ "bumpalo", "proc-macro2", "quote", - "syn", + "syn 2.0.119", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" +checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" dependencies = [ "unicode-ident", ] @@ -260,12 +271,12 @@ dependencies = [ [[package]] name = "winnow" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0592e1c9d151f854e6fd382574c3a0855250e1d9b2f99d9281c6e6391af352f1" +checksum = "23b97319f7b8343df12cc98938e5c3eb436064524c8d2b4e30a1d3a36eecdf81" [[package]] name = "zmij" -version = "1.0.21" +version = "1.0.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa" +checksum = "29666d0abbfad1e3dc4dcf6144730dd3a3ab225bbbdac83319345b1b44ccfc1b" diff --git a/thirdparty/crates/wasm-bindgen-macro-0.2.126/Cargo.toml b/thirdparty/crates/wasm-bindgen-macro-0.2.127/Cargo.toml similarity index 97% rename from thirdparty/crates/wasm-bindgen-macro-0.2.126/Cargo.toml rename to thirdparty/crates/wasm-bindgen-macro-0.2.127/Cargo.toml index 581e15115..41926f978 100644 --- a/thirdparty/crates/wasm-bindgen-macro-0.2.126/Cargo.toml +++ b/thirdparty/crates/wasm-bindgen-macro-0.2.127/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.77" name = "wasm-bindgen-macro" -version = "0.2.126" +version = "0.2.127" authors = ["The wasm-bindgen Developers"] build = false include = [ @@ -46,7 +46,7 @@ proc-macro = true version = "1.0" [dependencies.wasm-bindgen-macro-support] -version = "=0.2.126" +version = "=0.2.127" [dev-dependencies.trybuild] version = "1.0" diff --git a/thirdparty/crates/wasm-bindgen-macro-0.2.126/Cargo.toml.orig b/thirdparty/crates/wasm-bindgen-macro-0.2.127/Cargo.toml.orig similarity index 95% rename from thirdparty/crates/wasm-bindgen-macro-0.2.126/Cargo.toml.orig rename to thirdparty/crates/wasm-bindgen-macro-0.2.127/Cargo.toml.orig index 8981a2e25..c23d76be8 100644 --- a/thirdparty/crates/wasm-bindgen-macro-0.2.126/Cargo.toml.orig +++ b/thirdparty/crates/wasm-bindgen-macro-0.2.127/Cargo.toml.orig @@ -11,7 +11,7 @@ license = "MIT OR Apache-2.0" name = "wasm-bindgen-macro" repository = "https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/macro" rust-version = "1.77" -version = "0.2.126" +version = "0.2.127" [lib] proc-macro = true @@ -21,7 +21,7 @@ strict-macro = ["wasm-bindgen-macro-support/strict-macro"] [dependencies] quote = "1.0" -wasm-bindgen-macro-support = { path = "../macro-support", version = "=0.2.126" } +wasm-bindgen-macro-support = { path = "../macro-support", version = "=0.2.127" } [dev-dependencies] js-sys = { path = "../js-sys" } diff --git a/thirdparty/crates/wasm-bindgen-macro-0.2.126/LICENSE-APACHE b/thirdparty/crates/wasm-bindgen-macro-0.2.127/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/wasm-bindgen-macro-0.2.126/LICENSE-APACHE rename to thirdparty/crates/wasm-bindgen-macro-0.2.127/LICENSE-APACHE diff --git a/thirdparty/crates/wasm-bindgen-macro-0.2.126/LICENSE-MIT b/thirdparty/crates/wasm-bindgen-macro-0.2.127/LICENSE-MIT similarity index 100% rename from thirdparty/crates/wasm-bindgen-macro-0.2.126/LICENSE-MIT rename to thirdparty/crates/wasm-bindgen-macro-0.2.127/LICENSE-MIT diff --git a/thirdparty/crates/wasm-bindgen-macro-0.2.126/README.md b/thirdparty/crates/wasm-bindgen-macro-0.2.127/README.md similarity index 100% rename from thirdparty/crates/wasm-bindgen-macro-0.2.126/README.md rename to thirdparty/crates/wasm-bindgen-macro-0.2.127/README.md diff --git a/thirdparty/crates/wasm-bindgen-macro-0.2.126/src/lib.rs b/thirdparty/crates/wasm-bindgen-macro-0.2.127/src/lib.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-macro-0.2.126/src/lib.rs rename to thirdparty/crates/wasm-bindgen-macro-0.2.127/src/lib.rs diff --git a/thirdparty/crates/wasm-bindgen-macro-0.2.126/src/worker.js b/thirdparty/crates/wasm-bindgen-macro-0.2.127/src/worker.js similarity index 100% rename from thirdparty/crates/wasm-bindgen-macro-0.2.126/src/worker.js rename to thirdparty/crates/wasm-bindgen-macro-0.2.127/src/worker.js diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/.cargo-checksum.json b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/.cargo-checksum.json similarity index 50% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/.cargo-checksum.json rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/.cargo-checksum.json index e7927ef14..7f0784c98 100644 --- a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/.cargo-checksum.json +++ b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/.cargo-checksum.json @@ -1 +1 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"9b8cb0db29b5cf4cd7d349fd532ecdfda4b61b1d68ca4aad44be52ad00af9823","Cargo.lock":"848e7d6f6ece1f17978f88788c8c130c591816a847ca5fe33accdd839c903dd2","Cargo.toml":"d082298cff86a201af404d9ff5f60d798518bcedf873df755989c9d7ec1e0d87","Cargo.toml.orig":"a14a2a2188e0e8a3da49893c09d8cf03946c01580fa1433f541aa6adb9c34715","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","src/ast.rs":"ac47e0e4ec69c8015aba9b965f80900a3dfbe3c84763c2e9c80ab1d00dd2278e","src/codegen.rs":"b6d8fc2cf6dd5c8ab038d57c2c205d9cd45699a6988d9a80dee1abf4d26469a6","src/encode.rs":"2915e79724c09926088c68fee10382a70286120edb2fc7c06c6fcd0e985262ae","src/error.rs":"3ce79c73e831c77cd72dd140cce670a47bf3de362e9554fda03bfea9eb5fdee3","src/generics.rs":"68c72f9ce68a5bead0f404c31d41a9c782be40a000727cfe99eed3edc5e5fe8a","src/hash.rs":"6db19dbfbc0891d051bafe3c109e50a4f51bcd75d3eaf149d5999ac3f238cc2f","src/lib.rs":"96a4cf959705c7f5268ce7777fe80a92d6c43492e7b60cb9a803d2da52d1082e","src/parser.rs":"25552e7461aacecb75884ac2d84c3deea2775bb6edb6a9b0c5f1d5ae7f8b194c"},"package":"f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e"} \ No newline at end of file +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"45dbcf0f5ad214713e985b8b8b925f7749d9bd1984178d493fa82014652c7fac","Cargo.lock":"aac1cad0ef7d7bc94ae0fc33eee95f40a14793d573c1f23d1be2317737c0a929","Cargo.toml":"d6cb65b1422776164ff576405aa0571a08362ee750efc398abf1bc181aafd0fd","Cargo.toml.orig":"311018699a21c553c651bc0b21895d2058e040f75ab2f3e4f66d8e2437a1f7f1","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","src/ast.rs":"ac47e0e4ec69c8015aba9b965f80900a3dfbe3c84763c2e9c80ab1d00dd2278e","src/codegen.rs":"2af96796e687f1a763237af81c6cea9bff45b4e6f66360180af5fd7c6630bc3d","src/encode.rs":"2915e79724c09926088c68fee10382a70286120edb2fc7c06c6fcd0e985262ae","src/error.rs":"3ce79c73e831c77cd72dd140cce670a47bf3de362e9554fda03bfea9eb5fdee3","src/generics.rs":"68c72f9ce68a5bead0f404c31d41a9c782be40a000727cfe99eed3edc5e5fe8a","src/hash.rs":"6db19dbfbc0891d051bafe3c109e50a4f51bcd75d3eaf149d5999ac3f238cc2f","src/lib.rs":"96a4cf959705c7f5268ce7777fe80a92d6c43492e7b60cb9a803d2da52d1082e","src/parser.rs":"b057e0d5a3b1b5e01a7354ddb61385647b0a63fd79898d9a749840de0b6bb7fc"},"package":"e11d33f857dc2fb11b8bc75aee111aa9cbeb12cd9f25efd3d4c2a3dd4e235284"} \ No newline at end of file diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/.cargo_vcs_info.json b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/.cargo_vcs_info.json similarity index 51% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/.cargo_vcs_info.json rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/.cargo_vcs_info.json index 2d3c6b74b..1d9874834 100644 --- a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/.cargo_vcs_info.json +++ b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "21ac804a96c0c5c5d6459084686a9a17a8a3c865" + "sha1": "a579ee62b631fd1fa96c7740b52a2952b07c0219" }, "path_in_vcs": "crates/macro-support" } \ No newline at end of file diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/BUILD.bazel b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/BUILD.bazel similarity index 98% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/BUILD.bazel rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/BUILD.bazel index f167106ae..ee90ae169 100644 --- a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/BUILD.bazel +++ b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/BUILD.bazel @@ -106,12 +106,12 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.2.126", + version = "0.2.127", deps = [ "//thirdparty/crates/bumpalo-3.20.3:bumpalo", "//thirdparty/crates/proc-macro2-1.0.107:proc_macro2", "//thirdparty/crates/quote-1.0.47:quote", "//thirdparty/crates/syn-2.0.119:syn", - "//thirdparty/crates/wasm-bindgen-shared-0.2.126:wasm_bindgen_shared", + "//thirdparty/crates/wasm-bindgen-shared-0.2.127:wasm_bindgen_shared", ], ) diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/Cargo.lock b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/Cargo.lock similarity index 74% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/Cargo.lock rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/Cargo.lock index 283a362da..f44d1b247 100644 --- a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/Cargo.lock +++ b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/Cargo.lock @@ -10,27 +10,27 @@ checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" [[package]] name = "proc-macro2" -version = "1.0.106" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" +checksum = "985e7ec9bb745e6ce6535b544d84d6cd6f7ad8bd711c398938ae983b91a766d9" dependencies = [ "unicode-ident", ] [[package]] name = "quote" -version = "1.0.46" +version = "1.0.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" +checksum = "1fbf4db142a473a8d80c26bbf18454ed458bf8d26c8219c331daecfdbd079001" dependencies = [ "proc-macro2", ] [[package]] name = "syn" -version = "2.0.118" +version = "2.0.119" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" +checksum = "872831b642d1a07999a962a351ed35b955ea2cfc8f3862091e2a240a84f17297" dependencies = [ "proc-macro2", "quote", @@ -45,7 +45,7 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.126" +version = "0.2.127" dependencies = [ "bumpalo", "proc-macro2", @@ -56,9 +56,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.126" +version = "0.2.127" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" +checksum = "7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf" dependencies = [ "unicode-ident", ] diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/Cargo.toml b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/Cargo.toml similarity index 97% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/Cargo.toml rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/Cargo.toml index fe3481d82..9f837220c 100644 --- a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/Cargo.toml +++ b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.77" name = "wasm-bindgen-macro-support" -version = "0.2.126" +version = "0.2.127" authors = ["The wasm-bindgen Developers"] build = false include = [ @@ -59,7 +59,7 @@ features = [ ] [dependencies.wasm-bindgen-shared] -version = "=0.2.126" +version = "=0.2.127" [lints.clippy] large_enum_variant = "allow" diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/Cargo.toml.orig b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/Cargo.toml.orig similarity index 89% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/Cargo.toml.orig rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/Cargo.toml.orig index 089b5499e..029191a59 100644 --- a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/Cargo.toml.orig +++ b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/Cargo.toml.orig @@ -9,7 +9,7 @@ license = "MIT OR Apache-2.0" name = "wasm-bindgen-macro-support" repository = "https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/macro-support" rust-version = "1.77" -version = "0.2.126" +version = "0.2.127" [features] extra-traits = ["syn/extra-traits"] @@ -20,7 +20,7 @@ bumpalo = "3.0.0" proc-macro2 = "1.0" quote = '1.0' syn = { version = '2.0', features = ['visit', 'visit-mut', 'full', 'extra-traits'] } -wasm-bindgen-shared = { path = "../shared", version = "=0.2.126" } +wasm-bindgen-shared = { path = "../shared", version = "=0.2.127" } [lints] workspace = true diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/LICENSE-APACHE b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/LICENSE-APACHE rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/LICENSE-APACHE diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/LICENSE-MIT b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/LICENSE-MIT similarity index 100% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/LICENSE-MIT rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/LICENSE-MIT diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/ast.rs b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/ast.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/ast.rs rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/ast.rs diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/codegen.rs b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/codegen.rs similarity index 92% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/codegen.rs rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/codegen.rs index 9090c3af0..9b29d476b 100644 --- a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/codegen.rs +++ b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/codegen.rs @@ -220,7 +220,7 @@ impl ToTokens for ast::Struct { fn to_tokens(&self, tokens: &mut TokenStream) { let name = &self.rust_name; let name_str = self.qualified_name.to_string(); - let name_len = name_str.len() as u32; + let name_len = name_str.chars().count() as u32; let name_chars: Vec = name_str.chars().map(|c| c as u32).collect(); let new_fn = Ident::new(&shared::new_function(&name_str), Span::call_site()); let free_fn = Ident::new(&shared::free_function(&name_str), Span::call_site()); @@ -814,7 +814,7 @@ impl TryToTokens for ast::Export { ) }; let #ident = <<#elem as #wasm_bindgen::convert::LongRefFromWasmAbi> - ::Anchor as core::borrow::Borrow<#elem>> + ::Anchor as #wasm_bindgen::__rt::core::borrow::Borrow<#elem>> ::borrow(&#ident); }); } else { @@ -1112,7 +1112,8 @@ impl TryToTokens for ast::ImportType { }; let description = if let Some(typescript_type) = &self.typescript_type { - let typescript_type_len = typescript_type.len() as u32; + // One descriptor word per `char`, so count `char`s, not bytes. + let typescript_type_len = typescript_type.chars().count() as u32; let typescript_type_chars = typescript_type.chars().map(|c| c as u32); quote! { use #wasm_bindgen::describe::*; @@ -1182,9 +1183,9 @@ impl TryToTokens for ast::ImportType { let generic_param_names: Vec<_> = class_generic_params.iter().map(|p| p.0).collect(); let lifetime_refs = lifetime_params.iter().map(|lt| quote! { &#lt () }); phantom = quote! { - generics: ::core::marker::PhantomData<(#(#generic_param_names,)* #(#lifetime_refs),*)> + generics: #wasm_bindgen::__rt::core::marker::PhantomData<(#(#generic_param_names,)* #(#lifetime_refs),*)> }; - phantom_init = quote! { generics: ::core::marker::PhantomData }; + phantom_init = quote! { generics: #wasm_bindgen::__rt::core::marker::PhantomData }; } else { phantom = quote! {}; phantom_init = quote! {}; @@ -1234,7 +1235,7 @@ impl TryToTokens for ast::ImportType { type JsCanon = #rust_name #ty_generics; #[inline] fn to_js(self) -> #rust_name #ty_generics { - unsafe { core::mem::transmute_copy(&core::mem::ManuallyDrop::new(self)) } + unsafe { #wasm_bindgen::__rt::core::mem::transmute_copy(&#wasm_bindgen::__rt::core::mem::ManuallyDrop::new(self)) } } } } @@ -1324,13 +1325,13 @@ impl TryToTokens for ast::ImportType { #[automatically_derived] impl #impl_generics RefFromWasmAbi for #rust_name #ty_generics #where_clause { type Abi = ::Abi; - type Anchor = core::mem::ManuallyDrop<#rust_name #ty_generics>; + type Anchor = #wasm_bindgen::__rt::core::mem::ManuallyDrop<#rust_name #ty_generics>; #[inline] unsafe fn ref_from_abi(js: Self::Abi) -> Self::Anchor { let tmp = ::ref_from_abi(js); - core::mem::ManuallyDrop::new(#rust_name { - obj: core::mem::ManuallyDrop::into_inner(tmp).into(), + #wasm_bindgen::__rt::core::mem::ManuallyDrop::new(#rust_name { + obj: #wasm_bindgen::__rt::core::mem::ManuallyDrop::into_inner(tmp).into(), #phantom_init }) } @@ -1480,7 +1481,8 @@ impl TryToTokens for ast::ImportType { // Generate UpcastFrom implementations (unless no_upcast is set) if !self.no_upcast { - // 1. Always generate UpcastFrom for JsValue + // 1. Always generate UpcastFrom for JsValue, including its + // JsOption/JsNullable wrappers (like superclass targets below) (quote! { #[automatically_derived] impl #impl_generics #wasm_bindgen::convert::UpcastFrom<#rust_name #ty_generics> @@ -1488,10 +1490,22 @@ impl TryToTokens for ast::ImportType { #where_clause { } + #[automatically_derived] + impl #impl_generics #wasm_bindgen::convert::UpcastFrom<#rust_name #ty_generics> + for #wasm_bindgen::sys::JsOption<#wasm_bindgen::JsValue> + #where_clause + { + } + #[automatically_derived] + impl #impl_generics #wasm_bindgen::convert::UpcastFrom<#rust_name #ty_generics> + for #wasm_bindgen::sys::JsNullable<#wasm_bindgen::JsValue> + #where_clause + { + } }) .to_tokens(tokens); - // 2. For non-generic types: generate identity upcast (UpcastFrom for Self, UpcastFrom for JsOption) + // 2. For non-generic types: generate identity upcast (UpcastFrom for Self, UpcastFrom for JsOption/JsNullable) // 3. For generic types: generate structural covariance let type_params: Vec<_> = self.generics.type_params().collect(); if type_params.is_empty() { @@ -1510,6 +1524,12 @@ impl TryToTokens for ast::ImportType { #where_clause { } + #[automatically_derived] + impl #impl_generics #wasm_bindgen::convert::UpcastFrom<#rust_name #ty_generics> + for #wasm_bindgen::sys::JsNullable<#rust_name #ty_generics> + #where_clause + { + } }) .to_tokens(tokens); } else { @@ -1575,6 +1595,12 @@ impl TryToTokens for ast::ImportType { #where_clause_extended { } + #[automatically_derived] + impl #impl_generics_split #wasm_bindgen::convert::UpcastFrom<#rust_name #ty_generics> + for #wasm_bindgen::sys::JsNullable<#rust_name #target_ty_generics> + #where_clause_extended + { + } }) .to_tokens(tokens); } @@ -1594,6 +1620,12 @@ impl TryToTokens for ast::ImportType { #where_clause { } + #[automatically_derived] + impl #impl_generics #wasm_bindgen::convert::UpcastFrom<#rust_name #ty_generics> + for #wasm_bindgen::sys::JsNullable<#superclass> + #where_clause + { + } }) .to_tokens(tokens); } @@ -1628,7 +1660,7 @@ impl ToTokens for ast::StringEnum { let vis = &self.vis; let enum_name = &self.name; let name_str = &self.export_name; - let name_len = name_str.len() as u32; + let name_len = name_str.chars().count() as u32; let name_chars = name_str.chars().map(u32::from); let variants = &self.variants; let variant_count = self.variant_values.len() as u32; @@ -1898,7 +1930,7 @@ impl ToTokens for ast::DynamicUnion { }; let name_str = &self.js_name; - let name_len = name_str.len() as u32; + let name_len = name_str.chars().count() as u32; let name_chars = name_str.chars().map(u32::from); let mut string_variants = Vec::new(); @@ -2164,7 +2196,7 @@ impl TryToTokens for ast::ImportFunction { quote! { #concrete_ty } }; - convert_arg = quote! { unsafe { core::mem::transmute_copy(&core::mem::ManuallyDrop::new(#var)) } }; + convert_arg = quote! { unsafe { #wasm_bindgen::__rt::core::mem::transmute_copy(&#wasm_bindgen::__rt::core::mem::ManuallyDrop::new(#var)) } }; } else if let Some((is_mut, fn_bounds)) = detect_raw_fn_trait_obj(ty) { // Raw `&dyn Fn(...)` or `&mut dyn FnMut(...)` argument. // @@ -2206,59 +2238,17 @@ impl TryToTokens for ast::ImportFunction { convert_arg = quote! { #var }; } - // `slice_to_array`: re-route an `&[T]` (or `Option<&[T]>`) - // outgoing argument through `` - // instead of the default `&[T]: IntoWasmAbi`. The user-facing - // parameter is unchanged; only the ABI / describe path - // changes. `VectorRefIntoWasmAbi`'s impls cover the two - // genuine ABI shapes (zero-copy primitive borrow, - // fresh-`Box<[u32]>` for handle-shaped element types) — no - // `T: Clone` bound is introduced. - // - // Wire format is `WasmSlice` either way; the cli-support - // side picks the right JS shim based on the element - // `VectorKind` recovered from the descriptor. - // `slice_to_array` is set per-fn or per-`extern "C"` block - // and applies to every `&[T]` / `Option<&[T]>` argument of - // every fn it covers. Args that aren't slice-shaped (e.g. - // the `this: &Foo` of a method, or any other non-slice - // argument of a slice_to_array fn) silently fall through to - // the default ABI path — there's no per-arg opt-out form - // in Rust attribute syntax to require, so silent no-op is - // the only sensible behaviour. - if arg.slice_to_array && detect_slice_or_option_slice(ty).is_some() { - let (elem_ty, is_option) = detect_slice_or_option_slice(ty).unwrap(); - - let abi = quote! { #wasm_bindgen::convert::WasmSlice }; - let (prim_args, prim_names) = splat(wasm_bindgen, &name, &abi); - abi_arguments.extend(prim_args); - abi_argument_names.extend(prim_names.iter().cloned()); - - let body = if is_option { - quote! { - match #var { - ::core::option::Option::Some(s) => - <#elem_ty as #wasm_bindgen::convert::VectorRefIntoWasmAbi> - ::slice_into_abi(s), - ::core::option::Option::None => - <#elem_ty as #wasm_bindgen::convert::VectorRefIntoWasmAbi> - ::slice_none(), - } - } - } else { - quote! { - <#elem_ty as #wasm_bindgen::convert::VectorRefIntoWasmAbi> - ::slice_into_abi(#var) - } - }; - - arg_conversions.push(quote! { - let #name: #wasm_bindgen::convert::WasmSlice = #body; - let (#(#prim_names),*) = - <#wasm_bindgen::convert::WasmSlice as #wasm_bindgen::convert::WasmAbi> - ::split(#name); - }); - continue; + // `slice_to_array` re-routes a slice-shaped argument through + // `VectorRefIntoWasmAbi`; see `slice_to_array_rewrite` for the full + // rationale, including why a non-slice argument silently falls + // through to the default ABI path. + if arg.slice_to_array { + if let Some(rewrite) = slice_to_array_rewrite(wasm_bindgen, &name, &var, ty) { + abi_arguments.extend(rewrite.abi_args); + abi_argument_names.extend(rewrite.prim_names.iter().cloned()); + arg_conversions.push(rewrite.conversion); + continue; + } } let abi = quote! { <#abi_ty as #wasm_bindgen::convert::IntoWasmAbi>::Abi }; @@ -2300,7 +2290,7 @@ impl TryToTokens for ast::ImportFunction { fn_class_generics.add_fn_bound( parse_quote! { #ty: #wasm_bindgen::__rt::marker::ErasableGenericOwn<#concrete_ty> }, ); - convert_ret = quote! { unsafe { core::mem::transmute_copy(&core::mem::ManuallyDrop::new(<#concrete_ty as #wasm_bindgen::convert::FromWasmAbi>::from_abi(#ret_ident.join()))) } }; + convert_ret = quote! { unsafe { #wasm_bindgen::__rt::core::mem::transmute_copy(&#wasm_bindgen::__rt::core::mem::ManuallyDrop::new(<#concrete_ty as #wasm_bindgen::convert::FromWasmAbi>::from_abi(#ret_ident.join()))) } }; abi_ret = quote! { #wasm_bindgen::convert::WasmRet<<#concrete_ty as #wasm_bindgen::convert::FromWasmAbi>::Abi> }; } else { convert_ret = quote! { <#ty as #wasm_bindgen::convert::FromWasmAbi>::from_abi(#ret_ident.join()) }; @@ -2847,6 +2837,7 @@ impl TryToTokens for DescribeImport<'_> { }; let fn_class_generics = f.get_fn_generics()?; let fn_lifetime_params = generics::lifetime_params(&f.generics); + let wasm_bindgen = self.wasm_bindgen; let argtys = f .function .arguments @@ -2866,32 +2857,33 @@ impl TryToTokens for DescribeImport<'_> { // to their default describe — slice_to_array is a mode that // only acts on slice-shaped args. if arg.slice_to_array { - if let Some((elem_ty, is_option)) = detect_slice_or_option_slice(&ty) { - if is_option { - return Ok(parse_quote! { - ::core::option::Option<&::std::vec::Vec<#elem_ty>> - }); - } else { - return Ok(parse_quote! { &::std::vec::Vec<#elem_ty> }); - } + if let Some(described) = slice_to_array_describe_ty(wasm_bindgen, &ty) { + return Ok(described); } } Ok(ty) }) .collect::, Diagnostic>>()?; let nargs = f.function.arguments.len() as u32; - let inform_ret = match &f.js_ret { - Some(ref t) => { + let inform_ret = { + let wasm_bindgen = self.wasm_bindgen; + let describe = quote! { #wasm_bindgen::describe::WasmDescribe }; + if f.function.r#async { + // An `async` import hands back a `Promise` handle regardless of + // its declared return type, which never reaches the ABI: the + // resolved value is converted separately when the returned + // `JsFuture` is awaited. So describe an externref. + quote! { <#wasm_bindgen::JsValue as #describe>::describe(); } + } else if let Some(t) = &f.js_ret { let t = generics::generic_to_concrete( t.clone(), &fn_class_generics.concrete_defaults, &fn_lifetime_params, )?; - quote! { <#t as WasmDescribe>::describe(); } + quote! { <#t as #describe>::describe(); } + } else { + quote! { <() as #describe>::describe(); } } - // async functions always return a JsValue, even if they say to return () - None if f.function.r#async => quote! { ::describe(); }, - None => quote! { <() as WasmDescribe>::describe(); }, }; Descriptor { @@ -2916,7 +2908,7 @@ impl ToTokens for ast::Enum { fn to_tokens(&self, into: &mut TokenStream) { let enum_name = &self.rust_name; let name_str = shared::qualified_name(self.js_namespace.as_deref(), &self.js_name); - let name_len = name_str.len() as u32; + let name_len = name_str.chars().count() as u32; let name_chars = name_str.chars().map(|c| c as u32); let hole = &self.hole; let underlying = if self.signed { @@ -3310,23 +3302,36 @@ fn get_ty(mut ty: &syn::Type) -> &syn::Type { ty } -/// Detects whether a type is a raw `&dyn Fn(...)` or `&mut dyn FnMut(...)` argument. -/// -/// Returns `Some((is_mut, fn_trait_bounds))` where: -/// - `is_mut` is `true` for `&mut dyn FnMut`, `false` for `&dyn Fn` -/// - `fn_trait_bounds` are the `TypeParamBound`s from the `dyn` trait object (e.g. `FnMut(A)->R`) -/// -/// This is used by the import function codegen to auto-inject `MaybeUnwindSafe` -/// bounds for closure arguments, ensuring unwind safety when `panic = "unwind"`. -/// Recognise `&[T]` and `Option<&[T]>` argument types. Returns the element -/// type plus a flag indicating whether the outer `Option` was present. Used -/// by the `slice_to_array` codegen to rewrite the ABI path. -fn detect_slice_or_option_slice(ty: &syn::Type) -> Option<(syn::Type, bool)> { - // Direct `&[T]` (mutability ignored — `&mut [T]` is intentionally - // accepted too; the ABI layer treats it the same as `&[T]`). - if let syn::Type::Reference(syn::TypeReference { elem, .. }) = ty { +/// A slice-shaped argument recognised by the `slice_to_array` codegen. +pub(crate) struct SliceArg { + /// The slice's element type `T`. + pub elem_ty: syn::Type, + /// Whether the slice was wrapped in an outer `Option`. + pub is_option: bool, + /// Whether the reference was `&mut` rather than `&`. + /// + /// `slice_to_array` cannot honour this: it hands JS an owned `Array`, and + /// mutations to that `Array` are not written back into the caller's slice. + /// The parser rejects the combination rather than silently dropping the + /// write-back; see `check_slice_to_array_arg` in `parser.rs`. + pub is_mut: bool, +} + +/// Recognise `&[T]`, `&mut [T]`, and either wrapped in `Option`. Used by the +/// `slice_to_array` codegen to rewrite the ABI path, and by the parser to +/// reject the mutable and generic-element forms. +pub(crate) fn detect_slice_or_option_slice(ty: &syn::Type) -> Option { + // Direct `&[T]` / `&mut [T]`. + if let syn::Type::Reference(syn::TypeReference { + elem, mutability, .. + }) = ty + { if let syn::Type::Slice(syn::TypeSlice { elem: inner, .. }) = &**elem { - return Some(((**inner).clone(), false)); + return Some(SliceArg { + elem_ty: (**inner).clone(), + is_option: false, + is_mut: mutability.is_some(), + }); } } // `Option<&[T]>` — match shape `Option<...>` and recurse once. @@ -3336,8 +3341,13 @@ fn detect_slice_or_option_slice(ty: &syn::Type) -> Option<(syn::Type, bool)> { if let syn::PathArguments::AngleBracketed(args) = &seg.arguments { if args.args.len() == 1 { if let syn::GenericArgument::Type(inner) = &args.args[0] { - if let Some((elem, false)) = detect_slice_or_option_slice(inner) { - return Some((elem, true)); + if let Some(inner) = detect_slice_or_option_slice(inner) { + if !inner.is_option { + return Some(SliceArg { + is_option: true, + ..inner + }); + } } } } @@ -3348,6 +3358,114 @@ fn detect_slice_or_option_slice(ty: &syn::Type) -> Option<(syn::Type, bool)> { None } +/// The type to hand `WasmDescribe::describe` for a `slice_to_array` argument, +/// or `None` if `ty` is not slice-shaped. +/// +/// Describing through `&Vec` / `Option<&Vec>` makes the descriptor +/// `Ref(Vector(T))` / `Option(Ref(Vector(T)))`, which is what cli-support +/// recognises as "hand JS an owned `Array`" rather than "hand JS a typed-array +/// view". This must stay in lockstep with the ABI rewrite in +/// [`slice_to_array_rewrite`]: the descriptor is what selects the JS shim, and +/// the ABI is what the shim is handed. +fn slice_to_array_describe_ty(wasm_bindgen: &syn::Path, ty: &syn::Type) -> Option { + let SliceArg { + elem_ty, is_option, .. + } = detect_slice_or_option_slice(ty)?; + // `alloc`, not `std`: `wasm-bindgen` is `#![no_std]` and supports `no_std` + // consumers, so generated code must never name `::std`. + let vec = quote! { #wasm_bindgen::__rt::alloc::vec::Vec }; + // `Option` likewise goes through the `__rt::core` re-export rather than a + // bare `::core`, for the same call-site-hygiene reason as `Vec` above. + let option = quote! { #wasm_bindgen::__rt::core::option::Option }; + Some(if is_option { + parse_quote! { #option<&#vec<#elem_ty>> } + } else { + parse_quote! { &#vec<#elem_ty> } + }) +} + +/// The pieces of the `slice_to_array` rewrite for one argument. +struct SliceToArrayRewrite { + /// Flattened wasm ABI parameters to splice into the shim signature. + abi_args: Vec, + /// The names `conversion` binds, in ABI order. + prim_names: Vec, + /// Statements converting the user-facing argument into `prim_names`. + conversion: TokenStream, +} + +/// Build the `slice_to_array` rewrite for one argument, or `None` if `ty` is not +/// slice-shaped (`&[T]` / `Option<&[T]>`). +/// +/// This re-routes the argument through `` instead of +/// the default `&[T]: IntoWasmAbi`. The user-facing parameter is unchanged; only +/// the ABI and describe paths move. `VectorRefIntoWasmAbi`'s impls cover the two +/// genuine ABI shapes (zero-copy borrow for primitive elements, freshly +/// allocated `Box<[u32]>` for handle-shaped ones), so no `T: Clone` bound is +/// introduced. The wire format is `WasmSlice` either way; cli-support picks the +/// right JS shim from the element `VectorKind` in the descriptor. +/// +/// `slice_to_array` is set per-fn or per-`extern "C"` block and applies to every +/// slice-shaped argument of every fn it covers. Arguments that are not +/// slice-shaped (the `this: &Foo` receiver of a method, a `Vec`, any scalar) +/// return `None` and take the default ABI path — there is no per-argument +/// opt-out in Rust attribute syntax to require, so a silent no-op is the only +/// sensible behaviour. +/// +/// Neither `&mut [T]` nor a generic element type reaches here: the parser +/// rejects both up front (see `check_slice_to_array_arg` in `parser.rs`). +fn slice_to_array_rewrite( + wasm_bindgen: &syn::Path, + name: &Ident, + var: &TokenStream, + ty: &syn::Type, +) -> Option { + let SliceArg { + elem_ty, is_option, .. + } = detect_slice_or_option_slice(ty)?; + + let abi = quote! { #wasm_bindgen::convert::WasmSlice }; + let (abi_args, prim_names) = splat(wasm_bindgen, name, &abi); + + let body = if is_option { + quote! { + match #var { + #wasm_bindgen::__rt::core::option::Option::Some(s) => + <#elem_ty as #wasm_bindgen::convert::VectorRefIntoWasmAbi> + ::slice_into_abi(s), + #wasm_bindgen::__rt::core::option::Option::None => + <#elem_ty as #wasm_bindgen::convert::VectorRefIntoWasmAbi> + ::slice_none(), + } + } + } else { + quote! { + <#elem_ty as #wasm_bindgen::convert::VectorRefIntoWasmAbi> + ::slice_into_abi(#var) + } + }; + let conversion = quote! { + let #name: #wasm_bindgen::convert::WasmSlice = #body; + let (#(#prim_names),*) = + <#wasm_bindgen::convert::WasmSlice as #wasm_bindgen::convert::WasmAbi> + ::split(#name); + }; + + Some(SliceToArrayRewrite { + abi_args, + prim_names, + conversion, + }) +} + +/// Detects whether a type is a raw `&dyn Fn(...)` or `&mut dyn FnMut(...)` argument. +/// +/// Returns `Some((is_mut, fn_trait_bounds))` where: +/// - `is_mut` is `true` for `&mut dyn FnMut`, `false` for `&dyn Fn` +/// - `fn_trait_bounds` are the `TypeParamBound`s from the `dyn` trait object (e.g. `FnMut(A)->R`) +/// +/// This is used by the import function codegen to auto-inject `MaybeUnwindSafe` +/// bounds for closure arguments, ensuring unwind safety when `panic = "unwind"`. fn detect_raw_fn_trait_obj( ty: &syn::Type, ) -> Option<( diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/encode.rs b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/encode.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/encode.rs rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/encode.rs diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/error.rs b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/error.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/error.rs rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/error.rs diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/generics.rs b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/generics.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/generics.rs rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/generics.rs diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/hash.rs b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/hash.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/hash.rs rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/hash.rs diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/lib.rs b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/lib.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/lib.rs rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/lib.rs diff --git a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/parser.rs b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/parser.rs similarity index 94% rename from thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/parser.rs rename to thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/parser.rs index 5cdd603f7..efd6c2b66 100644 --- a/thirdparty/crates/wasm-bindgen-macro-support-0.2.126/src/parser.rs +++ b/thirdparty/crates/wasm-bindgen-macro-support-0.2.127/src/parser.rs @@ -910,17 +910,19 @@ impl<'a> BindgenAttrs, &'a Option, bool, + Option<&'a [String]>, )> for syn::ForeignItemFn { type Target = ast::ImportKind; fn convert( mut self, - (program, opts, module, block_slice_to_array): ( + (program, opts, module, block_slice_to_array, js_namespace): ( &ast::Program, BindgenAttrs, &'a Option, bool, + Option<&'a [String]>, ), ) -> Result { // `slice_to_array` is inherited from the enclosing `extern "C"` @@ -929,7 +931,7 @@ impl<'a> // individual arg overrides it via its own attribute (the // attribute is additive — you can only opt in, not out). let fn_slice_to_array = block_slice_to_array || opts.slice_to_array().is_some(); - let args_attrs = extract_args_attrs(&mut self.sig, fn_slice_to_array)?; + let args_attrs = extract_args_attrs(&mut self.sig, Some(fn_slice_to_array))?; let (mut wasm, _) = function_from_decl( &self.sig.ident, &opts, @@ -1074,13 +1076,22 @@ impl<'a> module, cfg_attrs, ); + // The *resolved* `js_namespace` (item-level, or inherited from the + // enclosing `extern "C"` block) is part of a binding's identity: + // two otherwise identical imports that differ only in their + // namespace resolve to different JS values, so they must not share + // a shim name. Hashing is gated on `None` so that shim names for + // imports without a namespace are unchanged. + let hash = match js_namespace { + None => ShortHash(data).to_string(), + Some(ns) => ShortHash((data, ns)).to_string(), + }; format!( - "__wbg_{}_{}", + "__wbg_{}_{hash}", wasm.name .chars() .filter(|&c| c.is_ascii_alphanumeric() || c == '_') .collect::(), - ShortHash(data) ) }; if let Some(span) = opts.r#final() { @@ -1224,14 +1235,24 @@ impl ConvertToAst<(&ast::Program, BindgenAttrs)> for syn::ForeignItemType { } } -impl<'a> ConvertToAst<(&ast::Program, BindgenAttrs, &'a Option)> - for syn::ForeignItemStatic +impl<'a> + ConvertToAst<( + &ast::Program, + BindgenAttrs, + &'a Option, + Option<&'a [String]>, + )> for syn::ForeignItemStatic { type Target = ast::ImportKind; fn convert( self, - (program, opts, module): (&ast::Program, BindgenAttrs, &'a Option), + (program, opts, module, js_namespace): ( + &ast::Program, + BindgenAttrs, + &'a Option, + Option<&'a [String]>, + ), ) -> Result { if let syn::StaticMutability::Mut(_) = self.mutability { bail_span!(self.mutability, "cannot import mutable globals yet") @@ -1250,7 +1271,12 @@ impl<'a> ConvertToAst<(&ast::Program, BindgenAttrs, &'a Option ShortHash((&js_name, module, &unraw_ident)).to_string(), + Some(ns) => ShortHash((&js_name, module, &unraw_ident, ns)).to_string(), + }; let shim = format!("__wbg_static_accessor_{unraw_ident}_{hash}"); let thread_local = opts.get_thread_local()?; @@ -1599,23 +1625,75 @@ struct FnArgAttrs { js_type: Option, optional: bool, desc: Option, - /// When set, an `&[T]` (or `Option<&[T]>`) argument is converted to a - /// freshly-allocated buffer that JS receives as a plain `Array` rather - /// than a typed array (for primitive element kinds). The wire format - /// matches `Vec` (ownership transferred + freed by JS) but the - /// JS-visible type is always a plain `Array`. + /// When set, an `&[T]` (or `Option<&[T]>`) argument is routed through + /// `VectorRefIntoWasmAbi` so JS receives a plain `Array` rather than a + /// typed array. Ownership of the underlying buffer depends on the + /// element kind: primitive elements are a zero-copy *borrow* of the + /// caller's slice and are never freed, while string/externref-shaped + /// elements arrive in a freshly allocated index buffer that JS owns and + /// must free (see `VectorLoadAsArray` in `cli-support`'s `js/binding.rs`). slice_to_array: bool, } -/// Extracts function arguments attributes. `default_slice_to_array` is the -/// inherited flag from the enclosing function / `extern "C"` block; per-arg -/// `#[wasm_bindgen(slice_to_array)]` ORs on top of it. +/// Rejects the invalid `slice_to_array` argument shapes on an imported +/// function, however the flag was applied (argument, function, or enclosing +/// `extern "C"` block): +/// +/// * `&mut [T]` / `Option<&mut [T]>`: `slice_to_array` hands JS an owned +/// `Array` copied out of linear memory, so JS's writes are silently +/// discarded rather than written back through the `&mut` — silent data +/// loss, so a compile error rather than a no-op. +/// * a slice element type mentioning a type parameter: the rewrite names +/// `<#elem_ty as VectorRefIntoWasmAbi>`, which no user-writable bound can +/// satisfy since the impls are keyed on concrete ABI shapes. Left +/// unchecked, the user sees `E0277`s naming private traits. +fn check_slice_to_array_arg(ty: &syn::Type, type_param_names: &[&Ident]) -> Result<(), Diagnostic> { + let Some(slice) = crate::codegen::detect_slice_or_option_slice(ty) else { + return Ok(()); + }; + if slice.is_mut { + return Err(Diagnostic::spanned_error( + ty, + "`slice_to_array` cannot be applied to a `&mut` slice: JS receives an owned \ + `Array`, so its writes are never written back into the caller's slice — use a \ + shared slice if JS only needs to read the elements, or remove `slice_to_array` \ + (it may be inherited from the function or the enclosing `extern \"C\"` block) \ + to keep the writable typed-array view", + )); + } + if !type_param_names.is_empty() + && crate::generics::uses_generic_params(&slice.elem_ty, &type_param_names.to_vec()) + { + return Err(Diagnostic::spanned_error( + ty, + "`slice_to_array` requires a concrete slice element type (e.g. `&[u16]`); a type \ + parameter cannot work here because `VectorRefIntoWasmAbi` is implemented per \ + concrete ABI shape — drop `slice_to_array`, or take the argument by value", + )); + } + Ok(()) +} + +/// Extracts function arguments attributes. +/// +/// `import_slice_to_array` is `Some(inherited)` only when `sig` belongs to an +/// imported (`extern "C"`) function, where `slice_to_array` actually changes +/// the outgoing-argument codegen; `inherited` is the flag from the enclosing +/// function / `extern "C"` block, which per-arg +/// `#[wasm_bindgen(slice_to_array)]` ORs on top of. It is `None` for exported +/// free functions and impl-block methods, where the attribute is a documented +/// no-op: a misapplied `slice_to_array` there stays inert instead of tripping +/// the import-only shape checks. fn extract_args_attrs( sig: &mut syn::Signature, - default_slice_to_array: bool, + import_slice_to_array: Option, ) -> Result, Diagnostic> { + let type_param_names: Vec<&Ident> = sig.generics.type_params().map(|tp| &tp.ident).collect(); let mut args_attrs = vec![]; let mut seen_optional: Option = None; + // Collected rather than returned eagerly so that every offending + // `slice_to_array` argument in the signature is reported in one compile. + let mut slice_to_array_errors = vec![]; for input in sig.inputs.iter_mut() { if let syn::FnArg::Typed(pat_type) = input { let attrs = BindgenAttrs::find(&mut pat_type.attrs)?; @@ -1708,13 +1786,20 @@ fn extract_args_attrs( check_js_comment_close(description, span)?; Ok(Some(description.to_string())) })?, - slice_to_array: default_slice_to_array || attrs.slice_to_array().is_some(), + slice_to_array: import_slice_to_array.unwrap_or(false) + || attrs.slice_to_array().is_some(), }; + if import_slice_to_array.is_some() && arg_attrs.slice_to_array { + if let Err(diagnostic) = check_slice_to_array_arg(&pat_type.ty, &type_param_names) { + slice_to_array_errors.push(diagnostic); + } + } // throw error for any unused attrs attrs.enforce_used()?; args_attrs.push(arg_attrs); } } + Diagnostic::from_vec(slice_to_array_errors)?; Ok(args_attrs) } @@ -1759,8 +1844,9 @@ impl<'a> MacroParse<(Option, &'a mut TokenStream)> for syn::Item { f.attrs.remove(i); } // extract fn args attributes before parsing to tokens stream; - // `slice_to_array` is irrelevant for exported free functions. - let args_attrs = extract_args_attrs(&mut f.sig, false)?; + // `slice_to_array` is irrelevant (a documented no-op) for + // exported free functions. + let args_attrs = extract_args_attrs(&mut f.sig, None)?; let comments = extract_doc_comments(&f.attrs); // If the function isn't used for anything other than being exported to JS, // it'll be unused when not building for the Wasm target and produce a @@ -2041,10 +2127,10 @@ impl MacroParse<&ClassMarker> for &mut syn::ImplItemFn { } let comments = extract_doc_comments(&self.attrs); - // `slice_to_array` is meaningless on exported impl-block methods (the - // attribute only changes the outgoing-argument codegen for imported - // functions), so we always pass `false` here. - let args_attrs: Vec = extract_args_attrs(&mut self.sig, false)?; + // `slice_to_array` is meaningless (a documented no-op) on exported + // impl-block methods; the attribute only changes the + // outgoing-argument codegen for imported functions. + let args_attrs: Vec = extract_args_attrs(&mut self.sig, None)?; let (function, method_self) = function_from_decl( &self.sig.ident, &opts, @@ -2608,11 +2694,17 @@ impl MacroParse for syn::ForeignItem { } let kind = match self { - syn::ForeignItem::Fn(f) => { - f.convert((program, item_opts, &module, block_slice_to_array))? - } + syn::ForeignItem::Fn(f) => f.convert(( + program, + item_opts, + &module, + block_slice_to_array, + js_namespace.as_deref(), + ))?, syn::ForeignItem::Type(t) => t.convert((program, item_opts))?, - syn::ForeignItem::Static(s) => s.convert((program, item_opts, &module))?, + syn::ForeignItem::Static(s) => { + s.convert((program, item_opts, &module, js_namespace.as_deref()))? + } _ => panic!("only foreign functions/types allowed for now"), }; diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.126/.cargo_vcs_info.json b/thirdparty/crates/wasm-bindgen-shared-0.2.126/.cargo_vcs_info.json deleted file mode 100644 index d9c286196..000000000 --- a/thirdparty/crates/wasm-bindgen-shared-0.2.126/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "21ac804a96c0c5c5d6459084686a9a17a8a3c865" - }, - "path_in_vcs": "crates/shared" -} \ No newline at end of file diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.126/.cargo-checksum.json b/thirdparty/crates/wasm-bindgen-shared-0.2.127/.cargo-checksum.json similarity index 60% rename from thirdparty/crates/wasm-bindgen-shared-0.2.126/.cargo-checksum.json rename to thirdparty/crates/wasm-bindgen-shared-0.2.127/.cargo-checksum.json index 5bf8bdbbc..e677821a8 100644 --- a/thirdparty/crates/wasm-bindgen-shared-0.2.126/.cargo-checksum.json +++ b/thirdparty/crates/wasm-bindgen-shared-0.2.127/.cargo-checksum.json @@ -1 +1 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"bf613e0ab71a7f7345734b0af1c9ff82117d84ff44c18a5788d2b4a59e1427cc","Cargo.lock":"3e36dd1d4bd10c66585ecccd0166af8129073f76762f5fc89e726997471c4559","Cargo.toml":"c9b178847a1df8f4cfc354268b56593642d6057855e57cb5135ccf2ca7237483","Cargo.toml.orig":"a77640c8cab74f0a3a7e6a6b3e2ee66fe14c48e20dc5a015b8b8e74b0acd237e","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","build.rs":"cc562769f4d55da465e081bb3187502bab20beb4704f22cc7d07be5ba4b765ae","src/identifier.rs":"05ce1e3dbaaa2c5a9be7ab66ccb11c924c46c75df214fa7477aed9b35152b10f","src/lib.rs":"b82702f08c2b4635b1807fb62262e470809d198dd0afbedc5d0cc24250fdf5e7","src/schema_hash_approval.rs":"21c68d7c52a82012673523e21ebfa7526f9955a686ef716cf21615941efb1511","src/tys.rs":"35d93e50402556c531a6c205618f78da2eb15c4b7877a39f636de667c1fb58ea"},"package":"dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24"} \ No newline at end of file +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"dfd86b93072bd620e407b0d96caebc47f569d1205d744bbaee05ceee643f45e2","Cargo.lock":"31ecd850121178c423e96c1abe42b80d1c80ddcde8bc2e9c48f44f26ab43631b","Cargo.toml":"fd1125298151f0612f55c1633228f906fd883c3320ad3ee31c024886b607196e","Cargo.toml.orig":"86acb5388cbc4523a717929a4fbf56f884a8024cc120e022c6bbe7c8ef6572a9","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"378f5840b258e2779c39418f3f2d7b2ba96f1c7917dd6be0713f88305dbda397","build.rs":"cc562769f4d55da465e081bb3187502bab20beb4704f22cc7d07be5ba4b765ae","src/identifier.rs":"05ce1e3dbaaa2c5a9be7ab66ccb11c924c46c75df214fa7477aed9b35152b10f","src/lib.rs":"b82702f08c2b4635b1807fb62262e470809d198dd0afbedc5d0cc24250fdf5e7","src/schema_hash_approval.rs":"21c68d7c52a82012673523e21ebfa7526f9955a686ef716cf21615941efb1511","src/tys.rs":"35d93e50402556c531a6c205618f78da2eb15c4b7877a39f636de667c1fb58ea"},"package":"7ef64dbcc55df09c7e5a46182d181c2cfa3e925f3da937ea764728b4bbb9dcbf"} \ No newline at end of file diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.127/.cargo_vcs_info.json b/thirdparty/crates/wasm-bindgen-shared-0.2.127/.cargo_vcs_info.json new file mode 100644 index 000000000..535c4288c --- /dev/null +++ b/thirdparty/crates/wasm-bindgen-shared-0.2.127/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "a579ee62b631fd1fa96c7740b52a2952b07c0219" + }, + "path_in_vcs": "crates/shared" +} \ No newline at end of file diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.126/BUILD.bazel b/thirdparty/crates/wasm-bindgen-shared-0.2.127/BUILD.bazel similarity index 98% rename from thirdparty/crates/wasm-bindgen-shared-0.2.126/BUILD.bazel rename to thirdparty/crates/wasm-bindgen-shared-0.2.127/BUILD.bazel index c978f7aa5..de15c9911 100644 --- a/thirdparty/crates/wasm-bindgen-shared-0.2.126/BUILD.bazel +++ b/thirdparty/crates/wasm-bindgen-shared-0.2.127/BUILD.bazel @@ -110,10 +110,10 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.2.126", + version = "0.2.127", deps = [ "//thirdparty/crates/unicode-ident-1.0.24:unicode_ident", - "//thirdparty/crates/wasm-bindgen-shared-0.2.126:build_script_build", + "//thirdparty/crates/wasm-bindgen-shared-0.2.127:build_script_build", ], ) @@ -167,7 +167,7 @@ cargo_build_script( "noclippy", "norustfmt", ], - version = "0.2.126", + version = "0.2.127", visibility = ["//visibility:private"], ) diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.126/Cargo.lock b/thirdparty/crates/wasm-bindgen-shared-0.2.127/Cargo.lock similarity index 95% rename from thirdparty/crates/wasm-bindgen-shared-0.2.126/Cargo.lock rename to thirdparty/crates/wasm-bindgen-shared-0.2.127/Cargo.lock index 93ee7e6f1..72b5a8312 100644 --- a/thirdparty/crates/wasm-bindgen-shared-0.2.126/Cargo.lock +++ b/thirdparty/crates/wasm-bindgen-shared-0.2.127/Cargo.lock @@ -10,7 +10,7 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "wasm-bindgen-shared" -version = "0.2.126" +version = "0.2.127" dependencies = [ "unicode-ident", ] diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.126/Cargo.toml b/thirdparty/crates/wasm-bindgen-shared-0.2.127/Cargo.toml similarity index 98% rename from thirdparty/crates/wasm-bindgen-shared-0.2.126/Cargo.toml rename to thirdparty/crates/wasm-bindgen-shared-0.2.127/Cargo.toml index 5e90a1a8d..71125cdc3 100644 --- a/thirdparty/crates/wasm-bindgen-shared-0.2.126/Cargo.toml +++ b/thirdparty/crates/wasm-bindgen-shared-0.2.127/Cargo.toml @@ -13,7 +13,7 @@ edition = "2021" rust-version = "1.77" name = "wasm-bindgen-shared" -version = "0.2.126" +version = "0.2.127" authors = ["The wasm-bindgen Developers"] build = "build.rs" links = "wasm_bindgen" diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.126/Cargo.toml.orig b/thirdparty/crates/wasm-bindgen-shared-0.2.127/Cargo.toml.orig similarity index 97% rename from thirdparty/crates/wasm-bindgen-shared-0.2.126/Cargo.toml.orig rename to thirdparty/crates/wasm-bindgen-shared-0.2.127/Cargo.toml.orig index d2637e721..270943816 100644 --- a/thirdparty/crates/wasm-bindgen-shared-0.2.126/Cargo.toml.orig +++ b/thirdparty/crates/wasm-bindgen-shared-0.2.127/Cargo.toml.orig @@ -12,7 +12,7 @@ license = "MIT OR Apache-2.0" name = "wasm-bindgen-shared" repository = "https://github.com/wasm-bindgen/wasm-bindgen/tree/master/crates/shared" rust-version = "1.77" -version = "0.2.126" +version = "0.2.127" # Because only a single `wasm_bindgen` version can be used in a dependency # graph, pretend we link a native library so that `cargo` will provide better diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.126/LICENSE-APACHE b/thirdparty/crates/wasm-bindgen-shared-0.2.127/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/wasm-bindgen-shared-0.2.126/LICENSE-APACHE rename to thirdparty/crates/wasm-bindgen-shared-0.2.127/LICENSE-APACHE diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.126/LICENSE-MIT b/thirdparty/crates/wasm-bindgen-shared-0.2.127/LICENSE-MIT similarity index 100% rename from thirdparty/crates/wasm-bindgen-shared-0.2.126/LICENSE-MIT rename to thirdparty/crates/wasm-bindgen-shared-0.2.127/LICENSE-MIT diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.126/build.rs b/thirdparty/crates/wasm-bindgen-shared-0.2.127/build.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-shared-0.2.126/build.rs rename to thirdparty/crates/wasm-bindgen-shared-0.2.127/build.rs diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.126/src/identifier.rs b/thirdparty/crates/wasm-bindgen-shared-0.2.127/src/identifier.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-shared-0.2.126/src/identifier.rs rename to thirdparty/crates/wasm-bindgen-shared-0.2.127/src/identifier.rs diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.126/src/lib.rs b/thirdparty/crates/wasm-bindgen-shared-0.2.127/src/lib.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-shared-0.2.126/src/lib.rs rename to thirdparty/crates/wasm-bindgen-shared-0.2.127/src/lib.rs diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.126/src/schema_hash_approval.rs b/thirdparty/crates/wasm-bindgen-shared-0.2.127/src/schema_hash_approval.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-shared-0.2.126/src/schema_hash_approval.rs rename to thirdparty/crates/wasm-bindgen-shared-0.2.127/src/schema_hash_approval.rs diff --git a/thirdparty/crates/wasm-bindgen-shared-0.2.126/src/tys.rs b/thirdparty/crates/wasm-bindgen-shared-0.2.127/src/tys.rs similarity index 100% rename from thirdparty/crates/wasm-bindgen-shared-0.2.126/src/tys.rs rename to thirdparty/crates/wasm-bindgen-shared-0.2.127/src/tys.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/.cargo_vcs_info.json b/thirdparty/crates/zerocopy-0.8.54/.cargo_vcs_info.json deleted file mode 100644 index 135e1d285..000000000 --- a/thirdparty/crates/zerocopy-0.8.54/.cargo_vcs_info.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "git": { - "sha1": "a986089ee73111d5bfda48b0c7d29d3f9301571c" - }, - "path_in_vcs": "zerocopy" -} \ No newline at end of file diff --git a/thirdparty/crates/zerocopy-0.8.54/.cargo-checksum.json b/thirdparty/crates/zerocopy-0.8.56/.cargo-checksum.json similarity index 97% rename from thirdparty/crates/zerocopy-0.8.54/.cargo-checksum.json rename to thirdparty/crates/zerocopy-0.8.56/.cargo-checksum.json index ea5356107..b23300dbf 100644 --- a/thirdparty/crates/zerocopy-0.8.54/.cargo-checksum.json +++ b/thirdparty/crates/zerocopy-0.8.56/.cargo-checksum.json @@ -1 +1 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"7733cf34273ea76bde85df350219f6d663c0631f9751bb65697ecee94daae76b","AGENTS.md":"24b16178226d2f96cafd03eed01113b4b0240c9e6a6cd938a155e991b4f11034","CHANGELOG.md":"876e5a74db78bdc53677ec4d489ce7b2fc87840f2dc094423cef406138082708","Cargo.lock":"0512fc9086fad9cb79b5c475923b1bb05f09e1a9a6f3bbe61ab48d04c470c53a","Cargo.toml":"794ad995b627ce06c6d8481ce9c5d1797bf32d38092278dc6569b60be86700dc","Cargo.toml.orig":"dad7cf560ab37d4f629df4f775a8e994a04355ac53ce022b665378c72f50166f","Cargo.toml.std":"318735caddb0c6f2212d081514d7f77ac63a5d40cbc0d09e30e1ae5f6aa0b4bb","LICENSE-APACHE":"9d185ac6703c4b0453974c0d85e9eee43e6941009296bb1f5eb0b54e2329e9f3","LICENSE-BSD":"83c1763356e822adde0a2cae748d938a73fdc263849ccff6b27776dff213bd32","LICENSE-MIT":"1a2f5c12ddc934d58956aa5dbdd3255fe55fd957633ab7d0d39e4f0daa73f7df","POLICIES.md":"c1a54cb1010af32f7ce5a2501f5ef62db44521aae816a08c577f5ec06afd09ea","README.md":"de9d295f1a9baa9c505ca73761e3f53d55c059f77af5fb5a6d0c984579ac1845","agent_docs/development.md":"1968154a95185b9380e469048fd2274b107a98ffb00b3da3dbc80aa4baf86147","agent_docs/reviewing.md":"34abe5cdc3cb774cb07ea772c966ee1fd8bfd30c355d6fbca73b750ce17e6caf","agent_docs/style.md":"754a8651c4a4d443b1daccbde1b8853c0a18ca0e6ed486b440bc82276479167b","agent_docs/ui_tests.md":"487ad1762f0c45d999df352f8924e70e992bd0ea78f2ac4c3d2100734caccf7e","agent_docs/unsafe_code.md":"c283df811efe9f7ff39c52ceec88c73162ce7f31bb8507891ccd46010ff4ebcd","agent_docs/validation.md":"8c0b06d018421ba9652a3d0dc33c4bdc50fd9265cabce8455c06a790a62a5fe8","benches/as_bytes_dynamic_size.rs":"bc6f72309310e7762ea85a24497cc5eba947465e171186746b441a66916ab2e1","benches/as_bytes_dynamic_size.x86-64":"bf3814972480492d29eaef3593751d97f4c2be6a80c434cf8ea0a093b3260fe8","benches/as_bytes_dynamic_size.x86-64.mca":"6ae3d2b1ef02d99a8cd711e3362292247a0919c104e1af34f0fb82a1445dc3de","benches/as_bytes_static_size.rs":"6191adc7ad68ffdfd07dcc6966423249bfc25c5099a17a913b8e646d4507ad09","benches/as_bytes_static_size.x86-64":"55b7041c5758eb73dca0c2562959251ef1c35cd9433eb91e3546c88cd5a6a616","benches/as_bytes_static_size.x86-64.mca":"3980419dab11d8998d74544caf728583bd02b8ff16d5f879914bd3fe0c774e5f","benches/extend_vec_zeroed.rs":"32946d8b52a37f5c192da452a3053dc42fa61b5f5859b2120f789b3a01d69674","benches/extend_vec_zeroed.x86-64":"15913385bd02afc5a2ac698e79b2a19ff5435862dbbdee7b38fb4139588fdcb6","benches/extend_vec_zeroed.x86-64.mca":"b007b0e5e155b9c3b5b7c1b59af7be43099045c510aab55490b5cd784603e527","benches/formats/coco_dynamic_padding.rs":"209c0e1835988be9c422c81a8fcaa5e884c4a54c383e49345df548b51b76645c","benches/formats/coco_dynamic_size.rs":"030c88042a4cb9ee91aa1daeec61008eaed2bf13101586a1b2857541280e1ee5","benches/formats/coco_static_size.rs":"209756544e8e3efc5504b7059674c2aed4a22e4318048c4cc3f9697e5959169c","benches/insert_vec_zeroed.rs":"8370069ddb494b6d639fdf3c233808fbaeb4d3ec6936742f043d50dd60ac5047","benches/insert_vec_zeroed.x86-64":"db9ca898bdb3fd3577ebd086ae2ad63ff22187d90d0120360e58175cee371351","benches/insert_vec_zeroed.x86-64.mca":"c13e8d670e7bc462c87cc3764f184cfbf3ac29130c02bb06fee06f7285ebf622","benches/new_box_zeroed.rs":"6a5c9b3ba00405166efd58479548a9e41ffc0a759ffc70ccd4eed21105e7cf69","benches/new_box_zeroed.x86-64":"5a863b8b1b49bc502fb7a6a0afd03081c453d5fb65a9488653367137c9b38360","benches/new_box_zeroed.x86-64.mca":"a6cd10c6e021b46ec36b4038119aac634ce2f076a3627f099b9c3b265eab5ae3","benches/new_box_zeroed_with_elems_dynamic_padding.rs":"e21b6c5401fed9e802c344c007c8bf894de9b92553aec559b9c96a10fcf70cb5","benches/new_box_zeroed_with_elems_dynamic_padding.x86-64":"23633771ccc9ddc9d1b04ca1e63d0e8a61fc420cadf00e618500b85eae9513f7","benches/new_box_zeroed_with_elems_dynamic_padding.x86-64.mca":"1e835f5fc44f193dd2620d55179b55eae3191298e1f9209512a1ed953b6e007d","benches/new_box_zeroed_with_elems_dynamic_size.rs":"131993ac38532a46b56b6a977f978516a91676c6ff2c46a33ed92fba73f19b1a","benches/new_box_zeroed_with_elems_dynamic_size.x86-64":"30aaf7308bbd96e2fb724f65049275d07975f593ca0626fdc8872467da115856","benches/new_box_zeroed_with_elems_dynamic_size.x86-64.mca":"77ed38493c482d9cd8322dc8194530f3248eea1b0a6e047d5af2c87f539c5515","benches/new_vec_zeroed.rs":"0dd979bccc197bb70387ae8c0ea2d7a791447bc11b2e112620275b60d67afa1f","benches/new_vec_zeroed.x86-64":"fca948196e5586920a1f07ef9a8f122e35c437a996686379d07954dda7d14877","benches/new_vec_zeroed.x86-64.mca":"919c504540d1c744724aae146e15dcbd5d3db8bb43afbaea7737c7f821708b0d","benches/new_zeroed.rs":"b36d564124f457af0925ae379de18ca32e5f7dc8a1ad9755ce0f4a9215b9fea0","benches/new_zeroed.x86-64":"a3dbfc054e164f95c79cf3c316e433116000932575d94030002cb698a7398023","benches/new_zeroed.x86-64.mca":"b5f0f9bf0e3242e46d23604b91ffc256641c927e394edb533da340f66977d037","benches/read_from_bytes.rs":"cb8054655e48401b6eec9d07a3e2a1d86b6dc0ca3d0dedf8beaa659769c629ac","benches/read_from_bytes.x86-64":"cbdf9358f44f216cdcfb75d9892401f03318ae447789b5b00b6f5f559df66c0f","benches/read_from_bytes.x86-64.mca":"630decf7391550c1111eb2d2c0c7233b3b7f72aa62cbcc35eec71e2651970882","benches/read_from_prefix.rs":"e5f5df80572e647103de6173d0ca33c8776f2cfe1a417462a0fc79e1b9e39471","benches/read_from_prefix.x86-64":"fbdbf6b88150477d10f7d2bc4186eb9cd839b2d906faa02d285b2cf65ef773a7","benches/read_from_prefix.x86-64.mca":"c66d38daa8aac4070f7d74d68c4f6adc897c1b9af8277c31454bad73b5afb420","benches/read_from_suffix.rs":"3c3e3c6d68bb7b88b7ce504c9e29beb407d9dddbd2d4bd267ae054b4b00ffb16","benches/read_from_suffix.x86-64":"8a20f508f04d2fef94eb8bd2aa28b345c746f3f1ff37b67fb03a54f1c19d8ba1","benches/read_from_suffix.x86-64.mca":"182f03a9956115c02d4ad8bac101f151417f9f75e892cd0929bee2a1d2854cd3","benches/ref_from_bytes_dynamic_padding.rs":"c9d8438e068a4501a5f481eb757a64311b57c593190f177bf24a2a5b5fb0e84e","benches/ref_from_bytes_dynamic_padding.x86-64":"8f5831ad4036de1d12e8b4dab976be51d2afd4766391f62e6a89df7326295934","benches/ref_from_bytes_dynamic_padding.x86-64.mca":"90347cd43b7e2def69bb26dc75cab9c1bbbd23c82e3b4ecf3ce0a17062355ddd","benches/ref_from_bytes_dynamic_size.rs":"9f985fdae45a02e2f1b337470fcbb8e807ea764afdab515cba08354464898e19","benches/ref_from_bytes_dynamic_size.x86-64":"53330c93db3821cc1b223133070725862f322c21a0c227079f528e442167ee06","benches/ref_from_bytes_dynamic_size.x86-64.mca":"91ed5ce8e2518c962399f9a1a09e6893a48fb69859e7b329110bdc0246a378d4","benches/ref_from_bytes_static_size.rs":"00e41e4bfc6733f252a8c3574b2d35c6a5bc0c71cbc5c9cbb7640a40e58932e3","benches/ref_from_bytes_static_size.x86-64":"3afd096d8b10e175ca221681b2bf086ca0f4e13801bb10a3dfe112aef5020eec","benches/ref_from_bytes_static_size.x86-64.mca":"d5ff4ff29c3608dcdfb6a1c595df7589a127ebd567e5af2a2f24e2bea49c74c3","benches/ref_from_bytes_with_elems_dynamic_padding.rs":"74f7c09a405153198de91b66b61500dc8a5e90d8de77d73b5229af75c18e83a2","benches/ref_from_bytes_with_elems_dynamic_padding.x86-64":"b74e5a9b0a142b852a1db3a6a078c13bc800f20150955b9f0063b19e1696d192","benches/ref_from_bytes_with_elems_dynamic_padding.x86-64.mca":"b72be497254ca4927d6ae5ad1d0dda860c09bbb91e29048cf2b2a73bf476758e","benches/ref_from_bytes_with_elems_dynamic_size.rs":"120c1c126db9c5392334200836765bee78bd33c7c73ca2b6a4363e80dfa6d24f","benches/ref_from_bytes_with_elems_dynamic_size.x86-64":"02c6bfe75b27a23180af4e2d0da33f62a9b7248261c5f42164ac5d388b4f6c69","benches/ref_from_bytes_with_elems_dynamic_size.x86-64.mca":"6301221ed727f2263353f70bec13ba71722b58e9687014c1dd20d6d221f53c23","benches/ref_from_prefix_dynamic_padding.rs":"3b7efa8fde8e0157362ae4cb783dabf7031ec36c477ede21b87f904ee4e6e237","benches/ref_from_prefix_dynamic_padding.x86-64":"4a2b82413006fa878196297c3be2843776dcc5af5b51d5a604af3c760cfd475c","benches/ref_from_prefix_dynamic_padding.x86-64.mca":"d388c1accdd53d71c1743c952b0bbe6a31f338c62a11c045d3d6eb946544d745","benches/ref_from_prefix_dynamic_size.rs":"d18c123c89fdc959bd66d8c709fff975fe1c950966a3c90b720884866601f233","benches/ref_from_prefix_dynamic_size.x86-64":"22b9971a80734664691be53dc641f218de85cbecc37a687df818a77fb57621fa","benches/ref_from_prefix_dynamic_size.x86-64.mca":"bf702d2d558346a30deb38ca57b0fba9bc5828dd961e0876658bf814e627c2c3","benches/ref_from_prefix_static_size.rs":"5571b296b3dd9971ff551683f106b507a297b4074c76396313298f41b8524850","benches/ref_from_prefix_static_size.x86-64":"af62d7e7e548d690507defffd94206529caf8c73a0d441938ad241cafafb98a4","benches/ref_from_prefix_static_size.x86-64.mca":"c077a745725944c0ac477f2f68ba080dcc135a9d9a8296c449f86258c4408c98","benches/ref_from_prefix_with_elems_dynamic_padding.rs":"2a28e5cd5bcfa05873921b18b5576ad20adc564076ed01c171f389c389be5c34","benches/ref_from_prefix_with_elems_dynamic_padding.x86-64":"4bd03a51e2518931693a4db97c01172024fc960cc2d3659c9f5bcf4a2606a0f2","benches/ref_from_prefix_with_elems_dynamic_padding.x86-64.mca":"a35423d84d41bc802509df25b62c0e42384901f9a99800e97ed94701f70bfa9f","benches/ref_from_prefix_with_elems_dynamic_size.rs":"da4405a3733aa47250f5504d1ecc7aebae4efbdd8a08fd65796ccefcd10279e9","benches/ref_from_prefix_with_elems_dynamic_size.x86-64":"f98bc594b5ad083a4d8e11c9366bebb9f79628a46795c22aba6bd2c161cb0328","benches/ref_from_prefix_with_elems_dynamic_size.x86-64.mca":"9a59ba7f62544dddd9c604c7c983a8cc54e4b84a5d03f6c2537b94f8cf08de46","benches/ref_from_suffix_dynamic_padding.rs":"b92dd40e3eb9a532bc3ff1bf97553ebf4efacc2f71cc5520c039ef797a2f6052","benches/ref_from_suffix_dynamic_padding.x86-64":"1f63f8bb138077301faef41e17c0f27ac380c56acf4b82709834f280180f9fbd","benches/ref_from_suffix_dynamic_padding.x86-64.mca":"5d13500dbdd608b16031f35de7d37cc0906938aeff78aa3e32b332fb8d490202","benches/ref_from_suffix_dynamic_size.rs":"8d53eab7093403b8aec08621dc0c2e5cdf024021932821b64cd91525af32505d","benches/ref_from_suffix_dynamic_size.x86-64":"9156cc6255b6802321bd56905218d8a9fb04c041d40357f6a02eee8cb440be97","benches/ref_from_suffix_dynamic_size.x86-64.mca":"6115bef636db71259dd465b1584b60709d83de48c8c84e2d28120948e233280d","benches/ref_from_suffix_static_size.rs":"2def689a8912007a4cb38f7cddf66e5cfd0ecb76979a694e7da0018c5edc33ab","benches/ref_from_suffix_static_size.x86-64":"c3d67e7189e048c831929008306a8c4e606d09ae080bb0599222e90cc2e71168","benches/ref_from_suffix_static_size.x86-64.mca":"c192700fc1e99ea9fb1ebcaf18ce032fe998777a412bb44d43ae67097a3c678c","benches/ref_from_suffix_with_elems_dynamic_padding.rs":"4d56060e465bd915e6a530cd93526257ba4ec25b8bd57d860932844d200f0e82","benches/ref_from_suffix_with_elems_dynamic_padding.x86-64":"0cc4dc423c20593bcd3f5ee11e17d5975782885c0dd63317c9cd134f961ea0fb","benches/ref_from_suffix_with_elems_dynamic_padding.x86-64.mca":"047132900dc80ecb689b7f0d805153002c942c48cb9bb7c693c624bcb3c6ecf1","benches/ref_from_suffix_with_elems_dynamic_size.rs":"41720ba3b552516f7dfebedc3ce92cb555449ac86655cb10e19388a3074d3c6f","benches/ref_from_suffix_with_elems_dynamic_size.x86-64":"ca1b65d60e5397410a188dd4d233d6000e5d6e46010849ca33e3e1d864a6a632","benches/ref_from_suffix_with_elems_dynamic_size.x86-64.mca":"c37b8165f900ac6e83d3363e39e704248f33f2edae2ca9e893f5382d2f3657ac","benches/split_at_dynamic_padding.rs":"ffc3b0c5b1ff0f689b0ec1a9152b3f5e70e3334caea5b724e8192db94cd2696e","benches/split_at_dynamic_padding.x86-64":"297da91d7aaa39f5a96332ec293a448fe47194920e658d0cc4756aa3269d10ee","benches/split_at_dynamic_padding.x86-64.mca":"2316761d26fc86957e7a4e79a0661a976228a985ff3404650d60e964ded18c11","benches/split_at_dynamic_size.rs":"81e0efa87a166df9200b7297ffccb2e414aa37d6609f1cdb92d3f54f1a352460","benches/split_at_dynamic_size.x86-64":"4851f90927ee5261cb82e7733beb27bc93964b2814067e47ecb7905136af84d6","benches/split_at_dynamic_size.x86-64.mca":"2316761d26fc86957e7a4e79a0661a976228a985ff3404650d60e964ded18c11","benches/split_at_unchecked_dynamic_padding.rs":"193cd7d03ef707b1221dd3da93a7bbade19a3a496ed7b6f804209e6bed484850","benches/split_at_unchecked_dynamic_padding.x86-64":"e50aba01f8359fd62ea63065d1dac955bc511f4f7e9533a3c7b49b6ea60b7a12","benches/split_at_unchecked_dynamic_padding.x86-64.mca":"c9d34a9e5ef8ed86340f94b3899b4429aee71614635c402e299580f372932dd5","benches/split_at_unchecked_dynamic_size.rs":"301d640fd1e752f67f0390e65e327ce1d872c76651ec4e6f6d056ccc272b7f25","benches/split_at_unchecked_dynamic_size.x86-64":"2e9d311a2fec8fa457337053397de970b1819d6ad6be9f7197c021773b462c7b","benches/split_at_unchecked_dynamic_size.x86-64.mca":"c9d34a9e5ef8ed86340f94b3899b4429aee71614635c402e299580f372932dd5","benches/split_via_immutable_dynamic_padding.rs":"8b54b565a1936c5830521b10601989baa11c390caa653775e5cdf1dd36602c88","benches/split_via_immutable_dynamic_padding.x86-64":"cb42e292ebda117fe218f3379ee5bedc988e15a6b990379645a041476a1a3632","benches/split_via_immutable_dynamic_padding.x86-64.mca":"cde4cc9f3a3fda9bb538744ea1c8eb939b6ce20a48f72fb71c86b2a139bd7a6c","benches/split_via_immutable_dynamic_size.rs":"9ae48a6ea21161d23f86b3bb1917d7ec7b1a076d469fc38f801b4a134a639a4d","benches/split_via_immutable_dynamic_size.x86-64":"8d96c6d900aec832843c6ffcb23b0579fabd2cbc8e746ebb093600b024c24259","benches/split_via_immutable_dynamic_size.x86-64.mca":"661ae9416d322ebaa5d16363c6bfe0a9a7a4cb6b0895101378022dba1eca7779","benches/split_via_runtime_check_dynamic_padding.rs":"1d76442da00d789d9540ebb20b552eee01bd33d00afcd5942f444e18222b4c1e","benches/split_via_runtime_check_dynamic_padding.x86-64":"9b6b254ce70213e3a05a39156fea455e257c799b099491bc5ee7dc41a74553d0","benches/split_via_runtime_check_dynamic_padding.x86-64.mca":"a7e8085b7bb8b9c47384b536bd39c22077c02c1689b66e6c6dfa4df79e538153","benches/split_via_runtime_check_dynamic_size.rs":"000a3143d23dac81ed96b1e3257bea46608f1b4e6c0de98af876687c88fe458e","benches/split_via_runtime_check_dynamic_size.x86-64":"fec062ec49973b0aae0310d564d7fc9c99ca1f3d6540f1619fdf3cc9cac08ad7","benches/split_via_runtime_check_dynamic_size.x86-64.mca":"661ae9416d322ebaa5d16363c6bfe0a9a7a4cb6b0895101378022dba1eca7779","benches/split_via_unchecked_dynamic_padding.rs":"b8f6716d3cea44b53ab1de3dda87019c6df24a36a14c0a843b4c2458d7a3a9e5","benches/split_via_unchecked_dynamic_padding.x86-64":"d7e624bda21874e1293c285ae28e6ab276e6bf25050ac0544fb6f416300c949b","benches/split_via_unchecked_dynamic_padding.x86-64.mca":"cde4cc9f3a3fda9bb538744ea1c8eb939b6ce20a48f72fb71c86b2a139bd7a6c","benches/split_via_unchecked_dynamic_size.rs":"5211dacd9541803443e6d71baff5f82a18080b679ec7f958429434f94f4c3b01","benches/split_via_unchecked_dynamic_size.x86-64":"aab14f776fe876df18e45fab72629e9f318a866de63385dff02e9b3bce631614","benches/split_via_unchecked_dynamic_size.x86-64.mca":"661ae9416d322ebaa5d16363c6bfe0a9a7a4cb6b0895101378022dba1eca7779","benches/transmute.rs":"ea2626b52bdee175ec1a03d46e74772ccc4a06fe92b0f72c74c882ff77f71539","benches/transmute.x86-64":"d96fb8dc445499c9d1e88ed43a1b8151edd10824122a34628d2b52b2b244f577","benches/transmute.x86-64.mca":"b5265f1b25858cee38b1ee854ee77204874dba98fbf075828b86f9b7a4b7566a","benches/transmute_ref_dynamic_size.rs":"aff55864d9f469013d123fc709ae54eefe676d0a97294e8cf77300a07b80968c","benches/transmute_ref_dynamic_size.x86-64":"74778193a60bc56cc125a5f426d2e6554fbb2a843a5d0ca9d876f4ac51609bf8","benches/transmute_ref_dynamic_size.x86-64.mca":"5884528f1ecddbd613a7a1b44bb90da3155a64b9712c7bf466ae6b99590db5e8","benches/transmute_ref_static_size.rs":"575185bc0b99e95a4334cb3852cbc20b67fc6ba784e2a251bdf2988e50087ea1","benches/transmute_ref_static_size.x86-64":"95c70f386d817e3459e05e51b3996419e67fb62261042200d4e9bd11e7686065","benches/transmute_ref_static_size.x86-64.mca":"b5265f1b25858cee38b1ee854ee77204874dba98fbf075828b86f9b7a4b7566a","benches/try_read_from_bytes.rs":"5dee2be274f7a6148b1cc56d0b4728ffcac4d3bf0ad08efd91be4ee609e126bf","benches/try_read_from_bytes.x86-64":"78da3d1420a2285bf45f7d63bffc3f586251d2bef140cbe3cfb7458f713c9ee1","benches/try_read_from_bytes.x86-64.mca":"cd65b57bb450e10f9d286cc3a1f68c4d36832aa2dfe2d6da13e378b39ddbb50f","benches/try_read_from_prefix.rs":"ab58c8c22aa6598fb00ea86f5f8f47e74780ab0e3529ac65ed70c4d90fb09df3","benches/try_read_from_prefix.x86-64":"4e0d3b06bb09d35165983352b14ed68dac983c1cec6dc07a71613304dce7ec8c","benches/try_read_from_prefix.x86-64.mca":"bc530626b05f2532dd41e40246a3265b52475438a73726f0dd8f5d20504761cf","benches/try_read_from_suffix.rs":"fedef98be3bdaf1bd5b64deb769f110959ffb570a9a7a0dd243ef91daaca8810","benches/try_read_from_suffix.x86-64":"ef2d48c617b88eb4e8937d558596e380f5d529120b48a6a4078671e402173861","benches/try_read_from_suffix.x86-64.mca":"5319d5efae21b3412f6f5a574424efdb3e630358bc56326b0a4776419a8641c8","benches/try_ref_from_bytes_dynamic_padding.rs":"6f4e39222ea4c26e285a87ff17229bff7163bdbf2c339237c1f83ad54036f0d0","benches/try_ref_from_bytes_dynamic_padding.x86-64":"2350ccb9e09b9939757da963cf527cf8efa88c40b31dac9ecd8b51863e8658a0","benches/try_ref_from_bytes_dynamic_padding.x86-64.mca":"8a4464e8879f06708a7913e9d7ef71d19166db1014971ffe9e3d1ce21c4358ba","benches/try_ref_from_bytes_dynamic_size.rs":"593f29b3fa067bc4c35efd73512e8d7b5b7b6d8b14cbc3dc4b4d1a7bb5bd7616","benches/try_ref_from_bytes_dynamic_size.x86-64":"f207873996864db03cab6566ebe23e1623409ed69e1c369cdad134c8eda6e008","benches/try_ref_from_bytes_dynamic_size.x86-64.mca":"0c0d22c64b003242a45e3aa08338598b287ba82f48e83e838a56c6a0fdbd14dc","benches/try_ref_from_bytes_static_size.rs":"8927f96863b2d45585c86b60a045fb8a52fa1d5212f74f60960ecca9c954872f","benches/try_ref_from_bytes_static_size.x86-64":"f11b5e06adb3f087577291cb58fc696eadeef07e0db757cd143a0e55bbf77720","benches/try_ref_from_bytes_static_size.x86-64.mca":"f5a05548b23a8c6878bf979e3ef03f19ba43be218753f9ad184b4d150a0d0baa","benches/try_ref_from_bytes_with_elems_dynamic_padding.rs":"54096e318ae16f77df588ec0c4e28425a77c7c791f3f7fd692b0614395c05311","benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64":"857d786d3fc5b60f1521766d309826470376e4ef16dd26f5b8ea4af0c26876c6","benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64.mca":"e192a1922b8ac5ee5478b77dd8b44c3f7beca5534d4e160568116b6e18d57d29","benches/try_ref_from_bytes_with_elems_dynamic_size.rs":"f4c73003266dd256228d983b7e250da8dfb7457da9bfaf4d8e0e8e45c133f916","benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64":"ee03f8e55059f9fd33dc1830da26575e6cda24f2c71cb624b75b62320b4f2cf7","benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64.mca":"a24a2590859af9a7383ae3ccf5791bfa0f1c24dda3c1a1686aff9f5bb477f683","benches/try_ref_from_prefix_dynamic_padding.rs":"03113947de7a3c4158e053189ff906fbd55a14d9fadb4240d3c10dd6bd37cf20","benches/try_ref_from_prefix_dynamic_padding.x86-64":"3b7574d7fab05c611215ad0112fc9371c89c7a8f9116926ba7759e87f56b5334","benches/try_ref_from_prefix_dynamic_padding.x86-64.mca":"a39b2da962a67b58f4c41c3f1a77652a6e17088f19e570405545a47b1eeb17a2","benches/try_ref_from_prefix_dynamic_size.rs":"9bc5c20f969cddc2fe3fed38244b0478972c7e947ebfcb7bcc0712900dfec3d4","benches/try_ref_from_prefix_dynamic_size.x86-64":"c38d672ba7d0af7a8f3ffb2537990d053a0972f16a51b43be1b56218c0e613c8","benches/try_ref_from_prefix_dynamic_size.x86-64.mca":"17ece20c26cf5ea28d3013e2fc6781b791e4d7fb004395ea4bbe5c22fac4e59c","benches/try_ref_from_prefix_static_size.rs":"201de9e4d4a8534752565412fd75a5c482e5ec3db31ec193281ad205cdfd85f1","benches/try_ref_from_prefix_static_size.x86-64":"418b9d63f2e2cf7bb84b233660dd3184f3c19e9fe0dc41798da0222dd0272971","benches/try_ref_from_prefix_static_size.x86-64.mca":"00f507c5ca32a2d1c5ee1f02522f66a4dc4db3cc0b82f633f4370f65cea649d1","benches/try_ref_from_prefix_with_elems_dynamic_padding.rs":"cd469c1e83b401aa25184346f6cc2ee80c3b4dcb478f7950cc70495868435453","benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64":"1371881016ebd06a2710f6de699c3ee48c506c10692ea83cbd8a2e33e77578c7","benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64.mca":"17431ebf7700898e4d71b4cd16479cf76d2182c7502c7de281fa375e67cc42c7","benches/try_ref_from_prefix_with_elems_dynamic_size.rs":"3b5d0290fd919e582c8b696a355aaa164c1bf65aac9a063b9ee5343d4e3ffee1","benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64":"c0a97bd210438081bde5bfda99765fd9965a5155ecf7250a64286347f8035b47","benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64.mca":"08d701ab0380bd2236f53bfa0bfe4d76ff34b39f81caff9851435ec96f8f040c","benches/try_ref_from_suffix_dynamic_padding.rs":"7329ed7cada43f927cf8cd633563bd7cebd417c69105e28db9a06e343583c025","benches/try_ref_from_suffix_dynamic_padding.x86-64":"5f8e084475b725672b94a6e7ae6a26096c6f67eef3611dbcfb3e38ae1ab2ab88","benches/try_ref_from_suffix_dynamic_padding.x86-64.mca":"773346a942e6732c31660cb96d47ec3249718e1ae23505f44440166d0f376686","benches/try_ref_from_suffix_dynamic_size.rs":"1cd46928c72ddf37c37d9d6cc1ad39e872e46859d8ae3d02d864915c6bcab15d","benches/try_ref_from_suffix_dynamic_size.x86-64":"700632e51bd9730aa8487510f3dc7c4a4cda2dcd00f25be44be2b857c2198b38","benches/try_ref_from_suffix_dynamic_size.x86-64.mca":"188970455bb58c1a8a1ede8f210932687a1e1854a8d9d7a9ee11d51868ad90c5","benches/try_ref_from_suffix_static_size.rs":"8219d93922dc0578c369060d1bdfec73a0e3fb014a42d89edc8c160de439fad7","benches/try_ref_from_suffix_static_size.x86-64":"67cf035f42d9edd78409998d1373aa62cd9fe1e5b7d29262940726227fa1bbf3","benches/try_ref_from_suffix_static_size.x86-64.mca":"44e291ab42760672d19d39532b2f46676a3d065ea6d3e8b399ba0b3970e8171b","benches/try_ref_from_suffix_with_elems_dynamic_padding.rs":"857ef60dbf5fb30a8fc6848fb9aa9ebf7410d83691a37b3a8f473d26ef93c6ee","benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64":"f1d1285a08c3ae8749399bf0dbdd1871659bbb927ddb24eb2f488b4ca955d712","benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64.mca":"48decc0d9f0259e6c925e4876a95df8d1f2397e7e48092e96518d96ba223a534","benches/try_ref_from_suffix_with_elems_dynamic_size.rs":"31cfb930987bd3f347ed0e4092c2bbbda91ad859ca7d86435dacef0c834cbfa8","benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64":"05ac42d6432f821f17af75616616e435907106a1df58a09ce48c639ce6c8b0b9","benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64.mca":"3d16953574488344f8decdeecaab3bc31e145c052d7ec4e57073ec4c14a87d16","benches/try_transmute.rs":"dd44a381c54b8df4a5c826fc12787c111668533ae4174bde2e5598e1f5603c73","benches/try_transmute.x86-64":"f49f4a9d0fef8918588607b064e28a8c3f780ff864206047ea53a8f3feb88de7","benches/try_transmute.x86-64.mca":"01212e9c4549e529534f1e818b32fe9f0d121731cdce3411a63a1a91fb3df050","benches/try_transmute_ref_dynamic_size.rs":"92d973710e22733d4cb177df4f9871fe164235c07a0d968cda83c0b9c3839d9d","benches/try_transmute_ref_dynamic_size.x86-64":"98d4e4d0e484bc216ca690878b66d7745bd0eb1331cf161322442534a22e1944","benches/try_transmute_ref_dynamic_size.x86-64.mca":"6ceb19a33e0e2d18f53ec70402100c47da202fcffd56d5ff996828285f340e10","benches/try_transmute_ref_static_size.rs":"a9a93a2c565770780c3e7de76a4b8c87571f771380a80b3bda376cdd69b5f98e","benches/try_transmute_ref_static_size.x86-64":"3ae89ab690ca15802712776d08dbcd36dba6a2bd7bfce1ef989295d0b2ce8364","benches/try_transmute_ref_static_size.x86-64.mca":"de3f7a20f918138bda8e74cd9789cbea6cc089e0d5d0252a72ed2a15a762f8ec","benches/write_to_dynamic_size.rs":"6b302190ff3141ba4c600ee12726b53d26bbb2ca23ee32487e0617d1f0f05b82","benches/write_to_dynamic_size.x86-64":"df321bcd81afb0003083dc63bc11904b9618c03e85d2cc4d989e423e3881d167","benches/write_to_dynamic_size.x86-64.mca":"a432c07f80293913fa10e2fbab4aa2917901752a3b94de7c33bacbe49d4155e4","benches/write_to_prefix_dynamic_size.rs":"77fd633f005886108d94bf1d46cb75fbdf5710ff3976c0b243709351b31e7b99","benches/write_to_prefix_dynamic_size.x86-64":"b92f89757d531453cbd8738aaa2a1613693fa3a81c80a0c504ed99895a672e0a","benches/write_to_prefix_dynamic_size.x86-64.mca":"e1c1eddc93caa9ae5a5542bcacff25be5910e992e52ae6701c07405bed50b055","benches/write_to_prefix_static_size.rs":"f3e8e02e2bf9b3314bfcc3b50a3ada5fff18e1b10b895e3667dbd11bf5920cf8","benches/write_to_prefix_static_size.x86-64":"e6181d0c3f568620b8d4b731319902fbf8c60b4087f88f9eda5a3c8197be9e04","benches/write_to_prefix_static_size.x86-64.mca":"290247dc36cadf17485643828dc7860a4c6a1285dc10da70f1f1f7bfce61e9a1","benches/write_to_static_size.rs":"84e4865798576b4f988f3d071fcedbcf31c07008ec73114e1926876bc1c8af8f","benches/write_to_static_size.x86-64":"ebdeaecbcf1a95a5f0895248eb23947e3572215c9ac38cc4da8911f119570a1e","benches/write_to_static_size.x86-64.mca":"a91226a32a8857374e3f8fbf8b7fc13ab7df5ade46be21113c62fdec90259e09","benches/write_to_suffix_dynamic_size.rs":"17b526e3db8ac97b7387f4ca852a110ffa5308013723a9cc068e3b70f7719701","benches/write_to_suffix_dynamic_size.x86-64":"86931eed41acf697f55d07a8c2d7123e3a38cbed35d7e35f808ffe3ffc35fb59","benches/write_to_suffix_dynamic_size.x86-64.mca":"778e0b109d5c9920d9ce797fb1a5e92a8536d32cff1094ff9e95b910dacf0ccb","benches/write_to_suffix_static_size.rs":"9eab793af46f81d5d593b4f2ca869495c644da8c4fd21db52bf947b19c630003","benches/write_to_suffix_static_size.x86-64":"0995d60a863e6496d6d2923f3ad25fbea98a410e5a2462620d91f48cde1ec610","benches/write_to_suffix_static_size.x86-64.mca":"f79144ae203fed71d924de9b131301b6a57a440e3eea64bed110b28cb8bbe070","benches/zero_dynamic_padding.rs":"10961bb9bf932808a26387bfb71b68bc09588812748e40f7603aa62bf5c1311a","benches/zero_dynamic_padding.x86-64":"d4fae8108c86e8c6eb6e4c7c4dd96c4525ad7b89704f8fa9f6d0beaa3db2ffd6","benches/zero_dynamic_padding.x86-64.mca":"b8250bb8e5f27d1dac95143fd8df961f1cf0e474bc85da659a26f9cd6319a14d","benches/zero_dynamic_size.rs":"c1db2f54c4028bebf3474e7e39cc519cfecb816b9885811b5113570dfd27c022","benches/zero_dynamic_size.x86-64":"55fac52a9a376078e450a661f9e8617983082efb8d6595ca0ca5b0a5b4195f4a","benches/zero_dynamic_size.x86-64.mca":"6d7d2627b3eff59d515775220a7d18ee179efb3ce4b884d9465d7b6ca2dd80e2","benches/zero_static_size.rs":"74ff0743381da3935c904aac3eb6af54c6e3f653833639e2ba447e754eea7498","benches/zero_static_size.x86-64":"2a6eef60a97730e17dca02b0f82676e030ed48c4886ad262cf9da82c6c0a1451","benches/zero_static_size.x86-64.mca":"3e4499c9259c7240bb37dc0e7b2f18169a3805b3274407424f6ecf6c0c0a4c2d","build.rs":"916639a8cc523f6b7551c946706f551b24352cd50c84a2284ca313798bc77ee5","cargo.sh":"23b2eddb1e982dcc2228b573bb92a768e05e056e24f440d7efdf7fb1a747ac87","ci/check_all_toolchains_tested.sh":"979cece8aff80ff997bc317f9e48bb9f9a8c36486e7f23d7f1e869c75f03de85","ci/check_fmt.sh":"83e6654d1b6658c6d65c8b0beb4cbe7aaaa0cbf3cd4cc4d196d40b7c21f8d9eb","ci/check_msrv_is_minimal.sh":"b6adac6e751ef1dd5927090b30bb098a64e9c9c50e047562088b889e25c2d5fc","ci/check_readme.sh":"c23dc51696893e171018fb1cb86b7c606a2cd3ad4800c7a44f913a1451607c5e","ci/check_stale_stderr.sh":"61a25ca45e05e684c31af4f926c15c7d7f97945f90a744038ab45816799dc6d0","ci/check_versions.sh":"c2603621c4981c1400d946cd83b2d3af0ba7db2355779b55eab89ca2c821fe0d","ci/release_crate_version.sh":"e5f4b957eae4251f66a9497cc596533d767d97a841556c5c18425aa7259005eb","clippy.toml":"df67a6131fff2fe52309e797d2dfad080fc8cbdfcb1baa7f14415b3e397c291c","rustdoc/style.css":"2622d8f676bd9e577d67f8fd962eca950d0c6df33b4b21b3df6ff7474fcd51ca","src/byte_slice.rs":"c61c875a6e10aa06c44300337e7e270099a4a5ece7ddd4863de2cef4439087b4","src/byteorder.rs":"625b300f1066d562e0eed5ef31fcdd52ed1c94bb4dde2e442081d1de32640f89","src/deprecated.rs":"0762789a318b47fefd1d852160472d1ef91d994f2914304bd7c4544cc8368664","src/doctests.rs":"dcbadd8d83a676ba003d00e9ce038cb7752224fd700be4547ae7f56b17ab718d","src/error.rs":"c521740e956bc25fc22d60f12578235784b8ff905e8b145a3cbbe9710349252c","src/impls.rs":"f3c00559de44fc20790a651d264b20729081ef006dd97e7964734adb6cf3fefb","src/layout.rs":"e9528c0ea3dc40aee4b8a6746c158cdaf259e56ccc8173e0a86be31d5c92df09","src/lib.rs":"acf675cf57d0c7fd5e6472e52018fbf66cc317cdae431382b3f04ea1a3ee36a2","src/macros.rs":"c3bd3b90839f70e3ac7ad7f72ec6c5b677660438460bf6378e29b8a0426e28cb","src/pointer/inner.rs":"e7fbf63f695054fcebc0e353d0c1b7a75d87c30af7d64395aca86b088dd07bac","src/pointer/invariant.rs":"7df5d13cc79e7ad469580da8d0bf9071e37a45723e417d31c55820616660cbdc","src/pointer/mod.rs":"fed883833d01acb38b152b2f251acf4bda6b1b4c58be6c50edab5341f97b107c","src/pointer/ptr.rs":"f696788823a4b0edd03e468beb9e42218a78e6b67d55772b1bfe11e336f2894f","src/pointer/transmute.rs":"3b98c64ff06d0cf49170bb8dc1260538a185c4a104909f25ed0d7a303bc27dbc","src/ref.rs":"3898b5572753c43d19c14b4ac8c4fed57cd3d238ad6fb142b0df1a7b4cbaead5","src/split_at.rs":"b818a62ea96836a18b70a07fa24e1b9537ea991f9493475b1ac84adc0e149610","src/util/macro_util.rs":"ab8ac34eb75d2c73b8a5a7f961bddf12f8576b0aeb63aa87ee1382d6c199d73f","src/util/macros.rs":"4c5cdf81bc7ae7bbed91ba3268b4a9989fe46a88850193a57f4f47c0888c4992","src/util/mod.rs":"b0252fc08c2a607123c04713d4aeb37e7edcc52b4dd8c4245080efe4ba334825","src/wrappers.rs":"add04d276505e9682851a5dee070d513b5db31e7b044aaf5db8b85fac478eaae","testdata/include_value/data":"88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589","tests/codegen.rs":"51afd6c3e479bcff84fca340573116db6be9f1fc99c0c5a411583bd12f440c0f","tests/include.rs":"3cb8eb691d41d7a3eafe9136afca5cad302430f6b08c2f3d03cd7a3d25fe74ef","tests/ui.rs":"18a8867ac684ae60956b930e6cbcfe315782f02212c2e9b4366c55a1a7ed266c","tests/ui/diagnostic-not-implemented.msrv.stderr":"d8638ecfef2760737c482f0e2a0938f825b26e66d2d5495f522e546a46c9286b","tests/ui/diagnostic-not-implemented.nightly.stderr":"7a2fe6726edff770d0948460a4d6cd725d26e3a6d644115f17980d83fec45449","tests/ui/diagnostic-not-implemented.rs":"04444c8b5e902ae5d6ca95d7bf049ea4dc992df03e05209abce7ca0de261cf73","tests/ui/diagnostic-not-implemented.stable.stderr":"7a2fe6726edff770d0948460a4d6cd725d26e3a6d644115f17980d83fec45449","tests/ui/include_value.msrv.stderr":"4d2da000f1093babc597cff41b117d0f53c6c92e8b88066afe0b8a4fc812e167","tests/ui/include_value.nightly.stderr":"02bcd0565ea0ff9e45529a1c355b5dbd36ce2e1991b47b1ccf37d1a23967059b","tests/ui/include_value.rs":"5f9a57d10865b2daca4d0bdac56ed5d780b7cf614854b22a4a13073f5700732a","tests/ui/include_value.stable.stderr":"02bcd0565ea0ff9e45529a1c355b5dbd36ce2e1991b47b1ccf37d1a23967059b","tests/ui/late-compile-pass.msrv.stderr":"51ca8d6369a7f5c3bdf09dd8aab556f57ea754c7005706518fd5f2f27ead601e","tests/ui/late-compile-pass.nightly.stderr":"44e70b87be480afc32a66d69d567c9c07cf2e0baf453f3096c1d3aa413c6d97d","tests/ui/late-compile-pass.rs":"b4524a6c3484be51b3279d797bdbaa91171f830aab6874c794f95db1712ec22b","tests/ui/late-compile-pass.stable.stderr":"4cd6218c014c6c9c6f34542efc71385de0c621712adb031804508ac3848b8cbc","tests/ui/max-align.msrv.stderr":"15dc5399d02087a7b3883da74ecb2756e5dc1a22f1eb7d4bdcb0489da6d3a125","tests/ui/max-align.nightly.stderr":"0f39068f91e6463be59a0cb35b6c2c531329635c170d4b0dddc8bec92705d730","tests/ui/max-align.rs":"9866fc49d8bbeea1e4dfbfb971ed7bc6e2087857abd021b3125f487fb89788fe","tests/ui/max-align.stable.stderr":"0f39068f91e6463be59a0cb35b6c2c531329635c170d4b0dddc8bec92705d730","tests/ui/ptr-is-invariant-over-v.msrv.stderr":"b9ba2d9053168dff5152e408fd2ce78e82a66503e311a70da51f568090cff0a8","tests/ui/ptr-is-invariant-over-v.nightly.stderr":"3a245dd9d774a723db7623eb7f47918c85b2b23a23151ed51ece60bbe298c7ed","tests/ui/ptr-is-invariant-over-v.rs":"84e6586ebf512cfd48511dad64b06c978f459595772e33ae576a87c79ee959b0","tests/ui/ptr-is-invariant-over-v.stable.stderr":"3a245dd9d774a723db7623eb7f47918c85b2b23a23151ed51ece60bbe298c7ed","tests/ui/transmute-ptr-to-usize.msrv.stderr":"2be4e6380811343cd4129fbcbb823841ee2a5c5ee230897a4b078f2b8f098490","tests/ui/transmute-ptr-to-usize.nightly.stderr":"d9358d4d6e77b2571def38c212534ea9e4eb603eb9aae4eb1bda00911dceffd3","tests/ui/transmute-ptr-to-usize.rs":"2860895519d4d28b6d6d56393b6d85895022c5629bc45cdcf549786486cdeddd","tests/ui/transmute-ptr-to-usize.stable.stderr":"450d1fc8bb84641330db254da4cf5ce932a609b2555f91b58232b83f831958d8","tests/ui/transmute.msrv.stderr":"95194ad9df5a535db44633979f2ad4bfcec1e351e9af3cf925aac631f4e042ec","tests/ui/transmute.nightly.stderr":"5217be6ba44dd5a6d0cd0bd81c0ec67fbcd83a4bbb93709637ee475af4ab99cb","tests/ui/transmute.rs":"49d473f40d7cdde8e42b1cc38cb2cadedb13c7148e2ef08f5119fe5bb351a851","tests/ui/transmute.stable.stderr":"5217be6ba44dd5a6d0cd0bd81c0ec67fbcd83a4bbb93709637ee475af4ab99cb","tests/ui/transmute_mut.msrv.stderr":"eae8b51586eb2de0afa38dedb2d402c0530bcd9419f6fd297a94d76e3e1d2d0c","tests/ui/transmute_mut.nightly.stderr":"77ee66fa707de60d65d4d2260e3ec02e6f8962b16ab65b0c70e038a2d9d8ea95","tests/ui/transmute_mut.rs":"6adbfef906b6f4321f8b00510e422c421378465eaab1f2d41395e178d629ac16","tests/ui/transmute_mut.stable.stderr":"b5d42431c6fdeac65673844fab63546334c8c7b3e458e549eb70272eb282c3c3","tests/ui/transmute_ref.msrv.stderr":"4ebea0a5c88ad025c8e6b8e020f75365124fc1ef52f851ff3ee1a7230d9207e0","tests/ui/transmute_ref.nightly.stderr":"d29c5e9725764961aa89230e9dbb2db934d8233d4e76a32329a721f5916017cc","tests/ui/transmute_ref.rs":"b4df55cc80bac00a05e3ab26bcd18be48901a5165d48b9bc5d35280633ce3da1","tests/ui/transmute_ref.stable.stderr":"3f598aec6a43e0777727543b58a09a98ba06337dedb612119b68b7d59c2290e9","tests/ui/try_transmute.msrv.stderr":"26d4e6bbf9b3114ea58ac837bc284ceb3acc608c86eddf1a703b50e557811da9","tests/ui/try_transmute.nightly.stderr":"855c6f5d43bcd6361d41e4df5a1901c1bf6b1f97633b9031d2060b36386d49e8","tests/ui/try_transmute.rs":"a81e8d96baca0d16e985ab9f9626f5d7d09b0dc61a5e61ccfadcc173d2a3bcfd","tests/ui/try_transmute.stable.stderr":"53e659d311102e4eeb2b7aef08378301ca8aa48ec21985860ecf79dbd2366e9c","tests/ui/try_transmute_mut.msrv.stderr":"fc38f71974c33c742af83b863fd8528b11f5ce3da808b123e1103faca3456387","tests/ui/try_transmute_mut.nightly.stderr":"dfe60a7639c48312cb4bc8db2c8f8411030ab1584fada30b19e1b8a225a1dc33","tests/ui/try_transmute_mut.rs":"9860d6d8beb0a6c553b91c6cd8c0b8143ee9dd57f80d0ad5eac90d6f0d442e67","tests/ui/try_transmute_mut.stable.stderr":"36817b95eb8213e35b263dbcf061569df42cc518a256bd172988a8f34e2c5d1b","tests/ui/try_transmute_ref.msrv.stderr":"0456af652b08e2fab6e3f71284c727baf45d7208c6661056fcbd0ca2a563dd81","tests/ui/try_transmute_ref.nightly.stderr":"189a4cc84b5a19f6458d1d91cc984a9d7372f2b688bbe656b499b2903948ada5","tests/ui/try_transmute_ref.rs":"bde79572927a2f31f40e5249bf07befb9a7e5e31b0fcb601751d916d5da39a1f","tests/ui/try_transmute_ref.stable.stderr":"ca0e90f5995ba18b214b02a0fad106902849c60e1f40638a2402d87bff69728e","win-cargo.bat":"892ced98796378161965ed3c4260fe77f4e66650051849864936877da7420f0d"},"package":"b7cbbc0a705a0fd05cc3676525980d2bf5a9bc4adac6d6475209a7887cf59d19"} \ No newline at end of file +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"de6d56a451ed0fd4a2689c6934eb7ff5375b860ad39fcfdc5ef5143f2593a494","AGENTS.md":"24b16178226d2f96cafd03eed01113b4b0240c9e6a6cd938a155e991b4f11034","CHANGELOG.md":"876e5a74db78bdc53677ec4d489ce7b2fc87840f2dc094423cef406138082708","Cargo.lock":"733245edfb8d480ffa01385c8fb7c18d94657b7fbd3dfd0969214a79924d741c","Cargo.toml":"ae34a0a68d83150615fb9039f13631fef4699cde9f4a73ad14db3763887d3728","Cargo.toml.orig":"e9f61afc470afbc7e0d09435f1725dec6d73266a4e9ff3fd1aca5a678e58c117","Cargo.toml.std":"318735caddb0c6f2212d081514d7f77ac63a5d40cbc0d09e30e1ae5f6aa0b4bb","LICENSE-APACHE":"9d185ac6703c4b0453974c0d85e9eee43e6941009296bb1f5eb0b54e2329e9f3","LICENSE-BSD":"83c1763356e822adde0a2cae748d938a73fdc263849ccff6b27776dff213bd32","LICENSE-MIT":"1a2f5c12ddc934d58956aa5dbdd3255fe55fd957633ab7d0d39e4f0daa73f7df","POLICIES.md":"c1a54cb1010af32f7ce5a2501f5ef62db44521aae816a08c577f5ec06afd09ea","README.md":"de9d295f1a9baa9c505ca73761e3f53d55c059f77af5fb5a6d0c984579ac1845","agent_docs/development.md":"1968154a95185b9380e469048fd2274b107a98ffb00b3da3dbc80aa4baf86147","agent_docs/reviewing.md":"34abe5cdc3cb774cb07ea772c966ee1fd8bfd30c355d6fbca73b750ce17e6caf","agent_docs/style.md":"754a8651c4a4d443b1daccbde1b8853c0a18ca0e6ed486b440bc82276479167b","agent_docs/ui_tests.md":"487ad1762f0c45d999df352f8924e70e992bd0ea78f2ac4c3d2100734caccf7e","agent_docs/unsafe_code.md":"c283df811efe9f7ff39c52ceec88c73162ce7f31bb8507891ccd46010ff4ebcd","agent_docs/validation.md":"8c0b06d018421ba9652a3d0dc33c4bdc50fd9265cabce8455c06a790a62a5fe8","benches/as_bytes_dynamic_size.rs":"bc6f72309310e7762ea85a24497cc5eba947465e171186746b441a66916ab2e1","benches/as_bytes_dynamic_size.x86-64":"bf3814972480492d29eaef3593751d97f4c2be6a80c434cf8ea0a093b3260fe8","benches/as_bytes_dynamic_size.x86-64.mca":"6ae3d2b1ef02d99a8cd711e3362292247a0919c104e1af34f0fb82a1445dc3de","benches/as_bytes_static_size.rs":"6191adc7ad68ffdfd07dcc6966423249bfc25c5099a17a913b8e646d4507ad09","benches/as_bytes_static_size.x86-64":"55b7041c5758eb73dca0c2562959251ef1c35cd9433eb91e3546c88cd5a6a616","benches/as_bytes_static_size.x86-64.mca":"3980419dab11d8998d74544caf728583bd02b8ff16d5f879914bd3fe0c774e5f","benches/extend_vec_zeroed.rs":"32946d8b52a37f5c192da452a3053dc42fa61b5f5859b2120f789b3a01d69674","benches/extend_vec_zeroed.x86-64":"15913385bd02afc5a2ac698e79b2a19ff5435862dbbdee7b38fb4139588fdcb6","benches/extend_vec_zeroed.x86-64.mca":"b007b0e5e155b9c3b5b7c1b59af7be43099045c510aab55490b5cd784603e527","benches/formats/coco_dynamic_padding.rs":"209c0e1835988be9c422c81a8fcaa5e884c4a54c383e49345df548b51b76645c","benches/formats/coco_dynamic_size.rs":"030c88042a4cb9ee91aa1daeec61008eaed2bf13101586a1b2857541280e1ee5","benches/formats/coco_static_size.rs":"209756544e8e3efc5504b7059674c2aed4a22e4318048c4cc3f9697e5959169c","benches/insert_vec_zeroed.rs":"8370069ddb494b6d639fdf3c233808fbaeb4d3ec6936742f043d50dd60ac5047","benches/insert_vec_zeroed.x86-64":"db9ca898bdb3fd3577ebd086ae2ad63ff22187d90d0120360e58175cee371351","benches/insert_vec_zeroed.x86-64.mca":"c13e8d670e7bc462c87cc3764f184cfbf3ac29130c02bb06fee06f7285ebf622","benches/new_box_zeroed.rs":"6a5c9b3ba00405166efd58479548a9e41ffc0a759ffc70ccd4eed21105e7cf69","benches/new_box_zeroed.x86-64":"5a863b8b1b49bc502fb7a6a0afd03081c453d5fb65a9488653367137c9b38360","benches/new_box_zeroed.x86-64.mca":"a6cd10c6e021b46ec36b4038119aac634ce2f076a3627f099b9c3b265eab5ae3","benches/new_box_zeroed_with_elems_dynamic_padding.rs":"e21b6c5401fed9e802c344c007c8bf894de9b92553aec559b9c96a10fcf70cb5","benches/new_box_zeroed_with_elems_dynamic_padding.x86-64":"23633771ccc9ddc9d1b04ca1e63d0e8a61fc420cadf00e618500b85eae9513f7","benches/new_box_zeroed_with_elems_dynamic_padding.x86-64.mca":"1e835f5fc44f193dd2620d55179b55eae3191298e1f9209512a1ed953b6e007d","benches/new_box_zeroed_with_elems_dynamic_size.rs":"131993ac38532a46b56b6a977f978516a91676c6ff2c46a33ed92fba73f19b1a","benches/new_box_zeroed_with_elems_dynamic_size.x86-64":"30aaf7308bbd96e2fb724f65049275d07975f593ca0626fdc8872467da115856","benches/new_box_zeroed_with_elems_dynamic_size.x86-64.mca":"77ed38493c482d9cd8322dc8194530f3248eea1b0a6e047d5af2c87f539c5515","benches/new_vec_zeroed.rs":"0dd979bccc197bb70387ae8c0ea2d7a791447bc11b2e112620275b60d67afa1f","benches/new_vec_zeroed.x86-64":"fca948196e5586920a1f07ef9a8f122e35c437a996686379d07954dda7d14877","benches/new_vec_zeroed.x86-64.mca":"919c504540d1c744724aae146e15dcbd5d3db8bb43afbaea7737c7f821708b0d","benches/new_zeroed.rs":"b36d564124f457af0925ae379de18ca32e5f7dc8a1ad9755ce0f4a9215b9fea0","benches/new_zeroed.x86-64":"a3dbfc054e164f95c79cf3c316e433116000932575d94030002cb698a7398023","benches/new_zeroed.x86-64.mca":"b5f0f9bf0e3242e46d23604b91ffc256641c927e394edb533da340f66977d037","benches/read_from_bytes.rs":"cb8054655e48401b6eec9d07a3e2a1d86b6dc0ca3d0dedf8beaa659769c629ac","benches/read_from_bytes.x86-64":"cbdf9358f44f216cdcfb75d9892401f03318ae447789b5b00b6f5f559df66c0f","benches/read_from_bytes.x86-64.mca":"630decf7391550c1111eb2d2c0c7233b3b7f72aa62cbcc35eec71e2651970882","benches/read_from_prefix.rs":"e5f5df80572e647103de6173d0ca33c8776f2cfe1a417462a0fc79e1b9e39471","benches/read_from_prefix.x86-64":"fbdbf6b88150477d10f7d2bc4186eb9cd839b2d906faa02d285b2cf65ef773a7","benches/read_from_prefix.x86-64.mca":"c66d38daa8aac4070f7d74d68c4f6adc897c1b9af8277c31454bad73b5afb420","benches/read_from_suffix.rs":"3c3e3c6d68bb7b88b7ce504c9e29beb407d9dddbd2d4bd267ae054b4b00ffb16","benches/read_from_suffix.x86-64":"8a20f508f04d2fef94eb8bd2aa28b345c746f3f1ff37b67fb03a54f1c19d8ba1","benches/read_from_suffix.x86-64.mca":"182f03a9956115c02d4ad8bac101f151417f9f75e892cd0929bee2a1d2854cd3","benches/ref_from_bytes_dynamic_padding.rs":"c9d8438e068a4501a5f481eb757a64311b57c593190f177bf24a2a5b5fb0e84e","benches/ref_from_bytes_dynamic_padding.x86-64":"8f5831ad4036de1d12e8b4dab976be51d2afd4766391f62e6a89df7326295934","benches/ref_from_bytes_dynamic_padding.x86-64.mca":"90347cd43b7e2def69bb26dc75cab9c1bbbd23c82e3b4ecf3ce0a17062355ddd","benches/ref_from_bytes_dynamic_size.rs":"9f985fdae45a02e2f1b337470fcbb8e807ea764afdab515cba08354464898e19","benches/ref_from_bytes_dynamic_size.x86-64":"53330c93db3821cc1b223133070725862f322c21a0c227079f528e442167ee06","benches/ref_from_bytes_dynamic_size.x86-64.mca":"91ed5ce8e2518c962399f9a1a09e6893a48fb69859e7b329110bdc0246a378d4","benches/ref_from_bytes_static_size.rs":"00e41e4bfc6733f252a8c3574b2d35c6a5bc0c71cbc5c9cbb7640a40e58932e3","benches/ref_from_bytes_static_size.x86-64":"3afd096d8b10e175ca221681b2bf086ca0f4e13801bb10a3dfe112aef5020eec","benches/ref_from_bytes_static_size.x86-64.mca":"d5ff4ff29c3608dcdfb6a1c595df7589a127ebd567e5af2a2f24e2bea49c74c3","benches/ref_from_bytes_with_elems_dynamic_padding.rs":"74f7c09a405153198de91b66b61500dc8a5e90d8de77d73b5229af75c18e83a2","benches/ref_from_bytes_with_elems_dynamic_padding.x86-64":"b74e5a9b0a142b852a1db3a6a078c13bc800f20150955b9f0063b19e1696d192","benches/ref_from_bytes_with_elems_dynamic_padding.x86-64.mca":"b72be497254ca4927d6ae5ad1d0dda860c09bbb91e29048cf2b2a73bf476758e","benches/ref_from_bytes_with_elems_dynamic_size.rs":"120c1c126db9c5392334200836765bee78bd33c7c73ca2b6a4363e80dfa6d24f","benches/ref_from_bytes_with_elems_dynamic_size.x86-64":"02c6bfe75b27a23180af4e2d0da33f62a9b7248261c5f42164ac5d388b4f6c69","benches/ref_from_bytes_with_elems_dynamic_size.x86-64.mca":"6301221ed727f2263353f70bec13ba71722b58e9687014c1dd20d6d221f53c23","benches/ref_from_prefix_dynamic_padding.rs":"3b7efa8fde8e0157362ae4cb783dabf7031ec36c477ede21b87f904ee4e6e237","benches/ref_from_prefix_dynamic_padding.x86-64":"4a2b82413006fa878196297c3be2843776dcc5af5b51d5a604af3c760cfd475c","benches/ref_from_prefix_dynamic_padding.x86-64.mca":"d388c1accdd53d71c1743c952b0bbe6a31f338c62a11c045d3d6eb946544d745","benches/ref_from_prefix_dynamic_size.rs":"d18c123c89fdc959bd66d8c709fff975fe1c950966a3c90b720884866601f233","benches/ref_from_prefix_dynamic_size.x86-64":"22b9971a80734664691be53dc641f218de85cbecc37a687df818a77fb57621fa","benches/ref_from_prefix_dynamic_size.x86-64.mca":"bf702d2d558346a30deb38ca57b0fba9bc5828dd961e0876658bf814e627c2c3","benches/ref_from_prefix_static_size.rs":"5571b296b3dd9971ff551683f106b507a297b4074c76396313298f41b8524850","benches/ref_from_prefix_static_size.x86-64":"af62d7e7e548d690507defffd94206529caf8c73a0d441938ad241cafafb98a4","benches/ref_from_prefix_static_size.x86-64.mca":"c077a745725944c0ac477f2f68ba080dcc135a9d9a8296c449f86258c4408c98","benches/ref_from_prefix_with_elems_dynamic_padding.rs":"2a28e5cd5bcfa05873921b18b5576ad20adc564076ed01c171f389c389be5c34","benches/ref_from_prefix_with_elems_dynamic_padding.x86-64":"4bd03a51e2518931693a4db97c01172024fc960cc2d3659c9f5bcf4a2606a0f2","benches/ref_from_prefix_with_elems_dynamic_padding.x86-64.mca":"a35423d84d41bc802509df25b62c0e42384901f9a99800e97ed94701f70bfa9f","benches/ref_from_prefix_with_elems_dynamic_size.rs":"da4405a3733aa47250f5504d1ecc7aebae4efbdd8a08fd65796ccefcd10279e9","benches/ref_from_prefix_with_elems_dynamic_size.x86-64":"f98bc594b5ad083a4d8e11c9366bebb9f79628a46795c22aba6bd2c161cb0328","benches/ref_from_prefix_with_elems_dynamic_size.x86-64.mca":"9a59ba7f62544dddd9c604c7c983a8cc54e4b84a5d03f6c2537b94f8cf08de46","benches/ref_from_suffix_dynamic_padding.rs":"b92dd40e3eb9a532bc3ff1bf97553ebf4efacc2f71cc5520c039ef797a2f6052","benches/ref_from_suffix_dynamic_padding.x86-64":"1f63f8bb138077301faef41e17c0f27ac380c56acf4b82709834f280180f9fbd","benches/ref_from_suffix_dynamic_padding.x86-64.mca":"5d13500dbdd608b16031f35de7d37cc0906938aeff78aa3e32b332fb8d490202","benches/ref_from_suffix_dynamic_size.rs":"8d53eab7093403b8aec08621dc0c2e5cdf024021932821b64cd91525af32505d","benches/ref_from_suffix_dynamic_size.x86-64":"9156cc6255b6802321bd56905218d8a9fb04c041d40357f6a02eee8cb440be97","benches/ref_from_suffix_dynamic_size.x86-64.mca":"6115bef636db71259dd465b1584b60709d83de48c8c84e2d28120948e233280d","benches/ref_from_suffix_static_size.rs":"2def689a8912007a4cb38f7cddf66e5cfd0ecb76979a694e7da0018c5edc33ab","benches/ref_from_suffix_static_size.x86-64":"c3d67e7189e048c831929008306a8c4e606d09ae080bb0599222e90cc2e71168","benches/ref_from_suffix_static_size.x86-64.mca":"c192700fc1e99ea9fb1ebcaf18ce032fe998777a412bb44d43ae67097a3c678c","benches/ref_from_suffix_with_elems_dynamic_padding.rs":"4d56060e465bd915e6a530cd93526257ba4ec25b8bd57d860932844d200f0e82","benches/ref_from_suffix_with_elems_dynamic_padding.x86-64":"0cc4dc423c20593bcd3f5ee11e17d5975782885c0dd63317c9cd134f961ea0fb","benches/ref_from_suffix_with_elems_dynamic_padding.x86-64.mca":"047132900dc80ecb689b7f0d805153002c942c48cb9bb7c693c624bcb3c6ecf1","benches/ref_from_suffix_with_elems_dynamic_size.rs":"41720ba3b552516f7dfebedc3ce92cb555449ac86655cb10e19388a3074d3c6f","benches/ref_from_suffix_with_elems_dynamic_size.x86-64":"ca1b65d60e5397410a188dd4d233d6000e5d6e46010849ca33e3e1d864a6a632","benches/ref_from_suffix_with_elems_dynamic_size.x86-64.mca":"c37b8165f900ac6e83d3363e39e704248f33f2edae2ca9e893f5382d2f3657ac","benches/split_at_dynamic_padding.rs":"ffc3b0c5b1ff0f689b0ec1a9152b3f5e70e3334caea5b724e8192db94cd2696e","benches/split_at_dynamic_padding.x86-64":"297da91d7aaa39f5a96332ec293a448fe47194920e658d0cc4756aa3269d10ee","benches/split_at_dynamic_padding.x86-64.mca":"2316761d26fc86957e7a4e79a0661a976228a985ff3404650d60e964ded18c11","benches/split_at_dynamic_size.rs":"81e0efa87a166df9200b7297ffccb2e414aa37d6609f1cdb92d3f54f1a352460","benches/split_at_dynamic_size.x86-64":"4851f90927ee5261cb82e7733beb27bc93964b2814067e47ecb7905136af84d6","benches/split_at_dynamic_size.x86-64.mca":"2316761d26fc86957e7a4e79a0661a976228a985ff3404650d60e964ded18c11","benches/split_at_unchecked_dynamic_padding.rs":"193cd7d03ef707b1221dd3da93a7bbade19a3a496ed7b6f804209e6bed484850","benches/split_at_unchecked_dynamic_padding.x86-64":"e50aba01f8359fd62ea63065d1dac955bc511f4f7e9533a3c7b49b6ea60b7a12","benches/split_at_unchecked_dynamic_padding.x86-64.mca":"c9d34a9e5ef8ed86340f94b3899b4429aee71614635c402e299580f372932dd5","benches/split_at_unchecked_dynamic_size.rs":"301d640fd1e752f67f0390e65e327ce1d872c76651ec4e6f6d056ccc272b7f25","benches/split_at_unchecked_dynamic_size.x86-64":"2e9d311a2fec8fa457337053397de970b1819d6ad6be9f7197c021773b462c7b","benches/split_at_unchecked_dynamic_size.x86-64.mca":"c9d34a9e5ef8ed86340f94b3899b4429aee71614635c402e299580f372932dd5","benches/split_via_immutable_dynamic_padding.rs":"8b54b565a1936c5830521b10601989baa11c390caa653775e5cdf1dd36602c88","benches/split_via_immutable_dynamic_padding.x86-64":"cb42e292ebda117fe218f3379ee5bedc988e15a6b990379645a041476a1a3632","benches/split_via_immutable_dynamic_padding.x86-64.mca":"cde4cc9f3a3fda9bb538744ea1c8eb939b6ce20a48f72fb71c86b2a139bd7a6c","benches/split_via_immutable_dynamic_size.rs":"9ae48a6ea21161d23f86b3bb1917d7ec7b1a076d469fc38f801b4a134a639a4d","benches/split_via_immutable_dynamic_size.x86-64":"8d96c6d900aec832843c6ffcb23b0579fabd2cbc8e746ebb093600b024c24259","benches/split_via_immutable_dynamic_size.x86-64.mca":"661ae9416d322ebaa5d16363c6bfe0a9a7a4cb6b0895101378022dba1eca7779","benches/split_via_runtime_check_dynamic_padding.rs":"1d76442da00d789d9540ebb20b552eee01bd33d00afcd5942f444e18222b4c1e","benches/split_via_runtime_check_dynamic_padding.x86-64":"9b6b254ce70213e3a05a39156fea455e257c799b099491bc5ee7dc41a74553d0","benches/split_via_runtime_check_dynamic_padding.x86-64.mca":"a7e8085b7bb8b9c47384b536bd39c22077c02c1689b66e6c6dfa4df79e538153","benches/split_via_runtime_check_dynamic_size.rs":"000a3143d23dac81ed96b1e3257bea46608f1b4e6c0de98af876687c88fe458e","benches/split_via_runtime_check_dynamic_size.x86-64":"fec062ec49973b0aae0310d564d7fc9c99ca1f3d6540f1619fdf3cc9cac08ad7","benches/split_via_runtime_check_dynamic_size.x86-64.mca":"661ae9416d322ebaa5d16363c6bfe0a9a7a4cb6b0895101378022dba1eca7779","benches/split_via_unchecked_dynamic_padding.rs":"b8f6716d3cea44b53ab1de3dda87019c6df24a36a14c0a843b4c2458d7a3a9e5","benches/split_via_unchecked_dynamic_padding.x86-64":"d7e624bda21874e1293c285ae28e6ab276e6bf25050ac0544fb6f416300c949b","benches/split_via_unchecked_dynamic_padding.x86-64.mca":"cde4cc9f3a3fda9bb538744ea1c8eb939b6ce20a48f72fb71c86b2a139bd7a6c","benches/split_via_unchecked_dynamic_size.rs":"5211dacd9541803443e6d71baff5f82a18080b679ec7f958429434f94f4c3b01","benches/split_via_unchecked_dynamic_size.x86-64":"aab14f776fe876df18e45fab72629e9f318a866de63385dff02e9b3bce631614","benches/split_via_unchecked_dynamic_size.x86-64.mca":"661ae9416d322ebaa5d16363c6bfe0a9a7a4cb6b0895101378022dba1eca7779","benches/transmute.rs":"ea2626b52bdee175ec1a03d46e74772ccc4a06fe92b0f72c74c882ff77f71539","benches/transmute.x86-64":"d96fb8dc445499c9d1e88ed43a1b8151edd10824122a34628d2b52b2b244f577","benches/transmute.x86-64.mca":"b5265f1b25858cee38b1ee854ee77204874dba98fbf075828b86f9b7a4b7566a","benches/transmute_ref_dynamic_size.rs":"aff55864d9f469013d123fc709ae54eefe676d0a97294e8cf77300a07b80968c","benches/transmute_ref_dynamic_size.x86-64":"74778193a60bc56cc125a5f426d2e6554fbb2a843a5d0ca9d876f4ac51609bf8","benches/transmute_ref_dynamic_size.x86-64.mca":"5884528f1ecddbd613a7a1b44bb90da3155a64b9712c7bf466ae6b99590db5e8","benches/transmute_ref_static_size.rs":"575185bc0b99e95a4334cb3852cbc20b67fc6ba784e2a251bdf2988e50087ea1","benches/transmute_ref_static_size.x86-64":"95c70f386d817e3459e05e51b3996419e67fb62261042200d4e9bd11e7686065","benches/transmute_ref_static_size.x86-64.mca":"b5265f1b25858cee38b1ee854ee77204874dba98fbf075828b86f9b7a4b7566a","benches/try_read_from_bytes.rs":"5dee2be274f7a6148b1cc56d0b4728ffcac4d3bf0ad08efd91be4ee609e126bf","benches/try_read_from_bytes.x86-64":"78da3d1420a2285bf45f7d63bffc3f586251d2bef140cbe3cfb7458f713c9ee1","benches/try_read_from_bytes.x86-64.mca":"cd65b57bb450e10f9d286cc3a1f68c4d36832aa2dfe2d6da13e378b39ddbb50f","benches/try_read_from_prefix.rs":"ab58c8c22aa6598fb00ea86f5f8f47e74780ab0e3529ac65ed70c4d90fb09df3","benches/try_read_from_prefix.x86-64":"4e0d3b06bb09d35165983352b14ed68dac983c1cec6dc07a71613304dce7ec8c","benches/try_read_from_prefix.x86-64.mca":"bc530626b05f2532dd41e40246a3265b52475438a73726f0dd8f5d20504761cf","benches/try_read_from_suffix.rs":"fedef98be3bdaf1bd5b64deb769f110959ffb570a9a7a0dd243ef91daaca8810","benches/try_read_from_suffix.x86-64":"ef2d48c617b88eb4e8937d558596e380f5d529120b48a6a4078671e402173861","benches/try_read_from_suffix.x86-64.mca":"5319d5efae21b3412f6f5a574424efdb3e630358bc56326b0a4776419a8641c8","benches/try_ref_from_bytes_dynamic_padding.rs":"6f4e39222ea4c26e285a87ff17229bff7163bdbf2c339237c1f83ad54036f0d0","benches/try_ref_from_bytes_dynamic_padding.x86-64":"2350ccb9e09b9939757da963cf527cf8efa88c40b31dac9ecd8b51863e8658a0","benches/try_ref_from_bytes_dynamic_padding.x86-64.mca":"8a4464e8879f06708a7913e9d7ef71d19166db1014971ffe9e3d1ce21c4358ba","benches/try_ref_from_bytes_dynamic_size.rs":"593f29b3fa067bc4c35efd73512e8d7b5b7b6d8b14cbc3dc4b4d1a7bb5bd7616","benches/try_ref_from_bytes_dynamic_size.x86-64":"f207873996864db03cab6566ebe23e1623409ed69e1c369cdad134c8eda6e008","benches/try_ref_from_bytes_dynamic_size.x86-64.mca":"0c0d22c64b003242a45e3aa08338598b287ba82f48e83e838a56c6a0fdbd14dc","benches/try_ref_from_bytes_static_size.rs":"8927f96863b2d45585c86b60a045fb8a52fa1d5212f74f60960ecca9c954872f","benches/try_ref_from_bytes_static_size.x86-64":"f11b5e06adb3f087577291cb58fc696eadeef07e0db757cd143a0e55bbf77720","benches/try_ref_from_bytes_static_size.x86-64.mca":"f5a05548b23a8c6878bf979e3ef03f19ba43be218753f9ad184b4d150a0d0baa","benches/try_ref_from_bytes_with_elems_dynamic_padding.rs":"54096e318ae16f77df588ec0c4e28425a77c7c791f3f7fd692b0614395c05311","benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64":"857d786d3fc5b60f1521766d309826470376e4ef16dd26f5b8ea4af0c26876c6","benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64.mca":"e192a1922b8ac5ee5478b77dd8b44c3f7beca5534d4e160568116b6e18d57d29","benches/try_ref_from_bytes_with_elems_dynamic_size.rs":"f4c73003266dd256228d983b7e250da8dfb7457da9bfaf4d8e0e8e45c133f916","benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64":"ee03f8e55059f9fd33dc1830da26575e6cda24f2c71cb624b75b62320b4f2cf7","benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64.mca":"a24a2590859af9a7383ae3ccf5791bfa0f1c24dda3c1a1686aff9f5bb477f683","benches/try_ref_from_prefix_dynamic_padding.rs":"03113947de7a3c4158e053189ff906fbd55a14d9fadb4240d3c10dd6bd37cf20","benches/try_ref_from_prefix_dynamic_padding.x86-64":"3b7574d7fab05c611215ad0112fc9371c89c7a8f9116926ba7759e87f56b5334","benches/try_ref_from_prefix_dynamic_padding.x86-64.mca":"a39b2da962a67b58f4c41c3f1a77652a6e17088f19e570405545a47b1eeb17a2","benches/try_ref_from_prefix_dynamic_size.rs":"9bc5c20f969cddc2fe3fed38244b0478972c7e947ebfcb7bcc0712900dfec3d4","benches/try_ref_from_prefix_dynamic_size.x86-64":"c38d672ba7d0af7a8f3ffb2537990d053a0972f16a51b43be1b56218c0e613c8","benches/try_ref_from_prefix_dynamic_size.x86-64.mca":"17ece20c26cf5ea28d3013e2fc6781b791e4d7fb004395ea4bbe5c22fac4e59c","benches/try_ref_from_prefix_static_size.rs":"201de9e4d4a8534752565412fd75a5c482e5ec3db31ec193281ad205cdfd85f1","benches/try_ref_from_prefix_static_size.x86-64":"418b9d63f2e2cf7bb84b233660dd3184f3c19e9fe0dc41798da0222dd0272971","benches/try_ref_from_prefix_static_size.x86-64.mca":"00f507c5ca32a2d1c5ee1f02522f66a4dc4db3cc0b82f633f4370f65cea649d1","benches/try_ref_from_prefix_with_elems_dynamic_padding.rs":"cd469c1e83b401aa25184346f6cc2ee80c3b4dcb478f7950cc70495868435453","benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64":"1371881016ebd06a2710f6de699c3ee48c506c10692ea83cbd8a2e33e77578c7","benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64.mca":"17431ebf7700898e4d71b4cd16479cf76d2182c7502c7de281fa375e67cc42c7","benches/try_ref_from_prefix_with_elems_dynamic_size.rs":"3b5d0290fd919e582c8b696a355aaa164c1bf65aac9a063b9ee5343d4e3ffee1","benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64":"c0a97bd210438081bde5bfda99765fd9965a5155ecf7250a64286347f8035b47","benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64.mca":"08d701ab0380bd2236f53bfa0bfe4d76ff34b39f81caff9851435ec96f8f040c","benches/try_ref_from_suffix_dynamic_padding.rs":"7329ed7cada43f927cf8cd633563bd7cebd417c69105e28db9a06e343583c025","benches/try_ref_from_suffix_dynamic_padding.x86-64":"5f8e084475b725672b94a6e7ae6a26096c6f67eef3611dbcfb3e38ae1ab2ab88","benches/try_ref_from_suffix_dynamic_padding.x86-64.mca":"773346a942e6732c31660cb96d47ec3249718e1ae23505f44440166d0f376686","benches/try_ref_from_suffix_dynamic_size.rs":"1cd46928c72ddf37c37d9d6cc1ad39e872e46859d8ae3d02d864915c6bcab15d","benches/try_ref_from_suffix_dynamic_size.x86-64":"700632e51bd9730aa8487510f3dc7c4a4cda2dcd00f25be44be2b857c2198b38","benches/try_ref_from_suffix_dynamic_size.x86-64.mca":"188970455bb58c1a8a1ede8f210932687a1e1854a8d9d7a9ee11d51868ad90c5","benches/try_ref_from_suffix_static_size.rs":"8219d93922dc0578c369060d1bdfec73a0e3fb014a42d89edc8c160de439fad7","benches/try_ref_from_suffix_static_size.x86-64":"67cf035f42d9edd78409998d1373aa62cd9fe1e5b7d29262940726227fa1bbf3","benches/try_ref_from_suffix_static_size.x86-64.mca":"44e291ab42760672d19d39532b2f46676a3d065ea6d3e8b399ba0b3970e8171b","benches/try_ref_from_suffix_with_elems_dynamic_padding.rs":"857ef60dbf5fb30a8fc6848fb9aa9ebf7410d83691a37b3a8f473d26ef93c6ee","benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64":"f1d1285a08c3ae8749399bf0dbdd1871659bbb927ddb24eb2f488b4ca955d712","benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64.mca":"48decc0d9f0259e6c925e4876a95df8d1f2397e7e48092e96518d96ba223a534","benches/try_ref_from_suffix_with_elems_dynamic_size.rs":"31cfb930987bd3f347ed0e4092c2bbbda91ad859ca7d86435dacef0c834cbfa8","benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64":"05ac42d6432f821f17af75616616e435907106a1df58a09ce48c639ce6c8b0b9","benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64.mca":"3d16953574488344f8decdeecaab3bc31e145c052d7ec4e57073ec4c14a87d16","benches/try_transmute.rs":"dd44a381c54b8df4a5c826fc12787c111668533ae4174bde2e5598e1f5603c73","benches/try_transmute.x86-64":"f49f4a9d0fef8918588607b064e28a8c3f780ff864206047ea53a8f3feb88de7","benches/try_transmute.x86-64.mca":"01212e9c4549e529534f1e818b32fe9f0d121731cdce3411a63a1a91fb3df050","benches/try_transmute_ref_dynamic_size.rs":"92d973710e22733d4cb177df4f9871fe164235c07a0d968cda83c0b9c3839d9d","benches/try_transmute_ref_dynamic_size.x86-64":"98d4e4d0e484bc216ca690878b66d7745bd0eb1331cf161322442534a22e1944","benches/try_transmute_ref_dynamic_size.x86-64.mca":"6ceb19a33e0e2d18f53ec70402100c47da202fcffd56d5ff996828285f340e10","benches/try_transmute_ref_static_size.rs":"a9a93a2c565770780c3e7de76a4b8c87571f771380a80b3bda376cdd69b5f98e","benches/try_transmute_ref_static_size.x86-64":"3ae89ab690ca15802712776d08dbcd36dba6a2bd7bfce1ef989295d0b2ce8364","benches/try_transmute_ref_static_size.x86-64.mca":"de3f7a20f918138bda8e74cd9789cbea6cc089e0d5d0252a72ed2a15a762f8ec","benches/write_to_dynamic_size.rs":"6b302190ff3141ba4c600ee12726b53d26bbb2ca23ee32487e0617d1f0f05b82","benches/write_to_dynamic_size.x86-64":"df321bcd81afb0003083dc63bc11904b9618c03e85d2cc4d989e423e3881d167","benches/write_to_dynamic_size.x86-64.mca":"a432c07f80293913fa10e2fbab4aa2917901752a3b94de7c33bacbe49d4155e4","benches/write_to_prefix_dynamic_size.rs":"77fd633f005886108d94bf1d46cb75fbdf5710ff3976c0b243709351b31e7b99","benches/write_to_prefix_dynamic_size.x86-64":"b92f89757d531453cbd8738aaa2a1613693fa3a81c80a0c504ed99895a672e0a","benches/write_to_prefix_dynamic_size.x86-64.mca":"e1c1eddc93caa9ae5a5542bcacff25be5910e992e52ae6701c07405bed50b055","benches/write_to_prefix_static_size.rs":"f3e8e02e2bf9b3314bfcc3b50a3ada5fff18e1b10b895e3667dbd11bf5920cf8","benches/write_to_prefix_static_size.x86-64":"e6181d0c3f568620b8d4b731319902fbf8c60b4087f88f9eda5a3c8197be9e04","benches/write_to_prefix_static_size.x86-64.mca":"290247dc36cadf17485643828dc7860a4c6a1285dc10da70f1f1f7bfce61e9a1","benches/write_to_static_size.rs":"84e4865798576b4f988f3d071fcedbcf31c07008ec73114e1926876bc1c8af8f","benches/write_to_static_size.x86-64":"ebdeaecbcf1a95a5f0895248eb23947e3572215c9ac38cc4da8911f119570a1e","benches/write_to_static_size.x86-64.mca":"a91226a32a8857374e3f8fbf8b7fc13ab7df5ade46be21113c62fdec90259e09","benches/write_to_suffix_dynamic_size.rs":"17b526e3db8ac97b7387f4ca852a110ffa5308013723a9cc068e3b70f7719701","benches/write_to_suffix_dynamic_size.x86-64":"86931eed41acf697f55d07a8c2d7123e3a38cbed35d7e35f808ffe3ffc35fb59","benches/write_to_suffix_dynamic_size.x86-64.mca":"778e0b109d5c9920d9ce797fb1a5e92a8536d32cff1094ff9e95b910dacf0ccb","benches/write_to_suffix_static_size.rs":"9eab793af46f81d5d593b4f2ca869495c644da8c4fd21db52bf947b19c630003","benches/write_to_suffix_static_size.x86-64":"0995d60a863e6496d6d2923f3ad25fbea98a410e5a2462620d91f48cde1ec610","benches/write_to_suffix_static_size.x86-64.mca":"f79144ae203fed71d924de9b131301b6a57a440e3eea64bed110b28cb8bbe070","benches/zero_dynamic_padding.rs":"10961bb9bf932808a26387bfb71b68bc09588812748e40f7603aa62bf5c1311a","benches/zero_dynamic_padding.x86-64":"d4fae8108c86e8c6eb6e4c7c4dd96c4525ad7b89704f8fa9f6d0beaa3db2ffd6","benches/zero_dynamic_padding.x86-64.mca":"b8250bb8e5f27d1dac95143fd8df961f1cf0e474bc85da659a26f9cd6319a14d","benches/zero_dynamic_size.rs":"c1db2f54c4028bebf3474e7e39cc519cfecb816b9885811b5113570dfd27c022","benches/zero_dynamic_size.x86-64":"55fac52a9a376078e450a661f9e8617983082efb8d6595ca0ca5b0a5b4195f4a","benches/zero_dynamic_size.x86-64.mca":"6d7d2627b3eff59d515775220a7d18ee179efb3ce4b884d9465d7b6ca2dd80e2","benches/zero_static_size.rs":"74ff0743381da3935c904aac3eb6af54c6e3f653833639e2ba447e754eea7498","benches/zero_static_size.x86-64":"2a6eef60a97730e17dca02b0f82676e030ed48c4886ad262cf9da82c6c0a1451","benches/zero_static_size.x86-64.mca":"3e4499c9259c7240bb37dc0e7b2f18169a3805b3274407424f6ecf6c0c0a4c2d","build.rs":"916639a8cc523f6b7551c946706f551b24352cd50c84a2284ca313798bc77ee5","cargo.sh":"23b2eddb1e982dcc2228b573bb92a768e05e056e24f440d7efdf7fb1a747ac87","ci/check_all_toolchains_tested.sh":"979cece8aff80ff997bc317f9e48bb9f9a8c36486e7f23d7f1e869c75f03de85","ci/check_fmt.sh":"83e6654d1b6658c6d65c8b0beb4cbe7aaaa0cbf3cd4cc4d196d40b7c21f8d9eb","ci/check_msrv_is_minimal.sh":"b6adac6e751ef1dd5927090b30bb098a64e9c9c50e047562088b889e25c2d5fc","ci/check_readme.sh":"c23dc51696893e171018fb1cb86b7c606a2cd3ad4800c7a44f913a1451607c5e","ci/check_stale_stderr.sh":"61a25ca45e05e684c31af4f926c15c7d7f97945f90a744038ab45816799dc6d0","ci/check_versions.sh":"c2603621c4981c1400d946cd83b2d3af0ba7db2355779b55eab89ca2c821fe0d","ci/release_crate_version.sh":"e5f4b957eae4251f66a9497cc596533d767d97a841556c5c18425aa7259005eb","clippy.toml":"df67a6131fff2fe52309e797d2dfad080fc8cbdfcb1baa7f14415b3e397c291c","rustdoc/style.css":"2622d8f676bd9e577d67f8fd962eca950d0c6df33b4b21b3df6ff7474fcd51ca","src/byte_slice.rs":"c61c875a6e10aa06c44300337e7e270099a4a5ece7ddd4863de2cef4439087b4","src/byteorder.rs":"3631826007e5546e9d2ade6fe1269eac22245ebb020bbb9f6f3cf64c82afe0c1","src/deprecated.rs":"0762789a318b47fefd1d852160472d1ef91d994f2914304bd7c4544cc8368664","src/doctests.rs":"dcbadd8d83a676ba003d00e9ce038cb7752224fd700be4547ae7f56b17ab718d","src/error.rs":"c521740e956bc25fc22d60f12578235784b8ff905e8b145a3cbbe9710349252c","src/impls.rs":"f3c00559de44fc20790a651d264b20729081ef006dd97e7964734adb6cf3fefb","src/layout.rs":"e9528c0ea3dc40aee4b8a6746c158cdaf259e56ccc8173e0a86be31d5c92df09","src/lib.rs":"ea997a2e8d19a8b19eab0bb02a23bcab9fe0255a7110d5f8ce6ef6d19de5921c","src/macros.rs":"c3bd3b90839f70e3ac7ad7f72ec6c5b677660438460bf6378e29b8a0426e28cb","src/pointer/inner.rs":"e7fbf63f695054fcebc0e353d0c1b7a75d87c30af7d64395aca86b088dd07bac","src/pointer/invariant.rs":"7df5d13cc79e7ad469580da8d0bf9071e37a45723e417d31c55820616660cbdc","src/pointer/mod.rs":"fed883833d01acb38b152b2f251acf4bda6b1b4c58be6c50edab5341f97b107c","src/pointer/ptr.rs":"f696788823a4b0edd03e468beb9e42218a78e6b67d55772b1bfe11e336f2894f","src/pointer/transmute.rs":"3b98c64ff06d0cf49170bb8dc1260538a185c4a104909f25ed0d7a303bc27dbc","src/ref.rs":"3898b5572753c43d19c14b4ac8c4fed57cd3d238ad6fb142b0df1a7b4cbaead5","src/split_at.rs":"b818a62ea96836a18b70a07fa24e1b9537ea991f9493475b1ac84adc0e149610","src/util/macro_util.rs":"489866940d8483d1f4ea4ce24ca64321f24d78d8f57f1e20d252961203d79535","src/util/macros.rs":"4c5cdf81bc7ae7bbed91ba3268b4a9989fe46a88850193a57f4f47c0888c4992","src/util/mod.rs":"b0252fc08c2a607123c04713d4aeb37e7edcc52b4dd8c4245080efe4ba334825","src/wrappers.rs":"add04d276505e9682851a5dee070d513b5db31e7b044aaf5db8b85fac478eaae","testdata/include_value/data":"88d4266fd4e6338d13b845fcf289579d209c897823b9217da3e161936f031589","tests/codegen.rs":"51afd6c3e479bcff84fca340573116db6be9f1fc99c0c5a411583bd12f440c0f","tests/include.rs":"3cb8eb691d41d7a3eafe9136afca5cad302430f6b08c2f3d03cd7a3d25fe74ef","tests/ui.rs":"18a8867ac684ae60956b930e6cbcfe315782f02212c2e9b4366c55a1a7ed266c","tests/ui/diagnostic-not-implemented.msrv.stderr":"d8638ecfef2760737c482f0e2a0938f825b26e66d2d5495f522e546a46c9286b","tests/ui/diagnostic-not-implemented.nightly.stderr":"7a2fe6726edff770d0948460a4d6cd725d26e3a6d644115f17980d83fec45449","tests/ui/diagnostic-not-implemented.rs":"04444c8b5e902ae5d6ca95d7bf049ea4dc992df03e05209abce7ca0de261cf73","tests/ui/diagnostic-not-implemented.stable.stderr":"7a2fe6726edff770d0948460a4d6cd725d26e3a6d644115f17980d83fec45449","tests/ui/include_value.msrv.stderr":"4d2da000f1093babc597cff41b117d0f53c6c92e8b88066afe0b8a4fc812e167","tests/ui/include_value.nightly.stderr":"02bcd0565ea0ff9e45529a1c355b5dbd36ce2e1991b47b1ccf37d1a23967059b","tests/ui/include_value.rs":"5f9a57d10865b2daca4d0bdac56ed5d780b7cf614854b22a4a13073f5700732a","tests/ui/include_value.stable.stderr":"02bcd0565ea0ff9e45529a1c355b5dbd36ce2e1991b47b1ccf37d1a23967059b","tests/ui/late-compile-pass.msrv.stderr":"51ca8d6369a7f5c3bdf09dd8aab556f57ea754c7005706518fd5f2f27ead601e","tests/ui/late-compile-pass.nightly.stderr":"44e70b87be480afc32a66d69d567c9c07cf2e0baf453f3096c1d3aa413c6d97d","tests/ui/late-compile-pass.rs":"b4524a6c3484be51b3279d797bdbaa91171f830aab6874c794f95db1712ec22b","tests/ui/late-compile-pass.stable.stderr":"4cd6218c014c6c9c6f34542efc71385de0c621712adb031804508ac3848b8cbc","tests/ui/max-align.msrv.stderr":"15dc5399d02087a7b3883da74ecb2756e5dc1a22f1eb7d4bdcb0489da6d3a125","tests/ui/max-align.nightly.stderr":"0f39068f91e6463be59a0cb35b6c2c531329635c170d4b0dddc8bec92705d730","tests/ui/max-align.rs":"9866fc49d8bbeea1e4dfbfb971ed7bc6e2087857abd021b3125f487fb89788fe","tests/ui/max-align.stable.stderr":"0f39068f91e6463be59a0cb35b6c2c531329635c170d4b0dddc8bec92705d730","tests/ui/ptr-is-invariant-over-v.msrv.stderr":"b9ba2d9053168dff5152e408fd2ce78e82a66503e311a70da51f568090cff0a8","tests/ui/ptr-is-invariant-over-v.nightly.stderr":"3a245dd9d774a723db7623eb7f47918c85b2b23a23151ed51ece60bbe298c7ed","tests/ui/ptr-is-invariant-over-v.rs":"84e6586ebf512cfd48511dad64b06c978f459595772e33ae576a87c79ee959b0","tests/ui/ptr-is-invariant-over-v.stable.stderr":"3a245dd9d774a723db7623eb7f47918c85b2b23a23151ed51ece60bbe298c7ed","tests/ui/transmute-ptr-to-usize.msrv.stderr":"2be4e6380811343cd4129fbcbb823841ee2a5c5ee230897a4b078f2b8f098490","tests/ui/transmute-ptr-to-usize.nightly.stderr":"d9358d4d6e77b2571def38c212534ea9e4eb603eb9aae4eb1bda00911dceffd3","tests/ui/transmute-ptr-to-usize.rs":"2860895519d4d28b6d6d56393b6d85895022c5629bc45cdcf549786486cdeddd","tests/ui/transmute-ptr-to-usize.stable.stderr":"450d1fc8bb84641330db254da4cf5ce932a609b2555f91b58232b83f831958d8","tests/ui/transmute.msrv.stderr":"95194ad9df5a535db44633979f2ad4bfcec1e351e9af3cf925aac631f4e042ec","tests/ui/transmute.nightly.stderr":"5217be6ba44dd5a6d0cd0bd81c0ec67fbcd83a4bbb93709637ee475af4ab99cb","tests/ui/transmute.rs":"49d473f40d7cdde8e42b1cc38cb2cadedb13c7148e2ef08f5119fe5bb351a851","tests/ui/transmute.stable.stderr":"5217be6ba44dd5a6d0cd0bd81c0ec67fbcd83a4bbb93709637ee475af4ab99cb","tests/ui/transmute_mut.msrv.stderr":"eae8b51586eb2de0afa38dedb2d402c0530bcd9419f6fd297a94d76e3e1d2d0c","tests/ui/transmute_mut.nightly.stderr":"77ee66fa707de60d65d4d2260e3ec02e6f8962b16ab65b0c70e038a2d9d8ea95","tests/ui/transmute_mut.rs":"6adbfef906b6f4321f8b00510e422c421378465eaab1f2d41395e178d629ac16","tests/ui/transmute_mut.stable.stderr":"b5d42431c6fdeac65673844fab63546334c8c7b3e458e549eb70272eb282c3c3","tests/ui/transmute_ref.msrv.stderr":"4ebea0a5c88ad025c8e6b8e020f75365124fc1ef52f851ff3ee1a7230d9207e0","tests/ui/transmute_ref.nightly.stderr":"d29c5e9725764961aa89230e9dbb2db934d8233d4e76a32329a721f5916017cc","tests/ui/transmute_ref.rs":"b4df55cc80bac00a05e3ab26bcd18be48901a5165d48b9bc5d35280633ce3da1","tests/ui/transmute_ref.stable.stderr":"3f598aec6a43e0777727543b58a09a98ba06337dedb612119b68b7d59c2290e9","tests/ui/try_transmute.msrv.stderr":"26d4e6bbf9b3114ea58ac837bc284ceb3acc608c86eddf1a703b50e557811da9","tests/ui/try_transmute.nightly.stderr":"855c6f5d43bcd6361d41e4df5a1901c1bf6b1f97633b9031d2060b36386d49e8","tests/ui/try_transmute.rs":"a81e8d96baca0d16e985ab9f9626f5d7d09b0dc61a5e61ccfadcc173d2a3bcfd","tests/ui/try_transmute.stable.stderr":"53e659d311102e4eeb2b7aef08378301ca8aa48ec21985860ecf79dbd2366e9c","tests/ui/try_transmute_mut.msrv.stderr":"fc38f71974c33c742af83b863fd8528b11f5ce3da808b123e1103faca3456387","tests/ui/try_transmute_mut.nightly.stderr":"dfe60a7639c48312cb4bc8db2c8f8411030ab1584fada30b19e1b8a225a1dc33","tests/ui/try_transmute_mut.rs":"9860d6d8beb0a6c553b91c6cd8c0b8143ee9dd57f80d0ad5eac90d6f0d442e67","tests/ui/try_transmute_mut.stable.stderr":"36817b95eb8213e35b263dbcf061569df42cc518a256bd172988a8f34e2c5d1b","tests/ui/try_transmute_ref.msrv.stderr":"0456af652b08e2fab6e3f71284c727baf45d7208c6661056fcbd0ca2a563dd81","tests/ui/try_transmute_ref.nightly.stderr":"189a4cc84b5a19f6458d1d91cc984a9d7372f2b688bbe656b499b2903948ada5","tests/ui/try_transmute_ref.rs":"bde79572927a2f31f40e5249bf07befb9a7e5e31b0fcb601751d916d5da39a1f","tests/ui/try_transmute_ref.stable.stderr":"ca0e90f5995ba18b214b02a0fad106902849c60e1f40638a2402d87bff69728e","win-cargo.bat":"892ced98796378161965ed3c4260fe77f4e66650051849864936877da7420f0d"},"package":"556764e583adb45a9f8d413c2a147fa7e8d821e48e12b14fd560b607998b75eb"} \ No newline at end of file diff --git a/thirdparty/crates/zerocopy-0.8.56/.cargo_vcs_info.json b/thirdparty/crates/zerocopy-0.8.56/.cargo_vcs_info.json new file mode 100644 index 000000000..145076ada --- /dev/null +++ b/thirdparty/crates/zerocopy-0.8.56/.cargo_vcs_info.json @@ -0,0 +1,6 @@ +{ + "git": { + "sha1": "6dc429c451bdf1d7202ec1ec2cf426514e00d8eb" + }, + "path_in_vcs": "zerocopy" +} \ No newline at end of file diff --git a/thirdparty/crates/zerocopy-0.8.54/AGENTS.md b/thirdparty/crates/zerocopy-0.8.56/AGENTS.md similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/AGENTS.md rename to thirdparty/crates/zerocopy-0.8.56/AGENTS.md diff --git a/thirdparty/crates/zerocopy-0.8.54/BUILD.bazel b/thirdparty/crates/zerocopy-0.8.56/BUILD.bazel similarity index 97% rename from thirdparty/crates/zerocopy-0.8.54/BUILD.bazel rename to thirdparty/crates/zerocopy-0.8.56/BUILD.bazel index 18db46c59..4b81e251f 100644 --- a/thirdparty/crates/zerocopy-0.8.54/BUILD.bazel +++ b/thirdparty/crates/zerocopy-0.8.56/BUILD.bazel @@ -46,7 +46,7 @@ rust_library( crate_root = "src/lib.rs", edition = "2021", proc_macro_deps = [ - "//thirdparty/crates/zerocopy-derive-0.8.54:zerocopy_derive", + "//thirdparty/crates/zerocopy-derive-0.8.56:zerocopy_derive", ], rustc_env_files = [ ":cargo_toml_env_vars", @@ -118,9 +118,9 @@ rust_library( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.8.54", + version = "0.8.56", deps = [ - "//thirdparty/crates/zerocopy-0.8.54:build_script_build", + "//thirdparty/crates/zerocopy-0.8.56:build_script_build", ], ) @@ -178,7 +178,7 @@ cargo_build_script( "noclippy", "norustfmt", ], - version = "0.8.54", + version = "0.8.56", visibility = ["//visibility:private"], ) diff --git a/thirdparty/crates/zerocopy-0.8.54/CHANGELOG.md b/thirdparty/crates/zerocopy-0.8.56/CHANGELOG.md similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/CHANGELOG.md rename to thirdparty/crates/zerocopy-0.8.56/CHANGELOG.md diff --git a/thirdparty/crates/zerocopy-0.8.54/Cargo.lock b/thirdparty/crates/zerocopy-0.8.56/Cargo.lock similarity index 94% rename from thirdparty/crates/zerocopy-0.8.54/Cargo.lock rename to thirdparty/crates/zerocopy-0.8.56/Cargo.lock index e1b00093c..37783e799 100644 --- a/thirdparty/crates/zerocopy-0.8.54/Cargo.lock +++ b/thirdparty/crates/zerocopy-0.8.56/Cargo.lock @@ -58,9 +58,9 @@ dependencies = [ [[package]] name = "rand" -version = "0.8.5" +version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +checksum = "22f6172bdec972074665ed81ed53b71da00bfc44b65a753cfde883ec4c702a1a" dependencies = [ "rand_core", ] @@ -119,7 +119,7 @@ checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "zerocopy" -version = "0.8.54" +version = "0.8.56" dependencies = [ "elain", "itertools", @@ -132,9 +132,9 @@ dependencies = [ [[package]] name = "zerocopy-derive" -version = "0.8.54" +version = "0.8.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2e817b7b52d0c7358d3246da9d69935ebb18116b2b102b4230dac079b4862f5" +checksum = "f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1" dependencies = [ "proc-macro2", "quote", diff --git a/thirdparty/crates/zerocopy-0.8.54/Cargo.toml b/thirdparty/crates/zerocopy-0.8.56/Cargo.toml similarity index 98% rename from thirdparty/crates/zerocopy-0.8.54/Cargo.toml rename to thirdparty/crates/zerocopy-0.8.56/Cargo.toml index ad888270b..8b665a7d8 100644 --- a/thirdparty/crates/zerocopy-0.8.54/Cargo.toml +++ b/thirdparty/crates/zerocopy-0.8.56/Cargo.toml @@ -13,11 +13,7 @@ edition = "2021" rust-version = "1.56.0" name = "zerocopy" -version = "0.8.54" -authors = [ - "Joshua Liebow-Feeser ", - "Jack Wrenn ", -] +version = "0.8.56" build = "build.rs" exclude = [".*"] autolib = false @@ -389,7 +385,7 @@ name = "zero_static_size" path = "benches/zero_static_size.rs" [dependencies.zerocopy-derive] -version = "=0.8.54" +version = "=0.8.56" optional = true [dev-dependencies.elain] @@ -399,7 +395,7 @@ version = "0.3.0" version = "0.11" [dev-dependencies.rand] -version = "0.8.5" +version = "0.8.7" features = ["small_rng"] default-features = false @@ -413,7 +409,7 @@ version = "1.0" version = "1.1" [dev-dependencies.zerocopy-derive] -version = "=0.8.54" +version = "=0.8.56" [target."cfg(any())".dependencies.zerocopy-derive] -version = "=0.8.54" +version = "=0.8.56" diff --git a/thirdparty/crates/zerocopy-0.8.54/Cargo.toml.orig b/thirdparty/crates/zerocopy-0.8.56/Cargo.toml.orig similarity index 93% rename from thirdparty/crates/zerocopy-0.8.54/Cargo.toml.orig rename to thirdparty/crates/zerocopy-0.8.56/Cargo.toml.orig index 3308fac06..ffd159f47 100644 --- a/thirdparty/crates/zerocopy-0.8.54/Cargo.toml.orig +++ b/thirdparty/crates/zerocopy-0.8.56/Cargo.toml.orig @@ -15,11 +15,7 @@ [package] edition = "2021" name = "zerocopy" -version = "0.8.54" -authors = [ - "Joshua Liebow-Feeser ", - "Jack Wrenn ", -] +version = "0.8.56" description = "Zerocopy makes zero-cost memory manipulation effortless. We write \"unsafe\" so you don't have to." categories = [ "embedded", @@ -124,22 +120,22 @@ __internal_use_only_features_that_work_on_stable = [ ] [dependencies] -zerocopy-derive = { version = "=0.8.54", path = "zerocopy-derive", optional = true } +zerocopy-derive = { version = "=0.8.56", path = "zerocopy-derive", optional = true } # The "associated proc macro pattern" ensures that the versions of zerocopy and # zerocopy-derive remain equal, even if the 'derive' feature isn't used. # See: https://github.com/matklad/macro-dep-test [target.'cfg(any())'.dependencies] -zerocopy-derive = { version = "=0.8.54", path = "zerocopy-derive" } +zerocopy-derive = { version = "=0.8.56", path = "zerocopy-derive" } [dev-dependencies] # FIXME(#381) Remove this dependency once we have our own layout gadgets. elain = "0.3.0" itertools = "0.11" -rand = { version = "0.8.5", default-features = false, features = ["small_rng"] } +rand = { version = "0.8.7", default-features = false, features = ["small_rng"] } regex = "1.0" rustversion = "1.0" static_assertions = "1.1" testutil = { path = "testutil" } # In tests, unlike in production, zerocopy-derive is not optional -zerocopy-derive = { version = "=0.8.54", path = "zerocopy-derive" } +zerocopy-derive = { version = "=0.8.56", path = "zerocopy-derive" } diff --git a/thirdparty/crates/zerocopy-0.8.54/Cargo.toml.std b/thirdparty/crates/zerocopy-0.8.56/Cargo.toml.std similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/Cargo.toml.std rename to thirdparty/crates/zerocopy-0.8.56/Cargo.toml.std diff --git a/thirdparty/crates/zerocopy-0.8.54/LICENSE-APACHE b/thirdparty/crates/zerocopy-0.8.56/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/LICENSE-APACHE rename to thirdparty/crates/zerocopy-0.8.56/LICENSE-APACHE diff --git a/thirdparty/crates/zerocopy-0.8.54/LICENSE-BSD b/thirdparty/crates/zerocopy-0.8.56/LICENSE-BSD similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/LICENSE-BSD rename to thirdparty/crates/zerocopy-0.8.56/LICENSE-BSD diff --git a/thirdparty/crates/zerocopy-0.8.54/LICENSE-MIT b/thirdparty/crates/zerocopy-0.8.56/LICENSE-MIT similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/LICENSE-MIT rename to thirdparty/crates/zerocopy-0.8.56/LICENSE-MIT diff --git a/thirdparty/crates/zerocopy-0.8.54/POLICIES.md b/thirdparty/crates/zerocopy-0.8.56/POLICIES.md similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/POLICIES.md rename to thirdparty/crates/zerocopy-0.8.56/POLICIES.md diff --git a/thirdparty/crates/zerocopy-0.8.54/README.md b/thirdparty/crates/zerocopy-0.8.56/README.md similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/README.md rename to thirdparty/crates/zerocopy-0.8.56/README.md diff --git a/thirdparty/crates/zerocopy-0.8.54/agent_docs/development.md b/thirdparty/crates/zerocopy-0.8.56/agent_docs/development.md similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/agent_docs/development.md rename to thirdparty/crates/zerocopy-0.8.56/agent_docs/development.md diff --git a/thirdparty/crates/zerocopy-0.8.54/agent_docs/reviewing.md b/thirdparty/crates/zerocopy-0.8.56/agent_docs/reviewing.md similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/agent_docs/reviewing.md rename to thirdparty/crates/zerocopy-0.8.56/agent_docs/reviewing.md diff --git a/thirdparty/crates/zerocopy-0.8.54/agent_docs/style.md b/thirdparty/crates/zerocopy-0.8.56/agent_docs/style.md similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/agent_docs/style.md rename to thirdparty/crates/zerocopy-0.8.56/agent_docs/style.md diff --git a/thirdparty/crates/zerocopy-0.8.54/agent_docs/ui_tests.md b/thirdparty/crates/zerocopy-0.8.56/agent_docs/ui_tests.md similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/agent_docs/ui_tests.md rename to thirdparty/crates/zerocopy-0.8.56/agent_docs/ui_tests.md diff --git a/thirdparty/crates/zerocopy-0.8.54/agent_docs/unsafe_code.md b/thirdparty/crates/zerocopy-0.8.56/agent_docs/unsafe_code.md similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/agent_docs/unsafe_code.md rename to thirdparty/crates/zerocopy-0.8.56/agent_docs/unsafe_code.md diff --git a/thirdparty/crates/zerocopy-0.8.54/agent_docs/validation.md b/thirdparty/crates/zerocopy-0.8.56/agent_docs/validation.md similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/agent_docs/validation.md rename to thirdparty/crates/zerocopy-0.8.56/agent_docs/validation.md diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/as_bytes_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/as_bytes_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/as_bytes_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/as_bytes_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/as_bytes_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/as_bytes_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/as_bytes_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/as_bytes_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/as_bytes_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/as_bytes_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/as_bytes_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/as_bytes_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/as_bytes_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/as_bytes_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/as_bytes_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/as_bytes_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/as_bytes_static_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/as_bytes_static_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/as_bytes_static_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/as_bytes_static_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/as_bytes_static_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/as_bytes_static_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/as_bytes_static_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/as_bytes_static_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/extend_vec_zeroed.rs b/thirdparty/crates/zerocopy-0.8.56/benches/extend_vec_zeroed.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/extend_vec_zeroed.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/extend_vec_zeroed.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/extend_vec_zeroed.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/extend_vec_zeroed.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/extend_vec_zeroed.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/extend_vec_zeroed.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/extend_vec_zeroed.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/extend_vec_zeroed.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/extend_vec_zeroed.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/extend_vec_zeroed.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/formats/coco_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/formats/coco_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/formats/coco_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/formats/coco_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/formats/coco_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/formats/coco_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/formats/coco_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/formats/coco_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/formats/coco_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/formats/coco_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/formats/coco_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/formats/coco_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/insert_vec_zeroed.rs b/thirdparty/crates/zerocopy-0.8.56/benches/insert_vec_zeroed.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/insert_vec_zeroed.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/insert_vec_zeroed.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/insert_vec_zeroed.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/insert_vec_zeroed.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/insert_vec_zeroed.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/insert_vec_zeroed.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/insert_vec_zeroed.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/insert_vec_zeroed.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/insert_vec_zeroed.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/insert_vec_zeroed.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed.rs b/thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed_with_elems_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed_with_elems_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed_with_elems_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed_with_elems_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed_with_elems_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed_with_elems_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed_with_elems_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed_with_elems_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed_with_elems_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed_with_elems_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed_with_elems_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed_with_elems_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed_with_elems_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed_with_elems_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed_with_elems_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed_with_elems_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed_with_elems_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed_with_elems_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed_with_elems_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed_with_elems_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed_with_elems_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed_with_elems_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_box_zeroed_with_elems_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/new_box_zeroed_with_elems_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_vec_zeroed.rs b/thirdparty/crates/zerocopy-0.8.56/benches/new_vec_zeroed.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_vec_zeroed.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/new_vec_zeroed.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_vec_zeroed.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/new_vec_zeroed.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_vec_zeroed.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/new_vec_zeroed.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_vec_zeroed.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/new_vec_zeroed.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_vec_zeroed.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/new_vec_zeroed.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_zeroed.rs b/thirdparty/crates/zerocopy-0.8.56/benches/new_zeroed.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_zeroed.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/new_zeroed.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_zeroed.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/new_zeroed.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_zeroed.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/new_zeroed.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/new_zeroed.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/new_zeroed.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/new_zeroed.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/new_zeroed.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/read_from_bytes.rs b/thirdparty/crates/zerocopy-0.8.56/benches/read_from_bytes.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/read_from_bytes.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/read_from_bytes.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/read_from_bytes.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/read_from_bytes.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/read_from_bytes.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/read_from_bytes.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/read_from_bytes.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/read_from_bytes.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/read_from_bytes.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/read_from_bytes.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/read_from_prefix.rs b/thirdparty/crates/zerocopy-0.8.56/benches/read_from_prefix.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/read_from_prefix.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/read_from_prefix.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/read_from_prefix.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/read_from_prefix.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/read_from_prefix.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/read_from_prefix.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/read_from_prefix.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/read_from_prefix.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/read_from_prefix.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/read_from_prefix.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/read_from_suffix.rs b/thirdparty/crates/zerocopy-0.8.56/benches/read_from_suffix.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/read_from_suffix.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/read_from_suffix.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/read_from_suffix.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/read_from_suffix.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/read_from_suffix.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/read_from_suffix.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/read_from_suffix.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/read_from_suffix.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/read_from_suffix.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/read_from_suffix.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_static_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_static_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_static_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_static_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_static_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_static_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_static_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_static_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_with_elems_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_with_elems_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_with_elems_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_with_elems_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_with_elems_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_with_elems_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_with_elems_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_with_elems_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_with_elems_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_with_elems_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_with_elems_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_with_elems_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_with_elems_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_with_elems_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_with_elems_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_with_elems_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_with_elems_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_with_elems_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_with_elems_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_with_elems_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_with_elems_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_with_elems_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_bytes_with_elems_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_bytes_with_elems_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_static_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_static_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_static_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_static_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_static_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_static_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_static_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_static_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_with_elems_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_with_elems_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_with_elems_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_with_elems_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_with_elems_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_with_elems_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_with_elems_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_with_elems_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_with_elems_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_with_elems_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_with_elems_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_with_elems_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_with_elems_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_with_elems_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_with_elems_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_with_elems_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_with_elems_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_with_elems_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_with_elems_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_with_elems_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_with_elems_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_with_elems_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_prefix_with_elems_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_prefix_with_elems_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_static_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_static_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_static_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_static_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_static_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_static_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_static_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_static_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_with_elems_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_with_elems_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_with_elems_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_with_elems_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_with_elems_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_with_elems_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_with_elems_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_with_elems_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_with_elems_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_with_elems_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_with_elems_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_with_elems_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_with_elems_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_with_elems_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_with_elems_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_with_elems_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_with_elems_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_with_elems_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_with_elems_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_with_elems_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_with_elems_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_with_elems_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/ref_from_suffix_with_elems_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/ref_from_suffix_with_elems_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_at_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/split_at_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_at_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/split_at_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_at_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/split_at_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_at_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/split_at_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_at_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/split_at_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_at_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/split_at_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_at_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/split_at_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_at_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/split_at_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_at_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/split_at_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_at_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/split_at_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_at_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/split_at_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_at_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/split_at_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_at_unchecked_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/split_at_unchecked_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_at_unchecked_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/split_at_unchecked_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_at_unchecked_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/split_at_unchecked_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_at_unchecked_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/split_at_unchecked_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_at_unchecked_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/split_at_unchecked_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_at_unchecked_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/split_at_unchecked_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_at_unchecked_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/split_at_unchecked_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_at_unchecked_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/split_at_unchecked_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_at_unchecked_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/split_at_unchecked_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_at_unchecked_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/split_at_unchecked_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_at_unchecked_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/split_at_unchecked_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_at_unchecked_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/split_at_unchecked_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_immutable_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_immutable_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_immutable_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_immutable_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_immutable_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_immutable_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_immutable_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_immutable_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_immutable_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_immutable_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_immutable_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_immutable_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_immutable_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_immutable_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_immutable_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_immutable_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_immutable_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_immutable_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_immutable_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_immutable_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_immutable_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_immutable_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_immutable_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_immutable_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_runtime_check_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_runtime_check_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_runtime_check_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_runtime_check_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_runtime_check_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_runtime_check_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_runtime_check_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_runtime_check_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_runtime_check_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_runtime_check_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_runtime_check_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_runtime_check_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_runtime_check_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_runtime_check_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_runtime_check_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_runtime_check_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_runtime_check_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_runtime_check_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_runtime_check_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_runtime_check_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_runtime_check_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_runtime_check_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_runtime_check_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_runtime_check_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_unchecked_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_unchecked_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_unchecked_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_unchecked_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_unchecked_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_unchecked_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_unchecked_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_unchecked_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_unchecked_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_unchecked_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_unchecked_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_unchecked_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_unchecked_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_unchecked_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_unchecked_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_unchecked_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_unchecked_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_unchecked_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_unchecked_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_unchecked_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/split_via_unchecked_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/split_via_unchecked_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/split_via_unchecked_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/split_via_unchecked_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/transmute.rs b/thirdparty/crates/zerocopy-0.8.56/benches/transmute.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/transmute.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/transmute.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/transmute.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/transmute.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/transmute.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/transmute.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/transmute.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/transmute.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/transmute.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/transmute.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/transmute_ref_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/transmute_ref_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/transmute_ref_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/transmute_ref_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/transmute_ref_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/transmute_ref_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/transmute_ref_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/transmute_ref_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/transmute_ref_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/transmute_ref_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/transmute_ref_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/transmute_ref_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/transmute_ref_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/transmute_ref_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/transmute_ref_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/transmute_ref_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/transmute_ref_static_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/transmute_ref_static_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/transmute_ref_static_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/transmute_ref_static_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/transmute_ref_static_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/transmute_ref_static_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/transmute_ref_static_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/transmute_ref_static_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_bytes.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_bytes.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_bytes.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_bytes.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_bytes.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_bytes.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_bytes.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_bytes.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_bytes.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_bytes.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_bytes.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_bytes.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_prefix.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_prefix.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_prefix.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_prefix.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_prefix.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_prefix.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_prefix.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_prefix.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_prefix.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_prefix.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_prefix.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_prefix.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_suffix.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_suffix.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_suffix.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_suffix.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_suffix.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_suffix.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_suffix.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_suffix.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_suffix.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_suffix.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_read_from_suffix.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_read_from_suffix.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_static_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_static_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_static_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_static_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_static_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_static_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_static_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_static_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_with_elems_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_with_elems_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_with_elems_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_with_elems_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_with_elems_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_with_elems_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_with_elems_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_with_elems_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_with_elems_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_bytes_with_elems_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_static_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_static_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_static_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_static_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_static_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_static_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_static_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_static_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_with_elems_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_with_elems_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_with_elems_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_with_elems_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_with_elems_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_with_elems_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_with_elems_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_with_elems_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_with_elems_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_prefix_with_elems_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_static_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_static_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_static_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_static_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_static_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_static_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_static_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_static_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_with_elems_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_with_elems_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_with_elems_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_with_elems_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_with_elems_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_with_elems_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_with_elems_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_with_elems_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_with_elems_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_ref_from_suffix_with_elems_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_transmute.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_transmute.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_transmute.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_transmute.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_transmute.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_transmute.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_transmute.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_transmute.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_transmute.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_transmute.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_transmute.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_transmute.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_transmute_ref_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_transmute_ref_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_transmute_ref_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_transmute_ref_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_transmute_ref_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_transmute_ref_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_transmute_ref_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_transmute_ref_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_transmute_ref_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_transmute_ref_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_transmute_ref_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_transmute_ref_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_transmute_ref_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/try_transmute_ref_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_transmute_ref_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/try_transmute_ref_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_transmute_ref_static_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/try_transmute_ref_static_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_transmute_ref_static_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/try_transmute_ref_static_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/try_transmute_ref_static_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/try_transmute_ref_static_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/try_transmute_ref_static_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/try_transmute_ref_static_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_prefix_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_prefix_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_prefix_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_prefix_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_prefix_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_prefix_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_prefix_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_prefix_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_prefix_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_prefix_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_prefix_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_prefix_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_prefix_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_prefix_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_prefix_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_prefix_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_prefix_static_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_prefix_static_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_prefix_static_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_prefix_static_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_prefix_static_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_prefix_static_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_prefix_static_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_prefix_static_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_static_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_static_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_static_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_static_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_static_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_static_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_static_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_static_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_suffix_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_suffix_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_suffix_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_suffix_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_suffix_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_suffix_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_suffix_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_suffix_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_suffix_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_suffix_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_suffix_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_suffix_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_suffix_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_suffix_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_suffix_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_suffix_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_suffix_static_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_suffix_static_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_suffix_static_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_suffix_static_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/write_to_suffix_static_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/write_to_suffix_static_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/write_to_suffix_static_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/write_to_suffix_static_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/zero_dynamic_padding.rs b/thirdparty/crates/zerocopy-0.8.56/benches/zero_dynamic_padding.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/zero_dynamic_padding.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/zero_dynamic_padding.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/zero_dynamic_padding.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/zero_dynamic_padding.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/zero_dynamic_padding.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/zero_dynamic_padding.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/zero_dynamic_padding.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/zero_dynamic_padding.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/zero_dynamic_padding.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/zero_dynamic_padding.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/zero_dynamic_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/zero_dynamic_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/zero_dynamic_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/zero_dynamic_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/zero_dynamic_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/zero_dynamic_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/zero_dynamic_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/zero_dynamic_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/zero_dynamic_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/zero_dynamic_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/zero_dynamic_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/zero_dynamic_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/zero_static_size.rs b/thirdparty/crates/zerocopy-0.8.56/benches/zero_static_size.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/zero_static_size.rs rename to thirdparty/crates/zerocopy-0.8.56/benches/zero_static_size.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/zero_static_size.x86-64 b/thirdparty/crates/zerocopy-0.8.56/benches/zero_static_size.x86-64 similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/zero_static_size.x86-64 rename to thirdparty/crates/zerocopy-0.8.56/benches/zero_static_size.x86-64 diff --git a/thirdparty/crates/zerocopy-0.8.54/benches/zero_static_size.x86-64.mca b/thirdparty/crates/zerocopy-0.8.56/benches/zero_static_size.x86-64.mca similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/benches/zero_static_size.x86-64.mca rename to thirdparty/crates/zerocopy-0.8.56/benches/zero_static_size.x86-64.mca diff --git a/thirdparty/crates/zerocopy-0.8.54/build.rs b/thirdparty/crates/zerocopy-0.8.56/build.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/build.rs rename to thirdparty/crates/zerocopy-0.8.56/build.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/cargo.sh b/thirdparty/crates/zerocopy-0.8.56/cargo.sh similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/cargo.sh rename to thirdparty/crates/zerocopy-0.8.56/cargo.sh diff --git a/thirdparty/crates/zerocopy-0.8.54/ci/check_all_toolchains_tested.sh b/thirdparty/crates/zerocopy-0.8.56/ci/check_all_toolchains_tested.sh similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/ci/check_all_toolchains_tested.sh rename to thirdparty/crates/zerocopy-0.8.56/ci/check_all_toolchains_tested.sh diff --git a/thirdparty/crates/zerocopy-0.8.54/ci/check_fmt.sh b/thirdparty/crates/zerocopy-0.8.56/ci/check_fmt.sh similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/ci/check_fmt.sh rename to thirdparty/crates/zerocopy-0.8.56/ci/check_fmt.sh diff --git a/thirdparty/crates/zerocopy-0.8.54/ci/check_msrv_is_minimal.sh b/thirdparty/crates/zerocopy-0.8.56/ci/check_msrv_is_minimal.sh similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/ci/check_msrv_is_minimal.sh rename to thirdparty/crates/zerocopy-0.8.56/ci/check_msrv_is_minimal.sh diff --git a/thirdparty/crates/zerocopy-0.8.54/ci/check_readme.sh b/thirdparty/crates/zerocopy-0.8.56/ci/check_readme.sh similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/ci/check_readme.sh rename to thirdparty/crates/zerocopy-0.8.56/ci/check_readme.sh diff --git a/thirdparty/crates/zerocopy-0.8.54/ci/check_stale_stderr.sh b/thirdparty/crates/zerocopy-0.8.56/ci/check_stale_stderr.sh similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/ci/check_stale_stderr.sh rename to thirdparty/crates/zerocopy-0.8.56/ci/check_stale_stderr.sh diff --git a/thirdparty/crates/zerocopy-0.8.54/ci/check_versions.sh b/thirdparty/crates/zerocopy-0.8.56/ci/check_versions.sh similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/ci/check_versions.sh rename to thirdparty/crates/zerocopy-0.8.56/ci/check_versions.sh diff --git a/thirdparty/crates/zerocopy-0.8.54/ci/release_crate_version.sh b/thirdparty/crates/zerocopy-0.8.56/ci/release_crate_version.sh similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/ci/release_crate_version.sh rename to thirdparty/crates/zerocopy-0.8.56/ci/release_crate_version.sh diff --git a/thirdparty/crates/zerocopy-0.8.54/clippy.toml b/thirdparty/crates/zerocopy-0.8.56/clippy.toml similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/clippy.toml rename to thirdparty/crates/zerocopy-0.8.56/clippy.toml diff --git a/thirdparty/crates/zerocopy-0.8.54/rustdoc/style.css b/thirdparty/crates/zerocopy-0.8.56/rustdoc/style.css similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/rustdoc/style.css rename to thirdparty/crates/zerocopy-0.8.56/rustdoc/style.css diff --git a/thirdparty/crates/zerocopy-0.8.54/src/byte_slice.rs b/thirdparty/crates/zerocopy-0.8.56/src/byte_slice.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/byte_slice.rs rename to thirdparty/crates/zerocopy-0.8.56/src/byte_slice.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/byteorder.rs b/thirdparty/crates/zerocopy-0.8.56/src/byteorder.rs similarity index 99% rename from thirdparty/crates/zerocopy-0.8.54/src/byteorder.rs rename to thirdparty/crates/zerocopy-0.8.56/src/byteorder.rs index 1f2eae0ca..bcc5b7e3e 100644 --- a/thirdparty/crates/zerocopy-0.8.54/src/byteorder.rs +++ b/thirdparty/crates/zerocopy-0.8.56/src/byteorder.rs @@ -87,7 +87,7 @@ use super::*; pub trait ByteOrder: Copy + Clone + Debug + Display + Eq + PartialEq + Ord + PartialOrd + Hash + private::Sealed { - #[doc(hidden)] + /// A value-level representation of byte order. const ORDER: Order; } @@ -98,11 +98,12 @@ mod private { impl Sealed for super::LittleEndian {} } -#[allow(missing_copy_implementations, missing_debug_implementations)] -#[doc(hidden)] -#[derive(PartialEq)] +/// A value-level representation of [`ByteOrder`]. +#[derive(Copy, Clone, Debug, Eq, PartialEq, Ord, PartialOrd, Hash)] pub enum Order { + /// A value-level representation of [`BigEndian`]. BigEndian, + /// A value-level representation of [`LittleEndian`]. LittleEndian, } diff --git a/thirdparty/crates/zerocopy-0.8.54/src/deprecated.rs b/thirdparty/crates/zerocopy-0.8.56/src/deprecated.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/deprecated.rs rename to thirdparty/crates/zerocopy-0.8.56/src/deprecated.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/doctests.rs b/thirdparty/crates/zerocopy-0.8.56/src/doctests.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/doctests.rs rename to thirdparty/crates/zerocopy-0.8.56/src/doctests.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/error.rs b/thirdparty/crates/zerocopy-0.8.56/src/error.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/error.rs rename to thirdparty/crates/zerocopy-0.8.56/src/error.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/impls.rs b/thirdparty/crates/zerocopy-0.8.56/src/impls.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/impls.rs rename to thirdparty/crates/zerocopy-0.8.56/src/impls.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/layout.rs b/thirdparty/crates/zerocopy-0.8.56/src/layout.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/layout.rs rename to thirdparty/crates/zerocopy-0.8.56/src/layout.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/lib.rs b/thirdparty/crates/zerocopy-0.8.56/src/lib.rs similarity index 99% rename from thirdparty/crates/zerocopy-0.8.54/src/lib.rs rename to thirdparty/crates/zerocopy-0.8.56/src/lib.rs index 38c35fd78..b5ecbb58a 100644 --- a/thirdparty/crates/zerocopy-0.8.54/src/lib.rs +++ b/thirdparty/crates/zerocopy-0.8.56/src/lib.rs @@ -401,7 +401,7 @@ pub use crate::{ wrappers::*, }; -#[cfg(any(feature = "alloc", test, kani))] +#[cfg(any(feature = "alloc", test))] extern crate alloc; #[cfg(any(feature = "alloc", test))] use alloc::{boxed::Box, vec::Vec}; @@ -5602,6 +5602,10 @@ fn mut_from_prefix_suffix( /// if its field is [`IntoBytes`]; else, /// - if the type has no generic parameters, it is [`IntoBytes`] if the type /// is sized and has no padding bytes; else, +/// - if the type is `repr(C)` without an `align(N)` modifier for `N > 1` +/// (it may have `align(1)` or `packed(N)`), and every field is `T`, +/// `[T; N]`, or a final `[T]` for the same type parameter `T`, it is +/// [`IntoBytes`]; else, /// - if the type is `repr(C)`, its fields must be [`Unaligned`]. /// - If the type is an enum: /// - It must have a defined representation (`repr`s `C`, `u8`, `u16`, `u32`, diff --git a/thirdparty/crates/zerocopy-0.8.54/src/macros.rs b/thirdparty/crates/zerocopy-0.8.56/src/macros.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/macros.rs rename to thirdparty/crates/zerocopy-0.8.56/src/macros.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/pointer/inner.rs b/thirdparty/crates/zerocopy-0.8.56/src/pointer/inner.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/pointer/inner.rs rename to thirdparty/crates/zerocopy-0.8.56/src/pointer/inner.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/pointer/invariant.rs b/thirdparty/crates/zerocopy-0.8.56/src/pointer/invariant.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/pointer/invariant.rs rename to thirdparty/crates/zerocopy-0.8.56/src/pointer/invariant.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/pointer/mod.rs b/thirdparty/crates/zerocopy-0.8.56/src/pointer/mod.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/pointer/mod.rs rename to thirdparty/crates/zerocopy-0.8.56/src/pointer/mod.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/pointer/ptr.rs b/thirdparty/crates/zerocopy-0.8.56/src/pointer/ptr.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/pointer/ptr.rs rename to thirdparty/crates/zerocopy-0.8.56/src/pointer/ptr.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/pointer/transmute.rs b/thirdparty/crates/zerocopy-0.8.56/src/pointer/transmute.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/pointer/transmute.rs rename to thirdparty/crates/zerocopy-0.8.56/src/pointer/transmute.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/ref.rs b/thirdparty/crates/zerocopy-0.8.56/src/ref.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/ref.rs rename to thirdparty/crates/zerocopy-0.8.56/src/ref.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/split_at.rs b/thirdparty/crates/zerocopy-0.8.56/src/split_at.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/split_at.rs rename to thirdparty/crates/zerocopy-0.8.56/src/split_at.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/util/macro_util.rs b/thirdparty/crates/zerocopy-0.8.56/src/util/macro_util.rs similarity index 99% rename from thirdparty/crates/zerocopy-0.8.54/src/util/macro_util.rs rename to thirdparty/crates/zerocopy-0.8.56/src/util/macro_util.rs index bc8aaf79d..c117d0d4c 100644 --- a/thirdparty/crates/zerocopy-0.8.54/src/util/macro_util.rs +++ b/thirdparty/crates/zerocopy-0.8.56/src/util/macro_util.rs @@ -946,6 +946,22 @@ pub mod core_reexport { } } +/// Projects `Self` to itself. +/// +/// This is used by macros to have the compiler verify that two syntactically +/// similar types actually resolve to the same type. The blanket implementation +/// ensures that no other implementation can project a type to anything other +/// than itself. +#[doc(hidden)] +pub trait Identity { + /// `Self`. + type Type: ?Sized; +} + +impl Identity for T { + type Type = T; +} + #[cfg(test)] mod tests { use core::num::NonZeroUsize; diff --git a/thirdparty/crates/zerocopy-0.8.54/src/util/macros.rs b/thirdparty/crates/zerocopy-0.8.56/src/util/macros.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/util/macros.rs rename to thirdparty/crates/zerocopy-0.8.56/src/util/macros.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/util/mod.rs b/thirdparty/crates/zerocopy-0.8.56/src/util/mod.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/util/mod.rs rename to thirdparty/crates/zerocopy-0.8.56/src/util/mod.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/src/wrappers.rs b/thirdparty/crates/zerocopy-0.8.56/src/wrappers.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/src/wrappers.rs rename to thirdparty/crates/zerocopy-0.8.56/src/wrappers.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/testdata/include_value/data b/thirdparty/crates/zerocopy-0.8.56/testdata/include_value/data similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/testdata/include_value/data rename to thirdparty/crates/zerocopy-0.8.56/testdata/include_value/data diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/codegen.rs b/thirdparty/crates/zerocopy-0.8.56/tests/codegen.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/codegen.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/codegen.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/include.rs b/thirdparty/crates/zerocopy-0.8.56/tests/include.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/include.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/include.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui.rs b/thirdparty/crates/zerocopy-0.8.56/tests/ui.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/ui.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/diagnostic-not-implemented.msrv.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/diagnostic-not-implemented.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/diagnostic-not-implemented.msrv.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/diagnostic-not-implemented.msrv.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/diagnostic-not-implemented.nightly.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/diagnostic-not-implemented.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/diagnostic-not-implemented.nightly.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/diagnostic-not-implemented.nightly.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/diagnostic-not-implemented.rs b/thirdparty/crates/zerocopy-0.8.56/tests/ui/diagnostic-not-implemented.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/diagnostic-not-implemented.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/diagnostic-not-implemented.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/diagnostic-not-implemented.stable.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/diagnostic-not-implemented.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/diagnostic-not-implemented.stable.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/diagnostic-not-implemented.stable.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/include_value.msrv.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/include_value.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/include_value.msrv.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/include_value.msrv.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/include_value.nightly.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/include_value.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/include_value.nightly.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/include_value.nightly.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/include_value.rs b/thirdparty/crates/zerocopy-0.8.56/tests/ui/include_value.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/include_value.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/include_value.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/include_value.stable.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/include_value.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/include_value.stable.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/include_value.stable.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/late-compile-pass.msrv.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/late-compile-pass.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/late-compile-pass.msrv.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/late-compile-pass.msrv.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/late-compile-pass.nightly.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/late-compile-pass.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/late-compile-pass.nightly.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/late-compile-pass.nightly.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/late-compile-pass.rs b/thirdparty/crates/zerocopy-0.8.56/tests/ui/late-compile-pass.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/late-compile-pass.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/late-compile-pass.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/late-compile-pass.stable.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/late-compile-pass.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/late-compile-pass.stable.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/late-compile-pass.stable.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/max-align.msrv.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/max-align.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/max-align.msrv.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/max-align.msrv.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/max-align.nightly.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/max-align.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/max-align.nightly.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/max-align.nightly.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/max-align.rs b/thirdparty/crates/zerocopy-0.8.56/tests/ui/max-align.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/max-align.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/max-align.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/max-align.stable.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/max-align.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/max-align.stable.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/max-align.stable.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/ptr-is-invariant-over-v.msrv.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/ptr-is-invariant-over-v.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/ptr-is-invariant-over-v.msrv.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/ptr-is-invariant-over-v.msrv.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/ptr-is-invariant-over-v.nightly.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/ptr-is-invariant-over-v.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/ptr-is-invariant-over-v.nightly.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/ptr-is-invariant-over-v.nightly.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/ptr-is-invariant-over-v.rs b/thirdparty/crates/zerocopy-0.8.56/tests/ui/ptr-is-invariant-over-v.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/ptr-is-invariant-over-v.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/ptr-is-invariant-over-v.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/ptr-is-invariant-over-v.stable.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/ptr-is-invariant-over-v.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/ptr-is-invariant-over-v.stable.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/ptr-is-invariant-over-v.stable.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute-ptr-to-usize.msrv.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute-ptr-to-usize.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute-ptr-to-usize.msrv.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute-ptr-to-usize.msrv.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute-ptr-to-usize.nightly.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute-ptr-to-usize.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute-ptr-to-usize.nightly.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute-ptr-to-usize.nightly.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute-ptr-to-usize.rs b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute-ptr-to-usize.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute-ptr-to-usize.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute-ptr-to-usize.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute-ptr-to-usize.stable.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute-ptr-to-usize.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute-ptr-to-usize.stable.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute-ptr-to-usize.stable.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute.msrv.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute.msrv.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute.msrv.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute.nightly.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute.nightly.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute.nightly.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute.rs b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute.stable.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute.stable.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute.stable.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_mut.msrv.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_mut.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_mut.msrv.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_mut.msrv.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_mut.nightly.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_mut.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_mut.nightly.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_mut.nightly.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_mut.rs b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_mut.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_mut.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_mut.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_mut.stable.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_mut.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_mut.stable.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_mut.stable.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_ref.msrv.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_ref.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_ref.msrv.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_ref.msrv.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_ref.nightly.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_ref.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_ref.nightly.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_ref.nightly.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_ref.rs b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_ref.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_ref.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_ref.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_ref.stable.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_ref.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/transmute_ref.stable.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/transmute_ref.stable.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute.msrv.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute.msrv.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute.msrv.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute.nightly.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute.nightly.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute.nightly.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute.rs b/thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute.stable.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute.stable.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute.stable.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_mut.msrv.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_mut.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_mut.msrv.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_mut.msrv.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_mut.nightly.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_mut.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_mut.nightly.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_mut.nightly.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_mut.rs b/thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_mut.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_mut.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_mut.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_mut.stable.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_mut.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_mut.stable.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_mut.stable.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_ref.msrv.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_ref.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_ref.msrv.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_ref.msrv.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_ref.nightly.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_ref.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_ref.nightly.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_ref.nightly.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_ref.rs b/thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_ref.rs similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_ref.rs rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_ref.rs diff --git a/thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_ref.stable.stderr b/thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_ref.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/tests/ui/try_transmute_ref.stable.stderr rename to thirdparty/crates/zerocopy-0.8.56/tests/ui/try_transmute_ref.stable.stderr diff --git a/thirdparty/crates/zerocopy-0.8.54/win-cargo.bat b/thirdparty/crates/zerocopy-0.8.56/win-cargo.bat similarity index 100% rename from thirdparty/crates/zerocopy-0.8.54/win-cargo.bat rename to thirdparty/crates/zerocopy-0.8.56/win-cargo.bat diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/.cargo-checksum.json b/thirdparty/crates/zerocopy-derive-0.8.54/.cargo-checksum.json deleted file mode 100644 index 954d76a49..000000000 --- a/thirdparty/crates/zerocopy-derive-0.8.54/.cargo-checksum.json +++ /dev/null @@ -1 +0,0 @@ -{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"554a63a9c1db82f73969b83ff9639182612a17bc3aebf8d29eb35a8307e6fcff","Cargo.lock":"1cb9873bff00c5ce7dc82bd9f704dbcadffe6c1014cc20fba69d8b732a0734b0","Cargo.toml":"49d547984c8d3d41c6bd558217fb7cbe328ca1c0fe173a25cb8d538461108331","Cargo.toml.orig":"650e5f029905fee79568f8217fde69c9a1669d7b716d46076c44622bff9ea1cc","LICENSE-APACHE":"9d185ac6703c4b0453974c0d85e9eee43e6941009296bb1f5eb0b54e2329e9f3","LICENSE-BSD":"83c1763356e822adde0a2cae748d938a73fdc263849ccff6b27776dff213bd32","LICENSE-MIT":"1a2f5c12ddc934d58956aa5dbdd3255fe55fd957633ab7d0d39e4f0daa73f7df","src/derive/from_bytes.rs":"4372ac845cdd39e4c1831bfe4f11e8e1a3e0a3ff0da414a81be7e796cf41b6be","src/derive/into_bytes.rs":"676719c623a834f75198d2cb38cafeef6139b2599fdd9c0475a787246803f374","src/derive/known_layout.rs":"86330367ee117d792d452f4c99364cbf74212107f99bb57cabb256d8ba0cd1ad","src/derive/mod.rs":"ca85ded5df7301465d1c2a1dc851a459af39a4620d3ebd11d537a784cb632a95","src/derive/try_from_bytes.rs":"f824965f82484a6f5ee85733a8d5ae09adfb2be75269376db9134874d6abcbbf","src/derive/unaligned.rs":"59eda2d1b65cd0b54112d66a48373f7acc1c66564fb7fcf440fe9a2e07b6c0b2","src/lib.rs":"061062dd290f71077508a01898d1df8e4b5b2cda148b32c82011b7b5055890c1","src/output_tests/expected/eq.expected.rs":"ca9967422f9010b330aad8e605abed5463bfea0b0eec750c65d3b7b35248565c","src/output_tests/expected/from_bytes_enum.expected.rs":"96c84b88dc015d06e05fab2b0eb125b98346a017bbb83cb556a53fb160ff107a","src/output_tests/expected/from_bytes_struct.expected.rs":"96c84b88dc015d06e05fab2b0eb125b98346a017bbb83cb556a53fb160ff107a","src/output_tests/expected/from_bytes_union.expected.rs":"c57154f0303fa05f637688040ad21f79829dece5217c05e4b5ae02c83fe86f70","src/output_tests/expected/from_zeros.expected.rs":"5227a0f08dd0857f2c5459ff179bd687ee020c00ca1c51c16d509e981585c2a5","src/output_tests/expected/hash.expected.rs":"bf33fa9d4117d12bd05e2acb86a795230d207401568910257af60c3b1fd3d70b","src/output_tests/expected/immutable.expected.rs":"18e347b77c82ca1d2a1cd27fc45c030d62cf3f6bcf629a919dfa21c2130d0317","src/output_tests/expected/into_bytes_enum.repr(C).expected.rs":"95ba4def5b89dfd03834e589243f3f7729d4c4996d78633378c7b8b4cd23d25f","src/output_tests/expected/into_bytes_enum.repr(i128).expected.rs":"69d25da57a2247c57a2325189d4151fbdb719bff29c965c50fef3affd872e4bb","src/output_tests/expected/into_bytes_enum.repr(i16).expected.rs":"07271c382552aee1d2a2caaf5e76979963d67aa3d62e33e1beb45f597f075d3e","src/output_tests/expected/into_bytes_enum.repr(i32).expected.rs":"364ee2c40886c0a9f2c7f2df35022b01a177ba63db7aa9de0df4ffa95d4c8be8","src/output_tests/expected/into_bytes_enum.repr(i64).expected.rs":"96dc965a327d3dee11320ca09d95f2f149231fbf43b5628a4e5dbe5127e482d6","src/output_tests/expected/into_bytes_enum.repr(i8).expected.rs":"dbdf05554e842d8d46f8a86fd48e53111d2970264740d11c37a957bbd8e36837","src/output_tests/expected/into_bytes_enum.repr(isize).expected.rs":"b3a713f94056a83e695f4555be25e5134bc7c860851ffc0df95bb10338e448a9","src/output_tests/expected/into_bytes_enum.repr(u128).expected.rs":"69b599455ec7aa13f2048a9ffccf28cfae6a47184f16901c0827ae28f051c8f3","src/output_tests/expected/into_bytes_enum.repr(u16).expected.rs":"f4bfdaf0eb4ab998bffee9b89fb51db28be72b8a6e04b049b4526f51281896f2","src/output_tests/expected/into_bytes_enum.repr(u32).expected.rs":"534df1229555319c608f3a830780b5c6fe2484ff228e0018d874e67af1da90ec","src/output_tests/expected/into_bytes_enum.repr(u64).expected.rs":"821848d03b48ec3eb1281daaf341cf8faefd51adc6f57b05530ec4d904e40aab","src/output_tests/expected/into_bytes_enum.repr(u8).expected.rs":"05664602d370ae97bfae120de9e52a6d3c66db4311ba2bbbb20a47b7825ac9db","src/output_tests/expected/into_bytes_enum.repr(usize).expected.rs":"a6414b929ea0d92c4ede7b7aa2a3b9716db64d26b6259e77ac64ed1d8d665ca5","src/output_tests/expected/into_bytes_struct_basic.expected.rs":"553bc4a48e15f77c9e378014a99afed8b587b5e5fb57060d54119c3a0cb20245","src/output_tests/expected/into_bytes_struct_empty.expected.rs":"a5acd221de00f6c09ed895c267541ae566ec88a3164d1ccf300117996fc94f06","src/output_tests/expected/into_bytes_struct_trailing.expected.rs":"55aab6b3b0d365c5c127c43da8a93f4bc346bcd3aca79932a18e67690f550f37","src/output_tests/expected/into_bytes_struct_trailing_generic.expected.rs":"43734b843fac0339f2070f2048dfa6afb0369a30963ee7c82cec42fe59dc30b9","src/output_tests/expected/known_layout_repr_c_struct.expected.rs":"7b9cbc28b87cf8d1b523874a3c641f3a7eb6d05abd8621ec49e7f11138869708","src/output_tests/expected/known_layout_struct.expected.rs":"a820c628e0904650974562383ae14ce4878af0652fef25978398e408755f1d71","src/output_tests/expected/split_at_repr_c.expected.rs":"7aa5abd3cd581620c59843bcecbd121ff2e13e257044afd500b61226d652fa78","src/output_tests/expected/split_at_repr_transparent.expected.rs":"7aa5abd3cd581620c59843bcecbd121ff2e13e257044afd500b61226d652fa78","src/output_tests/expected/try_from_bytes.expected.rs":"17ee55226af8b26b54272ac9a1cfdf5f37aad18e154cc67273806017d05b06be","src/output_tests/expected/try_from_bytes_enum_1.expected.rs":"ff219b53a82c24983cfb70bbe1d45110476e7f020983503e555e1ee7b70f232f","src/output_tests/expected/try_from_bytes_enum_2.expected.rs":"09ccfae0c99185803f1db71d862737360b655d787843fbbf7a0ee607250d0ca4","src/output_tests/expected/try_from_bytes_enum_3.expected.rs":"c31ecf9f0f6b82ab2384cc56fa4aca1d04d1fdd075a80dc97240189cfcc6823b","src/output_tests/expected/try_from_bytes_trivial_is_bit_valid_enum.expected.rs":"aa8a7af6c08cbbae97bbc7c1d909101812c11a789dfa6ff137850f769bd7751b","src/output_tests/expected/unaligned.expected.rs":"8c833f97005b6fd84875ace51bddbb8c0185696c4435eb5cd05ce720f89a0ef7","src/output_tests/mod.rs":"570f9a6c6c077afeaae19aa159171842f820985805c5300a14b7befeafd28dc3","src/repr.rs":"3e7d64635a84c6f1744d0bcfa7d3f07fd2b2b30581124a1acba74cc66906cd96","src/util.rs":"b7be6659c0f9b189214db63a93b62bdfa5c623881c5a26d51c7cecb777f18e98","tests/deprecated.rs":"c49b92bcdd1d005ec0c4ae033c5ebaddcc300f9003170a848d9c678ecad66978","tests/enum_from_zeros.rs":"b080fb192faf039348100ac41e666d3b19908d0312e245d77749eadd52d4a29a","tests/enum_known_layout.rs":"ce2c7bfc3c7272d03321f7eac7217326afd515f03af7dc7a9cd0b4465e68f193","tests/enum_no_cell.rs":"a353033f83ccec5258871a04e0ec7b4610191eba9bd024e6059a8b674165bba1","tests/enum_to_bytes.rs":"73baf3d27a889a39dc4e82c55ab7d36339f87bc1a5b2a4850d34751a598356fe","tests/enum_try_from_bytes.rs":"bf3126c117a03b95779c05c5102c660f78e1ce915f1924edb2da73451447a213","tests/enum_unaligned.rs":"0aa3324a672ebd07341ec7a316d1de391be52c1ca9daf21055c74b8c67d3aac4","tests/eq.rs":"7c07d1a311478664725632da4d599d4755ac659c589f37a597c73489a3d69c26","tests/hash.rs":"252efc53a24c92187b02a4f7cdbd9993af5ce40ac734797661308f55d4c4f591","tests/hygiene.rs":"afeb9601a2ba1efec58aed0650bb945923273b1b4377597301943df7f832ccd2","tests/include.rs":"35e32e30c67d7a73668b712faac24a95b552ed779bcbca34a55582f6e3e95688","tests/issue_2117.rs":"f41e8c5e021ccd7c994ae3f5468881d45d088acbfb5ab53f391cf03cf647d866","tests/issue_2835.rs":"0080e4beec745a72bf8be63882e7d0ef645b1ff5adbae6b20e1a519fcb981cfd","tests/issue_2880.rs":"8e7268473a10f53cdf3c62753facd8065d364e0ce699a9e72a7ea49e54250217","tests/issue_2915.rs":"9ac2729405d17176d8fa27d9b41590ac7ced232617fdcef7d181a6a89fa4cca4","tests/on_error.rs":"ca5129c290a38bb28c13a35f4137eca96ff62012a96a9d22ed75ee8e35a8c624","tests/paths_and_modules.rs":"b959482b7666fd1a4493c335121fb5ebf284a679a470801f162b18f8b50ce120","tests/priv_in_pub.rs":"1f00f7a510048179939efd78ff2092b846775f8cf3ab1b6ca2d12b3b21a98e79","tests/struct_from_bytes.rs":"b51b59bf4b4dc97acb433ff44edc1fac8fed6fa55e0b6a4be85a602cac184305","tests/struct_from_zeros.rs":"1f4f70ce8cff4a0de9a69206eda5be7db0dfb55408ea36533bff8798463eea9c","tests/struct_known_layout.rs":"d1b8e7804ab2886cd16ceb83a7e0eb76eab44b3315874ca1e40d4bbc326b4513","tests/struct_no_cell.rs":"889cdbdf2e86baf2615113a1c7c205a90a150e61d093fc3ff827b2653798ac7b","tests/struct_to_bytes.rs":"cb0baa03fb6daf6efa7bce75c7ae491b998ccd2a0cc81be371e60b0dfbffe913","tests/struct_try_from_bytes.rs":"639b93e0b091bc39dcaca50257164c2e4eaf38008dedb6286799375ec02b9e7b","tests/struct_unaligned.rs":"26e2ce75e599469b5bb040c14fb82cfea62a915c8760a12aa03ff8c8b6a124ca","tests/ui.rs":"2ef81654a1c59a60f5e21ba7bd647bfa67926270f73988eb90c0237408c16620","tests/ui/absence_of_deprecated_warning.msrv.stderr":"38f5f071dd29aa087a013943ad1aeb846eb235ed30e7a17d729ee357dc31f898","tests/ui/absence_of_deprecated_warning.nightly.stderr":"8bf02c0fddd3a2f98a974185cdc5b1dd06f1c9977a5a2cf8c539d3e774c62746","tests/ui/absence_of_deprecated_warning.rs":"bf875b4f7c7f56b01256027ec8cfbde13a282f0798ac0abe5607e1938fe55a0d","tests/ui/absence_of_deprecated_warning.stable.stderr":"8bf02c0fddd3a2f98a974185cdc5b1dd06f1c9977a5a2cf8c539d3e774c62746","tests/ui/cfgs/on_error.msrv.stderr":"2fcd93ecada07b3f3b57281fd3baad3ea761b127d1a9bcd7262ecc7748184fc8","tests/ui/cfgs/on_error.nightly.stderr":"6bc8f035b64a4234d532e9bb296320ad53437f8be31acefcf98232eb54862405","tests/ui/cfgs/on_error.rs":"0021256bbf2d64f178d1ede358b738dbfde4bbe5fc0705c7fd6cb67b713f5d9b","tests/ui/cfgs/on_error.stable.stderr":"6bc8f035b64a4234d532e9bb296320ad53437f8be31acefcf98232eb54862405","tests/ui/cfgs/union_into_bytes_cfg.msrv.stderr":"9a42c396bdcbc8c4df82e4ed3cee311a7b81997a5474b1b492c67915c7da9172","tests/ui/cfgs/union_into_bytes_cfg.nightly.stderr":"9faa253764415da5ef72fa69d060762fb62fd2b3becd6136b42b19947609c7df","tests/ui/cfgs/union_into_bytes_cfg.rs":"8503fc71624d9924983fd4d388565a0f76e5040a7b7f32ef055769c789e1f42c","tests/ui/cfgs/union_into_bytes_cfg.stable.stderr":"9faa253764415da5ef72fa69d060762fb62fd2b3becd6136b42b19947609c7df","tests/ui/derive_transparent.msrv.stderr":"b21a51995eb2542e494675c0f60c497a6c8917510c0de687bad797aad9bea9f8","tests/ui/derive_transparent.nightly.stderr":"3a9f3ab390d832c98e0234d06e8569458ad2a42ef055834b29f9e480951662d4","tests/ui/derive_transparent.rs":"66b1a1bcad4e65f66acb82acfd301411d78c84d41ac9e062d7f1cc77062b3be6","tests/ui/derive_transparent.stable.stderr":"4692e57dc69cf491faa7818f5829504d4654701e42e1d3efed76c4dd2c58e569","tests/ui/enum.msrv.stderr":"98c70d208a4642f9588a99afd599118dbfe8b8db594058ceb1840967dbd4ef7a","tests/ui/enum.nightly.stderr":"ec995e3d00c15430d98485629e3772d44e43d2b1263ba4ec853b8df6201af11a","tests/ui/enum.rs":"b1db7ca2046b8e001382ed9414546ed6ae5ca31a99921e426602a4d219a71e61","tests/ui/enum.stable.stderr":"7889ac7fa8223a32559be0d707cabffc6f1ad4e58ee461d78671144c49c4fa0d","tests/ui/enum_from_bytes_u8_too_few.msrv.stderr":"b0177a0f3f9426b1e0bf3c35f5080d2178824481470a03f36be9c255c009a095","tests/ui/enum_from_bytes_u8_too_few.nightly.stderr":"c061d4402e44ecee7d1c5fb5892b0ba561e01c5dee058248d62cebfc542e2ac0","tests/ui/enum_from_bytes_u8_too_few.rs":"8f9b6e8c27e109d4adc2e5c95e21211d4a7986bc6684dc70370d1a83cb791eb9","tests/ui/enum_from_bytes_u8_too_few.stable.stderr":"c061d4402e44ecee7d1c5fb5892b0ba561e01c5dee058248d62cebfc542e2ac0","tests/ui/late_compile_pass.msrv.stderr":"1f143f685e28abeaaf813757467f9ac9dd52f3d22a84e1341bc4e059c2b8d1e0","tests/ui/late_compile_pass.nightly.stderr":"69fa9c8b53e26ce478ac8ba105f875ba20ea52d194c0ea5afb6a1c2f8df1f16a","tests/ui/late_compile_pass.rs":"506408159f250ed3496d4dba41ae19ee6a0084f973cd80743abed43cd3ffcfd4","tests/ui/late_compile_pass.stable.stderr":"8c5b66671f1bcca64000bdc032a404131de0612f33fb85d6d15988e54a386874","tests/ui/mid_compile_pass.msrv.stderr":"38a45a595f2d889b99d3f3a0c4b9e2beca2be85850c8da2f04e44272f0ab768f","tests/ui/mid_compile_pass.nightly.stderr":"32219bb46bc9d97ed362bb46dd667817dcb3caed5fd74bddc786d8c5c76b6c7e","tests/ui/mid_compile_pass.rs":"a3b52312c094e999b148707aa243599f2ec1ff84f47bd7dd0707cf241a4e40a8","tests/ui/mid_compile_pass.stable.stderr":"32219bb46bc9d97ed362bb46dd667817dcb3caed5fd74bddc786d8c5c76b6c7e","tests/ui/msrv_specific.msrv.stderr":"53354cb76b04473f291e22349189704015b4ae1154877ded50b1fc9472b24f8f","tests/ui/msrv_specific.nightly.stderr":"56ce514833ccc62922177eccafa706e55b79b526096af19611b640c925bd0c4b","tests/ui/msrv_specific.rs":"3fc1c328c207408945260db70294aa7fd2d626dcfea91c2c1453c89e0bc68096","tests/ui/msrv_specific.stable.stderr":"56ce514833ccc62922177eccafa706e55b79b526096af19611b640c925bd0c4b","tests/ui/privacy.msrv.stderr":"caa2ac267dd3bd335466b3e69be8b0a63bd4633081a8ba0ea6ff819111f0a394","tests/ui/privacy.nightly.stderr":"4a33a0c9741c87e1ebbf687ca63ed6cbede8cccf9ca2e4152c509af095a4ccca","tests/ui/privacy.rs":"47a6c355d28e29356a5416426c3c9d03f899fdfc7cf9331a348b45af1a930cab","tests/ui/privacy.stable.stderr":"4a33a0c9741c87e1ebbf687ca63ed6cbede8cccf9ca2e4152c509af095a4ccca","tests/ui/struct.msrv.stderr":"72360d9d8cf9c8f7180ce8b53e1729725238eb422f789139f3dee543ad3865cd","tests/ui/struct.nightly.stderr":"7ffee9d6168b574ee3b86d44f79bd71f171777855770977dda05dc9c4b40565f","tests/ui/struct.rs":"1877801adc6880e0adeb2278011a65876318ec8640ecd162f9180b26f1959c9a","tests/ui/struct.stable.stderr":"3817317ccb3b243233a6ec326b53a8fbbf93ed5ff9ce65dc77711925920ece85","tests/ui/union.msrv.stderr":"022eac6060dbb472ed8f9d58e4d20213761afd2eee23bf57e8565c795a79a409","tests/ui/union.nightly.stderr":"eaeb26f267c2af72c080e89b70643402c87bb57356eeeb4e004534d693e80347","tests/ui/union.rs":"d9b76aab2e5fb1226c2608c5cfd4877540abd7292f889684a4e08c8d90053a2e","tests/ui/union.stable.stderr":"a00d9f6fc317b7f1af2124c7a98521711c6cfa77b4baec0d1e3c5b25a59a643a","tests/union_from_bytes.rs":"c8194d9ce55ffc756fed38b5272e738b1284ceff74dd2d07a160d8aea74447b8","tests/union_from_zeros.rs":"dd45058a4ddc268cc2f29b1228a947276b24c94d7cb278f1acc54dac036305af","tests/union_known_layout.rs":"6c8cc9c7901681bc02f4c986ed7d717c059474670d678dc288eef4e0c392c60f","tests/union_no_cell.rs":"c4dd72503164e5433ded5202e02add1024c79c9a36a440783cd20d27b3406a7b","tests/union_to_bytes.rs":"61390d98c077e3060c8cc844c3d03c3f9bb3ee6a5fe488111f72507a3bc67aea","tests/union_try_from_bytes.rs":"1b4753d510ef3444b6375dda28a73f5e1417521d51e45d6b80f66fd22ae08064","tests/union_unaligned.rs":"ff7deadd16e331b4a4c686033330ab9d0207b6e9279c0c3419c0a5c84ea30c94","tests/unsafe_cell.rs":"c186d04ae7ec6f0c2e05b2b24a15b53ea97496cdb80ef9a3cb5e88c3a847407f"},"package":"e2e817b7b52d0c7358d3246da9d69935ebb18116b2b102b4230dac079b4862f5"} \ No newline at end of file diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/hygiene.rs b/thirdparty/crates/zerocopy-derive-0.8.54/tests/hygiene.rs deleted file mode 100644 index 945159235..000000000 --- a/thirdparty/crates/zerocopy-derive-0.8.54/tests/hygiene.rs +++ /dev/null @@ -1,60 +0,0 @@ -// Copyright 2019 The Fuchsia Authors -// -// Licensed under a BSD-style license , Apache License, Version 2.0 -// , or the MIT -// license , at your option. -// This file may not be copied, modified, or distributed except according to -// those terms. - -// Make sure that macro hygiene will ensure that when we reference "zerocopy", -// that will work properly even if they've renamed the crate and have not -// imported its traits. - -// See comment in `include.rs` for why we disable the prelude. -#![no_implicit_prelude] -#![allow(warnings)] - -include!("include.rs"); - -extern crate zerocopy_renamed as _zerocopy; - -#[derive(_zerocopy::KnownLayout, _zerocopy::FromBytes, _zerocopy::Unaligned)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C)] -struct TypeParams<'a, T, I: imp::Iterator> { - a: T, - c: I::Item, - d: u8, - e: imp::PhantomData<&'a [::core::primitive::u8]>, - f: imp::PhantomData<&'static ::core::primitive::str>, - g: imp::PhantomData, -} - -util_assert_impl_all!( - TypeParams<'static, (), imp::IntoIter<()>>: - _zerocopy::KnownLayout, - _zerocopy::FromZeros, - _zerocopy::FromBytes, - _zerocopy::Unaligned -); - -// Regression test for #2177. -// -// This test ensures that `#[derive(KnownLayout)]` does not trigger the -// `private_bounds` lint when used on a public struct in a macro. -mod issue_2177 { - #![deny(private_bounds)] - // We need to access `_zerocopy` from the parent module. - use super::_zerocopy; - - macro_rules! define { - ($name:ident, $repr:ty) => { - #[derive(_zerocopy::KnownLayout)] - #[zerocopy(crate = "zerocopy_renamed")] - #[repr(C)] - pub struct $name($repr); - }; - } - - define!(Foo, u8); -} diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/paths_and_modules.rs b/thirdparty/crates/zerocopy-derive-0.8.54/tests/paths_and_modules.rs deleted file mode 100644 index 1a2119547..000000000 --- a/thirdparty/crates/zerocopy-derive-0.8.54/tests/paths_and_modules.rs +++ /dev/null @@ -1,43 +0,0 @@ -// Copyright 2019 The Fuchsia Authors -// -// Licensed under a BSD-style license , Apache License, Version 2.0 -// , or the MIT -// license , at your option. -// This file may not be copied, modified, or distributed except according to -// those terms. - -// See comment in `include.rs` for why we disable the prelude. -#![no_implicit_prelude] -#![allow(warnings)] - -include!("include.rs"); - -// Ensure that types that are use'd and types that are referenced by path work. - -mod foo { - use super::*; - - #[derive(imp::FromBytes, imp::IntoBytes, imp::Unaligned)] - #[zerocopy(crate = "zerocopy_renamed")] - #[repr(C)] - pub struct Foo { - foo: u8, - } - - #[derive(imp::FromBytes, imp::IntoBytes, imp::Unaligned)] - #[zerocopy(crate = "zerocopy_renamed")] - #[repr(C)] - pub struct Bar { - bar: u8, - } -} - -use foo::Foo; - -#[derive(imp::FromBytes, imp::IntoBytes, imp::Unaligned)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C)] -struct Baz { - foo: Foo, - bar: foo::Bar, -} diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_to_bytes.rs b/thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_to_bytes.rs deleted file mode 100644 index 40fa2e5a9..000000000 --- a/thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_to_bytes.rs +++ /dev/null @@ -1,229 +0,0 @@ -// Copyright 2019 The Fuchsia Authors -// -// Licensed under a BSD-style license , Apache License, Version 2.0 -// , or the MIT -// license , at your option. -// This file may not be copied, modified, or distributed except according to -// those terms. - -// See comment in `include.rs` for why we disable the prelude. -#![no_implicit_prelude] -#![allow(warnings)] - -include!("include.rs"); - -// A struct is `IntoBytes` if: -// - all fields are `IntoBytes` -// - `repr(C)` or `repr(transparent)` and -// - no padding (size of struct equals sum of size of field types) -// - `repr(packed)` - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C)] -struct CZst; - -util_assert_impl_all!(CZst: imp::IntoBytes); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C)] -struct C { - a: u8, - b: u8, - c: util::AU16, -} - -util_assert_impl_all!(C: imp::IntoBytes); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C)] -struct SyntacticUnsized { - a: u8, - b: u8, - c: [util::AU16], -} - -util_assert_impl_all!(C: imp::IntoBytes); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(transparent)] -struct Transparent { - a: u8, - b: (), -} - -util_assert_impl_all!(Transparent: imp::IntoBytes); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(transparent)] -struct TransparentGeneric { - a: (), - b: T, -} - -util_assert_impl_all!(TransparentGeneric: imp::IntoBytes); -util_assert_impl_all!(TransparentGeneric<[u64]>: imp::IntoBytes); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C, packed)] -struct CZstPacked; - -util_assert_impl_all!(CZstPacked: imp::IntoBytes); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C, packed)] -struct CPacked { - a: u8, - // NOTE: The `u16` type is not guaranteed to have alignment 2, although it - // does on many platforms. However, to fix this would require a custom type - // with a `#[repr(align(2))]` attribute, and `#[repr(packed)]` types are not - // allowed to transitively contain `#[repr(align(...))]` types. Thus, we - // have no choice but to use `u16` here. Luckily, these tests run in CI on - // platforms on which `u16` has alignment 2, so this isn't that big of a - // deal. - b: u16, -} - -util_assert_impl_all!(CPacked: imp::IntoBytes); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C, packed(2))] -// The same caveats as for CPacked apply - we're assuming u64 is at least -// 4-byte aligned by default. Without packed(2), this should fail, as there -// would be padding between a/b assuming u64 is 4+ byte aligned. -struct CPacked2 { - a: u16, - b: u64, -} - -util_assert_impl_all!(CPacked2: imp::IntoBytes); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C, packed)] -struct CPackedGeneric { - t: T, - // Unsized types stored in `repr(packed)` structs must not be dropped - // because dropping them in-place might be unsound depending on the - // alignment of the outer struct. Sized types can be dropped by first being - // moved to an aligned stack variable, but this isn't possible with unsized - // types. - u: imp::ManuallyDrop, -} - -util_assert_impl_all!(CPackedGeneric: imp::IntoBytes); -util_assert_impl_all!(CPackedGeneric: imp::IntoBytes); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(packed)] -struct PackedGeneric { - t: T, - // Unsized types stored in `repr(packed)` structs must not be dropped - // because dropping them in-place might be unsound depending on the - // alignment of the outer struct. Sized types can be dropped by first being - // moved to an aligned stack variable, but this isn't possible with unsized - // types. - u: imp::ManuallyDrop, -} - -util_assert_impl_all!(PackedGeneric: imp::IntoBytes); -util_assert_impl_all!(PackedGeneric: imp::IntoBytes); - -// This test is non-portable, but works so long as Rust happens to lay this -// struct out with no padding. -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -struct Unpacked { - a: u8, - b: u8, -} - -util_assert_impl_all!(Unpacked: imp::IntoBytes); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C)] -struct ReprCGenericOneField { - t: T, -} - -// Even though `ReprCGenericOneField` has generic type arguments, since it only -// has one field, we don't require that its field types implement `Unaligned`. -util_assert_impl_all!(ReprCGenericOneField: imp::IntoBytes); -util_assert_impl_all!(ReprCGenericOneField<[util::AU16]>: imp::IntoBytes); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C)] -struct ReprCGenericMultipleFields { - t: T, - u: U, -} - -// Since `ReprCGenericMultipleFields` is generic and has more than one field, -// all field types must implement `Unaligned`. -util_assert_impl_all!(ReprCGenericMultipleFields: imp::IntoBytes); -util_assert_impl_all!(ReprCGenericMultipleFields: imp::IntoBytes); -util_assert_not_impl_any!(ReprCGenericMultipleFields: imp::IntoBytes); -util_assert_not_impl_any!(ReprCGenericMultipleFields: imp::IntoBytes); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(transparent)] -struct Unsized { - a: [u8], -} - -util_assert_impl_all!(Unsized: imp::IntoBytes); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C, align(2))] -struct UnsizedAligned { - a: [[u8; 2]], -} - -util_assert_impl_all!(UnsizedAligned: imp::IntoBytes); - -// Deriving `IntoBytes` should work if the struct has bounded parameters. - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(transparent)] -struct WithParams<'a: 'b, 'b: 'a, T: 'a + 'b + imp::IntoBytes, const N: usize>( - [T; N], - imp::PhantomData<&'a &'b ()>, -) -where - 'a: 'b, - 'b: 'a, - T: 'a + 'b + imp::IntoBytes; - -util_assert_impl_all!(WithParams<'static, 'static, u8, 42>: imp::IntoBytes); - -// Test for the failure reported in #1182. - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C, packed)] -pub struct IndexEntryFlags(u8); - -#[derive(imp::IntoBytes)] -#[zerocopy(crate = "zerocopy_renamed")] -#[repr(C, packed)] -pub struct IndexEntry { - block_number: imp::native_endian::U64, - flags: IndexEntryFlags, - block_id: [u8; SIZE_BLOCK_ID], -} - -util_assert_impl_all!(IndexEntry<0>: imp::IntoBytes); -util_assert_impl_all!(IndexEntry<1>: imp::IntoBytes); diff --git a/thirdparty/crates/zerocopy-derive-0.8.56/.cargo-checksum.json b/thirdparty/crates/zerocopy-derive-0.8.56/.cargo-checksum.json new file mode 100644 index 000000000..7e7492155 --- /dev/null +++ b/thirdparty/crates/zerocopy-derive-0.8.56/.cargo-checksum.json @@ -0,0 +1 @@ +{"$comment":"This file only protects against accidental modifications. It is not a security mechanism and does not protect against malicious changes.","files":{".cargo_vcs_info.json":"f7564a266f16df7b25b35f789e539b0f63b89668f878d4f78156d2a789d9f1be","Cargo.lock":"319c66e68ffd0f91b83ce496a95e5e7bf7b46666811ed14cbbe96ad50f0bcb25","Cargo.toml":"cd5d4924814172c12f01740ea771201ea2a829731c2437dcd4f246d1c775664c","Cargo.toml.orig":"79a09324b6070ac955a6728143ac029101ea981463b751563ead45fe30e4170f","LICENSE-APACHE":"9d185ac6703c4b0453974c0d85e9eee43e6941009296bb1f5eb0b54e2329e9f3","LICENSE-BSD":"83c1763356e822adde0a2cae748d938a73fdc263849ccff6b27776dff213bd32","LICENSE-MIT":"1a2f5c12ddc934d58956aa5dbdd3255fe55fd957633ab7d0d39e4f0daa73f7df","src/derive/from_bytes.rs":"4372ac845cdd39e4c1831bfe4f11e8e1a3e0a3ff0da414a81be7e796cf41b6be","src/derive/into_bytes.rs":"575a1914b560ee9056596436b5b738c2a15f368829d40c545d3cbb3e058ba1bc","src/derive/known_layout.rs":"86330367ee117d792d452f4c99364cbf74212107f99bb57cabb256d8ba0cd1ad","src/derive/mod.rs":"ca85ded5df7301465d1c2a1dc851a459af39a4620d3ebd11d537a784cb632a95","src/derive/try_from_bytes.rs":"f824965f82484a6f5ee85733a8d5ae09adfb2be75269376db9134874d6abcbbf","src/derive/unaligned.rs":"59eda2d1b65cd0b54112d66a48373f7acc1c66564fb7fcf440fe9a2e07b6c0b2","src/lib.rs":"00d855fea1b0225e2e0f253523c3b4c97442490e54e4b3bb1e7ca2445b8951f8","src/output_tests/expected/eq.expected.rs":"ca9967422f9010b330aad8e605abed5463bfea0b0eec750c65d3b7b35248565c","src/output_tests/expected/from_bytes_enum.expected.rs":"96c84b88dc015d06e05fab2b0eb125b98346a017bbb83cb556a53fb160ff107a","src/output_tests/expected/from_bytes_struct.expected.rs":"96c84b88dc015d06e05fab2b0eb125b98346a017bbb83cb556a53fb160ff107a","src/output_tests/expected/from_bytes_union.expected.rs":"c57154f0303fa05f637688040ad21f79829dece5217c05e4b5ae02c83fe86f70","src/output_tests/expected/from_zeros.expected.rs":"5227a0f08dd0857f2c5459ff179bd687ee020c00ca1c51c16d509e981585c2a5","src/output_tests/expected/hash.expected.rs":"bf33fa9d4117d12bd05e2acb86a795230d207401568910257af60c3b1fd3d70b","src/output_tests/expected/immutable.expected.rs":"18e347b77c82ca1d2a1cd27fc45c030d62cf3f6bcf629a919dfa21c2130d0317","src/output_tests/expected/into_bytes_enum.repr(C).expected.rs":"95ba4def5b89dfd03834e589243f3f7729d4c4996d78633378c7b8b4cd23d25f","src/output_tests/expected/into_bytes_enum.repr(i128).expected.rs":"69d25da57a2247c57a2325189d4151fbdb719bff29c965c50fef3affd872e4bb","src/output_tests/expected/into_bytes_enum.repr(i16).expected.rs":"07271c382552aee1d2a2caaf5e76979963d67aa3d62e33e1beb45f597f075d3e","src/output_tests/expected/into_bytes_enum.repr(i32).expected.rs":"364ee2c40886c0a9f2c7f2df35022b01a177ba63db7aa9de0df4ffa95d4c8be8","src/output_tests/expected/into_bytes_enum.repr(i64).expected.rs":"96dc965a327d3dee11320ca09d95f2f149231fbf43b5628a4e5dbe5127e482d6","src/output_tests/expected/into_bytes_enum.repr(i8).expected.rs":"dbdf05554e842d8d46f8a86fd48e53111d2970264740d11c37a957bbd8e36837","src/output_tests/expected/into_bytes_enum.repr(isize).expected.rs":"b3a713f94056a83e695f4555be25e5134bc7c860851ffc0df95bb10338e448a9","src/output_tests/expected/into_bytes_enum.repr(u128).expected.rs":"69b599455ec7aa13f2048a9ffccf28cfae6a47184f16901c0827ae28f051c8f3","src/output_tests/expected/into_bytes_enum.repr(u16).expected.rs":"f4bfdaf0eb4ab998bffee9b89fb51db28be72b8a6e04b049b4526f51281896f2","src/output_tests/expected/into_bytes_enum.repr(u32).expected.rs":"534df1229555319c608f3a830780b5c6fe2484ff228e0018d874e67af1da90ec","src/output_tests/expected/into_bytes_enum.repr(u64).expected.rs":"821848d03b48ec3eb1281daaf341cf8faefd51adc6f57b05530ec4d904e40aab","src/output_tests/expected/into_bytes_enum.repr(u8).expected.rs":"05664602d370ae97bfae120de9e52a6d3c66db4311ba2bbbb20a47b7825ac9db","src/output_tests/expected/into_bytes_enum.repr(usize).expected.rs":"a6414b929ea0d92c4ede7b7aa2a3b9716db64d26b6259e77ac64ed1d8d665ca5","src/output_tests/expected/into_bytes_struct_basic.expected.rs":"553bc4a48e15f77c9e378014a99afed8b587b5e5fb57060d54119c3a0cb20245","src/output_tests/expected/into_bytes_struct_empty.expected.rs":"a5acd221de00f6c09ed895c267541ae566ec88a3164d1ccf300117996fc94f06","src/output_tests/expected/into_bytes_struct_homogeneous_generic.expected.rs":"dd6a9e1aeceec0af026e926af8101647e791f4773fc9ccaf550fc45f8c855a2b","src/output_tests/expected/into_bytes_struct_trailing.expected.rs":"55aab6b3b0d365c5c127c43da8a93f4bc346bcd3aca79932a18e67690f550f37","src/output_tests/expected/into_bytes_struct_trailing_generic.expected.rs":"43734b843fac0339f2070f2048dfa6afb0369a30963ee7c82cec42fe59dc30b9","src/output_tests/expected/known_layout_repr_c_struct.expected.rs":"7b9cbc28b87cf8d1b523874a3c641f3a7eb6d05abd8621ec49e7f11138869708","src/output_tests/expected/known_layout_struct.expected.rs":"a820c628e0904650974562383ae14ce4878af0652fef25978398e408755f1d71","src/output_tests/expected/split_at_repr_c.expected.rs":"7aa5abd3cd581620c59843bcecbd121ff2e13e257044afd500b61226d652fa78","src/output_tests/expected/split_at_repr_transparent.expected.rs":"7aa5abd3cd581620c59843bcecbd121ff2e13e257044afd500b61226d652fa78","src/output_tests/expected/try_from_bytes.expected.rs":"17ee55226af8b26b54272ac9a1cfdf5f37aad18e154cc67273806017d05b06be","src/output_tests/expected/try_from_bytes_enum_1.expected.rs":"ff219b53a82c24983cfb70bbe1d45110476e7f020983503e555e1ee7b70f232f","src/output_tests/expected/try_from_bytes_enum_2.expected.rs":"09ccfae0c99185803f1db71d862737360b655d787843fbbf7a0ee607250d0ca4","src/output_tests/expected/try_from_bytes_enum_3.expected.rs":"c31ecf9f0f6b82ab2384cc56fa4aca1d04d1fdd075a80dc97240189cfcc6823b","src/output_tests/expected/try_from_bytes_trivial_is_bit_valid_enum.expected.rs":"aa8a7af6c08cbbae97bbc7c1d909101812c11a789dfa6ff137850f769bd7751b","src/output_tests/expected/unaligned.expected.rs":"8c833f97005b6fd84875ace51bddbb8c0185696c4435eb5cd05ce720f89a0ef7","src/output_tests/mod.rs":"b9c70718beec548a84cacc86cb824e02098ead23a48114db4d7736645e12c9aa","src/repr.rs":"3e7d64635a84c6f1744d0bcfa7d3f07fd2b2b30581124a1acba74cc66906cd96","src/util.rs":"065a67d7cfcc0129bcf142f454390304bb89608a4de6ad1f85bd1db6f06ab6d6","tests/deprecated.rs":"c49b92bcdd1d005ec0c4ae033c5ebaddcc300f9003170a848d9c678ecad66978","tests/enum_from_zeros.rs":"b080fb192faf039348100ac41e666d3b19908d0312e245d77749eadd52d4a29a","tests/enum_known_layout.rs":"ce2c7bfc3c7272d03321f7eac7217326afd515f03af7dc7a9cd0b4465e68f193","tests/enum_no_cell.rs":"a353033f83ccec5258871a04e0ec7b4610191eba9bd024e6059a8b674165bba1","tests/enum_to_bytes.rs":"73baf3d27a889a39dc4e82c55ab7d36339f87bc1a5b2a4850d34751a598356fe","tests/enum_try_from_bytes.rs":"bf3126c117a03b95779c05c5102c660f78e1ce915f1924edb2da73451447a213","tests/enum_unaligned.rs":"0aa3324a672ebd07341ec7a316d1de391be52c1ca9daf21055c74b8c67d3aac4","tests/eq.rs":"7c07d1a311478664725632da4d599d4755ac659c589f37a597c73489a3d69c26","tests/hash.rs":"252efc53a24c92187b02a4f7cdbd9993af5ce40ac734797661308f55d4c4f591","tests/hygiene.rs":"60e9fcb38f8f3f60063e295dd48370579100f7edd0c51f121ce008be0b4f95e1","tests/include.rs":"35e32e30c67d7a73668b712faac24a95b552ed779bcbca34a55582f6e3e95688","tests/issue_2117.rs":"f41e8c5e021ccd7c994ae3f5468881d45d088acbfb5ab53f391cf03cf647d866","tests/issue_2835.rs":"0080e4beec745a72bf8be63882e7d0ef645b1ff5adbae6b20e1a519fcb981cfd","tests/issue_2880.rs":"8e7268473a10f53cdf3c62753facd8065d364e0ce699a9e72a7ea49e54250217","tests/issue_2915.rs":"9ac2729405d17176d8fa27d9b41590ac7ced232617fdcef7d181a6a89fa4cca4","tests/on_error.rs":"ca5129c290a38bb28c13a35f4137eca96ff62012a96a9d22ed75ee8e35a8c624","tests/paths_and_modules.rs":"b0dab4c0da3474f897c5a89964544dc4dbb64737081ea264c5c04f21645a6b83","tests/priv_in_pub.rs":"1f00f7a510048179939efd78ff2092b846775f8cf3ab1b6ca2d12b3b21a98e79","tests/struct_from_bytes.rs":"b51b59bf4b4dc97acb433ff44edc1fac8fed6fa55e0b6a4be85a602cac184305","tests/struct_from_zeros.rs":"1f4f70ce8cff4a0de9a69206eda5be7db0dfb55408ea36533bff8798463eea9c","tests/struct_known_layout.rs":"d1b8e7804ab2886cd16ceb83a7e0eb76eab44b3315874ca1e40d4bbc326b4513","tests/struct_no_cell.rs":"889cdbdf2e86baf2615113a1c7c205a90a150e61d093fc3ff827b2653798ac7b","tests/struct_to_bytes.rs":"21a8c6ce9b9317774a10a1e1a4602d03b8b972f28968781184d5cd36d0c66527","tests/struct_try_from_bytes.rs":"639b93e0b091bc39dcaca50257164c2e4eaf38008dedb6286799375ec02b9e7b","tests/struct_unaligned.rs":"26e2ce75e599469b5bb040c14fb82cfea62a915c8760a12aa03ff8c8b6a124ca","tests/ui.rs":"2ef81654a1c59a60f5e21ba7bd647bfa67926270f73988eb90c0237408c16620","tests/ui/absence_of_deprecated_warning.msrv.stderr":"38f5f071dd29aa087a013943ad1aeb846eb235ed30e7a17d729ee357dc31f898","tests/ui/absence_of_deprecated_warning.nightly.stderr":"8bf02c0fddd3a2f98a974185cdc5b1dd06f1c9977a5a2cf8c539d3e774c62746","tests/ui/absence_of_deprecated_warning.rs":"bf875b4f7c7f56b01256027ec8cfbde13a282f0798ac0abe5607e1938fe55a0d","tests/ui/absence_of_deprecated_warning.stable.stderr":"8bf02c0fddd3a2f98a974185cdc5b1dd06f1c9977a5a2cf8c539d3e774c62746","tests/ui/cfgs/on_error.msrv.stderr":"2fcd93ecada07b3f3b57281fd3baad3ea761b127d1a9bcd7262ecc7748184fc8","tests/ui/cfgs/on_error.nightly.stderr":"6bc8f035b64a4234d532e9bb296320ad53437f8be31acefcf98232eb54862405","tests/ui/cfgs/on_error.rs":"0021256bbf2d64f178d1ede358b738dbfde4bbe5fc0705c7fd6cb67b713f5d9b","tests/ui/cfgs/on_error.stable.stderr":"6bc8f035b64a4234d532e9bb296320ad53437f8be31acefcf98232eb54862405","tests/ui/cfgs/union_into_bytes_cfg.msrv.stderr":"9a42c396bdcbc8c4df82e4ed3cee311a7b81997a5474b1b492c67915c7da9172","tests/ui/cfgs/union_into_bytes_cfg.nightly.stderr":"9faa253764415da5ef72fa69d060762fb62fd2b3becd6136b42b19947609c7df","tests/ui/cfgs/union_into_bytes_cfg.rs":"8503fc71624d9924983fd4d388565a0f76e5040a7b7f32ef055769c789e1f42c","tests/ui/cfgs/union_into_bytes_cfg.stable.stderr":"9faa253764415da5ef72fa69d060762fb62fd2b3becd6136b42b19947609c7df","tests/ui/derive_transparent.msrv.stderr":"b21a51995eb2542e494675c0f60c497a6c8917510c0de687bad797aad9bea9f8","tests/ui/derive_transparent.nightly.stderr":"3a9f3ab390d832c98e0234d06e8569458ad2a42ef055834b29f9e480951662d4","tests/ui/derive_transparent.rs":"66b1a1bcad4e65f66acb82acfd301411d78c84d41ac9e062d7f1cc77062b3be6","tests/ui/derive_transparent.stable.stderr":"4692e57dc69cf491faa7818f5829504d4654701e42e1d3efed76c4dd2c58e569","tests/ui/enum.msrv.stderr":"98c70d208a4642f9588a99afd599118dbfe8b8db594058ceb1840967dbd4ef7a","tests/ui/enum.nightly.stderr":"ec995e3d00c15430d98485629e3772d44e43d2b1263ba4ec853b8df6201af11a","tests/ui/enum.rs":"b1db7ca2046b8e001382ed9414546ed6ae5ca31a99921e426602a4d219a71e61","tests/ui/enum.stable.stderr":"7889ac7fa8223a32559be0d707cabffc6f1ad4e58ee461d78671144c49c4fa0d","tests/ui/enum_from_bytes_u8_too_few.msrv.stderr":"b0177a0f3f9426b1e0bf3c35f5080d2178824481470a03f36be9c255c009a095","tests/ui/enum_from_bytes_u8_too_few.nightly.stderr":"c061d4402e44ecee7d1c5fb5892b0ba561e01c5dee058248d62cebfc542e2ac0","tests/ui/enum_from_bytes_u8_too_few.rs":"8f9b6e8c27e109d4adc2e5c95e21211d4a7986bc6684dc70370d1a83cb791eb9","tests/ui/enum_from_bytes_u8_too_few.stable.stderr":"c061d4402e44ecee7d1c5fb5892b0ba561e01c5dee058248d62cebfc542e2ac0","tests/ui/late_compile_pass.msrv.stderr":"1f143f685e28abeaaf813757467f9ac9dd52f3d22a84e1341bc4e059c2b8d1e0","tests/ui/late_compile_pass.nightly.stderr":"69fa9c8b53e26ce478ac8ba105f875ba20ea52d194c0ea5afb6a1c2f8df1f16a","tests/ui/late_compile_pass.rs":"506408159f250ed3496d4dba41ae19ee6a0084f973cd80743abed43cd3ffcfd4","tests/ui/late_compile_pass.stable.stderr":"8c5b66671f1bcca64000bdc032a404131de0612f33fb85d6d15988e54a386874","tests/ui/mid_compile_pass.msrv.stderr":"38a45a595f2d889b99d3f3a0c4b9e2beca2be85850c8da2f04e44272f0ab768f","tests/ui/mid_compile_pass.nightly.stderr":"32219bb46bc9d97ed362bb46dd667817dcb3caed5fd74bddc786d8c5c76b6c7e","tests/ui/mid_compile_pass.rs":"a3b52312c094e999b148707aa243599f2ec1ff84f47bd7dd0707cf241a4e40a8","tests/ui/mid_compile_pass.stable.stderr":"32219bb46bc9d97ed362bb46dd667817dcb3caed5fd74bddc786d8c5c76b6c7e","tests/ui/msrv_specific.msrv.stderr":"53354cb76b04473f291e22349189704015b4ae1154877ded50b1fc9472b24f8f","tests/ui/msrv_specific.nightly.stderr":"56ce514833ccc62922177eccafa706e55b79b526096af19611b640c925bd0c4b","tests/ui/msrv_specific.rs":"fa79ae13b957f458b4386117854c85cda37510d61cabde7636ebc9c8c4a28bf6","tests/ui/msrv_specific.stable.stderr":"56ce514833ccc62922177eccafa706e55b79b526096af19611b640c925bd0c4b","tests/ui/privacy.msrv.stderr":"caa2ac267dd3bd335466b3e69be8b0a63bd4633081a8ba0ea6ff819111f0a394","tests/ui/privacy.nightly.stderr":"4a33a0c9741c87e1ebbf687ca63ed6cbede8cccf9ca2e4152c509af095a4ccca","tests/ui/privacy.rs":"47a6c355d28e29356a5416426c3c9d03f899fdfc7cf9331a348b45af1a930cab","tests/ui/privacy.stable.stderr":"4a33a0c9741c87e1ebbf687ca63ed6cbede8cccf9ca2e4152c509af095a4ccca","tests/ui/struct.msrv.stderr":"de11c7335e8fe38c5437f2e418f13288e4bf3255cd452b565b7870328135a659","tests/ui/struct.nightly.stderr":"31aab19774ea4b0954c941b29d9d93c126fcde66170a3d6e7f2adbfbf42afa7a","tests/ui/struct.rs":"b5422757cb961a74f8dfe0db93e0c36a5e97ab926b060cd905c474dd46904927","tests/ui/struct.stable.stderr":"320e0ed9c3518c8a562a2bc0f3cb9dd4dc3f2f45e9f793efd98baea53241779f","tests/ui/union.msrv.stderr":"022eac6060dbb472ed8f9d58e4d20213761afd2eee23bf57e8565c795a79a409","tests/ui/union.nightly.stderr":"eaeb26f267c2af72c080e89b70643402c87bb57356eeeb4e004534d693e80347","tests/ui/union.rs":"d9b76aab2e5fb1226c2608c5cfd4877540abd7292f889684a4e08c8d90053a2e","tests/ui/union.stable.stderr":"a00d9f6fc317b7f1af2124c7a98521711c6cfa77b4baec0d1e3c5b25a59a643a","tests/union_from_bytes.rs":"c8194d9ce55ffc756fed38b5272e738b1284ceff74dd2d07a160d8aea74447b8","tests/union_from_zeros.rs":"dd45058a4ddc268cc2f29b1228a947276b24c94d7cb278f1acc54dac036305af","tests/union_known_layout.rs":"6c8cc9c7901681bc02f4c986ed7d717c059474670d678dc288eef4e0c392c60f","tests/union_no_cell.rs":"c4dd72503164e5433ded5202e02add1024c79c9a36a440783cd20d27b3406a7b","tests/union_to_bytes.rs":"61390d98c077e3060c8cc844c3d03c3f9bb3ee6a5fe488111f72507a3bc67aea","tests/union_try_from_bytes.rs":"1b4753d510ef3444b6375dda28a73f5e1417521d51e45d6b80f66fd22ae08064","tests/union_unaligned.rs":"ff7deadd16e331b4a4c686033330ab9d0207b6e9279c0c3419c0a5c84ea30c94","tests/unsafe_cell.rs":"c186d04ae7ec6f0c2e05b2b24a15b53ea97496cdb80ef9a3cb5e88c3a847407f"},"package":"f2ab42fc20575779bd240faa45f94a74256f755c0fa9e89f0ede20d91d0cdfc1"} \ No newline at end of file diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/.cargo_vcs_info.json b/thirdparty/crates/zerocopy-derive-0.8.56/.cargo_vcs_info.json similarity index 53% rename from thirdparty/crates/zerocopy-derive-0.8.54/.cargo_vcs_info.json rename to thirdparty/crates/zerocopy-derive-0.8.56/.cargo_vcs_info.json index 0b431877f..d6ae74529 100644 --- a/thirdparty/crates/zerocopy-derive-0.8.54/.cargo_vcs_info.json +++ b/thirdparty/crates/zerocopy-derive-0.8.56/.cargo_vcs_info.json @@ -1,6 +1,6 @@ { "git": { - "sha1": "a986089ee73111d5bfda48b0c7d29d3f9301571c" + "sha1": "6dc429c451bdf1d7202ec1ec2cf426514e00d8eb" }, "path_in_vcs": "zerocopy/zerocopy-derive" } \ No newline at end of file diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/BUILD.bazel b/thirdparty/crates/zerocopy-derive-0.8.56/BUILD.bazel similarity index 99% rename from thirdparty/crates/zerocopy-derive-0.8.54/BUILD.bazel rename to thirdparty/crates/zerocopy-derive-0.8.56/BUILD.bazel index 6f74d5f4b..a2cb565e7 100644 --- a/thirdparty/crates/zerocopy-derive-0.8.54/BUILD.bazel +++ b/thirdparty/crates/zerocopy-derive-0.8.56/BUILD.bazel @@ -106,7 +106,7 @@ rust_proc_macro( "@rules_rust//rust/platform:x86_64-unknown-uefi": [], "//conditions:default": ["@platforms//:incompatible"], }), - version = "0.8.54", + version = "0.8.56", deps = [ "//thirdparty/crates/proc-macro2-1.0.107:proc_macro2", "//thirdparty/crates/quote-1.0.47:quote", diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/Cargo.lock b/thirdparty/crates/zerocopy-derive-0.8.56/Cargo.lock similarity index 99% rename from thirdparty/crates/zerocopy-derive-0.8.54/Cargo.lock rename to thirdparty/crates/zerocopy-derive-0.8.56/Cargo.lock index 98c3ea3b2..4e5402143 100644 --- a/thirdparty/crates/zerocopy-derive-0.8.54/Cargo.lock +++ b/thirdparty/crates/zerocopy-derive-0.8.56/Cargo.lock @@ -67,7 +67,7 @@ checksum = "9312f7c4f6ff9069b165498234ce8be658059c6728633667c526e27dc2cf1df5" [[package]] name = "zerocopy-derive" -version = "0.8.54" +version = "0.8.56" dependencies = [ "dissimilar", "prettyplease", diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/Cargo.toml b/thirdparty/crates/zerocopy-derive-0.8.56/Cargo.toml similarity index 96% rename from thirdparty/crates/zerocopy-derive-0.8.54/Cargo.toml rename to thirdparty/crates/zerocopy-derive-0.8.56/Cargo.toml index 7e8de6669..791167bf1 100644 --- a/thirdparty/crates/zerocopy-derive-0.8.54/Cargo.toml +++ b/thirdparty/crates/zerocopy-derive-0.8.56/Cargo.toml @@ -12,11 +12,7 @@ [package] edition = "2021" name = "zerocopy-derive" -version = "0.8.54" -authors = [ - "Joshua Liebow-Feeser ", - "Jack Wrenn ", -] +version = "0.8.56" build = false exclude = [ ".*", @@ -188,7 +184,7 @@ features = ["full"] version = "1.0.9" [dev-dependencies.prettyplease] -version = "=0.2.17" +version = "0.2.17" [dev-dependencies.rustversion] version = "1.0" @@ -204,6 +200,7 @@ features = ["visit"] level = "warn" priority = 0 check-cfg = [ + "cfg(__ZEROCOPY_INTERNAL_USE_ONLY_NIGHTLY_FEATURES_IN_TESTS)", "cfg(zerocopy_derive_union_into_bytes)", "cfg(zerocopy_unstable_linux)", ] diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/Cargo.toml.orig b/thirdparty/crates/zerocopy-derive-0.8.56/Cargo.toml.orig similarity index 93% rename from thirdparty/crates/zerocopy-derive-0.8.54/Cargo.toml.orig rename to thirdparty/crates/zerocopy-derive-0.8.56/Cargo.toml.orig index 4ec4428b1..9bc771735 100644 --- a/thirdparty/crates/zerocopy-derive-0.8.54/Cargo.toml.orig +++ b/thirdparty/crates/zerocopy-derive-0.8.56/Cargo.toml.orig @@ -9,8 +9,7 @@ [package] edition = "2021" name = "zerocopy-derive" -version = "0.8.54" -authors = ["Joshua Liebow-Feeser ", "Jack Wrenn "] +version = "0.8.56" description = "Custom derive for traits from the zerocopy crate" license = "BSD-2-Clause OR Apache-2.0 OR MIT" repository = "https://github.com/google/zerocopy" @@ -25,6 +24,7 @@ exclude = [".*", "tests/enum_from_bytes.rs", "tests/ui-nightly/enum_from_bytes_u [lints.rust] # See #1792 for more context. unexpected_cfgs = { level = "warn", check-cfg = [ + 'cfg(__ZEROCOPY_INTERNAL_USE_ONLY_NIGHTLY_FEATURES_IN_TESTS)', 'cfg(zerocopy_derive_union_into_bytes)', 'cfg(zerocopy_unstable_linux)', ] } @@ -39,7 +39,7 @@ syn = { version = "2.0.46", features = ["full"] } [dev-dependencies] dissimilar = "1.0.9" -prettyplease = "=0.2.17" +prettyplease = "0.2.17" rustversion = "1.0" static_assertions = "1.1" syn = { version = "2.0.46", features = ["visit"] } diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/LICENSE-APACHE b/thirdparty/crates/zerocopy-derive-0.8.56/LICENSE-APACHE similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/LICENSE-APACHE rename to thirdparty/crates/zerocopy-derive-0.8.56/LICENSE-APACHE diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/LICENSE-BSD b/thirdparty/crates/zerocopy-derive-0.8.56/LICENSE-BSD similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/LICENSE-BSD rename to thirdparty/crates/zerocopy-derive-0.8.56/LICENSE-BSD diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/LICENSE-MIT b/thirdparty/crates/zerocopy-derive-0.8.56/LICENSE-MIT similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/LICENSE-MIT rename to thirdparty/crates/zerocopy-derive-0.8.56/LICENSE-MIT diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/derive/from_bytes.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/derive/from_bytes.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/derive/from_bytes.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/derive/from_bytes.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/derive/into_bytes.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/derive/into_bytes.rs similarity index 58% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/derive/into_bytes.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/derive/into_bytes.rs index a1510a4e3..76c4d1a3d 100644 --- a/thirdparty/crates/zerocopy-derive-0.8.54/src/derive/into_bytes.rs +++ b/thirdparty/crates/zerocopy-derive-0.8.56/src/derive/into_bytes.rs @@ -2,7 +2,7 @@ // use proc_macro2::{Span, TokenStream}; use quote::quote; -use syn::{Data, DataEnum, DataStruct, DataUnion, Error, Type}; +use syn::{parse_quote, Data, DataEnum, DataStruct, DataUnion, Error, Ident, Type, WherePredicate}; use crate::{ repr::{EnumRepr, StructUnionRepr}, @@ -18,6 +18,74 @@ pub(crate) fn derive_into_bytes(ctx: &Ctx, _top_level: Trait) -> Result derive_into_bytes_union(ctx, unn), } } + +/// If every field is exactly `T`, `[T; _]`, or a final `[T]` for the same type +/// parameter `T`, returns the bounds required to prove this to rustc. +fn homogeneous_field_bounds(ctx: &Ctx, strct: &DataStruct) -> Option> { + fn strip_parens_and_groups(mut ty: &Type) -> &Type { + loop { + ty = match ty { + Type::Group(group) => &group.elem, + Type::Paren(paren) => &paren.elem, + ty => return ty, + }; + } + } + + fn type_is_parameter(ty: &Type, parameter: &Ident) -> bool { + match strip_parens_and_groups(ty) { + Type::Path(path) => path.qself.is_none() && path.path.is_ident(parameter), + _ => false, + } + } + + let fields = strct.fields(); + ctx.ast.generics.type_params().find_map(|parameter| { + let parameter = ¶meter.ident; + let elements = fields + .iter() + .enumerate() + .map(|(index, (_, _, ty))| match strip_parens_and_groups(ty) { + Type::Array(array) => Some(&*array.elem), + Type::Slice(slice) if index + 1 == fields.len() => Some(&*slice.elem), + Type::Slice(_) => None, + ty => Some(ty), + }) + .collect::>>()?; + + if !elements.iter().all(|element| type_is_parameter(element, parameter)) { + return None; + } + + let zerocopy_crate = &ctx.zerocopy_crate; + let mut bounds = fields + .iter() + .map(|(_, _, ty)| parse_quote!(#ty: #zerocopy_crate::IntoBytes)) + .collect::>(); + + // `Ident` equality is only a syntactic prefilter above. In + // macro-generated input, two identifiers can both print as `T` and + // compare equal here while having different hygiene contexts. For + // example, a call-site `T` could resolve to a `u8` type alias while a + // def-site `T` resolves to this struct's type parameter. Instantiating + // that parameter with `u16` would make the fields actually be `u8` and + // `u16`; treating them as homogeneous could overlook padding and cause + // us to emit an unsound `IntoBytes` impl. + // + // Quote every element type from its original field AST so that its + // hygiene context is retained, then use `Identity` to have rustc verify + // that it resolves to `parameter`. Do not deduplicate these predicates: + // identically-printed types may have different hygiene contexts and + // must each be checked by rustc. + bounds.extend(elements.into_iter().map(|element| { + parse_quote! { + #element: #zerocopy_crate::util::macro_util::Identity + } + })); + Some(bounds) + }) +} + fn derive_into_bytes_struct(ctx: &Ctx, strct: &DataStruct) -> Result { let repr = StructUnionRepr::from_attrs(&ctx.ast.attrs)?; @@ -25,8 +93,12 @@ fn derive_into_bytes_struct(ctx: &Ctx, strct: &DataStruct) -> Result Result Result Result Result derive_hash => crate::derive::derive_hash); derive!(ByteEq => derive_eq => crate::derive::derive_eq); derive!(SplitAt => derive_split_at => crate::derive::derive_split_at); +/// Generates a struct whose two identically-printed field types resolve to +/// different types. This is used to test that derives preserve type identity +/// across macro hygiene contexts. +#[cfg(__ZEROCOPY_INTERNAL_USE_ONLY_NIGHTLY_FEATURES_IN_TESTS)] +#[doc(hidden)] +#[proc_macro] +pub fn __test_hygienically_mixed_into_bytes( + _input: proc_macro::TokenStream, +) -> proc_macro::TokenStream { + use proc_macro::{Group, Ident, Span, TokenStream, TokenTree}; + + fn rewrite(input: TokenStream) -> TokenStream { + input + .into_iter() + .map(|token| match token { + TokenTree::Ident(ident) if ident.to_string() == "CallT" => { + TokenTree::Ident(Ident::new("T", Span::call_site())) + } + TokenTree::Ident(ident) if ident.to_string() == "DefT" => { + TokenTree::Ident(Ident::new("T", Span::def_site())) + } + TokenTree::Group(group) => { + let mut rewritten = Group::new(group.delimiter(), rewrite(group.stream())); + rewritten.set_span(group.span()); + TokenTree::Group(rewritten) + } + token => token, + }) + .collect() + } + + rewrite( + "#[derive(zerocopy_renamed::IntoBytes)] \ + #[zerocopy(crate = \"zerocopy_renamed\")] \ + #[repr(C)] \ + struct IntoBytes15(CallT, DefT);" + .parse() + .expect("test input must parse"), + ) +} + #[cfg_attr(not(zerocopy_unstable_linux), doc(hidden))] #[proc_macro_derive(most_traits, attributes(zerocopy))] pub fn most_traits(ts: proc_macro::TokenStream) -> proc_macro::TokenStream { diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/eq.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/eq.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/eq.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/eq.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/from_bytes_enum.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/from_bytes_enum.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/from_bytes_enum.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/from_bytes_enum.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/from_bytes_struct.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/from_bytes_struct.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/from_bytes_struct.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/from_bytes_struct.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/from_bytes_union.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/from_bytes_union.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/from_bytes_union.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/from_bytes_union.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/from_zeros.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/from_zeros.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/from_zeros.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/from_zeros.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/hash.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/hash.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/hash.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/hash.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/immutable.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/immutable.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/immutable.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/immutable.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(C).expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(C).expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(C).expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(C).expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(i128).expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(i128).expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(i128).expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(i128).expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(i16).expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(i16).expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(i16).expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(i16).expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(i32).expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(i32).expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(i32).expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(i32).expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(i64).expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(i64).expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(i64).expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(i64).expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(i8).expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(i8).expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(i8).expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(i8).expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(isize).expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(isize).expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(isize).expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(isize).expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(u128).expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(u128).expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(u128).expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(u128).expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(u16).expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(u16).expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(u16).expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(u16).expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(u32).expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(u32).expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(u32).expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(u32).expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(u64).expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(u64).expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(u64).expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(u64).expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(u8).expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(u8).expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(u8).expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(u8).expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(usize).expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(usize).expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_enum.repr(usize).expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_enum.repr(usize).expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_struct_basic.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_struct_basic.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_struct_basic.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_struct_basic.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_struct_empty.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_struct_empty.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_struct_empty.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_struct_empty.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_struct_homogeneous_generic.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_struct_homogeneous_generic.expected.rs new file mode 100644 index 000000000..74c10f659 --- /dev/null +++ b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_struct_homogeneous_generic.expected.rs @@ -0,0 +1,25 @@ +#[allow( + deprecated, + private_bounds, + non_local_definitions, + non_camel_case_types, + non_upper_case_globals, + non_snake_case, + non_ascii_idents, + clippy::missing_inline_in_public_items, +)] +#[deny(ambiguous_associated_items)] +#[automatically_derived] +const _: () = { + unsafe impl ::zerocopy::IntoBytes for Foo + where + T: ::zerocopy::IntoBytes, + [T; N]: ::zerocopy::IntoBytes, + [T]: ::zerocopy::IntoBytes, + T: ::zerocopy::util::macro_util::Identity, + T: ::zerocopy::util::macro_util::Identity, + T: ::zerocopy::util::macro_util::Identity, + { + fn only_derive_is_allowed_to_implement_this_trait() {} + } +}; diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_struct_trailing.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_struct_trailing.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_struct_trailing.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_struct_trailing.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_struct_trailing_generic.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_struct_trailing_generic.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/into_bytes_struct_trailing_generic.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/into_bytes_struct_trailing_generic.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/known_layout_repr_c_struct.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/known_layout_repr_c_struct.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/known_layout_repr_c_struct.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/known_layout_repr_c_struct.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/known_layout_struct.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/known_layout_struct.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/known_layout_struct.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/known_layout_struct.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/split_at_repr_c.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/split_at_repr_c.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/split_at_repr_c.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/split_at_repr_c.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/split_at_repr_transparent.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/split_at_repr_transparent.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/split_at_repr_transparent.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/split_at_repr_transparent.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/try_from_bytes.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/try_from_bytes.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/try_from_bytes.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/try_from_bytes.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/try_from_bytes_enum_1.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/try_from_bytes_enum_1.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/try_from_bytes_enum_1.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/try_from_bytes_enum_1.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/try_from_bytes_enum_2.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/try_from_bytes_enum_2.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/try_from_bytes_enum_2.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/try_from_bytes_enum_2.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/try_from_bytes_enum_3.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/try_from_bytes_enum_3.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/try_from_bytes_enum_3.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/try_from_bytes_enum_3.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/try_from_bytes_trivial_is_bit_valid_enum.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/try_from_bytes_trivial_is_bit_valid_enum.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/try_from_bytes_trivial_is_bit_valid_enum.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/try_from_bytes_trivial_is_bit_valid_enum.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/unaligned.expected.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/unaligned.expected.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/expected/unaligned.expected.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/expected/unaligned.expected.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/mod.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/mod.rs similarity index 99% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/mod.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/mod.rs index 836eb6c0a..118b5069f 100644 --- a/thirdparty/crates/zerocopy-derive-0.8.54/src/output_tests/mod.rs +++ b/thirdparty/crates/zerocopy-derive-0.8.56/src/output_tests/mod.rs @@ -245,6 +245,16 @@ fn test_into_bytes_struct_trailing_generic() { } } +#[test] +fn test_into_bytes_struct_homogeneous_generic() { + test! { + IntoBytes { + #[repr(C)] + struct Foo(T, [T; N], [T]); + } expands to "expected/into_bytes_struct_homogeneous_generic.expected.rs" + } +} + #[test] fn test_into_bytes_enum() { macro_rules! test_repr { diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/repr.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/repr.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/repr.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/repr.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/src/util.rs b/thirdparty/crates/zerocopy-derive-0.8.56/src/util.rs similarity index 87% rename from thirdparty/crates/zerocopy-derive-0.8.54/src/util.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/src/util.rs index 933b7b3e6..bfb447d0f 100644 --- a/thirdparty/crates/zerocopy-derive-0.8.54/src/util.rs +++ b/thirdparty/crates/zerocopy-derive-0.8.56/src/util.rs @@ -13,9 +13,9 @@ use std::num::NonZeroU32; use proc_macro2::{Span, TokenStream}; use quote::{quote, quote_spanned, ToTokens}; use syn::{ - parse_quote, spanned::Spanned as _, Data, DataEnum, DataStruct, DataUnion, DeriveInput, Error, - Expr, ExprLit, Field, GenericParam, Ident, Index, Lit, LitStr, Meta, Path, Type, Variant, - Visibility, WherePredicate, + parse::ParseBuffer, parse_quote, spanned::Spanned as _, token::PathSep, Data, DataEnum, + DataStruct, DataUnion, DeriveInput, Error, Expr, ExprLit, Field, GenericParam, Ident, Index, + Lit, LitStr, Meta, Path, Type, Variant, Visibility, WherePredicate, }; use crate::repr::{CompoundRepr, EnumRepr, PrimitiveRepr, Repr, Spanned}; @@ -32,6 +32,56 @@ pub(crate) struct Ctx { pub(crate) on_error_span: Option, } +#[derive(Eq, PartialEq)] +enum CratePath { + External, + CrateRelative, + ModuleRelative, +} + +fn validate_crate_path(path: &Path) -> Result { + if path.segments.is_empty() { + return Err(()); + } + + enum ModuleRelative { + Yes, + No, + } + let first = path.segments[0].ident.to_string(); + let (mut prev_segment, path_type) = match first.as_str() { + "Self" => return Err(()), + "crate" => { + if path.leading_colon.is_some() { + return Err(()); + } + (ModuleRelative::No, CratePath::CrateRelative) + } + "self" | "super" => { + if path.leading_colon.is_some() { + return Err(()); + } + (ModuleRelative::Yes, CratePath::ModuleRelative) + } + _ => (ModuleRelative::No, CratePath::External), + }; + + for seg in path.segments.iter().skip(1) { + let ident = seg.ident.to_string(); + match ident.as_str() { + "Self" | "crate" | "self" => return Err(()), + "super" => match prev_segment { + ModuleRelative::Yes => {} + ModuleRelative::No => return Err(()), + }, + _ => { + prev_segment = ModuleRelative::No; + } + } + } + Ok(path_type) +} + impl Ctx { /// Attempt to extract a crate path from the provided attributes. Defaults to /// `::zerocopy` if not found. @@ -45,16 +95,32 @@ impl Ctx { if meta_list.path.is_ident("zerocopy") { attr.parse_nested_meta(|meta| { if meta.path.is_ident("crate") { - let expr = meta.value().and_then(|value| value.parse()); + let expr = meta.value().and_then(ParseBuffer::parse); if let Ok(Expr::Lit(ExprLit { lit: Lit::Str(lit), .. })) = expr { - if let Ok(path_lit) = lit.parse::() { - path = parse_quote!(::#path_lit); - return Ok(()); + if let Ok(mut path_lit) = lit.parse_with(Path::parse_mod_style) { + if let Ok(crate_path) = validate_crate_path(&path_lit) { + // If not expressly relative, absolutize. + if path_lit.leading_colon.is_none() && crate_path == CratePath::External { + path_lit.leading_colon = Some(PathSep::default()); + } + path = path_lit; + return Ok(()); + } + + return Err(Error::new( + lit.span(), + "`crate` attribute requires a valid module path", + )); } + + return Err(Error::new( + lit.span(), + "`crate` attribute requires a path as the value", + )); } return Err(Error::new( - Span::call_site(), + meta.path.span(), "`crate` attribute requires a path as the value", )); } @@ -860,4 +926,58 @@ pub(crate) mod testutil { } }); } + + #[test] + fn test_validate_crate_path() { + use syn::parse_str; + + let valid = [ + "zerocopy", + "crate", + "crate::foo::bar", + "self", + "self::foo", + "self::super::foo", + "super", + "super::foo", + "super::super::foo", + "super::super::super", + "foo::bar::baz", + "::foo::bar", + ]; + + for path_str in valid { + let path = parse_str::(path_str).unwrap(); + assert!( + super::validate_crate_path(&path).is_ok(), + "expected valid path for `{}`", + path_str + ); + } + + let invalid = [ + "::crate::foo", + "::self::foo", + "::super::foo", + "Self", + "Self::foo", + "foo::Self::bar", + "foo::crate::bar", + "foo::super::bar", + "foo::self", + "super::foo::super", + "super::crate::foo", + "crate::super::foo", + "self::self::foo", + ]; + + for path_str in invalid { + let path = parse_str::(path_str).unwrap(); + assert!( + super::validate_crate_path(&path).is_err(), + "expected invalid path for `{}`", + path_str + ); + } + } } diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/deprecated.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/deprecated.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/deprecated.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/deprecated.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/enum_from_zeros.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/enum_from_zeros.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/enum_from_zeros.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/enum_from_zeros.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/enum_known_layout.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/enum_known_layout.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/enum_known_layout.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/enum_known_layout.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/enum_no_cell.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/enum_no_cell.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/enum_no_cell.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/enum_no_cell.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/enum_to_bytes.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/enum_to_bytes.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/enum_to_bytes.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/enum_to_bytes.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/enum_try_from_bytes.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/enum_try_from_bytes.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/enum_try_from_bytes.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/enum_try_from_bytes.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/enum_unaligned.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/enum_unaligned.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/enum_unaligned.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/enum_unaligned.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/eq.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/eq.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/eq.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/eq.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/hash.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/hash.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/hash.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/hash.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.56/tests/hygiene.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/hygiene.rs new file mode 100644 index 000000000..43662e11a --- /dev/null +++ b/thirdparty/crates/zerocopy-derive-0.8.56/tests/hygiene.rs @@ -0,0 +1,114 @@ +// Copyright 2019 The Fuchsia Authors +// +// Licensed under a BSD-style license , Apache License, Version 2.0 +// , or the MIT +// license , at your option. +// This file may not be copied, modified, or distributed except according to +// those terms. + +// Make sure that macro hygiene will ensure that when we reference "zerocopy", +// that will work properly even if they've renamed the crate and have not +// imported its traits. + +// See comment in `include.rs` for why we disable the prelude. +#![no_implicit_prelude] +#![allow(warnings)] + +include!("include.rs"); + +extern crate zerocopy_renamed as _zerocopy; + +extern crate self as derive_path_test; + +pub mod nested { + pub extern crate zerocopy_renamed as reexported_zerocopy; +} + +macro_rules! test { + ($($path:tt)::*, $crate_str:tt) => { + #[derive( + $($path)::*::KnownLayout, + $($path)::*::FromBytes, + $($path)::*::Unaligned, + )] + #[zerocopy(crate = $crate_str)] + #[repr(C)] + struct TypeParams<'a, T, I: imp::Iterator> { + a: T, + c: I::Item, + d: u8, + e: imp::PhantomData<&'a [::core::primitive::u8]>, + f: imp::PhantomData<&'static ::core::primitive::str>, + g: imp::PhantomData, + } + + util_assert_impl_all!( + TypeParams<'static, (), imp::IntoIter<()>>: + $($path)::*::KnownLayout, + $($path)::*::FromZeros, + $($path)::*::FromBytes, + $($path)::*::Unaligned + ); + }; +} + +test!(_zerocopy, "zerocopy_renamed"); + +mod nested_external { + use super::*; + + test!( + derive_path_test::nested::reexported_zerocopy, + "derive_path_test::nested::reexported_zerocopy" + ); +} + +mod crate_relative { + use super::*; + + test!(crate::nested::reexported_zerocopy, "crate::nested::reexported_zerocopy"); +} + +mod super_relative { + use super::*; + + test!(super::nested::reexported_zerocopy, "super::nested::reexported_zerocopy"); +} + +mod self_super_relative { + use super::*; + + test!(self::super::nested::reexported_zerocopy, "self::super::nested::reexported_zerocopy"); +} + +mod super_super_relative { + mod inner { + use super::super::*; + + test!( + super::super::nested::reexported_zerocopy, + "super::super::nested::reexported_zerocopy" + ); + } +} + +// Regression test for #2177. +// +// This test ensures that `#[derive(KnownLayout)]` does not trigger the +// `private_bounds` lint when used on a public struct in a macro. +mod issue_2177 { + #![deny(private_bounds)] + // We need to access `_zerocopy` from the parent module. + use super::_zerocopy; + + macro_rules! define { + ($name:ident, $repr:ty) => { + #[derive(_zerocopy::KnownLayout)] + #[zerocopy(crate = "zerocopy_renamed")] + #[repr(C)] + pub struct $name($repr); + }; + } + + define!(Foo, u8); +} diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/include.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/include.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/include.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/include.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/issue_2117.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/issue_2117.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/issue_2117.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/issue_2117.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/issue_2835.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/issue_2835.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/issue_2835.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/issue_2835.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/issue_2880.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/issue_2880.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/issue_2880.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/issue_2880.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/issue_2915.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/issue_2915.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/issue_2915.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/issue_2915.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/on_error.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/on_error.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/on_error.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/on_error.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.56/tests/paths_and_modules.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/paths_and_modules.rs new file mode 100644 index 000000000..1019c587b --- /dev/null +++ b/thirdparty/crates/zerocopy-derive-0.8.56/tests/paths_and_modules.rs @@ -0,0 +1,89 @@ +// Copyright 2019 The Fuchsia Authors +// +// Licensed under a BSD-style license , Apache License, Version 2.0 +// , or the MIT +// license , at your option. +// This file may not be copied, modified, or distributed except according to +// those terms. + +// See comment in `include.rs` for why we disable the prelude. +#![no_implicit_prelude] +#![allow(warnings)] + +include!("include.rs"); + +extern crate self as derive_path_test; + +pub mod nested { + pub extern crate zerocopy_renamed as reexported_zerocopy; +} + +// Ensure that types that are use'd and types that are referenced by path work. + +macro_rules! test { + ($crate_path:tt) => { + mod foo { + use super::*; + + #[derive(imp::FromBytes, imp::IntoBytes, imp::Unaligned)] + #[zerocopy(crate = $crate_path)] + #[repr(C)] + pub struct Foo { + foo: u8, + } + + #[derive(imp::FromBytes, imp::IntoBytes, imp::Unaligned)] + #[zerocopy(crate = $crate_path)] + #[repr(C)] + pub struct Bar { + bar: u8, + } + } + + use self::foo::Foo; + + #[derive(imp::FromBytes, imp::IntoBytes, imp::Unaligned)] + #[zerocopy(crate = $crate_path)] + #[repr(C)] + struct Baz { + foo: Foo, + bar: foo::Bar, + } + }; +} + +test!("zerocopy_renamed"); + +mod root_relative { + use super::*; + + test!("derive_path_test::nested::reexported_zerocopy"); +} + +mod crate_relative { + use super::*; + + test!("crate::nested::reexported_zerocopy"); +} + +mod super_relative { + use super::*; + + test!("super::nested::reexported_zerocopy"); +} + +mod self_super_relative { + use super::*; + + test!("self::super::nested::reexported_zerocopy"); +} + +mod super_super_relative { + use super::*; + + mod inner { + use super::*; + + test!("super::super::nested::reexported_zerocopy"); + } +} diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/priv_in_pub.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/priv_in_pub.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/priv_in_pub.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/priv_in_pub.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_from_bytes.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_from_bytes.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_from_bytes.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_from_bytes.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_from_zeros.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_from_zeros.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_from_zeros.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_from_zeros.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_known_layout.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_known_layout.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_known_layout.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_known_layout.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_no_cell.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_no_cell.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_no_cell.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_no_cell.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_to_bytes.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_to_bytes.rs new file mode 100644 index 000000000..006dbe0f6 --- /dev/null +++ b/thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_to_bytes.rs @@ -0,0 +1,435 @@ +// Copyright 2019 The Fuchsia Authors +// +// Licensed under a BSD-style license , Apache License, Version 2.0 +// , or the MIT +// license , at your option. +// This file may not be copied, modified, or distributed except according to +// those terms. + +// See comment in `include.rs` for why we disable the prelude. +#![no_implicit_prelude] +#![allow(warnings)] + +include!("include.rs"); + +// A struct can derive `IntoBytes` if all of its fields implement `IntoBytes` +// and its representation lets the derive prove that the struct introduces no +// uninitialized outer padding. The cases below are grouped by representation +// and by the proof strategy used by the derive. + +// +// Non-generic `repr(C)` +// + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct CZst; + +util_assert_impl_all!(CZst: imp::IntoBytes); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, align(8))] +struct ReprCAlignedZst; + +util_assert_impl_all!(ReprCAlignedZst: imp::IntoBytes); + +#[derive(imp::IntoBytes, Copy, Clone)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, align(8))] +struct ReprCAligned8([u8; 8]); + +util_assert_impl_all!(ReprCAligned8: imp::IntoBytes); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct C { + a: u8, + b: u8, + c: util::AU16, +} + +util_assert_impl_all!(C: imp::IntoBytes); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct ReprCSyntacticDst { + a: u8, + b: u8, + c: [util::AU16], +} + +util_assert_impl_all!(ReprCSyntacticDst: imp::IntoBytes); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, align(2))] +struct ReprCSyntacticDstAligned { + a: [[u8; 2]], +} + +util_assert_impl_all!(ReprCSyntacticDstAligned: imp::IntoBytes); + +// +// Generic `repr(C)` +// + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct ReprCGenericOneField { + t: T, +} + +// Even though `ReprCGenericOneField` has generic type arguments, its one-field +// layout never requires an `Unaligned` bound. Sized, array, and slice +// instantiations are asserted in `assert_repr_c_homogeneous` below. + +// Given `T: Sized + IntoBytes`, a plain `repr(C)` struct whose fields are all +// `T`, `[T; N]`, or a final `[T]` introduces no outer padding. `T` and all of +// its arrays and slices have the same alignment. The size of `T`, every array, +// and every slice value is a multiple of that alignment; bytes within each `T` +// are covered by `T`'s `IntoBytes` implementation. +// +// The following six declarations exhaustively enumerate the direct two-field +// shape combinations in this grammar. A slice may only be the final field, so +// the first field is either `T` or `[T; N]`, while the second is `T`, `[T; M]`, +// or `[T]`. The one-field case is covered by `ReprCGenericOneField` above. + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct ReprCHomogeneousTThenT(T, T); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct ReprCHomogeneousTThenArray(T, [T; N]); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct ReprCHomogeneousArrayThenT([T; N], T); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct ReprCHomogeneousArrayThenArray([T; N], [T; M]); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct ReprCHomogeneousTThenSlice(T, [T]); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct ReprCHomogeneousArrayThenSlice([T; N], [T]); + +// Exercise longer named-field structs containing every allowed sized field +// shape, both with and without a trailing slice. Together with the two-field +// matrix above, these ensure that the derive handles repeated transitions and +// both of its sized/DST paths rather than special-casing a particular arity. +// The literal-length field also ensures that recognition does not depend on +// the array length being a const parameter. +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct ReprCHomogeneousMixedSized { + literal: [T; 0], + array0: [T; N], + t0: T, + array1: [T; M], + t1: T, +} + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct ReprCHomogeneousMixedDst { + t0: T, + array0: [T; N], + t1: T, + array1: [T; M], + tail: [T], +} + +// `align(1)` cannot increase a type's alignment, so it preserves the same +// no-padding argument as an unmodified `repr(C)`. Test both the sized and DST +// paths. +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, align(1))] +struct ReprCHomogeneousAlign1Sized(T, [T; N], T); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, align(1))] +struct ReprCHomogeneousAlign1Dst(T, [T; N], [T]); + +// `packed(2)` caps every field's alignment at the same value. Since every +// field's size is still a multiple of that capped alignment, it likewise +// preserves the no-padding argument. A packed DST may only contain elements +// which do not need drop, so the DST declaration additionally requires +// `Copy`. +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, packed(2))] +struct ReprCHomogeneousPacked2Sized(T, [T; N], T); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, packed(2))] +struct ReprCHomogeneousPacked2Dst(T, [T; N], [T]); + +// This generic assertion is stronger than checking a finite set of concrete +// element types and array lengths: its body only assumes `T: IntoBytes`, and +// is type-checked for every `N` and `M`. +fn assert_repr_c_homogeneous() { + fn assert_into_bytes() {} + + assert_into_bytes::>(); + assert_into_bytes::>(); + assert_into_bytes::>(); + assert_into_bytes::>(); + assert_into_bytes::>(); + assert_into_bytes::>(); + assert_into_bytes::>(); + assert_into_bytes::>(); + assert_into_bytes::>(); + assert_into_bytes::>(); + assert_into_bytes::>(); + assert_into_bytes::>(); + assert_into_bytes::>(); + assert_into_bytes::>(); +} + +fn assert_repr_c_homogeneous_packed_dst() { + fn assert_into_bytes() {} + + assert_into_bytes::>(); +} + +// `AU16` is guaranteed to have alignment 2 and not implement `Unaligned`, so +// these assertions distinguish the homogeneous case from the existing +// `Unaligned` fallback. The witnesses cover every field shape, zero and +// nonzero arrays in both positions, and both the sized and DST paths. +util_assert_impl_all!(ReprCHomogeneousTThenT: imp::IntoBytes); +util_assert_impl_all!(ReprCHomogeneousTThenArray: imp::IntoBytes); +util_assert_impl_all!(ReprCHomogeneousArrayThenT: imp::IntoBytes); +util_assert_impl_all!(ReprCHomogeneousArrayThenArray: imp::IntoBytes); +util_assert_impl_all!(ReprCHomogeneousTThenSlice: imp::IntoBytes); +util_assert_impl_all!(ReprCHomogeneousArrayThenSlice: imp::IntoBytes); +util_assert_impl_all!(ReprCHomogeneousArrayThenSlice: imp::IntoBytes); +util_assert_impl_all!(ReprCHomogeneousMixedSized: imp::IntoBytes); +util_assert_impl_all!(ReprCHomogeneousMixedDst: imp::IntoBytes); +util_assert_impl_all!(ReprCHomogeneousAlign1Sized: imp::IntoBytes); +util_assert_impl_all!(ReprCHomogeneousAlign1Dst: imp::IntoBytes); +// This exercises the case in which `packed(2)` actually lowers the element +// alignment rather than merely leaving it unchanged. +util_assert_impl_all!(ReprCHomogeneousPacked2Sized: imp::IntoBytes); +util_assert_impl_all!(ReprCHomogeneousPacked2Dst: imp::IntoBytes); + +// Zero-sized element types still carry alignment. In particular, a derive +// must not assume that an aligned field occupies any bytes. +util_assert_impl_all!(ReprCHomogeneousArrayThenSlice: imp::IntoBytes); + +// `IntoBytes` does not imply `Immutable`; interior-mutable element types are +// therefore part of the supported set too. +util_assert_impl_all!( + ReprCHomogeneousArrayThenSlice, 3>: imp::IntoBytes +); + +// A zero-length array does not eliminate the `T: IntoBytes` requirement: the +// trailing slice can still contain elements. `MaybeUninit` implements +// `Unaligned` but not `IntoBytes`, isolating the bound under test. +util_assert_not_impl_any!( + ReprCHomogeneousArrayThenSlice, 0>: imp::IntoBytes +); + +// Generic `repr(C)` structs outside of the homogeneous family fall back to +// requiring every field type to be `Unaligned`. +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct ReprCIndependentFields { + t: T, + u: U, +} + +util_assert_impl_all!(ReprCIndependentFields: imp::IntoBytes); +util_assert_impl_all!(ReprCIndependentFields: imp::IntoBytes); +util_assert_not_impl_any!(ReprCIndependentFields: imp::IntoBytes); +util_assert_not_impl_any!(ReprCIndependentFields: imp::IntoBytes); + +// The common element type is essential. Here, the zero-length `AU16` array +// gives the struct alignment 2, while an odd-length `[u8]` tail requires a +// trailing padding byte. +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C)] +struct ReprCHeterogeneousArrayThenSlice([T; N], [U]); + +util_assert_not_impl_any!( + ReprCHeterogeneousArrayThenSlice: imp::IntoBytes +); + +// +// `repr(transparent)` +// + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(transparent)] +struct Transparent { + a: u8, + b: (), +} + +util_assert_impl_all!(Transparent: imp::IntoBytes); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(transparent)] +struct TransparentGeneric { + a: (), + b: T, +} + +util_assert_impl_all!(TransparentGeneric: imp::IntoBytes); +util_assert_impl_all!(TransparentGeneric<[u64]>: imp::IntoBytes); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(transparent)] +struct Unsized { + a: [u8], +} + +util_assert_impl_all!(Unsized: imp::IntoBytes); + +// Deriving `IntoBytes` should work if the struct has bounded parameters. + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(transparent)] +struct WithParams<'a: 'b, 'b: 'a, T: 'a + 'b + imp::IntoBytes, const N: usize>( + [T; N], + imp::PhantomData<&'a &'b ()>, +) +where + 'a: 'b, + 'b: 'a, + T: 'a + 'b + imp::IntoBytes; + +util_assert_impl_all!(WithParams<'static, 'static, u8, 42>: imp::IntoBytes); + +// +// Packed representations +// + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, packed)] +struct CZstPacked; + +util_assert_impl_all!(CZstPacked: imp::IntoBytes); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, packed)] +struct CPacked { + a: u8, + // NOTE: The `u16` type is not guaranteed to have alignment 2, although it + // does on many platforms. However, to fix this would require a custom type + // with a `#[repr(align(2))]` attribute, and `#[repr(packed)]` types are not + // allowed to transitively contain `#[repr(align(...))]` types. Thus, we + // have no choice but to use `u16` here. Luckily, these tests run in CI on + // platforms on which `u16` has alignment 2, so this isn't that big of a + // deal. + b: u16, +} + +util_assert_impl_all!(CPacked: imp::IntoBytes); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, packed(2))] +// The same caveats as for CPacked apply - we're assuming u64 is at least +// 4-byte aligned by default. Without packed(2), this should fail, as there +// would be padding between a/b assuming u64 is 4+ byte aligned. +struct CPacked2 { + a: u16, + b: u64, +} + +util_assert_impl_all!(CPacked2: imp::IntoBytes); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, packed)] +struct CPackedGeneric { + t: T, + // Unsized types stored in `repr(packed)` structs must not be dropped + // because dropping them in-place might be unsound depending on the + // alignment of the outer struct. Sized types can be dropped by first being + // moved to an aligned stack variable, but this isn't possible with unsized + // types. + u: imp::ManuallyDrop, +} + +util_assert_impl_all!(CPackedGeneric: imp::IntoBytes); +util_assert_impl_all!(CPackedGeneric: imp::IntoBytes); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(packed)] +struct PackedGeneric { + t: T, + // Unsized types stored in `repr(packed)` structs must not be dropped + // because dropping them in-place might be unsound depending on the + // alignment of the outer struct. Sized types can be dropped by first being + // moved to an aligned stack variable, but this isn't possible with unsized + // types. + u: imp::ManuallyDrop, +} + +util_assert_impl_all!(PackedGeneric: imp::IntoBytes); +util_assert_impl_all!(PackedGeneric: imp::IntoBytes); + +// Test for the failure reported in #1182. + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, packed)] +pub struct IndexEntryFlags(u8); + +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, packed)] +pub struct IndexEntry { + block_number: imp::native_endian::U64, + flags: IndexEntryFlags, + block_id: [u8; SIZE_BLOCK_ID], +} + +util_assert_impl_all!(IndexEntry<0>: imp::IntoBytes); +util_assert_impl_all!(IndexEntry<1>: imp::IntoBytes); + +// +// Rust representation +// + +// This test is non-portable, but works so long as Rust happens to lay this +// struct out with no padding. +#[derive(imp::IntoBytes)] +#[zerocopy(crate = "zerocopy_renamed")] +struct Unpacked { + a: u8, + b: u8, +} + +util_assert_impl_all!(Unpacked: imp::IntoBytes); diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_try_from_bytes.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_try_from_bytes.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_try_from_bytes.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_try_from_bytes.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_unaligned.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_unaligned.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/struct_unaligned.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/struct_unaligned.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/absence_of_deprecated_warning.msrv.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/absence_of_deprecated_warning.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/absence_of_deprecated_warning.msrv.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/absence_of_deprecated_warning.msrv.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/absence_of_deprecated_warning.nightly.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/absence_of_deprecated_warning.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/absence_of_deprecated_warning.nightly.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/absence_of_deprecated_warning.nightly.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/absence_of_deprecated_warning.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/absence_of_deprecated_warning.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/absence_of_deprecated_warning.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/absence_of_deprecated_warning.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/absence_of_deprecated_warning.stable.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/absence_of_deprecated_warning.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/absence_of_deprecated_warning.stable.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/absence_of_deprecated_warning.stable.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/on_error.msrv.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/on_error.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/on_error.msrv.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/on_error.msrv.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/on_error.nightly.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/on_error.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/on_error.nightly.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/on_error.nightly.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/on_error.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/on_error.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/on_error.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/on_error.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/on_error.stable.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/on_error.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/on_error.stable.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/on_error.stable.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/union_into_bytes_cfg.msrv.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/union_into_bytes_cfg.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/union_into_bytes_cfg.msrv.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/union_into_bytes_cfg.msrv.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/union_into_bytes_cfg.nightly.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/union_into_bytes_cfg.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/union_into_bytes_cfg.nightly.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/union_into_bytes_cfg.nightly.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/union_into_bytes_cfg.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/union_into_bytes_cfg.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/union_into_bytes_cfg.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/union_into_bytes_cfg.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/union_into_bytes_cfg.stable.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/union_into_bytes_cfg.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/cfgs/union_into_bytes_cfg.stable.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/cfgs/union_into_bytes_cfg.stable.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/derive_transparent.msrv.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/derive_transparent.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/derive_transparent.msrv.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/derive_transparent.msrv.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/derive_transparent.nightly.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/derive_transparent.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/derive_transparent.nightly.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/derive_transparent.nightly.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/derive_transparent.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/derive_transparent.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/derive_transparent.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/derive_transparent.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/derive_transparent.stable.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/derive_transparent.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/derive_transparent.stable.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/derive_transparent.stable.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum.msrv.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum.msrv.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum.msrv.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum.nightly.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum.nightly.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum.nightly.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum.stable.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum.stable.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum.stable.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum_from_bytes_u8_too_few.msrv.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum_from_bytes_u8_too_few.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum_from_bytes_u8_too_few.msrv.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum_from_bytes_u8_too_few.msrv.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum_from_bytes_u8_too_few.nightly.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum_from_bytes_u8_too_few.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum_from_bytes_u8_too_few.nightly.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum_from_bytes_u8_too_few.nightly.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum_from_bytes_u8_too_few.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum_from_bytes_u8_too_few.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum_from_bytes_u8_too_few.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum_from_bytes_u8_too_few.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum_from_bytes_u8_too_few.stable.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum_from_bytes_u8_too_few.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/enum_from_bytes_u8_too_few.stable.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/enum_from_bytes_u8_too_few.stable.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/late_compile_pass.msrv.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/late_compile_pass.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/late_compile_pass.msrv.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/late_compile_pass.msrv.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/late_compile_pass.nightly.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/late_compile_pass.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/late_compile_pass.nightly.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/late_compile_pass.nightly.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/late_compile_pass.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/late_compile_pass.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/late_compile_pass.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/late_compile_pass.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/late_compile_pass.stable.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/late_compile_pass.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/late_compile_pass.stable.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/late_compile_pass.stable.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/mid_compile_pass.msrv.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/mid_compile_pass.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/mid_compile_pass.msrv.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/mid_compile_pass.msrv.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/mid_compile_pass.nightly.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/mid_compile_pass.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/mid_compile_pass.nightly.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/mid_compile_pass.nightly.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/mid_compile_pass.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/mid_compile_pass.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/mid_compile_pass.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/mid_compile_pass.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/mid_compile_pass.stable.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/mid_compile_pass.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/mid_compile_pass.stable.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/mid_compile_pass.stable.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/msrv_specific.msrv.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/msrv_specific.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/msrv_specific.msrv.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/msrv_specific.msrv.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/msrv_specific.nightly.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/msrv_specific.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/msrv_specific.nightly.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/msrv_specific.nightly.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/msrv_specific.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/msrv_specific.rs similarity index 83% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/msrv_specific.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/msrv_specific.rs index 97539f35b..2faa24434 100644 --- a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/msrv_specific.rs +++ b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/msrv_specific.rs @@ -21,15 +21,15 @@ use self::util::util::AU16; fn main() {} -// `repr(C, packed(2))` is not equivalent to `repr(C, packed)`. +// `repr(C, packed(2))` can still have padding between heterogeneous fields. #[derive(IntoBytes)] #[zerocopy(crate = "zerocopy_renamed")] #[repr(C, packed(2))] struct IntoBytes1 { - t0: T, - // Add a second field to avoid triggering the "repr(C) struct with one - // field" special case. - t1: T, + byte: u8, + // For `T = AU16`, this field remains 2-aligned and leaves a padding byte + // after `byte`. + t: T, } fn is_into_bytes_1() { diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/msrv_specific.stable.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/msrv_specific.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/msrv_specific.stable.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/msrv_specific.stable.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/privacy.msrv.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/privacy.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/privacy.msrv.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/privacy.msrv.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/privacy.nightly.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/privacy.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/privacy.nightly.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/privacy.nightly.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/privacy.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/privacy.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/privacy.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/privacy.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/privacy.stable.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/privacy.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/privacy.stable.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/privacy.stable.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/struct.msrv.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/struct.msrv.stderr similarity index 94% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/struct.msrv.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/struct.msrv.stderr index b76579bcb..6ef759542 100644 --- a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/struct.msrv.stderr +++ b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/struct.msrv.stderr @@ -51,9 +51,9 @@ error[E0277]: the trait bound `(): DynamicPaddingFree` is not = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `SplitAtNotKnownLayout: zerocopy_renamed::KnownLayout` is not satisfied - --> $DIR/struct.rs:328:10 + --> $DIR/struct.rs:357:10 | -328 | #[derive(SplitAt)] +357 | #[derive(SplitAt)] | ^^^^^^^ the trait `zerocopy_renamed::KnownLayout` is not implemented for `SplitAtNotKnownLayout` | note: required by a bound in `SplitAt` @@ -64,24 +64,24 @@ note: required by a bound in `SplitAt` = note: this error originates in the derive macro `SplitAt` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `u8: SplitAt` is not satisfied - --> $DIR/struct.rs:334:10 + --> $DIR/struct.rs:363:10 | -334 | #[derive(SplitAt, KnownLayout)] +363 | #[derive(SplitAt, KnownLayout)] | ^^^^^^^ the trait `SplitAt` is not implemented for `u8` | = help: see issue #48214 = note: this error originates in the derive macro `SplitAt` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0271]: type mismatch resolving `::PointerMetadata == usize` - --> $DIR/struct.rs:334:10 + --> $DIR/struct.rs:363:10 | -334 | #[derive(SplitAt, KnownLayout)] +363 | #[derive(SplitAt, KnownLayout)] | ^^^^^^^ expected `()`, found `usize` | = help: see issue #48214 = note: this error originates in the derive macro `SplitAt` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to 31 previous errors +error: aborting due to 39 previous errors Some errors have detailed explanations: E0271, E0277, E0692. For more information about an error, try `rustc --explain E0271`. diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/struct.nightly.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/struct.nightly.stderr similarity index 83% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/struct.nightly.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/struct.nightly.stderr index 1d2b14219..0a9cc887d 100644 --- a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/struct.nightly.stderr +++ b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/struct.nightly.stderr @@ -28,67 +28,117 @@ error: must have a non-align #[repr(...)] attribute in order to guarantee this t | = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) +error: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout + --> $DIR/struct.rs:270:10 + | +270 | #[derive(IntoBytes)] + | ^^^^^^^^^ + | + = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) + error: cannot derive `Unaligned` on type with alignment greater than 1 - --> $DIR/struct.rs:273:11 + --> $DIR/struct.rs:302:11 | -273 | #[repr(C, align(2))] +302 | #[repr(C, align(2))] | ^^^^^^^^ error: this conflicts with another representation hint - --> $DIR/struct.rs:279:8 + --> $DIR/struct.rs:308:8 | -279 | #[repr(transparent, align(2))] +308 | #[repr(transparent, align(2))] | ^^^^^^^^^^^ error: this conflicts with another representation hint - --> $DIR/struct.rs:288:8 + --> $DIR/struct.rs:317:8 | -288 | #[repr(packed, align(2))] +317 | #[repr(packed, align(2))] | ^^^^^^^^^^^^^^^^ error: this conflicts with another representation hint - --> $DIR/struct.rs:295:8 + --> $DIR/struct.rs:324:8 | -295 | #[repr(align(1), align(2))] +324 | #[repr(align(1), align(2))] | ^^^^^^^^^^^^^^^^^^ error: this conflicts with another representation hint - --> $DIR/struct.rs:301:8 + --> $DIR/struct.rs:330:8 | -301 | #[repr(align(2), align(4))] +330 | #[repr(align(2), align(4))] | ^^^^^^^^^^^^^^^^^^ error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment - --> $DIR/struct.rs:305:10 + --> $DIR/struct.rs:334:10 | -305 | #[derive(Unaligned)] +334 | #[derive(Unaligned)] | ^^^^^^^^^ | = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info) error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment - --> $DIR/struct.rs:310:10 + --> $DIR/struct.rs:339:10 | -310 | #[derive(Unaligned)] +339 | #[derive(Unaligned)] | ^^^^^^^^^ | = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info) error: this conflicts with another representation hint - --> $DIR/struct.rs:320:19 + --> $DIR/struct.rs:349:19 | -320 | #[repr(packed(2), C)] +349 | #[repr(packed(2), C)] | ___________________^ -321 | | -322 | | #[derive(Unaligned)] -323 | | #[zerocopy(crate = "zerocopy_renamed")] -324 | | #[repr(C, packed(2))] +350 | | +351 | | #[derive(Unaligned)] +352 | | #[zerocopy(crate = "zerocopy_renamed")] +353 | | #[repr(C, packed(2))] | |________^ +error: `crate` attribute requires a path as the value + --> $DIR/struct.rs:371:20 + | +371 | #[zerocopy(crate = "zerocopy_renamed"typo)] + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: `crate` attribute requires a valid module path + --> $DIR/struct.rs:377:20 + | +377 | #[zerocopy(crate = "Self::foo")] + | ^^^^^^^^^^^ + +error: `crate` attribute requires a valid module path + --> $DIR/struct.rs:383:20 + | +383 | #[zerocopy(crate = "::crate::foo")] + | ^^^^^^^^^^^^^^ + +error: `crate` attribute requires a valid module path + --> $DIR/struct.rs:389:20 + | +389 | #[zerocopy(crate = "foo::crate::bar")] + | ^^^^^^^^^^^^^^^^^ + +error: `crate` attribute requires a valid module path + --> $DIR/struct.rs:395:20 + | +395 | #[zerocopy(crate = "foo::super::bar")] + | ^^^^^^^^^^^^^^^^^ + +error: `crate` attribute requires a valid module path + --> $DIR/struct.rs:401:20 + | +401 | #[zerocopy(crate = "foo::Self::bar")] + | ^^^^^^^^^^^^^^^^ + +error: `crate` attribute requires a valid module path + --> $DIR/struct.rs:407:20 + | +407 | #[zerocopy(crate = "foo::self")] + | ^^^^^^^^^^^ + error[E0692]: transparent struct cannot have other repr hints - --> $DIR/struct.rs:279:8 + --> $DIR/struct.rs:308:8 | -279 | #[repr(transparent, align(2))] +308 | #[repr(transparent, align(2))] | ^^^^^^^^^^^ ^^^^^^^^ error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -462,21 +512,21 @@ help: add `#![feature(trivial_bounds)]` to the crate attributes to enable | error[E0587]: type has conflicting packed and align representation hints - --> $DIR/struct.rs:290:1 + --> $DIR/struct.rs:319:1 | -290 | struct Unaligned3; +319 | struct Unaligned3; | ^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `SplitAtNotKnownLayout: zerocopy_renamed::KnownLayout` is not satisfied - --> $DIR/struct.rs:328:10 + --> $DIR/struct.rs:357:10 | -328 | #[derive(SplitAt)] +357 | #[derive(SplitAt)] | ^^^^^^^ unsatisfied trait bound | help: the trait `zerocopy_renamed::KnownLayout` is not implemented for `SplitAtNotKnownLayout` - --> $DIR/struct.rs:332:1 + --> $DIR/struct.rs:361:1 | -332 | struct SplitAtNotKnownLayout([u8]); +361 | struct SplitAtNotKnownLayout([u8]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: Consider adding `#[derive(KnownLayout)]` to `SplitAtNotKnownLayout` = help: the following other types implement trait `zerocopy_renamed::KnownLayout`: @@ -494,19 +544,19 @@ note: required by a bound in `SplitAt` = note: this error originates in the derive macro `SplitAt` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `u8: SplitAt` is not satisfied - --> $DIR/struct.rs:334:10 + --> $DIR/struct.rs:363:10 | -334 | #[derive(SplitAt, KnownLayout)] +363 | #[derive(SplitAt, KnownLayout)] | ^^^^^^^ the trait `SplitAt` is not implemented for `u8` | = note: Consider adding `#[derive(SplitAt)]` to `u8` help: the following other types implement trait `SplitAt` - --> $DIR/struct.rs:328:10 + --> $DIR/struct.rs:357:10 | -328 | #[derive(SplitAt)] +357 | #[derive(SplitAt)] | ^^^^^^^ `SplitAtNotKnownLayout` ... -334 | #[derive(SplitAt, KnownLayout)] +363 | #[derive(SplitAt, KnownLayout)] | ^^^^^^^ `SplitAtSized` --> src/split_at.rs:253:0 | @@ -552,7 +602,29 @@ note: required by a bound in `is_into_bytes_11` | ^^^^^^^^^ required by this bound in `is_into_bytes_11` = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to 36 previous errors +error[E0271]: type mismatch resolving `::Type == u16` + --> $DIR/struct.rs:290:33 + | +290 | assert_into_bytes::>(); + | ^^^^^^^^^^^^^^^^ expected `u16`, found `u8` + | +note: required for `IntoBytes15` to implement `zerocopy_renamed::IntoBytes` + --> $DIR/struct.rs:285:5 + | +285 | zerocopy_derive::__test_hygienically_mixed_into_bytes!(); + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ unsatisfied trait bound introduced in this `derive` macro + = note: associated types for the current `impl` cannot be restricted in `where` clauses + = note: associated types for the current `impl` cannot be restricted in `where` clauses + = note: associated types for the current `impl` cannot be restricted in `where` clauses + = note: associated types for the current `impl` cannot be restricted in `where` clauses +note: required by a bound in `assert_into_bytes` + --> $DIR/struct.rs:287:29 + | +287 | fn assert_into_bytes() { + | ^^^^^^^^^ required by this bound in `assert_into_bytes` + = note: this error originates in the derive macro `zerocopy_renamed::IntoBytes` which comes from the expansion of the macro `zerocopy_derive::__test_hygienically_mixed_into_bytes` (in Nightly builds, run with -Z macro-backtrace for more info) + +error: aborting due to 45 previous errors -Some errors have detailed explanations: E0277, E0587, E0588, E0692. -For more information about an error, try `rustc --explain E0277`. +Some errors have detailed explanations: E0271, E0277, E0587, E0588, E0692. +For more information about an error, try `rustc --explain E0271`. diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/struct.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/struct.rs similarity index 81% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/struct.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/struct.rs index cb16a89d1..eee327b7e 100644 --- a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/struct.rs +++ b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/struct.rs @@ -228,15 +228,15 @@ struct IntoBytes10 { t: T, } -// `repr(C, packed(2))` is not equivalent to `repr(C, packed)`. +// `repr(C, packed(2))` can still have padding between heterogeneous fields. #[derive(IntoBytes)] #[zerocopy(crate = "zerocopy_renamed")] #[repr(C, packed(2))] struct IntoBytes11 { - t0: T, - // Add a second field to avoid triggering the "repr(C) struct with one - // field" special case. - t1: T, + byte: u8, + // For `T = AU16`, this field remains 2-aligned and leaves a padding byte + // after `byte`. + t: T, } fn is_into_bytes_11() { @@ -264,6 +264,35 @@ struct IntoBytes12 { #[repr(C, align(2))] struct IntoBytes13([u8]); +// A homogeneous multi-field optimization must still account for an explicit +// outer alignment. For `T = u8` and `N = 0`, odd-length tails have trailing +// padding. +#[derive(IntoBytes)] +//~[msrv, stable, nightly]^ ERROR: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout +#[zerocopy(crate = "zerocopy_renamed")] +#[repr(C, align(2))] +struct IntoBytes14([T; N], [T]); + +// A type captured at a macro invocation site can have the same spelling as a +// type parameter introduced by the macro while resolving to a different type. +// The homogeneous `repr(C)` optimization must not treat them as the same type. +#[cfg(nightly)] +mod into_bytes_15 { + use super::IntoBytes; + + type T = u8; + + zerocopy_derive::__test_hygienically_mixed_into_bytes!(); + + fn assert_into_bytes() { + if false { + assert_into_bytes::>(); + assert_into_bytes::>(); + //~[nightly]^ ERROR: type mismatch resolving `::Type == u16` + } + } +} + // // Unaligned errors // @@ -337,3 +366,45 @@ struct SplitAtNotKnownLayout([u8]); #[zerocopy(crate = "zerocopy_renamed")] #[repr(C)] struct SplitAtSized(u8); + +#[derive(KnownLayout)] +#[zerocopy(crate = "zerocopy_renamed"typo)] +//~[msrv, stable, nightly]^ ERROR: `crate` attribute requires a path as the value +#[repr(C)] +struct InvalidCrateSuffix(u8); + +#[derive(KnownLayout)] +#[zerocopy(crate = "Self::foo")] +//~[msrv, stable, nightly]^ ERROR: `crate` attribute requires a valid module path +#[repr(C)] +struct InvalidCrateSelf(u8); + +#[derive(KnownLayout)] +#[zerocopy(crate = "::crate::foo")] +//~[msrv, stable, nightly]^ ERROR: `crate` attribute requires a valid module path +#[repr(C)] +struct InvalidCrateLeadingColonRelative(u8); + +#[derive(KnownLayout)] +#[zerocopy(crate = "foo::crate::bar")] +//~[msrv, stable, nightly]^ ERROR: `crate` attribute requires a valid module path +#[repr(C)] +struct InvalidCrateNonLeadingCrate(u8); + +#[derive(KnownLayout)] +#[zerocopy(crate = "foo::super::bar")] +//~[msrv, stable, nightly]^ ERROR: `crate` attribute requires a valid module path +#[repr(C)] +struct InvalidCrateNonLeadingSuper(u8); + +#[derive(KnownLayout)] +#[zerocopy(crate = "foo::Self::bar")] +//~[msrv, stable, nightly]^ ERROR: `crate` attribute requires a valid module path +#[repr(C)] +struct InvalidCrateMiddleSelf(u8); + +#[derive(KnownLayout)] +#[zerocopy(crate = "foo::self")] +//~[msrv, stable, nightly]^ ERROR: `crate` attribute requires a valid module path +#[repr(C)] +struct InvalidCrateTrailingSelf(u8); diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/struct.stable.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/struct.stable.stderr similarity index 89% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/struct.stable.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/struct.stable.stderr index 135aa98a6..3e5d6954f 100644 --- a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/struct.stable.stderr +++ b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/struct.stable.stderr @@ -28,62 +28,112 @@ error: must have a non-align #[repr(...)] attribute in order to guarantee this t | = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) +error: must have a non-align #[repr(...)] attribute in order to guarantee this type's memory layout + --> $DIR/struct.rs:270:10 + | +270 | #[derive(IntoBytes)] + | ^^^^^^^^^ + | + = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) + error: cannot derive `Unaligned` on type with alignment greater than 1 - --> $DIR/struct.rs:273:11 + --> $DIR/struct.rs:302:11 | -273 | #[repr(C, align(2))] +302 | #[repr(C, align(2))] | ^^^^^ error: this conflicts with another representation hint - --> $DIR/struct.rs:279:8 + --> $DIR/struct.rs:308:8 | -279 | #[repr(transparent, align(2))] +308 | #[repr(transparent, align(2))] | ^^^^^^^^^^^ error: this conflicts with another representation hint - --> $DIR/struct.rs:288:16 + --> $DIR/struct.rs:317:16 | -288 | #[repr(packed, align(2))] +317 | #[repr(packed, align(2))] | ^^^^^ error: this conflicts with another representation hint - --> $DIR/struct.rs:295:18 + --> $DIR/struct.rs:324:18 | -295 | #[repr(align(1), align(2))] +324 | #[repr(align(1), align(2))] | ^^^^^ error: this conflicts with another representation hint - --> $DIR/struct.rs:301:18 + --> $DIR/struct.rs:330:18 | -301 | #[repr(align(2), align(4))] +330 | #[repr(align(2), align(4))] | ^^^^^ error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment - --> $DIR/struct.rs:305:10 + --> $DIR/struct.rs:334:10 | -305 | #[derive(Unaligned)] +334 | #[derive(Unaligned)] | ^^^^^^^^^ | = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info) error: must have #[repr(C)], #[repr(transparent)], or #[repr(packed)] attribute in order to guarantee this type's alignment - --> $DIR/struct.rs:310:10 + --> $DIR/struct.rs:339:10 | -310 | #[derive(Unaligned)] +339 | #[derive(Unaligned)] | ^^^^^^^^^ | = note: this error originates in the derive macro `Unaligned` (in Nightly builds, run with -Z macro-backtrace for more info) error: this conflicts with another representation hint - --> $DIR/struct.rs:324:8 + --> $DIR/struct.rs:353:8 | -324 | #[repr(C, packed(2))] +353 | #[repr(C, packed(2))] | ^ +error: `crate` attribute requires a path as the value + --> $DIR/struct.rs:371:20 + | +371 | #[zerocopy(crate = "zerocopy_renamed"typo)] + | ^^^^^^^^^^^^^^^^^^^^^^ + +error: `crate` attribute requires a valid module path + --> $DIR/struct.rs:377:20 + | +377 | #[zerocopy(crate = "Self::foo")] + | ^^^^^^^^^^^ + +error: `crate` attribute requires a valid module path + --> $DIR/struct.rs:383:20 + | +383 | #[zerocopy(crate = "::crate::foo")] + | ^^^^^^^^^^^^^^ + +error: `crate` attribute requires a valid module path + --> $DIR/struct.rs:389:20 + | +389 | #[zerocopy(crate = "foo::crate::bar")] + | ^^^^^^^^^^^^^^^^^ + +error: `crate` attribute requires a valid module path + --> $DIR/struct.rs:395:20 + | +395 | #[zerocopy(crate = "foo::super::bar")] + | ^^^^^^^^^^^^^^^^^ + +error: `crate` attribute requires a valid module path + --> $DIR/struct.rs:401:20 + | +401 | #[zerocopy(crate = "foo::Self::bar")] + | ^^^^^^^^^^^^^^^^ + +error: `crate` attribute requires a valid module path + --> $DIR/struct.rs:407:20 + | +407 | #[zerocopy(crate = "foo::self")] + | ^^^^^^^^^^^ + error[E0692]: transparent struct cannot have other repr hints - --> $DIR/struct.rs:279:8 + --> $DIR/struct.rs:308:8 | -279 | #[repr(transparent, align(2))] +308 | #[repr(transparent, align(2))] | ^^^^^^^^^^^ ^^^^^^^^ error[E0277]: the size for values of type `[u8]` cannot be known at compilation time @@ -429,21 +479,21 @@ help: the trait `DynamicPaddingFree` is not implemented for ` = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0587]: type has conflicting packed and align representation hints - --> $DIR/struct.rs:290:1 + --> $DIR/struct.rs:319:1 | -290 | struct Unaligned3; +319 | struct Unaligned3; | ^^^^^^^^^^^^^^^^^ error[E0277]: the trait bound `SplitAtNotKnownLayout: zerocopy_renamed::KnownLayout` is not satisfied - --> $DIR/struct.rs:328:10 + --> $DIR/struct.rs:357:10 | -328 | #[derive(SplitAt)] +357 | #[derive(SplitAt)] | ^^^^^^^ unsatisfied trait bound | help: the trait `zerocopy_renamed::KnownLayout` is not implemented for `SplitAtNotKnownLayout` - --> $DIR/struct.rs:332:1 + --> $DIR/struct.rs:361:1 | -332 | struct SplitAtNotKnownLayout([u8]); +361 | struct SplitAtNotKnownLayout([u8]); | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ = note: Consider adding `#[derive(KnownLayout)]` to `SplitAtNotKnownLayout` = help: the following other types implement trait `zerocopy_renamed::KnownLayout`: @@ -464,19 +514,19 @@ note: required by a bound in `SplitAt` = note: this error originates in the derive macro `SplitAt` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0277]: the trait bound `u8: SplitAt` is not satisfied - --> $DIR/struct.rs:334:10 + --> $DIR/struct.rs:363:10 | -334 | #[derive(SplitAt, KnownLayout)] +363 | #[derive(SplitAt, KnownLayout)] | ^^^^^^^ the trait `SplitAt` is not implemented for `u8` | = note: Consider adding `#[derive(SplitAt)]` to `u8` help: the following other types implement trait `SplitAt` - --> $DIR/struct.rs:328:10 + --> $DIR/struct.rs:357:10 | -328 | #[derive(SplitAt)] +357 | #[derive(SplitAt)] | ^^^^^^^ `SplitAtNotKnownLayout` ... -334 | #[derive(SplitAt, KnownLayout)] +363 | #[derive(SplitAt, KnownLayout)] | ^^^^^^^ `SplitAtSized` | ::: $WORKSPACE/src/split_at.rs:253:1 @@ -520,7 +570,7 @@ note: required by a bound in `is_into_bytes_11` | ^^^^^^^^^ required by this bound in `is_into_bytes_11` = note: this error originates in the derive macro `IntoBytes` (in Nightly builds, run with -Z macro-backtrace for more info) -error: aborting due to 36 previous errors +error: aborting due to 44 previous errors Some errors have detailed explanations: E0277, E0587, E0588, E0692. For more information about an error, try `rustc --explain E0277`. diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/union.msrv.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/union.msrv.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/union.msrv.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/union.msrv.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/union.nightly.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/union.nightly.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/union.nightly.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/union.nightly.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/union.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/union.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/union.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/union.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/union.stable.stderr b/thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/union.stable.stderr similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/ui/union.stable.stderr rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/ui/union.stable.stderr diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/union_from_bytes.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/union_from_bytes.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/union_from_bytes.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/union_from_bytes.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/union_from_zeros.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/union_from_zeros.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/union_from_zeros.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/union_from_zeros.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/union_known_layout.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/union_known_layout.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/union_known_layout.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/union_known_layout.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/union_no_cell.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/union_no_cell.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/union_no_cell.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/union_no_cell.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/union_to_bytes.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/union_to_bytes.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/union_to_bytes.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/union_to_bytes.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/union_try_from_bytes.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/union_try_from_bytes.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/union_try_from_bytes.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/union_try_from_bytes.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/union_unaligned.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/union_unaligned.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/union_unaligned.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/union_unaligned.rs diff --git a/thirdparty/crates/zerocopy-derive-0.8.54/tests/unsafe_cell.rs b/thirdparty/crates/zerocopy-derive-0.8.56/tests/unsafe_cell.rs similarity index 100% rename from thirdparty/crates/zerocopy-derive-0.8.54/tests/unsafe_cell.rs rename to thirdparty/crates/zerocopy-derive-0.8.56/tests/unsafe_cell.rs diff --git a/website/README.md b/website/README.md index 5016867de..1b9ff7b2b 100644 --- a/website/README.md +++ b/website/README.md @@ -67,7 +67,7 @@ its `node_modules` path is listed in `.bazelignore`. ## Toolchain constraints -Two pins are deliberate and should not be "fixed" by a routine upgrade. +Three pins are deliberate and should not be "fixed" by a routine upgrade. **TypeScript stays on the 6 line.** TypeScript 7.0 dropped the programmatic API that `@astrojs/check` uses, so `pnpm check` fails on 7.x @@ -80,6 +80,12 @@ pnpm resolves two copies. Bazel's `public_hoist_packages` cannot hoist an ambiguous name and fails the build. Each project therefore forces one version in its `pnpm-workspace.yaml`. +**`shiki` is pinned in `cfd/`.** `cfd/shiki-rust-themes.mjs` derives the site's +Rust themes from the `bundledThemes` of the project's own `shiki`, while astro +highlights with whatever its `^4.0.2` dependency resolves to. Left free, pnpm +keeps two copies and the derived themes cross a version boundary, so +`cfd/pnpm-workspace.yaml` forces one. + Note that pnpm 11 no longer reads the `pnpm` field from `package.json`, so `overrides` and `onlyBuiltDependencies` must live in `pnpm-workspace.yaml`. An override placed in `package.json` is silently ignored, and a missing diff --git a/website/cfd/README.md b/website/cfd/README.md index 84105773e..2085f5d0a 100644 --- a/website/cfd/README.md +++ b/website/cfd/README.md @@ -100,6 +100,11 @@ to 7.x. two resolved copies break Bazel's `public_hoist_packages`. See [`../README.md`](../README.md) for both constraints. +`shiki` is pinned in the same file. `shiki-rust-themes.mjs` derives its themes +from the `bundledThemes` of this project's own copy, while astro highlights with +the copy its `^4.0.2` dependency resolves; a single override keeps those the +same shiki. + ## Deliberate omissions - **No Pagefind.** The marketing site ships an unread search index on every diff --git a/website/cfd/package.json b/website/cfd/package.json index 7a9da0e20..93474b970 100644 --- a/website/cfd/package.json +++ b/website/cfd/package.json @@ -13,15 +13,15 @@ "check:tokens": "diff -u ../web/src/styles/tokens.css src/styles/tokens.css && echo 'tokens in sync'" }, "dependencies": { - "@astrojs/mdx": "^7.0.3", + "@astrojs/mdx": "^7.0.5", "@astrojs/sitemap": "^3.7.3", - "astro": "^7.1.3" + "astro": "^7.2.0" }, "devDependencies": { - "@astrojs/check": "^0.9.9", - "shiki": "^4.3.1", + "@astrojs/check": "^0.9.10", + "shiki": "^4.4.3", "typescript": "^6.0.3", - "wrangler": "4.112.0" + "wrangler": "4.120.1" }, "packageManager": "pnpm@11.9.0" } diff --git a/website/cfd/pnpm-lock.yaml b/website/cfd/pnpm-lock.yaml index 1f0da559b..6aaa7cfe8 100644 --- a/website/cfd/pnpm-lock.yaml +++ b/website/cfd/pnpm-lock.yaml @@ -5,113 +5,114 @@ settings: excludeLinksFromLockfile: false overrides: - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/markdown-satteri': 0.3.5 + shiki: 4.4.3 importers: .: dependencies: '@astrojs/mdx': - specifier: ^7.0.3 - version: 7.0.3(@astrojs/markdown-satteri@0.3.4)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0)) + specifier: ^7.0.5 + version: 7.0.5(@astrojs/markdown-satteri@0.3.5)(astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0)) '@astrojs/sitemap': specifier: ^3.7.3 version: 3.7.3 astro: - specifier: ^7.1.3 - version: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0) + specifier: ^7.2.0 + version: 7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0) devDependencies: '@astrojs/check': - specifier: ^0.9.9 - version: 0.9.9(prettier@3.9.5)(typescript@6.0.3) + specifier: ^0.9.10 + version: 0.9.10(prettier@3.9.5)(typescript@6.0.3) shiki: - specifier: ^4.3.1 - version: 4.3.1 + specifier: 4.4.3 + version: 4.4.3 typescript: specifier: ^6.0.3 version: 6.0.3 wrangler: - specifier: 4.112.0 - version: 4.112.0 + specifier: 4.120.1 + version: 4.120.1 packages: - '@astrojs/check@0.9.9': - resolution: {integrity: sha512-A5UW8uIuErLWEoRQvzgXpO1gTjUFtK8r7nU2Z7GewAMxUb7bPvpk11qaKKgxqXlHJWlAvaaxy+Xg28A6bmQ1Tg==} + '@astrojs/check@0.9.10': + resolution: {integrity: sha512-zgx/UQMozdjOa3bOxjgeCFdtpE3c9rRX6xHwa+2QXvy8z8Akifu2AtubHyv/zzC2znO8dl8fFWL4K+Ba9kS8HQ==} hasBin: true peerDependencies: typescript: ^5.0.0 || ^6.0.0 - '@astrojs/compiler-binding-darwin-arm64@0.3.1': - resolution: {integrity: sha512-IEmEF2fUIlTHtpeE/isyEGVOB14cEyh/LZOFYt6wn3jNyVpdC8aR5OZ+RzFUR/f+8ZDM1LaMwZKvoA7eMyJeFw==} + '@astrojs/compiler-binding-darwin-arm64@0.3.2': + resolution: {integrity: sha512-MM8tn8CSimcfytaOla4b6acN8mKWiL/rlAA1fpT3/Wl7dNGSE4y8FjTN/zJVNnb63CsLWG5zZwCt01TXtDKh9g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@astrojs/compiler-binding-darwin-x64@0.3.1': - resolution: {integrity: sha512-GF2kIxjpPDLsn94zbZNMsxEmkU828QqnmM7kiQJnaooS3jmI+I7kk6+oI6EpwOsK3femCMdcm+wmOsEqtGrmjQ==} + '@astrojs/compiler-binding-darwin-x64@0.3.2': + resolution: {integrity: sha512-2lXOlzf8xb7jLomRsf/aswh61/NnGusynB2OwFkK6k4pmOtpfXMYnG0PLfXrEvxXYj69NdCnmUYXtHDd+JOOag==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@astrojs/compiler-binding-linux-arm64-gnu@0.3.1': - resolution: {integrity: sha512-XJL3SDmOtVrqFhCirNcHwE91+IesJqlgNo23I4qW9QUYfwzm/TBZuH61fgqsb1ttgR1mMYz6ooPWs0JDhwMqpQ==} + '@astrojs/compiler-binding-linux-arm64-gnu@0.3.2': + resolution: {integrity: sha512-BmU3kWj7qnLrd4vzm49zFEPJ5oFnn1tCT4Vt9hZbqdU5Cmb8GZl7fn6VFsnNfe7B18a2gIFtVzbLINtYl5kBjQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@astrojs/compiler-binding-linux-arm64-musl@0.3.1': - resolution: {integrity: sha512-xqE8BVbDoBueK/B47w30PtkVofUWJKGkwoMVE+EOMLf11rnoANxIAdA9FPqY+rng4oNI5ndHGsri1yPj2k8vZQ==} + '@astrojs/compiler-binding-linux-arm64-musl@0.3.2': + resolution: {integrity: sha512-f0heT9ZZEseSu5bHCeb80eL2DH07ArE6U9xi1WT/PEusNjzPmEr3GJsjG1tRLo5VYUUYX7h3ScaqGmGrMOVGmw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@astrojs/compiler-binding-linux-x64-gnu@0.3.1': - resolution: {integrity: sha512-1y0StU1qiCuDFH3rmbRJXcxdfHxFPrES1Rd+RLffosvUR7I2cH5SF5SFnBN9vXpzpkmyElZm3Yr47iJBPN7vVA==} + '@astrojs/compiler-binding-linux-x64-gnu@0.3.2': + resolution: {integrity: sha512-M8fOUt0itRpqiGyoEA/ij184s8O+hqbCz3+YozRusOOM3osgGljpDThhbKAJjqh82wOo6FioQ4w8PBvU1XMD5Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@astrojs/compiler-binding-linux-x64-musl@0.3.1': - resolution: {integrity: sha512-16q0fYf7kpbmdObZEeZJEup8hQv/whgNwVjrSvT8umrKwLDSnNIWiQpm09lQQu6bweZB0XyIvHwlPitvJhC+hg==} + '@astrojs/compiler-binding-linux-x64-musl@0.3.2': + resolution: {integrity: sha512-/Kebk8sO6HnLeSd691JkaAPfN7CqR9/KEXmWvyNPkaKNGmj8rTZ/lf2uXtnPu92Lan84UrKdIKVPy1fSo2encQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@astrojs/compiler-binding-wasm32-wasi@0.3.1': - resolution: {integrity: sha512-cB456shIwDv/PrVT+2QG7LFndpHkVge5HjqADKZgGaAc9JHVktCtjSrcdkRQ+3tbkPazNKaTLRjXLIiz2NIx9g==} + '@astrojs/compiler-binding-wasm32-wasi@0.3.2': + resolution: {integrity: sha512-pUA6xbcOSB7DhfzIArB8BCAkFfAIqriiR7zl5zOStd6oU2G0kIKj+GUdGnyXyhfiv881Hffyk5tC0mR18sDjDw==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@astrojs/compiler-binding-win32-arm64-msvc@0.3.1': - resolution: {integrity: sha512-ur/9+If/yTE69mmeX5MqSZndL0HOyx67GeNZUy3N7wVdWpLz9UTJXwyWS4UR2PUQHitghjsM5xoX0Ge56WRVQQ==} + '@astrojs/compiler-binding-win32-arm64-msvc@0.3.2': + resolution: {integrity: sha512-ESruf+6Qkl1trHUFxI6GSf6t52j8yN2kCNSzMWdzt7V/T09tFHrYzrVaJQohb2C9bJUH76pNvX6Zb51+xCQc9Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@astrojs/compiler-binding-win32-x64-msvc@0.3.1': - resolution: {integrity: sha512-k0W+kDBzDkNZOqu4kElDvCOIbKw5Ut9S1WZ1Krj3KTgNuBERNKXsMMsRLLcbgfdMdbe7bTekQLshZrrvmYpmwA==} + '@astrojs/compiler-binding-win32-x64-msvc@0.3.2': + resolution: {integrity: sha512-wzzVrEbOwbsLWOdEbocskjMRx2aZPxJ7ZbmL+jnpBamFwmigm+2M/wzuM6JWncocgYwLic1csSpalBh96kQKXA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@astrojs/compiler-binding@0.3.1': - resolution: {integrity: sha512-DaAUj29AIBU2XdJ8uwcab8lW5O2pk9pY8AXkcMw0sw77nVa3oeTYRcO+Dvbbpoexf6ThMc0FMWYCQ/wN1/T7oQ==} + '@astrojs/compiler-binding@0.3.2': + resolution: {integrity: sha512-8w/9CWmYrAJJ8N0SY3O43ws2BgxoW6u3QsD8u2mE140lMYAlwh+tlNoUeSBq22wVheFuiBbR212l6ixZ2IIgCQ==} engines: {node: ^20.19.0 || >=22.12.0} - '@astrojs/compiler-rs@0.3.1': - resolution: {integrity: sha512-aT7xkgsbNoS6nriY5qKpbihK43slFHO41iqgHCTdOvn1ifaQxLCc5yXy+6GzAtiafoaC1zA7OwVXCXMsvUZOkg==} + '@astrojs/compiler-rs@0.3.2': + resolution: {integrity: sha512-xlx/T7JovIKduu4ucbTQUxQ5+Q8wxkHxhLjnZk3VlJbhbQ9RLvvuDk1p2YYFYFQ5y14dVm3FGGO4isQXa4F+Tg==} engines: {node: '>=22.12.0'} '@astrojs/compiler@2.13.1': resolution: {integrity: sha512-f3FN83d2G/v32ipNClRKgYv30onQlMZX1vCeZMjPsMMPl1mDpmbl0+N5BYo4S/ofzqJyS5hvwacEo0CCVDn/Qg==} - '@astrojs/internal-helpers@0.10.1': - resolution: {integrity: sha512-5phcroT/vmOOrYuuAxtkbPixy5hePtlz9i8K4OeDv3dNK6/UQRuXPOSRTxIOBbUY5Sonw2UaxjbuVc43Mcir6Q==} + '@astrojs/internal-helpers@0.10.2': + resolution: {integrity: sha512-yt7fMgPYqSM4Tmr+taTW6Per+hjJ8Pk6lA1PAcDyqzOt8HzJ6Kje5WzCxA2Sd+9wsUW7uhkLeoTMK0cXPwH9rQ==} '@astrojs/language-server@2.16.12': resolution: {integrity: sha512-3LpFphBCzveUgm5ZVDINB/v3YA4TgPa1EMOEFn3Zt/Ww6jojR25iN+kmzeUz7v/b9xkmq+hMACTX4hizN3VCEQ==} @@ -125,17 +126,17 @@ packages: prettier-plugin-astro: optional: true - '@astrojs/markdown-remark@7.2.1': - resolution: {integrity: sha512-jPVNIqTvk+yKviikszv/Y1U4jGUSKpp/Nw48QZV4qjWgp70j4Lkq3lhSDRbWwCfgKvEyO9GHuVbV1dM2WYXy1w==} + '@astrojs/markdown-remark@7.2.2': + resolution: {integrity: sha512-FGfmK84zSNcrsBd0dl1gXE9JvZYElp8EXQa2jpHVAxG4deGKAp43wspxFupjADJX7MSsMRHwYCnfT6EyVmgeFQ==} - '@astrojs/markdown-satteri@0.3.4': - resolution: {integrity: sha512-6Lvt/bQZEBW+zzdhPblvfZEy5PGEYJaUsUqaCgwHeRPxZJL1gc9I+DRLKWJjjYTWDzVUTzXlMq4WwSK+X34CVw==} + '@astrojs/markdown-satteri@0.3.5': + resolution: {integrity: sha512-CvWVEFAbay7YO+i9SaqDJubipA5ckiVB89QWoMJ5XC0m5CtFg8JwZ7Kau6X9sYY7FZURH0w2l03ISH2jOS/RDQ==} - '@astrojs/mdx@7.0.3': - resolution: {integrity: sha512-RxyIwU0uFam5ftwqKOjpIdhnFxZ/kEikeimLyQy3eGXbHT8WgRGzzesOIHVU8+m9TY8ag5WVOyvV24/GyqPdPQ==} + '@astrojs/mdx@7.0.5': + resolution: {integrity: sha512-wEM/HH1RiEntyPVagdiF+yArzfcYLKBB0C1RZspVidKZ97rRMbaqP1Nbl/GR0sJs8zwaceqxRymw8aOKKJRdYw==} engines: {node: '>=22.12.0'} peerDependencies: - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/markdown-satteri': 0.3.5 astro: ^7.0.0 peerDependenciesMeta: '@astrojs/markdown-satteri': @@ -246,32 +247,32 @@ packages: workerd: optional: true - '@cloudflare/workerd-darwin-64@1.20260714.1': - resolution: {integrity: sha512-ZWXqAN8G7Cx9hMRQuk+59ziJhR3j1F4iO+Qs8aHdfKZ3Dq5Yi/57xvkJTgCGBnW1YU/L78r8f6HEy51bwbTpNw==} + '@cloudflare/workerd-darwin-64@1.20260804.1': + resolution: {integrity: sha512-191/PPEFicRK2wK69eXzSjnLgHL79k7zR2VUpyIr8rhFgGns1b5bTHgnBuUrgU2LPbEtwbE5eL2hJ0uhLAFEow==} engines: {node: '>=16'} cpu: [x64] os: [darwin] - '@cloudflare/workerd-darwin-arm64@1.20260714.1': - resolution: {integrity: sha512-tueWxWC3wyCbMG6zRAxsMXX0YLgrRWbiAPYFQ2uJ7dUH8G+5E7UTWaQS9B1HdJ0bpKFW1NWxhs1o2noKVFSUYg==} + '@cloudflare/workerd-darwin-arm64@1.20260804.1': + resolution: {integrity: sha512-aI2cAFLsrNkSz3kLSQrgrO9ICTfY7jb2h0jgaWDE9mQLQQDfpXeYrKWt07tTgMmeNP79o9w3NZe3aqtt8mTGHQ==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] - '@cloudflare/workerd-linux-64@1.20260714.1': - resolution: {integrity: sha512-1VChTZRb0l0F7R4e1G5RtLKV4oFi6x+rQgxh2+yu887j3l/3TLgatuv1L8/5zhc9gKEhATTxOh0e52Rtd9dDWQ==} + '@cloudflare/workerd-linux-64@1.20260804.1': + resolution: {integrity: sha512-KBCjxBIlN2jucfQGaTK4EgmPsWzQgYR/zYhPfi3mkWwdoTyG1dgrt2aizKps/SYse85ci/SOxojKk0/K7vstPw==} engines: {node: '>=16'} cpu: [x64] os: [linux] - '@cloudflare/workerd-linux-arm64@1.20260714.1': - resolution: {integrity: sha512-rMm3G+NirG2UdgHIRDdF1asNC6FqgIzZzkRG+VDhhDGcVxAQwvrMT1E38BivEvHr3G04MB4AfhcOczX0+GtRkQ==} + '@cloudflare/workerd-linux-arm64@1.20260804.1': + resolution: {integrity: sha512-7lswfarBZ7xkHpTFrNb74ExwOltIalVaASc+GOYfCNtnwFxK/JZSVByfm/hnZEBtrHU7fMY2z7dYT64rwS0pHg==} engines: {node: '>=16'} cpu: [arm64] os: [linux] - '@cloudflare/workerd-windows-64@1.20260714.1': - resolution: {integrity: sha512-cGqnU3Hg2YZS/k3SAqrMp1DjpdsyFde72tWltdl6ZT9+SFz/Zrk/8gyTU1TcxC4YApXeNVH5TyU5cOGPgUJ0pg==} + '@cloudflare/workerd-windows-64@1.20260804.1': + resolution: {integrity: sha512-GOgRWYtxISN5rAWfx3K7zubt3xEn0/ZPFrbcLL+GwT4ouCKyNoHqfT1cPNB6Nx7t8BHEjnuTG7gkHO4Wd5ORdg==} engines: {node: '>=16'} cpu: [x64] os: [win32] @@ -473,9 +474,9 @@ packages: resolution: {integrity: sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==} engines: {node: '>=18'} - '@img/sharp-darwin-arm64@0.34.5': - resolution: {integrity: sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-darwin-arm64@0.35.2': + resolution: {integrity: sha512-eEieHsMksAW4IiO5NzauESRl2D2qz3J/kwUxUrSfV06A93eEaRfMpHXyUb1mAqrR7i8U9A0GRqE9pjn6u1Jjpg==} + engines: {node: '>=20.9.0'} cpu: [arm64] os: [darwin] @@ -485,9 +486,9 @@ packages: cpu: [arm64] os: [darwin] - '@img/sharp-darwin-x64@0.34.5': - resolution: {integrity: sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-darwin-x64@0.35.2': + resolution: {integrity: sha512-BaktuGPCeHJMARpodR8jK4uKiZrPAy9WrfQW0sdI37clracq8Bp01AYS3SZgi5FS/y5twa9t4+LIuuxQjqRrWw==} + engines: {node: '>=20.9.0'} cpu: [x64] os: [darwin] @@ -497,13 +498,18 @@ packages: cpu: [x64] os: [darwin] + '@img/sharp-freebsd-wasm32@0.35.2': + resolution: {integrity: sha512-YoAxdnd8hPUkvLHd3bWY+YA8nw3xM/RyRopYucNsWHVSan8NLVM3X2volsfoRDcXdUJPg6tXahSd7HXPK7lRnw==} + engines: {node: '>=20.9.0'} + os: [freebsd] + '@img/sharp-freebsd-wasm32@0.35.3': resolution: {integrity: sha512-lUxcqWIj2wMQ9BrwNjngcr1gWUr5xgaGThBRqPPalIC2n67Cqj1uPh8NnA/ZhAg8hUbKl+kVHKwgUIwe6ZYPrg==} engines: {node: '>=20.9.0'} os: [freebsd] - '@img/sharp-libvips-darwin-arm64@1.2.4': - resolution: {integrity: sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==} + '@img/sharp-libvips-darwin-arm64@1.3.1': + resolution: {integrity: sha512-4V/M3roRMTYjiwZY9IOVQOE8OyeCxFAkYmyZDrZl51uOKjibm3oeEJ4WAmLxutAfzFbC9jqUiPs2gbnGflH+7g==} cpu: [arm64] os: [darwin] @@ -512,8 +518,8 @@ packages: cpu: [arm64] os: [darwin] - '@img/sharp-libvips-darwin-x64@1.2.4': - resolution: {integrity: sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==} + '@img/sharp-libvips-darwin-x64@1.3.1': + resolution: {integrity: sha512-c0/DxItpJv2+dGhgycJBBgotdqruGYDvA79drdh0MD1dFpy7JzJ/PlXwi1H4rFf0eTy8tgbI91aHDnZIceY3jQ==} cpu: [x64] os: [darwin] @@ -522,8 +528,8 @@ packages: cpu: [x64] os: [darwin] - '@img/sharp-libvips-linux-arm64@1.2.4': - resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==} + '@img/sharp-libvips-linux-arm64@1.3.1': + resolution: {integrity: sha512-JznefmcK9j1JKPz8AkQDh89kjojubyfOasWBPKfzMIhPwsgDy9evpE/naJTXXXmghS1iFwR8u/kTwh/I2/+GCw==} cpu: [arm64] os: [linux] libc: [glibc] @@ -534,8 +540,8 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-libvips-linux-arm@1.2.4': - resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==} + '@img/sharp-libvips-linux-arm@1.3.1': + resolution: {integrity: sha512-aGGy9aWzXgHBG7HNyQPWorZthlp7+x6fDRoPAQbGO3ThcttuTyKIx3NuSHb6zb4gBNq6/yNn9f1cy9nFKS/Vmg==} cpu: [arm] os: [linux] libc: [glibc] @@ -546,8 +552,8 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-libvips-linux-ppc64@1.2.4': - resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==} + '@img/sharp-libvips-linux-ppc64@1.3.1': + resolution: {integrity: sha512-1EkwGNCZk6iWNCMWqrvdJ+r1j0PT1zIz60CNPhYnJlK/zyeWqlsPZIe+ocBVqPF8k/Ssee/NCk+tE9Ryrko6ng==} cpu: [ppc64] os: [linux] libc: [glibc] @@ -558,8 +564,8 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-libvips-linux-riscv64@1.2.4': - resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==} + '@img/sharp-libvips-linux-riscv64@1.3.1': + resolution: {integrity: sha512-Ilays+w2bXdnxzxtQdmXR62u8o8GYa3eL4+Gr+1KiE4xperMZUslRaVPJwwPkzlHEjGfXAfRVAa/7CYCtSqsBw==} cpu: [riscv64] os: [linux] libc: [glibc] @@ -570,8 +576,8 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-libvips-linux-s390x@1.2.4': - resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==} + '@img/sharp-libvips-linux-s390x@1.3.1': + resolution: {integrity: sha512-VfBwVHQTbRoj4XlpA/KLZ7ltgMpz+4WSejFzQ+GnoImjo1PtEJ59QB2qR1xQEeRPYIkNrPIm2L4cICMvz4C2ew==} cpu: [s390x] os: [linux] libc: [glibc] @@ -582,8 +588,8 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-libvips-linux-x64@1.2.4': - resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==} + '@img/sharp-libvips-linux-x64@1.3.1': + resolution: {integrity: sha512-+c8ukgwU62DS54nCAjw7keOfHUkmr0B5QHEdcOqRnodF/MNXJbVI8Eopoj4B/0H8Asr65I+A4Amrn7a85/md6A==} cpu: [x64] os: [linux] libc: [glibc] @@ -594,8 +600,8 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-libvips-linuxmusl-arm64@1.2.4': - resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==} + '@img/sharp-libvips-linuxmusl-arm64@1.3.1': + resolution: {integrity: sha512-qlKb/pwbkAi1WMsJrYHk7CuDrd12s27U2QnRhFYUoJNrRCmkosMTttuRFat/DDB3IlDm5qE1TJgZ4JDnHX8Ldw==} cpu: [arm64] os: [linux] libc: [musl] @@ -606,8 +612,8 @@ packages: os: [linux] libc: [musl] - '@img/sharp-libvips-linuxmusl-x64@1.2.4': - resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==} + '@img/sharp-libvips-linuxmusl-x64@1.3.1': + resolution: {integrity: sha512-yO21HwoUVLN8Qa+/SBjQLMYwBWAVJjeGPNe+hc0OUeMeifEtJqu5a1c4HayE1nNpDih9y3/KkoltfkDodmKAlg==} cpu: [x64] os: [linux] libc: [musl] @@ -618,9 +624,9 @@ packages: os: [linux] libc: [musl] - '@img/sharp-linux-arm64@0.34.5': - resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-arm64@0.35.2': + resolution: {integrity: sha512-af12Pnd0ZGu2HfP8NayB0kk6eC/lrfbQE6HlR4jD+34wdJ1Vw9TF6TMn6ZvffT+WgqVsl0hRbmNvz2u/23VmwA==} + engines: {node: '>=20.9.0'} cpu: [arm64] os: [linux] libc: [glibc] @@ -632,9 +638,9 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-linux-arm@0.34.5': - resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-arm@0.35.2': + resolution: {integrity: sha512-SE4kzF2mepn6z+6E7L6lsV8FzuLL6IPQdyX8ZiwROAG/G8td+hP/m7FsFPwidtrF19gvajuC9l6TxAVcsA4S7A==} + engines: {node: '>=20.9.0'} cpu: [arm] os: [linux] libc: [glibc] @@ -646,9 +652,9 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-linux-ppc64@0.34.5': - resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-ppc64@0.35.2': + resolution: {integrity: sha512-hYSBm7zcNtDCozCxQHYZJiu63b/bXsgRZuOxCIBZsStMM9Vap47iFHdbX4kCvQsblPB/k+clhELpdQJHQLSHvg==} + engines: {node: '>=20.9.0'} cpu: [ppc64] os: [linux] libc: [glibc] @@ -660,9 +666,9 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-linux-riscv64@0.34.5': - resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-riscv64@0.35.2': + resolution: {integrity: sha512-qQt0Kc13+Hoan/Awq/qMSQw3L+RI1NCRPgD5cUJ/1WSSmIoysLOc72jlRM3E0OHN9Yr313jgeQ2T+zW+F03QFA==} + engines: {node: '>=20.9.0'} cpu: [riscv64] os: [linux] libc: [glibc] @@ -674,9 +680,9 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-linux-s390x@0.34.5': - resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-s390x@0.35.2': + resolution: {integrity: sha512-E4fLLfRPzDLlEeDaTzI98OFLcv++WL5ChLLMwPoVd0CIoZQqupBSNbOisPL5am9XsbQ9T84+iiMpUvbFtkunbA==} + engines: {node: '>=20.9.0'} cpu: [s390x] os: [linux] libc: [glibc] @@ -688,9 +694,9 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-linux-x64@0.34.5': - resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linux-x64@0.35.2': + resolution: {integrity: sha512-gi0zFJJRLswfCZmHtJdikXPOc5u7qamSOS3NHedLqLd4W8Q0NqjdBr6TTRIgsfFjqfTsHFgdfvJ9LwqSgcHiAA==} + engines: {node: '>=20.9.0'} cpu: [x64] os: [linux] libc: [glibc] @@ -702,9 +708,9 @@ packages: os: [linux] libc: [glibc] - '@img/sharp-linuxmusl-arm64@0.34.5': - resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linuxmusl-arm64@0.35.2': + resolution: {integrity: sha512-siWbOW1u6HFnFLrp0waKyW7VEf7jYvcDWdrXEFa8AkdAQgEvuu5Fz8/Y70w9EeqAdwDtfU012BhEHHaDqvQNzg==} + engines: {node: '>=20.9.0'} cpu: [arm64] os: [linux] libc: [musl] @@ -716,9 +722,9 @@ packages: os: [linux] libc: [musl] - '@img/sharp-linuxmusl-x64@0.34.5': - resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-linuxmusl-x64@0.35.2': + resolution: {integrity: sha512-YBqMMcjDi4QGYiSn4vNOYBhmlC4z5AXqkOUUqI2e0AFA4urNv4ESgOgwNl3K+4etQhha0twXlzeF20bbULm9Yg==} + engines: {node: '>=20.9.0'} cpu: [x64] os: [linux] libc: [musl] @@ -730,23 +736,27 @@ packages: os: [linux] libc: [musl] - '@img/sharp-wasm32@0.34.5': - resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} - cpu: [wasm32] + '@img/sharp-wasm32@0.35.2': + resolution: {integrity: sha512-Mrv4JQNYVQ94xH+jzZ9r+gowleN8mv2FTgKT+PI6bx5C0G8TdNYndu161pg2i7uoBwxy2ImPMHrJOM2LZef7Bw==} + engines: {node: '>=20.9.0'} '@img/sharp-wasm32@0.35.3': resolution: {integrity: sha512-cZ0XkcYGpHZkqW6iCkqTcmUC0CD9DhD5d/qeZlZkfRBn6GnHniZXLUo5+9xw8Iv76YE6LQFN9YNBlKREcCG76w==} engines: {node: '>=20.9.0'} + '@img/sharp-webcontainers-wasm32@0.35.2': + resolution: {integrity: sha512-QNV27pxs9wpApEiCfvHM1RDoP1w1+2KrUWWDPEhEwg+latvOrfuhWrHWZKwdSFwU6jh3myjw/yOCRsUIuOft3g==} + engines: {node: '>=20.9.0'} + cpu: [wasm32] + '@img/sharp-webcontainers-wasm32@0.35.3': resolution: {integrity: sha512-2rnq7bX3NzeR2T4YWgz8qiG4h3TSdMe+vN1iQXpJleSJ3SM5zQ8Fy2SyyXAWlbxpEZ2Y+Z4u1BePgJEYbSy80Q==} engines: {node: '>=20.9.0'} cpu: [wasm32] - '@img/sharp-win32-arm64@0.34.5': - resolution: {integrity: sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-win32-arm64@0.35.2': + resolution: {integrity: sha512-BiVRYc/t6/Vl3e1hBx0hugG4oN9Pydf4fgMSpxTQJmwGUg/YoXTWHiFeRymHfCZzifxu4F4rpk/I67D0LQ20wQ==} + engines: {node: '>=20.9.0'} cpu: [arm64] os: [win32] @@ -756,9 +766,9 @@ packages: cpu: [arm64] os: [win32] - '@img/sharp-win32-ia32@0.34.5': - resolution: {integrity: sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-win32-ia32@0.35.2': + resolution: {integrity: sha512-YYEhx9PImCC7T0tI8JDMi4DB9LwLCXCU5OWNYEXAxh5Q1ShKkyC6byxzoBJ3gEFDnH2lQckWuDe70G7mB2XJog==} + engines: {node: ^20.9.0} cpu: [ia32] os: [win32] @@ -768,9 +778,9 @@ packages: cpu: [ia32] os: [win32] - '@img/sharp-win32-x64@0.34.5': - resolution: {integrity: sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + '@img/sharp-win32-x64@0.35.2': + resolution: {integrity: sha512-imoOyBcoM/iiUr4J6VPpCNjPnjvP/Gks95898yB8YqoGGYmHYbOyCuNv9FMhFgtaiHFGbHW8bxKqRV6VjtXThQ==} + engines: {node: '>=20.9.0'} cpu: [x64] os: [win32] @@ -799,6 +809,13 @@ packages: '@emnapi/core': ^1.7.1 '@emnapi/runtime': ^1.7.1 + '@napi-rs/wasm-runtime@1.2.2': + resolution: {integrity: sha512-JfB4kuJQjaoHuCTseIINHtHWeJnvgEcxjwA5t/Y00ZgaOO1Crz3fjT/p8kT28zA/Caz7oiUMn3d6H2yOVCVwuw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} + peerDependencies: + '@emnapi/core': ^1.7.1 || ^2.0.0-alpha.3 + '@emnapi/runtime': ^1.7.1 || ^2.0.0-alpha.3 + '@oslojs/encoding@1.1.0': resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==} @@ -912,41 +929,32 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} - '@rollup/pluginutils@5.4.0': - resolution: {integrity: sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - - '@shikijs/core@4.3.1': - resolution: {integrity: sha512-ANMDxuaPsNMdDC1m4vfvhlDmJweMwkE5XitTwrq2rWHx5jM+dlm4MmHt2PP6t0uejfR77SuhrhJ0zEijIF/uhA==} + '@shikijs/core@4.4.3': + resolution: {integrity: sha512-QCR4q2ZO/ILJEuwiBMel4wdcTDb1JGwfjKTxPDF6x8ixOaluPrVqIn06C99AcRPhmYlBR56d/Fb+GN58GzExpg==} engines: {node: '>=20'} - '@shikijs/engine-javascript@4.3.1': - resolution: {integrity: sha512-JBItcnPuYq7jVJdZo/vMj94r+szT7XEjHFX+mvFDGSEIbVAXAGyHAHzhbWzpGOwYidCZrErJLLgn2PVeiokHnQ==} + '@shikijs/engine-javascript@4.4.3': + resolution: {integrity: sha512-FbOjFJp9VLdo1Wevs10BBtVxiTWwNLqZh5Gkhjgda/ioL15YOgeSl9n+6XMa3qRlPQzfhFNe641SrynFHYG0nQ==} engines: {node: '>=20'} - '@shikijs/engine-oniguruma@4.3.1': - resolution: {integrity: sha512-OXyNMzg0pews+msMj4cHeqT4xiYKKvbnn6VbdAXxfoFl3SSx4fJTc8FadECuc5/H9p3BzhNAoAUXKwAu9rWYhg==} + '@shikijs/engine-oniguruma@4.4.3': + resolution: {integrity: sha512-EcOQkxdxGQrc1Row/cC2c96/v1dbZqGnEVu1qTuT/MJmp6+cXCvQussowVmCv5Tqr3KuY3c7IbM6HTW3LJ1k9w==} engines: {node: '>=20'} - '@shikijs/langs@4.3.1': - resolution: {integrity: sha512-m0l9nsDqgBHvbZbk7A0/kXz/impK3uB/c6rAn6Gpg/uPtdZRQ+alsN/17MU5thb68XTj/4DxkZAotrM0GGSpDQ==} + '@shikijs/langs@4.4.3': + resolution: {integrity: sha512-ePic0yfAJGOF83D5wBHK/00EjK65oahBYxFk5epgq33WRv7X9UuxLEV8PtR0szC0z8dl7INIpIodB99JRFlR+A==} engines: {node: '>=20'} - '@shikijs/primitive@4.3.1': - resolution: {integrity: sha512-CXQRQOYy1leqQ8ceTeJdmXv/bsUY++6QyLpXJ94LZAAYj5X2SKRdc5ipguv4NPyGVKItB2PPwUpRNe0Sjh5S1A==} + '@shikijs/primitive@4.4.3': + resolution: {integrity: sha512-m0wBeLDQDeIxRdUmrCPdQqfuUamDwRL5isCfYbguKD6NiaKpVbsv+3J81DyIKgNW5h4WAIIr8T4EkgQrBBxvaQ==} engines: {node: '>=20'} - '@shikijs/themes@4.3.1': - resolution: {integrity: sha512-dgpoJ4WqNi2yTmizQHBJ5zcX6j2lE6icN/0yt4l1kkf16jrY/pwPLoTb1ETsWMz0OBLf9ZNvwmxft+cH+N9qSA==} + '@shikijs/themes@4.4.3': + resolution: {integrity: sha512-w8UHjeUnIR965KMWJHUPXOc2mNJUnK3vpVLYLvw5IYU2mnTTJ89E24OrJDBNiJDQ0qzb0tc4l7mrIXx5cFeIyw==} engines: {node: '>=20'} - '@shikijs/types@4.3.1': - resolution: {integrity: sha512-CHFxE0jztBIZRHH6gxXE7DXUCFXjReEGxZ/j0rfSLGKZuwp2xBYycEP14875DSa9KLL/6700oxIq6oO6ef9K2g==} + '@shikijs/types@4.4.3': + resolution: {integrity: sha512-UEJxmRR++MAGR6hugn0vgVS2W/6lWAts84FFSrnlH9sP0LNol7E5+NQ792pH8liWUhyMyjhTgSUH3k7iD7tc5g==} engines: {node: '>=20'} '@shikijs/vscode-textmate@10.0.2': @@ -1057,13 +1065,13 @@ packages: resolution: {integrity: sha512-MxT4XZL7pzLHpuvhDKdMaQHMGGkJDLluKBLsbstn+8wv9sWcFT6h+0ve9qkml95amVTZtZV83gQe2hY+ojgHLg==} hasBin: true - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} + ansi-regex@6.2.2: + resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} + engines: {node: '>=12'} - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} @@ -1086,12 +1094,12 @@ packages: resolution: {integrity: sha512-LElXdjswlqjWrPpJFg1Fx4wpkOCxj1TDHlSV4PlaRxHGWko024xICaa97ZkMfs6DRKlCguiAI+rbXv5GWwXIkg==} hasBin: true - astro@7.1.3: - resolution: {integrity: sha512-4dhPyAAXthf3xLEYnG8SeL7yr/nTPPABfY7e9YF0yuO+vK9Xp+8Q5j4xzsmL3GueukQv4oNwGNTBepLOiDGeJA==} + astro@7.2.0: + resolution: {integrity: sha512-lLTYzx3fOvCmtwD3JVBLQcbORbIOW1/j0R+3IvJx/XKwMGrk7mFnF0BYSOeRiNw1qHUR5mdA6+hRnyvyDfqrWQ==} engines: {node: '>=22.12.0', npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true peerDependencies: - '@astrojs/markdown-remark': 7.2.1 + '@astrojs/markdown-remark': 7.2.2 peerDependenciesMeta: '@astrojs/markdown-remark': optional: true @@ -1136,9 +1144,9 @@ packages: resolution: {integrity: sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==} engines: {node: '>=8'} - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} + cliui@9.0.1: + resolution: {integrity: sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==} + engines: {node: '>=20'} clsx@2.1.1: resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} @@ -1147,13 +1155,6 @@ packages: collapse-white-space@2.1.0: resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} @@ -1254,8 +1255,8 @@ packages: emmet@2.4.11: resolution: {integrity: sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ==} - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + emoji-regex@10.6.0: + resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} @@ -1308,9 +1309,6 @@ packages: estree-util-visit@2.0.0: resolution: {integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==} - estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} @@ -1364,6 +1362,10 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} + get-east-asian-width@1.6.0: + resolution: {integrity: sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==} + engines: {node: '>=18'} + get-tsconfig@5.0.0-beta.4: resolution: {integrity: sha512-7nF7C9fIPFEMHgEMEfgIlO9wDdZ8CyHw27rWciFZfHvHDReIiPhsYuzPRXsfvBCqFy1l8RRyyWV7QLM+ZhUJsQ==} engines: {node: '>=20.20.0'} @@ -1439,10 +1441,6 @@ packages: engines: {node: '>=20'} hasBin: true - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - is-hexadecimal@2.0.1: resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} @@ -1548,8 +1546,8 @@ packages: resolution: {integrity: sha512-4pfM1Ff0x50o0tQwb5ucw/RzNyD0/YJME6IVcStalZuMWxdt3sR3huStTtxz4PUmvZfRguvDejasvQ2kifR11g==} engines: {node: 20 || >=22} - magic-string@0.30.21: - resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + magic-string@1.1.0: + resolution: {integrity: sha512-kS3VHe0nEPST2saQV4Rbkchcd3UBRkVTQHo1D3h/ZTwFDhai/mfKkmtPAtD129EOI7K3HlHIsFOt0WrI2/oU9g==} magicast@0.5.3: resolution: {integrity: sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw==} @@ -1723,10 +1721,9 @@ packages: micromark@4.0.2: resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==} - miniflare@4.20260714.0: - resolution: {integrity: sha512-MYlTCLdWCPqvrYY2uLwOjXwmglXuiHE3TGGkbOW4BwjUPa1r07E0iuHwrNDIs/sxK21r+o90Jx58AV2KeNdJZw==} + miniflare@5.20260804.0-alpha: + resolution: {integrity: sha512-UDegnTukIpJCI/lNyQXU7B8kYFLcMZihlxqqOocnc62tV8AO6XofmFmZm3ZLDXTWZpkZnLLJ2sKCSlTIEXO3dQ==} engines: {node: '>=22.0.0'} - hasBin: true mrmime@2.0.1: resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} @@ -1914,10 +1911,6 @@ packages: request-light@0.7.0: resolution: {integrity: sha512-lMbBMrDoxgsyO+yB3sDcrDuX85yYt7sS8BfQd11jtbW/z5ZWgLZRcEGLsLoYw7I0WSUGQBs8CC8ScIxkTX1+6Q==} - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -1954,9 +1947,9 @@ packages: engines: {node: '>=10'} hasBin: true - sharp@0.34.5: - resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==} - engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + sharp@0.35.2: + resolution: {integrity: sha512-FVtFjtBCMiJS6yb5CX7Sop45WFMpeGw6oRKuJnXYgf/f1ms/D7LE/ZUSNxnW7rZ/dbslQWYkoqFHGPaDBtaK4w==} + engines: {node: '>=20.9.0'} sharp@0.35.3: resolution: {integrity: sha512-ej0zVHuZGHCiABXcNxeYhpRnPNPAcvbG8RMdBAhDAxLKkCRVSpK3Iyu7qbqw3JMzoj0REeM6f3tJLtVwl0023Q==} @@ -1967,8 +1960,8 @@ packages: '@types/node': optional: true - shiki@4.3.1: - resolution: {integrity: sha512-oR+qDVi2OjX1tmDpyv+3KviX01KzO6Af+0NNnKnsp9491UEGz2YpxTuJboS/6VhYpTdqzmuJBuiTlrAWWJAssw==} + shiki@4.4.3: + resolution: {integrity: sha512-Mb/GvXPHBAXdgGIcnfU5L3ldpn1XcxrGkPHwqgRx17/I2XRfqlFKk2vGkHWINn1kdXvzJZeuO3is6I9KLPFm0g==} engines: {node: '>=20'} sisteransi@1.0.5: @@ -1997,16 +1990,20 @@ packages: stream-replace-string@2.0.0: resolution: {integrity: sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==} - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} + string-width@7.2.0: + resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} + engines: {node: '>=18'} + + string-width@8.2.2: + resolution: {integrity: sha512-GaPUh5gfdrYzqeVNZvUfT23vYYxXzKYidUcnMtJg/3rxRV63EFZy3k6xfKlmfeJD0176lnUV/Usr3XcwSvFzpg==} + engines: {node: '>=20'} stringify-entities@4.0.4: resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} style-to-js@1.1.21: resolution: {integrity: sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==} @@ -2070,8 +2067,8 @@ packages: undici-types@7.18.2: resolution: {integrity: sha512-AsuCzffGHJybSaRrmr5eHr81mwJU3kjw6M+uprWvCXiNeN9SOGwQ3Jn8jb8m3Z6izVgknn1R0FTCEAP2QrLY/w==} - undici@7.28.0: - resolution: {integrity: sha512-cRZYrTDwWznlnRiPjggAGxZXanty6M8RV1ff8Wm4LWXBp7/IG8v5DnOm74DtUBp9OONpK75YlPnIjQqX0dBDtA==} + undici@7.29.0: + resolution: {integrity: sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==} engines: {node: '>=20.18.1'} unenv@2.0.0-rc.24: @@ -2340,24 +2337,24 @@ packages: web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} - workerd@1.20260714.1: - resolution: {integrity: sha512-oIbQzfdyl9UQUnG6XLegcSq0Mgt/7WKDbFOoqGgOWCS+/fhyGB460uKEgdAQQ9RHCO/ttcNCX/KiMIQzdoeu3Q==} + workerd@1.20260804.1: + resolution: {integrity: sha512-b0P38g5/ssemwWxd/mafNYggEZ0ere7PCiUH6RCHkgqjRhhXTP45nDiL2L3iIvi8uF2IjNrGpVgMXEunCaeY/w==} engines: {node: '>=16'} hasBin: true - wrangler@4.112.0: - resolution: {integrity: sha512-5H+XUD0TySCv1LuktFHDIEOkboH2nTfQs+35L+USt3MtntjDTMVIJprLgQcL2WBjulOyjxpd1vyTiSTJVW5MjQ==} + wrangler@4.120.1: + resolution: {integrity: sha512-rQJ38rY02XiVITbSBWHC7oap3M2evcXgsC4CdlIX4WQENUZMMnue9j2vXO4aIi39KR+jDH+UHK8JNqp1+UjkRQ==} engines: {node: '>=22.0.0'} hasBin: true peerDependencies: - '@cloudflare/workers-types': ^5.20260714.1 + '@cloudflare/workers-types': ^5.20260804.1 peerDependenciesMeta: '@cloudflare/workers-types': optional: true - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} + wrap-ansi@9.0.2: + resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==} + engines: {node: '>=18'} ws@8.21.0: resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} @@ -2392,17 +2389,13 @@ packages: engines: {node: '>= 14.6'} hasBin: true - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - yargs-parser@22.0.0: resolution: {integrity: sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==} engines: {node: ^20.19.0 || ^22.12.0 || >=23} - yargs@17.7.3: - resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} - engines: {node: '>=12'} + yargs@18.1.0: + resolution: {integrity: sha512-2rAgRKu54VsHkqI0/tYkmluGXHD4KW7yZoycuqDQ15QOTnc2VVfy0nN/1eMhnQLO00A+dwtK20xuCnc1YGeUyg==} + engines: {node: ^20.19.0 || ^22.12.0 || >=23} yocto-queue@1.2.2: resolution: {integrity: sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==} @@ -2422,81 +2415,81 @@ packages: snapshots: - '@astrojs/check@0.9.9(prettier@3.9.5)(typescript@6.0.3)': + '@astrojs/check@0.9.10(prettier@3.9.5)(typescript@6.0.3)': dependencies: '@astrojs/language-server': 2.16.12(prettier@3.9.5)(typescript@6.0.3) chokidar: 4.0.3 kleur: 4.1.5 typescript: 6.0.3 - yargs: 17.7.3 + yargs: 18.1.0 transitivePeerDependencies: - prettier - prettier-plugin-astro - '@astrojs/compiler-binding-darwin-arm64@0.3.1': + '@astrojs/compiler-binding-darwin-arm64@0.3.2': optional: true - '@astrojs/compiler-binding-darwin-x64@0.3.1': + '@astrojs/compiler-binding-darwin-x64@0.3.2': optional: true - '@astrojs/compiler-binding-linux-arm64-gnu@0.3.1': + '@astrojs/compiler-binding-linux-arm64-gnu@0.3.2': optional: true - '@astrojs/compiler-binding-linux-arm64-musl@0.3.1': + '@astrojs/compiler-binding-linux-arm64-musl@0.3.2': optional: true - '@astrojs/compiler-binding-linux-x64-gnu@0.3.1': + '@astrojs/compiler-binding-linux-x64-gnu@0.3.2': optional: true - '@astrojs/compiler-binding-linux-x64-musl@0.3.1': + '@astrojs/compiler-binding-linux-x64-musl@0.3.2': optional: true - '@astrojs/compiler-binding-wasm32-wasi@0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': + '@astrojs/compiler-binding-wasm32-wasi@0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': dependencies: - '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) + '@napi-rs/wasm-runtime': 1.2.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' optional: true - '@astrojs/compiler-binding-win32-arm64-msvc@0.3.1': + '@astrojs/compiler-binding-win32-arm64-msvc@0.3.2': optional: true - '@astrojs/compiler-binding-win32-x64-msvc@0.3.1': + '@astrojs/compiler-binding-win32-x64-msvc@0.3.2': optional: true - '@astrojs/compiler-binding@0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': + '@astrojs/compiler-binding@0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': optionalDependencies: - '@astrojs/compiler-binding-darwin-arm64': 0.3.1 - '@astrojs/compiler-binding-darwin-x64': 0.3.1 - '@astrojs/compiler-binding-linux-arm64-gnu': 0.3.1 - '@astrojs/compiler-binding-linux-arm64-musl': 0.3.1 - '@astrojs/compiler-binding-linux-x64-gnu': 0.3.1 - '@astrojs/compiler-binding-linux-x64-musl': 0.3.1 - '@astrojs/compiler-binding-wasm32-wasi': 0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) - '@astrojs/compiler-binding-win32-arm64-msvc': 0.3.1 - '@astrojs/compiler-binding-win32-x64-msvc': 0.3.1 + '@astrojs/compiler-binding-darwin-arm64': 0.3.2 + '@astrojs/compiler-binding-darwin-x64': 0.3.2 + '@astrojs/compiler-binding-linux-arm64-gnu': 0.3.2 + '@astrojs/compiler-binding-linux-arm64-musl': 0.3.2 + '@astrojs/compiler-binding-linux-x64-gnu': 0.3.2 + '@astrojs/compiler-binding-linux-x64-musl': 0.3.2 + '@astrojs/compiler-binding-wasm32-wasi': 0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) + '@astrojs/compiler-binding-win32-arm64-msvc': 0.3.2 + '@astrojs/compiler-binding-win32-x64-msvc': 0.3.2 transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' - '@astrojs/compiler-rs@0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': + '@astrojs/compiler-rs@0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': dependencies: - '@astrojs/compiler-binding': 0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) + '@astrojs/compiler-binding': 0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' '@astrojs/compiler@2.13.1': {} - '@astrojs/internal-helpers@0.10.1': + '@astrojs/internal-helpers@0.10.2': dependencies: '@types/hast': 3.0.5 '@types/mdast': 4.0.4 js-yaml: 4.3.0 picomatch: 4.0.5 retext-smartypants: 6.2.0 - shiki: 4.3.1 + shiki: 4.4.3 smol-toml: 1.7.0 unified: 11.0.5 @@ -2525,9 +2518,9 @@ snapshots: transitivePeerDependencies: - typescript - '@astrojs/markdown-remark@7.2.1': + '@astrojs/markdown-remark@7.2.2': dependencies: - '@astrojs/internal-helpers': 0.10.1 + '@astrojs/internal-helpers': 0.10.2 '@astrojs/prism': 4.0.2 github-slugger: 2.0.0 hast-util-from-html: 2.0.3 @@ -2547,21 +2540,21 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/markdown-satteri@0.3.4': + '@astrojs/markdown-satteri@0.3.5': dependencies: - '@astrojs/internal-helpers': 0.10.1 + '@astrojs/internal-helpers': 0.10.2 '@astrojs/prism': 4.0.2 github-slugger: 2.0.0 hast-util-from-html: 2.0.3 satteri: 0.9.5 - '@astrojs/mdx@7.0.3(@astrojs/markdown-satteri@0.3.4)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0))': + '@astrojs/mdx@7.0.5(@astrojs/markdown-satteri@0.3.5)(astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0))': dependencies: - '@astrojs/internal-helpers': 0.10.1 - '@astrojs/markdown-remark': 7.2.1 + '@astrojs/internal-helpers': 0.10.2 + '@astrojs/markdown-remark': 7.2.2 '@mdx-js/mdx': 3.1.1 acorn: 8.17.0 - astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0) + astro: 7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0) es-module-lexer: 2.3.1 estree-util-visit: 2.0.0 hast-util-to-html: 9.0.5 @@ -2573,7 +2566,7 @@ snapshots: unist-util-visit: 5.1.0 vfile: 6.0.3 optionalDependencies: - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/markdown-satteri': 0.3.5 transitivePeerDependencies: - supports-color @@ -2633,7 +2626,7 @@ snapshots: dependencies: '@emnapi/core': 1.11.1 '@emnapi/runtime': 1.11.1 - '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) + '@napi-rs/wasm-runtime': 1.2.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) optional: true '@bruits/satteri-win32-arm64-msvc@0.9.5': @@ -2660,25 +2653,25 @@ snapshots: '@cloudflare/kv-asset-handler@0.5.0': {} - '@cloudflare/unenv-preset@2.16.1(unenv@2.0.0-rc.24)(workerd@1.20260714.1)': + '@cloudflare/unenv-preset@2.16.1(unenv@2.0.0-rc.24)(workerd@1.20260804.1)': dependencies: unenv: 2.0.0-rc.24 optionalDependencies: - workerd: 1.20260714.1 + workerd: 1.20260804.1 - '@cloudflare/workerd-darwin-64@1.20260714.1': + '@cloudflare/workerd-darwin-64@1.20260804.1': optional: true - '@cloudflare/workerd-darwin-arm64@1.20260714.1': + '@cloudflare/workerd-darwin-arm64@1.20260804.1': optional: true - '@cloudflare/workerd-linux-64@1.20260714.1': + '@cloudflare/workerd-linux-64@1.20260804.1': optional: true - '@cloudflare/workerd-linux-arm64@1.20260714.1': + '@cloudflare/workerd-linux-arm64@1.20260804.1': optional: true - '@cloudflare/workerd-windows-64@1.20260714.1': + '@cloudflare/workerd-windows-64@1.20260804.1': optional: true '@cspotcode/source-map-support@0.8.1': @@ -2809,9 +2802,9 @@ snapshots: '@img/colour@1.1.0': {} - '@img/sharp-darwin-arm64@0.34.5': + '@img/sharp-darwin-arm64@0.35.2': optionalDependencies: - '@img/sharp-libvips-darwin-arm64': 1.2.4 + '@img/sharp-libvips-darwin-arm64': 1.3.1 optional: true '@img/sharp-darwin-arm64@0.35.3': @@ -2819,9 +2812,9 @@ snapshots: '@img/sharp-libvips-darwin-arm64': 1.3.2 optional: true - '@img/sharp-darwin-x64@0.34.5': + '@img/sharp-darwin-x64@0.35.2': optionalDependencies: - '@img/sharp-libvips-darwin-x64': 1.2.4 + '@img/sharp-libvips-darwin-x64': 1.3.1 optional: true '@img/sharp-darwin-x64@0.35.3': @@ -2829,74 +2822,79 @@ snapshots: '@img/sharp-libvips-darwin-x64': 1.3.2 optional: true + '@img/sharp-freebsd-wasm32@0.35.2': + dependencies: + '@img/sharp-wasm32': 0.35.2 + optional: true + '@img/sharp-freebsd-wasm32@0.35.3': dependencies: '@img/sharp-wasm32': 0.35.3 optional: true - '@img/sharp-libvips-darwin-arm64@1.2.4': + '@img/sharp-libvips-darwin-arm64@1.3.1': optional: true '@img/sharp-libvips-darwin-arm64@1.3.2': optional: true - '@img/sharp-libvips-darwin-x64@1.2.4': + '@img/sharp-libvips-darwin-x64@1.3.1': optional: true '@img/sharp-libvips-darwin-x64@1.3.2': optional: true - '@img/sharp-libvips-linux-arm64@1.2.4': + '@img/sharp-libvips-linux-arm64@1.3.1': optional: true '@img/sharp-libvips-linux-arm64@1.3.2': optional: true - '@img/sharp-libvips-linux-arm@1.2.4': + '@img/sharp-libvips-linux-arm@1.3.1': optional: true '@img/sharp-libvips-linux-arm@1.3.2': optional: true - '@img/sharp-libvips-linux-ppc64@1.2.4': + '@img/sharp-libvips-linux-ppc64@1.3.1': optional: true '@img/sharp-libvips-linux-ppc64@1.3.2': optional: true - '@img/sharp-libvips-linux-riscv64@1.2.4': + '@img/sharp-libvips-linux-riscv64@1.3.1': optional: true '@img/sharp-libvips-linux-riscv64@1.3.2': optional: true - '@img/sharp-libvips-linux-s390x@1.2.4': + '@img/sharp-libvips-linux-s390x@1.3.1': optional: true '@img/sharp-libvips-linux-s390x@1.3.2': optional: true - '@img/sharp-libvips-linux-x64@1.2.4': + '@img/sharp-libvips-linux-x64@1.3.1': optional: true '@img/sharp-libvips-linux-x64@1.3.2': optional: true - '@img/sharp-libvips-linuxmusl-arm64@1.2.4': + '@img/sharp-libvips-linuxmusl-arm64@1.3.1': optional: true '@img/sharp-libvips-linuxmusl-arm64@1.3.2': optional: true - '@img/sharp-libvips-linuxmusl-x64@1.2.4': + '@img/sharp-libvips-linuxmusl-x64@1.3.1': optional: true '@img/sharp-libvips-linuxmusl-x64@1.3.2': optional: true - '@img/sharp-linux-arm64@0.34.5': + '@img/sharp-linux-arm64@0.35.2': optionalDependencies: - '@img/sharp-libvips-linux-arm64': 1.2.4 + '@img/sharp-libvips-linux-arm64': 1.3.1 optional: true '@img/sharp-linux-arm64@0.35.3': @@ -2904,9 +2902,9 @@ snapshots: '@img/sharp-libvips-linux-arm64': 1.3.2 optional: true - '@img/sharp-linux-arm@0.34.5': + '@img/sharp-linux-arm@0.35.2': optionalDependencies: - '@img/sharp-libvips-linux-arm': 1.2.4 + '@img/sharp-libvips-linux-arm': 1.3.1 optional: true '@img/sharp-linux-arm@0.35.3': @@ -2914,9 +2912,9 @@ snapshots: '@img/sharp-libvips-linux-arm': 1.3.2 optional: true - '@img/sharp-linux-ppc64@0.34.5': + '@img/sharp-linux-ppc64@0.35.2': optionalDependencies: - '@img/sharp-libvips-linux-ppc64': 1.2.4 + '@img/sharp-libvips-linux-ppc64': 1.3.1 optional: true '@img/sharp-linux-ppc64@0.35.3': @@ -2924,9 +2922,9 @@ snapshots: '@img/sharp-libvips-linux-ppc64': 1.3.2 optional: true - '@img/sharp-linux-riscv64@0.34.5': + '@img/sharp-linux-riscv64@0.35.2': optionalDependencies: - '@img/sharp-libvips-linux-riscv64': 1.2.4 + '@img/sharp-libvips-linux-riscv64': 1.3.1 optional: true '@img/sharp-linux-riscv64@0.35.3': @@ -2934,9 +2932,9 @@ snapshots: '@img/sharp-libvips-linux-riscv64': 1.3.2 optional: true - '@img/sharp-linux-s390x@0.34.5': + '@img/sharp-linux-s390x@0.35.2': optionalDependencies: - '@img/sharp-libvips-linux-s390x': 1.2.4 + '@img/sharp-libvips-linux-s390x': 1.3.1 optional: true '@img/sharp-linux-s390x@0.35.3': @@ -2944,9 +2942,9 @@ snapshots: '@img/sharp-libvips-linux-s390x': 1.3.2 optional: true - '@img/sharp-linux-x64@0.34.5': + '@img/sharp-linux-x64@0.35.2': optionalDependencies: - '@img/sharp-libvips-linux-x64': 1.2.4 + '@img/sharp-libvips-linux-x64': 1.3.1 optional: true '@img/sharp-linux-x64@0.35.3': @@ -2954,9 +2952,9 @@ snapshots: '@img/sharp-libvips-linux-x64': 1.3.2 optional: true - '@img/sharp-linuxmusl-arm64@0.34.5': + '@img/sharp-linuxmusl-arm64@0.35.2': optionalDependencies: - '@img/sharp-libvips-linuxmusl-arm64': 1.2.4 + '@img/sharp-libvips-linuxmusl-arm64': 1.3.1 optional: true '@img/sharp-linuxmusl-arm64@0.35.3': @@ -2964,9 +2962,9 @@ snapshots: '@img/sharp-libvips-linuxmusl-arm64': 1.3.2 optional: true - '@img/sharp-linuxmusl-x64@0.34.5': + '@img/sharp-linuxmusl-x64@0.35.2': optionalDependencies: - '@img/sharp-libvips-linuxmusl-x64': 1.2.4 + '@img/sharp-libvips-linuxmusl-x64': 1.3.1 optional: true '@img/sharp-linuxmusl-x64@0.35.3': @@ -2974,7 +2972,7 @@ snapshots: '@img/sharp-libvips-linuxmusl-x64': 1.3.2 optional: true - '@img/sharp-wasm32@0.34.5': + '@img/sharp-wasm32@0.35.2': dependencies: '@emnapi/runtime': 1.11.2 optional: true @@ -2984,24 +2982,29 @@ snapshots: '@emnapi/runtime': 1.11.2 optional: true + '@img/sharp-webcontainers-wasm32@0.35.2': + dependencies: + '@img/sharp-wasm32': 0.35.2 + optional: true + '@img/sharp-webcontainers-wasm32@0.35.3': dependencies: '@img/sharp-wasm32': 0.35.3 optional: true - '@img/sharp-win32-arm64@0.34.5': + '@img/sharp-win32-arm64@0.35.2': optional: true '@img/sharp-win32-arm64@0.35.3': optional: true - '@img/sharp-win32-ia32@0.34.5': + '@img/sharp-win32-ia32@0.35.2': optional: true '@img/sharp-win32-ia32@0.35.3': optional: true - '@img/sharp-win32-x64@0.34.5': + '@img/sharp-win32-x64@0.35.2': optional: true '@img/sharp-win32-x64@0.35.3': @@ -3053,7 +3056,14 @@ snapshots: '@tybys/wasm-util': 0.10.3 optional: true - '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': + '@napi-rs/wasm-runtime@1.2.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@tybys/wasm-util': 0.10.3 + optional: true + + '@napi-rs/wasm-runtime@1.2.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': dependencies: '@emnapi/core': 1.11.1 '@emnapi/runtime': 1.11.2 @@ -3127,46 +3137,40 @@ snapshots: '@rolldown/pluginutils@1.0.1': {} - '@rollup/pluginutils@5.4.0': + '@shikijs/core@4.4.3': dependencies: - '@types/estree': 1.0.9 - estree-walker: 2.0.2 - picomatch: 4.0.5 - - '@shikijs/core@4.3.1': - dependencies: - '@shikijs/primitive': 4.3.1 - '@shikijs/types': 4.3.1 + '@shikijs/primitive': 4.4.3 + '@shikijs/types': 4.4.3 '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.5 hast-util-to-html: 9.0.5 - '@shikijs/engine-javascript@4.3.1': + '@shikijs/engine-javascript@4.4.3': dependencies: - '@shikijs/types': 4.3.1 + '@shikijs/types': 4.4.3 '@shikijs/vscode-textmate': 10.0.2 oniguruma-to-es: 4.3.6 - '@shikijs/engine-oniguruma@4.3.1': + '@shikijs/engine-oniguruma@4.4.3': dependencies: - '@shikijs/types': 4.3.1 + '@shikijs/types': 4.4.3 '@shikijs/vscode-textmate': 10.0.2 - '@shikijs/langs@4.3.1': + '@shikijs/langs@4.4.3': dependencies: - '@shikijs/types': 4.3.1 + '@shikijs/types': 4.4.3 - '@shikijs/primitive@4.3.1': + '@shikijs/primitive@4.4.3': dependencies: - '@shikijs/types': 4.3.1 + '@shikijs/types': 4.4.3 '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.5 - '@shikijs/themes@4.3.1': + '@shikijs/themes@4.4.3': dependencies: - '@shikijs/types': 4.3.1 + '@shikijs/types': 4.4.3 - '@shikijs/types@4.3.1': + '@shikijs/types@4.4.3': dependencies: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.5 @@ -3297,11 +3301,9 @@ snapshots: dependencies: process-ancestry: 0.1.0 - ansi-regex@5.0.1: {} + ansi-regex@6.2.2: {} - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 + ansi-styles@6.2.3: {} anymatch@3.1.3: dependencies: @@ -3318,16 +3320,15 @@ snapshots: astring@1.9.0: {} - astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0): + astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0): dependencies: - '@astrojs/compiler-rs': 0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) - '@astrojs/internal-helpers': 0.10.1 - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/compiler-rs': 0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) + '@astrojs/internal-helpers': 0.10.2 + '@astrojs/markdown-satteri': 0.3.5 '@astrojs/telemetry': 3.3.3 '@capsizecss/unpack': 4.0.1 '@clack/prompts': 1.7.0 '@oslojs/encoding': 1.1.0 - '@rollup/pluginutils': 5.4.0 am-i-vibing: 0.4.0 aria-query: 5.3.2 axobject-query: 4.1.0 @@ -3348,7 +3349,7 @@ snapshots: http-cache-semantics: 4.2.0 js-yaml: 4.3.0 jsonc-parser: 3.3.1 - magic-string: 0.30.21 + magic-string: 1.1.0 magicast: 0.5.3 mrmime: 2.0.1 neotraverse: 1.0.1 @@ -3359,7 +3360,7 @@ snapshots: piccolore: 0.1.3 picomatch: 4.0.5 semver: 7.8.5 - shiki: 4.3.1 + shiki: 4.4.3 smol-toml: 1.7.0 svgo: 4.0.2 tinyclip: 0.1.15 @@ -3374,7 +3375,7 @@ snapshots: yargs-parser: 22.0.0 zod: 4.4.3 optionalDependencies: - '@astrojs/markdown-remark': 7.2.1 + '@astrojs/markdown-remark': 7.2.2 sharp: 0.35.3(@types/node@24.13.3) transitivePeerDependencies: - '@azure/app-configuration' @@ -3401,7 +3402,6 @@ snapshots: - ioredis - jiti - less - - rollup - sass - sass-embedded - stylus @@ -3439,22 +3439,16 @@ snapshots: ci-info@4.4.0: {} - cliui@8.0.1: + cliui@9.0.1: dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 + string-width: 7.2.0 + strip-ansi: 7.2.0 + wrap-ansi: 9.0.2 clsx@2.1.1: {} collapse-white-space@2.1.0: {} - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - comma-separated-tokens@2.0.3: {} commander@11.1.0: {} @@ -3544,7 +3538,7 @@ snapshots: '@emmetio/abbreviation': 2.3.3 '@emmetio/css-abbreviation': 2.1.8 - emoji-regex@8.0.0: {} + emoji-regex@10.6.0: {} entities@4.5.0: {} @@ -3630,8 +3624,6 @@ snapshots: '@types/estree-jsx': 1.0.5 '@types/unist': 3.0.3 - estree-walker@2.0.2: {} - estree-walker@3.0.3: dependencies: '@types/estree': 1.0.9 @@ -3673,6 +3665,8 @@ snapshots: get-caller-file@2.0.5: {} + get-east-asian-width@1.6.0: {} + get-tsconfig@5.0.0-beta.4: dependencies: resolve-pkg-maps: 1.0.0 @@ -3840,8 +3834,6 @@ snapshots: is-docker@4.0.0: {} - is-fullwidth-code-point@3.0.0: {} - is-hexadecimal@2.0.1: {} is-plain-obj@4.1.0: {} @@ -3911,7 +3903,7 @@ snapshots: lru-cache@11.5.2: {} - magic-string@0.30.21: + magic-string@1.1.0: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -4362,12 +4354,12 @@ snapshots: transitivePeerDependencies: - supports-color - miniflare@4.20260714.0: + miniflare@5.20260804.0-alpha: dependencies: '@cspotcode/source-map-support': 0.8.1 - sharp: 0.34.5 - undici: 7.28.0 - workerd: 1.20260714.1 + sharp: 0.35.2 + undici: 7.29.0 + workerd: 1.20260804.1 ws: 8.21.0 youch: 4.1.0-beta.10 transitivePeerDependencies: @@ -4597,8 +4589,6 @@ snapshots: request-light@0.7.0: {} - require-directory@2.1.1: {} - require-from-string@2.0.2: {} resolve-pkg-maps@1.0.0: {} @@ -4670,36 +4660,37 @@ snapshots: semver@7.8.5: {} - sharp@0.34.5: + sharp@0.35.2: dependencies: '@img/colour': 1.1.0 detect-libc: 2.1.2 semver: 7.8.5 optionalDependencies: - '@img/sharp-darwin-arm64': 0.34.5 - '@img/sharp-darwin-x64': 0.34.5 - '@img/sharp-libvips-darwin-arm64': 1.2.4 - '@img/sharp-libvips-darwin-x64': 1.2.4 - '@img/sharp-libvips-linux-arm': 1.2.4 - '@img/sharp-libvips-linux-arm64': 1.2.4 - '@img/sharp-libvips-linux-ppc64': 1.2.4 - '@img/sharp-libvips-linux-riscv64': 1.2.4 - '@img/sharp-libvips-linux-s390x': 1.2.4 - '@img/sharp-libvips-linux-x64': 1.2.4 - '@img/sharp-libvips-linuxmusl-arm64': 1.2.4 - '@img/sharp-libvips-linuxmusl-x64': 1.2.4 - '@img/sharp-linux-arm': 0.34.5 - '@img/sharp-linux-arm64': 0.34.5 - '@img/sharp-linux-ppc64': 0.34.5 - '@img/sharp-linux-riscv64': 0.34.5 - '@img/sharp-linux-s390x': 0.34.5 - '@img/sharp-linux-x64': 0.34.5 - '@img/sharp-linuxmusl-arm64': 0.34.5 - '@img/sharp-linuxmusl-x64': 0.34.5 - '@img/sharp-wasm32': 0.34.5 - '@img/sharp-win32-arm64': 0.34.5 - '@img/sharp-win32-ia32': 0.34.5 - '@img/sharp-win32-x64': 0.34.5 + '@img/sharp-darwin-arm64': 0.35.2 + '@img/sharp-darwin-x64': 0.35.2 + '@img/sharp-freebsd-wasm32': 0.35.2 + '@img/sharp-libvips-darwin-arm64': 1.3.1 + '@img/sharp-libvips-darwin-x64': 1.3.1 + '@img/sharp-libvips-linux-arm': 1.3.1 + '@img/sharp-libvips-linux-arm64': 1.3.1 + '@img/sharp-libvips-linux-ppc64': 1.3.1 + '@img/sharp-libvips-linux-riscv64': 1.3.1 + '@img/sharp-libvips-linux-s390x': 1.3.1 + '@img/sharp-libvips-linux-x64': 1.3.1 + '@img/sharp-libvips-linuxmusl-arm64': 1.3.1 + '@img/sharp-libvips-linuxmusl-x64': 1.3.1 + '@img/sharp-linux-arm': 0.35.2 + '@img/sharp-linux-arm64': 0.35.2 + '@img/sharp-linux-ppc64': 0.35.2 + '@img/sharp-linux-riscv64': 0.35.2 + '@img/sharp-linux-s390x': 0.35.2 + '@img/sharp-linux-x64': 0.35.2 + '@img/sharp-linuxmusl-arm64': 0.35.2 + '@img/sharp-linuxmusl-x64': 0.35.2 + '@img/sharp-webcontainers-wasm32': 0.35.2 + '@img/sharp-win32-arm64': 0.35.2 + '@img/sharp-win32-ia32': 0.35.2 + '@img/sharp-win32-x64': 0.35.2 sharp@0.35.3(@types/node@24.13.3): dependencies: @@ -4735,14 +4726,14 @@ snapshots: '@types/node': 24.13.3 optional: true - shiki@4.3.1: + shiki@4.4.3: dependencies: - '@shikijs/core': 4.3.1 - '@shikijs/engine-javascript': 4.3.1 - '@shikijs/engine-oniguruma': 4.3.1 - '@shikijs/langs': 4.3.1 - '@shikijs/themes': 4.3.1 - '@shikijs/types': 4.3.1 + '@shikijs/core': 4.4.3 + '@shikijs/engine-javascript': 4.4.3 + '@shikijs/engine-oniguruma': 4.4.3 + '@shikijs/langs': 4.4.3 + '@shikijs/themes': 4.4.3 + '@shikijs/types': 4.4.3 '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.5 @@ -4765,20 +4756,25 @@ snapshots: stream-replace-string@2.0.0: {} - string-width@4.2.3: + string-width@7.2.0: + dependencies: + emoji-regex: 10.6.0 + get-east-asian-width: 1.6.0 + strip-ansi: 7.2.0 + + string-width@8.2.2: dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 + get-east-asian-width: 1.6.0 + strip-ansi: 7.2.0 stringify-entities@4.0.4: dependencies: character-entities-html4: 2.1.0 character-entities-legacy: 3.0.0 - strip-ansi@6.0.1: + strip-ansi@7.2.0: dependencies: - ansi-regex: 5.0.1 + ansi-regex: 6.2.2 style-to-js@1.1.21: dependencies: @@ -4834,7 +4830,7 @@ snapshots: undici-types@7.18.2: {} - undici@7.28.0: {} + undici@7.29.0: {} unenv@2.0.0-rc.24: dependencies: @@ -5053,35 +5049,35 @@ snapshots: web-namespaces@2.0.1: {} - workerd@1.20260714.1: + workerd@1.20260804.1: optionalDependencies: - '@cloudflare/workerd-darwin-64': 1.20260714.1 - '@cloudflare/workerd-darwin-arm64': 1.20260714.1 - '@cloudflare/workerd-linux-64': 1.20260714.1 - '@cloudflare/workerd-linux-arm64': 1.20260714.1 - '@cloudflare/workerd-windows-64': 1.20260714.1 + '@cloudflare/workerd-darwin-64': 1.20260804.1 + '@cloudflare/workerd-darwin-arm64': 1.20260804.1 + '@cloudflare/workerd-linux-64': 1.20260804.1 + '@cloudflare/workerd-linux-arm64': 1.20260804.1 + '@cloudflare/workerd-windows-64': 1.20260804.1 - wrangler@4.112.0: + wrangler@4.120.1: dependencies: '@cloudflare/kv-asset-handler': 0.5.0 - '@cloudflare/unenv-preset': 2.16.1(unenv@2.0.0-rc.24)(workerd@1.20260714.1) + '@cloudflare/unenv-preset': 2.16.1(unenv@2.0.0-rc.24)(workerd@1.20260804.1) blake3-wasm: 2.1.5 esbuild: 0.28.1 - miniflare: 4.20260714.0 + miniflare: 5.20260804.0-alpha path-to-regexp: 6.3.0 unenv: 2.0.0-rc.24 - workerd: 1.20260714.1 + workerd: 1.20260804.1 optionalDependencies: fsevents: 2.3.3 transitivePeerDependencies: - bufferutil - utf-8-validate - wrap-ansi@7.0.0: + wrap-ansi@9.0.2: dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 + ansi-styles: 6.2.3 + string-width: 7.2.0 + strip-ansi: 7.2.0 ws@8.21.0: {} @@ -5108,19 +5104,16 @@ snapshots: yaml@2.9.0: {} - yargs-parser@21.1.1: {} - yargs-parser@22.0.0: {} - yargs@17.7.3: + yargs@18.1.0: dependencies: - cliui: 8.0.1 + cliui: 9.0.1 escalade: 3.2.0 get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 + string-width: 8.2.2 y18n: 5.0.8 - yargs-parser: 21.1.1 + yargs-parser: 22.0.0 yocto-queue@1.2.2: {} diff --git a/website/cfd/pnpm-workspace.yaml b/website/cfd/pnpm-workspace.yaml index f176fe099..70bebecfe 100644 --- a/website/cfd/pnpm-workspace.yaml +++ b/website/cfd/pnpm-workspace.yaml @@ -5,7 +5,16 @@ allowBuilds: # Fresh releases accepted despite the configured minimum release age. # pnpm appends here on install; each entry is a version we chose to take early. minimumReleaseAgeExclude: - - astro@7.1.3 + - '@shikijs/core@4.4.3' + - '@shikijs/engine-javascript@4.4.3' + - '@shikijs/engine-oniguruma@4.4.3' + - '@shikijs/langs@4.4.3' + - '@shikijs/primitive@4.4.3' + - '@shikijs/themes@4.4.3' + - '@shikijs/types@4.4.3' + - miniflare@5.20260804.0-alpha + - shiki@4.4.3 + - wrangler@4.120.1 # pnpm settings live here, not in package.json. # @@ -29,5 +38,14 @@ onlyBuiltDependencies: # # NOTE: overrides must live here. pnpm 11 no longer reads the `pnpm` field from # package.json, so an override placed there is silently ignored. +# +# Deduplicate shiki. +# +# astro and @astrojs/internal-helpers both depend on "^4.0.2", so pnpm is free +# to keep an older copy alongside the one this project depends on directly. +# shiki-rust-themes.mjs derives its themes from `bundledThemes` of the direct +# copy and hands them to the highlighter astro instantiates from its own copy; +# those two must be the same shiki. Force one version, which satisfies ^4.0.2. overrides: - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/markdown-satteri': 0.3.5 + shiki: 4.4.3 diff --git a/website/docs/README.md b/website/docs/README.md index 7d66cc591..9b63b8b9c 100644 --- a/website/docs/README.md +++ b/website/docs/README.md @@ -12,17 +12,43 @@ Cloudflare Worker (`deepcausality-docs`), independent of the main website in | `pnpm dev` | Dev server at `localhost:4321` (live reload) | | `pnpm build` | Static build to `dist/` | | `pnpm preview` | Serve the built `dist/` locally | -| `pnpm pdf` | Render the whole site to `public/deepcausality-docs.pdf` (local) | +| `pnpm pdf` | Render the deployed site to `public/deepcausality-docs.pdf` | The site is also built under Bazel: `bazel build //website/docs:build` runs the same `astro build` hermetically and writes `dist/` to `bazel-bin/website/docs/`. ## Single PDF (local only) -`pnpm pdf` runs `scripts/build-pdf.sh`, which builds, previews, and renders the -docs to one PDF via `npx starlight-to-pdf` (headless Chromium). It is intentionally -**not** part of the Cloudflare build (no browser there). Regenerate and commit -`public/deepcausality-docs.pdf` before pushing so the docs and PDF stay consistent. +`pnpm pdf` runs `scripts/build-pdf.sh`, which renders the whole documentation +site to one PDF via `npx starlight-to-pdf` (headless Chromium). It is +intentionally **not** part of the Cloudflare build, which provides no browser. + +The script crawls the deployed site at **https://docs.deepcausality.com**. It +builds nothing locally and starts no preview server. `starlight-to-pdf` has no +base-URL rewrite, so the origin it crawls is the origin it writes into every +link annotation of the PDF. Crawling a local preview shipped a download whose +in-body cross-references pointed at `http://localhost:4329`, dead for every +reader who opened it. + +The PDF therefore shows what is deployed rather than what sits in the working +tree. Order the steps accordingly: + +1. deploy the documentation changes +2. run `pnpm pdf` +3. commit the regenerated `public/deepcausality-docs.pdf` + +Regenerating before the deploy lands reproduces the previous site. + +Puppeteer downloads its own Chromium on first run. Set `CHROME_PATH` to use an +installed browser instead, which is the fix when that download is unusable: + +```bash +CHROME_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" pnpm pdf +``` + +A full crawl takes about 20 seconds and yields roughly 165 pages. Runs +occasionally abort on a navigation timeout; the script writes the PDF only on +success, so the committed file survives a failed run and a rerun is enough. ## Fonts diff --git a/website/docs/package.json b/website/docs/package.json index 9554b7209..5cd0b487f 100644 --- a/website/docs/package.json +++ b/website/docs/package.json @@ -14,11 +14,11 @@ }, "dependencies": { "@astrojs/sitemap": "^3.7.3", - "@astrojs/starlight": "^0.41.3", - "astro": "^7.1.3" + "@astrojs/starlight": "^0.41.7", + "astro": "^7.2.0" }, "devDependencies": { - "@astrojs/check": "^0.9.9", + "@astrojs/check": "^0.9.10", "typescript": "^6.0.3" }, "packageManager": "pnpm@11.9.0" diff --git a/website/docs/pnpm-lock.yaml b/website/docs/pnpm-lock.yaml index ef075b7d9..f2340737c 100644 --- a/website/docs/pnpm-lock.yaml +++ b/website/docs/pnpm-lock.yaml @@ -5,7 +5,7 @@ settings: excludeLinksFromLockfile: false overrides: - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/markdown-satteri': 0.3.5 importers: @@ -15,97 +15,97 @@ importers: specifier: ^3.7.3 version: 3.7.3 '@astrojs/starlight': - specifier: ^0.41.3 - version: 0.41.3(@astrojs/markdown-remark@7.2.1)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0))(typescript@6.0.3) + specifier: ^0.41.7 + version: 0.41.7(@astrojs/markdown-remark@7.2.2)(astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0))(typescript@6.0.3) astro: - specifier: ^7.1.3 - version: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0) + specifier: ^7.2.0 + version: 7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0) devDependencies: '@astrojs/check': - specifier: ^0.9.9 - version: 0.9.9(prettier@3.9.5)(typescript@6.0.3) + specifier: ^0.9.10 + version: 0.9.10(prettier@3.9.5)(typescript@6.0.3) typescript: specifier: ^6.0.3 version: 6.0.3 packages: - '@astrojs/check@0.9.9': - resolution: {integrity: sha512-A5UW8uIuErLWEoRQvzgXpO1gTjUFtK8r7nU2Z7GewAMxUb7bPvpk11qaKKgxqXlHJWlAvaaxy+Xg28A6bmQ1Tg==} + '@astrojs/check@0.9.10': + resolution: {integrity: sha512-zgx/UQMozdjOa3bOxjgeCFdtpE3c9rRX6xHwa+2QXvy8z8Akifu2AtubHyv/zzC2znO8dl8fFWL4K+Ba9kS8HQ==} hasBin: true peerDependencies: typescript: ^5.0.0 || ^6.0.0 - '@astrojs/compiler-binding-darwin-arm64@0.3.1': - resolution: {integrity: sha512-IEmEF2fUIlTHtpeE/isyEGVOB14cEyh/LZOFYt6wn3jNyVpdC8aR5OZ+RzFUR/f+8ZDM1LaMwZKvoA7eMyJeFw==} + '@astrojs/compiler-binding-darwin-arm64@0.3.2': + resolution: {integrity: sha512-MM8tn8CSimcfytaOla4b6acN8mKWiL/rlAA1fpT3/Wl7dNGSE4y8FjTN/zJVNnb63CsLWG5zZwCt01TXtDKh9g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@astrojs/compiler-binding-darwin-x64@0.3.1': - resolution: {integrity: sha512-GF2kIxjpPDLsn94zbZNMsxEmkU828QqnmM7kiQJnaooS3jmI+I7kk6+oI6EpwOsK3femCMdcm+wmOsEqtGrmjQ==} + '@astrojs/compiler-binding-darwin-x64@0.3.2': + resolution: {integrity: sha512-2lXOlzf8xb7jLomRsf/aswh61/NnGusynB2OwFkK6k4pmOtpfXMYnG0PLfXrEvxXYj69NdCnmUYXtHDd+JOOag==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@astrojs/compiler-binding-linux-arm64-gnu@0.3.1': - resolution: {integrity: sha512-XJL3SDmOtVrqFhCirNcHwE91+IesJqlgNo23I4qW9QUYfwzm/TBZuH61fgqsb1ttgR1mMYz6ooPWs0JDhwMqpQ==} + '@astrojs/compiler-binding-linux-arm64-gnu@0.3.2': + resolution: {integrity: sha512-BmU3kWj7qnLrd4vzm49zFEPJ5oFnn1tCT4Vt9hZbqdU5Cmb8GZl7fn6VFsnNfe7B18a2gIFtVzbLINtYl5kBjQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@astrojs/compiler-binding-linux-arm64-musl@0.3.1': - resolution: {integrity: sha512-xqE8BVbDoBueK/B47w30PtkVofUWJKGkwoMVE+EOMLf11rnoANxIAdA9FPqY+rng4oNI5ndHGsri1yPj2k8vZQ==} + '@astrojs/compiler-binding-linux-arm64-musl@0.3.2': + resolution: {integrity: sha512-f0heT9ZZEseSu5bHCeb80eL2DH07ArE6U9xi1WT/PEusNjzPmEr3GJsjG1tRLo5VYUUYX7h3ScaqGmGrMOVGmw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@astrojs/compiler-binding-linux-x64-gnu@0.3.1': - resolution: {integrity: sha512-1y0StU1qiCuDFH3rmbRJXcxdfHxFPrES1Rd+RLffosvUR7I2cH5SF5SFnBN9vXpzpkmyElZm3Yr47iJBPN7vVA==} + '@astrojs/compiler-binding-linux-x64-gnu@0.3.2': + resolution: {integrity: sha512-M8fOUt0itRpqiGyoEA/ij184s8O+hqbCz3+YozRusOOM3osgGljpDThhbKAJjqh82wOo6FioQ4w8PBvU1XMD5Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@astrojs/compiler-binding-linux-x64-musl@0.3.1': - resolution: {integrity: sha512-16q0fYf7kpbmdObZEeZJEup8hQv/whgNwVjrSvT8umrKwLDSnNIWiQpm09lQQu6bweZB0XyIvHwlPitvJhC+hg==} + '@astrojs/compiler-binding-linux-x64-musl@0.3.2': + resolution: {integrity: sha512-/Kebk8sO6HnLeSd691JkaAPfN7CqR9/KEXmWvyNPkaKNGmj8rTZ/lf2uXtnPu92Lan84UrKdIKVPy1fSo2encQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@astrojs/compiler-binding-wasm32-wasi@0.3.1': - resolution: {integrity: sha512-cB456shIwDv/PrVT+2QG7LFndpHkVge5HjqADKZgGaAc9JHVktCtjSrcdkRQ+3tbkPazNKaTLRjXLIiz2NIx9g==} + '@astrojs/compiler-binding-wasm32-wasi@0.3.2': + resolution: {integrity: sha512-pUA6xbcOSB7DhfzIArB8BCAkFfAIqriiR7zl5zOStd6oU2G0kIKj+GUdGnyXyhfiv881Hffyk5tC0mR18sDjDw==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@astrojs/compiler-binding-win32-arm64-msvc@0.3.1': - resolution: {integrity: sha512-ur/9+If/yTE69mmeX5MqSZndL0HOyx67GeNZUy3N7wVdWpLz9UTJXwyWS4UR2PUQHitghjsM5xoX0Ge56WRVQQ==} + '@astrojs/compiler-binding-win32-arm64-msvc@0.3.2': + resolution: {integrity: sha512-ESruf+6Qkl1trHUFxI6GSf6t52j8yN2kCNSzMWdzt7V/T09tFHrYzrVaJQohb2C9bJUH76pNvX6Zb51+xCQc9Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@astrojs/compiler-binding-win32-x64-msvc@0.3.1': - resolution: {integrity: sha512-k0W+kDBzDkNZOqu4kElDvCOIbKw5Ut9S1WZ1Krj3KTgNuBERNKXsMMsRLLcbgfdMdbe7bTekQLshZrrvmYpmwA==} + '@astrojs/compiler-binding-win32-x64-msvc@0.3.2': + resolution: {integrity: sha512-wzzVrEbOwbsLWOdEbocskjMRx2aZPxJ7ZbmL+jnpBamFwmigm+2M/wzuM6JWncocgYwLic1csSpalBh96kQKXA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@astrojs/compiler-binding@0.3.1': - resolution: {integrity: sha512-DaAUj29AIBU2XdJ8uwcab8lW5O2pk9pY8AXkcMw0sw77nVa3oeTYRcO+Dvbbpoexf6ThMc0FMWYCQ/wN1/T7oQ==} + '@astrojs/compiler-binding@0.3.2': + resolution: {integrity: sha512-8w/9CWmYrAJJ8N0SY3O43ws2BgxoW6u3QsD8u2mE140lMYAlwh+tlNoUeSBq22wVheFuiBbR212l6ixZ2IIgCQ==} engines: {node: ^20.19.0 || >=22.12.0} - '@astrojs/compiler-rs@0.3.1': - resolution: {integrity: sha512-aT7xkgsbNoS6nriY5qKpbihK43slFHO41iqgHCTdOvn1ifaQxLCc5yXy+6GzAtiafoaC1zA7OwVXCXMsvUZOkg==} + '@astrojs/compiler-rs@0.3.2': + resolution: {integrity: sha512-xlx/T7JovIKduu4ucbTQUxQ5+Q8wxkHxhLjnZk3VlJbhbQ9RLvvuDk1p2YYFYFQ5y14dVm3FGGO4isQXa4F+Tg==} engines: {node: '>=22.12.0'} '@astrojs/compiler@2.13.1': resolution: {integrity: sha512-f3FN83d2G/v32ipNClRKgYv30onQlMZX1vCeZMjPsMMPl1mDpmbl0+N5BYo4S/ofzqJyS5hvwacEo0CCVDn/Qg==} - '@astrojs/internal-helpers@0.10.1': - resolution: {integrity: sha512-5phcroT/vmOOrYuuAxtkbPixy5hePtlz9i8K4OeDv3dNK6/UQRuXPOSRTxIOBbUY5Sonw2UaxjbuVc43Mcir6Q==} + '@astrojs/internal-helpers@0.10.2': + resolution: {integrity: sha512-yt7fMgPYqSM4Tmr+taTW6Per+hjJ8Pk6lA1PAcDyqzOt8HzJ6Kje5WzCxA2Sd+9wsUW7uhkLeoTMK0cXPwH9rQ==} '@astrojs/language-server@2.16.12': resolution: {integrity: sha512-3LpFphBCzveUgm5ZVDINB/v3YA4TgPa1EMOEFn3Zt/Ww6jojR25iN+kmzeUz7v/b9xkmq+hMACTX4hizN3VCEQ==} @@ -119,17 +119,17 @@ packages: prettier-plugin-astro: optional: true - '@astrojs/markdown-remark@7.2.1': - resolution: {integrity: sha512-jPVNIqTvk+yKviikszv/Y1U4jGUSKpp/Nw48QZV4qjWgp70j4Lkq3lhSDRbWwCfgKvEyO9GHuVbV1dM2WYXy1w==} + '@astrojs/markdown-remark@7.2.2': + resolution: {integrity: sha512-FGfmK84zSNcrsBd0dl1gXE9JvZYElp8EXQa2jpHVAxG4deGKAp43wspxFupjADJX7MSsMRHwYCnfT6EyVmgeFQ==} - '@astrojs/markdown-satteri@0.3.4': - resolution: {integrity: sha512-6Lvt/bQZEBW+zzdhPblvfZEy5PGEYJaUsUqaCgwHeRPxZJL1gc9I+DRLKWJjjYTWDzVUTzXlMq4WwSK+X34CVw==} + '@astrojs/markdown-satteri@0.3.5': + resolution: {integrity: sha512-CvWVEFAbay7YO+i9SaqDJubipA5ckiVB89QWoMJ5XC0m5CtFg8JwZ7Kau6X9sYY7FZURH0w2l03ISH2jOS/RDQ==} - '@astrojs/mdx@7.0.2': - resolution: {integrity: sha512-l+sJY5U1KkGZUdr+bIL4Y6BefeS549qoSHVSkUSs6A9INwdCND+/0+vN0NroPBXwl5Vcg5u78t7VQRsJjePxbw==} + '@astrojs/mdx@7.0.5': + resolution: {integrity: sha512-wEM/HH1RiEntyPVagdiF+yArzfcYLKBB0C1RZspVidKZ97rRMbaqP1Nbl/GR0sJs8zwaceqxRymw8aOKKJRdYw==} engines: {node: '>=22.12.0'} peerDependencies: - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/markdown-satteri': 0.3.5 astro: ^7.0.0 peerDependenciesMeta: '@astrojs/markdown-satteri': @@ -142,8 +142,8 @@ packages: '@astrojs/sitemap@3.7.3': resolution: {integrity: sha512-f8euLVsyeAmAkSm/1M2Kb8sL8byQmfgbvBNaHFItCheTj/IpiJYSEWVcqDHZ/yEHxiS7+w87mQkzwZaPHmk5GA==} - '@astrojs/starlight@0.41.3': - resolution: {integrity: sha512-8xsG6UpK581TJmtOc7/pnxHKEbP16rV06VLWaVa7FOyE/VEwnaHOsLtL+miifCEfuiuv0Wn+j8u3JSluRQesMQ==} + '@astrojs/starlight@0.41.7': + resolution: {integrity: sha512-579VJuZgo20UpNQPm9EIez5W3DFSrD16uiV2YX6rUlpLtjgKSdnc69TxVTZXn4AtI2B731TI2qhW1O3K+vwtrQ==} peerDependencies: '@astrojs/markdown-remark': ^7.2.0 astro: ^7.0.2 @@ -615,6 +615,13 @@ packages: '@emnapi/core': ^1.7.1 '@emnapi/runtime': ^1.7.1 + '@napi-rs/wasm-runtime@1.2.2': + resolution: {integrity: sha512-JfB4kuJQjaoHuCTseIINHtHWeJnvgEcxjwA5t/Y00ZgaOO1Crz3fjT/p8kT28zA/Caz7oiUMn3d6H2yOVCVwuw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} + peerDependencies: + '@emnapi/core': ^1.7.1 || ^2.0.0-alpha.3 + '@emnapi/runtime': ^1.7.1 || ^2.0.0-alpha.3 + '@oslojs/encoding@1.1.0': resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==} @@ -757,15 +764,6 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} - '@rollup/pluginutils@5.4.0': - resolution: {integrity: sha512-MfPp06CjRLfXQ3wY0R8vJDYBy/MvVcc9OulEfR0B8Iv9ko+GCNaRZ+EpJYFl27LhKsZK0o420sYCRHCjfCgeUg==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - '@shikijs/core@4.3.1': resolution: {integrity: sha512-ANMDxuaPsNMdDC1m4vfvhlDmJweMwkE5XitTwrq2rWHx5jM+dlm4MmHt2PP6t0uejfR77SuhrhJ0zEijIF/uhA==} engines: {node: '>=20'} @@ -898,13 +896,13 @@ packages: resolution: {integrity: sha512-MxT4XZL7pzLHpuvhDKdMaQHMGGkJDLluKBLsbstn+8wv9sWcFT6h+0ve9qkml95amVTZtZV83gQe2hY+ojgHLg==} hasBin: true - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} + ansi-regex@6.2.2: + resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} + engines: {node: '>=12'} - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} @@ -932,12 +930,12 @@ packages: peerDependencies: astro: ^4.0.0-beta || ^5.0.0-beta || ^3.3.0 || ^6.0.0-beta || ^7.0.0 - astro@7.1.3: - resolution: {integrity: sha512-4dhPyAAXthf3xLEYnG8SeL7yr/nTPPABfY7e9YF0yuO+vK9Xp+8Q5j4xzsmL3GueukQv4oNwGNTBepLOiDGeJA==} + astro@7.2.0: + resolution: {integrity: sha512-lLTYzx3fOvCmtwD3JVBLQcbORbIOW1/j0R+3IvJx/XKwMGrk7mFnF0BYSOeRiNw1qHUR5mdA6+hRnyvyDfqrWQ==} engines: {node: '>=22.12.0', npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true peerDependencies: - '@astrojs/markdown-remark': 7.2.1 + '@astrojs/markdown-remark': 7.2.2 peerDependenciesMeta: '@astrojs/markdown-remark': optional: true @@ -985,9 +983,9 @@ packages: resolution: {integrity: sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==} engines: {node: '>=8'} - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} + cliui@9.0.1: + resolution: {integrity: sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==} + engines: {node: '>=20'} clsx@2.1.1: resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} @@ -996,13 +994,6 @@ packages: collapse-white-space@2.1.0: resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} @@ -1111,8 +1102,8 @@ packages: emmet@2.4.11: resolution: {integrity: sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ==} - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + emoji-regex@10.6.0: + resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} @@ -1162,9 +1153,6 @@ packages: estree-util-visit@2.0.0: resolution: {integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==} - estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} @@ -1221,6 +1209,10 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} + get-east-asian-width@1.6.0: + resolution: {integrity: sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==} + engines: {node: '>=18'} + get-tsconfig@5.0.0-beta.4: resolution: {integrity: sha512-7nF7C9fIPFEMHgEMEfgIlO9wDdZ8CyHw27rWciFZfHvHDReIiPhsYuzPRXsfvBCqFy1l8RRyyWV7QLM+ZhUJsQ==} engines: {node: '>=20.20.0'} @@ -1331,10 +1323,6 @@ packages: engines: {node: '>=20'} hasBin: true - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - is-hexadecimal@2.0.1: resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} @@ -1447,6 +1435,9 @@ packages: magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + magic-string@1.1.0: + resolution: {integrity: sha512-kS3VHe0nEPST2saQV4Rbkchcd3UBRkVTQHo1D3h/ZTwFDhai/mfKkmtPAtD129EOI7K3HlHIsFOt0WrI2/oU9g==} + magicast@0.5.3: resolution: {integrity: sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw==} @@ -1834,10 +1825,6 @@ packages: request-light@0.7.0: resolution: {integrity: sha512-lMbBMrDoxgsyO+yB3sDcrDuX85yYt7sS8BfQd11jtbW/z5ZWgLZRcEGLsLoYw7I0WSUGQBs8CC8ScIxkTX1+6Q==} - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -1913,16 +1900,20 @@ packages: stream-replace-string@2.0.0: resolution: {integrity: sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==} - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} + string-width@7.2.0: + resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} + engines: {node: '>=18'} + + string-width@8.2.2: + resolution: {integrity: sha512-GaPUh5gfdrYzqeVNZvUfT23vYYxXzKYidUcnMtJg/3rxRV63EFZy3k6xfKlmfeJD0176lnUV/Usr3XcwSvFzpg==} + engines: {node: '>=20'} stringify-entities@4.0.4: resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} style-to-js@1.1.21: resolution: {integrity: sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==} @@ -2252,9 +2243,9 @@ packages: web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} + wrap-ansi@9.0.2: + resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==} + engines: {node: '>=18'} xxhash-wasm@1.1.0: resolution: {integrity: sha512-147y/6YNh+tlp6nd/2pWq38i9h6mz/EuQ6njIrmW8D1BS5nCqs0P6DG+m6zTGnNz5I+uhZ0SHxBs9BsPrwcKDA==} @@ -2277,17 +2268,13 @@ packages: engines: {node: '>= 14.6'} hasBin: true - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - yargs-parser@22.0.0: resolution: {integrity: sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==} engines: {node: ^20.19.0 || ^22.12.0 || >=23} - yargs@17.7.3: - resolution: {integrity: sha512-GZtjxm/J/4TSxuL3FNYjCmLktBTnIw/rVmKSIyKeYAZpmJB2ig9VauCC5xsa82GNKVKDAqpOn3KVzNt0zmrU0g==} - engines: {node: '>=12'} + yargs@18.1.0: + resolution: {integrity: sha512-2rAgRKu54VsHkqI0/tYkmluGXHD4KW7yZoycuqDQ15QOTnc2VVfy0nN/1eMhnQLO00A+dwtK20xuCnc1YGeUyg==} + engines: {node: ^20.19.0 || ^22.12.0 || >=23} yocto-queue@1.2.2: resolution: {integrity: sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==} @@ -2301,74 +2288,74 @@ packages: snapshots: - '@astrojs/check@0.9.9(prettier@3.9.5)(typescript@6.0.3)': + '@astrojs/check@0.9.10(prettier@3.9.5)(typescript@6.0.3)': dependencies: '@astrojs/language-server': 2.16.12(prettier@3.9.5)(typescript@6.0.3) chokidar: 4.0.3 kleur: 4.1.5 typescript: 6.0.3 - yargs: 17.7.3 + yargs: 18.1.0 transitivePeerDependencies: - prettier - prettier-plugin-astro - '@astrojs/compiler-binding-darwin-arm64@0.3.1': + '@astrojs/compiler-binding-darwin-arm64@0.3.2': optional: true - '@astrojs/compiler-binding-darwin-x64@0.3.1': + '@astrojs/compiler-binding-darwin-x64@0.3.2': optional: true - '@astrojs/compiler-binding-linux-arm64-gnu@0.3.1': + '@astrojs/compiler-binding-linux-arm64-gnu@0.3.2': optional: true - '@astrojs/compiler-binding-linux-arm64-musl@0.3.1': + '@astrojs/compiler-binding-linux-arm64-musl@0.3.2': optional: true - '@astrojs/compiler-binding-linux-x64-gnu@0.3.1': + '@astrojs/compiler-binding-linux-x64-gnu@0.3.2': optional: true - '@astrojs/compiler-binding-linux-x64-musl@0.3.1': + '@astrojs/compiler-binding-linux-x64-musl@0.3.2': optional: true - '@astrojs/compiler-binding-wasm32-wasi@0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': + '@astrojs/compiler-binding-wasm32-wasi@0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': dependencies: - '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) + '@napi-rs/wasm-runtime': 1.2.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' optional: true - '@astrojs/compiler-binding-win32-arm64-msvc@0.3.1': + '@astrojs/compiler-binding-win32-arm64-msvc@0.3.2': optional: true - '@astrojs/compiler-binding-win32-x64-msvc@0.3.1': + '@astrojs/compiler-binding-win32-x64-msvc@0.3.2': optional: true - '@astrojs/compiler-binding@0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': + '@astrojs/compiler-binding@0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': optionalDependencies: - '@astrojs/compiler-binding-darwin-arm64': 0.3.1 - '@astrojs/compiler-binding-darwin-x64': 0.3.1 - '@astrojs/compiler-binding-linux-arm64-gnu': 0.3.1 - '@astrojs/compiler-binding-linux-arm64-musl': 0.3.1 - '@astrojs/compiler-binding-linux-x64-gnu': 0.3.1 - '@astrojs/compiler-binding-linux-x64-musl': 0.3.1 - '@astrojs/compiler-binding-wasm32-wasi': 0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) - '@astrojs/compiler-binding-win32-arm64-msvc': 0.3.1 - '@astrojs/compiler-binding-win32-x64-msvc': 0.3.1 + '@astrojs/compiler-binding-darwin-arm64': 0.3.2 + '@astrojs/compiler-binding-darwin-x64': 0.3.2 + '@astrojs/compiler-binding-linux-arm64-gnu': 0.3.2 + '@astrojs/compiler-binding-linux-arm64-musl': 0.3.2 + '@astrojs/compiler-binding-linux-x64-gnu': 0.3.2 + '@astrojs/compiler-binding-linux-x64-musl': 0.3.2 + '@astrojs/compiler-binding-wasm32-wasi': 0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) + '@astrojs/compiler-binding-win32-arm64-msvc': 0.3.2 + '@astrojs/compiler-binding-win32-x64-msvc': 0.3.2 transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' - '@astrojs/compiler-rs@0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': + '@astrojs/compiler-rs@0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': dependencies: - '@astrojs/compiler-binding': 0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) + '@astrojs/compiler-binding': 0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' '@astrojs/compiler@2.13.1': {} - '@astrojs/internal-helpers@0.10.1': + '@astrojs/internal-helpers@0.10.2': dependencies: '@types/hast': 3.0.5 '@types/mdast': 4.0.4 @@ -2404,9 +2391,9 @@ snapshots: transitivePeerDependencies: - typescript - '@astrojs/markdown-remark@7.2.1': + '@astrojs/markdown-remark@7.2.2': dependencies: - '@astrojs/internal-helpers': 0.10.1 + '@astrojs/internal-helpers': 0.10.2 '@astrojs/prism': 4.0.2 github-slugger: 2.0.0 hast-util-from-html: 2.0.3 @@ -2426,21 +2413,21 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/markdown-satteri@0.3.4': + '@astrojs/markdown-satteri@0.3.5': dependencies: - '@astrojs/internal-helpers': 0.10.1 + '@astrojs/internal-helpers': 0.10.2 '@astrojs/prism': 4.0.2 github-slugger: 2.0.0 hast-util-from-html: 2.0.3 satteri: 0.9.5 - '@astrojs/mdx@7.0.2(@astrojs/markdown-satteri@0.3.4)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0))': + '@astrojs/mdx@7.0.5(@astrojs/markdown-satteri@0.3.5)(astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0))': dependencies: - '@astrojs/internal-helpers': 0.10.1 - '@astrojs/markdown-remark': 7.2.1 + '@astrojs/internal-helpers': 0.10.2 + '@astrojs/markdown-remark': 7.2.2 '@mdx-js/mdx': 3.1.1 acorn: 8.17.0 - astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0) + astro: 7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0) es-module-lexer: 2.3.0 estree-util-visit: 2.0.0 hast-util-to-html: 9.0.5 @@ -2452,7 +2439,7 @@ snapshots: unist-util-visit: 5.1.0 vfile: 6.0.3 optionalDependencies: - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/markdown-satteri': 0.3.5 transitivePeerDependencies: - supports-color @@ -2466,17 +2453,17 @@ snapshots: stream-replace-string: 2.0.0 zod: 4.4.3 - '@astrojs/starlight@0.41.3(@astrojs/markdown-remark@7.2.1)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0))(typescript@6.0.3)': + '@astrojs/starlight@0.41.7(@astrojs/markdown-remark@7.2.2)(astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0))(typescript@6.0.3)': dependencies: - '@astrojs/markdown-satteri': 0.3.4 - '@astrojs/mdx': 7.0.2(@astrojs/markdown-satteri@0.3.4)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0)) + '@astrojs/markdown-satteri': 0.3.5 + '@astrojs/mdx': 7.0.5(@astrojs/markdown-satteri@0.3.5)(astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0)) '@astrojs/sitemap': 3.7.3 '@pagefind/default-ui': 1.5.2 '@types/hast': 3.0.5 '@types/js-yaml': 4.0.9 '@types/mdast': 4.0.4 - astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0) - astro-expressive-code: 0.44.0(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0)) + astro: 7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0) + astro-expressive-code: 0.44.0(astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0)) bcp-47: 2.1.1 hast-util-from-html: 2.0.3 hast-util-select: 6.0.4 @@ -2499,7 +2486,7 @@ snapshots: unist-util-visit: 5.1.0 vfile: 6.0.3 optionalDependencies: - '@astrojs/markdown-remark': 7.2.1 + '@astrojs/markdown-remark': 7.2.2 transitivePeerDependencies: - supports-color - typescript @@ -2870,7 +2857,7 @@ snapshots: '@tybys/wasm-util': 0.10.3 optional: true - '@napi-rs/wasm-runtime@1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': + '@napi-rs/wasm-runtime@1.2.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)': dependencies: '@emnapi/core': 1.11.1 '@emnapi/runtime': 1.11.2 @@ -2955,12 +2942,6 @@ snapshots: '@rolldown/pluginutils@1.0.1': {} - '@rollup/pluginutils@5.4.0': - dependencies: - '@types/estree': 1.0.9 - estree-walker: 2.0.2 - picomatch: 4.0.5 - '@shikijs/core@4.3.1': dependencies: '@shikijs/primitive': 4.3.1 @@ -3123,11 +3104,9 @@ snapshots: dependencies: process-ancestry: 0.1.0 - ansi-regex@5.0.1: {} + ansi-regex@6.2.2: {} - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 + ansi-styles@6.2.3: {} anymatch@3.1.3: dependencies: @@ -3144,22 +3123,21 @@ snapshots: astring@1.9.0: {} - astro-expressive-code@0.44.0(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0)): + astro-expressive-code@0.44.0(astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0)): dependencies: - astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0) + astro: 7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0) rehype-expressive-code: 0.44.0 url-extras: 0.1.0 - astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0): + astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2)(@types/node@24.13.3)(yaml@2.9.0): dependencies: - '@astrojs/compiler-rs': 0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) - '@astrojs/internal-helpers': 0.10.1 - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/compiler-rs': 0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.2) + '@astrojs/internal-helpers': 0.10.2 + '@astrojs/markdown-satteri': 0.3.5 '@astrojs/telemetry': 3.3.3 '@capsizecss/unpack': 4.0.1 '@clack/prompts': 1.7.0 '@oslojs/encoding': 1.1.0 - '@rollup/pluginutils': 5.4.0 am-i-vibing: 0.4.0 aria-query: 5.3.2 axobject-query: 4.1.0 @@ -3180,7 +3158,7 @@ snapshots: http-cache-semantics: 4.2.0 js-yaml: 4.3.0 jsonc-parser: 3.3.1 - magic-string: 0.30.21 + magic-string: 1.1.0 magicast: 0.5.3 mrmime: 2.0.1 neotraverse: 1.0.1 @@ -3206,7 +3184,7 @@ snapshots: yargs-parser: 22.0.0 zod: 4.4.3 optionalDependencies: - '@astrojs/markdown-remark': 7.2.1 + '@astrojs/markdown-remark': 7.2.2 sharp: 0.35.3(@types/node@24.13.3) transitivePeerDependencies: - '@azure/app-configuration' @@ -3233,7 +3211,6 @@ snapshots: - ioredis - jiti - less - - rollup - sass - sass-embedded - stylus @@ -3277,22 +3254,16 @@ snapshots: ci-info@4.4.0: {} - cliui@8.0.1: + cliui@9.0.1: dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 + string-width: 7.2.0 + strip-ansi: 7.2.0 + wrap-ansi: 9.0.2 clsx@2.1.1: {} collapse-white-space@2.1.0: {} - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - comma-separated-tokens@2.0.3: {} commander@11.1.0: {} @@ -3386,7 +3357,7 @@ snapshots: '@emmetio/abbreviation': 2.3.3 '@emmetio/css-abbreviation': 2.1.8 - emoji-regex@8.0.0: {} + emoji-regex@10.6.0: {} entities@4.5.0: {} @@ -3470,8 +3441,6 @@ snapshots: '@types/estree-jsx': 1.0.5 '@types/unist': 3.0.3 - estree-walker@2.0.2: {} - estree-walker@3.0.3: dependencies: '@types/estree': 1.0.9 @@ -3520,6 +3489,8 @@ snapshots: get-caller-file@2.0.5: {} + get-east-asian-width@1.6.0: {} + get-tsconfig@5.0.0-beta.4: dependencies: resolve-pkg-maps: 1.0.0 @@ -3754,8 +3725,6 @@ snapshots: is-docker@4.0.0: {} - is-fullwidth-code-point@3.0.0: {} - is-hexadecimal@2.0.1: {} is-plain-obj@4.1.0: {} @@ -3831,6 +3800,10 @@ snapshots: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 + magic-string@1.1.0: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + magicast@0.5.3: dependencies: '@babel/parser': 7.29.7 @@ -4572,8 +4545,6 @@ snapshots: request-light@0.7.0: {} - require-directory@2.1.1: {} - require-from-string@2.0.2: {} resolve-pkg-maps@1.0.0: {} @@ -4709,20 +4680,25 @@ snapshots: stream-replace-string@2.0.0: {} - string-width@4.2.3: + string-width@7.2.0: + dependencies: + emoji-regex: 10.6.0 + get-east-asian-width: 1.6.0 + strip-ansi: 7.2.0 + + string-width@8.2.2: dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 + get-east-asian-width: 1.6.0 + strip-ansi: 7.2.0 stringify-entities@4.0.4: dependencies: character-entities-html4: 2.1.0 character-entities-legacy: 3.0.0 - strip-ansi@6.0.1: + strip-ansi@7.2.0: dependencies: - ansi-regex: 5.0.1 + ansi-regex: 6.2.2 style-to-js@1.1.21: dependencies: @@ -4993,11 +4969,11 @@ snapshots: web-namespaces@2.0.1: {} - wrap-ansi@7.0.0: + wrap-ansi@9.0.2: dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 + ansi-styles: 6.2.3 + string-width: 7.2.0 + strip-ansi: 7.2.0 xxhash-wasm@1.1.0: {} @@ -5022,19 +4998,16 @@ snapshots: yaml@2.9.0: {} - yargs-parser@21.1.1: {} - yargs-parser@22.0.0: {} - yargs@17.7.3: + yargs@18.1.0: dependencies: - cliui: 8.0.1 + cliui: 9.0.1 escalade: 3.2.0 get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 + string-width: 8.2.2 y18n: 5.0.8 - yargs-parser: 21.1.1 + yargs-parser: 22.0.0 yocto-queue@1.2.2: {} diff --git a/website/docs/pnpm-workspace.yaml b/website/docs/pnpm-workspace.yaml index f176fe099..1c51e355f 100644 --- a/website/docs/pnpm-workspace.yaml +++ b/website/docs/pnpm-workspace.yaml @@ -2,11 +2,6 @@ allowBuilds: esbuild: true sharp: true workerd: true -# Fresh releases accepted despite the configured minimum release age. -# pnpm appends here on install; each entry is a version we chose to take early. -minimumReleaseAgeExclude: - - astro@7.1.3 - # pnpm settings live here, not in package.json. # # pnpm 11 no longer reads the `pnpm` field from package.json (it warns @@ -30,4 +25,4 @@ onlyBuiltDependencies: # NOTE: overrides must live here. pnpm 11 no longer reads the `pnpm` field from # package.json, so an override placed there is silently ignored. overrides: - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/markdown-satteri': 0.3.5 diff --git a/website/docs/public/deepcausality-docs.pdf b/website/docs/public/deepcausality-docs.pdf index 6a47030ec..5aa402370 100644 Binary files a/website/docs/public/deepcausality-docs.pdf and b/website/docs/public/deepcausality-docs.pdf differ diff --git a/website/docs/scripts/build-pdf.sh b/website/docs/scripts/build-pdf.sh index 584301179..90bd05508 100644 --- a/website/docs/scripts/build-pdf.sh +++ b/website/docs/scripts/build-pdf.sh @@ -8,45 +8,46 @@ # project's dependencies or the deploy; the generated PDF is committed and # served as a static asset from public/. # +# The crawl target is the live site, not a local preview. starlight-to-pdf has +# no base-URL rewrite: every link it writes into the PDF is the URL it crawled. +# Crawling localhost therefore baked `http://localhost:/...` into every +# in-body cross-reference, which is dead in a published download. Reading the +# deployed site makes those links resolve to https://docs.deepcausality.com. +# +# The consequence is that the PDF reflects what is DEPLOYED, not the working +# tree. Deploy documentation changes first, then regenerate. +# # Workflow: -# 1. run `npm run pdf` locally -# 2. commit the regenerated public/deepcausality-docs.pdf -# 3. push (Cloudflare serves the committed PDF; it launches no browser) +# 1. deploy the docs site +# 2. run `pnpm pdf` locally +# 3. commit the regenerated public/deepcausality-docs.pdf # # Output: public/deepcausality-docs.pdf # # Notes: # - The table of contents uses `--contents-links internal`, so TOC entries -# navigate to headings within the PDF (not to the crawl origin). -# - In-body cross-references resolve to the crawl origin (the local preview). -# For the published PDF, regenerate against the live site once it is up so -# those links point to https://docs.deepcausality.com rather than localhost. +# navigate to headings within the PDF rather than back out to the site. +# - Set CHROME_PATH to use an installed browser instead of the one Puppeteer +# downloads on first run (e.g. when that download is unusable): +# CHROME_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" pnpm pdf set -euo pipefail -PORT=4329 +SITE_URL="https://docs.deepcausality.com" DOCS_DIR="$(cd "$(dirname "$0")/.." && pwd)" OUT_DIR="$DOCS_DIR/public" -echo "==> Building docs site..." -npx astro build - -echo "==> Starting preview server on :$PORT ..." -npx astro preview --port "$PORT" >/dev/null 2>&1 & -PREVIEW_PID=$! -trap 'kill "$PREVIEW_PID" 2>/dev/null || true' EXIT - -echo "==> Waiting for preview server ..." -for _ in $(seq 1 30); do - if curl -sf "http://localhost:$PORT/" >/dev/null 2>&1; then break; fi - sleep 1 -done +BROWSER_ARGS=() +if [[ -n "${CHROME_PATH:-}" ]]; then + BROWSER_ARGS=(--browser-executable "$CHROME_PATH") +fi -echo "==> Rendering single PDF (downloads Chromium via npx on first run) ..." -npx --yes starlight-to-pdf "http://localhost:$PORT" \ +echo "==> Rendering single PDF from $SITE_URL (downloads Chromium via npx on first run) ..." +npx --yes starlight-to-pdf "$SITE_URL" \ --filename deepcausality-docs \ --path "$OUT_DIR" \ --contents-links internal \ - --print-bg + --print-bg \ + "${BROWSER_ARGS[@]}" echo "==> Done: $OUT_DIR/deepcausality-docs.pdf" echo " Commit the regenerated PDF so docs and PDF stay consistent." diff --git a/website/web/package.json b/website/web/package.json index d5ef820c4..40d2023e4 100644 --- a/website/web/package.json +++ b/website/web/package.json @@ -12,17 +12,17 @@ "check": "astro check" }, "dependencies": { - "@astrojs/mdx": "^7.0.3", + "@astrojs/mdx": "^7.0.5", "@astrojs/sitemap": "^3.7.3", - "astro": "^7.1.3", + "astro": "^7.2.0", "astro-mermaid": "^2.1.0", - "mermaid": "^11.16.0", + "mermaid": "^11.16.1", "pagefind": "^1.5.2" }, "devDependencies": { - "@astrojs/check": "^0.9.9", + "@astrojs/check": "^0.9.10", "typescript": "^6.0.3", - "wrangler": "4.112.0" + "wrangler": "4.120.1" }, "packageManager": "pnpm@11.9.0" } diff --git a/website/web/pnpm-lock.yaml b/website/web/pnpm-lock.yaml index 572c6302b..cb4f5e0ed 100644 --- a/website/web/pnpm-lock.yaml +++ b/website/web/pnpm-lock.yaml @@ -5,122 +5,122 @@ settings: excludeLinksFromLockfile: false overrides: - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/markdown-satteri': 0.3.5 importers: .: dependencies: '@astrojs/mdx': - specifier: ^7.0.3 - version: 7.0.3(@astrojs/markdown-satteri@0.3.4)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.60.4)(yaml@2.9.0)) + specifier: ^7.0.5 + version: 7.0.5(@astrojs/markdown-satteri@0.3.5)(astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(yaml@2.9.0)) '@astrojs/sitemap': specifier: ^3.7.3 version: 3.7.3 astro: - specifier: ^7.1.3 - version: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.60.4)(yaml@2.9.0) + specifier: ^7.2.0 + version: 7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(yaml@2.9.0) astro-mermaid: specifier: ^2.1.0 - version: 2.1.0(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.60.4)(yaml@2.9.0))(mermaid@11.16.0) + version: 2.1.0(astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(yaml@2.9.0))(mermaid@11.16.1) mermaid: - specifier: ^11.16.0 - version: 11.16.0 + specifier: ^11.16.1 + version: 11.16.1 pagefind: specifier: ^1.5.2 version: 1.5.2 devDependencies: '@astrojs/check': - specifier: ^0.9.9 - version: 0.9.9(prettier@3.8.3)(typescript@6.0.3) + specifier: ^0.9.10 + version: 0.9.10(prettier@3.8.3)(typescript@6.0.3) typescript: specifier: ^6.0.3 version: 6.0.3 wrangler: - specifier: 4.112.0 - version: 4.112.0 + specifier: 4.120.1 + version: 4.120.1 packages: '@antfu/install-pkg@1.1.0': resolution: {integrity: sha512-MGQsmw10ZyI+EJo45CdSER4zEb+p31LpDAFp2Z3gkSd1yqVZGi0Ebx++YTEMonJy4oChEMLsxZ64j8FH6sSqtQ==} - '@astrojs/check@0.9.9': - resolution: {integrity: sha512-A5UW8uIuErLWEoRQvzgXpO1gTjUFtK8r7nU2Z7GewAMxUb7bPvpk11qaKKgxqXlHJWlAvaaxy+Xg28A6bmQ1Tg==} + '@astrojs/check@0.9.10': + resolution: {integrity: sha512-zgx/UQMozdjOa3bOxjgeCFdtpE3c9rRX6xHwa+2QXvy8z8Akifu2AtubHyv/zzC2znO8dl8fFWL4K+Ba9kS8HQ==} hasBin: true peerDependencies: typescript: ^5.0.0 || ^6.0.0 - '@astrojs/compiler-binding-darwin-arm64@0.3.1': - resolution: {integrity: sha512-IEmEF2fUIlTHtpeE/isyEGVOB14cEyh/LZOFYt6wn3jNyVpdC8aR5OZ+RzFUR/f+8ZDM1LaMwZKvoA7eMyJeFw==} + '@astrojs/compiler-binding-darwin-arm64@0.3.2': + resolution: {integrity: sha512-MM8tn8CSimcfytaOla4b6acN8mKWiL/rlAA1fpT3/Wl7dNGSE4y8FjTN/zJVNnb63CsLWG5zZwCt01TXtDKh9g==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@astrojs/compiler-binding-darwin-x64@0.3.1': - resolution: {integrity: sha512-GF2kIxjpPDLsn94zbZNMsxEmkU828QqnmM7kiQJnaooS3jmI+I7kk6+oI6EpwOsK3femCMdcm+wmOsEqtGrmjQ==} + '@astrojs/compiler-binding-darwin-x64@0.3.2': + resolution: {integrity: sha512-2lXOlzf8xb7jLomRsf/aswh61/NnGusynB2OwFkK6k4pmOtpfXMYnG0PLfXrEvxXYj69NdCnmUYXtHDd+JOOag==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@astrojs/compiler-binding-linux-arm64-gnu@0.3.1': - resolution: {integrity: sha512-XJL3SDmOtVrqFhCirNcHwE91+IesJqlgNo23I4qW9QUYfwzm/TBZuH61fgqsb1ttgR1mMYz6ooPWs0JDhwMqpQ==} + '@astrojs/compiler-binding-linux-arm64-gnu@0.3.2': + resolution: {integrity: sha512-BmU3kWj7qnLrd4vzm49zFEPJ5oFnn1tCT4Vt9hZbqdU5Cmb8GZl7fn6VFsnNfe7B18a2gIFtVzbLINtYl5kBjQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [glibc] - '@astrojs/compiler-binding-linux-arm64-musl@0.3.1': - resolution: {integrity: sha512-xqE8BVbDoBueK/B47w30PtkVofUWJKGkwoMVE+EOMLf11rnoANxIAdA9FPqY+rng4oNI5ndHGsri1yPj2k8vZQ==} + '@astrojs/compiler-binding-linux-arm64-musl@0.3.2': + resolution: {integrity: sha512-f0heT9ZZEseSu5bHCeb80eL2DH07ArE6U9xi1WT/PEusNjzPmEr3GJsjG1tRLo5VYUUYX7h3ScaqGmGrMOVGmw==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] libc: [musl] - '@astrojs/compiler-binding-linux-x64-gnu@0.3.1': - resolution: {integrity: sha512-1y0StU1qiCuDFH3rmbRJXcxdfHxFPrES1Rd+RLffosvUR7I2cH5SF5SFnBN9vXpzpkmyElZm3Yr47iJBPN7vVA==} + '@astrojs/compiler-binding-linux-x64-gnu@0.3.2': + resolution: {integrity: sha512-M8fOUt0itRpqiGyoEA/ij184s8O+hqbCz3+YozRusOOM3osgGljpDThhbKAJjqh82wOo6FioQ4w8PBvU1XMD5Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [glibc] - '@astrojs/compiler-binding-linux-x64-musl@0.3.1': - resolution: {integrity: sha512-16q0fYf7kpbmdObZEeZJEup8hQv/whgNwVjrSvT8umrKwLDSnNIWiQpm09lQQu6bweZB0XyIvHwlPitvJhC+hg==} + '@astrojs/compiler-binding-linux-x64-musl@0.3.2': + resolution: {integrity: sha512-/Kebk8sO6HnLeSd691JkaAPfN7CqR9/KEXmWvyNPkaKNGmj8rTZ/lf2uXtnPu92Lan84UrKdIKVPy1fSo2encQ==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] libc: [musl] - '@astrojs/compiler-binding-wasm32-wasi@0.3.1': - resolution: {integrity: sha512-cB456shIwDv/PrVT+2QG7LFndpHkVge5HjqADKZgGaAc9JHVktCtjSrcdkRQ+3tbkPazNKaTLRjXLIiz2NIx9g==} + '@astrojs/compiler-binding-wasm32-wasi@0.3.2': + resolution: {integrity: sha512-pUA6xbcOSB7DhfzIArB8BCAkFfAIqriiR7zl5zOStd6oU2G0kIKj+GUdGnyXyhfiv881Hffyk5tC0mR18sDjDw==} engines: {node: '>=14.0.0'} cpu: [wasm32] - '@astrojs/compiler-binding-win32-arm64-msvc@0.3.1': - resolution: {integrity: sha512-ur/9+If/yTE69mmeX5MqSZndL0HOyx67GeNZUy3N7wVdWpLz9UTJXwyWS4UR2PUQHitghjsM5xoX0Ge56WRVQQ==} + '@astrojs/compiler-binding-win32-arm64-msvc@0.3.2': + resolution: {integrity: sha512-ESruf+6Qkl1trHUFxI6GSf6t52j8yN2kCNSzMWdzt7V/T09tFHrYzrVaJQohb2C9bJUH76pNvX6Zb51+xCQc9Q==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [win32] - '@astrojs/compiler-binding-win32-x64-msvc@0.3.1': - resolution: {integrity: sha512-k0W+kDBzDkNZOqu4kElDvCOIbKw5Ut9S1WZ1Krj3KTgNuBERNKXsMMsRLLcbgfdMdbe7bTekQLshZrrvmYpmwA==} + '@astrojs/compiler-binding-win32-x64-msvc@0.3.2': + resolution: {integrity: sha512-wzzVrEbOwbsLWOdEbocskjMRx2aZPxJ7ZbmL+jnpBamFwmigm+2M/wzuM6JWncocgYwLic1csSpalBh96kQKXA==} engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@astrojs/compiler-binding@0.3.1': - resolution: {integrity: sha512-DaAUj29AIBU2XdJ8uwcab8lW5O2pk9pY8AXkcMw0sw77nVa3oeTYRcO+Dvbbpoexf6ThMc0FMWYCQ/wN1/T7oQ==} + '@astrojs/compiler-binding@0.3.2': + resolution: {integrity: sha512-8w/9CWmYrAJJ8N0SY3O43ws2BgxoW6u3QsD8u2mE140lMYAlwh+tlNoUeSBq22wVheFuiBbR212l6ixZ2IIgCQ==} engines: {node: ^20.19.0 || >=22.12.0} - '@astrojs/compiler-rs@0.3.1': - resolution: {integrity: sha512-aT7xkgsbNoS6nriY5qKpbihK43slFHO41iqgHCTdOvn1ifaQxLCc5yXy+6GzAtiafoaC1zA7OwVXCXMsvUZOkg==} + '@astrojs/compiler-rs@0.3.2': + resolution: {integrity: sha512-xlx/T7JovIKduu4ucbTQUxQ5+Q8wxkHxhLjnZk3VlJbhbQ9RLvvuDk1p2YYFYFQ5y14dVm3FGGO4isQXa4F+Tg==} engines: {node: '>=22.12.0'} '@astrojs/compiler@2.13.1': resolution: {integrity: sha512-f3FN83d2G/v32ipNClRKgYv30onQlMZX1vCeZMjPsMMPl1mDpmbl0+N5BYo4S/ofzqJyS5hvwacEo0CCVDn/Qg==} - '@astrojs/internal-helpers@0.10.1': - resolution: {integrity: sha512-5phcroT/vmOOrYuuAxtkbPixy5hePtlz9i8K4OeDv3dNK6/UQRuXPOSRTxIOBbUY5Sonw2UaxjbuVc43Mcir6Q==} + '@astrojs/internal-helpers@0.10.2': + resolution: {integrity: sha512-yt7fMgPYqSM4Tmr+taTW6Per+hjJ8Pk6lA1PAcDyqzOt8HzJ6Kje5WzCxA2Sd+9wsUW7uhkLeoTMK0cXPwH9rQ==} '@astrojs/language-server@2.16.9': resolution: {integrity: sha512-L9kddTg+ZSO3X0Pwfx0ZPO+Z+eSSq0/39jXRyIkHzcBICzusdn2T464R4P6K0WcDZ6pMkLlFpuGS73u1pOnMSw==} @@ -134,17 +134,17 @@ packages: prettier-plugin-astro: optional: true - '@astrojs/markdown-remark@7.2.1': - resolution: {integrity: sha512-jPVNIqTvk+yKviikszv/Y1U4jGUSKpp/Nw48QZV4qjWgp70j4Lkq3lhSDRbWwCfgKvEyO9GHuVbV1dM2WYXy1w==} + '@astrojs/markdown-remark@7.2.2': + resolution: {integrity: sha512-FGfmK84zSNcrsBd0dl1gXE9JvZYElp8EXQa2jpHVAxG4deGKAp43wspxFupjADJX7MSsMRHwYCnfT6EyVmgeFQ==} - '@astrojs/markdown-satteri@0.3.4': - resolution: {integrity: sha512-6Lvt/bQZEBW+zzdhPblvfZEy5PGEYJaUsUqaCgwHeRPxZJL1gc9I+DRLKWJjjYTWDzVUTzXlMq4WwSK+X34CVw==} + '@astrojs/markdown-satteri@0.3.5': + resolution: {integrity: sha512-CvWVEFAbay7YO+i9SaqDJubipA5ckiVB89QWoMJ5XC0m5CtFg8JwZ7Kau6X9sYY7FZURH0w2l03ISH2jOS/RDQ==} - '@astrojs/mdx@7.0.3': - resolution: {integrity: sha512-RxyIwU0uFam5ftwqKOjpIdhnFxZ/kEikeimLyQy3eGXbHT8WgRGzzesOIHVU8+m9TY8ag5WVOyvV24/GyqPdPQ==} + '@astrojs/mdx@7.0.5': + resolution: {integrity: sha512-wEM/HH1RiEntyPVagdiF+yArzfcYLKBB0C1RZspVidKZ97rRMbaqP1Nbl/GR0sJs8zwaceqxRymw8aOKKJRdYw==} engines: {node: '>=22.12.0'} peerDependencies: - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/markdown-satteri': 0.3.5 astro: ^7.0.0 peerDependenciesMeta: '@astrojs/markdown-satteri': @@ -261,32 +261,32 @@ packages: workerd: optional: true - '@cloudflare/workerd-darwin-64@1.20260714.1': - resolution: {integrity: sha512-ZWXqAN8G7Cx9hMRQuk+59ziJhR3j1F4iO+Qs8aHdfKZ3Dq5Yi/57xvkJTgCGBnW1YU/L78r8f6HEy51bwbTpNw==} + '@cloudflare/workerd-darwin-64@1.20260804.1': + resolution: {integrity: sha512-191/PPEFicRK2wK69eXzSjnLgHL79k7zR2VUpyIr8rhFgGns1b5bTHgnBuUrgU2LPbEtwbE5eL2hJ0uhLAFEow==} engines: {node: '>=16'} cpu: [x64] os: [darwin] - '@cloudflare/workerd-darwin-arm64@1.20260714.1': - resolution: {integrity: sha512-tueWxWC3wyCbMG6zRAxsMXX0YLgrRWbiAPYFQ2uJ7dUH8G+5E7UTWaQS9B1HdJ0bpKFW1NWxhs1o2noKVFSUYg==} + '@cloudflare/workerd-darwin-arm64@1.20260804.1': + resolution: {integrity: sha512-aI2cAFLsrNkSz3kLSQrgrO9ICTfY7jb2h0jgaWDE9mQLQQDfpXeYrKWt07tTgMmeNP79o9w3NZe3aqtt8mTGHQ==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] - '@cloudflare/workerd-linux-64@1.20260714.1': - resolution: {integrity: sha512-1VChTZRb0l0F7R4e1G5RtLKV4oFi6x+rQgxh2+yu887j3l/3TLgatuv1L8/5zhc9gKEhATTxOh0e52Rtd9dDWQ==} + '@cloudflare/workerd-linux-64@1.20260804.1': + resolution: {integrity: sha512-KBCjxBIlN2jucfQGaTK4EgmPsWzQgYR/zYhPfi3mkWwdoTyG1dgrt2aizKps/SYse85ci/SOxojKk0/K7vstPw==} engines: {node: '>=16'} cpu: [x64] os: [linux] - '@cloudflare/workerd-linux-arm64@1.20260714.1': - resolution: {integrity: sha512-rMm3G+NirG2UdgHIRDdF1asNC6FqgIzZzkRG+VDhhDGcVxAQwvrMT1E38BivEvHr3G04MB4AfhcOczX0+GtRkQ==} + '@cloudflare/workerd-linux-arm64@1.20260804.1': + resolution: {integrity: sha512-7lswfarBZ7xkHpTFrNb74ExwOltIalVaASc+GOYfCNtnwFxK/JZSVByfm/hnZEBtrHU7fMY2z7dYT64rwS0pHg==} engines: {node: '>=16'} cpu: [arm64] os: [linux] - '@cloudflare/workerd-windows-64@1.20260714.1': - resolution: {integrity: sha512-cGqnU3Hg2YZS/k3SAqrMp1DjpdsyFde72tWltdl6ZT9+SFz/Zrk/8gyTU1TcxC4YApXeNVH5TyU5cOGPgUJ0pg==} + '@cloudflare/workerd-windows-64@1.20260804.1': + resolution: {integrity: sha512-GOgRWYtxISN5rAWfx3K7zubt3xEn0/ZPFrbcLL+GwT4ouCKyNoHqfT1cPNB6Nx7t8BHEjnuTG7gkHO4Wd5ORdg==} engines: {node: '>=16'} cpu: [x64] os: [win32] @@ -497,70 +497,145 @@ packages: cpu: [arm64] os: [darwin] + '@img/sharp-darwin-arm64@0.35.2': + resolution: {integrity: sha512-eEieHsMksAW4IiO5NzauESRl2D2qz3J/kwUxUrSfV06A93eEaRfMpHXyUb1mAqrR7i8U9A0GRqE9pjn6u1Jjpg==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [darwin] + '@img/sharp-darwin-x64@0.34.5': resolution: {integrity: sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [darwin] + '@img/sharp-darwin-x64@0.35.2': + resolution: {integrity: sha512-BaktuGPCeHJMARpodR8jK4uKiZrPAy9WrfQW0sdI37clracq8Bp01AYS3SZgi5FS/y5twa9t4+LIuuxQjqRrWw==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [darwin] + + '@img/sharp-freebsd-wasm32@0.35.2': + resolution: {integrity: sha512-YoAxdnd8hPUkvLHd3bWY+YA8nw3xM/RyRopYucNsWHVSan8NLVM3X2volsfoRDcXdUJPg6tXahSd7HXPK7lRnw==} + engines: {node: '>=20.9.0'} + os: [freebsd] + '@img/sharp-libvips-darwin-arm64@1.2.4': resolution: {integrity: sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==} cpu: [arm64] os: [darwin] + '@img/sharp-libvips-darwin-arm64@1.3.1': + resolution: {integrity: sha512-4V/M3roRMTYjiwZY9IOVQOE8OyeCxFAkYmyZDrZl51uOKjibm3oeEJ4WAmLxutAfzFbC9jqUiPs2gbnGflH+7g==} + cpu: [arm64] + os: [darwin] + '@img/sharp-libvips-darwin-x64@1.2.4': resolution: {integrity: sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==} cpu: [x64] os: [darwin] + '@img/sharp-libvips-darwin-x64@1.3.1': + resolution: {integrity: sha512-c0/DxItpJv2+dGhgycJBBgotdqruGYDvA79drdh0MD1dFpy7JzJ/PlXwi1H4rFf0eTy8tgbI91aHDnZIceY3jQ==} + cpu: [x64] + os: [darwin] + '@img/sharp-libvips-linux-arm64@1.2.4': resolution: {integrity: sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==} cpu: [arm64] os: [linux] libc: [glibc] + '@img/sharp-libvips-linux-arm64@1.3.1': + resolution: {integrity: sha512-JznefmcK9j1JKPz8AkQDh89kjojubyfOasWBPKfzMIhPwsgDy9evpE/naJTXXXmghS1iFwR8u/kTwh/I2/+GCw==} + cpu: [arm64] + os: [linux] + libc: [glibc] + '@img/sharp-libvips-linux-arm@1.2.4': resolution: {integrity: sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==} cpu: [arm] os: [linux] libc: [glibc] + '@img/sharp-libvips-linux-arm@1.3.1': + resolution: {integrity: sha512-aGGy9aWzXgHBG7HNyQPWorZthlp7+x6fDRoPAQbGO3ThcttuTyKIx3NuSHb6zb4gBNq6/yNn9f1cy9nFKS/Vmg==} + cpu: [arm] + os: [linux] + libc: [glibc] + '@img/sharp-libvips-linux-ppc64@1.2.4': resolution: {integrity: sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==} cpu: [ppc64] os: [linux] libc: [glibc] + '@img/sharp-libvips-linux-ppc64@1.3.1': + resolution: {integrity: sha512-1EkwGNCZk6iWNCMWqrvdJ+r1j0PT1zIz60CNPhYnJlK/zyeWqlsPZIe+ocBVqPF8k/Ssee/NCk+tE9Ryrko6ng==} + cpu: [ppc64] + os: [linux] + libc: [glibc] + '@img/sharp-libvips-linux-riscv64@1.2.4': resolution: {integrity: sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==} cpu: [riscv64] os: [linux] libc: [glibc] + '@img/sharp-libvips-linux-riscv64@1.3.1': + resolution: {integrity: sha512-Ilays+w2bXdnxzxtQdmXR62u8o8GYa3eL4+Gr+1KiE4xperMZUslRaVPJwwPkzlHEjGfXAfRVAa/7CYCtSqsBw==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + '@img/sharp-libvips-linux-s390x@1.2.4': resolution: {integrity: sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==} cpu: [s390x] os: [linux] libc: [glibc] + '@img/sharp-libvips-linux-s390x@1.3.1': + resolution: {integrity: sha512-VfBwVHQTbRoj4XlpA/KLZ7ltgMpz+4WSejFzQ+GnoImjo1PtEJ59QB2qR1xQEeRPYIkNrPIm2L4cICMvz4C2ew==} + cpu: [s390x] + os: [linux] + libc: [glibc] + '@img/sharp-libvips-linux-x64@1.2.4': resolution: {integrity: sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==} cpu: [x64] os: [linux] libc: [glibc] + '@img/sharp-libvips-linux-x64@1.3.1': + resolution: {integrity: sha512-+c8ukgwU62DS54nCAjw7keOfHUkmr0B5QHEdcOqRnodF/MNXJbVI8Eopoj4B/0H8Asr65I+A4Amrn7a85/md6A==} + cpu: [x64] + os: [linux] + libc: [glibc] + '@img/sharp-libvips-linuxmusl-arm64@1.2.4': resolution: {integrity: sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==} cpu: [arm64] os: [linux] libc: [musl] + '@img/sharp-libvips-linuxmusl-arm64@1.3.1': + resolution: {integrity: sha512-qlKb/pwbkAi1WMsJrYHk7CuDrd12s27U2QnRhFYUoJNrRCmkosMTttuRFat/DDB3IlDm5qE1TJgZ4JDnHX8Ldw==} + cpu: [arm64] + os: [linux] + libc: [musl] + '@img/sharp-libvips-linuxmusl-x64@1.2.4': resolution: {integrity: sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==} cpu: [x64] os: [linux] libc: [musl] + '@img/sharp-libvips-linuxmusl-x64@1.3.1': + resolution: {integrity: sha512-yO21HwoUVLN8Qa+/SBjQLMYwBWAVJjeGPNe+hc0OUeMeifEtJqu5a1c4HayE1nNpDih9y3/KkoltfkDodmKAlg==} + cpu: [x64] + os: [linux] + libc: [musl] + '@img/sharp-linux-arm64@0.34.5': resolution: {integrity: sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -568,6 +643,13 @@ packages: os: [linux] libc: [glibc] + '@img/sharp-linux-arm64@0.35.2': + resolution: {integrity: sha512-af12Pnd0ZGu2HfP8NayB0kk6eC/lrfbQE6HlR4jD+34wdJ1Vw9TF6TMn6ZvffT+WgqVsl0hRbmNvz2u/23VmwA==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] + '@img/sharp-linux-arm@0.34.5': resolution: {integrity: sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -575,6 +657,13 @@ packages: os: [linux] libc: [glibc] + '@img/sharp-linux-arm@0.35.2': + resolution: {integrity: sha512-SE4kzF2mepn6z+6E7L6lsV8FzuLL6IPQdyX8ZiwROAG/G8td+hP/m7FsFPwidtrF19gvajuC9l6TxAVcsA4S7A==} + engines: {node: '>=20.9.0'} + cpu: [arm] + os: [linux] + libc: [glibc] + '@img/sharp-linux-ppc64@0.34.5': resolution: {integrity: sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -582,6 +671,13 @@ packages: os: [linux] libc: [glibc] + '@img/sharp-linux-ppc64@0.35.2': + resolution: {integrity: sha512-hYSBm7zcNtDCozCxQHYZJiu63b/bXsgRZuOxCIBZsStMM9Vap47iFHdbX4kCvQsblPB/k+clhELpdQJHQLSHvg==} + engines: {node: '>=20.9.0'} + cpu: [ppc64] + os: [linux] + libc: [glibc] + '@img/sharp-linux-riscv64@0.34.5': resolution: {integrity: sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -589,6 +685,13 @@ packages: os: [linux] libc: [glibc] + '@img/sharp-linux-riscv64@0.35.2': + resolution: {integrity: sha512-qQt0Kc13+Hoan/Awq/qMSQw3L+RI1NCRPgD5cUJ/1WSSmIoysLOc72jlRM3E0OHN9Yr313jgeQ2T+zW+F03QFA==} + engines: {node: '>=20.9.0'} + cpu: [riscv64] + os: [linux] + libc: [glibc] + '@img/sharp-linux-s390x@0.34.5': resolution: {integrity: sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -596,6 +699,13 @@ packages: os: [linux] libc: [glibc] + '@img/sharp-linux-s390x@0.35.2': + resolution: {integrity: sha512-E4fLLfRPzDLlEeDaTzI98OFLcv++WL5ChLLMwPoVd0CIoZQqupBSNbOisPL5am9XsbQ9T84+iiMpUvbFtkunbA==} + engines: {node: '>=20.9.0'} + cpu: [s390x] + os: [linux] + libc: [glibc] + '@img/sharp-linux-x64@0.34.5': resolution: {integrity: sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -603,6 +713,13 @@ packages: os: [linux] libc: [glibc] + '@img/sharp-linux-x64@0.35.2': + resolution: {integrity: sha512-gi0zFJJRLswfCZmHtJdikXPOc5u7qamSOS3NHedLqLd4W8Q0NqjdBr6TTRIgsfFjqfTsHFgdfvJ9LwqSgcHiAA==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [linux] + libc: [glibc] + '@img/sharp-linuxmusl-arm64@0.34.5': resolution: {integrity: sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -610,6 +727,13 @@ packages: os: [linux] libc: [musl] + '@img/sharp-linuxmusl-arm64@0.35.2': + resolution: {integrity: sha512-siWbOW1u6HFnFLrp0waKyW7VEf7jYvcDWdrXEFa8AkdAQgEvuu5Fz8/Y70w9EeqAdwDtfU012BhEHHaDqvQNzg==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [linux] + libc: [musl] + '@img/sharp-linuxmusl-x64@0.34.5': resolution: {integrity: sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} @@ -617,29 +741,63 @@ packages: os: [linux] libc: [musl] + '@img/sharp-linuxmusl-x64@0.35.2': + resolution: {integrity: sha512-YBqMMcjDi4QGYiSn4vNOYBhmlC4z5AXqkOUUqI2e0AFA4urNv4ESgOgwNl3K+4etQhha0twXlzeF20bbULm9Yg==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [linux] + libc: [musl] + '@img/sharp-wasm32@0.34.5': resolution: {integrity: sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [wasm32] + '@img/sharp-wasm32@0.35.2': + resolution: {integrity: sha512-Mrv4JQNYVQ94xH+jzZ9r+gowleN8mv2FTgKT+PI6bx5C0G8TdNYndu161pg2i7uoBwxy2ImPMHrJOM2LZef7Bw==} + engines: {node: '>=20.9.0'} + + '@img/sharp-webcontainers-wasm32@0.35.2': + resolution: {integrity: sha512-QNV27pxs9wpApEiCfvHM1RDoP1w1+2KrUWWDPEhEwg+latvOrfuhWrHWZKwdSFwU6jh3myjw/yOCRsUIuOft3g==} + engines: {node: '>=20.9.0'} + cpu: [wasm32] + '@img/sharp-win32-arm64@0.34.5': resolution: {integrity: sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [arm64] os: [win32] + '@img/sharp-win32-arm64@0.35.2': + resolution: {integrity: sha512-BiVRYc/t6/Vl3e1hBx0hugG4oN9Pydf4fgMSpxTQJmwGUg/YoXTWHiFeRymHfCZzifxu4F4rpk/I67D0LQ20wQ==} + engines: {node: '>=20.9.0'} + cpu: [arm64] + os: [win32] + '@img/sharp-win32-ia32@0.34.5': resolution: {integrity: sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [ia32] os: [win32] + '@img/sharp-win32-ia32@0.35.2': + resolution: {integrity: sha512-YYEhx9PImCC7T0tI8JDMi4DB9LwLCXCU5OWNYEXAxh5Q1ShKkyC6byxzoBJ3gEFDnH2lQckWuDe70G7mB2XJog==} + engines: {node: ^20.9.0} + cpu: [ia32] + os: [win32] + '@img/sharp-win32-x64@0.34.5': resolution: {integrity: sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} cpu: [x64] os: [win32] + '@img/sharp-win32-x64@0.35.2': + resolution: {integrity: sha512-imoOyBcoM/iiUr4J6VPpCNjPnjvP/Gks95898yB8YqoGGYmHYbOyCuNv9FMhFgtaiHFGbHW8bxKqRV6VjtXThQ==} + engines: {node: '>=20.9.0'} + cpu: [x64] + os: [win32] + '@jridgewell/resolve-uri@3.1.2': resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} engines: {node: '>=6.0.0'} @@ -662,6 +820,13 @@ packages: '@emnapi/core': ^1.7.1 '@emnapi/runtime': ^1.7.1 + '@napi-rs/wasm-runtime@1.2.2': + resolution: {integrity: sha512-JfB4kuJQjaoHuCTseIINHtHWeJnvgEcxjwA5t/Y00ZgaOO1Crz3fjT/p8kT28zA/Caz7oiUMn3d6H2yOVCVwuw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=23.5.0} + peerDependencies: + '@emnapi/core': ^1.7.1 || ^2.0.0-alpha.3 + '@emnapi/runtime': ^1.7.1 || ^2.0.0-alpha.3 + '@oslojs/encoding@1.1.0': resolution: {integrity: sha512-70wQhgYmndg4GCPxPPxPGevRKqTIJ2Nh4OkiMWmDAVYsTQ+Ta7Sq+rPevXyXGdzr30/qZBnyOalCszoMxlyldQ==} @@ -810,153 +975,6 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} - '@rollup/pluginutils@5.3.0': - resolution: {integrity: sha512-5EdhGZtnu3V88ces7s53hhfK5KSASnJZv8Lulpc04cWO3REESroJXg73DFsOmgbU2BhwV0E20bu2IDZb3VKW4Q==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - - '@rollup/rollup-android-arm-eabi@4.60.4': - resolution: {integrity: sha512-F5QXMSiFebS9hKZj02XhWLLnRpJ3B3AROP0tWbFBSj+6kCbg5m9j5JoHKd4mmSVy5mS/IMQloYgYxCuJC0fxEQ==} - cpu: [arm] - os: [android] - - '@rollup/rollup-android-arm64@4.60.4': - resolution: {integrity: sha512-GxxTKApUpzRhof7poWvCJHRF51C67u1R7D6DiluBE8wKU1u5GWE8t+v81JvJYtbawoBFX1hLv5Ei4eVjkWokaw==} - cpu: [arm64] - os: [android] - - '@rollup/rollup-darwin-arm64@4.60.4': - resolution: {integrity: sha512-tua0TaJxMOB1R0V0RS1jFZ/RpURFDJIOR2A6jWwQeawuFyS4gBW+rntLRaQd0EQ4bd6Vp44Z2rXW+YYDBsj6IA==} - cpu: [arm64] - os: [darwin] - - '@rollup/rollup-darwin-x64@4.60.4': - resolution: {integrity: sha512-CSKq7MsP+5PFIcydhAiR1K0UhEI1A2jWXVKHPCBZ151yOutENwvnPocgVHkivu2kviURtCEB6zUQw0vs8RrhMg==} - cpu: [x64] - os: [darwin] - - '@rollup/rollup-freebsd-arm64@4.60.4': - resolution: {integrity: sha512-+O8OkVdyvXMtJEciu2wS/pzm1IxntEEQx3z5TAVy4l32G0etZn+RsA48ARRrFm6Ri8fvqPQfgrvNxSjKAbnd3g==} - cpu: [arm64] - os: [freebsd] - - '@rollup/rollup-freebsd-x64@4.60.4': - resolution: {integrity: sha512-Iw3oMskH3AfNuhU0MSN7vNbdi4me/NiYo2azqPz/Le16zHSa+3RRmliCMWWQmh4lcndccU40xcJuTYJZxNo/lw==} - cpu: [x64] - os: [freebsd] - - '@rollup/rollup-linux-arm-gnueabihf@4.60.4': - resolution: {integrity: sha512-EIPRXTVQpHyF8WOo219AD2yEltPehLTcTMz2fn6JsatLYSzQf00hj3rulF+yauOlF9/FtM2WpkT/hJh/KJFGhA==} - cpu: [arm] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-arm-musleabihf@4.60.4': - resolution: {integrity: sha512-J3Yh9PzzF1Ovah2At+lHiGQdsYgArxBbXv/zHfSyaiFQEqvNv7DcW98pCrmdjCZBrqBiKrKKe2V+aaSGWuBe/w==} - cpu: [arm] - os: [linux] - libc: [musl] - - '@rollup/rollup-linux-arm64-gnu@4.60.4': - resolution: {integrity: sha512-BFDEZMYfUvLn37ONE1yMBojPxnMlTFsdyNoqncT0qFq1mAfllL+ATMMJd8TeuVMiX84s1KbcxcZbXInmcO2mRg==} - cpu: [arm64] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-arm64-musl@4.60.4': - resolution: {integrity: sha512-pc9EYOSlOgdQ2uPl1o9PF6/kLSgaUosia7gOuS8mB69IxJvlclko1MECXysjs5ryez1/5zjYqx3+xYU0TU6R1A==} - cpu: [arm64] - os: [linux] - libc: [musl] - - '@rollup/rollup-linux-loong64-gnu@4.60.4': - resolution: {integrity: sha512-NxnomyxYerDh5n4iLrNa+sH+Z+U4BMEE46V2PgQ/hoB909i8gV1M5wPojWg9fk1jWpO3IQnOs20K4wyZuFLEFQ==} - cpu: [loong64] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-loong64-musl@4.60.4': - resolution: {integrity: sha512-nbJnQ8a3z1mtmrwImCYhc6BGpThAyYVRQxw9uKSKG4wR6aAYno9sVjJ0zaZcW9BPJX1GbrDPf+SvdWjgTuDmnw==} - cpu: [loong64] - os: [linux] - libc: [musl] - - '@rollup/rollup-linux-ppc64-gnu@4.60.4': - resolution: {integrity: sha512-2EU6acNrQLd8tYvo/LXW535wupT3m6fo7HKo6lr7ktQoItxTyOL1ZCR/GfGCuXl2vR+zmfI6eRXkSemafv+iVg==} - cpu: [ppc64] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-ppc64-musl@4.60.4': - resolution: {integrity: sha512-WeBtoMuaMxiiIrO2IYP3xs6GMWkJP2C0EoT8beTLkUPmzV1i/UcOSVw1d5r9KBODtHKilG5yFxsGRnBbK3wJ4A==} - cpu: [ppc64] - os: [linux] - libc: [musl] - - '@rollup/rollup-linux-riscv64-gnu@4.60.4': - resolution: {integrity: sha512-FJHFfqpKUI3A10WrWKiFbBZ7yVbGT4q4B5o1qKFFojqpaYoh9LrQgqWCmmcxQzVSXYtyB5bzkXrYzlHTs21MYA==} - cpu: [riscv64] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-riscv64-musl@4.60.4': - resolution: {integrity: sha512-mcEl6CUT5IAUmQf1m9FYSmVqCJlpQ8r8eyftFUHG8i9OhY7BkBXSUdnLH5DOf0wCOjcP9v/QO93zpmF1SptCCw==} - cpu: [riscv64] - os: [linux] - libc: [musl] - - '@rollup/rollup-linux-s390x-gnu@4.60.4': - resolution: {integrity: sha512-ynt3JxVd2w2buzoKDWIyiV1pJW93xlQic1THVLXilz429oijRpSHivZAgp65KBu+cMcgf1eVVjdnTLvPxgCuoQ==} - cpu: [s390x] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-x64-gnu@4.60.4': - resolution: {integrity: sha512-Boiz5+MsaROEWDf+GGEwF8VMHGhlUoQMtIPjOgA5fv4osupqTVnJteQNKJwUcnUog2G55jYXH7KZFFiJe0TEzQ==} - cpu: [x64] - os: [linux] - libc: [glibc] - - '@rollup/rollup-linux-x64-musl@4.60.4': - resolution: {integrity: sha512-+qfSY27qIrFfI/Hom04KYFw3GKZSGU4lXus51wsb5EuySfFlWRwjkKWoE9emgRw/ukoT4Udsj4W/+xxG8VbPKg==} - cpu: [x64] - os: [linux] - libc: [musl] - - '@rollup/rollup-openbsd-x64@4.60.4': - resolution: {integrity: sha512-VpTfOPHgVXEBeeR8hZ2O0F3aSso+JDWqTWmTmzcQKted54IAdUVbxE+j/MVxUsKa8L20HJhv3vUezVPoquqWjA==} - cpu: [x64] - os: [openbsd] - - '@rollup/rollup-openharmony-arm64@4.60.4': - resolution: {integrity: sha512-IPOsh5aRYuLv/nkU51X10Bf75Bsf6+gZdx1X+QP5QM6lIJFHHqbHLG0uJn/hWthzo13UAc2umiUorqZy3axoZg==} - cpu: [arm64] - os: [openharmony] - - '@rollup/rollup-win32-arm64-msvc@4.60.4': - resolution: {integrity: sha512-4QzE9E81OohJ/HKzHhsqU+zcYYojVOXlFMs1DdyMT6qXl/niOH7AVElmmEdUNHHS/oRkc++d5k6Vy85zFs0DEw==} - cpu: [arm64] - os: [win32] - - '@rollup/rollup-win32-ia32-msvc@4.60.4': - resolution: {integrity: sha512-zTPgT1YuHHcd+Tmx7h8aml0FWFVelV5N54oHow9SLj+GfoDy/huQ+UV396N/C7KpMDMiPspRktzM1/0r1usYEA==} - cpu: [ia32] - os: [win32] - - '@rollup/rollup-win32-x64-gnu@4.60.4': - resolution: {integrity: sha512-DRS4G7mi9lJxqEDezIkKCaUIKCrLUUDCUaCsTPCi/rtqaC6D/jjwslMQyiDU50Ka0JKpeXeRBFBAXwArY52vBw==} - cpu: [x64] - os: [win32] - - '@rollup/rollup-win32-x64-msvc@4.60.4': - resolution: {integrity: sha512-QVTUovf40zgTqlFVrKA1uXMVvU2QWEFWfAH8Wdc48IxLvrJMQVMBRjuQyUpzZCDkakImib9eVazbWlC6ksWtJw==} - cpu: [x64] - os: [win32] - '@shikijs/core@4.0.2': resolution: {integrity: sha512-hxT0YF4ExEqB8G/qFdtJvpmHXBYJ2lWW7qTHDarVkIudPFE6iCIrqdgWxGn5s+ppkGXI0aEGlibI0PAyzP3zlw==} engines: {node: '>=20'} @@ -1097,9 +1115,6 @@ packages: '@types/estree-jsx@1.0.5': resolution: {integrity: sha512-52CcUVNFyfb1A2ALocQw/Dd1BQFNmSdkuC3BkZ6iqhdMfQz7JWOFRuJFloOzjk+6WijU56m9oKXFAXc7o3Towg==} - '@types/estree@1.0.8': - resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} - '@types/estree@1.0.9': resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} @@ -1193,13 +1208,13 @@ packages: resolution: {integrity: sha512-MxT4XZL7pzLHpuvhDKdMaQHMGGkJDLluKBLsbstn+8wv9sWcFT6h+0ve9qkml95amVTZtZV83gQe2hY+ojgHLg==} hasBin: true - ansi-regex@5.0.1: - resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} - engines: {node: '>=8'} + ansi-regex@6.2.2: + resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} + engines: {node: '>=12'} - ansi-styles@4.3.0: - resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} - engines: {node: '>=8'} + ansi-styles@6.2.3: + resolution: {integrity: sha512-4Dj6M28JB+oAH8kFkTLUo+a2jwOFkuqb3yucU0CANcRRUbxS0cP0nZYCGjcc3BNXwRIsUVmDGgzawme7zvJHvg==} + engines: {node: '>=12'} anymatch@3.1.3: resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} @@ -1232,12 +1247,12 @@ packages: '@mermaid-js/layout-elk': optional: true - astro@7.1.3: - resolution: {integrity: sha512-4dhPyAAXthf3xLEYnG8SeL7yr/nTPPABfY7e9YF0yuO+vK9Xp+8Q5j4xzsmL3GueukQv4oNwGNTBepLOiDGeJA==} + astro@7.2.0: + resolution: {integrity: sha512-lLTYzx3fOvCmtwD3JVBLQcbORbIOW1/j0R+3IvJx/XKwMGrk7mFnF0BYSOeRiNw1qHUR5mdA6+hRnyvyDfqrWQ==} engines: {node: '>=22.12.0', npm: '>=9.6.5', pnpm: '>=7.1.0'} hasBin: true peerDependencies: - '@astrojs/markdown-remark': 7.2.1 + '@astrojs/markdown-remark': 7.2.2 peerDependenciesMeta: '@astrojs/markdown-remark': optional: true @@ -1282,9 +1297,9 @@ packages: resolution: {integrity: sha512-77PSwercCZU2Fc4sX94eF8k8Pxte6JAwL4/ICZLFjJLqegs7kCuAsqqj/70NQF6TvDpgFjkubQB2FW2ZZddvQg==} engines: {node: '>=8'} - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} + cliui@9.0.1: + resolution: {integrity: sha512-k7ndgKhwoQveBL+/1tqGJYNz097I7WOvwbmmU2AR5+magtbjPWQTS1C5vzGkBC8Ym8UWRzfKUzUUqFLypY4Q+w==} + engines: {node: '>=20'} clsx@2.1.1: resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} @@ -1293,13 +1308,6 @@ packages: collapse-white-space@2.1.0: resolution: {integrity: sha512-loKTxY1zCOuG4j9f6EPnuyyYkf58RnhhWTvRoZEokgB+WbdXehfjFviyOVYkqzEWz1Q5kRiZdBYS5SwxbQYwzw==} - color-convert@2.0.1: - resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} - engines: {node: '>=7.0.0'} - - color-name@1.1.4: - resolution: {integrity: sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==} - comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} @@ -1579,8 +1587,8 @@ packages: emmet@2.4.11: resolution: {integrity: sha512-23QPJB3moh/U9sT4rQzGgeyyGIrcM+GH5uVYg2C6wZIxAIJq7Ng3QLT79tl8FUwDXhyq9SusfknOrofAKqvgyQ==} - emoji-regex@8.0.0: - resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + emoji-regex@10.6.0: + resolution: {integrity: sha512-toUI84YS5YmxW219erniWD0CIVOo46xGKColeNQRgOzDorgBi1v4D71/OFzgD9GO2UGKIv1C3Sp8DAn0+j5w7A==} entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} @@ -1636,9 +1644,6 @@ packages: estree-util-visit@2.0.0: resolution: {integrity: sha512-m5KgiH85xAhhW8Wta0vShLcUvOsh3LLPI2YVwcbio1l7E09NTLL1EyMZFM1OyWowoH0skScNbhOPl4kcBgzTww==} - estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} @@ -1692,6 +1697,10 @@ packages: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} + get-east-asian-width@1.6.0: + resolution: {integrity: sha512-QRbvDIbx6YklUe6RxeTeleMR0yv3cYH6PsPZHcnVn7xv7zO1BHN8r0XETu8n6Ye3Q+ahtSarc3WgtNWmehIBfA==} + engines: {node: '>=18'} + get-tsconfig@5.0.0-beta.4: resolution: {integrity: sha512-7nF7C9fIPFEMHgEMEfgIlO9wDdZ8CyHw27rWciFZfHvHDReIiPhsYuzPRXsfvBCqFy1l8RRyyWV7QLM+ZhUJsQ==} engines: {node: '>=20.20.0'} @@ -1784,10 +1793,6 @@ packages: engines: {node: '>=20'} hasBin: true - is-fullwidth-code-point@3.0.0: - resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} - engines: {node: '>=8'} - is-hexadecimal@2.0.1: resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} @@ -1795,8 +1800,8 @@ packages: resolution: {integrity: sha512-+Pgi+vMuUNkJyExiMBt5IlFoMyKnr5zhJ4Uspz58WOhBF5QoIZkFyNHIbBAtHwzVAgk5RtndVNsDRN61/mmDqg==} engines: {node: '>=12'} - js-yaml@4.1.1: - resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} + js-yaml@4.3.1: + resolution: {integrity: sha512-CY6crGq313MX8GkwvB7tzgp99vjQxY1++5y10/BKN/GUfHqWaOGQMNZkBvqSzsZKWk/ijwHlWzzkLulsGHhjWQ==} hasBin: true json-schema-traverse@1.0.0: @@ -1909,8 +1914,8 @@ packages: resolution: {integrity: sha512-W+R+kFL4HgVxONq2bhXPi3bGpzGe/yEhVOp233qw9wCRtgncJ15P3bC+e4zZMu4Cq7d+WAJjXGW0uUkifhcatA==} engines: {node: 20 || >=22} - magic-string@0.30.21: - resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + magic-string@1.1.0: + resolution: {integrity: sha512-kS3VHe0nEPST2saQV4Rbkchcd3UBRkVTQHo1D3h/ZTwFDhai/mfKkmtPAtD129EOI7K3HlHIsFOt0WrI2/oU9g==} magicast@0.5.3: resolution: {integrity: sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw==} @@ -1984,8 +1989,8 @@ packages: mdn-data@2.27.1: resolution: {integrity: sha512-9Yubnt3e8A0OKwxYSXyhLymGW4sCufcLG6VdiDdUGVkPhpqLxlvP5vl1983gQjJl3tqbrM731mjaZaP68AgosQ==} - mermaid@11.16.0: - resolution: {integrity: sha512-Zvm3kbstgdpvIJPPItlL7fppIZ3kibvc1oZIGxdvk9t6UFz6flv+Jw7FtRGKwfcI8OckmH04LqG6LlS6X4B1pA==} + mermaid@11.16.1: + resolution: {integrity: sha512-TQsq6u22fAn3rek5VOubrhKPo1g5hwC3FXUN9hiyupTckcYiGuuKGkNQrKYwGJkXUxZdojwRG46gsSCFZMDp4g==} micromark-core-commonmark@2.0.3: resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==} @@ -2092,10 +2097,9 @@ packages: micromark@4.0.2: resolution: {integrity: sha512-zpe98Q6kvavpCr1NPVSCMebCKfD7CA2NqZ+rykeNhONIJBpc1tFKt9hucLGwha3jNTNI8lHpctWJWoimVF4PfA==} - miniflare@4.20260714.0: - resolution: {integrity: sha512-MYlTCLdWCPqvrYY2uLwOjXwmglXuiHE3TGGkbOW4BwjUPa1r07E0iuHwrNDIs/sxK21r+o90Jx58AV2KeNdJZw==} + miniflare@5.20260804.0-alpha: + resolution: {integrity: sha512-UDegnTukIpJCI/lNyQXU7B8kYFLcMZihlxqqOocnc62tV8AO6XofmFmZm3ZLDXTWZpkZnLLJ2sKCSlTIEXO3dQ==} engines: {node: '>=22.0.0'} - hasBin: true mrmime@2.0.1: resolution: {integrity: sha512-Y3wQdFg2Va6etvQ5I82yUhGdsKrcYox6p7FfL1LbK2J4V01F9TGlepTIhnK24t7koZibmg82KGglhA1XK5IsLQ==} @@ -2295,10 +2299,6 @@ packages: request-light@0.7.0: resolution: {integrity: sha512-lMbBMrDoxgsyO+yB3sDcrDuX85yYt7sS8BfQd11jtbW/z5ZWgLZRcEGLsLoYw7I0WSUGQBs8CC8ScIxkTX1+6Q==} - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} @@ -2326,11 +2326,6 @@ packages: engines: {node: ^20.19.0 || >=22.12.0} hasBin: true - rollup@4.60.4: - resolution: {integrity: sha512-WHeFSbZYsPu3+bLoNRUuAO+wavNlocOPf3wSHTP7hcFKVnJeWsYlCDbr3mTS14FCizf9ccIxXA8sGL8zKeQN3g==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} - hasBin: true - roughjs@4.6.6: resolution: {integrity: sha512-ZUz/69+SYpFN/g/lUlo2FXcIjRkSu3nDarreVdGGndHEBJ6cXPdKguS8JGxwj5HA5xIbVKSmLgr5b3AWxtRfvQ==} @@ -2352,10 +2347,19 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.8.5: + resolution: {integrity: sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==} + engines: {node: '>=10'} + hasBin: true + sharp@0.34.5: resolution: {integrity: sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==} engines: {node: ^18.17.0 || ^20.3.0 || >=21.0.0} + sharp@0.35.2: + resolution: {integrity: sha512-FVtFjtBCMiJS6yb5CX7Sop45WFMpeGw6oRKuJnXYgf/f1ms/D7LE/ZUSNxnW7rZ/dbslQWYkoqFHGPaDBtaK4w==} + engines: {node: '>=20.9.0'} + shiki@4.0.2: resolution: {integrity: sha512-eAVKTMedR5ckPo4xne/PjYQYrU3qx78gtJZ+sHlXEg5IHhhoQhMfZVzetTYuaJS0L2Ef3AcCRzCHV8T0WI6nIQ==} engines: {node: '>=20'} @@ -2386,16 +2390,20 @@ packages: stream-replace-string@2.0.0: resolution: {integrity: sha512-TlnjJ1C0QrmxRNrON00JvaFFlNh5TTG00APw23j74ET7gkQpTASi6/L2fuiav8pzK715HXtUeClpBTw2NPSn6w==} - string-width@4.2.3: - resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} - engines: {node: '>=8'} + string-width@7.2.0: + resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} + engines: {node: '>=18'} + + string-width@8.2.2: + resolution: {integrity: sha512-GaPUh5gfdrYzqeVNZvUfT23vYYxXzKYidUcnMtJg/3rxRV63EFZy3k6xfKlmfeJD0176lnUV/Usr3XcwSvFzpg==} + engines: {node: '>=20'} stringify-entities@4.0.4: resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} - strip-ansi@6.0.1: - resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} - engines: {node: '>=8'} + strip-ansi@7.2.0: + resolution: {integrity: sha512-yDPMNjp4WyfYBkHnjIRLfca1i6KMyGCtsVgoKe/z1+6vukgaENdgGBZt+ZmKPc4gavvEZ5OgHfHdrazhgNyG7w==} + engines: {node: '>=12'} style-to-js@1.1.21: resolution: {integrity: sha512-RjQetxJrrUJLQPHbLku6U/ocGtzyjbJMP9lCNK7Ag0CNh690nSH8woqWH9u16nMjYBAok+i7JO1NP2pOy8IsPQ==} @@ -2426,10 +2434,6 @@ packages: resolution: {integrity: sha512-dAqSqE/RabpBKI8+h26GfLq6Vb3JVXs30XYQjdMjaj/c2tS8IYYMbIzP599KtRj7c57/wYApb3QjgRgXmrCukA==} engines: {node: '>=18'} - tinyglobby@0.2.16: - resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==} - engines: {node: '>=12.0.0'} - tinyglobby@0.2.17: resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} engines: {node: '>=12.0.0'} @@ -2470,8 +2474,8 @@ packages: undici-types@7.16.0: resolution: {integrity: sha512-Zz+aZWSj8LE6zoxD+xrjh4VfkIG8Ya6LvYkZqtUQGJPZjYl53ypCaUwWqo7eI0x66KBGeRo+mlBEkMSeSZ38Nw==} - undici@7.28.0: - resolution: {integrity: sha512-cRZYrTDwWznlnRiPjggAGxZXanty6M8RV1ff8Wm4LWXBp7/IG8v5DnOm74DtUBp9OONpK75YlPnIjQqX0dBDtA==} + undici@7.29.0: + resolution: {integrity: sha512-IDxfleLmmbSskfWSUATiN1nfn2rDuvnMOqb5CWR92iIfojA0Ud+ulOAAEQ57LPr9rWmsreUyf5lwyao+7GNNVw==} engines: {node: '>=20.18.1'} unenv@2.0.0-rc.24: @@ -2734,24 +2738,24 @@ packages: web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} - workerd@1.20260714.1: - resolution: {integrity: sha512-oIbQzfdyl9UQUnG6XLegcSq0Mgt/7WKDbFOoqGgOWCS+/fhyGB460uKEgdAQQ9RHCO/ttcNCX/KiMIQzdoeu3Q==} + workerd@1.20260804.1: + resolution: {integrity: sha512-b0P38g5/ssemwWxd/mafNYggEZ0ere7PCiUH6RCHkgqjRhhXTP45nDiL2L3iIvi8uF2IjNrGpVgMXEunCaeY/w==} engines: {node: '>=16'} hasBin: true - wrangler@4.112.0: - resolution: {integrity: sha512-5H+XUD0TySCv1LuktFHDIEOkboH2nTfQs+35L+USt3MtntjDTMVIJprLgQcL2WBjulOyjxpd1vyTiSTJVW5MjQ==} + wrangler@4.120.1: + resolution: {integrity: sha512-rQJ38rY02XiVITbSBWHC7oap3M2evcXgsC4CdlIX4WQENUZMMnue9j2vXO4aIi39KR+jDH+UHK8JNqp1+UjkRQ==} engines: {node: '>=22.0.0'} hasBin: true peerDependencies: - '@cloudflare/workers-types': ^5.20260714.1 + '@cloudflare/workers-types': ^5.20260804.1 peerDependenciesMeta: '@cloudflare/workers-types': optional: true - wrap-ansi@7.0.0: - resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} - engines: {node: '>=10'} + wrap-ansi@9.0.2: + resolution: {integrity: sha512-42AtmgqjV+X1VpdOfyTGOYRi0/zsoLqtXQckTmqTeybT+BDIbM/Guxo7x3pE2vtpr1ok6xRqM9OpBe+Jyoqyww==} + engines: {node: '>=18'} ws@8.21.0: resolution: {integrity: sha512-Vsp28b7DRcimFQvrqu2Wek3z1iYxDCWqHYB8Qsnk/S4RfaCQzPGPyBNuVjJV3cd6UiKtUtp6sNM77gWvzcCH+g==} @@ -2786,17 +2790,13 @@ packages: engines: {node: '>= 14.6'} hasBin: true - yargs-parser@21.1.1: - resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} - engines: {node: '>=12'} - yargs-parser@22.0.0: resolution: {integrity: sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==} engines: {node: ^20.19.0 || ^22.12.0 || >=23} - yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} + yargs@18.1.0: + resolution: {integrity: sha512-2rAgRKu54VsHkqI0/tYkmluGXHD4KW7yZoycuqDQ15QOTnc2VVfy0nN/1eMhnQLO00A+dwtK20xuCnc1YGeUyg==} + engines: {node: ^20.19.0 || ^22.12.0 || >=23} yocto-queue@1.2.2: resolution: {integrity: sha512-4LCcse/U2MHZ63HAJVE+v71o7yOdIe4cZ70Wpf8D/IyjDKYQLV5GD46B+hSTjJsvV5PztjvHoU580EftxjDZFQ==} @@ -2821,78 +2821,78 @@ snapshots: package-manager-detector: 1.6.0 tinyexec: 1.1.2 - '@astrojs/check@0.9.9(prettier@3.8.3)(typescript@6.0.3)': + '@astrojs/check@0.9.10(prettier@3.8.3)(typescript@6.0.3)': dependencies: '@astrojs/language-server': 2.16.9(prettier@3.8.3)(typescript@6.0.3) chokidar: 4.0.3 kleur: 4.1.5 typescript: 6.0.3 - yargs: 17.7.2 + yargs: 18.1.0 transitivePeerDependencies: - prettier - prettier-plugin-astro - '@astrojs/compiler-binding-darwin-arm64@0.3.1': + '@astrojs/compiler-binding-darwin-arm64@0.3.2': optional: true - '@astrojs/compiler-binding-darwin-x64@0.3.1': + '@astrojs/compiler-binding-darwin-x64@0.3.2': optional: true - '@astrojs/compiler-binding-linux-arm64-gnu@0.3.1': + '@astrojs/compiler-binding-linux-arm64-gnu@0.3.2': optional: true - '@astrojs/compiler-binding-linux-arm64-musl@0.3.1': + '@astrojs/compiler-binding-linux-arm64-musl@0.3.2': optional: true - '@astrojs/compiler-binding-linux-x64-gnu@0.3.1': + '@astrojs/compiler-binding-linux-x64-gnu@0.3.2': optional: true - '@astrojs/compiler-binding-linux-x64-musl@0.3.1': + '@astrojs/compiler-binding-linux-x64-musl@0.3.2': optional: true - '@astrojs/compiler-binding-wasm32-wasi@0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': + '@astrojs/compiler-binding-wasm32-wasi@0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': dependencies: - '@napi-rs/wasm-runtime': 1.1.6(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) + '@napi-rs/wasm-runtime': 1.2.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' optional: true - '@astrojs/compiler-binding-win32-arm64-msvc@0.3.1': + '@astrojs/compiler-binding-win32-arm64-msvc@0.3.2': optional: true - '@astrojs/compiler-binding-win32-x64-msvc@0.3.1': + '@astrojs/compiler-binding-win32-x64-msvc@0.3.2': optional: true - '@astrojs/compiler-binding@0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': + '@astrojs/compiler-binding@0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': optionalDependencies: - '@astrojs/compiler-binding-darwin-arm64': 0.3.1 - '@astrojs/compiler-binding-darwin-x64': 0.3.1 - '@astrojs/compiler-binding-linux-arm64-gnu': 0.3.1 - '@astrojs/compiler-binding-linux-arm64-musl': 0.3.1 - '@astrojs/compiler-binding-linux-x64-gnu': 0.3.1 - '@astrojs/compiler-binding-linux-x64-musl': 0.3.1 - '@astrojs/compiler-binding-wasm32-wasi': 0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) - '@astrojs/compiler-binding-win32-arm64-msvc': 0.3.1 - '@astrojs/compiler-binding-win32-x64-msvc': 0.3.1 + '@astrojs/compiler-binding-darwin-arm64': 0.3.2 + '@astrojs/compiler-binding-darwin-x64': 0.3.2 + '@astrojs/compiler-binding-linux-arm64-gnu': 0.3.2 + '@astrojs/compiler-binding-linux-arm64-musl': 0.3.2 + '@astrojs/compiler-binding-linux-x64-gnu': 0.3.2 + '@astrojs/compiler-binding-linux-x64-musl': 0.3.2 + '@astrojs/compiler-binding-wasm32-wasi': 0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) + '@astrojs/compiler-binding-win32-arm64-msvc': 0.3.2 + '@astrojs/compiler-binding-win32-x64-msvc': 0.3.2 transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' - '@astrojs/compiler-rs@0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': + '@astrojs/compiler-rs@0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': dependencies: - '@astrojs/compiler-binding': 0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) + '@astrojs/compiler-binding': 0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) transitivePeerDependencies: - '@emnapi/core' - '@emnapi/runtime' '@astrojs/compiler@2.13.1': {} - '@astrojs/internal-helpers@0.10.1': + '@astrojs/internal-helpers@0.10.2': dependencies: '@types/hast': 3.0.4 '@types/mdast': 4.0.4 - js-yaml: 4.1.1 + js-yaml: 4.3.1 picomatch: 4.0.4 retext-smartypants: 6.2.0 shiki: 4.0.2 @@ -2909,7 +2909,7 @@ snapshots: '@volar/language-server': 2.4.28 '@volar/language-service': 2.4.28 muggle-string: 0.4.1 - tinyglobby: 0.2.16 + tinyglobby: 0.2.17 volar-service-css: 0.0.70(@volar/language-service@2.4.28) volar-service-emmet: 0.0.70(@volar/language-service@2.4.28) volar-service-html: 0.0.70(@volar/language-service@2.4.28) @@ -2924,9 +2924,9 @@ snapshots: transitivePeerDependencies: - typescript - '@astrojs/markdown-remark@7.2.1': + '@astrojs/markdown-remark@7.2.2': dependencies: - '@astrojs/internal-helpers': 0.10.1 + '@astrojs/internal-helpers': 0.10.2 '@astrojs/prism': 4.0.2 github-slugger: 2.0.0 hast-util-from-html: 2.0.3 @@ -2946,21 +2946,21 @@ snapshots: transitivePeerDependencies: - supports-color - '@astrojs/markdown-satteri@0.3.4': + '@astrojs/markdown-satteri@0.3.5': dependencies: - '@astrojs/internal-helpers': 0.10.1 + '@astrojs/internal-helpers': 0.10.2 '@astrojs/prism': 4.0.2 github-slugger: 2.0.0 hast-util-from-html: 2.0.3 satteri: 0.9.2 - '@astrojs/mdx@7.0.3(@astrojs/markdown-satteri@0.3.4)(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.60.4)(yaml@2.9.0))': + '@astrojs/mdx@7.0.5(@astrojs/markdown-satteri@0.3.5)(astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(yaml@2.9.0))': dependencies: - '@astrojs/internal-helpers': 0.10.1 - '@astrojs/markdown-remark': 7.2.1 + '@astrojs/internal-helpers': 0.10.2 + '@astrojs/markdown-remark': 7.2.2 '@mdx-js/mdx': 3.1.1 acorn: 8.16.0 - astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.60.4)(yaml@2.9.0) + astro: 7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(yaml@2.9.0) es-module-lexer: 2.1.0 estree-util-visit: 2.0.0 hast-util-to-html: 9.0.5 @@ -2972,7 +2972,7 @@ snapshots: unist-util-visit: 5.1.0 vfile: 6.0.3 optionalDependencies: - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/markdown-satteri': 0.3.5 transitivePeerDependencies: - supports-color @@ -3063,25 +3063,25 @@ snapshots: '@cloudflare/kv-asset-handler@0.5.0': {} - '@cloudflare/unenv-preset@2.16.1(unenv@2.0.0-rc.24)(workerd@1.20260714.1)': + '@cloudflare/unenv-preset@2.16.1(unenv@2.0.0-rc.24)(workerd@1.20260804.1)': dependencies: unenv: 2.0.0-rc.24 optionalDependencies: - workerd: 1.20260714.1 + workerd: 1.20260804.1 - '@cloudflare/workerd-darwin-64@1.20260714.1': + '@cloudflare/workerd-darwin-64@1.20260804.1': optional: true - '@cloudflare/workerd-darwin-arm64@1.20260714.1': + '@cloudflare/workerd-darwin-arm64@1.20260804.1': optional: true - '@cloudflare/workerd-linux-64@1.20260714.1': + '@cloudflare/workerd-linux-64@1.20260804.1': optional: true - '@cloudflare/workerd-linux-arm64@1.20260714.1': + '@cloudflare/workerd-linux-arm64@1.20260804.1': optional: true - '@cloudflare/workerd-windows-64@1.20260714.1': + '@cloudflare/workerd-windows-64@1.20260804.1': optional: true '@cspotcode/source-map-support@0.8.1': @@ -3220,95 +3220,199 @@ snapshots: '@img/sharp-libvips-darwin-arm64': 1.2.4 optional: true + '@img/sharp-darwin-arm64@0.35.2': + optionalDependencies: + '@img/sharp-libvips-darwin-arm64': 1.3.1 + optional: true + '@img/sharp-darwin-x64@0.34.5': optionalDependencies: '@img/sharp-libvips-darwin-x64': 1.2.4 optional: true + '@img/sharp-darwin-x64@0.35.2': + optionalDependencies: + '@img/sharp-libvips-darwin-x64': 1.3.1 + optional: true + + '@img/sharp-freebsd-wasm32@0.35.2': + dependencies: + '@img/sharp-wasm32': 0.35.2 + optional: true + '@img/sharp-libvips-darwin-arm64@1.2.4': optional: true + '@img/sharp-libvips-darwin-arm64@1.3.1': + optional: true + '@img/sharp-libvips-darwin-x64@1.2.4': optional: true + '@img/sharp-libvips-darwin-x64@1.3.1': + optional: true + '@img/sharp-libvips-linux-arm64@1.2.4': optional: true + '@img/sharp-libvips-linux-arm64@1.3.1': + optional: true + '@img/sharp-libvips-linux-arm@1.2.4': optional: true + '@img/sharp-libvips-linux-arm@1.3.1': + optional: true + '@img/sharp-libvips-linux-ppc64@1.2.4': optional: true + '@img/sharp-libvips-linux-ppc64@1.3.1': + optional: true + '@img/sharp-libvips-linux-riscv64@1.2.4': optional: true + '@img/sharp-libvips-linux-riscv64@1.3.1': + optional: true + '@img/sharp-libvips-linux-s390x@1.2.4': optional: true + '@img/sharp-libvips-linux-s390x@1.3.1': + optional: true + '@img/sharp-libvips-linux-x64@1.2.4': optional: true + '@img/sharp-libvips-linux-x64@1.3.1': + optional: true + '@img/sharp-libvips-linuxmusl-arm64@1.2.4': optional: true + '@img/sharp-libvips-linuxmusl-arm64@1.3.1': + optional: true + '@img/sharp-libvips-linuxmusl-x64@1.2.4': optional: true + '@img/sharp-libvips-linuxmusl-x64@1.3.1': + optional: true + '@img/sharp-linux-arm64@0.34.5': optionalDependencies: '@img/sharp-libvips-linux-arm64': 1.2.4 optional: true + '@img/sharp-linux-arm64@0.35.2': + optionalDependencies: + '@img/sharp-libvips-linux-arm64': 1.3.1 + optional: true + '@img/sharp-linux-arm@0.34.5': optionalDependencies: '@img/sharp-libvips-linux-arm': 1.2.4 optional: true + '@img/sharp-linux-arm@0.35.2': + optionalDependencies: + '@img/sharp-libvips-linux-arm': 1.3.1 + optional: true + '@img/sharp-linux-ppc64@0.34.5': optionalDependencies: '@img/sharp-libvips-linux-ppc64': 1.2.4 optional: true + '@img/sharp-linux-ppc64@0.35.2': + optionalDependencies: + '@img/sharp-libvips-linux-ppc64': 1.3.1 + optional: true + '@img/sharp-linux-riscv64@0.34.5': optionalDependencies: '@img/sharp-libvips-linux-riscv64': 1.2.4 optional: true + '@img/sharp-linux-riscv64@0.35.2': + optionalDependencies: + '@img/sharp-libvips-linux-riscv64': 1.3.1 + optional: true + '@img/sharp-linux-s390x@0.34.5': optionalDependencies: '@img/sharp-libvips-linux-s390x': 1.2.4 optional: true + '@img/sharp-linux-s390x@0.35.2': + optionalDependencies: + '@img/sharp-libvips-linux-s390x': 1.3.1 + optional: true + '@img/sharp-linux-x64@0.34.5': optionalDependencies: '@img/sharp-libvips-linux-x64': 1.2.4 optional: true + '@img/sharp-linux-x64@0.35.2': + optionalDependencies: + '@img/sharp-libvips-linux-x64': 1.3.1 + optional: true + '@img/sharp-linuxmusl-arm64@0.34.5': optionalDependencies: '@img/sharp-libvips-linuxmusl-arm64': 1.2.4 optional: true + '@img/sharp-linuxmusl-arm64@0.35.2': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-arm64': 1.3.1 + optional: true + '@img/sharp-linuxmusl-x64@0.34.5': optionalDependencies: '@img/sharp-libvips-linuxmusl-x64': 1.2.4 optional: true + '@img/sharp-linuxmusl-x64@0.35.2': + optionalDependencies: + '@img/sharp-libvips-linuxmusl-x64': 1.3.1 + optional: true + '@img/sharp-wasm32@0.34.5': dependencies: '@emnapi/runtime': 1.11.1 optional: true + '@img/sharp-wasm32@0.35.2': + dependencies: + '@emnapi/runtime': 1.11.1 + optional: true + + '@img/sharp-webcontainers-wasm32@0.35.2': + dependencies: + '@img/sharp-wasm32': 0.35.2 + optional: true + '@img/sharp-win32-arm64@0.34.5': optional: true + '@img/sharp-win32-arm64@0.35.2': + optional: true + '@img/sharp-win32-ia32@0.34.5': optional: true + '@img/sharp-win32-ia32@0.35.2': + optional: true + '@img/sharp-win32-x64@0.34.5': optional: true + '@img/sharp-win32-x64@0.35.2': + optional: true + '@jridgewell/resolve-uri@3.1.2': {} '@jridgewell/sourcemap-codec@1.5.5': {} @@ -3359,6 +3463,13 @@ snapshots: '@tybys/wasm-util': 0.10.3 optional: true + '@napi-rs/wasm-runtime@1.2.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)': + dependencies: + '@emnapi/core': 1.11.1 + '@emnapi/runtime': 1.11.1 + '@tybys/wasm-util': 0.10.3 + optional: true + '@oslojs/encoding@1.1.0': {} '@oxc-project/types@0.137.0': {} @@ -3447,89 +3558,6 @@ snapshots: '@rolldown/pluginutils@1.0.1': {} - '@rollup/pluginutils@5.3.0(rollup@4.60.4)': - dependencies: - '@types/estree': 1.0.9 - estree-walker: 2.0.2 - picomatch: 4.0.4 - optionalDependencies: - rollup: 4.60.4 - - '@rollup/rollup-android-arm-eabi@4.60.4': - optional: true - - '@rollup/rollup-android-arm64@4.60.4': - optional: true - - '@rollup/rollup-darwin-arm64@4.60.4': - optional: true - - '@rollup/rollup-darwin-x64@4.60.4': - optional: true - - '@rollup/rollup-freebsd-arm64@4.60.4': - optional: true - - '@rollup/rollup-freebsd-x64@4.60.4': - optional: true - - '@rollup/rollup-linux-arm-gnueabihf@4.60.4': - optional: true - - '@rollup/rollup-linux-arm-musleabihf@4.60.4': - optional: true - - '@rollup/rollup-linux-arm64-gnu@4.60.4': - optional: true - - '@rollup/rollup-linux-arm64-musl@4.60.4': - optional: true - - '@rollup/rollup-linux-loong64-gnu@4.60.4': - optional: true - - '@rollup/rollup-linux-loong64-musl@4.60.4': - optional: true - - '@rollup/rollup-linux-ppc64-gnu@4.60.4': - optional: true - - '@rollup/rollup-linux-ppc64-musl@4.60.4': - optional: true - - '@rollup/rollup-linux-riscv64-gnu@4.60.4': - optional: true - - '@rollup/rollup-linux-riscv64-musl@4.60.4': - optional: true - - '@rollup/rollup-linux-s390x-gnu@4.60.4': - optional: true - - '@rollup/rollup-linux-x64-gnu@4.60.4': - optional: true - - '@rollup/rollup-linux-x64-musl@4.60.4': - optional: true - - '@rollup/rollup-openbsd-x64@4.60.4': - optional: true - - '@rollup/rollup-openharmony-arm64@4.60.4': - optional: true - - '@rollup/rollup-win32-arm64-msvc@4.60.4': - optional: true - - '@rollup/rollup-win32-ia32-msvc@4.60.4': - optional: true - - '@rollup/rollup-win32-x64-gnu@4.60.4': - optional: true - - '@rollup/rollup-win32-x64-msvc@4.60.4': - optional: true - '@shikijs/core@4.0.2': dependencies: '@shikijs/primitive': 4.0.2 @@ -3704,9 +3732,6 @@ snapshots: dependencies: '@types/estree': 1.0.9 - '@types/estree@1.0.8': - optional: true - '@types/estree@1.0.9': {} '@types/geojson@7946.0.16': {} @@ -3820,11 +3845,9 @@ snapshots: dependencies: process-ancestry: 0.1.0 - ansi-regex@5.0.1: {} + ansi-regex@6.2.2: {} - ansi-styles@4.3.0: - dependencies: - color-convert: 2.0.1 + ansi-styles@6.2.3: {} anymatch@3.1.3: dependencies: @@ -3841,24 +3864,23 @@ snapshots: astring@1.9.0: {} - astro-mermaid@2.1.0(astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.60.4)(yaml@2.9.0))(mermaid@11.16.0): + astro-mermaid@2.1.0(astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(yaml@2.9.0))(mermaid@11.16.1): dependencies: - astro: 7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.60.4)(yaml@2.9.0) + astro: 7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(yaml@2.9.0) import-meta-resolve: 4.2.0 mdast-util-to-string: 4.0.0 - mermaid: 11.16.0 + mermaid: 11.16.1 unist-util-visit: 5.1.0 - astro@7.1.3(@astrojs/markdown-remark@7.2.1)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(rollup@4.60.4)(yaml@2.9.0): + astro@7.2.0(@astrojs/markdown-remark@7.2.2)(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1)(@types/node@24.12.4)(yaml@2.9.0): dependencies: - '@astrojs/compiler-rs': 0.3.1(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) - '@astrojs/internal-helpers': 0.10.1 - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/compiler-rs': 0.3.2(@emnapi/core@1.11.1)(@emnapi/runtime@1.11.1) + '@astrojs/internal-helpers': 0.10.2 + '@astrojs/markdown-satteri': 0.3.5 '@astrojs/telemetry': 3.3.3 '@capsizecss/unpack': 4.0.0 '@clack/prompts': 1.4.0 '@oslojs/encoding': 1.1.0 - '@rollup/pluginutils': 5.3.0(rollup@4.60.4) am-i-vibing: 0.4.0 aria-query: 5.3.2 axobject-query: 4.1.0 @@ -3877,9 +3899,9 @@ snapshots: github-slugger: 2.0.0 html-escaper: 3.0.3 http-cache-semantics: 4.2.0 - js-yaml: 4.1.1 + js-yaml: 4.3.1 jsonc-parser: 3.3.1 - magic-string: 0.30.21 + magic-string: 1.1.0 magicast: 0.5.3 mrmime: 2.0.1 neotraverse: 1.0.1 @@ -3905,7 +3927,7 @@ snapshots: yargs-parser: 22.0.0 zod: 4.4.3 optionalDependencies: - '@astrojs/markdown-remark': 7.2.1 + '@astrojs/markdown-remark': 7.2.2 sharp: 0.34.5 transitivePeerDependencies: - '@azure/app-configuration' @@ -3932,7 +3954,6 @@ snapshots: - ioredis - jiti - less - - rollup - sass - sass-embedded - stylus @@ -3970,22 +3991,16 @@ snapshots: ci-info@4.4.0: {} - cliui@8.0.1: + cliui@9.0.1: dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 + string-width: 7.2.0 + strip-ansi: 7.2.0 + wrap-ansi: 9.0.2 clsx@2.1.1: {} collapse-white-space@2.1.0: {} - color-convert@2.0.1: - dependencies: - color-name: 1.1.4 - - color-name@1.1.4: {} - comma-separated-tokens@2.0.3: {} commander@11.1.0: {} @@ -4281,7 +4296,7 @@ snapshots: '@emmetio/abbreviation': 2.3.3 '@emmetio/css-abbreviation': 2.1.8 - emoji-regex@8.0.0: {} + emoji-regex@10.6.0: {} entities@4.5.0: {} @@ -4369,8 +4384,6 @@ snapshots: '@types/estree-jsx': 1.0.5 '@types/unist': 3.0.3 - estree-walker@2.0.2: {} - estree-walker@3.0.3: dependencies: '@types/estree': 1.0.9 @@ -4412,6 +4425,8 @@ snapshots: get-caller-file@2.0.5: {} + get-east-asian-width@1.6.0: {} + get-tsconfig@5.0.0-beta.4: dependencies: resolve-pkg-maps: 1.0.0 @@ -4591,13 +4606,11 @@ snapshots: is-docker@4.0.0: {} - is-fullwidth-code-point@3.0.0: {} - is-hexadecimal@2.0.1: {} is-plain-obj@4.1.0: {} - js-yaml@4.1.1: + js-yaml@4.3.1: dependencies: argparse: 2.0.1 @@ -4674,7 +4687,7 @@ snapshots: lru-cache@11.4.0: {} - magic-string@0.30.21: + magic-string@1.1.0: dependencies: '@jridgewell/sourcemap-codec': 1.5.5 @@ -4863,7 +4876,7 @@ snapshots: mdn-data@2.27.1: {} - mermaid@11.16.0: + mermaid@11.16.1: dependencies: '@braintree/sanitize-url': 7.1.2 '@iconify/utils': 3.1.3 @@ -5151,12 +5164,12 @@ snapshots: transitivePeerDependencies: - supports-color - miniflare@4.20260714.0: + miniflare@5.20260804.0-alpha: dependencies: '@cspotcode/source-map-support': 0.8.1 - sharp: 0.34.5 - undici: 7.28.0 - workerd: 1.20260714.1 + sharp: 0.35.2 + undici: 7.29.0 + workerd: 1.20260804.1 ws: 8.21.0 youch: 4.1.0-beta.10 transitivePeerDependencies: @@ -5405,8 +5418,6 @@ snapshots: request-light@0.7.0: {} - require-directory@2.1.1: {} - require-from-string@2.0.2: {} resolve-pkg-maps@1.0.0: {} @@ -5459,38 +5470,6 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.1.2 '@rolldown/binding-win32-x64-msvc': 1.1.2 - rollup@4.60.4: - dependencies: - '@types/estree': 1.0.8 - optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.60.4 - '@rollup/rollup-android-arm64': 4.60.4 - '@rollup/rollup-darwin-arm64': 4.60.4 - '@rollup/rollup-darwin-x64': 4.60.4 - '@rollup/rollup-freebsd-arm64': 4.60.4 - '@rollup/rollup-freebsd-x64': 4.60.4 - '@rollup/rollup-linux-arm-gnueabihf': 4.60.4 - '@rollup/rollup-linux-arm-musleabihf': 4.60.4 - '@rollup/rollup-linux-arm64-gnu': 4.60.4 - '@rollup/rollup-linux-arm64-musl': 4.60.4 - '@rollup/rollup-linux-loong64-gnu': 4.60.4 - '@rollup/rollup-linux-loong64-musl': 4.60.4 - '@rollup/rollup-linux-ppc64-gnu': 4.60.4 - '@rollup/rollup-linux-ppc64-musl': 4.60.4 - '@rollup/rollup-linux-riscv64-gnu': 4.60.4 - '@rollup/rollup-linux-riscv64-musl': 4.60.4 - '@rollup/rollup-linux-s390x-gnu': 4.60.4 - '@rollup/rollup-linux-x64-gnu': 4.60.4 - '@rollup/rollup-linux-x64-musl': 4.60.4 - '@rollup/rollup-openbsd-x64': 4.60.4 - '@rollup/rollup-openharmony-arm64': 4.60.4 - '@rollup/rollup-win32-arm64-msvc': 4.60.4 - '@rollup/rollup-win32-ia32-msvc': 4.60.4 - '@rollup/rollup-win32-x64-gnu': 4.60.4 - '@rollup/rollup-win32-x64-msvc': 4.60.4 - fsevents: 2.3.3 - optional: true - roughjs@4.6.6: dependencies: hachure-fill: 0.5.2 @@ -5523,6 +5502,8 @@ snapshots: semver@7.8.0: {} + semver@7.8.5: {} + sharp@0.34.5: dependencies: '@img/colour': 1.1.0 @@ -5553,6 +5534,39 @@ snapshots: '@img/sharp-win32-arm64': 0.34.5 '@img/sharp-win32-ia32': 0.34.5 '@img/sharp-win32-x64': 0.34.5 + optional: true + + sharp@0.35.2: + dependencies: + '@img/colour': 1.1.0 + detect-libc: 2.1.2 + semver: 7.8.5 + optionalDependencies: + '@img/sharp-darwin-arm64': 0.35.2 + '@img/sharp-darwin-x64': 0.35.2 + '@img/sharp-freebsd-wasm32': 0.35.2 + '@img/sharp-libvips-darwin-arm64': 1.3.1 + '@img/sharp-libvips-darwin-x64': 1.3.1 + '@img/sharp-libvips-linux-arm': 1.3.1 + '@img/sharp-libvips-linux-arm64': 1.3.1 + '@img/sharp-libvips-linux-ppc64': 1.3.1 + '@img/sharp-libvips-linux-riscv64': 1.3.1 + '@img/sharp-libvips-linux-s390x': 1.3.1 + '@img/sharp-libvips-linux-x64': 1.3.1 + '@img/sharp-libvips-linuxmusl-arm64': 1.3.1 + '@img/sharp-libvips-linuxmusl-x64': 1.3.1 + '@img/sharp-linux-arm': 0.35.2 + '@img/sharp-linux-arm64': 0.35.2 + '@img/sharp-linux-ppc64': 0.35.2 + '@img/sharp-linux-riscv64': 0.35.2 + '@img/sharp-linux-s390x': 0.35.2 + '@img/sharp-linux-x64': 0.35.2 + '@img/sharp-linuxmusl-arm64': 0.35.2 + '@img/sharp-linuxmusl-x64': 0.35.2 + '@img/sharp-webcontainers-wasm32': 0.35.2 + '@img/sharp-win32-arm64': 0.35.2 + '@img/sharp-win32-ia32': 0.35.2 + '@img/sharp-win32-x64': 0.35.2 shiki@4.0.2: dependencies: @@ -5584,20 +5598,25 @@ snapshots: stream-replace-string@2.0.0: {} - string-width@4.2.3: + string-width@7.2.0: dependencies: - emoji-regex: 8.0.0 - is-fullwidth-code-point: 3.0.0 - strip-ansi: 6.0.1 + emoji-regex: 10.6.0 + get-east-asian-width: 1.6.0 + strip-ansi: 7.2.0 + + string-width@8.2.2: + dependencies: + get-east-asian-width: 1.6.0 + strip-ansi: 7.2.0 stringify-entities@4.0.4: dependencies: character-entities-html4: 2.1.0 character-entities-legacy: 3.0.0 - strip-ansi@6.0.1: + strip-ansi@7.2.0: dependencies: - ansi-regex: 5.0.1 + ansi-regex: 6.2.2 style-to-js@1.1.21: dependencies: @@ -5627,11 +5646,6 @@ snapshots: tinyexec@1.1.2: {} - tinyglobby@0.2.16: - dependencies: - fdir: 6.5.0(picomatch@4.0.4) - picomatch: 4.0.4 - tinyglobby@0.2.17: dependencies: fdir: 6.5.0(picomatch@4.0.4) @@ -5662,7 +5676,7 @@ snapshots: undici-types@7.16.0: {} - undici@7.28.0: {} + undici@7.29.0: {} unenv@2.0.0-rc.24: dependencies: @@ -5874,35 +5888,35 @@ snapshots: web-namespaces@2.0.1: {} - workerd@1.20260714.1: + workerd@1.20260804.1: optionalDependencies: - '@cloudflare/workerd-darwin-64': 1.20260714.1 - '@cloudflare/workerd-darwin-arm64': 1.20260714.1 - '@cloudflare/workerd-linux-64': 1.20260714.1 - '@cloudflare/workerd-linux-arm64': 1.20260714.1 - '@cloudflare/workerd-windows-64': 1.20260714.1 + '@cloudflare/workerd-darwin-64': 1.20260804.1 + '@cloudflare/workerd-darwin-arm64': 1.20260804.1 + '@cloudflare/workerd-linux-64': 1.20260804.1 + '@cloudflare/workerd-linux-arm64': 1.20260804.1 + '@cloudflare/workerd-windows-64': 1.20260804.1 - wrangler@4.112.0: + wrangler@4.120.1: dependencies: '@cloudflare/kv-asset-handler': 0.5.0 - '@cloudflare/unenv-preset': 2.16.1(unenv@2.0.0-rc.24)(workerd@1.20260714.1) + '@cloudflare/unenv-preset': 2.16.1(unenv@2.0.0-rc.24)(workerd@1.20260804.1) blake3-wasm: 2.1.5 esbuild: 0.28.1 - miniflare: 4.20260714.0 + miniflare: 5.20260804.0-alpha path-to-regexp: 6.3.0 unenv: 2.0.0-rc.24 - workerd: 1.20260714.1 + workerd: 1.20260804.1 optionalDependencies: fsevents: 2.3.3 transitivePeerDependencies: - bufferutil - utf-8-validate - wrap-ansi@7.0.0: + wrap-ansi@9.0.2: dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 + ansi-styles: 6.2.3 + string-width: 7.2.0 + strip-ansi: 7.2.0 ws@8.21.0: {} @@ -5928,19 +5942,16 @@ snapshots: yaml@2.9.0: {} - yargs-parser@21.1.1: {} - yargs-parser@22.0.0: {} - yargs@17.7.2: + yargs@18.1.0: dependencies: - cliui: 8.0.1 + cliui: 9.0.1 escalade: 3.2.0 get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 + string-width: 8.2.2 y18n: 5.0.8 - yargs-parser: 21.1.1 + yargs-parser: 22.0.0 yocto-queue@1.2.2: {} diff --git a/website/web/pnpm-workspace.yaml b/website/web/pnpm-workspace.yaml index f176fe099..e38ff1bf5 100644 --- a/website/web/pnpm-workspace.yaml +++ b/website/web/pnpm-workspace.yaml @@ -5,7 +5,8 @@ allowBuilds: # Fresh releases accepted despite the configured minimum release age. # pnpm appends here on install; each entry is a version we chose to take early. minimumReleaseAgeExclude: - - astro@7.1.3 + - miniflare@5.20260804.0-alpha + - wrangler@4.120.1 # pnpm settings live here, not in package.json. # @@ -30,4 +31,4 @@ onlyBuiltDependencies: # NOTE: overrides must live here. pnpm 11 no longer reads the `pnpm` field from # package.json, so an override placed there is silently ignored. overrides: - '@astrojs/markdown-satteri': 0.3.4 + '@astrojs/markdown-satteri': 0.3.5