diff --git a/.github/scripts/test-rust-workspaces.sh b/.github/scripts/test-rust-workspaces.sh index cbd43a8c6..732b84742 100755 --- a/.github/scripts/test-rust-workspaces.sh +++ b/.github/scripts/test-rust-workspaces.sh @@ -57,7 +57,7 @@ check_cex_products() { cargo tree --manifest-path "$root/rust_hft/data-pipelines/Cargo.toml" \ -p hft-cex-data-preparation --locked --edges normal --prefix none --color never \ --format '{p}|{f}|' >"$work/cex-preparation.tree" - if grep -Eq '^(alpha-|burn |ort |hft-(research-platform|research-dispatch-io|research-ml|cex-research-worker|execution-adapter-[a-z-]+) )' "$work/cex-preparation.tree"; then + if grep -Eq '^(alpha-|burn(-[a-z-]+)? |ort |hft-(research-platform|research-dispatch-io|research-ml|cex-research-worker|execution-adapter-[a-z-]+) )' "$work/cex-preparation.tree"; then cex_graph_failure 'data preparation must exclude research execution, scheduling and trading' "$work/cex-preparation.tree" fi @@ -73,8 +73,13 @@ check_cex_products() { if ! grep -q '^hft-research-ml ' "$work/cex-worker.tree"; then cex_graph_failure 'worker must include hft-research-ml' "$work/cex-worker.tree" fi - if ! grep -q '^burn ' "$work/cex-worker.tree"; then - cex_graph_failure 'worker must include Burn' "$work/cex-worker.tree" + for package in burn-core burn-autodiff burn-ndarray burn-nn burn-optim; do + if ! grep -q "^$package " "$work/cex-worker.tree"; then + cex_graph_failure "worker must include $package" "$work/cex-worker.tree" + fi + done + if grep -Eq '^burn(-candle|-cuda|-rocm|-wgpu|-router)? ' "$work/cex-worker.tree"; then + cex_graph_failure 'worker must use direct CPU components without the backend facade' "$work/cex-worker.tree" fi check_cex_feature worker "$work/cex-worker.tree" alpha-harness scientific enabled check_cex_feature worker "$work/cex-worker.tree" alpha-engine kernel enabled @@ -133,9 +138,15 @@ for profile in default db full; do echo 'prediction research pulls the CEX input, evaluator or control chain' >&2; exit 1 fi # Prove the full graph includes science and export, beyond the db-only graph. - if [[ $profile == full ]] && - { ! grep -q '^burn ' "$work/prediction.tree" || ! grep -q '^polars ' "$work/prediction.tree"; }; then - echo 'prediction full graph is missing training or columnar export dependencies' >&2; exit 1 + if [[ $profile == full ]]; then + for package in burn-core burn-autodiff burn-ndarray burn-nn burn-optim polars; do + if ! grep -q "^$package " "$work/prediction.tree"; then + echo "prediction full graph is missing $package" >&2; exit 1 + fi + done + if grep -Eq '^burn(-candle|-cuda|-rocm|-wgpu|-router)? ' "$work/prediction.tree"; then + echo 'prediction training must use direct CPU components' >&2; exit 1 + fi fi done for profile in default researcher-verification control,gateway,publisher,researcher-verification; do @@ -170,7 +181,7 @@ fi for features in formula-strategy,binance full; do cargo tree --manifest-path "$root/rust_hft/runtime/Cargo.toml" -p hft-live \ --no-default-features --features "$features" --locked --edges normal --prefix none >"$work/live.tree" - if grep -E '^(alpha-(domain|engine|store|onnx-evaluator|harness) |burn |hft-(collector|research-platform|research-ml) )' "$work/live.tree"; then + if grep -E '^(alpha-(domain|engine|store|onnx-evaluator|harness) |burn(-[a-z-]+)? |hft-(collector|research-platform|research-ml) )' "$work/live.tree"; then echo 'live imports research control, evaluation or training' >&2; exit 1 fi done @@ -179,7 +190,7 @@ for selection in 'data-pipelines/Cargo.toml hft-collector' 'data-pipelines/Cargo read -r manifest package <<<"$selection" cargo tree --manifest-path "$root/rust_hft/$manifest" -p "$package" \ --locked --edges normal --prefix none >"$work/depth.tree" - if grep -E '^(hft-engine |alpha-(domain|engine|onnx-evaluator|harness) |burn |ort |hft-(research-ml|research-platform|execution-adapter-[a-z-]+) )' "$work/depth.tree"; then + if grep -E '^(hft-engine |alpha-(domain|engine|onnx-evaluator|harness) |burn(-[a-z-]+)? |ort |hft-(research-ml|research-platform|execution-adapter-[a-z-]+) )' "$work/depth.tree"; then echo 'depth acquisition imports runtime engine, science or execution authority' >&2; exit 1 fi done @@ -201,7 +212,7 @@ for package in hft-research-artifacts hft-research-dispatch-io hft-prediction-re case $package in hft-research-artifacts|hft-research-dispatch-io) owner=shared ;; *) owner=prediction-markets ;; esac cargo tree --manifest-path "$root/rust_hft/$owner/Cargo.toml" \ -p "$package" --locked --edges normal --prefix none >"$work/worker.tree" - if grep -E '^(alpha-(domain|engine|harness|onnx-evaluator) |burn |ort |hft-(collector|backtest|research-platform|research-ml|execution-adapter-[a-z-]+) )' "$work/worker.tree"; then + if grep -E '^(alpha-(domain|engine|harness|onnx-evaluator) |burn(-[a-z-]+)? |ort |hft-(collector|backtest|research-platform|research-ml|execution-adapter-[a-z-]+) )' "$work/worker.tree"; then echo 'Prediction/artifact worker imports acquisition, CEX research, control, training or execution' >&2; exit 1 fi if [[ $package == hft-research-artifacts || $package == hft-prediction-research-worker ]] && @@ -211,7 +222,7 @@ for package in hft-research-artifacts hft-research-dispatch-io hft-prediction-re done cargo tree --manifest-path "$root/rust_hft/runtime/Cargo.toml" \ -p hft-strategy-probability-reversal --locked --edges normal --prefix none >"$work/probability.tree" -if grep -E '^(alpha-(domain|engine|harness|store|onnx-evaluator) |burn |ort |sqlx-|axum |reqwest |hft-(collector|research-platform|research-ml|execution-adapter-[a-z-]+) )' "$work/probability.tree"; then +if grep -E '^(alpha-(domain|engine|harness|store|onnx-evaluator) |burn(-[a-z-]+)? |ort |sqlx-|axum |reqwest |hft-(collector|research-platform|research-ml|execution-adapter-[a-z-]+) )' "$work/probability.tree"; then echo 'fixed probability strategy imports science, control, transport or execution' >&2; exit 1 fi printf 'workspace ownership, scoped commands, feature rejection and thin closures passed\n' diff --git a/rust_hft/alpha-harness/app/Cargo.toml b/rust_hft/alpha-harness/app/Cargo.toml index d47369868..96c1bb97b 100644 --- a/rust_hft/alpha-harness/app/Cargo.toml +++ b/rust_hft/alpha-harness/app/Cargo.toml @@ -42,7 +42,7 @@ serde_json = { workspace = true } sha2 = { workspace = true } tempfile = "3" tokio = { workspace = true, features = ["macros", "rt", "sync"] } -zip = { version = "6", default-features = false, features = ["deflate"] } +zip = { version = "9.0.5", default-features = false, features = ["deflate"] } [[bin]] name = "alpha-harness" diff --git a/rust_hft/alpha-harness/app/src/mission_campaign.rs b/rust_hft/alpha-harness/app/src/mission_campaign.rs index 8264d28fd..690e9877a 100644 --- a/rust_hft/alpha-harness/app/src/mission_campaign.rs +++ b/rust_hft/alpha-harness/app/src/mission_campaign.rs @@ -7234,7 +7234,7 @@ pub(crate) mod tests { .compression_method(zip::CompressionMethod::Deflated); for index in 0..source.len() { let mut entry = source.by_index(index).unwrap(); - let name = entry.name().to_string(); + let name = entry.name().unwrap().into_owned(); if mutation == 0 && name == block_entry { continue; } @@ -9208,7 +9208,7 @@ pub(crate) mod tests { let mut entry = archive.by_index(index).unwrap(); let mut bytes = Vec::new(); entry.read_to_end(&mut bytes).unwrap(); - entries.insert(entry.name().to_string(), bytes); + entries.insert(entry.name().unwrap().into_owned(), bytes); } mutate(&mut entries); let mut writer = zip::ZipWriter::new(std::io::Cursor::new(Vec::new())); diff --git a/rust_hft/alpha-harness/app/src/mission_campaign/platform_output.rs b/rust_hft/alpha-harness/app/src/mission_campaign/platform_output.rs index e21d1304c..249177f63 100644 --- a/rust_hft/alpha-harness/app/src/mission_campaign/platform_output.rs +++ b/rust_hft/alpha-harness/app/src/mission_campaign/platform_output.rs @@ -277,7 +277,7 @@ fn actual_archive_entries_with_limit( if entry.is_dir() { continue; } - let path = entry.name().to_string(); + let path = entry.name()?.into_owned(); if entry.enclosed_name().is_none() || path.len() > 256 || path.contains("..") diff --git a/rust_hft/alpha-harness/app/src/mission_campaign/sequence/readback.rs b/rust_hft/alpha-harness/app/src/mission_campaign/sequence/readback.rs index 63ff33c34..0513dc433 100644 --- a/rust_hft/alpha-harness/app/src/mission_campaign/sequence/readback.rs +++ b/rust_hft/alpha-harness/app/src/mission_campaign/sequence/readback.rs @@ -145,7 +145,7 @@ pub(crate) fn verify_artifact_inventory( let mut actual = BTreeSet::new(); for index in 0..archive.len() { let entry = archive.by_index(index)?; - if entry.is_dir() || !actual.insert(entry.name().to_owned()) { + if entry.is_dir() || !actual.insert(entry.name()?.into_owned()) { bail!("unexpected sequence archive entry"); } } diff --git a/rust_hft/alpha-harness/app/src/mission_runner.rs b/rust_hft/alpha-harness/app/src/mission_runner.rs index b42b06b2b..2558129b5 100644 --- a/rust_hft/alpha-harness/app/src/mission_runner.rs +++ b/rust_hft/alpha-harness/app/src/mission_runner.rs @@ -4722,6 +4722,8 @@ fn decode_verified_execution_report( None => { if archive .file_names() + .collect::>>()? + .into_iter() .any(|name| name == "results/native-prepared-inputs.json") { bail!("native result readback requires its independently bound finalized request"); @@ -4810,6 +4812,8 @@ fn decode_verified_execution_report( { let unexpected_backtest = archive .file_names() + .collect::>>()? + .into_iter() .any(|path| path == format!("results/{name}-supervised-backtest.json")); if baseline.is_some() || candidate.is_some() || unexpected_backtest { bail!("published result contains a model outside its declared scope"); @@ -5288,14 +5292,18 @@ fn validate_model_metric_readback( candidates: &std::collections::BTreeMap<&str, CexResearchContentRefV1>, native: Option<&crate::mission_campaign::prepared_inputs::VerifiedNativeCampaignPreparedInputs>, ) -> anyhow::Result<()> { - let calendar_artifacts_present = archive.file_names().any(|name| { - matches!( - name, - "results/calendar-validation.json" - | "results/calendar-prediction-diagnostics.json" - | "results/calendar-validation-event-replay-receipt.json" - ) - }); + let calendar_artifacts_present = archive + .file_names() + .collect::>>()? + .into_iter() + .any(|name| { + matches!( + name.as_ref(), + "results/calendar-validation.json" + | "results/calendar-prediction-diagnostics.json" + | "results/calendar-validation-event-replay-receipt.json" + ) + }); if calendar_artifacts_present && (mission.spec.evaluation_protocol.calendar.is_none() || selection.is_none()) { @@ -5517,7 +5525,9 @@ fn load_native_archive_input( .context("native archive is missing its actual prepared collection")?; let names = archive .file_names() - .map(str::to_owned) + .collect::>>()? + .into_iter() + .map(|name| name.into_owned()) .collect::>(); if names.len() != archive.len() { bail!("native archive contains duplicate entry names"); @@ -5672,7 +5682,12 @@ fn read_optional_bundle_bytes( name: &str, max_bytes: u64, ) -> anyhow::Result>> { - if !archive.file_names().any(|entry| entry == name) { + if !archive + .file_names() + .collect::>>()? + .into_iter() + .any(|entry| entry == name) + { return Ok(None); } read_bundle_bytes(archive, name, max_bytes).map(Some) @@ -9924,7 +9939,7 @@ pub(crate) mod tests { let mut entry = archive.by_index(index).unwrap(); let mut bytes = Vec::new(); entry.read_to_end(&mut bytes).unwrap(); - entries.push((entry.name().to_string(), bytes)); + entries.push((entry.name().unwrap().into_owned(), bytes)); } entries } diff --git a/rust_hft/data-pipelines/Cargo.lock b/rust_hft/data-pipelines/Cargo.lock index 568a96fb2..6b10b67f0 100644 --- a/rust_hft/data-pipelines/Cargo.lock +++ b/rust_hft/data-pipelines/Cargo.lock @@ -667,15 +667,6 @@ version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" -[[package]] -name = "arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" -dependencies = [ - "derive_arbitrary", -] - [[package]] name = "arc-swap" version = "1.9.1" @@ -2143,17 +2134,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "derive_arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "derive_builder" version = "0.10.2" @@ -4242,6 +4222,18 @@ dependencies = [ "tempfile", ] +[[package]] +name = "nix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "nom" version = "7.1.3" @@ -6737,6 +6729,12 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8464ec13c3691491391d9fce00f6416c9a48e46972f72d7865688be2080192c9" +[[package]] +name = "typed-path" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e" + [[package]] name = "typenum" version = "1.20.0" @@ -7708,15 +7706,16 @@ dependencies = [ [[package]] name = "zip" -version = "6.0.0" +version = "9.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b" +checksum = "6e04976da629d3b04204ba8105b396a193af8ad2583b2c79bfb3ab8af580a11e" dependencies = [ - "arbitrary", "crc32fast", "flate2", "indexmap 2.14.0", "memchr", + "nix", + "typed-path", "zopfli", ] diff --git a/rust_hft/native/libduckdb-sys/Cargo.toml b/rust_hft/native/libduckdb-sys/Cargo.toml index 44abbe03f..53c0593a9 100644 --- a/rust_hft/native/libduckdb-sys/Cargo.toml +++ b/rust_hft/native/libduckdb-sys/Cargo.toml @@ -150,6 +150,6 @@ optional = true [build-dependencies.zip] optional = true -version = "6" +version = "9.0.5" features = ["deflate"] default-features = false diff --git a/rust_hft/native/libduckdb-sys/MONDAY-PATCH.md b/rust_hft/native/libduckdb-sys/MONDAY-PATCH.md index 118d47b76..f4e46c2af 100644 --- a/rust_hft/native/libduckdb-sys/MONDAY-PATCH.md +++ b/rust_hft/native/libduckdb-sys/MONDAY-PATCH.md @@ -12,8 +12,9 @@ compilation do not compile these dependencies. Set both the feature and feature, that environment variable fails with an actionable error. Bundled mode retains precedence over the download environment variable. -The owning research-core and data-pipelines manifests select this patch. -Prediction keeps its distinct locked upstream version. +The research-core, data-pipelines, and prediction-markets manifests select this patch. +The optional downloader uses zip 9.0.5 or later, including the extraction fixes +for RUSTSEC-2026-0367, RUSTSEC-2026-0368, and RUSTSEC-2026-0369. The native cache identity binds every patch file, features, dependency checksums, compiler, ABI, flags and profiles. Only this exact native path is retained during cache cleanup. Application path dependencies are still removed. diff --git a/rust_hft/prediction-markets/Cargo.lock b/rust_hft/prediction-markets/Cargo.lock index ba73f1667..907042124 100644 --- a/rust_hft/prediction-markets/Cargo.lock +++ b/rust_hft/prediction-markets/Cargo.lock @@ -695,15 +695,6 @@ dependencies = [ "object", ] -[[package]] -name = "arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" -dependencies = [ - "derive_arbitrary", -] - [[package]] name = "arc-swap" version = "1.9.2" @@ -1344,26 +1335,6 @@ dependencies = [ "unty", ] -[[package]] -name = "bindgen" -version = "0.71.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash 2.1.3", - "shlex 1.3.0", - "syn 2.0.119", -] - [[package]] name = "bit-set" version = "0.8.0" @@ -1557,26 +1528,6 @@ version = "3.20.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "72f5acc6cb2ba439de613abc23857ec3d78374d8ed5ac84e9d11336e87da8649" -[[package]] -name = "burn" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b78ff10ed98b73e1d477ea6e6e1ec1b9cf9f71a17afc3fea9f4dca482d43dcd4" -dependencies = [ - "burn-autodiff", - "burn-candle", - "burn-core", - "burn-cpu", - "burn-cuda", - "burn-ndarray", - "burn-nn", - "burn-optim", - "burn-rocm", - "burn-router", - "burn-store", - "burn-wgpu", -] - [[package]] name = "burn-autodiff" version = "0.20.1" @@ -1612,18 +1563,6 @@ dependencies = [ "thiserror 2.0.18", ] -[[package]] -name = "burn-candle" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21c752d5008923eb9299783da5edae3242b94afdb956e88d2b37b025244b5071" -dependencies = [ - "burn-backend", - "burn-std", - "candle-core", - "derive-new", -] - [[package]] name = "burn-core" version = "0.20.1" @@ -1653,64 +1592,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "burn-cpu" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60aa53c4536719f1c91c250d4b4348daca473c44cf0c45b81096785f5510c192" -dependencies = [ - "burn-backend", - "burn-cubecl", - "cubecl", -] - -[[package]] -name = "burn-cubecl" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d6d13aff03fec966da4300459688883f8a1d741dddbf19d1bfc2562656a9a9b" -dependencies = [ - "burn-backend", - "burn-cubecl-fusion", - "burn-fusion", - "burn-ir", - "burn-std", - "cubecl", - "cubek", - "derive-new", - "futures-lite", - "log", - "serde", - "text_placeholder", -] - -[[package]] -name = "burn-cubecl-fusion" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d25b2e9fb805931401f79782aabd92462d65e60bc207035a3e554de8d7cd9f" -dependencies = [ - "burn-backend", - "burn-fusion", - "burn-ir", - "burn-std", - "cubecl", - "cubek", - "derive-new", - "serde", -] - -[[package]] -name = "burn-cuda" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d0c68cf653eb9c27dcbe046bb7b04cc18c6b33afda4c09317c102e6f4ae7cb6" -dependencies = [ - "burn-backend", - "burn-cubecl", - "cubecl", -] - [[package]] name = "burn-derive" version = "0.20.1" @@ -1723,22 +1604,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "burn-fusion" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea83d7f8574bcc07967291c5bb679ddc0a655c8db0642eca62755e2fffc8047" -dependencies = [ - "burn-backend", - "burn-ir", - "derive-new", - "hashbrown 0.16.1", - "log", - "serde", - "spin 0.10.1", - "tracing", -] - [[package]] name = "burn-ir" version = "0.20.1" @@ -1801,31 +1666,6 @@ dependencies = [ "serde", ] -[[package]] -name = "burn-rocm" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73e2abda6ee63bdcb730f1a335349a9ff83f03048130d405b6ecdccd2df3ff23" -dependencies = [ - "burn-backend", - "burn-cubecl", - "cubecl", -] - -[[package]] -name = "burn-router" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "823ccb88484736a2861d53dc7f67db375ef050b0446bb02dd7cb8783ac6b69a2" -dependencies = [ - "burn-backend", - "burn-ir", - "burn-std", - "hashbrown 0.16.1", - "log", - "spin 0.10.1", -] - [[package]] name = "burn-std" version = "0.20.1" @@ -1834,7 +1674,6 @@ checksum = "25a9ed8e34a4a49d3754586f306075d6b55a5e08343ac75c06f47e7d9f825271" dependencies = [ "bytemuck", "bytes", - "cubecl", "cubecl-common", "half", "num-traits", @@ -1876,17 +1715,6 @@ dependencies = [ "serde", ] -[[package]] -name = "burn-wgpu" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df78d62afc9b9fbb8ee4e49b72006485bb64f778a790e185a2d919479bcfc008" -dependencies = [ - "burn-backend", - "burn-cubecl", - "cubecl", -] - [[package]] name = "byte-slice-cast" version = "1.2.3" @@ -1944,38 +1772,6 @@ dependencies = [ "serde", ] -[[package]] -name = "candle-core" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15b675b80d994b2eadb20a4bbe434eabeb454eac3ee5e2b4cf6f147ee9be091" -dependencies = [ - "byteorder", - "float8 0.6.1", - "gemm", - "half", - "libm", - "memmap2", - "num-traits", - "num_cpus", - "rand 0.9.5", - "rand_distr 0.5.1", - "rayon", - "safetensors", - "thiserror 2.0.18", - "yoke", - "zip 7.2.0", -] - -[[package]] -name = "caseless" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6fd507454086c8edfd769ca6ada439193cdb209c7681712ef6275cccbfe5d8" -dependencies = [ - "unicode-normalization", -] - [[package]] name = "cast" version = "0.3.0" @@ -2000,16 +1796,7 @@ dependencies = [ "find-msvc-tools", "jobserver", "libc", - "shlex 2.0.1", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", + "shlex", ] [[package]] @@ -2086,17 +1873,6 @@ dependencies = [ "half", ] -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" version = "4.6.1" @@ -2184,9 +1960,9 @@ dependencies = [ [[package]] name = "comfy-table" -version = "7.2.2" +version = "7.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "958c5d6ecf1f214b4c2bbbbf6ab9523a864bd136dcf71a7e8904799acfe1ad47" +checksum = "4a65ebfec4fb190b6f90e944a817d60499ee0744e582530e2c9900a22e591d9a" dependencies = [ "crossterm", "unicode-segmentation", @@ -2208,20 +1984,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "comrak" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fefab951771fc3beeed0773ce66a4f7b706273fc6c4c95b08dd1615744abcf5" -dependencies = [ - "caseless", - "entities", - "memchr", - "slug", - "typed-arena", - "unicode_categories", -] - [[package]] name = "concurrent-queue" version = "2.5.0" @@ -2290,21 +2052,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "constcat" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136d3e02915a2cea4d74caa8681e2d44b1c3254bdbf17d11d41d587ff858832c" - -[[package]] -name = "convert_case" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "convert_case" version = "0.10.0" @@ -2444,15 +2191,14 @@ checksum = "61803da095bee82a81bb1a452ecc25d3b2f1416d1897eb86430c6159ef717c17" [[package]] name = "crossterm" -version = "0.29.0" +version = "0.28.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b9f2e4c67f833b660cdb0a3523065869fb35570177239812ed4c905aeff87b" +checksum = "829d955a0bb380ef178a640b91779e3987da38c9aea133b20614cfed8cdea9c6" dependencies = [ "bitflags", "crossterm_winapi", - "document-features", "parking_lot", - "rustix", + "rustix 0.38.44", "winapi", ] @@ -2509,12 +2255,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "053856efd5436224775b9423d43d86f53d5b1d3af9a6b9983d9a313a0922638f" dependencies = [ "cubecl-core", - "cubecl-cpu", "cubecl-cuda", - "cubecl-hip", "cubecl-ir", "cubecl-runtime", - "cubecl-std", "cubecl-wgpu", "half", ] @@ -2536,7 +2279,7 @@ dependencies = [ "embassy-futures", "embassy-time", "float4", - "float8 0.4.2", + "float8", "futures-lite", "half", "hashbrown 0.15.5", @@ -2551,7 +2294,6 @@ dependencies = [ "serde_bytes", "serde_json", "spin 0.10.1", - "tracing", "wasm-bindgen-futures", "web-time", ] @@ -2579,7 +2321,6 @@ dependencies = [ "paste", "serde", "serde_json", - "tracing", "variadics_please", ] @@ -2600,28 +2341,6 @@ dependencies = [ "log", ] -[[package]] -name = "cubecl-cpu" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "152588a6e16b6bda5e8216af7a6fad3d7de4697294b6ce0f6acbe3a9029ff674" -dependencies = [ - "bytemuck", - "cubecl-common", - "cubecl-core", - "cubecl-opt", - "cubecl-runtime", - "cubecl-std", - "derive-new", - "half", - "log", - "paste", - "serde", - "sysinfo 0.36.1", - "tracel-llvm", - "tracel-llvm-bundler", -] - [[package]] name = "cubecl-cuda" version = "0.9.0" @@ -2639,38 +2358,6 @@ dependencies = [ "half", "log", "serde", - "tracing", -] - -[[package]] -name = "cubecl-hip" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbae9bc7ee6093d0d7a549c05873dff3478f9087b59eb09b223a97d642c849aa" -dependencies = [ - "bytemuck", - "cubecl-common", - "cubecl-core", - "cubecl-cpp", - "cubecl-hip-sys", - "cubecl-runtime", - "cubecl-zspace", - "derive-new", - "half", - "log", - "paste", - "serde", - "tracing", -] - -[[package]] -name = "cubecl-hip-sys" -version = "7.2.5321100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58887c6d217859c2261a868a3a6b66aa8f44ea2f4bfa51d0dbe4dcb0d1f5768d" -dependencies = [ - "libc", - "regex", ] [[package]] @@ -2765,30 +2452,11 @@ dependencies = [ "spin 0.10.1", "thiserror 2.0.18", "toml 0.9.12+spec-1.1.0", - "tracing", "variadics_please", "wasm-bindgen-futures", "web-time", ] -[[package]] -name = "cubecl-std" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ff5741c98b7a7a5944b4afb0b67dd7f5e0be41ce7f303b587f8b0d6430b29b" -dependencies = [ - "cubecl-common", - "cubecl-core", - "cubecl-runtime", - "foldhash 0.1.5", - "half", - "num-traits", - "paste", - "serde", - "spin 0.10.1", - "variadics_please", -] - [[package]] name = "cubecl-wgpu" version = "0.9.0" @@ -2809,7 +2477,6 @@ dependencies = [ "hashbrown 0.15.5", "log", "sanitize-filename", - "tracing", "wgpu", ] @@ -2819,104 +2486,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a0f819071413b19a00b7105497e0f6d2cf3e7e9d65cbb8d4ecf1ddb29c61dc2" -[[package]] -name = "cubek" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb1cce47db02017925301bedec92ae84628493df3f9761ea7ac42a60c6146f8" -dependencies = [ - "cubecl", - "cubek-attention", - "cubek-convolution", - "cubek-matmul", - "cubek-quant", - "cubek-random", - "cubek-reduce", -] - -[[package]] -name = "cubek-attention" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7278bd122b2428af479f9af05285160613733c33c93b63ab3c6d25cd0460c18b" -dependencies = [ - "bytemuck", - "cubecl", - "cubecl-common", - "cubek-matmul", - "cubek-random", - "half", - "serde", -] - -[[package]] -name = "cubek-convolution" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18eb04bca4ae104d62a56def04b04f3d079c42fe49aac62202c96876f90fa28b" -dependencies = [ - "bytemuck", - "cubecl", - "cubecl-common", - "cubek-matmul", - "derive-new", - "enumset", - "half", - "serde", -] - -[[package]] -name = "cubek-matmul" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28f3b04b113760e97c65a8a4dca9afc220744031eeecd5ad6cd0e3be91ba3a9" -dependencies = [ - "bytemuck", - "cubecl", - "cubecl-common", - "half", - "serde", -] - -[[package]] -name = "cubek-quant" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ec3ae04af324df2d615c2b394e270d58d6f08cb833d67633e2ba794de75916" -dependencies = [ - "cubecl", - "cubecl-common", - "half", - "serde", -] - -[[package]] -name = "cubek-random" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65a34844d8b7f739185c1d24896137dcb73f458830444103b45f678585ad983e" -dependencies = [ - "cubecl", - "cubecl-common", - "half", - "num-traits", - "rand 0.9.5", - "serde", -] - -[[package]] -name = "cubek-reduce" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42397d9ed85bb3084dfb56ed26de75690b5b07caf42a32f4006b57eb23d5b6d6" -dependencies = [ - "cubecl", - "half", - "num-traits", - "serde", - "thiserror 2.0.18", -] - [[package]] name = "cudarc" version = "0.18.2" @@ -3098,17 +2667,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "derive_arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "derive_more" version = "2.1.1" @@ -3124,7 +2682,7 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ - "convert_case 0.10.0", + "convert_case", "proc-macro2", "quote", "rustc_version 0.4.1", @@ -3132,12 +2690,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "deunicode" -version = "1.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04" - [[package]] name = "digest" version = "0.9.0" @@ -3218,13 +2770,14 @@ checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" [[package]] name = "duckdb" -version = "1.10501.0" +version = "1.10504.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f13bc6d6487032fc2825a62ef8b4924b2378a2eb3166e132e5f3141ae9dd633f" +checksum = "0b9b997383221efd999a362448a0866c54b9a2cb7d4da8cd4903ead4df9f8eaa" dependencies = [ "arrow", "cast", "chrono", + "comfy-table", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -3246,22 +2799,6 @@ version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d0881ea181b1df73ff77ffaaf9c7544ecc11e82fba9b5f27b262a3c73a332555" -[[package]] -name = "dyn-stack" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c4713e43e2886ba72b8271aa66c93d722116acf7a75555cce11dcde84388fe8" -dependencies = [ - "bytemuck", - "dyn-stack-macros", -] - -[[package]] -name = "dyn-stack-macros" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d926b4d407d372f141f93bb444696142c29d32962ccbd3531117cf3aa0bfa9" - [[package]] name = "ecdsa" version = "0.16.9" @@ -3383,24 +2920,6 @@ dependencies = [ "cfg-if", ] -[[package]] -name = "entities" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca" - -[[package]] -name = "enum-as-inner" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.119", -] - [[package]] name = "enum-ordinalize" version = "4.4.1" @@ -3641,18 +3160,6 @@ dependencies = [ "half", ] -[[package]] -name = "float8" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719a903cc23e4a89e87962c2a80fdb45cdaad0983a89bd150bb57b4c8571a7d5" -dependencies = [ - "half", - "num-traits", - "rand 0.9.5", - "rand_distr 0.5.1", -] - [[package]] name = "flume" version = "0.11.1" @@ -3845,137 +3352,18 @@ dependencies = [ "futures-core", "futures-io", "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "slab", -] - -[[package]] -name = "futures-utils-wasm" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" - -[[package]] -name = "gemm" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa0673db364b12263d103b68337a68fbecc541d6f6b61ba72fe438654709eacb" -dependencies = [ - "dyn-stack", - "gemm-c32", - "gemm-c64", - "gemm-common", - "gemm-f16", - "gemm-f32", - "gemm-f64", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "seq-macro", -] - -[[package]] -name = "gemm-c32" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "086936dbdcb99e37aad81d320f98f670e53c1e55a98bee70573e83f95beb128c" -dependencies = [ - "dyn-stack", - "gemm-common", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "seq-macro", -] - -[[package]] -name = "gemm-c64" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c8aeeeec425959bda4d9827664029ba1501a90a0d1e6228e48bef741db3a3f" -dependencies = [ - "dyn-stack", - "gemm-common", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "seq-macro", -] - -[[package]] -name = "gemm-common" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88027625910cc9b1085aaaa1c4bc46bb3a36aad323452b33c25b5e4e7c8e2a3e" -dependencies = [ - "bytemuck", - "dyn-stack", - "half", - "libm", - "num-complex", - "num-traits", - "once_cell", - "paste", - "pulp", - "raw-cpuid", - "rayon", - "seq-macro", - "sysctl", -] - -[[package]] -name = "gemm-f16" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3df7a55202e6cd6739d82ae3399c8e0c7e1402859b30e4cb780e61525d9486e" -dependencies = [ - "dyn-stack", - "gemm-common", - "gemm-f32", - "half", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "rayon", - "seq-macro", -] - -[[package]] -name = "gemm-f32" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0b8c9da1fbec6e3e3ab2ce6bc259ef18eb5f6f0d3e4edf54b75f9fd41a81c" -dependencies = [ - "dyn-stack", - "gemm-common", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "seq-macro", + "futures-sink", + "futures-task", + "memchr", + "pin-project-lite", + "slab", ] [[package]] -name = "gemm-f64" -version = "0.19.0" +name = "futures-utils-wasm" +version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056131e8f2a521bfab322f804ccd652520c79700d81209e9d9275bbdecaadc6a" -dependencies = [ - "dyn-stack", - "gemm-common", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "seq-macro", -] +checksum = "42012b0f064e01aa58b545fe3727f90f7dd4020f4a3ea735b50344965f5a57e9" [[package]] name = "generic-array" @@ -4162,8 +3550,6 @@ dependencies = [ "cfg-if", "crunchy", "num-traits", - "rand 0.9.5", - "rand_distr 0.5.1", "serde", "zerocopy", ] @@ -4174,15 +3560,6 @@ version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.14.5" @@ -4483,7 +3860,7 @@ dependencies = [ "sha2", "tempfile", "tokio", - "zip 6.0.0", + "zip", ] [[package]] @@ -4498,7 +3875,7 @@ dependencies = [ "serde_json", "sha2", "tempfile", - "zip 6.0.0", + "zip", ] [[package]] @@ -5131,18 +4508,14 @@ checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66" [[package]] name = "libduckdb-sys" -version = "1.10501.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12096c1694924782b3fe21e790630b77bacb4fcb7ad9d7ee0fec626f985bf248" +version = "1.10504.0" dependencies = [ "flate2", "pkg-config", - "reqwest 0.12.28", "serde", "serde_json", "tar", "vcpkg", - "zip 6.0.0", ] [[package]] @@ -5155,27 +4528,6 @@ dependencies = [ "windows-link 0.2.1", ] -[[package]] -name = "liblzma" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45aec2360b3933207e27908049d8e4df4e476b58180afb1e56b2a4fb72efe4ba" -dependencies = [ - "liblzma-sys", - "num_cpus", -] - -[[package]] -name = "liblzma-sys" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a046c7f353ba30f810545151e04f63545833803f5b86ee3ddf1517247fe560a5" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - [[package]] name = "libm" version = "0.2.16" @@ -5204,6 +4556,12 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "linux-raw-sys" +version = "0.4.15" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" + [[package]] name = "linux-raw-sys" version = "0.12.1" @@ -5370,7 +4728,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" dependencies = [ "libc", - "stable_deref_trait", ] [[package]] @@ -5394,12 +4751,6 @@ version = "0.3.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -5530,13 +4881,15 @@ dependencies = [ ] [[package]] -name = "nom" -version = "7.1.3" +name = "nix" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" dependencies = [ - "memchr", - "minimal-lexical", + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", ] [[package]] @@ -5596,7 +4949,6 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ - "bytemuck", "num-traits", ] @@ -5700,25 +5052,6 @@ dependencies = [ "malloc_buf", ] -[[package]] -name = "objc2-core-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" -dependencies = [ - "bitflags", -] - -[[package]] -name = "objc2-io-kit" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" -dependencies = [ - "libc", - "objc2-core-foundation", -] - [[package]] name = "object" version = "0.37.3" @@ -6202,8 +5535,11 @@ name = "ploy-research" version = "0.1.0" dependencies = [ "anyhow", - "burn", + "burn-autodiff", + "burn-core", "burn-ndarray", + "burn-nn", + "burn-optim", "burn-store", "chrono", "ciborium", @@ -6804,7 +6140,7 @@ dependencies = [ "raw-cpuid", "rayon", "stacker", - "sysinfo 0.33.1", + "sysinfo", "version_check", ] @@ -7020,29 +6356,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "pulp" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046aa45b989642ec2e4717c8e72d677b13edd831a4d3b6cf37d9a3e54912496a" -dependencies = [ - "bytemuck", - "cfg-if", - "libm", - "num-complex", - "paste", - "pulp-wasm-simd-flag", - "raw-cpuid", - "reborrow", - "version_check", -] - -[[package]] -name = "pulp-wasm-simd-flag" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8f70e07b9c3962945a74e59ca1c511bba65b6419468acc217c457d93f3c740" - [[package]] name = "quinn" version = "0.11.11" @@ -7309,12 +6622,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "reborrow" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" - [[package]] name = "recursive" version = "0.1.1" @@ -7436,7 +6743,6 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", "http", "http-body", "http-body-util", @@ -7694,6 +7000,19 @@ dependencies = [ "semver 1.0.28", ] +[[package]] +name = "rustix" +version = "0.38.44" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" +dependencies = [ + "bitflags", + "errno", + "libc", + "linux-raw-sys 0.4.15", + "windows-sys 0.52.0", +] + [[package]] name = "rustix" version = "1.1.4" @@ -7703,7 +7022,7 @@ dependencies = [ "bitflags", "errno", "libc", - "linux-raw-sys", + "linux-raw-sys 0.12.1", "windows-sys 0.61.2", ] @@ -8250,12 +7569,6 @@ dependencies = [ "lazy_static", ] -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - [[package]] name = "shlex" version = "2.0.1" @@ -8325,16 +7638,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "slug" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724" -dependencies = [ - "deunicode", - "wasm-bindgen", -] - [[package]] name = "smallvec" version = "1.15.2" @@ -8727,20 +8030,6 @@ dependencies = [ "syn 2.0.119", ] -[[package]] -name = "sysctl" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01198a2debb237c62b6826ec7081082d951f46dbb64b0e8c7649a452230d1dfc" -dependencies = [ - "bitflags", - "byteorder", - "enum-as-inner", - "libc", - "thiserror 1.0.69", - "walkdir", -] - [[package]] name = "sysinfo" version = "0.33.1" @@ -8754,20 +8043,6 @@ dependencies = [ "windows 0.57.0", ] -[[package]] -name = "sysinfo" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "252800745060e7b9ffb7b2badbd8b31cfa4aa2e61af879d0a3bf2a317c20217d" -dependencies = [ - "libc", - "memchr", - "ntapi", - "objc2-core-foundation", - "objc2-io-kit", - "windows 0.61.3", -] - [[package]] name = "system-configuration" version = "0.7.0" @@ -8815,7 +8090,7 @@ dependencies = [ "fastrand", "getrandom 0.4.3", "once_cell", - "rustix", + "rustix 1.1.4", "windows-sys 0.61.2", ] @@ -8828,17 +8103,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "text_placeholder" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5008f74a09742486ef0047596cf35df2b914e2a8dca5727fcb6ba6842a766b" -dependencies = [ - "hashbrown 0.13.2", - "serde", - "serde_json", -] - [[package]] name = "textdistance" version = "1.1.1" @@ -9233,85 +8497,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" -[[package]] -name = "tracel-llvm" -version = "20.1.4-7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982535db9eb1a30ac0f2c50239a0eec3e5cf50993a88e92b04747bd2f4d365b2" -dependencies = [ - "tracel-mlir-rs", - "tracel-mlir-sys", -] - -[[package]] -name = "tracel-llvm-bundler" -version = "20.1.4-7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c75b8e477cb8d49d907afab029ca74d48459f5b88c27bdb4c6cd6acb5e61977" -dependencies = [ - "anyhow", - "bytes", - "constcat", - "dirs", - "liblzma", - "regex", - "reqwest 0.12.28", - "serde", - "serde_json", - "sha2", - "tar", - "walkdir", -] - -[[package]] -name = "tracel-mlir-rs" -version = "20.1.4-7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a478a35efd68d0ba73f747adfb7923b121c64e7f5be9cd8364ca1dcb772d5c" -dependencies = [ - "tracel-mlir-rs-macros", - "tracel-mlir-sys", -] - -[[package]] -name = "tracel-mlir-rs-macros" -version = "20.1.4-7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a94f36868c3b10b1825945223d99d106c73f4d249f063caa4651deeb9379344" -dependencies = [ - "comrak", - "convert_case 0.8.0", - "proc-macro2", - "quote", - "regex", - "syn 2.0.119", - "tracel-llvm-bundler", - "tracel-tblgen-rs", - "unindent", -] - -[[package]] -name = "tracel-mlir-sys" -version = "20.1.4-7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f26d31af0c225a6d2e3d65d012fd6de848c9fc776897b152ee83b7d1bd15c4" -dependencies = [ - "tracel-llvm-bundler", -] - -[[package]] -name = "tracel-tblgen-rs" -version = "20.1.4-7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d2581070380418ccc33b500f3739e4d4869421fdb477fcea51ff97c6253a52" -dependencies = [ - "bindgen", - "cc", - "paste", - "thiserror 2.0.18", - "tracel-llvm-bundler", -] - [[package]] name = "tracing" version = "0.1.44" @@ -9445,12 +8630,6 @@ dependencies = [ "rustc-hash 2.1.3", ] -[[package]] -name = "typed-arena" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" - [[package]] name = "typed-path" version = "0.12.3" @@ -9541,18 +8720,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "unicode_categories" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" - -[[package]] -name = "unindent" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3" - [[package]] name = "untrusted" version = "0.9.0" @@ -10010,28 +9177,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows" -version = "0.61.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" -dependencies = [ - "windows-collections", - "windows-core 0.61.2", - "windows-future", - "windows-link 0.1.3", - "windows-numerics", -] - -[[package]] -name = "windows-collections" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" -dependencies = [ - "windows-core 0.61.2", -] - [[package]] name = "windows-core" version = "0.57.0" @@ -10070,17 +9215,6 @@ dependencies = [ "windows-strings 0.4.2", ] -[[package]] -name = "windows-future" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" -dependencies = [ - "windows-core 0.61.2", - "windows-link 0.1.3", - "windows-threading", -] - [[package]] name = "windows-implement" version = "0.57.0" @@ -10159,16 +9293,6 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-numerics" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" -dependencies = [ - "windows-core 0.61.2", - "windows-link 0.1.3", -] - [[package]] name = "windows-registry" version = "0.6.1" @@ -10302,15 +9426,6 @@ dependencies = [ "windows_x86_64_msvc 0.52.6", ] -[[package]] -name = "windows-threading" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" -dependencies = [ - "windows-link 0.1.3", -] - [[package]] name = "windows_aarch64_gnullvm" version = "0.48.5" @@ -10447,7 +9562,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32e45ad4206f6d2479085147f02bc2ef834ac85886624a23575ae137c8aa8156" dependencies = [ "libc", - "rustix", + "rustix 1.1.4", ] [[package]] @@ -10581,28 +9696,17 @@ dependencies = [ [[package]] name = "zip" -version = "6.0.0" +version = "9.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b" +checksum = "6e04976da629d3b04204ba8105b396a193af8ad2583b2c79bfb3ab8af580a11e" dependencies = [ - "arbitrary", "crc32fast", "flate2", "indexmap 2.14.0", "memchr", - "zopfli", -] - -[[package]] -name = "zip" -version = "7.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42e33efc22a0650c311c2ef19115ce232583abbe80850bc8b66509ebef02de0" -dependencies = [ - "crc32fast", - "indexmap 2.14.0", - "memchr", + "nix", "typed-path", + "zopfli", ] [[package]] diff --git a/rust_hft/prediction-markets/Cargo.toml b/rust_hft/prediction-markets/Cargo.toml index 69b58cae4..62237f53a 100644 --- a/rust_hft/prediction-markets/Cargo.toml +++ b/rust_hft/prediction-markets/Cargo.toml @@ -129,5 +129,6 @@ incremental = true debug = 1 [patch.crates-io] +libduckdb-sys = { path = "../native/libduckdb-sys" } sqlx = { git = "https://github.com/proerror77/sqlx-security-695", rev = "6690e9870298d7b65042538f4c1e943ed3e318ec" } rust_decimal = { git = "https://github.com/proerror77/monday-rust-decimal-security-694", rev = "4f7bc6f02d7920b6416988914ae86d25f6670b22" } diff --git a/rust_hft/prediction-markets/crates/ploy-research/Cargo.toml b/rust_hft/prediction-markets/crates/ploy-research/Cargo.toml index a3a995419..0a6eb7c14 100644 --- a/rust_hft/prediction-markets/crates/ploy-research/Cargo.toml +++ b/rust_hft/prediction-markets/crates/ploy-research/Cargo.toml @@ -15,7 +15,7 @@ default = [] full = ["db", "polars-export", "ml", "rl", "strategy-runtime"] db = ["dep:sqlx", "dep:ploy-feed-loaders"] polars-export = ["dep:polars"] -ml = ["dep:burn", "dep:burn-ndarray", "dep:burn-store", "dep:ciborium"] +ml = ["dep:burn", "dep:burn-autodiff", "dep:burn-nn", "dep:burn-optim", "dep:burn-ndarray", "dep:burn-store", "dep:ciborium"] rl = [] strategy-runtime = [] @@ -43,7 +43,11 @@ anyhow = "1" fs2 = "0.4" hft-search-kernel = { path = "../../../research-core/search-kernel" } libc.workspace = true -burn = { version = "0.20.1", default-features = false, features = ["ndarray", "autodiff", "std"], optional = true } +# Keep the `burn` name for derive macros; do not resolve unused GPU/Candle backends. +burn = { package = "burn-core", version = "0.20.1", default-features = false, features = ["std"], optional = true } +burn-autodiff = { version = "0.20.1", default-features = false, features = ["std"], optional = true } +burn-nn = { version = "0.20.1", default-features = false, features = ["std"], optional = true } +burn-optim = { version = "0.20.1", default-features = false, features = ["std"], optional = true } burn-ndarray = { version = "0.20.1", optional = true } burn-store = { version = "0.20.1", default-features = false, features = ["burnpack", "std"], optional = true } ciborium = { version = "0.2", optional = true } diff --git a/rust_hft/prediction-markets/crates/ploy-research/prediction-policy-dependencies.linux.sha256 b/rust_hft/prediction-markets/crates/ploy-research/prediction-policy-dependencies.linux.sha256 index b41c72f5c..17bdb78f2 100644 --- a/rust_hft/prediction-markets/crates/ploy-research/prediction-policy-dependencies.linux.sha256 +++ b/rust_hft/prediction-markets/crates/ploy-research/prediction-policy-dependencies.linux.sha256 @@ -1 +1 @@ -sha256:28a788275d1fb7a58004d3487054e7de1161a4447a5ed48f28eadd8b5ba79cb8 +sha256:2f4777481bf0f6e991af4cabc9ef56aff312d04d1f58a383a87973c788847ea4 diff --git a/rust_hft/prediction-markets/crates/ploy-research/prediction-policy-dependencies.linux.txt b/rust_hft/prediction-markets/crates/ploy-research/prediction-policy-dependencies.linux.txt index e7ef2acba..436e072a7 100644 --- a/rust_hft/prediction-markets/crates/ploy-research/prediction-policy-dependencies.linux.txt +++ b/rust_hft/prediction-markets/crates/ploy-research/prediction-policy-dependencies.linux.txt @@ -1,9 +1,9 @@ prediction-policy-dependencies.v6 target=x86_64-unknown-linux-gnu profile=default,db -input:Cargo.lock=sha256:3a889c1998e3299569e681db3b0fea5e2ccdd2bdb2e5b436e2e8c1ff5ea8cf97 -input:Cargo.toml=sha256:a19d33379eee9a01a9a151f6a7a53997447ae5422895ee846d6b23b43a01be81 -input:crates/ploy-research/Cargo.toml=sha256:8e05407a5cfc3d7f37bf9af6f275e4163074df02cd346ccd32af76cca4b6d54b +input:Cargo.lock=sha256:689c4ddaba3c03d8af41eed1af2b3383ff989ad21c46d2b183833b50f5b8cca5 +input:Cargo.toml=sha256:eafe138aea00a7e67911d22d9a01955c5ea2f8b2e3a02d56f24ed26ae5b002b7 +input:crates/ploy-research/Cargo.toml=sha256:210df4f9ff6bc0959fa130706ae889b8f504b14cac152c116f743f55ce489c16 input:crates/ploy-feed-loaders/Cargo.toml=sha256:abf8f1b8adec93b1ad84a66294cb58eb65f9cbca33c701cc81c7635eb9b35e2c input:crates/ploy-market-contracts/Cargo.toml=sha256:e086ddc8f162ff0abcabe832b1b61549f0daf7e98a78ab96f5512c596c3dc7f0 input:crates/ploy-market-data/Cargo.toml=sha256:e6938c0663c42a96546dae42ddfb1751f66bb92ec78f3bd82d4958885429a6e5 @@ -16,7 +16,7 @@ input:../risk-control/oms-core/Cargo.toml=sha256:62ddf714dfdd4870c2dd2b194ebaa61 input:../risk-control/portfolio-core/Cargo.toml=sha256:7aa5c2f8524cf8007bb84733a2d90280915a74f74ba22020a42745360629c2fe input:../shared/Cargo.toml=sha256:acc7f47aecfd4f37350958bee832cc13a99ba75431574859ed2fc8b2d5259a0c input:../data-pipelines/Cargo.toml=sha256:fd3d96e893d4af02bc1d6a1e8b2dc132b785738ae344a7f2101c41856c431415 -input:../research-core/Cargo.toml=sha256:df9d5a0a6e16012d6e7dfa1f51b1dd119a7c190cabec2866beb28c3c0db0fb82 +input:../research-core/Cargo.toml=sha256:459f933f74c66597b8595355148f38c8b4b5fe19773b3c2f5df5132e1234e1a7 input:../runtime/Cargo.toml=sha256:11b6cae8ef4fe0019c778a0767016b4cfc0c92fb30e0bea5f051e00522a52cbf input:../research-core/search-kernel/Cargo.toml=sha256:d5a4731c11fce22c0e358097bd38fb05a674659ac2afbd7c72112285093bdec6 input:../research-core/manifest/Cargo.toml=sha256:4f363d2986d847f42cf4191bcb0bafe09af97a173a1fea5f81354ae217bcd1dc diff --git a/rust_hft/prediction-markets/crates/ploy-research/src/model/supervised/burn_binary.rs b/rust_hft/prediction-markets/crates/ploy-research/src/model/supervised/burn_binary.rs index d0c73b443..589a9b7ee 100644 --- a/rust_hft/prediction-markets/crates/ploy-research/src/model/supervised/burn_binary.rs +++ b/rust_hft/prediction-markets/crates/ploy-research/src/model/supervised/burn_binary.rs @@ -6,12 +6,13 @@ use anyhow::{bail, ensure, Context, Result}; use burn::{ - backend::{Autodiff, NdArray}, module::{AutodiffModule, Initializer, Module, Param}, - nn::{loss::BinaryCrossEntropyLossConfig, Linear, LinearConfig}, - optim::{AdamConfig, GradientsParams, Optimizer}, tensor::{activation::sigmoid, backend::Backend, Int, Tensor, TensorData}, }; +use burn_autodiff::Autodiff; +use burn_ndarray::NdArray; +use burn_nn::{loss::BinaryCrossEntropyLossConfig, Linear, LinearConfig}; +use burn_optim::{AdamConfig, GradientsParams, Optimizer}; use burn_store::{BurnpackStore, ModuleSnapshot}; use rand::{rngs::StdRng, Rng, SeedableRng}; use serde::{Deserialize, Serialize}; diff --git a/rust_hft/prediction-markets/crates/research-worker/Cargo.toml b/rust_hft/prediction-markets/crates/research-worker/Cargo.toml index 7a983dd3e..f80e8df21 100644 --- a/rust_hft/prediction-markets/crates/research-worker/Cargo.toml +++ b/rust_hft/prediction-markets/crates/research-worker/Cargo.toml @@ -15,7 +15,7 @@ sha2 = { workspace = true } hex = "0.4" tempfile = "3" tokio = { workspace = true, features = ["macros", "rt", "sync"] } -zip = { version = "6", default-features = false, features = ["deflate"] } +zip = { version = "9.0.5", default-features = false, features = ["deflate"] } [[bin]] name = "monday-prediction-worker" diff --git a/rust_hft/prediction-markets/crates/research-worker/src/prediction_runner.rs b/rust_hft/prediction-markets/crates/research-worker/src/prediction_runner.rs index 3f4f9e611..619330a06 100644 --- a/rust_hft/prediction-markets/crates/research-worker/src/prediction_runner.rs +++ b/rust_hft/prediction-markets/crates/research-worker/src/prediction_runner.rs @@ -1091,9 +1091,14 @@ mod tests { assert!(fixture.result_path.is_file()); let archive = ZipArchive::new(File::open(&fixture.result_path).unwrap()).unwrap(); - let names = archive.file_names().collect::>(); - assert!(names.contains(&"results/summary.json")); - assert!(names.contains(&"artifacts/execution-evidence.json")); + let names = archive + .file_names() + .map(|name| name.unwrap().into_owned()) + .collect::>(); + assert!(names.iter().any(|name| name == "results/summary.json")); + assert!(names + .iter() + .any(|name| name == "artifacts/execution-evidence.json")); let evidence: serde_json::Value = serde_json::from_slice( &std::fs::read(fixture.root.join("work/artifacts/execution-evidence.json")).unwrap(), ) @@ -1326,6 +1331,7 @@ mod tests { let archive = ZipArchive::new(File::open(&fixture.result_path).unwrap()).unwrap(); assert!(archive .file_names() + .map(|name| name.unwrap().into_owned()) .any(|name| name == "results/checkpoint.json")); std::fs::remove_dir_all(fixture.root).unwrap(); } diff --git a/rust_hft/research-core/Cargo.lock b/rust_hft/research-core/Cargo.lock index 328d93648..475568f17 100644 --- a/rust_hft/research-core/Cargo.lock +++ b/rust_hft/research-core/Cargo.lock @@ -125,7 +125,7 @@ dependencies = [ "sha2", "tempfile", "tokio", - "zip 6.0.0", + "zip", ] [[package]] @@ -237,15 +237,6 @@ version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "170433209e817da6aae2c51aa0dd443009a613425dd041ebfb2492d1c4c11a25" -[[package]] -name = "arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" -dependencies = [ - "derive_arbitrary", -] - [[package]] name = "arc-swap" version = "1.9.1" @@ -495,7 +486,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -535,26 +526,6 @@ dependencies = [ "unty", ] -[[package]] -name = "bindgen" -version = "0.71.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f58bf3d7db68cfbac37cfc485a8d711e87e064c3d0fe0435b92f7a407f9d6b3" -dependencies = [ - "bitflags", - "cexpr", - "clang-sys", - "itertools 0.13.0", - "log", - "prettyplease", - "proc-macro2", - "quote", - "regex", - "rustc-hash 2.1.2", - "shlex", - "syn 2.0.117", -] - [[package]] name = "bit-set" version = "0.5.3" @@ -639,26 +610,6 @@ version = "3.20.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb" -[[package]] -name = "burn" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b78ff10ed98b73e1d477ea6e6e1ec1b9cf9f71a17afc3fea9f4dca482d43dcd4" -dependencies = [ - "burn-autodiff", - "burn-candle", - "burn-core", - "burn-cpu", - "burn-cuda", - "burn-ndarray", - "burn-nn", - "burn-optim", - "burn-rocm", - "burn-router", - "burn-store", - "burn-wgpu", -] - [[package]] name = "burn-autodiff" version = "0.20.1" @@ -694,18 +645,6 @@ dependencies = [ "thiserror 2.0.18", ] -[[package]] -name = "burn-candle" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21c752d5008923eb9299783da5edae3242b94afdb956e88d2b37b025244b5071" -dependencies = [ - "burn-backend", - "burn-std", - "candle-core", - "derive-new 0.7.0", -] - [[package]] name = "burn-core" version = "0.20.1" @@ -735,64 +674,6 @@ dependencies = [ "uuid", ] -[[package]] -name = "burn-cpu" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60aa53c4536719f1c91c250d4b4348daca473c44cf0c45b81096785f5510c192" -dependencies = [ - "burn-backend", - "burn-cubecl", - "cubecl", -] - -[[package]] -name = "burn-cubecl" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d6d13aff03fec966da4300459688883f8a1d741dddbf19d1bfc2562656a9a9b" -dependencies = [ - "burn-backend", - "burn-cubecl-fusion", - "burn-fusion", - "burn-ir", - "burn-std", - "cubecl", - "cubek", - "derive-new 0.7.0", - "futures-lite", - "log", - "serde", - "text_placeholder", -] - -[[package]] -name = "burn-cubecl-fusion" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17d25b2e9fb805931401f79782aabd92462d65e60bc207035a3e554de8d7cd9f" -dependencies = [ - "burn-backend", - "burn-fusion", - "burn-ir", - "burn-std", - "cubecl", - "cubek", - "derive-new 0.7.0", - "serde", -] - -[[package]] -name = "burn-cuda" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d0c68cf653eb9c27dcbe046bb7b04cc18c6b33afda4c09317c102e6f4ae7cb6" -dependencies = [ - "burn-backend", - "burn-cubecl", - "cubecl", -] - [[package]] name = "burn-derive" version = "0.20.1" @@ -805,22 +686,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "burn-fusion" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ea83d7f8574bcc07967291c5bb679ddc0a655c8db0642eca62755e2fffc8047" -dependencies = [ - "burn-backend", - "burn-ir", - "derive-new 0.7.0", - "hashbrown 0.16.1", - "log", - "serde", - "spin", - "tracing", -] - [[package]] name = "burn-ir" version = "0.20.1" @@ -883,31 +748,6 @@ dependencies = [ "serde", ] -[[package]] -name = "burn-rocm" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73e2abda6ee63bdcb730f1a335349a9ff83f03048130d405b6ecdccd2df3ff23" -dependencies = [ - "burn-backend", - "burn-cubecl", - "cubecl", -] - -[[package]] -name = "burn-router" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "823ccb88484736a2861d53dc7f67db375ef050b0446bb02dd7cb8783ac6b69a2" -dependencies = [ - "burn-backend", - "burn-ir", - "burn-std", - "hashbrown 0.16.1", - "log", - "spin", -] - [[package]] name = "burn-std" version = "0.20.1" @@ -916,7 +756,6 @@ checksum = "25a9ed8e34a4a49d3754586f306075d6b55a5e08343ac75c06f47e7d9f825271" dependencies = [ "bytemuck", "bytes", - "cubecl", "cubecl-common", "half", "num-traits", @@ -958,17 +797,6 @@ dependencies = [ "serde", ] -[[package]] -name = "burn-wgpu" -version = "0.20.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df78d62afc9b9fbb8ee4e49b72006485bb64f778a790e185a2d919479bcfc008" -dependencies = [ - "burn-backend", - "burn-cubecl", - "cubecl", -] - [[package]] name = "bytemuck" version = "1.25.1" @@ -1004,38 +832,6 @@ dependencies = [ "portable-atomic", ] -[[package]] -name = "candle-core" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c15b675b80d994b2eadb20a4bbe434eabeb454eac3ee5e2b4cf6f147ee9be091" -dependencies = [ - "byteorder", - "float8 0.6.1", - "gemm", - "half", - "libm", - "memmap2", - "num-traits", - "num_cpus", - "rand 0.9.4", - "rand_distr 0.5.1", - "rayon", - "safetensors 0.7.0", - "thiserror 2.0.18", - "yoke", - "zip 7.2.0", -] - -[[package]] -name = "caseless" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6fd507454086c8edfd769ca6ada439193cdb209c7681712ef6275cccbfe5d8" -dependencies = [ - "unicode-normalization", -] - [[package]] name = "cast" version = "0.3.0" @@ -1054,15 +850,6 @@ dependencies = [ "shlex", ] -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom 7.1.3", -] - [[package]] name = "cfg-if" version = "1.0.4" @@ -1097,7 +884,7 @@ dependencies = [ "num-traits", "serde", "wasm-bindgen", - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -1127,17 +914,6 @@ dependencies = [ "half", ] -[[package]] -name = "clang-sys" -version = "1.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b023947811758c97c59bf9d1c188fd619ad4718dcaa767947df1cadb14f39f4" -dependencies = [ - "glob", - "libc", - "libloading", -] - [[package]] name = "clap" version = "4.6.1" @@ -1215,20 +991,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "comrak" -version = "0.39.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2fefab951771fc3beeed0773ce66a4f7b706273fc6c4c95b08dd1615744abcf5" -dependencies = [ - "caseless", - "entities", - "memchr", - "slug", - "typed-arena", - "unicode_categories", -] - [[package]] name = "concurrent-queue" version = "2.5.0" @@ -1264,21 +1026,6 @@ dependencies = [ "tiny-keccak", ] -[[package]] -name = "constcat" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "136d3e02915a2cea4d74caa8681e2d44b1c3254bdbf17d11d41d587ff858832c" - -[[package]] -name = "convert_case" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baaaa0ecca5b51987b9423ccdc971514dd8b0bb7b4060b983d3664dad3f1f89f" -dependencies = [ - "unicode-segmentation", -] - [[package]] name = "convert_case" version = "0.10.0" @@ -1448,12 +1195,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "053856efd5436224775b9423d43d86f53d5b1d3af9a6b9983d9a313a0922638f" dependencies = [ "cubecl-core", - "cubecl-cpu", "cubecl-cuda", - "cubecl-hip", "cubecl-ir", "cubecl-runtime", - "cubecl-std", "cubecl-wgpu", "half", ] @@ -1475,7 +1219,7 @@ dependencies = [ "embassy-futures", "embassy-time", "float4", - "float8 0.4.2", + "float8", "futures-lite", "half", "hashbrown 0.15.5", @@ -1490,7 +1234,6 @@ dependencies = [ "serde_bytes", "serde_json", "spin", - "tracing", "wasm-bindgen-futures", "web-time", ] @@ -1518,7 +1261,6 @@ dependencies = [ "paste", "serde", "serde_json", - "tracing", "variadics_please", ] @@ -1539,28 +1281,6 @@ dependencies = [ "log", ] -[[package]] -name = "cubecl-cpu" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "152588a6e16b6bda5e8216af7a6fad3d7de4697294b6ce0f6acbe3a9029ff674" -dependencies = [ - "bytemuck", - "cubecl-common", - "cubecl-core", - "cubecl-opt", - "cubecl-runtime", - "cubecl-std", - "derive-new 0.7.0", - "half", - "log", - "paste", - "serde", - "sysinfo", - "tracel-llvm", - "tracel-llvm-bundler", -] - [[package]] name = "cubecl-cuda" version = "0.9.0" @@ -1578,38 +1298,6 @@ dependencies = [ "half", "log", "serde", - "tracing", -] - -[[package]] -name = "cubecl-hip" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbae9bc7ee6093d0d7a549c05873dff3478f9087b59eb09b223a97d642c849aa" -dependencies = [ - "bytemuck", - "cubecl-common", - "cubecl-core", - "cubecl-cpp", - "cubecl-hip-sys", - "cubecl-runtime", - "cubecl-zspace", - "derive-new 0.7.0", - "half", - "log", - "paste", - "serde", - "tracing", -] - -[[package]] -name = "cubecl-hip-sys" -version = "7.2.5321100" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "58887c6d217859c2261a868a3a6b66aa8f44ea2f4bfa51d0dbe4dcb0d1f5768d" -dependencies = [ - "libc", - "regex", ] [[package]] @@ -1704,30 +1392,11 @@ dependencies = [ "spin", "thiserror 2.0.18", "toml", - "tracing", "variadics_please", "wasm-bindgen-futures", "web-time", ] -[[package]] -name = "cubecl-std" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ff5741c98b7a7a5944b4afb0b67dd7f5e0be41ce7f303b587f8b0d6430b29b" -dependencies = [ - "cubecl-common", - "cubecl-core", - "cubecl-runtime", - "foldhash 0.1.5", - "half", - "num-traits", - "paste", - "serde", - "spin", - "variadics_please", -] - [[package]] name = "cubecl-wgpu" version = "0.9.0" @@ -1748,7 +1417,6 @@ dependencies = [ "hashbrown 0.15.5", "log", "sanitize-filename", - "tracing", "wgpu", ] @@ -1758,104 +1426,6 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7a0f819071413b19a00b7105497e0f6d2cf3e7e9d65cbb8d4ecf1ddb29c61dc2" -[[package]] -name = "cubek" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bb1cce47db02017925301bedec92ae84628493df3f9761ea7ac42a60c6146f8" -dependencies = [ - "cubecl", - "cubek-attention", - "cubek-convolution", - "cubek-matmul", - "cubek-quant", - "cubek-random", - "cubek-reduce", -] - -[[package]] -name = "cubek-attention" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7278bd122b2428af479f9af05285160613733c33c93b63ab3c6d25cd0460c18b" -dependencies = [ - "bytemuck", - "cubecl", - "cubecl-common", - "cubek-matmul", - "cubek-random", - "half", - "serde", -] - -[[package]] -name = "cubek-convolution" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18eb04bca4ae104d62a56def04b04f3d079c42fe49aac62202c96876f90fa28b" -dependencies = [ - "bytemuck", - "cubecl", - "cubecl-common", - "cubek-matmul", - "derive-new 0.7.0", - "enumset", - "half", - "serde", -] - -[[package]] -name = "cubek-matmul" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a28f3b04b113760e97c65a8a4dca9afc220744031eeecd5ad6cd0e3be91ba3a9" -dependencies = [ - "bytemuck", - "cubecl", - "cubecl-common", - "half", - "serde", -] - -[[package]] -name = "cubek-quant" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96ec3ae04af324df2d615c2b394e270d58d6f08cb833d67633e2ba794de75916" -dependencies = [ - "cubecl", - "cubecl-common", - "half", - "serde", -] - -[[package]] -name = "cubek-random" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65a34844d8b7f739185c1d24896137dcb73f458830444103b45f678585ad983e" -dependencies = [ - "cubecl", - "cubecl-common", - "half", - "num-traits", - "rand 0.9.4", - "serde", -] - -[[package]] -name = "cubek-reduce" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42397d9ed85bb3084dfb56ed26de75690b5b07caf42a32f4006b57eb23d5b6d6" -dependencies = [ - "cubecl", - "half", - "num-traits", - "serde", - "thiserror 2.0.18", -] - [[package]] name = "cudarc" version = "0.18.2" @@ -2009,17 +1579,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "derive_arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "derive_more" version = "2.1.1" @@ -2035,7 +1594,7 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "799a97264921d8623a957f6c3b9011f3b5492f557bbb7a5a19b7fa6d06ba8dcb" dependencies = [ - "convert_case 0.10.0", + "convert_case", "proc-macro2", "quote", "rustc_version", @@ -2043,12 +1602,6 @@ dependencies = [ "unicode-xid", ] -[[package]] -name = "deunicode" -version = "1.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04" - [[package]] name = "digest" version = "0.10.7" @@ -2143,22 +1696,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "15401da73a9ed8c80e3b2d4dc05fe10e7b72d7243b9f614e516a44fa99986e88" -[[package]] -name = "dyn-stack" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c4713e43e2886ba72b8271aa66c93d722116acf7a75555cce11dcde84388fe8" -dependencies = [ - "bytemuck", - "dyn-stack-macros", -] - -[[package]] -name = "dyn-stack-macros" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d926b4d407d372f141f93bb444696142c29d32962ccbd3531117cf3aa0bfa9" - [[package]] name = "ed25519" version = "2.2.3" @@ -2245,24 +1782,6 @@ dependencies = [ "embedded-hal 1.0.0", ] -[[package]] -name = "entities" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5320ae4c3782150d900b79807611a59a99fc9a1d61d686faafc24b93fc8d7ca" - -[[package]] -name = "enum-as-inner" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1e6a265c649f3f5979b601d26f1d05ada116434c87741c9493cb56218f76cbc" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "enumset" version = "1.1.13" @@ -2401,18 +1920,6 @@ dependencies = [ "half", ] -[[package]] -name = "float8" -version = "0.6.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719a903cc23e4a89e87962c2a80fdb45cdaad0983a89bd150bb57b4c8571a7d5" -dependencies = [ - "half", - "num-traits", - "rand 0.9.4", - "rand_distr 0.5.1", -] - [[package]] name = "fnv" version = "1.0.7" @@ -2568,125 +2075,6 @@ dependencies = [ "slab", ] -[[package]] -name = "gemm" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa0673db364b12263d103b68337a68fbecc541d6f6b61ba72fe438654709eacb" -dependencies = [ - "dyn-stack", - "gemm-c32", - "gemm-c64", - "gemm-common", - "gemm-f16", - "gemm-f32", - "gemm-f64", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "seq-macro", -] - -[[package]] -name = "gemm-c32" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "086936dbdcb99e37aad81d320f98f670e53c1e55a98bee70573e83f95beb128c" -dependencies = [ - "dyn-stack", - "gemm-common", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "seq-macro", -] - -[[package]] -name = "gemm-c64" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20c8aeeeec425959bda4d9827664029ba1501a90a0d1e6228e48bef741db3a3f" -dependencies = [ - "dyn-stack", - "gemm-common", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "seq-macro", -] - -[[package]] -name = "gemm-common" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88027625910cc9b1085aaaa1c4bc46bb3a36aad323452b33c25b5e4e7c8e2a3e" -dependencies = [ - "bytemuck", - "dyn-stack", - "half", - "libm", - "num-complex", - "num-traits", - "once_cell", - "paste", - "pulp", - "raw-cpuid", - "rayon", - "seq-macro", - "sysctl", -] - -[[package]] -name = "gemm-f16" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3df7a55202e6cd6739d82ae3399c8e0c7e1402859b30e4cb780e61525d9486e" -dependencies = [ - "dyn-stack", - "gemm-common", - "gemm-f32", - "half", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "rayon", - "seq-macro", -] - -[[package]] -name = "gemm-f32" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e0b8c9da1fbec6e3e3ab2ce6bc259ef18eb5f6f0d3e4edf54b75f9fd41a81c" -dependencies = [ - "dyn-stack", - "gemm-common", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "seq-macro", -] - -[[package]] -name = "gemm-f64" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "056131e8f2a521bfab322f804ccd652520c79700d81209e9d9275bbdecaadc6a" -dependencies = [ - "dyn-stack", - "gemm-common", - "num-complex", - "num-traits", - "paste", - "raw-cpuid", - "seq-macro", -] - [[package]] name = "generic-array" version = "0.14.7" @@ -2755,12 +2143,6 @@ dependencies = [ "xml-rs", ] -[[package]] -name = "glob" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" - [[package]] name = "glow" version = "0.16.0" @@ -2810,7 +2192,7 @@ dependencies = [ "log", "presser", "thiserror 1.0.69", - "windows 0.58.0", + "windows", ] [[package]] @@ -2825,31 +2207,12 @@ dependencies = [ ] [[package]] -name = "gpu-descriptor-types" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" -dependencies = [ - "bitflags", -] - -[[package]] -name = "h2" -version = "0.4.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9f37a958b41b3b19ee2707c06439c0e9e547e847223eb791ecb0cb821c65e27" -dependencies = [ - "atomic-waker", - "bytes", - "fnv", - "futures-core", - "futures-sink", - "http", - "indexmap", - "slab", - "tokio", - "tokio-util", - "tracing", +name = "gpu-descriptor-types" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fdf242682df893b86f33a73828fb09ca4b2d3bb6cc95249707fc684d27484b91" +dependencies = [ + "bitflags", ] [[package]] @@ -2862,21 +2225,10 @@ dependencies = [ "cfg-if", "crunchy", "num-traits", - "rand 0.9.4", - "rand_distr 0.5.1", "serde", "zerocopy", ] -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - [[package]] name = "hashbrown" version = "0.14.5" @@ -3163,7 +2515,7 @@ dependencies = [ "serde_json", "sha2", "tempfile", - "zip 6.0.0", + "zip", ] [[package]] @@ -3192,8 +2544,11 @@ name = "hft-research-ml" version = "0.1.0" dependencies = [ "anyhow", - "burn", + "burn-autodiff", + "burn-core", "burn-ndarray", + "burn-nn", + "burn-optim", "burn-store", "clap", "hex", @@ -3248,7 +2603,7 @@ dependencies = [ "sha2", "tokio", "tokio-util", - "zip 6.0.0", + "zip", ] [[package]] @@ -3335,7 +2690,6 @@ dependencies = [ "bytes", "futures-channel", "futures-core", - "h2", "http", "http-body", "httparse", @@ -3772,28 +3126,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55" dependencies = [ "cfg-if", - "windows-link 0.2.1", -] - -[[package]] -name = "liblzma" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45aec2360b3933207e27908049d8e4df4e476b58180afb1e56b2a4fb72efe4ba" -dependencies = [ - "liblzma-sys", - "num_cpus", -] - -[[package]] -name = "liblzma-sys" -version = "0.4.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a046c7f353ba30f810545151e04f63545833803f5b86ee3ddf1517247fe560a5" -dependencies = [ - "cc", - "libc", - "pkg-config", + "windows-link", ] [[package]] @@ -3991,7 +3324,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d1219ed1b7f229ee7104d281dd01d6802fe28bb6e95d292942c4daacdeb798c0" dependencies = [ "libc", - "stable_deref_trait", ] [[package]] @@ -4009,12 +3341,6 @@ dependencies = [ "paste", ] -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - [[package]] name = "miniz_oxide" version = "0.8.9" @@ -4144,13 +3470,15 @@ dependencies = [ ] [[package]] -name = "nom" -version = "7.1.3" +name = "nix" +version = "0.31.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" dependencies = [ - "memchr", - "minimal-lexical", + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", ] [[package]] @@ -4168,16 +3496,7 @@ version = "0.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2de2bc5b451bfedaef92c90b8939a8fff5770bdcc1fafd6239d086aab8fa6b29" dependencies = [ - "nom 8.0.0", -] - -[[package]] -name = "ntapi" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" -dependencies = [ - "winapi", + "nom", ] [[package]] @@ -4219,7 +3538,6 @@ version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" dependencies = [ - "bytemuck", "num-traits", ] @@ -4288,25 +3606,6 @@ dependencies = [ "malloc_buf", ] -[[package]] -name = "objc2-core-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" -dependencies = [ - "bitflags", -] - -[[package]] -name = "objc2-io-kit" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" -dependencies = [ - "libc", - "objc2-core-foundation", -] - [[package]] name = "object" version = "0.37.3" @@ -4378,7 +3677,7 @@ dependencies = [ "libc", "redox_syscall 0.5.18", "smallvec", - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -4634,29 +3933,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "pulp" -version = "0.22.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "046aa45b989642ec2e4717c8e72d677b13edd831a4d3b6cf37d9a3e54912496a" -dependencies = [ - "bytemuck", - "cfg-if", - "libm", - "num-complex", - "paste", - "pulp-wasm-simd-flag", - "raw-cpuid", - "reborrow", - "version_check", -] - -[[package]] -name = "pulp-wasm-simd-flag" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d8f70e07b9c3962945a74e59ca1c511bba65b6419468acc217c457d93f3c740" - [[package]] name = "quinn" version = "0.11.9" @@ -4854,15 +4130,6 @@ version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca45419789ae5a7899559e9512e58ca889e41f04f1f2445e9f4b290ceccd1d08" -[[package]] -name = "raw-cpuid" -version = "11.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "498cd0dc59d73224351ee52a95fee0f1a617a2eae0e7d9d720cc622c73a54186" -dependencies = [ - "bitflags", -] - [[package]] name = "raw-window-handle" version = "0.6.2" @@ -4895,12 +4162,6 @@ dependencies = [ "crossbeam-utils", ] -[[package]] -name = "reborrow" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03251193000f4bd3b042892be858ee50e8b3719f2b08e5833ac4353724632430" - [[package]] name = "redox_syscall" version = "0.5.18" @@ -4982,7 +4243,6 @@ dependencies = [ "futures-channel", "futures-core", "futures-util", - "h2", "http", "http-body", "http-body-util", @@ -5426,16 +4686,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "slug" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882a80f72ee45de3cc9a5afeb2da0331d58df69e4e7d8eeb5d3c7784ae67e724" -dependencies = [ - "deunicode", - "wasm-bindgen", -] - [[package]] name = "smallvec" version = "1.15.1" @@ -5591,34 +4841,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "sysctl" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01198a2debb237c62b6826ec7081082d951f46dbb64b0e8c7649a452230d1dfc" -dependencies = [ - "bitflags", - "byteorder", - "enum-as-inner", - "libc", - "thiserror 1.0.69", - "walkdir", -] - -[[package]] -name = "sysinfo" -version = "0.36.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "252800745060e7b9ffb7b2badbd8b31cfa4aa2e61af879d0a3bf2a317c20217d" -dependencies = [ - "libc", - "memchr", - "ntapi", - "objc2-core-foundation", - "objc2-io-kit", - "windows 0.61.3", -] - [[package]] name = "tar" version = "0.4.45" @@ -5652,17 +4874,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "text_placeholder" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5008f74a09742486ef0047596cf35df2b914e2a8dca5727fcb6ba6842a766b" -dependencies = [ - "hashbrown 0.13.2", - "serde", - "serde_json", -] - [[package]] name = "textdistance" version = "1.1.1" @@ -5962,85 +5173,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" -[[package]] -name = "tracel-llvm" -version = "20.1.4-7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "982535db9eb1a30ac0f2c50239a0eec3e5cf50993a88e92b04747bd2f4d365b2" -dependencies = [ - "tracel-mlir-rs", - "tracel-mlir-sys", -] - -[[package]] -name = "tracel-llvm-bundler" -version = "20.1.4-7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c75b8e477cb8d49d907afab029ca74d48459f5b88c27bdb4c6cd6acb5e61977" -dependencies = [ - "anyhow", - "bytes", - "constcat", - "dirs", - "liblzma", - "regex", - "reqwest", - "serde", - "serde_json", - "sha2", - "tar", - "walkdir", -] - -[[package]] -name = "tracel-mlir-rs" -version = "20.1.4-7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a478a35efd68d0ba73f747adfb7923b121c64e7f5be9cd8364ca1dcb772d5c" -dependencies = [ - "tracel-mlir-rs-macros", - "tracel-mlir-sys", -] - -[[package]] -name = "tracel-mlir-rs-macros" -version = "20.1.4-7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a94f36868c3b10b1825945223d99d106c73f4d249f063caa4651deeb9379344" -dependencies = [ - "comrak", - "convert_case 0.8.0", - "proc-macro2", - "quote", - "regex", - "syn 2.0.117", - "tracel-llvm-bundler", - "tracel-tblgen-rs", - "unindent", -] - -[[package]] -name = "tracel-mlir-sys" -version = "20.1.4-7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02f26d31af0c225a6d2e3d65d012fd6de848c9fc776897b152ee83b7d1bd15c4" -dependencies = [ - "tracel-llvm-bundler", -] - -[[package]] -name = "tracel-tblgen-rs" -version = "20.1.4-7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00d2581070380418ccc33b500f3739e4d4869421fdb477fcea51ff97c6253a52" -dependencies = [ - "bindgen", - "cc", - "paste", - "thiserror 2.0.18", - "tracel-llvm-bundler", -] - [[package]] name = "tracing" version = "0.1.44" @@ -6140,7 +5272,7 @@ dependencies = [ "libm", "maplit", "ndarray 0.16.1", - "nom 8.0.0", + "nom", "nom-language", "num-integer", "num-traits", @@ -6200,7 +5332,7 @@ dependencies = [ "liquid", "liquid-core", "log", - "nom 8.0.0", + "nom", "nom-language", "safetensors 0.6.2", "serde_json", @@ -6291,12 +5423,6 @@ dependencies = [ "rustc-hash 2.1.2", ] -[[package]] -name = "typed-arena" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6af6ae20167a9ece4bcb41af5b80f8a1f1df981f6391189ce00fd257af04126a" - [[package]] name = "typed-path" version = "0.12.3" @@ -6348,18 +5474,6 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" -[[package]] -name = "unicode_categories" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "39ec24b3121d976906ece63c9daad25b85969647682eee313cb5779fdd69e14e" - -[[package]] -name = "unindent" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3" - [[package]] name = "unsafe-libyaml" version = "0.2.11" @@ -6768,7 +5882,7 @@ dependencies = [ "wasm-bindgen", "web-sys", "wgpu-types", - "windows 0.58.0", + "windows", "windows-core 0.58.0", ] @@ -6827,28 +5941,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows" -version = "0.61.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" -dependencies = [ - "windows-collections", - "windows-core 0.61.2", - "windows-future", - "windows-link 0.1.3", - "windows-numerics", -] - -[[package]] -name = "windows-collections" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3beeceb5e5cfd9eb1d76b381630e82c4241ccd0d27f1a39ed41b2760b255c5e8" -dependencies = [ - "windows-core 0.61.2", -] - [[package]] name = "windows-core" version = "0.58.0" @@ -6862,19 +5954,6 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-core" -version = "0.61.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" -dependencies = [ - "windows-implement 0.60.2", - "windows-interface 0.59.3", - "windows-link 0.1.3", - "windows-result 0.3.4", - "windows-strings 0.4.2", -] - [[package]] name = "windows-core" version = "0.62.2" @@ -6883,22 +5962,11 @@ checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" dependencies = [ "windows-implement 0.60.2", "windows-interface 0.59.3", - "windows-link 0.2.1", + "windows-link", "windows-result 0.4.1", "windows-strings 0.5.1", ] -[[package]] -name = "windows-future" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" -dependencies = [ - "windows-core 0.61.2", - "windows-link 0.1.3", - "windows-threading", -] - [[package]] name = "windows-implement" version = "0.58.0" @@ -6943,28 +6011,12 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "windows-link" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" - [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-numerics" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9150af68066c4c5c07ddc0ce30421554771e528bde427614c61038bc2c92c2b1" -dependencies = [ - "windows-core 0.61.2", - "windows-link 0.1.3", -] - [[package]] name = "windows-result" version = "0.2.0" @@ -6974,22 +6026,13 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-result" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" -dependencies = [ - "windows-link 0.1.3", -] - [[package]] name = "windows-result" version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" dependencies = [ - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -7002,22 +6045,13 @@ dependencies = [ "windows-targets 0.52.6", ] -[[package]] -name = "windows-strings" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" -dependencies = [ - "windows-link 0.1.3", -] - [[package]] name = "windows-strings" version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" dependencies = [ - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -7044,7 +6078,7 @@ version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc" dependencies = [ - "windows-link 0.2.1", + "windows-link", ] [[package]] @@ -7069,7 +6103,7 @@ version = "0.53.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ - "windows-link 0.2.1", + "windows-link", "windows_aarch64_gnullvm 0.53.1", "windows_aarch64_msvc 0.53.1", "windows_i686_gnu 0.53.1", @@ -7080,15 +6114,6 @@ dependencies = [ "windows_x86_64_msvc 0.53.1", ] -[[package]] -name = "windows-threading" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b66463ad2e0ea3bbf808b7f1d371311c80e115c0b71d60efc142cafbcfb057a6" -dependencies = [ - "windows-link 0.1.3", -] - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" @@ -7421,28 +6446,17 @@ dependencies = [ [[package]] name = "zip" -version = "6.0.0" +version = "9.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b" +checksum = "6e04976da629d3b04204ba8105b396a193af8ad2583b2c79bfb3ab8af580a11e" dependencies = [ - "arbitrary", "crc32fast", "flate2", "indexmap", "memchr", - "zopfli", -] - -[[package]] -name = "zip" -version = "7.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c42e33efc22a0650c311c2ef19115ce232583abbe80850bc8b66509ebef02de0" -dependencies = [ - "crc32fast", - "indexmap", - "memchr", + "nix", "typed-path", + "zopfli", ] [[package]] diff --git a/rust_hft/research-core/Cargo.toml b/rust_hft/research-core/Cargo.toml index c94619250..7fdd1c9d4 100644 --- a/rust_hft/research-core/Cargo.toml +++ b/rust_hft/research-core/Cargo.toml @@ -20,7 +20,11 @@ tracing-subscriber = "0.3" chrono = { version = "0.4", features = ["serde"] } rust_decimal = { version = "1.33", features = ["serde"] } clap = { version = "4.0", features = ["derive"] } -burn = { version = "0.20.1", default-features = false, features = ["ndarray", "autodiff", "std"] } +# Keep the `burn` name for derive macros; use only the admitted CPU components. +burn = { package = "burn-core", version = "0.20.1", default-features = false, features = ["std"] } +burn-autodiff = { version = "0.20.1", default-features = false, features = ["std"] } +burn-nn = { version = "0.20.1", default-features = false, features = ["std"] } +burn-optim = { version = "0.20.1", default-features = false, features = ["std"] } burn-ndarray = "0.20.1" burn-store = { version = "0.20.1", default-features = false, features = ["std", "burnpack"] } diff --git a/rust_hft/research-core/artifacts/Cargo.toml b/rust_hft/research-core/artifacts/Cargo.toml index 1eae6d8c3..3190dffab 100644 --- a/rust_hft/research-core/artifacts/Cargo.toml +++ b/rust_hft/research-core/artifacts/Cargo.toml @@ -14,4 +14,4 @@ sha2 = { workspace = true } hex = "0.4" libc = "0.2" tempfile = "3" -zip = { version = "6", default-features = false, features = ["deflate"] } +zip = { version = "9.0.5", default-features = false, features = ["deflate"] } diff --git a/rust_hft/research-core/ml/Cargo.toml b/rust_hft/research-core/ml/Cargo.toml index 9f04594b3..a39a0dfc5 100644 --- a/rust_hft/research-core/ml/Cargo.toml +++ b/rust_hft/research-core/ml/Cargo.toml @@ -10,6 +10,9 @@ anyhow = "1" hft-cex-research-input = { path = "../cex-input", features = ["streaming", "market-parquet"] } hft-research-manifest = { path = "../manifest" } burn.workspace = true +burn-autodiff.workspace = true +burn-nn.workspace = true +burn-optim.workspace = true burn-ndarray.workspace = true burn-store.workspace = true clap.workspace = true diff --git a/rust_hft/research-core/ml/src/lib.rs b/rust_hft/research-core/ml/src/lib.rs index 59bdc2479..a1a121768 100644 --- a/rust_hft/research-core/ml/src/lib.rs +++ b/rust_hft/research-core/ml/src/lib.rs @@ -10,17 +10,17 @@ pub mod sequence; pub mod shared_input; use burn::{ - backend::{Autodiff, NdArray}, config::Config, module::{AutodiffModule, Module, Param}, - nn::{ - loss::{MseLoss, Reduction}, - Linear, LinearConfig, - }, - optim::{AdamConfig, GradientsParams, Optimizer}, tensor::{activation::relu, backend::Backend, Tensor, TensorData}, }; -use burn_ndarray::NdArrayDevice; +use burn_autodiff::Autodiff; +use burn_ndarray::{NdArray, NdArrayDevice}; +use burn_nn::{ + loss::{MseLoss, Reduction}, + Linear, LinearConfig, +}; +use burn_optim::{AdamConfig, GradientsParams, Optimizer}; use burn_store::{BurnpackStore, ModuleSnapshot}; pub use hft_research_manifest::mlp_training::{ MlpConvergenceDiagnosticsV1, MlpConvergencePolicyV1, MlpConvergenceStatusV1, diff --git a/rust_hft/research-core/ml/src/market_encoder/network.rs b/rust_hft/research-core/ml/src/market_encoder/network.rs index fd5f873e4..1fa3e2f11 100644 --- a/rust_hft/research-core/ml/src/market_encoder/network.rs +++ b/rust_hft/research-core/ml/src/market_encoder/network.rs @@ -1,13 +1,13 @@ use crate::{CpuAutodiffBackend, CpuBackend}; use burn::{ module::{Module, ModuleVisitor, Param}, - nn::{ - conv::{Conv1d, Conv1dConfig}, - Linear, LinearConfig, - }, - optim::GradientsParams, tensor::{activation::relu, backend::Backend, Tensor}, }; +use burn_nn::{ + conv::{Conv1d, Conv1dConfig}, + Linear, LinearConfig, +}; +use burn_optim::GradientsParams; use hft_research_manifest::market_encoder::MarketEncoderSpecV1; use sha2::{Digest, Sha256}; diff --git a/rust_hft/research-core/ml/src/market_encoder/training.rs b/rust_hft/research-core/ml/src/market_encoder/training.rs index da964b92d..c77512146 100644 --- a/rust_hft/research-core/ml/src/market_encoder/training.rs +++ b/rust_hft/research-core/ml/src/market_encoder/training.rs @@ -2,14 +2,14 @@ use super::{artifacts::*, network::*}; use crate::{lock_ndarray_backend, CpuAutodiffBackend, CpuBackend}; use burn::{ module::AutodiffModule, - nn::{ - loss::{MseLoss, Reduction}, - LinearConfig, - }, - optim::{AdamConfig, GradientsParams, Optimizer}, tensor::{backend::Backend, Tensor, TensorData}, }; use burn_ndarray::NdArrayDevice; +use burn_nn::{ + loss::{MseLoss, Reduction}, + LinearConfig, +}; +use burn_optim::{AdamConfig, GradientsParams, Optimizer}; use hft_cex_research_input::market_encoder::{ fit_market_scaling, MarketFeatureReader, MarketTaskReader, Moments, UnlabeledSequenceExample, }; diff --git a/rust_hft/research-core/ml/src/portable.rs b/rust_hft/research-core/ml/src/portable.rs index 44ba0036a..a64c6d417 100644 --- a/rust_hft/research-core/ml/src/portable.rs +++ b/rust_hft/research-core/ml/src/portable.rs @@ -2,13 +2,13 @@ use crate::CpuBackend; use burn::{ module::Param, - nn::{ - conv::{Conv1d, Conv1dConfig}, - Linear, LinearConfig, - }, tensor::{backend::Backend, Tensor, TensorData}, }; use burn_ndarray::NdArrayDevice; +use burn_nn::{ + conv::{Conv1d, Conv1dConfig}, + Linear, LinearConfig, +}; use hft_research_manifest::portable_network::{FrozenCausalConvV1, FrozenLinearV1}; pub(crate) fn linear(model: &Linear) -> Result { diff --git a/rust_hft/research-core/ml/src/sequence/training.rs b/rust_hft/research-core/ml/src/sequence/training.rs index 1b165ab12..896ff1e81 100644 --- a/rust_hft/research-core/ml/src/sequence/training.rs +++ b/rust_hft/research-core/ml/src/sequence/training.rs @@ -3,15 +3,15 @@ use crate::{lock_ndarray_backend, CpuAutodiffBackend, CpuBackend}; use burn::{ module::{AutodiffModule, Module, ModuleVisitor, Param}, - nn::{ - conv::{Conv1d, Conv1dConfig}, - loss::{MseLoss, Reduction}, - Linear, LinearConfig, - }, - optim::{AdamConfig, GradientsParams, Optimizer}, tensor::{activation::relu, backend::Backend, Tensor, TensorData}, }; use burn_ndarray::NdArrayDevice; +use burn_nn::{ + conv::{Conv1d, Conv1dConfig}, + loss::{MseLoss, Reduction}, + Linear, LinearConfig, +}; +use burn_optim::{AdamConfig, GradientsParams, Optimizer}; use burn_store::{BurnpackStore, ModuleSnapshot}; use hft_cex_research_input::sequence::{SequenceExample, SequenceReader}; use hft_research_manifest::portable_network::FrozenNetworkV1; diff --git a/rust_hft/research-core/platform/Cargo.lock b/rust_hft/research-core/platform/Cargo.lock index 92e380e5c..ac38f9d50 100644 --- a/rust_hft/research-core/platform/Cargo.lock +++ b/rust_hft/research-core/platform/Cargo.lock @@ -23,15 +23,6 @@ version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" -[[package]] -name = "arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" -dependencies = [ - "derive_arbitrary", -] - [[package]] name = "async-trait" version = "0.1.89" @@ -345,17 +336,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "derive_arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "digest" version = "0.10.7" @@ -1162,6 +1142,18 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "nix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "num-traits" version = "0.2.19" @@ -2048,6 +2040,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "typed-path" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e" + [[package]] name = "typenum" version = "1.20.0" @@ -2792,15 +2790,16 @@ dependencies = [ [[package]] name = "zip" -version = "6.0.0" +version = "9.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b" +checksum = "6e04976da629d3b04204ba8105b396a193af8ad2583b2c79bfb3ab8af580a11e" dependencies = [ - "arbitrary", "crc32fast", "flate2", "indexmap", "memchr", + "nix", + "typed-path", "zopfli", ] diff --git a/rust_hft/research-core/worker-io/Cargo.toml b/rust_hft/research-core/worker-io/Cargo.toml index cf810d5a8..73bd3b7f8 100644 --- a/rust_hft/research-core/worker-io/Cargo.toml +++ b/rust_hft/research-core/worker-io/Cargo.toml @@ -16,7 +16,7 @@ serde_json = { workspace = true } sha2 = { workspace = true } tokio = { workspace = true, features = ["fs", "io-util"] } tokio-util = { version = "0.7", features = ["io"] } -zip = { version = "6", default-features = false, features = ["deflate"] } +zip = { version = "9.0.5", default-features = false, features = ["deflate"] } [dev-dependencies] tempfile = "3" diff --git a/rust_hft/research-core/worker-io/src/archive.rs b/rust_hft/research-core/worker-io/src/archive.rs index 5d11cd24c..e45228076 100644 --- a/rust_hft/research-core/worker-io/src/archive.rs +++ b/rust_hft/research-core/worker-io/src/archive.rs @@ -23,7 +23,7 @@ pub fn verify_archive_entries( let mut total = 0_u64; for index in 0..archive.len() { let mut entry = archive.by_index(index)?; - let path = entry.name().to_owned(); + let path = entry.name()?.into_owned(); ensure!( seen.insert(path.clone()) && !entry.is_dir() @@ -82,6 +82,49 @@ pub fn verify_archive_entries( #[cfg(test)] mod tests { use super::*; + + #[test] + fn native_zip_rejects_symlinks_and_invalid_filename_encoding() -> Result<()> { + use std::io::{Cursor, Write}; + + let reference = ArchiveEntry { + path: "results/replay.json".into(), + sha256: crate::sha256(b"receipt"), + bytes: 7, + }; + let mut archive = zip::ZipWriter::new(Cursor::new(Vec::new())); + archive.add_symlink( + &reference.path, + "../../outside.json", + zip::write::SimpleFileOptions::default(), + )?; + let bytes = archive.finish()?.into_inner(); + assert!(verify_archive_entries(Cursor::new(bytes), &[reference], 1024).is_err()); + + let name = "results/é.json"; + let mut archive = zip::ZipWriter::new(Cursor::new(Vec::new())); + archive.start_file(name, zip::write::SimpleFileOptions::default())?; + archive.write_all(b"receipt")?; + let mut bytes = archive.finish()?.into_inner(); + // Corrupt the UTF-8 filename in both headers, leaving the payload intact. + let offsets = bytes + .windows(name.len()) + .enumerate() + .filter_map(|(index, value)| (value == name.as_bytes()).then_some(index)) + .collect::>(); + assert_eq!(offsets.len(), 2); + for offset in offsets { + bytes[offset + "results/".len()] = 0xff; + } + let reference = ArchiveEntry { + path: name.into(), + sha256: crate::sha256(b"receipt"), + bytes: 7, + }; + assert!(verify_archive_entries(Cursor::new(bytes), &[reference], 1024).is_err()); + Ok(()) + } + #[test] fn native_zip_entry_claims_require_actual_bytes_and_bounded_coverage() -> Result<()> { use std::io::{Cursor, Write}; diff --git a/rust_hft/shared/Cargo.lock b/rust_hft/shared/Cargo.lock index 880011e3e..5aaaa7203 100644 --- a/rust_hft/shared/Cargo.lock +++ b/rust_hft/shared/Cargo.lock @@ -93,15 +93,6 @@ version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" -[[package]] -name = "arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" -dependencies = [ - "derive_arbitrary", -] - [[package]] name = "arc-swap" version = "1.9.1" @@ -452,17 +443,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "derive_arbitrary" -version = "1.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e567bd82dcff979e4b03460c307b3cdc9e96fde3d73bed1496d2bc75d9dd62a" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "digest" version = "0.10.7" @@ -1398,6 +1378,18 @@ dependencies = [ "syn", ] +[[package]] +name = "nix" +version = "0.31.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cf20d2fde8ff38632c426f1165ed7436270b44f199fc55284c38276f9db47c3d" +dependencies = [ + "bitflags", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "nom" version = "7.1.3" @@ -2480,6 +2472,12 @@ version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8464ec13c3691491391d9fce00f6416c9a48e46972f72d7865688be2080192c9" +[[package]] +name = "typed-path" +version = "0.12.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8e28f89b80c87b8fb0cf04ab448d5dd0dd0ade2f8891bae878de66a75a28600e" + [[package]] name = "typenum" version = "1.20.0" @@ -3171,15 +3169,16 @@ dependencies = [ [[package]] name = "zip" -version = "6.0.0" +version = "9.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eb2a05c7c36fde6c09b08576c9f7fb4cda705990f73b58fe011abf7dfb24168b" +checksum = "6e04976da629d3b04204ba8105b396a193af8ad2583b2c79bfb3ab8af580a11e" dependencies = [ - "arbitrary", "crc32fast", "flate2", "indexmap", "memchr", + "nix", + "typed-path", "zopfli", ]