From c7997c23bc49ee802624d67f0485df4d0e5533fa Mon Sep 17 00:00:00 2001 From: Rahul Kumar Date: Tue, 9 Sep 2025 12:05:04 -0700 Subject: [PATCH 1/7] feat(examples): update StrongARM sizings --- Cargo.lock | 1176 ++++++++++++------ examples/latest/strongarm/Cargo.toml | 3 + examples/latest/strongarm/src/tb/mod.rs | 22 +- examples/latest/strongarm/src/tech/sky130.rs | 208 +++- tools/spectre/src/analysis/tran.rs | 8 +- 5 files changed, 1039 insertions(+), 378 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index aea4b6569..72240b3f2 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -13,9 +13,9 @@ dependencies = [ [[package]] name = "adler2" -version = "2.0.0" +version = "2.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" [[package]] name = "ahash" @@ -23,21 +23,21 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", "once_cell", "version_check", ] [[package]] name = "ahash" -version = "0.8.11" +version = "0.8.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" +checksum = "5a15f179cd60c4584b8a8c596927aadc462e27f2ca70c04e0071964a73ba7a75" dependencies = [ "cfg-if", "once_cell", "version_check", - "zerocopy 0.7.35", + "zerocopy", ] [[package]] @@ -49,12 +49,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - [[package]] name = "android_system_properties" version = "0.1.5" @@ -66,9 +60,9 @@ dependencies = [ [[package]] name = "anstream" -version = "0.6.18" +version = "0.6.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" +checksum = "3ae563653d1938f79b1ab1b5e668c87c76a9930414574a6583a7b7e11a8e6192" dependencies = [ "anstyle", "anstyle-parse", @@ -81,44 +75,44 @@ dependencies = [ [[package]] name = "anstyle" -version = "1.0.10" +version = "1.0.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" +checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd" [[package]] name = "anstyle-parse" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" +checksum = "4e7644824f0aa2c7b9384579234ef10eb7efb6a0deb83f9630a49594dd9c15c2" dependencies = [ "utf8parse", ] [[package]] name = "anstyle-query" -version = "1.1.2" +version = "1.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" +checksum = "9e231f6134f61b71076a3eab506c379d4f36122f2af15a9ff04415ea4c3339e2" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.60.2", ] [[package]] name = "anstyle-wincon" -version = "3.0.7" +version = "3.0.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" +checksum = "3e0633414522a32ffaac8ac6cc8f748e090c5717661fddeea04219e2344f5f2a" dependencies = [ "anstyle", - "once_cell", - "windows-sys 0.59.0", + "once_cell_polyfill", + "windows-sys 0.60.2", ] [[package]] name = "anyhow" -version = "1.0.98" +version = "1.0.99" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" +checksum = "b0674a1ddeecb70197781e945de4b3b8ffb61fa939a5597bcf48503737663100" [[package]] name = "aph_disjoint_set" @@ -173,13 +167,13 @@ checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" [[package]] name = "async-trait" -version = "0.1.88" +version = "0.1.89" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" +checksum = "9035ad2d096bed7955a320ee7e2230574d28fd3c3a0f186cbea1ff3c7eed5dbb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -213,15 +207,15 @@ checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" [[package]] name = "autocfg" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" [[package]] name = "axum" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de45108900e1f9b9242f7f2e254aa3e2c029c921c258fe9e6b4217eeebd54288" +checksum = "021e862c184ae977658b36c4500f7feac3221ca5da43e3f25bd04ab6c79a29b5" dependencies = [ "axum-core", "bytes", @@ -268,16 +262,16 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b62ddb9cb1ec0a098ad4bbf9344d0713fa193ae1a80af55febcff2627b6a00c1" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", "instant", "rand", ] [[package]] name = "backtrace" -version = "0.3.74" +version = "0.3.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002" dependencies = [ "addr2line", "cfg-if", @@ -285,7 +279,7 @@ dependencies = [ "miniz_oxide", "object", "rustc-demangle", - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -302,9 +296,9 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" [[package]] name = "bitflags" -version = "2.9.0" +version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" +checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" [[package]] name = "bitvec" @@ -347,7 +341,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -362,9 +356,9 @@ dependencies = [ [[package]] name = "bumpalo" -version = "3.17.0" +version = "3.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" +checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43" [[package]] name = "bytecheck" @@ -388,6 +382,12 @@ dependencies = [ "syn 1.0.109", ] +[[package]] +name = "bytemuck" +version = "1.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3995eaeebcdf32f91f980d360f78732ddc061097ab4e39991ae7a6ace9194677" + [[package]] name = "byteorder" version = "1.5.0" @@ -437,10 +437,11 @@ dependencies = [ [[package]] name = "cc" -version = "1.2.19" +version = "1.2.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362" +checksum = "5252b3d2648e5eedbc1a6f501e3c795e07025c1e93bbf8bbdd6eef7f447a6d54" dependencies = [ + "find-msvc-tools", "shlex", ] @@ -457,9 +458,9 @@ dependencies = [ [[package]] name = "cfg-if" -version = "1.0.0" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" +checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9" [[package]] name = "cfg_aliases" @@ -469,17 +470,16 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "chrono" -version = "0.4.40" +version = "0.4.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" +checksum = "145052bdd345b87320e369255277e3fb5152762ad123a901ef5c262dd38fe8d2" dependencies = [ - "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", "wasm-bindgen", - "windows-link", + "windows-link 0.2.0", ] [[package]] @@ -506,9 +506,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.37" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" +checksum = "7eac00902d9d136acd712710d71823fb8ac8004ca445a89e73a41d45aa712931" dependencies = [ "clap_builder", "clap_derive", @@ -516,9 +516,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.37" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" +checksum = "2ad9bbf750e73b5884fb8a211a9424a1906c1e156724260fdae972f31d70e1d6" dependencies = [ "anstream", "anstyle", @@ -528,21 +528,21 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.32" +version = "4.5.47" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" +checksum = "bbfd7eae0b0f1a6e63d4b13c9c478de77c2eb546fba158ad50b4203dc24b9f9c" dependencies = [ "heck", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] name = "clap_lex" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" +checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675" [[package]] name = "codegen" @@ -561,7 +561,7 @@ dependencies = [ "scir", "snippets", "substrate", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -579,11 +579,17 @@ dependencies = [ "substrate", ] +[[package]] +name = "color_quant" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" + [[package]] name = "colorchoice" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" +checksum = "b05b61dc5112cbb17e4b6cd61790d9845d13888356391624cbe7e41efeac1e75" [[package]] name = "config" @@ -595,7 +601,7 @@ dependencies = [ "log", "serde", "toml", - "toml_edit 0.22.24", + "toml_edit 0.22.27", "windows-sys 0.59.0", ] @@ -617,12 +623,58 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "core-foundation" +version = "0.9.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" +dependencies = [ + "core-foundation-sys", + "libc", +] + [[package]] name = "core-foundation-sys" version = "0.8.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" +[[package]] +name = "core-graphics" +version = "0.23.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c07782be35f9e1140080c6b96f0d44b739e2278479f64e02fdab4e32dfd8b081" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "core-graphics-types", + "foreign-types", + "libc", +] + +[[package]] +name = "core-graphics-types" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "45390e6114f68f718cc7a830514a96f903cccd70d02a8f6d9f643ac4ba45afaf" +dependencies = [ + "bitflags 1.3.2", + "core-foundation", + "libc", +] + +[[package]] +name = "core-text" +version = "20.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c9d2790b5c08465d49f8dc05c8bcae9fea467855947db39b0f8145c091aaced5" +dependencies = [ + "core-foundation", + "core-graphics", + "foreign-types", + "libc", +] + [[package]] name = "cpufeatures" version = "0.2.17" @@ -632,6 +684,15 @@ dependencies = [ "libc", ] +[[package]] +name = "crc32fast" +version = "1.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" +dependencies = [ + "cfg-if", +] + [[package]] name = "crossbeam-channel" version = "0.5.15" @@ -697,7 +758,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -708,7 +769,7 @@ checksum = "fc34b93ccb385b40dc71c6fceac4b2ad23662c7eeb248cf10d529b7e055b6ead" dependencies = [ "darling_core", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -720,18 +781,18 @@ dependencies = [ "proc-macro2", "quote", "semver", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] name = "derive-where" -version = "1.3.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2364b9aa47e460ce9bca6ac1777d14c98eef7e274eb077beed49f3adc94183ed" +checksum = "ef941ded77d15ca19b40374869ac6000af1c9f2a4c0f3d4c70926287e6364a8f" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -752,7 +813,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -762,7 +823,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ab63b0e2bf4d5928aff72e83a7dace85d7bba5fe12dcc3c5a572d78caffd3f3c" dependencies = [ "derive_builder_core", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -783,15 +844,15 @@ dependencies = [ "convert_case 0.7.1", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", "unicode-xid", ] [[package]] name = "deunicode" -version = "1.6.1" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc55fe0d1f6c107595572ec8b107c0999bb1a2e0b75e37429a4fb0d6474a0e7d" +checksum = "abd57806937c9cc163efc8ea3910e00a62e2aeb0b8119f1793a978088f8f6b04" [[package]] name = "diagnostics" @@ -811,11 +872,41 @@ dependencies = [ "crypto-common", ] +[[package]] +name = "dirs" +version = "6.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c3e8aa94d75141228480295a7d0e7feb620b1a5ad9f12bc40be62411e38cce4e" +dependencies = [ + "dirs-sys", +] + +[[package]] +name = "dirs-sys" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e01a3366d27ee9890022452ee61b2b63a67e6f13f58900b651ff5665f0bb1fab" +dependencies = [ + "libc", + "option-ext", + "redox_users", + "windows-sys 0.61.0", +] + +[[package]] +name = "dlib" +version = "0.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "330c60081dcc4c72131f8eb70510f1ac07223e5d4163db481a04a0befcffa412" +dependencies = [ + "libloading", +] + [[package]] name = "downcast-rs" -version = "2.0.1" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea8a8b81cacc08888170eef4d13b775126db426d0b348bee9d18c2c1eaf123cf" +checksum = "117240f60069e65410b3ae1bb213295bd828f707b5bec6596a1afc8793ce0cbc" [[package]] name = "duplicate" @@ -828,6 +919,18 @@ dependencies = [ "proc-macro2-diagnostics", ] +[[package]] +name = "dwrote" +version = "0.11.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "20c93d234bac0cdd0e2ac08bc8a5133f8df2169e95b262dfcea5e5cb7855672f" +dependencies = [ + "lazy_static", + "libc", + "winapi", + "wio", +] + [[package]] name = "either" version = "1.15.0" @@ -860,7 +963,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -892,12 +995,12 @@ checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" [[package]] name = "errno" -version = "0.3.11" +version = "0.3.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" +checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] @@ -922,12 +1025,37 @@ version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" +[[package]] +name = "fdeflate" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" +dependencies = [ + "simd-adler32", +] + +[[package]] +name = "find-msvc-tools" +version = "0.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7fd99930f64d146689264c637b5af2f0233a933bef0d8570e2526bf9e083192d" + [[package]] name = "fixedbitset" version = "0.5.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99" +[[package]] +name = "flate2" +version = "1.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d" +dependencies = [ + "crc32fast", + "miniz_oxide", +] + [[package]] name = "flexbuffers" version = "25.2.10" @@ -941,6 +1069,12 @@ dependencies = [ "serde_derive", ] +[[package]] +name = "float-ord" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8ce81f49ae8a0482e4c55ea62ebbd7e5a686af544c00b9d090bba3ff9be97b3d" + [[package]] name = "float_eq" version = "1.0.1" @@ -953,6 +1087,69 @@ version = "1.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" +[[package]] +name = "font-kit" +version = "0.14.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2c7e611d49285d4c4b2e1727b72cf05353558885cc5252f93707b845dfcaf3d3" +dependencies = [ + "bitflags 2.9.4", + "byteorder", + "core-foundation", + "core-graphics", + "core-text", + "dirs", + "dwrote", + "float-ord", + "freetype-sys", + "lazy_static", + "libc", + "log", + "pathfinder_geometry", + "pathfinder_simd", + "walkdir", + "winapi", + "yeslogic-fontconfig-sys", +] + +[[package]] +name = "foreign-types" +version = "0.5.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d737d9aa519fb7b749cbc3b962edcf310a8dd1f4b67c91c4f83975dbdd17d965" +dependencies = [ + "foreign-types-macros", + "foreign-types-shared", +] + +[[package]] +name = "foreign-types-macros" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1a5c6c585bc94aaf2c7b51dd4c2ba22680844aba4c687be581871a6f518c5742" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", +] + +[[package]] +name = "foreign-types-shared" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa9a19cbb55df58761df49b23516a86d432839add4af60fc256da840f66ed35b" + +[[package]] +name = "freetype-sys" +version = "0.20.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e7edc5b9669349acfda99533e9e0bcf26a51862ab43b08ee7745c55d28eb134" +dependencies = [ + "cc", + "libc", + "pkg-config", +] + [[package]] name = "fs4" version = "0.12.0" @@ -993,7 +1190,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -1085,30 +1282,40 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] name = "getrandom" -version = "0.2.15" +version = "0.2.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4567c8db10ae91089c99af84c68c38da3ec2f087c3f82960bcdbf3656b6f4d7" +checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" dependencies = [ "cfg-if", "libc", - "wasi 0.11.0+wasi-snapshot-preview1", + "wasi 0.11.1+wasi-snapshot-preview1", ] [[package]] name = "getrandom" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" +checksum = "26145e563e54f2cadc477553f1ec5ee650b00862f0a58bcd12cbdc5f0ea2d2f4" dependencies = [ "cfg-if", "libc", "r-efi", - "wasi 0.14.2+wasi-0.2.4", + "wasi 0.14.4+wasi-0.2.4", +] + +[[package]] +name = "gif" +version = "0.12.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "80792593675e051cf94a4b111980da2ba60d4a83e43e0048c5693baab3977045" +dependencies = [ + "color_quant", + "weezl", ] [[package]] @@ -1126,8 +1333,8 @@ dependencies = [ "aho-corasick", "bstr", "log", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", + "regex-automata", + "regex-syntax", ] [[package]] @@ -1136,7 +1343,7 @@ version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0bf760ebf69878d9fd8f110c89703d90ce35095324d1f1edcb595c63945ee757" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.4", "ignore", "walkdir", ] @@ -1152,9 +1359,9 @@ dependencies = [ [[package]] name = "h2" -version = "0.4.9" +version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75249d144030531f8dee69fe9cea04d3edf809a017ae445e2abdff6629e86633" +checksum = "f3c0b69cfcb4e1b9f1bf2f53f95f766e4661169728ec61cd3fe5a0166f2d1386" dependencies = [ "atomic-waker", "bytes", @@ -1184,14 +1391,14 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.11", + "ahash 0.8.12", ] [[package]] name = "hashbrown" -version = "0.15.2" +version = "0.15.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" +checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" [[package]] name = "hashlink" @@ -1271,13 +1478,14 @@ dependencies = [ [[package]] name = "hyper" -version = "1.6.0" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" +checksum = "eb3aa54a13a0dfe7fbe3a59e0c76093041720fdc77b110cc0fc260fafb4dc51e" dependencies = [ + "atomic-waker", "bytes", "futures-channel", - "futures-util", + "futures-core", "h2", "http", "http-body", @@ -1285,6 +1493,7 @@ dependencies = [ "httpdate", "itoa", "pin-project-lite", + "pin-utils", "smallvec", "tokio", "want", @@ -1305,19 +1514,20 @@ dependencies = [ [[package]] name = "hyper-util" -version = "0.1.11" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" +checksum = "8d9b05277c7e8da2c93a568989bb6207bef0112e8d17df7a6eda4a3cf143bc5e" dependencies = [ "bytes", "futures-channel", + "futures-core", "futures-util", "http", "http-body", "hyper", "libc", "pin-project-lite", - "socket2", + "socket2 0.6.0", "tokio", "tower-service", "tracing", @@ -1363,12 +1573,26 @@ dependencies = [ "globset", "log", "memchr", - "regex-automata 0.4.9", + "regex-automata", "same-file", "walkdir", "winapi-util", ] +[[package]] +name = "image" +version = "0.24.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" +dependencies = [ + "bytemuck", + "byteorder", + "color_quant", + "jpeg-decoder", + "num-traits", + "png", +] + [[package]] name = "impl-trait-for-tuples" version = "0.2.3" @@ -1377,17 +1601,17 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] name = "indexmap" -version = "2.9.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" +checksum = "206a8042aec68fa4a62e8d3f7aa4ceb508177d9324faf261e1959e495b7a1921" dependencies = [ "equivalent", - "hashbrown 0.15.2", + "hashbrown 0.15.5", "serde", ] @@ -1409,6 +1633,17 @@ dependencies = [ "num-traits", ] +[[package]] +name = "io-uring" +version = "0.7.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "046fa2d4d00aea763528b4950358d0ead425372445dc8ff86312b3c69ff7727b" +dependencies = [ + "bitflags 2.9.4", + "cfg-if", + "libc", +] + [[package]] name = "is_terminal_polyfill" version = "1.70.1" @@ -1430,11 +1665,17 @@ version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" +[[package]] +name = "jpeg-decoder" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00810f1d8b74be64b13dbf3db89ac67740615d6c891f0e7b6179326533011a07" + [[package]] name = "js-sys" -version = "0.3.77" +version = "0.3.78" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" +checksum = "0c0b063578492ceec17683ef2f8c5e89121fbd0b172cbc280635ab7567db2738" dependencies = [ "once_cell", "wasm-bindgen", @@ -1476,15 +1717,35 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.172" +version = "0.2.175" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543" + +[[package]] +name = "libloading" +version = "0.8.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" +checksum = "07033963ba89ebaf1584d767badaa2e8fcec21aedea6b8c0346d487d49c28667" +dependencies = [ + "cfg-if", + "windows-targets 0.53.3", +] [[package]] name = "libm" -version = "0.2.11" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" +checksum = "f9fbbcab51052fe104eb5e5d351cf728d30a5be1fe14d9be8a3b097481fb97de" + +[[package]] +name = "libredox" +version = "0.1.9" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "391290121bad3d37fbddad76d8f5d1c1c314cfc646d143d7e07a3086ddff0ce3" +dependencies = [ + "bitflags 2.9.4", + "libc", +] [[package]] name = "libsqlite3-sys" @@ -1505,15 +1766,15 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" [[package]] name = "linux-raw-sys" -version = "0.9.4" +version = "0.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" +checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039" [[package]] name = "log" -version = "0.4.27" +version = "0.4.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" +checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432" [[package]] name = "macrotools" @@ -1522,7 +1783,7 @@ dependencies = [ "darling", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -1551,11 +1812,11 @@ dependencies = [ [[package]] name = "matchers" -version = "0.1.0" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" +checksum = "d1525a2a28c7f4fa0fc98bb91ae755d1e2d1505079e05539e35bc876b5d65ae9" dependencies = [ - "regex-automata 0.1.10", + "regex-automata", ] [[package]] @@ -1566,9 +1827,9 @@ checksum = "47e1ffaa40ddd1f3ed91f717a33c8c0ee23fff369e3aa8772b9605cc1d22f4c3" [[package]] name = "memchr" -version = "2.7.4" +version = "2.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" +checksum = "32a282da65faaf38286cf3be983213fcf1d2e2a58700e808f83f4ea9a4804bc0" [[package]] name = "mime" @@ -1578,29 +1839,30 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "miniz_oxide" -version = "0.8.8" +version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" +checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" dependencies = [ "adler2", + "simd-adler32", ] [[package]] name = "mio" -version = "1.0.3" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" +checksum = "78bed444cc8a2160f01cbcf811ef18cac863ad68ae8ca62092e8db51d51c761c" dependencies = [ "libc", - "wasi 0.11.0+wasi-snapshot-preview1", - "windows-sys 0.52.0", + "wasi 0.11.1+wasi-snapshot-preview1", + "windows-sys 0.59.0", ] [[package]] name = "multimap" -version = "0.10.0" +version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" +checksum = "1d87ecb2933e8aeadb3e3a02b828fed80a7528047e68b4f424523a0981a3a084" [[package]] name = "netgen" @@ -1647,12 +1909,11 @@ dependencies = [ [[package]] name = "nu-ansi-term" -version = "0.46.0" +version = "0.50.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" +checksum = "d4a28e057d01f97e61255210fcff094d74ed0466038633e95017f5beb68e4399" dependencies = [ - "overload", - "winapi", + "windows-sys 0.52.0", ] [[package]] @@ -1698,7 +1959,7 @@ checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -1790,10 +2051,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" [[package]] -name = "overload" -version = "0.1.1" +name = "once_cell_polyfill" +version = "1.70.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" +checksum = "a4895175b425cb1f87721b59f0f286c2092bd4af812243672510e1ac53e2e0ad" + +[[package]] +name = "option-ext" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" [[package]] name = "parse-zoneinfo" @@ -1828,6 +2095,25 @@ dependencies = [ "once_cell", ] +[[package]] +name = "pathfinder_geometry" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0b7b7e7b4ea703700ce73ebf128e1450eb69c3a8329199ffbfb9b2a0418e5ad3" +dependencies = [ + "log", + "pathfinder_simd", +] + +[[package]] +name = "pathfinder_simd" +version = "0.5.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bf9027960355bf3afff9841918474a81a5f972ac6d226d518060bba758b5ad57" +dependencies = [ + "rustc_version", +] + [[package]] name = "pathfinding" version = "4.14.0" @@ -1859,15 +2145,15 @@ dependencies = [ [[package]] name = "percent-encoding" -version = "2.3.1" +version = "2.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" +checksum = "9b4f627cb1b25917193a259e49bdad08f671f8d9708acfd5fe0a8c1455d87220" [[package]] name = "pest" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "198db74531d58c70a361c42201efde7e2591e976d518caf7662a47dc5720e7b6" +checksum = "1db05f56d34358a8b1066f67cbb203ee3e7ed2ba674a6263a1d5ec6db2204323" dependencies = [ "memchr", "thiserror", @@ -1876,9 +2162,9 @@ dependencies = [ [[package]] name = "pest_derive" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d725d9cfd79e87dccc9341a2ef39d1b6f6353d68c4b33c177febbe1a402c97c5" +checksum = "bb056d9e8ea77922845ec74a1c4e8fb17e7c218cc4fc11a15c5d25e189aa40bc" dependencies = [ "pest", "pest_generator", @@ -1886,24 +2172,23 @@ dependencies = [ [[package]] name = "pest_generator" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db7d01726be8ab66ab32f9df467ae8b1148906685bbe75c82d1e65d7f5b3f841" +checksum = "87e404e638f781eb3202dc82db6760c8ae8a1eeef7fb3fa8264b2ef280504966" dependencies = [ "pest", "pest_meta", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] name = "pest_meta" -version = "2.8.0" +version = "2.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f9f832470494906d1fca5329f8ab5791cc60beb230c74815dff541cbd2b5ca0" +checksum = "edd1101f170f5903fde0914f899bb503d9ff5271d7ba76bbb70bea63690cc0d5" dependencies = [ - "once_cell", "pest", "sha2", ] @@ -1973,7 +2258,7 @@ checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -1994,23 +2279,82 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" +[[package]] +name = "plotters" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747" +dependencies = [ + "chrono", + "font-kit", + "image", + "lazy_static", + "num-traits", + "pathfinder_geometry", + "plotters-backend", + "plotters-bitmap", + "plotters-svg", + "ttf-parser", + "wasm-bindgen", + "web-sys", +] + +[[package]] +name = "plotters-backend" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a" + +[[package]] +name = "plotters-bitmap" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72ce181e3f6bf82d6c1dc569103ca7b1bd964c60ba03d7e6cdfbb3e3eb7f7405" +dependencies = [ + "gif", + "image", + "plotters-backend", +] + +[[package]] +name = "plotters-svg" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670" +dependencies = [ + "plotters-backend", +] + +[[package]] +name = "png" +version = "0.17.16" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" +dependencies = [ + "bitflags 1.3.2", + "crc32fast", + "fdeflate", + "flate2", + "miniz_oxide", +] + [[package]] name = "ppv-lite86" version = "0.2.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" dependencies = [ - "zerocopy 0.8.24", + "zerocopy", ] [[package]] name = "prettyplease" -version = "0.2.32" +version = "0.2.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" +checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b" dependencies = [ "proc-macro2", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -2029,7 +2373,7 @@ version = "3.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "edce586971a4dfaa28950c6f18ed55e0406c1ab88bbce2c6f6293a7aaba73d35" dependencies = [ - "toml_edit 0.22.24", + "toml_edit 0.22.27", ] [[package]] @@ -2058,9 +2402,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.95" +version = "1.0.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" +checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de" dependencies = [ "unicode-ident", ] @@ -2073,7 +2417,7 @@ checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", "version_check", "yansi", ] @@ -2104,7 +2448,7 @@ dependencies = [ "prost", "prost-types", "regex", - "syn 2.0.100", + "syn 2.0.106", "tempfile", ] @@ -2118,7 +2462,7 @@ dependencies = [ "itertools", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -2190,9 +2534,9 @@ dependencies = [ [[package]] name = "r-efi" -version = "5.2.0" +version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" +checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" [[package]] name = "radium" @@ -2227,52 +2571,48 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" dependencies = [ - "getrandom 0.2.15", + "getrandom 0.2.16", ] [[package]] -name = "regex" -version = "1.11.1" +name = "redox_users" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" +checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac" dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.9", - "regex-syntax 0.8.5", + "getrandom 0.2.16", + "libredox", + "thiserror", ] [[package]] -name = "regex-automata" -version = "0.1.10" +name = "regex" +version = "1.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" +checksum = "23d7fd106d8c02486a8d64e778353d1cffe08ce79ac2e82f540c86d0facf6912" dependencies = [ - "regex-syntax 0.6.29", + "aho-corasick", + "memchr", + "regex-automata", + "regex-syntax", ] [[package]] name = "regex-automata" -version = "0.4.9" +version = "0.4.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" +checksum = "6b9458fa0bfeeac22b5ca447c63aaf45f28439a709ccd244698632f9aa6394d6" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.8.5", + "regex-syntax", ] [[package]] name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" +checksum = "caf4aa5b0f434c91fe5c7f1ecb6a5ece2130b02ad2a590589dda5146df959001" [[package]] name = "rend" @@ -2337,7 +2677,7 @@ version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.4", "fallible-iterator", "fallible-streaming-iterator", "hashlink", @@ -2347,9 +2687,9 @@ dependencies = [ [[package]] name = "rust_decimal" -version = "1.37.1" +version = "1.37.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "faa7de2ba56ac291bd90c6b9bece784a52ae1411f9506544b3eae36dd2356d50" +checksum = "b203a6425500a03e0919c42d3c47caca51e79f1132046626d2c8871c5092035d" dependencies = [ "arrayvec", "borsh", @@ -2368,14 +2708,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6268b74858287e1a062271b988a0c534bf85bbeb567fe09331bf40ed78113d5" dependencies = [ "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] name = "rustc-demangle" -version = "0.1.24" +version = "0.1.26" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" +checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace" [[package]] name = "rustc-hash" @@ -2389,13 +2729,22 @@ version = "2.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "357703d41365b4b27c590e3ed91eabb1b663f07c4c084095e60cbed4362dff0d" +[[package]] +name = "rustc_version" +version = "0.4.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +dependencies = [ + "semver", +] + [[package]] name = "rustix" version = "0.38.44" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.4", "errno", "libc", "linux-raw-sys 0.4.15", @@ -2404,22 +2753,22 @@ dependencies = [ [[package]] name = "rustix" -version = "1.0.5" +version = "1.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" +checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e" dependencies = [ - "bitflags 2.9.0", + "bitflags 2.9.4", "errno", "libc", - "linux-raw-sys 0.9.4", - "windows-sys 0.59.0", + "linux-raw-sys 0.11.0", + "windows-sys 0.61.0", ] [[package]] name = "rustversion" -version = "1.0.20" +version = "1.0.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" +checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "ryu" @@ -2482,14 +2831,14 @@ checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] name = "serde_json" -version = "1.0.140" +version = "1.0.143" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" +checksum = "d401abef1d108fbd9cbaebc3e46611f4b1021f714a0597a71f41ee463f5f4a5a" dependencies = [ "itoa", "memchr", @@ -2499,9 +2848,9 @@ dependencies = [ [[package]] name = "serde_spanned" -version = "0.6.8" +version = "0.6.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" +checksum = "bf41e0cfaf7226dca15e8197172c295a782857fcb97fad1808a166870dee75a3" dependencies = [ "serde", ] @@ -2521,9 +2870,9 @@ dependencies = [ [[package]] name = "sha2" -version = "0.10.8" +version = "0.10.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" +checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283" dependencies = [ "cfg-if", "cpufeatures", @@ -2547,13 +2896,19 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "signal-hook-registry" -version = "1.4.2" +version = "1.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9e9e0b4211b72e7b8b6e85c807d36c212bdb33ea8587f7569562a84df5465b1" +checksum = "b2a4719bff48cee6b39d12c020eeb490953ad2443b7055bd0b21fca26bd8c28b" dependencies = [ "libc", ] +[[package]] +name = "simd-adler32" +version = "0.3.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d66dc143e6b11c1eddc06d5c423cfc97062865baf299914ab64caa38182078fe" + [[package]] name = "simdutf8" version = "0.1.5" @@ -2635,12 +2990,9 @@ dependencies = [ [[package]] name = "slab" -version = "0.4.9" +version = "0.4.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] +checksum = "7a2ae44ef20feb57a68b23d846850f861394c2e02dc425a50098ae8c90267589" [[package]] name = "slotmap" @@ -2663,9 +3015,9 @@ dependencies = [ [[package]] name = "smallvec" -version = "1.15.0" +version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" +checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" [[package]] name = "smawk" @@ -2683,14 +3035,24 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.9" +version = "0.5.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" +checksum = "e22376abed350d73dd1cd119b57ffccad95b4e585a7cda43e286245ce23c0678" dependencies = [ "libc", "windows-sys 0.52.0", ] +[[package]] +name = "socket2" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "233504af464074f9d066d7b5416c5f9b894a5862a6506e306f7b816cdd6f1807" +dependencies = [ + "libc", + "windows-sys 0.59.0", +] + [[package]] name = "spectre" version = "0.11.2" @@ -2779,6 +3141,7 @@ dependencies = [ "itertools", "layir", "pegasus", + "plotters", "quantus", "rust_decimal", "rust_decimal_macros", @@ -2859,9 +3222,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.100" +version = "2.0.106" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" +checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6" dependencies = [ "proc-macro2", "quote", @@ -2882,15 +3245,15 @@ checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] name = "tempfile" -version = "3.19.1" +version = "3.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" +checksum = "84fa4d11fadde498443cca10fd3ac23c951f0dc59e080e9f4b93d4df4e4eea53" dependencies = [ "fastrand", - "getrandom 0.3.2", + "getrandom 0.3.3", "once_cell", - "rustix 1.0.5", - "windows-sys 0.59.0", + "rustix 1.1.2", + "windows-sys 0.61.0", ] [[package]] @@ -2917,9 +3280,9 @@ dependencies = [ [[package]] name = "test-log" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7f46083d221181166e5b6f6b1e5f1d499f3a76888826e6cb1d057554157cd0f" +checksum = "1e33b98a582ea0be1168eba097538ee8dd4bbe0f2b01b22ac92ea30054e5be7b" dependencies = [ "env_logger", "test-log-macros", @@ -2928,13 +3291,13 @@ dependencies = [ [[package]] name = "test-log-macros" -version = "0.2.17" +version = "0.2.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "888d0c3c6db53c0fdab160d2ed5e12ba745383d3e85813f2ea0f2b1475ab553f" +checksum = "451b374529930d7601b1eef8d32bc79ae870b6079b069401709c2a8bf9e75f36" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -2950,39 +3313,38 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" +checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "2.0.12" +version = "2.0.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" +checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] name = "thread_local" -version = "1.1.8" +version = "1.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" +checksum = "f60246a4944f24f6e018aa17cdeffb7818b76356965d03b07d6a9886e8962185" dependencies = [ "cfg-if", - "once_cell", ] [[package]] name = "tinyvec" -version = "1.9.0" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09b3661f17e86524eccd4371ab0429194e0d7c008abb45f7a7495b1719463c71" +checksum = "bfa5fdc3bce6191a1dbc8c02d5c8bffcf557bafa17c124c5264a458f1b0613fa" dependencies = [ "tinyvec_macros", ] @@ -2995,19 +3357,21 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.44.2" +version = "1.47.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" +checksum = "89e49afdadebb872d3145a5638b59eb0691ea23e46ca484037cfab3b76b95038" dependencies = [ "backtrace", "bytes", + "io-uring", "libc", "mio", "pin-project-lite", "signal-hook-registry", - "socket2", + "slab", + "socket2 0.6.0", "tokio-macros", - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -3018,7 +3382,7 @@ checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -3045,9 +3409,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.14" +version = "0.7.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b9590b93e6fcc1739458317cccd391ad3955e2bde8913edf6f95f9e65a8f034" +checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5" dependencies = [ "bytes", "futures-core", @@ -3058,21 +3422,21 @@ dependencies = [ [[package]] name = "toml" -version = "0.8.20" +version = "0.8.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" +checksum = "dc1beb996b9d83529a9e75c17a1686767d148d70663143c7854d8b4a09ced362" dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.24", + "toml_edit 0.22.27", ] [[package]] name = "toml_datetime" -version = "0.6.8" +version = "0.6.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" +checksum = "22cddaf88f4fbc13c51aebbf5f8eceb5c7c5a9da2ac40a13519eb5b0a0e8f11c" dependencies = [ "serde", ] @@ -3090,22 +3454,29 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.24" +version = "0.22.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" +checksum = "41fe8c660ae4257887cf66394862d21dbca4a6ddd26f04a3560410406a2f819a" dependencies = [ "indexmap", "serde", "serde_spanned", "toml_datetime", - "winnow 0.7.6", + "toml_write", + "winnow 0.7.13", ] +[[package]] +name = "toml_write" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d99f8c9a7727884afe522e9bd5edbfc91a3312b36a77b5fb8926e4c31a41801" + [[package]] name = "tonic" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85839f0b32fd242bb3209262371d07feda6d780d16ee9d2bc88581b89da1549b" +checksum = "7e581ba15a835f4d9ea06c55ab1bd4dce26fc53752c69a04aac00703bfb49ba9" dependencies = [ "async-trait", "axum", @@ -3121,7 +3492,7 @@ dependencies = [ "percent-encoding", "pin-project", "prost", - "socket2", + "socket2 0.5.10", "tokio", "tokio-stream", "tower", @@ -3132,16 +3503,16 @@ dependencies = [ [[package]] name = "tonic-build" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d85f0383fadd15609306383a90e85eaed44169f931a5d2be1b42c76ceff1825e" +checksum = "eac6f67be712d12f0b41328db3137e0d0757645d8904b4cb7d51cd9c2279e847" dependencies = [ "prettyplease", "proc-macro2", "prost-build", "prost-types", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -3188,20 +3559,20 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.28" +version = "0.1.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" +checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] name = "tracing-core" -version = "0.1.33" +version = "0.1.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" +checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678" dependencies = [ "once_cell", "valuable", @@ -3220,14 +3591,14 @@ dependencies = [ [[package]] name = "tracing-subscriber" -version = "0.3.19" +version = "0.3.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" +checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5" dependencies = [ "matchers", "nu-ansi-term", "once_cell", - "regex", + "regex-automata", "sharded-slab", "smallvec", "thread_local", @@ -3242,6 +3613,12 @@ version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" +[[package]] +name = "ttf-parser" +version = "0.20.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "17f77d76d837a7830fe1d4f12b7b4ba4192c1888001c7164257e4bc6d21d96b4" + [[package]] name = "type_dispatch" version = "0.5.1" @@ -3258,7 +3635,7 @@ dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", "type_dispatch", ] @@ -3350,9 +3727,9 @@ checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" [[package]] name = "unicode-width" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" +checksum = "4a1a07cc7db3810833284e8d372ccdc6da29741639ecc70c9ec107df0fa6154c" [[package]] name = "unicode-xid" @@ -3382,9 +3759,13 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.16.0" +version = "1.18.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458f7a779bf54acc9f347480ac654f68407d3aab21269a6e3c9f922acd9e2da9" +checksum = "2f87b8aa10b915a06587d0dec516c282ff295b475d94abf425d62b57710070a2" +dependencies = [ + "js-sys", + "wasm-bindgen", +] [[package]] name = "valuable" @@ -3453,50 +3834,51 @@ dependencies = [ [[package]] name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" +version = "0.11.1+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" +checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasi" -version = "0.14.2+wasi-0.2.4" +version = "0.14.4+wasi-0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" +checksum = "88a5f4a424faf49c3c2c344f166f0662341d470ea185e939657aaff130f0ec4a" dependencies = [ - "wit-bindgen-rt", + "wit-bindgen", ] [[package]] name = "wasm-bindgen" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" +checksum = "7e14915cadd45b529bb8d1f343c4ed0ac1de926144b746e2710f9cd05df6603b" dependencies = [ "cfg-if", "once_cell", "rustversion", "wasm-bindgen-macro", + "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-backend" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" +checksum = "e28d1ba982ca7923fd01448d5c30c6864d0a14109560296a162f80f305fb93bb" dependencies = [ "bumpalo", "log", "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-macro" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" +checksum = "7c3d463ae3eff775b0c45df9da45d68837702ac35af998361e2c84e7c5ec1b0d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -3504,26 +3886,42 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" +checksum = "7bb4ce89b08211f923caf51d527662b75bdc9c9c7aab40f86dcb9fb85ac552aa" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", "wasm-bindgen-backend", "wasm-bindgen-shared", ] [[package]] name = "wasm-bindgen-shared" -version = "0.2.100" +version = "0.2.101" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" +checksum = "f143854a3b13752c6950862c906306adb27c7e839f7414cec8fea35beab624c1" dependencies = [ "unicode-ident", ] +[[package]] +name = "web-sys" +version = "0.3.78" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "77e4b637749ff0d92b8fad63aa1f7cff3cbe125fd49c175cd6345e7272638b12" +dependencies = [ + "js-sys", + "wasm-bindgen", +] + +[[package]] +name = "weezl" +version = "0.1.10" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a751b3277700db47d3e574514de2eced5e54dc8a5436a3bf7a0b248b2cee16f3" + [[package]] name = "winapi" version = "0.3.9" @@ -3542,11 +3940,11 @@ checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" [[package]] name = "winapi-util" -version = "0.1.9" +version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" +checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.61.0", ] [[package]] @@ -3557,13 +3955,13 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] name = "windows-core" -version = "0.61.0" +version = "0.61.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980" +checksum = "c0fdd3ddb90610c7638aa2b3a3ab2904fb9e5cdbecc643ddb3647212781c4ae3" dependencies = [ "windows-implement", "windows-interface", - "windows-link", + "windows-link 0.1.3", "windows-result", "windows-strings", ] @@ -3576,7 +3974,7 @@ checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] @@ -3587,31 +3985,37 @@ checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] [[package]] name = "windows-link" -version = "0.1.1" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a" + +[[package]] +name = "windows-link" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" +checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65" [[package]] name = "windows-result" -version = "0.3.2" +version = "0.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c64fd11a4fd95df68efcfee5f44a294fe71b8bc6a91993e2791938abcc712252" +checksum = "56f42bd332cc6c8eac5af113fc0c1fd6a8fd2aa08a0119358686e5160d0586c6" dependencies = [ - "windows-link", + "windows-link 0.1.3", ] [[package]] name = "windows-strings" -version = "0.4.0" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a2ba9642430ee452d5a7aa78d72907ebe8cfda358e8cb7918a2050581322f97" +checksum = "56e6c93f3a0c3b36176cb1327a4958a0353d5d166c2a35cb268ace15e91d3b57" dependencies = [ - "windows-link", + "windows-link 0.1.3", ] [[package]] @@ -3620,7 +4024,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", ] [[package]] @@ -3629,7 +4033,25 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets", + "windows-targets 0.52.6", +] + +[[package]] +name = "windows-sys" +version = "0.60.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" +dependencies = [ + "windows-targets 0.53.3", +] + +[[package]] +name = "windows-sys" +version = "0.61.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa" +dependencies = [ + "windows-link 0.2.0", ] [[package]] @@ -3638,14 +4060,31 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_gnullvm", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", + "windows_i686_gnullvm 0.52.6", + "windows_i686_msvc 0.52.6", + "windows_x86_64_gnu 0.52.6", + "windows_x86_64_gnullvm 0.52.6", + "windows_x86_64_msvc 0.52.6", +] + +[[package]] +name = "windows-targets" +version = "0.53.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91" +dependencies = [ + "windows-link 0.1.3", + "windows_aarch64_gnullvm 0.53.0", + "windows_aarch64_msvc 0.53.0", + "windows_i686_gnu 0.53.0", + "windows_i686_gnullvm 0.53.0", + "windows_i686_msvc 0.53.0", + "windows_x86_64_gnu 0.53.0", + "windows_x86_64_gnullvm 0.53.0", + "windows_x86_64_msvc 0.53.0", ] [[package]] @@ -3654,48 +4093,96 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" +[[package]] +name = "windows_aarch64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764" + [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" +[[package]] +name = "windows_aarch64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c" + [[package]] name = "windows_i686_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" +[[package]] +name = "windows_i686_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3" + [[package]] name = "windows_i686_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" +[[package]] +name = "windows_i686_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11" + [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" +[[package]] +name = "windows_i686_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d" + [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" +[[package]] +name = "windows_x86_64_gnu" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba" + [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" +[[package]] +name = "windows_x86_64_gnullvm" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57" + [[package]] name = "windows_x86_64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" +[[package]] +name = "windows_x86_64_msvc" +version = "0.53.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486" + [[package]] name = "winnow" version = "0.5.40" @@ -3707,22 +4194,28 @@ dependencies = [ [[package]] name = "winnow" -version = "0.7.6" +version = "0.7.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10" +checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf" dependencies = [ "memchr", ] [[package]] -name = "wit-bindgen-rt" -version = "0.39.0" +name = "wio" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" +checksum = "5d129932f4644ac2396cb456385cbf9e63b5b30c6e8dc4820bdca4eb082037a5" dependencies = [ - "bitflags 2.9.0", + "winapi", ] +[[package]] +name = "wit-bindgen" +version = "0.45.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5c573471f125075647d03df72e026074b7203790d41351cd6edc96f46bcccd36" + [[package]] name = "wyz" version = "0.5.1" @@ -3739,41 +4232,32 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfe53a6657fd280eaa890a3bc59152892ffa3e30101319d168b781ed6529b049" [[package]] -name = "zerocopy" -version = "0.7.35" +name = "yeslogic-fontconfig-sys" +version = "6.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" +checksum = "503a066b4c037c440169d995b869046827dbc71263f6e8f3be6d77d4f3229dbd" dependencies = [ - "zerocopy-derive 0.7.35", + "dlib", + "once_cell", + "pkg-config", ] [[package]] name = "zerocopy" -version = "0.8.24" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" +checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c" dependencies = [ - "zerocopy-derive 0.8.24", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.100", + "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.24" +version = "0.8.27" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" +checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831" dependencies = [ "proc-macro2", "quote", - "syn 2.0.100", + "syn 2.0.106", ] diff --git a/examples/latest/strongarm/Cargo.toml b/examples/latest/strongarm/Cargo.toml index 8c19f0f95..6b4f67eeb 100644 --- a/examples/latest/strongarm/Cargo.toml +++ b/examples/latest/strongarm/Cargo.toml @@ -24,3 +24,6 @@ itertools = "0.14" spectre = { version = "0.11.2", registry = "substrate", path = "../../../tools/spectre" } quantus = { version = "0.2.2", registry = "substrate", path = "../../../tools/quantus" } pegasus = { version = "0.2.1", registry = "substrate", path = "../../../tools/pegasus" } + +[dev-dependencies] +plotters = "0.3" diff --git a/examples/latest/strongarm/src/tb/mod.rs b/examples/latest/strongarm/src/tb/mod.rs index 26a72f217..23964cc06 100644 --- a/examples/latest/strongarm/src/tb/mod.rs +++ b/examples/latest/strongarm/src/tb/mod.rs @@ -4,7 +4,7 @@ use approx::abs_diff_eq; use rust_decimal::prelude::ToPrimitive; use rust_decimal::Decimal; use rust_decimal_macros::dec; -use spectre::analysis::tran::Tran; +use spectre::analysis::tran::{OutputWaveform, Tran}; use spectre::blocks::{Pulse, Vsource}; use spectre::{ErrPreset, Spectre}; use std::any::Any; @@ -122,7 +122,7 @@ where val1, period: Some(dec!(1000)), width: Some(dec!(100)), - delay: Some(dec!(10e-9)), + delay: Some(dec!(1e-12)), rise: Some(dec!(100e-12)), fall: Some(dec!(100e-12)), })); @@ -172,12 +172,18 @@ pub enum ComparatorDecision { Pos, } +pub struct StrongArmTranTbOutput { + pub decision: Option, + pub vop: OutputWaveform, + pub von: OutputWaveform, +} + impl + Copy> StrongArmTranTb where StrongArmTranTb: Block + Schematic, { - pub fn run(&self, sim: SimController) -> Option { + pub fn run(&self, sim: SimController) -> StrongArmTranTbOutput { let mut opts = spectre::Options::default(); sim.set_option(self.pvt.corner, &mut opts); sim.set_option(Temperature::from(self.pvt.temp), &mut opts); @@ -198,7 +204,9 @@ where let vdd = self.pvt.voltage.to_f64().unwrap(); let epsilon = vdd * 0.05; - if abs_diff_eq!(von, 0.0, epsilon = epsilon) && abs_diff_eq!(vop, vdd, epsilon = epsilon) { + let decision = if abs_diff_eq!(von, 0.0, epsilon = epsilon) + && abs_diff_eq!(vop, vdd, epsilon = epsilon) + { Some(ComparatorDecision::Pos) } else if abs_diff_eq!(von, vdd, epsilon = epsilon) && abs_diff_eq!(vop, 0.0, epsilon = epsilon) @@ -206,6 +214,12 @@ where Some(ComparatorDecision::Neg) } else { None + }; + + StrongArmTranTbOutput { + decision, + vop: wav.vop, + von: wav.von, } } } diff --git a/examples/latest/strongarm/src/tech/sky130.rs b/examples/latest/strongarm/src/tech/sky130.rs index 6a1ba4ee8..f792a4e53 100644 --- a/examples/latest/strongarm/src/tech/sky130.rs +++ b/examples/latest/strongarm/src/tech/sky130.rs @@ -275,7 +275,7 @@ impl Tile for TapTile { #[cfg(test)] mod tests { - use crate::tb::{ComparatorDecision, StrongArmTranTb}; + use crate::tb::{ComparatorDecision, StrongArmTranTb, StrongArmTranTbOutput}; use crate::tech::sky130::Sky130Impl; use crate::tiles::MosKind; use crate::{InputKind, StrongArm, StrongArmParams}; @@ -297,6 +297,7 @@ mod tests { use std::sync::Arc; use substrate::context::Context; use substrate::geometry::dir::Dir; + use substrate::simulation::waveform::TimeWaveform; use substrate::simulation::Pvt; use substrate::{block::Block, schematic::ConvertSchema}; @@ -328,39 +329,23 @@ mod tests { nmos_kind: MosKind::Nom, pmos_kind: MosKind::Nom, half_tail_w: 8_192, - input_pair_w: 2_048, - inv_input_w: 8_192, - inv_precharge_w: 4096, - precharge_w: 2_048, + input_pair_w: 8_192, + inv_input_w: 2_048, + inv_precharge_w: 1_024, + precharge_w: 1_024, input_kind: InputKind::P, h_max: 40_000, dir: Dir::Vert, }; pub const STRONGARM_PARAMS_2: StrongArmParams = StrongArmParams { - nmos_kind: MosKind::Nom, - pmos_kind: MosKind::Nom, - half_tail_w: 8_192, - input_pair_w: 2_048, - inv_input_w: 8_192, - inv_precharge_w: 4096, - precharge_w: 2_048, - input_kind: InputKind::P, h_max: 20_000, - dir: Dir::Vert, + ..STRONGARM_PARAMS_1 }; pub const STRONGARM_PARAMS_3: StrongArmParams = StrongArmParams { - nmos_kind: MosKind::Nom, - pmos_kind: MosKind::Nom, - half_tail_w: 8_192, - input_pair_w: 2_048, - inv_input_w: 8_192, - inv_precharge_w: 4096, - precharge_w: 2_048, - input_kind: InputKind::P, - h_max: 15_000, - dir: Dir::Vert, + h_max: 10_000, + ..STRONGARM_PARAMS_1 }; pub const STRONGARM_PARAMS_4: StrongArmParams = StrongArmParams { @@ -389,6 +374,7 @@ mod tests { dir: Dir::Horiz, }; + /// This does not work in extracted simulation. pub const STRONGARM_PARAMS_6: StrongArmParams = StrongArmParams { nmos_kind: MosKind::Nom, pmos_kind: MosKind::Nom, @@ -540,7 +526,9 @@ mod tests { let sim = ctx .get_sim_controller(tb.clone(), work_dir) .expect("failed to get sim controller"); - tb.run(sim).expect("comparator output did not rail") + tb.run(sim) + .decision + .expect("comparator output did not rail") } else { let tb = StrongArmTranTb::new( ConvertSchema::<_, Sky130CdsSchema>::new(dut), @@ -552,7 +540,9 @@ mod tests { let sim = ctx .get_sim_controller(tb.clone(), work_dir) .expect("failed to get sim controller"); - tb.run(sim).expect("comparator output did not rail") + tb.run(sim) + .decision + .expect("comparator output did not rail") }; assert_eq!( decision, @@ -567,6 +557,75 @@ mod tests { } } + /// Tests the StrongARM for a single pair of (vinp, vinn) voltages. + fn test_strongarm_single( + work_dir: impl AsRef, + extracted: bool, + params: StrongArmParams, + corner: Sky130Corner, + vinp: Decimal, + vinn: Decimal, + ) -> StrongArmTranTbOutput { + let work_dir = work_dir.as_ref(); + let dut = TileWrapper::new(StrongArm::::new(params)); + let pvt = Pvt { + corner, + voltage: dec!(1.8), + temp: dec!(25.0), + }; + let ctx = sky130_cds_ctx(); + + let output = if extracted { + let layout_path = work_dir.join("layout.gds"); + ctx.write_layout(dut, to_gds, &layout_path) + .expect("failed to write layout"); + let tb = StrongArmTranTb::new( + Pex { + schematic: Arc::new(ConvertSchema::new( + ConvertSchema::<_, Sky130CdsSchema>::new(dut), + )), + gds_path: work_dir.join("layout.gds"), + layout_cell_name: dut.name(), + work_dir: work_dir.join("pex"), + lvs_rules_dir: PathBuf::from(SKY130_LVS), + lvs_rules_path: PathBuf::from(SKY130_LVS_RULES_PATH), + technology_dir: PathBuf::from(SKY130_TECHNOLOGY_DIR), + }, + vinp, + vinn, + params.input_kind.is_p(), + pvt, + ); + let sim = ctx + .get_sim_controller(tb.clone(), work_dir) + .expect("failed to get sim controller"); + tb.run(sim) + } else { + let tb = StrongArmTranTb::new( + ConvertSchema::<_, Sky130CdsSchema>::new(dut), + vinp, + vinn, + params.input_kind.is_p(), + pvt, + ); + let sim = ctx + .get_sim_controller(tb.clone(), work_dir) + .expect("failed to get sim controller"); + tb.run(sim) + }; + let decision = output.decision.expect("comparator output did not rail"); + assert_eq!( + decision, + if vinp > vinn { + ComparatorDecision::Pos + } else { + ComparatorDecision::Neg + }, + "comparator produced incorrect decision" + ); + output + } + #[test] fn sky130_strongarm_schematic_sim() { let work_dir = concat!( @@ -586,6 +645,103 @@ mod tests { test_strongarm(work_dir, true); } + #[test] + #[ignore = "long"] + fn sky130_strongarm_extracted_sizing_sweep() { + use plotters::prelude::*; + let work_dir = PathBuf::from(concat!( + env!("CARGO_MANIFEST_DIR"), + "/build/sky130_strongarm_extracted_sizing_sweep" + )); + let plot_file = work_dir.join("plot.png"); + let root = BitMapBackend::new(&plot_file, (1280, 960)).into_drawing_area(); + root.fill(&WHITE).unwrap(); + let mut chart = ChartBuilder::on(&root) + .margin(50) + .build_cartesian_2d(-0f32..2.5e-9f32, -0.2f32..2f32) + .unwrap(); + + chart + .configure_mesh() + .x_desc("Time (ns)") + .x_label_style(("sans-serif", 32).into_font()) + .x_label_formatter(&|x| format!("{:.1}", x * 1e9f32)) + .y_desc("Output Voltage (V)") + .y_label_style(("sans-serif", 32).into_font()) + .draw() + .unwrap(); + + let colors = [ + full_palette::RED_500, + full_palette::PURPLE_500, + full_palette::BLUE_500, + full_palette::GREEN_500, + full_palette::ORANGE_500, + full_palette::BROWN_500, + full_palette::BLUEGREY_500, + ]; + let duts = [ + STRONGARM_PARAMS_3, + STRONGARM_PARAMS_2, + STRONGARM_PARAMS_1, + STRONGARM_PARAMS_11, + STRONGARM_PARAMS_10, + // STRONGARM_PARAMS_5, + ]; + for (i, dut) in duts.iter().enumerate() { + println!("evaluating dut {i}"); + let color = colors[i % colors.len()]; + let data = test_strongarm_single( + work_dir.join(format!("dut{i}_tt")), + true, + *dut, + Sky130Corner::Tt, + dec!(0.92), + dec!(0.88), + ); + if i < 5 { + chart + .draw_series(LineSeries::new( + data.vop + .values() + .zip(data.von.values()) + .map(|(p, n)| (p.t() as f32, (p.x() - n.x()) as f32)), + ShapeStyle { + color: color.into(), + filled: true, + stroke_width: 5, + }, + )) + .unwrap() + .label(format!("Design {}", i + 1)) + .legend(move |(x, y)| PathElement::new(vec![(x, y), (x + 20, y)], color)); + } + // for extra_corner in [ + // Sky130Corner::Ss, + // Sky130Corner::Ff, + // Sky130Corner::Sf, + // Sky130Corner::Fs, + // ] { + // test_strongarm_single( + // work_dir.join(format!("dut{i}_{}", extra_corner.name())), + // true, + // *dut, + // extra_corner, + // dec!(0.92), + // dec!(0.88), + // ); + // } + } + chart + .configure_series_labels() + .background_style(&WHITE.mix(0.8)) + .border_style(&BLACK) + .draw() + .unwrap(); + + root.present().unwrap(); + } + fn test_sky130_strongarm_lvs(test_name: &'static str, params: StrongArmParams) { let work_dir = PathBuf::from(concat!(env!("CARGO_MANIFEST_DIR"), "/build")).join(test_name); let gds_path = work_dir.join("layout.gds"); diff --git a/tools/spectre/src/analysis/tran.rs b/tools/spectre/src/analysis/tran.rs index 8d7b61aae..9964b0ebe 100644 --- a/tools/spectre/src/analysis/tran.rs +++ b/tools/spectre/src/analysis/tran.rs @@ -171,12 +171,16 @@ impl Save for RawNestedNode { output: &::Output, key: &>::SaveKey, ) -> >::Saved { + let name = output + .saved_values + .get(&key.0) + .expect("failed to retrieve name corresponding to saved key"); OutputWaveform { t: output.time.clone(), x: output .raw_values - .get(output.saved_values.get(&key.0).unwrap()) - .unwrap() + .get(name.as_str()) + .expect(&format!("no value for {name} found")) .clone(), } } From 67dccab637e2e3031f76bf61936f63b6e70fb294 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Fri, 19 Dec 2025 14:32:24 -0800 Subject: [PATCH 2/7] add tclkq to comparator decision and update to Rust 2024 --- bins/cdl2spice/Cargo.toml | 2 +- bins/sky130spconv/Cargo.toml | 2 +- bins/spicemerge/Cargo.toml | 2 +- codegen/Cargo.toml | 2 +- config/Cargo.toml | 2 +- config/src/raw/mod.rs | 10 +-- config/src/raw/path.rs | 44 +--------- docs/snippets/Cargo.toml | 2 +- examples/Cargo.toml | 2 +- examples/latest/colbuf/Cargo.toml | 2 +- examples/latest/sky130_inverter/Cargo.toml | 2 +- examples/latest/spice_vdivider/Cargo.toml | 2 +- examples/latest/strongarm/Cargo.toml | 2 +- examples/latest/strongarm/src/tb/mod.rs | 23 +++++- examples/latest/strongarm/src/tech/sky130.rs | 46 +++++++---- .../latest/substrate_api_examples/Cargo.toml | 2 +- examples/latest/vdivider/Cargo.toml | 2 +- examples/latest/via/Cargo.toml | 2 +- examples/release/colbuf/Cargo.toml | 2 +- examples/release/sky130_inverter/Cargo.toml | 2 +- examples/release/spice_vdivider/Cargo.toml | 2 +- .../release/substrate_api_examples/Cargo.toml | 2 +- examples/release/vdivider/Cargo.toml | 2 +- examples/release/via/Cargo.toml | 2 +- libs/atoll/Cargo.toml | 2 +- libs/cache/Cargo.toml | 2 +- libs/cache/src/lib.rs | 4 +- libs/diagnostics/Cargo.toml | 2 +- libs/enumify/Cargo.toml | 2 +- libs/enumify_macros/Cargo.toml | 2 +- libs/enumify_macros/src/impls.rs | 25 ++---- libs/gds/Cargo.toml | 2 +- libs/gdsconv/Cargo.toml | 2 +- libs/gdsconv/src/import.rs | 20 ++--- libs/geometry/Cargo.toml | 2 +- libs/geometry/src/rect.rs | 2 +- libs/geometry_macros/Cargo.toml | 2 +- libs/layir/Cargo.toml | 2 +- libs/lefdef/Cargo.toml | 2 +- libs/macrotools/Cargo.toml | 2 +- libs/macrotools/src/lib.rs | 82 +++++++------------ libs/nutlex/Cargo.toml | 2 +- libs/nutlex/src/parser/mod.rs | 8 +- libs/pathtree/Cargo.toml | 2 +- libs/psfparser/Cargo.toml | 2 +- libs/psfparser/src/binary/ast.rs | 8 +- libs/scir/Cargo.toml | 2 +- libs/spice/Cargo.toml | 2 +- libs/spice/src/parser/mod.rs | 10 +-- libs/spice/src/parser/shorts.rs | 4 +- libs/type_dispatch/Cargo.toml | 2 +- libs/type_dispatch_macros/Cargo.toml | 2 +- libs/uniquify/Cargo.toml | 2 +- libs/verilog/Cargo.toml | 2 +- pdks/sky130/Cargo.toml | 2 +- rust-toolchain.toml | 2 +- substrate/Cargo.toml | 2 +- substrate/src/types/schematic.rs | 2 +- tools/magic/Cargo.toml | 2 +- tools/magic_netgen/Cargo.toml | 2 +- tools/netgen/Cargo.toml | 2 +- tools/ngspice/Cargo.toml | 2 +- tools/pegasus/Cargo.toml | 2 +- tools/quantus/Cargo.toml | 2 +- tools/spectre/Cargo.toml | 2 +- 65 files changed, 169 insertions(+), 221 deletions(-) diff --git a/bins/cdl2spice/Cargo.toml b/bins/cdl2spice/Cargo.toml index d62632f64..ef6b65e99 100644 --- a/bins/cdl2spice/Cargo.toml +++ b/bins/cdl2spice/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cdl2spice" version = "0.2.2" -edition = "2021" +edition = "2024" [dependencies] anyhow = "1" diff --git a/bins/sky130spconv/Cargo.toml b/bins/sky130spconv/Cargo.toml index ee136c5ce..bd01c95c4 100644 --- a/bins/sky130spconv/Cargo.toml +++ b/bins/sky130spconv/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "sky130spconv" version = "0.1.0" -edition = "2021" +edition = "2024" readme = "README.md" [dependencies] diff --git a/bins/spicemerge/Cargo.toml b/bins/spicemerge/Cargo.toml index 5de987efa..09c545c0f 100644 --- a/bins/spicemerge/Cargo.toml +++ b/bins/spicemerge/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "spicemerge" version = "0.1.0" -edition = "2021" +edition = "2024" [dependencies] anyhow = "1" diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml index 91ce69689..a6a6cc315 100644 --- a/codegen/Cargo.toml +++ b/codegen/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "codegen" version = "0.10.2" -edition = "2021" +edition = "2024" [dependencies] darling = "0.20" diff --git a/config/Cargo.toml b/config/Cargo.toml index d07b9d248..67576e4c4 100644 --- a/config/Cargo.toml +++ b/config/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "config" version = "0.4.1" -edition = "2021" +edition = "2024" [dependencies] anyhow = "1" diff --git a/config/src/raw/mod.rs b/config/src/raw/mod.rs index 88d2902cf..88e425d69 100644 --- a/config/src/raw/mod.rs +++ b/config/src/raw/mod.rs @@ -62,7 +62,7 @@ use anyhow::Result; use self::ConfigValue as CV; use crate::paths; -use anyhow::{anyhow, bail, Context as _}; +use anyhow::{Context as _, anyhow, bail}; use lazycell::LazyCell; use serde::Deserialize; @@ -1018,11 +1018,3 @@ impl StringList { &self.0 } } - -/// StringList automatically merges config values with environment values, -/// this instead follows the precedence rules, so that eg. a string list found -/// in the environment will be used instead of one in a config file. -/// -/// This is currently only used by `PathAndArgs` -#[derive(Debug, Deserialize)] -pub(crate) struct UnmergedStringList(Vec); diff --git a/config/src/raw/path.rs b/config/src/raw/path.rs index 602ead4c7..23223d5a3 100644 --- a/config/src/raw/path.rs +++ b/config/src/raw/path.rs @@ -5,8 +5,8 @@ // Based on Cargo's [`config` module](https://github.com/rust-lang/cargo/tree/master/src/cargo/util/config) // with substantial modifications. -use super::{RawConfig, UnmergedStringList, Value}; -use serde::{de::Error, Deserialize}; +use super::{RawConfig, Value}; +use serde::Deserialize; use std::path::PathBuf; /// Use with the `get` API to fetch a string that will be converted to a @@ -48,43 +48,3 @@ impl ConfigRelativePath { config.string_to_path(&self.0.val, &self.0.definition) } } - -/// A config type that is a program to run. -/// -/// This supports a list of strings like `['/path/to/program', 'somearg']` -/// or a space separated string like `'/path/to/program somearg'`. -/// -/// This expects the first value to be the path to the program to run. -/// Subsequent values are strings of arguments to pass to the program. -/// -/// Typically you should use `ConfigRelativePath::resolve_program` on the path -/// to get the actual program. -#[derive(Debug, Clone)] -pub(crate) struct PathAndArgs { - #[allow(dead_code)] - pub(crate) path: ConfigRelativePath, - #[allow(dead_code)] - pub(crate) args: Vec, -} - -impl<'de> serde::Deserialize<'de> for PathAndArgs { - fn deserialize(deserializer: D) -> Result - where - D: serde::Deserializer<'de>, - { - let vsl = Value::::deserialize(deserializer)?; - let mut strings = vsl.val.0; - if strings.is_empty() { - return Err(D::Error::invalid_length(0, &"at least one element")); - } - let first = strings.remove(0); - let crp = Value { - val: first, - definition: vsl.definition, - }; - Ok(PathAndArgs { - path: ConfigRelativePath(crp), - args: strings, - }) - } -} diff --git a/docs/snippets/Cargo.toml b/docs/snippets/Cargo.toml index b72120e95..dd31db321 100644 --- a/docs/snippets/Cargo.toml +++ b/docs/snippets/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "snippets" version = "0.7.0" -edition = "2021" +edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/examples/Cargo.toml b/examples/Cargo.toml index c6190c2f2..30b01ccae 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "examples" version = "0.2.0" -edition = "2021" +edition = "2024" include = [ "**/*.rs", "Cargo.toml", diff --git a/examples/latest/colbuf/Cargo.toml b/examples/latest/colbuf/Cargo.toml index 55cceea73..56c1cb198 100644 --- a/examples/latest/colbuf/Cargo.toml +++ b/examples/latest/colbuf/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "colbuf" version = "0.0.0" -edition = "2021" +edition = "2024" publish = false [dependencies] diff --git a/examples/latest/sky130_inverter/Cargo.toml b/examples/latest/sky130_inverter/Cargo.toml index a662cd638..32e5c7984 100644 --- a/examples/latest/sky130_inverter/Cargo.toml +++ b/examples/latest/sky130_inverter/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "sky130_inverter" version = "0.0.0" -edition = "2021" +edition = "2024" publish = false # begin-code-snippet dependencies diff --git a/examples/latest/spice_vdivider/Cargo.toml b/examples/latest/spice_vdivider/Cargo.toml index 3f22fd6c4..89c73e8f2 100644 --- a/examples/latest/spice_vdivider/Cargo.toml +++ b/examples/latest/spice_vdivider/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "spice_vdivider" version = "0.0.0" -edition = "2021" +edition = "2024" publish = false # begin-code-snippet dependencies diff --git a/examples/latest/strongarm/Cargo.toml b/examples/latest/strongarm/Cargo.toml index 6b4f67eeb..f0d8998fb 100644 --- a/examples/latest/strongarm/Cargo.toml +++ b/examples/latest/strongarm/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "strongarm" version = "0.0.0" -edition = "2021" +edition = "2024" publish = false [dependencies] diff --git a/examples/latest/strongarm/src/tb/mod.rs b/examples/latest/strongarm/src/tb/mod.rs index 23964cc06..1cbd147b3 100644 --- a/examples/latest/strongarm/src/tb/mod.rs +++ b/examples/latest/strongarm/src/tb/mod.rs @@ -172,8 +172,14 @@ pub enum ComparatorDecision { Pos, } +#[derive(Copy, Clone, PartialEq, PartialOrd, Debug)] +pub struct ComparatorDecisionInfo { + pub decision: ComparatorDecision, + pub tclkq: f64, +} + pub struct StrongArmTranTbOutput { - pub decision: Option, + pub decision: Option, pub vop: OutputWaveform, pub von: OutputWaveform, } @@ -204,6 +210,12 @@ where let vdd = self.pvt.voltage.to_f64().unwrap(); let epsilon = vdd * 0.05; + + let transition = wav + .von + .transitions(0.2 * vdd, 0.8 * vdd) + .next() + .or_else(|| wav.vop.transitions(0.2 * vdd, 0.8 * vdd).next()); let decision = if abs_diff_eq!(von, 0.0, epsilon = epsilon) && abs_diff_eq!(vop, vdd, epsilon = epsilon) { @@ -214,7 +226,14 @@ where Some(ComparatorDecision::Neg) } else { None - }; + } + .and_then(|decision| { + let transition = transition?; + Some(ComparatorDecisionInfo { + decision, + tclkq: transition.center_time(), + }) + }); StrongArmTranTbOutput { decision, diff --git a/examples/latest/strongarm/src/tech/sky130.rs b/examples/latest/strongarm/src/tech/sky130.rs index f792a4e53..188ad058b 100644 --- a/examples/latest/strongarm/src/tech/sky130.rs +++ b/examples/latest/strongarm/src/tech/sky130.rs @@ -545,7 +545,7 @@ mod tests { .expect("comparator output did not rail") }; assert_eq!( - decision, + decision.decision, if j > dec!(0) { ComparatorDecision::Pos } else { @@ -615,7 +615,7 @@ mod tests { }; let decision = output.decision.expect("comparator output did not rail"); assert_eq!( - decision, + decision.decision, if vinp > vinn { ComparatorDecision::Pos } else { @@ -671,6 +671,8 @@ mod tests { .draw() .unwrap(); + let mut max_tclkq = 0.; + let colors = [ full_palette::RED_500, full_palette::PURPLE_500, @@ -699,6 +701,11 @@ mod tests { dec!(0.92), dec!(0.88), ); + if let Some(decision) = data.decision + && decision.tclkq > max_tclkq + { + max_tclkq = decision.tclkq; + } if i < 5 { chart .draw_series(LineSeries::new( @@ -716,21 +723,26 @@ mod tests { .label(format!("Design {}", i + 1)) .legend(move |(x, y)| PathElement::new(vec![(x, y), (x + 20, y)], color)); } - // for extra_corner in [ - // Sky130Corner::Ss, - // Sky130Corner::Ff, - // Sky130Corner::Sf, - // Sky130Corner::Fs, - // ] { - // test_strongarm_single( - // work_dir.join(format!("dut{i}_{}", extra_corner.name())), - // true, - // *dut, - // extra_corner, - // dec!(0.92), - // dec!(0.88), - // ); - // } + for extra_corner in [ + Sky130Corner::Ss, + Sky130Corner::Ff, + Sky130Corner::Sf, + Sky130Corner::Fs, + ] { + let output = test_strongarm_single( + work_dir.join(format!("dut{i}_{}", extra_corner.name())), + true, + *dut, + extra_corner, + dec!(0.92), + dec!(0.88), + ); + if let Some(decision) = output.decision + && decision.tclkq > max_tclkq + { + max_tclkq = decision.tclkq; + } + } } chart .configure_series_labels() diff --git a/examples/latest/substrate_api_examples/Cargo.toml b/examples/latest/substrate_api_examples/Cargo.toml index ea2e4a87a..6a75145d0 100644 --- a/examples/latest/substrate_api_examples/Cargo.toml +++ b/examples/latest/substrate_api_examples/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "substrate_api_examples" version = "0.0.0" -edition = "2021" +edition = "2024" publish = false [dependencies] diff --git a/examples/latest/vdivider/Cargo.toml b/examples/latest/vdivider/Cargo.toml index 580b31e5c..df43635f6 100644 --- a/examples/latest/vdivider/Cargo.toml +++ b/examples/latest/vdivider/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "vdivider" version = "0.0.0" -edition = "2021" +edition = "2024" publish = false [dependencies] diff --git a/examples/latest/via/Cargo.toml b/examples/latest/via/Cargo.toml index bfd578cc2..690e5a05a 100644 --- a/examples/latest/via/Cargo.toml +++ b/examples/latest/via/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "via" version = "0.0.0" -edition = "2021" +edition = "2024" publish = false [dependencies] diff --git a/examples/release/colbuf/Cargo.toml b/examples/release/colbuf/Cargo.toml index c1b702a9e..bf17fa888 100644 --- a/examples/release/colbuf/Cargo.toml +++ b/examples/release/colbuf/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "colbuf" version = "0.0.0" -edition = "2021" +edition = "2024" publish = false [dependencies] diff --git a/examples/release/sky130_inverter/Cargo.toml b/examples/release/sky130_inverter/Cargo.toml index 4f4b79f14..7f510243c 100644 --- a/examples/release/sky130_inverter/Cargo.toml +++ b/examples/release/sky130_inverter/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "sky130_inverter" version = "0.0.0" -edition = "2021" +edition = "2024" publish = false # begin-code-snippet dependencies diff --git a/examples/release/spice_vdivider/Cargo.toml b/examples/release/spice_vdivider/Cargo.toml index f5ddd4e96..8243d2418 100644 --- a/examples/release/spice_vdivider/Cargo.toml +++ b/examples/release/spice_vdivider/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "spice_vdivider" version = "0.0.0" -edition = "2021" +edition = "2024" publish = false # begin-code-snippet dependencies diff --git a/examples/release/substrate_api_examples/Cargo.toml b/examples/release/substrate_api_examples/Cargo.toml index 3119c82a3..0c224e932 100644 --- a/examples/release/substrate_api_examples/Cargo.toml +++ b/examples/release/substrate_api_examples/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "substrate_api_examples" version = "0.0.0" -edition = "2021" +edition = "2024" publish = false [dependencies] diff --git a/examples/release/vdivider/Cargo.toml b/examples/release/vdivider/Cargo.toml index 21a7da99f..7017ebe2f 100644 --- a/examples/release/vdivider/Cargo.toml +++ b/examples/release/vdivider/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "vdivider" version = "0.0.0" -edition = "2021" +edition = "2024" publish = false [dependencies] diff --git a/examples/release/via/Cargo.toml b/examples/release/via/Cargo.toml index 746673a76..66477b28e 100644 --- a/examples/release/via/Cargo.toml +++ b/examples/release/via/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "via" version = "0.0.0" -edition = "2021" +edition = "2024" publish = false [dependencies] diff --git a/libs/atoll/Cargo.toml b/libs/atoll/Cargo.toml index f3246ad45..b41b1f235 100644 --- a/libs/atoll/Cargo.toml +++ b/libs/atoll/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "atoll" version = "0.1.3" -edition = "2021" +edition = "2024" description = "Automatic transformation of logical layout" license = "BSD-3-Clause" diff --git a/libs/cache/Cargo.toml b/libs/cache/Cargo.toml index e434acf05..af89bea99 100644 --- a/libs/cache/Cargo.toml +++ b/libs/cache/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "cache" version = "0.7.1" -edition = "2021" +edition = "2024" description = "A general purpose cache with possibly multiple remote servers for storing and retrieving data." license = "BSD-3-Clause" diff --git a/libs/cache/src/lib.rs b/libs/cache/src/lib.rs index 593df1d43..1a66f4d27 100644 --- a/libs/cache/src/lib.rs +++ b/libs/cache/src/lib.rs @@ -13,7 +13,7 @@ use error::{ArcResult, Error, TryInnerError}; use lazy_static::lazy_static; use once_cell::sync::OnceCell; use regex::Regex; -use serde::{de::DeserializeOwned, Deserialize, Serialize}; +use serde::{Deserialize, Serialize, de::DeserializeOwned}; use sha2::{Digest, Sha256}; pub mod error; @@ -391,7 +391,7 @@ impl CacheHandle> { /// /// Returns an error if the generator panicked or threw an error, or if the cache threw an /// error. - pub fn try_inner(&self) -> std::result::Result<&V, TryInnerError> { + pub fn try_inner(&self) -> std::result::Result<&V, TryInnerError<'_, E>> { Ok(self .try_get() .map_err(|e| TryInnerError::CacheError(e))? diff --git a/libs/diagnostics/Cargo.toml b/libs/diagnostics/Cargo.toml index 7e7470a7d..e86709f4d 100644 --- a/libs/diagnostics/Cargo.toml +++ b/libs/diagnostics/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "diagnostics" version = "0.4.0" -edition = "2021" +edition = "2024" [dependencies] serde = { version = "1", features = ["derive"] } diff --git a/libs/enumify/Cargo.toml b/libs/enumify/Cargo.toml index f23e488aa..721c8cd3d 100644 --- a/libs/enumify/Cargo.toml +++ b/libs/enumify/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "enumify" version = "0.2.1" -edition = "2021" +edition = "2024" [dependencies] enumify_macros = { version = "0.3.1", registry = "substrate", path = "../enumify_macros" } diff --git a/libs/enumify_macros/Cargo.toml b/libs/enumify_macros/Cargo.toml index 39d71e0e7..0da06b9bb 100644 --- a/libs/enumify_macros/Cargo.toml +++ b/libs/enumify_macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "enumify_macros" version = "0.3.1" -edition = "2021" +edition = "2024" description = "Macros for the enumify crate" license = "BSD-3-Clause" diff --git a/libs/enumify_macros/src/impls.rs b/libs/enumify_macros/src/impls.rs index d461fcb00..61cedfe80 100644 --- a/libs/enumify_macros/src/impls.rs +++ b/libs/enumify_macros/src/impls.rs @@ -10,7 +10,7 @@ use proc_macro2::TokenStream; use quote::format_ident; use quote::quote; -use macrotools::{field_tokens_with_referent, tuple_ident, FieldTokens}; +use macrotools::{FieldTokens, field_tokens_with_referent, tuple_ident}; use syn::{DeriveInput, Generics}; macro_rules! handle_error { @@ -213,11 +213,7 @@ fn mut_generics(generics: &Generics) -> TokenStream { } fn variant_match_arm(xident: &syn::Ident, variant: &EnumifyVariant) -> TokenStream { - let EnumifyVariant { - ref ident, - ref fields, - .. - } = variant; + let EnumifyVariant { ident, fields, .. } = variant; let destructure = fields .iter() .enumerate() @@ -239,10 +235,7 @@ fn variant_match_arm(xident: &syn::Ident, variant: &EnumifyVariant) -> TokenStre fn field_assign(as_enum: bool, style: Style, idx: usize, field: &EnumifyField) -> TokenStream { let EnumifyField { - ref ident, - ref vis, - ref attrs, - .. + ident, vis, attrs, .. } = field; let FieldTokens { refer, @@ -392,10 +385,8 @@ impl Enumify { pub(crate) fn expand_enum(&self, tokens: &mut TokenStream, variants: &[EnumifyVariant]) { let EnumifyInputReceiver { - ref ident, - ref generics, - .. - } = self.input; + ident, generics, .. + } = &self.input; let (imp, ty, wher) = generics.split_for_impl(); let ref_ident = self.ref_enum_ident(); @@ -466,12 +457,12 @@ impl Enumify { } pub(crate) fn expand(&self, tokens: &mut TokenStream) { - let EnumifyInputReceiver { ref data, .. } = self.input; + let EnumifyInputReceiver { data, .. } = &self.input; match data { - ast::Data::Struct(ref _fields) => { + ast::Data::Struct(_) => { panic!("enumify does not support structs"); } - ast::Data::Enum(ref variants) => { + ast::Data::Enum(variants) => { self.expand_enum(tokens, variants); } }; diff --git a/libs/gds/Cargo.toml b/libs/gds/Cargo.toml index bed0be9f3..0f40c5bfb 100644 --- a/libs/gds/Cargo.toml +++ b/libs/gds/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "gds" version = "0.4.1" -edition = "2021" +edition = "2024" [dependencies] byteorder = "1" diff --git a/libs/gdsconv/Cargo.toml b/libs/gdsconv/Cargo.toml index f2841fc79..3f8cde423 100644 --- a/libs/gdsconv/Cargo.toml +++ b/libs/gdsconv/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "gdsconv" version = "0.2.1" -edition = "2021" +edition = "2024" [dependencies] arcstr = { version = "1", features = ["serde"] } diff --git a/libs/gdsconv/src/import.rs b/libs/gdsconv/src/import.rs index e466131c5..958210de1 100644 --- a/libs/gdsconv/src/import.rs +++ b/libs/gdsconv/src/import.rs @@ -11,7 +11,7 @@ use geometry::{ }; use layir::{Cell, CellId, Instance, Library, LibraryBuilder, Shape, Text}; use slotmap::new_key_type; -use tracing::{span, Level}; +use tracing::{Level, span}; use crate::GdsLayer; @@ -144,24 +144,24 @@ impl<'a> GdsImporter<'a> { for elem in &strukt.elems { use gds::GdsElement::*; match elem { - GdsBoundary(ref x) => cell.add_element(self.import_boundary(x)?), - GdsPath(ref x) => cell.add_element(self.import_path(x)?), - GdsBox(ref x) => cell.add_element(self.import_box(x)?), - GdsArrayRef(ref x) => { + GdsBoundary(x) => cell.add_element(self.import_boundary(x)?), + GdsPath(x) => cell.add_element(self.import_path(x)?), + GdsBox(x) => cell.add_element(self.import_box(x)?), + GdsArrayRef(x) => { let elems = self.import_instance_array(x)?; for elem in elems { cell.add_instance(elem); } } - GdsStructRef(ref x) => { + GdsStructRef(x) => { cell.add_instance(self.import_instance(x)?); } - GdsTextElem(ref x) => { + GdsTextElem(x) => { cell.add_element(self.import_text_elem(x)?); } // GDSII "Node" elements are fairly rare, and are not supported. // (Maybe some day we'll even learn what they are.) - GdsNode(ref elem) => { + GdsNode(elem) => { tracing::warn!(?elem, "ignoring unsupported GDS Node element"); } }; @@ -493,8 +493,8 @@ impl<'a> GdsDepOrder<'a> { for elem in &strukt.elems { use gds::GdsElement::*; match elem { - GdsStructRef(ref x) => self.push(self.strukts.get(&x.name).unwrap()), - GdsArrayRef(ref x) => self.push(self.strukts.get(&x.name).unwrap()), + GdsStructRef(x) => self.push(self.strukts.get(&x.name).unwrap()), + GdsArrayRef(x) => self.push(self.strukts.get(&x.name).unwrap()), _ => (), }; } diff --git a/libs/geometry/Cargo.toml b/libs/geometry/Cargo.toml index 324c31726..bbf52022a 100644 --- a/libs/geometry/Cargo.toml +++ b/libs/geometry/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "geometry" version = "0.7.1" -edition = "2021" +edition = "2024" [dependencies] serde = { version = "1", features = ["derive"] } diff --git a/libs/geometry/src/rect.rs b/libs/geometry/src/rect.rs index ba1a09f7a..2aa07764f 100644 --- a/libs/geometry/src/rect.rs +++ b/libs/geometry/src/rect.rs @@ -130,7 +130,7 @@ impl Rect { /// The caller must ensure that `left <= right` and that `bot <= top`. #[inline] pub const unsafe fn from_sides_unchecked(left: i64, bot: i64, right: i64, top: i64) -> Self { - Self::new_unchecked(Point::new(left, bot), Point::new(right, top)) + unsafe { Self::new_unchecked(Point::new(left, bot), Point::new(right, top)) } } /// Creates a rectangle from a lower left and upper right corner point, diff --git a/libs/geometry_macros/Cargo.toml b/libs/geometry_macros/Cargo.toml index b97c95c59..82d16b3d5 100644 --- a/libs/geometry_macros/Cargo.toml +++ b/libs/geometry_macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "geometry_macros" version = "0.1.1" -edition = "2021" +edition = "2024" [dependencies] darling = "0.20" diff --git a/libs/layir/Cargo.toml b/libs/layir/Cargo.toml index 764b1ad34..ac5bb320d 100644 --- a/libs/layir/Cargo.toml +++ b/libs/layir/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "layir" version = "0.2.1" -edition = "2021" +edition = "2024" [dependencies] arcstr = { version = "1", features = ["serde"] } diff --git a/libs/lefdef/Cargo.toml b/libs/lefdef/Cargo.toml index 93dbc8011..5cd30811e 100644 --- a/libs/lefdef/Cargo.toml +++ b/libs/lefdef/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "lefdef" version = "0.2.1" -edition = "2021" +edition = "2024" [dependencies] geometry = { version = "0.7.1", registry = "substrate", path = "../geometry" } diff --git a/libs/macrotools/Cargo.toml b/libs/macrotools/Cargo.toml index 4613e9947..39f8de254 100644 --- a/libs/macrotools/Cargo.toml +++ b/libs/macrotools/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "macrotools" version = "0.2.0" -edition = "2021" +edition = "2024" description = "Utilities for implementing proc macros quickly" [dependencies] diff --git a/libs/macrotools/src/lib.rs b/libs/macrotools/src/lib.rs index 075748808..e0bf2c351 100644 --- a/libs/macrotools/src/lib.rs +++ b/libs/macrotools/src/lib.rs @@ -4,12 +4,12 @@ use std::collections::HashMap; use darling::ast::Style; use proc_macro2::{Span, TokenStream}; -use quote::{format_ident, quote, quote_spanned, ToTokens}; +use quote::{ToTokens, format_ident, quote, quote_spanned}; use syn::spanned::Spanned; use syn::{ - parse_quote, Attribute, Data, DeriveInput, Field, Fields, GenericArgument, GenericParam, - Generics, Ident, Index, PathArguments, Token, Type, TypeParamBound, Variant, Visibility, - WherePredicate, + Attribute, Data, DeriveInput, Field, Fields, GenericArgument, GenericParam, Generics, Ident, + Index, PathArguments, Token, Type, TypeParamBound, Variant, Visibility, WherePredicate, + parse_quote, }; #[macro_export] @@ -39,7 +39,7 @@ macro_rules! handle_darling_error { /// Add a bound `T: trait_` to every type parameter T. pub fn add_trait_bounds(generics: &mut Generics, trait_: TokenStream) { for param in &mut generics.params { - if let GenericParam::Type(ref mut type_param) = *param { + if let GenericParam::Type(type_param) = &mut *param { type_param.bounds.push(syn::parse_quote!(#trait_)); } } @@ -131,10 +131,10 @@ pub fn field_tokens( pub fn field_decl(field: &Field) -> TokenStream { let Field { - ref ident, - ref vis, - ref ty, - ref attrs, + ident, + vis, + ty, + attrs, .. } = field; @@ -199,9 +199,7 @@ pub fn field_assign( prev_tys: Vec, val: impl FnOnce(&MapField) -> TokenStream, ) -> TokenStream { - let Field { - ref ident, ref ty, .. - } = field; + let Field { ident, ty, .. } = field; let pretty = pretty_ident(idx, ident); let refer = field_referent(prefix, idx, field); @@ -220,11 +218,7 @@ pub fn field_assign( } pub fn variant_decl(variant: &Variant) -> TokenStream { - let Variant { - ref ident, - ref fields, - .. - } = variant; + let Variant { ident, fields, .. } = variant; let decls = fields.iter().map(field_decl); match fields { Fields::Unit => quote!(#ident,), @@ -234,11 +228,7 @@ pub fn variant_decl(variant: &Variant) -> TokenStream { } pub fn variant_map_arm(input_type: &Type, variant: &Variant, body: &TokenStream) -> TokenStream { - let Variant { - ref ident, - ref fields, - .. - } = variant; + let Variant { ident, fields, .. } = variant; let destructure = fields .iter() .enumerate() @@ -259,11 +249,7 @@ pub fn double_variant_map_arm( variant: &Variant, body: &TokenStream, ) -> TokenStream { - let Variant { - ref ident, - ref fields, - .. - } = variant; + let Variant { ident, fields, .. } = variant; let destructure0 = fields.iter().enumerate().map(|(i, f)| { f.ident .as_ref() @@ -306,11 +292,7 @@ pub fn variant_assign_arm( prev_tys: &[Vec], val: impl Fn(&MapField) -> TokenStream, ) -> TokenStream { - let Variant { - ref ident, - ref fields, - .. - } = variant; + let Variant { ident, fields, .. } = variant; let assign = fields .iter() .enumerate() @@ -337,15 +319,9 @@ pub fn double_variant_assign_arm( prev_tys: &[Vec], val: impl Fn(&MapField, &MapField) -> TokenStream, ) -> TokenStream { - let Variant { - ref ident, - ref fields, - .. - } = variant; + let Variant { ident, fields, .. } = variant; let assign = fields.iter().enumerate().map(|(i, f)| { - let Field { - ref ident, ref ty, .. - } = f; + let Field { ident, ty, .. } = f; let pretty = pretty_ident(i, ident); let (refer0, refer1) = double_enum_field_referent(None, i, f); @@ -518,13 +494,13 @@ impl DeriveInputHelper { pub fn add_generic_type_binding(&mut self, ident: Ident, ty: Type) { self.generic_type_bindings.insert(ident.clone(), ty.clone()); - match self.input.data { - Data::Struct(ref mut s) => { + match &mut self.input.data { + Data::Struct(s) => { for f in s.fields.iter_mut() { apply_generic_type_binding_ty(&mut f.ty, ident.clone(), ty.clone()); } } - Data::Enum(ref mut e) => { + Data::Enum(e) => { for variant in e.variants.iter_mut() { for f in variant.fields.iter_mut() { apply_generic_type_binding_ty(&mut f.ty, ident.clone(), ty.clone()); @@ -801,9 +777,7 @@ impl DeriveInputHelper { match &self.input.data { Data::Struct(s) => { let assignments = s.fields.iter().enumerate().map(|(i, f)| { - let Field { - ref ident, ref ty, .. - } = f; + let Field { ident, ty, .. } = f; let pretty = pretty_ident(i, ident); let refer0 = field_referent(Some(referents.0), i, f); @@ -1099,7 +1073,7 @@ pub fn derive_trait(config: &DeriveTrait, input: &DeriveInput) -> proc_macro2::T }; let match_clause: TokenStream = match &input.data { - Data::Struct(ref s) => match &s.fields { + Data::Struct(s) => match &s.fields { Fields::Unnamed(fields) => { let recurse = fields.unnamed.iter().enumerate().map(|(i, f)| { let idx = Index::from(i); @@ -1120,10 +1094,10 @@ pub fn derive_trait(config: &DeriveTrait, input: &DeriveInput) -> proc_macro2::T } Fields::Unit => quote!(), }, - Data::Enum(ref data) => { + Data::Enum(data) => { let clauses = data.variants.iter().map(|v| { - let inner = match v.fields { - syn::Fields::Named(ref fields) => { + let inner = match &v.fields { + syn::Fields::Named(fields) => { let recurse = fields.named.iter().map(|f| { let name = f.ident.as_ref().unwrap(); quote_spanned! { f.span() => @@ -1140,7 +1114,7 @@ pub fn derive_trait(config: &DeriveTrait, input: &DeriveInput) -> proc_macro2::T { #(#declare)* } => { #(#recurse)* }, } } - syn::Fields::Unnamed(ref fields) => { + syn::Fields::Unnamed(fields) => { let recurse = fields.unnamed.iter().enumerate().map(|(i, f)| { let ident = format_ident!("field{i}"); quote_spanned! { f.span() => @@ -1205,7 +1179,7 @@ fn apply_generic_type_binding(pred: &mut WherePredicate, ident: Ident, ty: Type) let t = &mut pred.bounded_ty; if let Type::Path(p) = t { for seg in p.path.segments.iter_mut() { - if let PathArguments::AngleBracketed(ref mut args) = seg.arguments { + if let PathArguments::AngleBracketed(args) = &mut seg.arguments { for arg in args.args.iter_mut() { if let GenericArgument::Type(t) = arg { if let Type::Path(p) = t { @@ -1223,9 +1197,9 @@ fn apply_generic_type_binding(pred: &mut WherePredicate, ident: Ident, ty: Type) } } for bound in pred.bounds.iter_mut() { - if let TypeParamBound::Trait(ref mut tb) = bound { + if let TypeParamBound::Trait(tb) = bound { if let Some(last) = tb.path.segments.last_mut() { - if let PathArguments::AngleBracketed(ref mut args) = last.arguments { + if let PathArguments::AngleBracketed(args) = &mut last.arguments { for arg in args.args.iter_mut() { if let GenericArgument::Type(t) = arg { if let Type::Path(p) = t { diff --git a/libs/nutlex/Cargo.toml b/libs/nutlex/Cargo.toml index cfef12e34..3bd0bee2b 100644 --- a/libs/nutlex/Cargo.toml +++ b/libs/nutlex/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "nutlex" version = "0.4.2" -edition = "2021" +edition = "2024" description = "Parses SPICE nutmeg files (aka rawfiles)" [dependencies] diff --git a/libs/nutlex/src/parser/mod.rs b/libs/nutlex/src/parser/mod.rs index 7ede0d5db..b8617b083 100644 --- a/libs/nutlex/src/parser/mod.rs +++ b/libs/nutlex/src/parser/mod.rs @@ -136,7 +136,7 @@ fn parse_f64(input: &[u8]) -> Result>> { Ok(value) } -fn variable(input: &[u8]) -> IResult<&[u8], Variable> { +fn variable(input: &[u8]) -> IResult<&[u8], Variable<'_>> { // In AC analysis, may have a `grid=X` declaration let kwargs = opt(take_till1(is_newline)); let (input, (_, idx, _, name, _, unit, _, _, _, _)) = ( @@ -158,7 +158,7 @@ fn variable(input: &[u8]) -> IResult<&[u8], Variable> { Ok((input, Variable { idx, name, unit })) } -fn variables(input: &[u8]) -> IResult<&[u8], Vec> { +fn variables(input: &[u8]) -> IResult<&[u8], Vec>> { let (input, _) = (tag_no_case("Variables:"), space0, opt(line_ending), space0).parse(input)?; let (input, vars) = many0(variable).parse(input)?; Ok((input, vars)) @@ -292,7 +292,7 @@ fn complex_data( .parse(input) } -fn analysis(opts: Options) -> impl Fn(&[u8]) -> IResult<&[u8], Analysis> { +fn analysis(opts: Options) -> impl Fn(&[u8]) -> IResult<&[u8], Analysis<'_>> { move |input: &[u8]| -> IResult<&[u8], Analysis> { let (input, _) = take_while(is_space_or_line)(input)?; let (input, title) = opt(header("Title:")).parse(input)?; @@ -329,6 +329,6 @@ fn analysis(opts: Options) -> impl Fn(&[u8]) -> IResult<&[u8], Analysis> { } } -pub(crate) fn analyses(input: &[u8], opts: Options) -> IResult<&[u8], Vec> { +pub(crate) fn analyses(input: &[u8], opts: Options) -> IResult<&[u8], Vec>> { many0(analysis(opts)).parse(input) } diff --git a/libs/pathtree/Cargo.toml b/libs/pathtree/Cargo.toml index 9f541a8a7..a037ee51d 100644 --- a/libs/pathtree/Cargo.toml +++ b/libs/pathtree/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pathtree" version = "0.3.0" -edition = "2021" +edition = "2024" description = "An immutable tree data structure for fast path operations" license = "BSD-3-Clause" diff --git a/libs/psfparser/Cargo.toml b/libs/psfparser/Cargo.toml index fb556d9a6..1e2bd98e2 100644 --- a/libs/psfparser/Cargo.toml +++ b/libs/psfparser/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "psfparser" version = "0.1.4" -edition = "2021" +edition = "2024" description = "A PSF reader written in Rust" readme = "README.md" license = "BSD-3-Clause" diff --git a/libs/psfparser/src/binary/ast.rs b/libs/psfparser/src/binary/ast.rs index ef9fe3808..376f75d28 100644 --- a/libs/psfparser/src/binary/ast.rs +++ b/libs/psfparser/src/binary/ast.rs @@ -270,28 +270,28 @@ impl Values { pub fn real(&self) -> &Vec { match self { - Self::Real(ref v) => v, + Self::Real(v) => v, _ => panic!("not a real value vector"), } } pub fn complex(&self) -> &Vec { match self { - Self::Complex(ref v) => v, + Self::Complex(v) => v, _ => panic!("not a complex value vector"), } } pub fn real_mut(&mut self) -> &mut Vec { match self { - Self::Real(ref mut v) => v, + Self::Real(v) => v, _ => panic!("not a real value vector"), } } pub fn complex_mut(&mut self) -> &mut Vec { match self { - Self::Complex(ref mut v) => v, + Self::Complex(v) => v, _ => panic!("not a complex value vector"), } } diff --git a/libs/scir/Cargo.toml b/libs/scir/Cargo.toml index 9a37ad063..e329eec7a 100644 --- a/libs/scir/Cargo.toml +++ b/libs/scir/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "scir" version = "0.9.1" -edition = "2021" +edition = "2024" [dependencies] arcstr = { version = "1", features = ["serde"] } diff --git a/libs/spice/Cargo.toml b/libs/spice/Cargo.toml index 214a409d5..a3cd4a1e3 100644 --- a/libs/spice/Cargo.toml +++ b/libs/spice/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "spice" version = "0.9.2" -edition = "2021" +edition = "2024" [dependencies] arcstr = { version = "1", features = ["serde", "substr-usize-indices"] } diff --git a/libs/spice/src/parser/mod.rs b/libs/spice/src/parser/mod.rs index 90bd77eb7..4589ae331 100644 --- a/libs/spice/src/parser/mod.rs +++ b/libs/spice/src/parser/mod.rs @@ -13,11 +13,11 @@ use std::ops::{Deref, DerefMut}; use std::path::{Path, PathBuf}; use std::str::FromStr; -use crate::parser::conv::convert_str_to_numeric_lit; use crate::Spice; +use crate::parser::conv::convert_str_to_numeric_lit; use arcstr::ArcStr; -use nom::bytes::complete::{take_till, take_while}; use nom::Input; +use nom::bytes::complete::{take_till, take_while}; use thiserror::Error; use self::conv::ScirConverter; @@ -186,13 +186,13 @@ impl Parser { }; self.parse_file_inner(resolved_path)?; } - (ReaderState::Subckt(ref mut subckt), Line::Component(c)) => { + (ReaderState::Subckt(subckt), Line::Component(c)) => { subckt.components.push(c); } - (ReaderState::Subckt(ref mut subckt), Line::Connect { node1, node2 }) => { + (ReaderState::Subckt(subckt), Line::Connect { node1, node2 }) => { subckt.connects.push((node1, node2)); } - (ReaderState::Subckt(ref mut subckt), Line::EndSubckt) => { + (ReaderState::Subckt(subckt), Line::EndSubckt) => { let subckt = std::mem::take(subckt); self.ast.elems.push(Elem::Subckt(subckt)); self.state.reader_state = ReaderState::Top; diff --git a/libs/spice/src/parser/shorts.rs b/libs/spice/src/parser/shorts.rs index d046197f9..c6c1ca4f1 100644 --- a/libs/spice/src/parser/shorts.rs +++ b/libs/spice/src/parser/shorts.rs @@ -1,6 +1,6 @@ //! Short propagation analysis. -use crate::parser::conv::{map_subckts, SubcktName}; +use crate::parser::conv::{SubcktName, map_subckts}; use crate::parser::{Ast, Component, Node, Subckt}; use std::collections::{HashMap, HashSet}; @@ -241,7 +241,7 @@ fn dfs_postorder_inner( Some(&s) => s, }; for c in subckt.components.iter() { - if let Component::Instance(ref inst) = c { + if let Component::Instance(inst) = c { dfs_postorder_inner(&inst.child, subckts, blackbox, visited, out); } } diff --git a/libs/type_dispatch/Cargo.toml b/libs/type_dispatch/Cargo.toml index 7d2c4686b..26914b365 100644 --- a/libs/type_dispatch/Cargo.toml +++ b/libs/type_dispatch/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "type_dispatch" version = "0.5.1" -edition = "2021" +edition = "2024" description = "Utilities for dispatching functions, constants, and trait implementations based on types." license = "BSD-3-Clause" diff --git a/libs/type_dispatch_macros/Cargo.toml b/libs/type_dispatch_macros/Cargo.toml index 87e2fd225..2e6c86749 100644 --- a/libs/type_dispatch_macros/Cargo.toml +++ b/libs/type_dispatch_macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "type_dispatch_macros" version = "0.4.1" -edition = "2021" +edition = "2024" description = "Macros for the `type_dispatch` crate." license = "BSD-3-Clause" diff --git a/libs/uniquify/Cargo.toml b/libs/uniquify/Cargo.toml index 6070cc64b..ef331b6cd 100644 --- a/libs/uniquify/Cargo.toml +++ b/libs/uniquify/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "uniquify" version = "0.4.0" -edition = "2021" +edition = "2024" description = "A library for assigning unique names." license = "BSD-3-Clause" diff --git a/libs/verilog/Cargo.toml b/libs/verilog/Cargo.toml index d152fd39d..c95e43f51 100644 --- a/libs/verilog/Cargo.toml +++ b/libs/verilog/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "verilog" version = "0.2.1" -edition = "2021" +edition = "2024" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/pdks/sky130/Cargo.toml b/pdks/sky130/Cargo.toml index f72e3c81c..d44853827 100644 --- a/pdks/sky130/Cargo.toml +++ b/pdks/sky130/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "sky130" version = "0.10.2" -edition = "2021" +edition = "2024" [dependencies] atoll = { version = "0.1.3", registry = "substrate", path = "../../libs/atoll" } diff --git a/rust-toolchain.toml b/rust-toolchain.toml index db4f68520..4f8240135 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,3 +1,3 @@ [toolchain] -channel = "1.85.1" +channel = "1.91.1" components = [ "rust-analyzer", "rustfmt", "clippy" ] diff --git a/substrate/Cargo.toml b/substrate/Cargo.toml index 085645ff9..244b8bb4e 100644 --- a/substrate/Cargo.toml +++ b/substrate/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "substrate" version = "0.10.2" -edition = "2021" +edition = "2024" [dependencies] serde = { version = "1", features = ["derive"] } diff --git a/substrate/src/types/schematic.rs b/substrate/src/types/schematic.rs index 3f77e1065..9b1649d96 100644 --- a/substrate/src/types/schematic.rs +++ b/substrate/src/types/schematic.rs @@ -687,7 +687,7 @@ impl NodeContext { .drivers .iter() .flat_map(|e1| n2_connections_data.drivers.iter().map(move |e2| [e1, e2])) - .filter(|[(&k1, _), (&k2, _)]| !k1.is_compatible_with(k2)) + .filter(|[(k1, _), (k2, _)]| !k1.is_compatible_with(**k2)) .collect(); if !incompatible_drivers.is_empty() { // If drivers are not compatible, return an error but connect them diff --git a/tools/magic/Cargo.toml b/tools/magic/Cargo.toml index e82d3e9cc..5a7bb6bfe 100644 --- a/tools/magic/Cargo.toml +++ b/tools/magic/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "magic" version = "0.2.1" -edition = "2021" +edition = "2024" [dependencies] tera = "1" diff --git a/tools/magic_netgen/Cargo.toml b/tools/magic_netgen/Cargo.toml index 3d4072c09..d6ce8331f 100644 --- a/tools/magic_netgen/Cargo.toml +++ b/tools/magic_netgen/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "magic_netgen" version = "0.1.3" -edition = "2021" +edition = "2024" [dependencies] substrate = { version = "0.10.2", registry = "substrate", path = "../../substrate" } diff --git a/tools/netgen/Cargo.toml b/tools/netgen/Cargo.toml index 0c64cec50..7dccc463e 100644 --- a/tools/netgen/Cargo.toml +++ b/tools/netgen/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "netgen" version = "0.2.1" -edition = "2021" +edition = "2024" [dependencies] tera = "1" diff --git a/tools/ngspice/Cargo.toml b/tools/ngspice/Cargo.toml index 423a2e862..f00769238 100644 --- a/tools/ngspice/Cargo.toml +++ b/tools/ngspice/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "ngspice" version = "0.5.2" -edition = "2021" +edition = "2024" [dependencies] rust_decimal = "1" diff --git a/tools/pegasus/Cargo.toml b/tools/pegasus/Cargo.toml index 361377ad5..211934ac1 100644 --- a/tools/pegasus/Cargo.toml +++ b/tools/pegasus/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "pegasus" version = "0.2.1" -edition = "2021" +edition = "2024" [dependencies] tera = "1" diff --git a/tools/quantus/Cargo.toml b/tools/quantus/Cargo.toml index 9dcc15d5f..f68a3d1c0 100644 --- a/tools/quantus/Cargo.toml +++ b/tools/quantus/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "quantus" version = "0.2.2" -edition = "2021" +edition = "2024" [dependencies] tera = "1" diff --git a/tools/spectre/Cargo.toml b/tools/spectre/Cargo.toml index 8c8038951..cd2c2ed7c 100644 --- a/tools/spectre/Cargo.toml +++ b/tools/spectre/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "spectre" version = "0.11.2" -edition = "2021" +edition = "2024" [dependencies] rust_decimal = "1" From e10606a73b5a51e59c29a7376b382c5d4136b16a Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Fri, 19 Dec 2025 14:39:08 -0800 Subject: [PATCH 3/7] fix warnings and revert release examples --- examples/release/colbuf/Cargo.toml | 2 +- examples/release/sky130_inverter/Cargo.toml | 2 +- examples/release/spice_vdivider/Cargo.toml | 2 +- .../release/substrate_api_examples/Cargo.toml | 2 +- examples/release/vdivider/Cargo.toml | 2 +- examples/release/via/Cargo.toml | 2 +- libs/atoll/src/grid.rs | 16 +++--------- libs/gds/src/write.rs | 25 +------------------ libs/psfparser/src/ascii/frontend.rs | 10 ++++---- libs/psfparser/src/binary/ast.rs | 4 +-- libs/psfparser/src/binary/mod.rs | 16 ++++++------ substrate/src/schematic/mod.rs | 4 +-- 12 files changed, 29 insertions(+), 58 deletions(-) diff --git a/examples/release/colbuf/Cargo.toml b/examples/release/colbuf/Cargo.toml index bf17fa888..c1b702a9e 100644 --- a/examples/release/colbuf/Cargo.toml +++ b/examples/release/colbuf/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "colbuf" version = "0.0.0" -edition = "2024" +edition = "2021" publish = false [dependencies] diff --git a/examples/release/sky130_inverter/Cargo.toml b/examples/release/sky130_inverter/Cargo.toml index 7f510243c..4f4b79f14 100644 --- a/examples/release/sky130_inverter/Cargo.toml +++ b/examples/release/sky130_inverter/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "sky130_inverter" version = "0.0.0" -edition = "2024" +edition = "2021" publish = false # begin-code-snippet dependencies diff --git a/examples/release/spice_vdivider/Cargo.toml b/examples/release/spice_vdivider/Cargo.toml index 8243d2418..f5ddd4e96 100644 --- a/examples/release/spice_vdivider/Cargo.toml +++ b/examples/release/spice_vdivider/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "spice_vdivider" version = "0.0.0" -edition = "2024" +edition = "2021" publish = false # begin-code-snippet dependencies diff --git a/examples/release/substrate_api_examples/Cargo.toml b/examples/release/substrate_api_examples/Cargo.toml index 0c224e932..3119c82a3 100644 --- a/examples/release/substrate_api_examples/Cargo.toml +++ b/examples/release/substrate_api_examples/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "substrate_api_examples" version = "0.0.0" -edition = "2024" +edition = "2021" publish = false [dependencies] diff --git a/examples/release/vdivider/Cargo.toml b/examples/release/vdivider/Cargo.toml index 7017ebe2f..21a7da99f 100644 --- a/examples/release/vdivider/Cargo.toml +++ b/examples/release/vdivider/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "vdivider" version = "0.0.0" -edition = "2024" +edition = "2021" publish = false [dependencies] diff --git a/examples/release/via/Cargo.toml b/examples/release/via/Cargo.toml index 66477b28e..746673a76 100644 --- a/examples/release/via/Cargo.toml +++ b/examples/release/via/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "via" version = "0.0.0" -edition = "2024" +edition = "2021" publish = false [dependencies] diff --git a/libs/atoll/src/grid.rs b/libs/atoll/src/grid.rs index 6f2604496..9748977bf 100644 --- a/libs/atoll/src/grid.rs +++ b/libs/atoll/src/grid.rs @@ -206,12 +206,12 @@ impl LayerStack { } /// A slice containing all layers in this stack. - pub fn all(&self) -> LayerSlice { + pub fn all(&self) -> LayerSlice<'_, L> { self.slice(0..self.layers.len()) } /// A slice containing the specified set of layers. - pub fn slice(&self, range: Range) -> LayerSlice { + pub fn slice(&self, range: Range) -> LayerSlice<'_, L> { LayerSlice { stack: self, start: range.start, @@ -399,11 +399,7 @@ impl RoutingGrid { pub(crate) fn grid_defining_layer(&self, layer: usize) -> usize { // The grid for layer N is formed by the tracks for layer N and the tracks for layer N-1, // except for N=0. For layer 0, the grid is formed by layers 0 and 1. - if layer == 0 { - 1 - } else { - layer - 1 - } + if layer == 0 { 1 } else { layer - 1 } } /// Calculates the span of a particular track on the given layer. @@ -635,11 +631,7 @@ impl + AtollLayer, S: substrate::layout::schema::Schema> Draw } fn sorted2(a: T, b: T) -> (T, T) { - if a <= b { - (a, b) - } else { - (b, a) - } + if a <= b { (a, b) } else { (b, a) } } /// A fixed-size routing grid. diff --git a/libs/gds/src/write.rs b/libs/gds/src/write.rs index 74711ee65..4bc6bc3b1 100644 --- a/libs/gds/src/write.rs +++ b/libs/gds/src/write.rs @@ -50,7 +50,7 @@ impl<'wr> GdsWriter<'wr> { // A quick closure for GDS's "even-lengths-only allowed" strings let gds_strlen = |s: &str| -> usize { s.len() + s.len() % 2 }; // First grab the header info: RecordType, DataType, and length - use GdsDataType::{BitArray, NoData, Str, F64, I16, I32}; + use GdsDataType::{BitArray, F64, I16, I32, NoData, Str}; let (rtype, dtype, len) = match record { // Library-Level Records GdsRecord::Header { .. } => (GdsRecordType::Header, I16, 2), @@ -494,29 +494,6 @@ trait Encode { } } -/// A list of GDS records. -/// -/// A largely for-testing implementer of the [Encode] trait, -/// which collects the generated records into a vector. -#[derive(Default, Debug, Deserialize, Serialize)] -pub struct GdsRecordList { - pub records: Vec, -} - -impl Encode for GdsRecordList { - /// Adds a [GdsRecord] to the list. - fn encode_record(&mut self, record: GdsRecord) -> GdsResult<()> { - self.records.push(record); - Ok(()) - } - - /// Adds an array of [GdsRecord]s to the list. - fn encode_records(&mut self, records: &[GdsRecord]) -> GdsResult<()> { - self.records.extend(records.to_vec()); - Ok(()) - } -} - impl GdsDateTimes { /// Encodes a date-time in GDSII's vector of i16's format. pub fn encode(&self) -> [i16; 12] { diff --git a/libs/psfparser/src/ascii/frontend.rs b/libs/psfparser/src/ascii/frontend.rs index 65d030cc3..fb1236400 100644 --- a/libs/psfparser/src/ascii/frontend.rs +++ b/libs/psfparser/src/ascii/frontend.rs @@ -1,11 +1,11 @@ use num::complex::Complex64; -use pest::iterators::Pair; use pest::Parser; +use pest::iterators::Pair; +use crate::Result; use crate::ascii::ast::{ Header, Kind, NamedValue, Prop, PsfAst, SignalValues, Sweep, Trace, TypeDef, Value, }; -use crate::Result; use super::ast::Values; @@ -13,14 +13,14 @@ use super::ast::Values; #[grammar = "ascii/psf_ascii.pest"] pub struct PsfAsciiParser; -pub fn parse(input: &str) -> Result { +pub fn parse(input: &str) -> Result> { let input = PsfAsciiParser::parse(Rule::psf_ascii, input)? .next() .unwrap(); parse_psf_inner(input) } -fn parse_psf_inner(input: Pair) -> Result { +fn parse_psf_inner(input: Pair<'_, Rule>) -> Result> { debug_assert_eq!(input.as_rule(), Rule::psf_ascii_inner); let mut pairs = input.into_inner(); let header = parse_header(pairs.next().unwrap())?; @@ -55,7 +55,7 @@ fn parse_psf_inner(input: Pair) -> Result { }) } -fn parse_header(input: Pair) -> Result
{ +fn parse_header(input: Pair<'_, Rule>) -> Result
{ debug_assert_eq!(input.as_rule(), Rule::header_section); let mut pairs = input.into_inner(); let named_values = pairs.next().unwrap(); diff --git a/libs/psfparser/src/binary/ast.rs b/libs/psfparser/src/binary/ast.rs index 376f75d28..f0777fa70 100644 --- a/libs/psfparser/src/binary/ast.rs +++ b/libs/psfparser/src/binary/ast.rs @@ -167,14 +167,14 @@ pub enum Trace<'a> { } impl<'a> Trace<'a> { - pub fn group(&self) -> &TraceGroup { + pub fn group(&self) -> &TraceGroup<'_> { match self { Self::Group(g) => g, _ => panic!("Cannot unwrap signal as group"), } } - pub fn signal(&self) -> &SignalRef { + pub fn signal(&self) -> &SignalRef<'_> { match self { Self::Signal(s) => s, _ => panic!("Cannot unwrap group trace as signal"), diff --git a/libs/psfparser/src/binary/mod.rs b/libs/psfparser/src/binary/mod.rs index bde4eff60..e73325c3b 100644 --- a/libs/psfparser/src/binary/mod.rs +++ b/libs/psfparser/src/binary/mod.rs @@ -10,7 +10,7 @@ pub(crate) mod tests; use crate::Result; -pub fn parse(input: &[u8]) -> Result { +pub fn parse(input: &[u8]) -> Result> { let mut parser = PsfParser::new(input); parser.parse(); Ok(parser.into_inner()) @@ -332,10 +332,12 @@ impl<'a> PsfParser<'a> { for _ in 0..self.num_traces() { let entry; (data, entry) = parse_point_value(data, &self.ast.types); - assert!(values - .values - .insert(entry.name.to_string(), entry) - .is_none()); + assert!( + values + .values + .insert(entry.name.to_string(), entry) + .is_none() + ); } self.ast.values = Some(SignalValues::Point(values)); @@ -567,7 +569,7 @@ fn parse_point_value<'a>(data: &'a [u8], types: &Types<'_>) -> (&'a [u8], PointV ) } -fn parse_properties(data: &[u8]) -> (&[u8], Properties) { +fn parse_properties(data: &[u8]) -> (&[u8], Properties<'_>) { let mut data = data; let mut values = Vec::new(); @@ -586,7 +588,7 @@ fn parse_properties(data: &[u8]) -> (&[u8], Properties) { (data, Properties { values }) } -fn parse_named_value(data: &[u8]) -> (&[u8], NamedValue) { +fn parse_named_value(data: &[u8]) -> (&[u8], NamedValue<'_>) { let (data, block_t) = parse_int(data); let (data, name) = parse_string(data); diff --git a/substrate/src/schematic/mod.rs b/substrate/src/schematic/mod.rs index 2ab1f91e4..959cf1ae0 100644 --- a/substrate/src/schematic/mod.rs +++ b/substrate/src/schematic/mod.rs @@ -7,8 +7,8 @@ pub mod schema; #[cfg(test)] mod tests; -use cache::mem::TypeCache; use cache::CacheHandle; +use cache::mem::TypeCache; pub use codegen::NestedData; use pathtree::PathTree; use serde::{Deserialize, Serialize}; @@ -495,7 +495,7 @@ impl CellBuilder { } /// Creates a [`SubCellBuilder`] for instantiating blocks from schema `S2`. - pub fn sub_builder(&mut self) -> SubCellBuilder + pub fn sub_builder(&mut self) -> SubCellBuilder<'_, S, S2> where S: FromSchema, { From 0fd6eae753bc81b1c0d57cd6cbfdf584849f8bda Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Sat, 20 Dec 2025 08:14:36 -0800 Subject: [PATCH 4/7] fix warnings --- config/src/home/env.rs | 2 +- config/src/paths.rs | 5 ++- libs/atoll/src/fold.rs | 18 ++++------ libs/atoll/src/grid.rs | 5 ++- libs/atoll/src/resizing.rs | 5 ++- libs/atoll/src/straps.rs | 5 ++- libs/gds/src/lib.rs | 4 +-- libs/gdsconv/src/conv.rs | 5 ++- libs/gdsconv/src/import.rs | 5 ++- libs/macrotools/src/lib.rs | 50 ++++++++++------------------ libs/psfparser/src/ascii/frontend.rs | 4 +-- libs/psfparser/src/binary/mod.rs | 2 +- libs/scir/src/lib.rs | 10 +++--- libs/spice/src/netlist.rs | 5 ++- substrate/src/layout/tiling.rs | 5 ++- substrate/src/types/impls.rs | 6 ++-- tools/spectre/src/analysis/tran.rs | 2 +- 17 files changed, 55 insertions(+), 83 deletions(-) diff --git a/config/src/home/env.rs b/config/src/home/env.rs index e95be9cc9..879b7f01d 100644 --- a/config/src/home/env.rs +++ b/config/src/home/env.rs @@ -76,7 +76,7 @@ pub(crate) fn substrate_home_with_cwd_env(env: &dyn Env, cwd: &Path) -> io::Resu _ => home_dir_with_env(env) .map(|p| p.join(".substrate")) .ok_or_else(|| { - io::Error::new(io::ErrorKind::Other, "could not find Substrate home dir") + io::Error::other("could not find Substrate home dir") }), } } diff --git a/config/src/paths.rs b/config/src/paths.rs index 2d0426670..042534177 100644 --- a/config/src/paths.rs +++ b/config/src/paths.rs @@ -41,11 +41,10 @@ impl<'a> Iterator for PathAncestors<'a> { if let Some(path) = self.current { self.current = path.parent(); - if let Some(ref stop_at) = self.stop_at { - if path == stop_at { + if let Some(ref stop_at) = self.stop_at + && path == stop_at { self.current = None; } - } Some(path) } else { diff --git a/libs/atoll/src/fold.rs b/libs/atoll/src/fold.rs index 4ac969306..d53d3d1ec 100644 --- a/libs/atoll/src/fold.rs +++ b/libs/atoll/src/fold.rs @@ -791,24 +791,21 @@ fn create_match(input: MatchInput) -> Option bool { for v in input.items[u].iter() { if let Some(&upair) = pair_v.get(v) { - if let Some(&upair_dist) = dist_u.get(&upair) { - if let Some(&udist) = dist_u.get(&u) { - if upair_dist == udist.checked_add(1).unwrap() + if let Some(&upair_dist) = dist_u.get(&upair) + && let Some(&udist) = dist_u.get(&u) + && upair_dist == udist.checked_add(1).unwrap() && dfs(upair, d_max, input, pair_u, pair_v, dist_u) { pair_v.insert(v, u); pair_u.insert(u, v); return true; } - } - } - } else if let Some(&udist) = dist_u.get(&u) { - if d_max == udist.checked_add(1).unwrap() { + } else if let Some(&udist) = dist_u.get(&u) + && d_max == udist.checked_add(1).unwrap() { pair_v.insert(v, u); pair_u.insert(u, v); return true; } - } } dist_u.remove(&u); false @@ -826,8 +823,8 @@ fn create_match(input: MatchInput) -> Option(input: MatchInput) -> Option RoutingState { let (nx, ny) = layer.size(); for x in 0..nx { for y in 0..ny { - if let PointState::Routed { net, has_via } = layer[(x, y)] { - if net == old { + if let PointState::Routed { net, has_via } = layer[(x, y)] + && net == old { layer[(x, y)] = PointState::Routed { net: new, has_via }; } - } } } } diff --git a/libs/atoll/src/resizing.rs b/libs/atoll/src/resizing.rs index fd0da3be2..74c290c0f 100644 --- a/libs/atoll/src/resizing.rs +++ b/libs/atoll/src/resizing.rs @@ -215,8 +215,8 @@ impl ResizableGrid { } else { for w_col in 0..w { let w_col_phys = increment * w_col as i64; - if let Some(prev_h) = &h[w - w_col][i - 1] { - if let Some(h_min) = self.col_min_height(i, w_col_phys) { + if let Some(prev_h) = &h[w - w_col][i - 1] + && let Some(h_min) = self.col_min_height(i, w_col_phys) { let tot_height = std::cmp::max(prev_h.min_height, h_min); if h[w][i] .as_ref() @@ -231,7 +231,6 @@ impl ResizableGrid { }); } } - } } } } diff --git a/libs/atoll/src/straps.rs b/libs/atoll/src/straps.rs index 90b562aaf..a34917c67 100644 --- a/libs/atoll/src/straps.rs +++ b/libs/atoll/src/straps.rs @@ -218,13 +218,12 @@ impl<'a, L: AtollLayer + Clone> GreedyStrapperState<'a, L> { } } } - if let Some((from, _)) = vias.last() { - if from.coord(track_dir) + strap_via_spacing > track_coord + if let Some((from, _)) = vias.last() + && from.coord(track_dir) + strap_via_spacing > track_coord && from.coord(track_dir) < track_coord + strap_via_spacing { has_via = true; } - } if !has_via && (self.routing_state.is_routed_for_net(ilt.to, strap.net) || self diff --git a/libs/gds/src/lib.rs b/libs/gds/src/lib.rs index 00e856d9d..032176d62 100644 --- a/libs/gds/src/lib.rs +++ b/libs/gds/src/lib.rs @@ -301,7 +301,7 @@ impl GdsFloat64 { let mantissa: f64 = mantissa as f64 / 2f64.powi(8 * 7); // Combine everything into our overall value if neg { - -1.0 * mantissa * 16f64.powi(exp) + -mantissa * 16f64.powi(exp) } else { mantissa * 16f64.powi(exp) } @@ -458,7 +458,7 @@ impl GdsPoint { /// Converts an n-element vector if `i32` into an n/2-element vector of [GdsPoint]s. fn parse_vec(from: &[i32]) -> GdsResult> { - if from.len() % 2 != 0 { + if !from.len().is_multiple_of(2) { return Err(GdsError::Str( "GdsPoint coordinate vector: Invalid number of elements".into(), )); diff --git a/libs/gdsconv/src/conv.rs b/libs/gdsconv/src/conv.rs index 7a3041f9e..0b2b01e50 100644 --- a/libs/gdsconv/src/conv.rs +++ b/libs/gdsconv/src/conv.rs @@ -103,15 +103,14 @@ pub fn from_gds( .intersects() { // Identify pin shapes with multiple labels. - if let Some(ref name) = name { - if name != text.text() { + if let Some(ref name) = name + && name != text.text() { return Err(FromGdsError::PinWithMultipleLabels { cell: cell.name().clone(), label1: name.clone(), label2: text.text().clone(), }); } - } name = Some(text.text().clone()); pin_texts.push(text.clone()); } diff --git a/libs/gdsconv/src/import.rs b/libs/gdsconv/src/import.rs index 958210de1..2416eba7a 100644 --- a/libs/gdsconv/src/import.rs +++ b/libs/gdsconv/src/import.rs @@ -106,11 +106,10 @@ impl<'a> GdsImporter<'a> { fn check_units(&mut self, units: &gds::GdsUnits) -> Result<()> { let gdsunit = units.db_unit(); - if let Some(expected_units) = &self.opts.units { - if (gdsunit - expected_units.db_unit()).abs() / expected_units.db_unit() > 1e-3 { + if let Some(expected_units) = &self.opts.units + && (gdsunit - expected_units.db_unit()).abs() / expected_units.db_unit() > 1e-3 { return Err(GdsImportError); } - } Ok(()) } /// Imports and adds a cell if not already defined diff --git a/libs/macrotools/src/lib.rs b/libs/macrotools/src/lib.rs index e0bf2c351..046a76127 100644 --- a/libs/macrotools/src/lib.rs +++ b/libs/macrotools/src/lib.rs @@ -1181,41 +1181,31 @@ fn apply_generic_type_binding(pred: &mut WherePredicate, ident: Ident, ty: Type) for seg in p.path.segments.iter_mut() { if let PathArguments::AngleBracketed(args) = &mut seg.arguments { for arg in args.args.iter_mut() { - if let GenericArgument::Type(t) = arg { - if let Type::Path(p) = t { - if p.path.segments.len() == 1 { - if let Some(last) = p.path.segments.last_mut() { - if last.ident == ident { + if let GenericArgument::Type(t) = arg + && let Type::Path(p) = t + && p.path.segments.len() == 1 + && let Some(last) = p.path.segments.last_mut() + && last.ident == ident { *t = ty.clone(); } - } - } - } - } } } } } for bound in pred.bounds.iter_mut() { - if let TypeParamBound::Trait(tb) = bound { - if let Some(last) = tb.path.segments.last_mut() { - if let PathArguments::AngleBracketed(args) = &mut last.arguments { + if let TypeParamBound::Trait(tb) = bound + && let Some(last) = tb.path.segments.last_mut() + && let PathArguments::AngleBracketed(args) = &mut last.arguments { for arg in args.args.iter_mut() { - if let GenericArgument::Type(t) = arg { - if let Type::Path(p) = t { - if p.path.segments.len() == 1 { - if let Some(last) = p.path.segments.last_mut() { - if last.ident == ident { + if let GenericArgument::Type(t) = arg + && let Type::Path(p) = t + && p.path.segments.len() == 1 + && let Some(last) = p.path.segments.last_mut() + && last.ident == ident { *t = ty.clone(); } - } - } - } - } } } - } - } } } } @@ -1225,17 +1215,13 @@ fn apply_generic_type_binding_ty(typ: &mut Type, ident: Ident, ty: Type) { for seg in p.path.segments.iter_mut() { if let PathArguments::AngleBracketed(ref mut args) = seg.arguments { for arg in args.args.iter_mut() { - if let GenericArgument::Type(t) = arg { - if let Type::Path(p) = t { - if p.path.segments.len() == 1 { - if let Some(last) = p.path.segments.last_mut() { - if last.ident == ident { + if let GenericArgument::Type(t) = arg + && let Type::Path(p) = t + && p.path.segments.len() == 1 + && let Some(last) = p.path.segments.last_mut() + && last.ident == ident { *t = ty.clone(); } - } - } - } - } } } } diff --git a/libs/psfparser/src/ascii/frontend.rs b/libs/psfparser/src/ascii/frontend.rs index fb1236400..7b668bb38 100644 --- a/libs/psfparser/src/ascii/frontend.rs +++ b/libs/psfparser/src/ascii/frontend.rs @@ -55,7 +55,7 @@ fn parse_psf_inner(input: Pair<'_, Rule>) -> Result> { }) } -fn parse_header(input: Pair<'_, Rule>) -> Result
{ +fn parse_header(input: Pair<'_, Rule>) -> Result> { debug_assert_eq!(input.as_rule(), Rule::header_section); let mut pairs = input.into_inner(); let named_values = pairs.next().unwrap(); @@ -89,7 +89,7 @@ fn parse_value(input: Pair) -> Result { }) } -fn parse_string(input: Pair) -> Result<&str> { +fn parse_string(input: Pair<'_, Rule>) -> Result<&str> { debug_assert_eq!(input.as_rule(), Rule::string); Ok(input.into_inner().next().unwrap().as_str()) } diff --git a/libs/psfparser/src/binary/mod.rs b/libs/psfparser/src/binary/mod.rs index e73325c3b..d76433ea3 100644 --- a/libs/psfparser/src/binary/mod.rs +++ b/libs/psfparser/src/binary/mod.rs @@ -614,7 +614,7 @@ fn parse_named_value(data: &[u8]) -> (&[u8], NamedValue<'_>) { fn parse_string(mut data: &[u8]) -> (&[u8], &str) { let len = read_u32(&mut data) as usize; let s = std::str::from_utf8(&data[..len]).unwrap(); - if len % 4 == 0 { + if len.is_multiple_of(4) { (&data[len..], s) } else { (&data[len + 4 - (len % 4)..], s) diff --git a/libs/scir/src/lib.rs b/libs/scir/src/lib.rs index e4dcfecd5..eb592c1c2 100644 --- a/libs/scir/src/lib.rs +++ b/libs/scir/src/lib.rs @@ -1060,11 +1060,10 @@ impl LibraryBuilder { self.cells.retain(|id, _| cells.contains(id)); // Clear top cell if top cell was deleted. - if let Some(top) = self.top_cell() { - if !cells.contains(&top) { + if let Some(top) = self.top_cell() + && !cells.contains(&top) { self.top = None; } - } // Remove primitives. self.primitives.retain(|id, _| primitives.contains(id)); @@ -1473,11 +1472,10 @@ impl LibraryBuilder { for (_, cell) in cells.iter_mut() { for (_, instance) in cell.instances.iter_mut() { - if let ChildId::Primitive(p) = instance.child { - if let Some(primitive) = primitives.get(&p) { + if let ChildId::Primitive(p) = instance.child + && let Some(primitive) = primitives.get(&p) { convert_instance(instance, primitive)?; } - } } } diff --git a/libs/spice/src/netlist.rs b/libs/spice/src/netlist.rs index 51916cc96..ff19d95c8 100644 --- a/libs/spice/src/netlist.rs +++ b/libs/spice/src/netlist.rs @@ -281,13 +281,12 @@ impl NetlisterInstance<'_, S, W> { rename_ground: &Option<(ArcStr, ArcStr)>, ) -> Result { let sig_info = cell.signal(slice.signal()); - if let Some((signal, replace_with)) = rename_ground { - if signal == &sig_info.name && slice.range().is_none() { + if let Some((signal, replace_with)) = rename_ground + && signal == &sig_info.name && slice.range().is_none() { // Ground renaming cannot apply to buses. // TODO assert that the ground port has width 1. return Ok(replace_with.clone()); } - } let mut buf = Vec::new(); self.schema.write_slice(&mut buf, slice, sig_info)?; Ok(ArcStr::from(std::str::from_utf8(&buf).expect( diff --git a/substrate/src/layout/tiling.rs b/substrate/src/layout/tiling.rs index 5779240a2..c43be8b6d 100644 --- a/substrate/src/layout/tiling.rs +++ b/substrate/src/layout/tiling.rs @@ -486,8 +486,8 @@ impl GridTiler { let mut blockage_idx = 0; let mut col_idx = 0; for key in row { - if let Some(blockage) = blockages.get(blockage_idx) { - if col_idx == blockage.start_col { + if let Some(blockage) = blockages.get(blockage_idx) + && col_idx == blockage.start_col { if i == blockage.end_row { blockages.remove(blockage_idx); } else { @@ -495,7 +495,6 @@ impl GridTiler { blockage_idx += 1; } } - } let tile = &self.tiles[*key]; if tile.rowspan > 1 { blockages.push(ColBlockage { diff --git a/substrate/src/types/impls.rs b/substrate/src/types/impls.rs index 57086cac2..02b137da9 100644 --- a/substrate/src/types/impls.rs +++ b/substrate/src/types/impls.rs @@ -208,7 +208,7 @@ impl_direction!( where E: Extend, { - output.extend(std::iter::repeat(Direction::Input).take(self.0.len())) + output.extend(std::iter::repeat_n(Direction::Input, self.0.len())) } ); impl_direction!( @@ -218,7 +218,7 @@ impl_direction!( where E: Extend, { - output.extend(std::iter::repeat(Direction::Output).take(self.0.len())) + output.extend(std::iter::repeat_n(Direction::Output, self.0.len())) } ); impl_direction!( @@ -228,7 +228,7 @@ impl_direction!( where E: Extend, { - output.extend(std::iter::repeat(Direction::InOut).take(self.0.len())) + output.extend(std::iter::repeat_n(Direction::InOut, self.0.len())) } ); impl_direction!( diff --git a/tools/spectre/src/analysis/tran.rs b/tools/spectre/src/analysis/tran.rs index 9964b0ebe..e16a480fe 100644 --- a/tools/spectre/src/analysis/tran.rs +++ b/tools/spectre/src/analysis/tran.rs @@ -180,7 +180,7 @@ impl Save for RawNestedNode { x: output .raw_values .get(name.as_str()) - .expect(&format!("no value for {name} found")) + .unwrap_or_else(|| panic!("no value for {name} found")) .clone(), } } From 2bc575378dec4e3f04edf45b149da865d98d6cef Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Sat, 20 Dec 2025 08:18:28 -0800 Subject: [PATCH 5/7] fix compile error --- libs/macrotools/src/lib.rs | 48 +++++++++++++++++++++----------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/libs/macrotools/src/lib.rs b/libs/macrotools/src/lib.rs index 046a76127..14b823f07 100644 --- a/libs/macrotools/src/lib.rs +++ b/libs/macrotools/src/lib.rs @@ -1067,8 +1067,8 @@ pub fn derive_trait(config: &DeriveTrait, input: &DeriveInput) -> proc_macro2::T let (imp, ty, wher) = generics.split_for_impl(); let (receiver, declare_receiver) = match receiver { - Receiver::Ref => (quote! { & }, quote! { ref }), - Receiver::MutRef => (quote! { &mut }, quote! { ref mut }), + Receiver::Ref => (quote! { & }, quote! {}), + Receiver::MutRef => (quote! { &mut }, quote! {}), Receiver::Owned => (quote! {}, quote! {}), }; @@ -1183,11 +1183,12 @@ fn apply_generic_type_binding(pred: &mut WherePredicate, ident: Ident, ty: Type) for arg in args.args.iter_mut() { if let GenericArgument::Type(t) = arg && let Type::Path(p) = t - && p.path.segments.len() == 1 - && let Some(last) = p.path.segments.last_mut() - && last.ident == ident { - *t = ty.clone(); - } + && p.path.segments.len() == 1 + && let Some(last) = p.path.segments.last_mut() + && last.ident == ident + { + *t = ty.clone(); + } } } } @@ -1195,17 +1196,19 @@ fn apply_generic_type_binding(pred: &mut WherePredicate, ident: Ident, ty: Type) for bound in pred.bounds.iter_mut() { if let TypeParamBound::Trait(tb) = bound && let Some(last) = tb.path.segments.last_mut() - && let PathArguments::AngleBracketed(args) = &mut last.arguments { - for arg in args.args.iter_mut() { - if let GenericArgument::Type(t) = arg - && let Type::Path(p) = t - && p.path.segments.len() == 1 - && let Some(last) = p.path.segments.last_mut() - && last.ident == ident { - *t = ty.clone(); - } - } + && let PathArguments::AngleBracketed(args) = &mut last.arguments + { + for arg in args.args.iter_mut() { + if let GenericArgument::Type(t) = arg + && let Type::Path(p) = t + && p.path.segments.len() == 1 + && let Some(last) = p.path.segments.last_mut() + && last.ident == ident + { + *t = ty.clone(); } + } + } } } } @@ -1217,11 +1220,12 @@ fn apply_generic_type_binding_ty(typ: &mut Type, ident: Ident, ty: Type) { for arg in args.args.iter_mut() { if let GenericArgument::Type(t) = arg && let Type::Path(p) = t - && p.path.segments.len() == 1 - && let Some(last) = p.path.segments.last_mut() - && last.ident == ident { - *t = ty.clone(); - } + && p.path.segments.len() == 1 + && let Some(last) = p.path.segments.last_mut() + && last.ident == ident + { + *t = ty.clone(); + } } } } From 98b404e803915d7a82098ab27435d71dcf7d7ea6 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Sat, 20 Dec 2025 08:19:40 -0800 Subject: [PATCH 6/7] fix ref errors --- libs/macrotools/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/libs/macrotools/src/lib.rs b/libs/macrotools/src/lib.rs index 14b823f07..6e7a8cf14 100644 --- a/libs/macrotools/src/lib.rs +++ b/libs/macrotools/src/lib.rs @@ -1066,10 +1066,10 @@ pub fn derive_trait(config: &DeriveTrait, input: &DeriveInput) -> proc_macro2::T add_trait_bounds(&mut generics, quote!(#trait_)); let (imp, ty, wher) = generics.split_for_impl(); - let (receiver, declare_receiver) = match receiver { - Receiver::Ref => (quote! { & }, quote! {}), - Receiver::MutRef => (quote! { &mut }, quote! {}), - Receiver::Owned => (quote! {}, quote! {}), + let receiver = match receiver { + Receiver::Ref => quote! { & }, + Receiver::MutRef => quote! { &mut }, + Receiver::Owned => quote! {}, }; let match_clause: TokenStream = match &input.data { @@ -1107,7 +1107,7 @@ pub fn derive_trait(config: &DeriveTrait, input: &DeriveInput) -> proc_macro2::T let declare = fields.named.iter().map(|f| { let name = f.ident.as_ref().unwrap(); quote_spanned! { f.span() => - #declare_receiver #name, + #name, } }); quote! { @@ -1124,7 +1124,7 @@ pub fn derive_trait(config: &DeriveTrait, input: &DeriveInput) -> proc_macro2::T let declare = fields.unnamed.iter().enumerate().map(|(i, f)| { let ident = format_ident!("field{i}"); quote_spanned! { f.span() => - #declare_receiver #ident, + #ident, } }); quote! { From f1f285a41ef8e5edd5defddf32c6e482cab86fb1 Mon Sep 17 00:00:00 2001 From: Rohan Kumar Date: Sun, 21 Dec 2025 21:04:33 -0800 Subject: [PATCH 7/7] fix warnings for Rust 2024 --- examples/latest/strongarm/src/tech/sky130.rs | 18 ++++----- libs/atoll/src/grid.rs | 9 +++-- libs/cache/src/error.rs | 2 +- libs/cache/src/persistent/client.rs | 40 ++++++++++++++------ pdks/sky130/src/atoll.rs | 10 ++--- pdks/sky130/src/mos.rs | 6 +-- substrate/src/block/tests.rs | 1 + 7 files changed, 53 insertions(+), 33 deletions(-) diff --git a/examples/latest/strongarm/src/tech/sky130.rs b/examples/latest/strongarm/src/tech/sky130.rs index 188ad058b..8719140f2 100644 --- a/examples/latest/strongarm/src/tech/sky130.rs +++ b/examples/latest/strongarm/src/tech/sky130.rs @@ -1,12 +1,12 @@ //! SKY130-specific implementations. -use crate::tiles::{MosKind, MosTileParams, TapIo, TapIoView, TapTileParams, TileKind}; use crate::StrongArmImpl; +use crate::tiles::{MosKind, MosTileParams, TapIo, TapIoView, TapTileParams, TileKind}; use atoll::resizing::ResizableInstance; use atoll::route::GreedyRouter; use atoll::{Tile, TileBuilder, TileData}; -use sky130::atoll::{MosLength, NmosTile, PmosTile, Sky130ViaMaker}; use sky130::Sky130; +use sky130::atoll::{MosLength, NmosTile, PmosTile, Sky130ViaMaker}; use substrate::arcstr; use substrate::arcstr::ArcStr; use substrate::block::Block; @@ -282,23 +282,23 @@ mod tests { use atoll::TileWrapper; use pegasus::lvs::LvsParams; use pegasus::{ - drc::{run_drc, DrcParams}, - lvs::LvsStatus, RuleCheck, + drc::{DrcParams, run_drc}, + lvs::LvsStatus, }; use quantus::pex::Pex; use rust_decimal::Decimal; use rust_decimal_macros::dec; use scir::netlist::ConvertibleNetlister; use sky130::corner::Sky130Corner; - use sky130::{layout::to_gds, Sky130, Sky130CdsSchema}; - use spice::{netlist::NetlistOptions, Spice}; + use sky130::{Sky130, Sky130CdsSchema, layout::to_gds}; + use spice::{Spice, netlist::NetlistOptions}; use std::path::{Path, PathBuf}; use std::sync::Arc; use substrate::context::Context; use substrate::geometry::dir::Dir; - use substrate::simulation::waveform::TimeWaveform; use substrate::simulation::Pvt; + use substrate::simulation::waveform::TimeWaveform; use substrate::{block::Block, schematic::ConvertSchema}; pub const SKY130_DRC: &str = concat!(env!("SKY130_CDS_PDK_ROOT"), "/Sky130_DRC"); @@ -746,8 +746,8 @@ mod tests { } chart .configure_series_labels() - .background_style(&WHITE.mix(0.8)) - .border_style(&BLACK) + .background_style(WHITE.mix(0.8)) + .border_style(BLACK) .draw() .unwrap(); diff --git a/libs/atoll/src/grid.rs b/libs/atoll/src/grid.rs index 9b996d3c4..77f3ba706 100644 --- a/libs/atoll/src/grid.rs +++ b/libs/atoll/src/grid.rs @@ -761,9 +761,10 @@ impl RoutingState { for x in 0..nx { for y in 0..ny { if let PointState::Routed { net, has_via } = layer[(x, y)] - && net == old { - layer[(x, y)] = PointState::Routed { net: new, has_via }; - } + && net == old + { + layer[(x, y)] = PointState::Routed { net: new, has_via }; + } } } } @@ -1074,7 +1075,7 @@ impl RoutingState { /// * We find two track coordinates on M(N+1): one by rounding up; the other by rounding down. /// * If the two coordinates are equal, we report a successor to that grid point. /// * Otherwise, we report a successor to the track with a closer physical coordinate, assuming - /// the farther coordinate is unobstructed. + /// the farther coordinate is unobstructed. pub fn successors( &self, node: RoutingNode, diff --git a/libs/cache/src/error.rs b/libs/cache/src/error.rs index 5eef0bc38..754bdfcbe 100644 --- a/libs/cache/src/error.rs +++ b/libs/cache/src/error.rs @@ -31,7 +31,7 @@ pub enum Error { Flexbuffers(#[from] flexbuffers::DeserializationError), #[allow(missing_docs)] #[error(transparent)] - Rpc(#[from] tonic::Status), + Rpc(#[from] Box), #[allow(missing_docs)] #[error(transparent)] Join(#[from] tokio::task::JoinError), diff --git a/libs/cache/src/persistent/client.rs b/libs/cache/src/persistent/client.rs index f658cb0a8..214b2f5b6 100644 --- a/libs/cache/src/persistent/client.rs +++ b/libs/cache/src/persistent/client.rs @@ -7,26 +7,27 @@ use std::{ net::TcpListener, path::{Path, PathBuf}, sync::{ - mpsc::{channel, Receiver, RecvTimeoutError, Sender}, Arc, Mutex, + mpsc::{Receiver, RecvTimeoutError, Sender, channel}, }, thread, time::Duration, }; use backoff::ExponentialBackoff; -use serde::{de::DeserializeOwned, Deserialize, Serialize}; +use serde::{Deserialize, Serialize, de::DeserializeOwned}; use tokio::runtime::{Handle, Runtime}; use tonic::transport::{Channel, Endpoint}; use crate::{ + CacheHandle, CacheHandleInner, Cacheable, CacheableWithState, GenerateFn, GenerateResultFn, + GenerateResultWithStateFn, GenerateWithStateFn, Namespace, error::{ArcResult, Error, Result}, rpc::{ local::{self, local_cache_client}, remote::{self, remote_cache_client}, }, - run_generator, CacheHandle, CacheHandleInner, Cacheable, CacheableWithState, GenerateFn, - GenerateResultFn, GenerateResultWithStateFn, GenerateWithStateFn, Namespace, + run_generator, }; use super::server::Server; @@ -825,7 +826,8 @@ impl Client { key, assign, }) - .await? + .await + .map_err(Box::new)? .into_inner()) }); Ok(out?.entry_status.unwrap()) @@ -835,7 +837,10 @@ impl Client { fn heartbeat_rpc_local(&self, id: u64) -> Result<()> { self.inner.handle.block_on(async { let mut client = self.connect_local().await?; - client.heartbeat(local::HeartbeatRequest { id }).await?; + client + .heartbeat(local::HeartbeatRequest { id }) + .await + .map_err(Box::new)?; Ok(()) }) } @@ -844,7 +849,10 @@ impl Client { fn done_rpc_local(&self, id: u64) -> Result<()> { self.inner.handle.block_on(async { let mut client = self.connect_local().await?; - client.done(local::DoneRequest { id }).await?; + client + .done(local::DoneRequest { id }) + .await + .map_err(Box::new)?; Ok(()) }) } @@ -853,7 +861,10 @@ impl Client { fn drop_rpc_local(&self, id: u64) -> Result<()> { self.inner.handle.block_on(async { let mut client = self.connect_local().await?; - client.drop(local::DropRequest { id }).await?; + client + .drop(local::DropRequest { id }) + .await + .map_err(Box::new)?; Ok(()) }) } @@ -1025,7 +1036,8 @@ impl Client { key, assign, }) - .await? + .await + .map_err(Box::new)? .into_inner()) }); Ok(out?.entry_status.unwrap()) @@ -1035,7 +1047,10 @@ impl Client { fn heartbeat_rpc_remote(&self, id: u64) -> Result<()> { self.inner.handle.block_on(async { let mut client = self.connect_remote().await?; - client.heartbeat(remote::HeartbeatRequest { id }).await?; + client + .heartbeat(remote::HeartbeatRequest { id }) + .await + .map_err(Box::new)?; Ok(()) }) } @@ -1044,7 +1059,10 @@ impl Client { fn set_rpc_remote(&self, id: u64, value: Vec) -> Result<()> { self.inner.handle.block_on(async { let mut client = self.connect_remote().await?; - client.set(remote::SetRequest { id, value }).await?; + client + .set(remote::SetRequest { id, value }) + .await + .map_err(Box::new)?; Ok(()) }) } diff --git a/pdks/sky130/src/atoll.rs b/pdks/sky130/src/atoll.rs index f1ed94abf..fcd7262de 100644 --- a/pdks/sky130/src/atoll.rs +++ b/pdks/sky130/src/atoll.rs @@ -1,8 +1,8 @@ //! SKY130 primitives for [ATOLL](atoll). +use crate::Sky130; use crate::layers::Sky130Layer; use crate::mos::{MosParams, Nfet01v8, Pfet01v8}; -use crate::Sky130; use arcstr::ArcStr; use atoll::abs::TrackCoord; use atoll::grid::{AbstractLayer, LayerStack, PdkLayer, RoutingGrid, TrackOffset}; @@ -331,8 +331,8 @@ impl MosTile { _ => i + 1, }]; - let gate_idx = |idx| match self.gate_dir { - GateDir::Left => (idx + 1) / 2, + let gate_idx = |idx: usize| match self.gate_dir { + GateDir::Left => idx.div_ceil(2), GateDir::Right => idx / 2, }; let poly_li = Rect::from_spans(li_track.hspan(), gate_vspan); @@ -470,7 +470,7 @@ impl Schematic for NmosTile { NodeBundle:: { d: io.sd[i], g: io.g[match self.tile.gate_dir { - GateDir::Left => (i + 1) / 2, + GateDir::Left => i.div_ceil(2), GateDir::Right => i / 2, }], s: io.sd[i + 1], @@ -579,7 +579,7 @@ impl Schematic for PmosTile { NodeBundle:: { d: io.sd[i], g: io.g[match self.tile.gate_dir { - GateDir::Left => (i + 1) / 2, + GateDir::Left => i.div_ceil(2), GateDir::Right => i / 2, }], s: io.sd[i + 1], diff --git a/pdks/sky130/src/mos.rs b/pdks/sky130/src/mos.rs index cb8a2d643..e93b0a609 100644 --- a/pdks/sky130/src/mos.rs +++ b/pdks/sky130/src/mos.rs @@ -13,8 +13,8 @@ use substrate::geometry::bbox::Bbox; use substrate::geometry::dir::Dir; use substrate::geometry::rect::Rect; use substrate::geometry::span::Span; -use substrate::layout::tracks::{RoundingMode, Tracks, UniformTracks}; use substrate::layout::Layout; +use substrate::layout::tracks::{RoundingMode, Tracks, UniformTracks}; use substrate::schematic::CellBuilder; use substrate::types::codegen::PortGeometryBundle; use substrate::types::layout::PortGeometry; @@ -435,8 +435,8 @@ impl MosTile { _ => i + 1, }]; - let gate_idx = |idx| match self.gate_dir { - GateDir::Left => (idx + 1) / 2, + let gate_idx = |idx: usize| match self.gate_dir { + GateDir::Left => idx.div_ceil(2), GateDir::Right => idx / 2, }; let poly_li = Rect::from_spans(li_track.hspan(), gate_vspan); diff --git a/substrate/src/block/tests.rs b/substrate/src/block/tests.rs index 85ef76f1a..fe8eb6cc0 100644 --- a/substrate/src/block/tests.rs +++ b/substrate/src/block/tests.rs @@ -3,6 +3,7 @@ use rust_decimal::Decimal; use serde::{Deserialize, Serialize}; use substrate::block::Block; +#[allow(unused)] #[derive(Debug, Copy, Clone, Hash, Eq, PartialEq, Serialize, Deserialize, Block)] #[substrate(io = "TestbenchIo")] pub struct DelayCellTb {