diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 7cf3b6d..a8454b7 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -15,6 +15,6 @@ jobs: - name: Check fmt run: cargo fmt --all -- --check - name: Check - run: cargo check --verbose + run: cargo check --verbose --all-features - name: Run tests - run: cargo test --verbose --workspace --all-targets + run: cargo test --verbose --workspace --all-targets --all-features diff --git a/Cargo.lock b/Cargo.lock index fea7518..1ac485e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,15 +2,6 @@ # It is not intended for manual editing. version = 4 -[[package]] -name = "addr2line" -version = "0.25.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b" -dependencies = [ - "gimli", -] - [[package]] name = "adler2" version = "2.0.1" @@ -105,9 +96,9 @@ checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" [[package]] name = "ar_archive_writer" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb93bbb63b9c227414f6eb3a0adfddca591a8ce1e9b60661bb08969b87e340b" +checksum = "4087686b4b0a3427190bae57a1d9a478dbb2d40c5dc1bd6e2b6d797913bdd348" dependencies = [ "object", ] @@ -118,21 +109,6 @@ version = "1.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2032f911046de80f0a198e0901378627c33f59ea0ac00e363d481118bd70a53" -[[package]] -name = "backtrace" -version = "0.3.76" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6" -dependencies = [ - "addr2line", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", - "windows-link", -] - [[package]] name = "bincode" version = "2.0.1" @@ -155,9 +131,15 @@ dependencies = [ [[package]] name = "bitflags" -version = "2.11.1" +version = "1.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" + +[[package]] +name = "bitflags" +version = "2.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" +checksum = "b4388bee8683e3d04af747c73422af53102d2bd24d9eadb6cbc100baef4b43f8" [[package]] name = "boa_ast" @@ -165,7 +147,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6339a700715bda376f5ea65c76e8fe8fc880930d8b0638cea68e7f3da6538e0a" dependencies = [ - "bitflags", + "bitflags 2.13.0", "boa_interner", "boa_macros", "boa_string", @@ -220,7 +202,7 @@ version = "0.21.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35bd957fa9fa93e3a001a8aba5a5cd40c2bbfde486378be4c4b472fd304aaddb" dependencies = [ - "bitflags", + "bitflags 2.13.0", "boa_ast", "boa_interner", "boa_macros", @@ -266,9 +248,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.63" +version = "1.2.65" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "556e016178bb5662a08681bbe0f00f8e17631781a4dfc8c45e466e4b185ec27f" +checksum = "e228eec9be7c17ccb640b59b36a5cd805ea2a564a4c5e162c2f659fea30d3b96" dependencies = [ "find-msvc-tools", "shlex", @@ -517,14 +499,43 @@ dependencies = [ "memchr", ] +[[package]] +name = "defmt" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a6e524506490a1953d237cb87b1cfc1e46f88c18f10a22dfe0f507dc6bfc7f7f" +dependencies = [ + "bitflags 1.3.2", + "defmt-macros", +] + +[[package]] +name = "defmt-macros" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f0a27770e9c8f719a79d8b638281f4d828f77d8fd61e0bd94451b9b85e576a0b" +dependencies = [ + "defmt-parser", + "proc-macro-error2", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "defmt-parser" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "10d60334b3b2e7c9d91ef8150abfb6fa4c1c39ebbcf4a81c2e346aad939fee3e" +dependencies = [ + "thiserror", +] + [[package]] name = "deranged" version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c" -dependencies = [ - "powerfmt", -] [[package]] name = "displaydoc" @@ -669,24 +680,16 @@ dependencies = [ [[package]] name = "getrandom" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0de51e6874e94e7bf76d726fc5d13ba782deca734ff60d5bb2fb2607c7406555" +checksum = "300e883d756b2e4ec94e02791f39b04b522276138852cfc41d9fb7e904106099" dependencies = [ "cfg-if", "libc", "r-efi", "rand_core", - "wasip2", - "wasip3", ] -[[package]] -name = "gimli" -version = "0.32.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7" - [[package]] name = "glob" version = "0.3.3" @@ -738,22 +741,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "human-panic" -version = "2.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2815d0c49773c6e0a9753960b3d0e50b822e48e08c77bcb4780be8474c9cc3d" -dependencies = [ - "anstream", - "anstyle", - "backtrace", - "serde", - "serde_derive", - "sysinfo", - "toml", - "uuid", -] - [[package]] name = "icu_collections" version = "2.0.0" @@ -820,12 +807,6 @@ dependencies = [ "zerovec", ] -[[package]] -name = "id-arena" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954" - [[package]] name = "indexmap" version = "2.14.0" @@ -834,8 +815,6 @@ checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9" dependencies = [ "equivalent", "hashbrown 0.17.1", - "serde", - "serde_core", ] [[package]] @@ -875,10 +854,11 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682" [[package]] name = "jiff" -version = "0.2.28" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4603d3033e49e2b0e31229fcab20a5d40089c607d975cd9c80551dc69eed9102" +checksum = "34f877a98676d2fb664698d74cc6a51ce6c484ce8c770f05d0108ec9090aeb46" dependencies = [ + "defmt", "jiff-static", "log", "portable-atomic", @@ -888,9 +868,9 @@ dependencies = [ [[package]] name = "jiff-static" -version = "0.2.28" +version = "0.2.29" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "782d32378dddf207193ac91cefb848ad41abb58195c95168e1291227a0832b47" +checksum = "0666b5ab5ecaca213fc2a85b8c0083d9004e84ee2d5f9a7e0017aaf50986f25f" dependencies = [ "proc-macro2", "quote", @@ -899,22 +879,15 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.99" +version = "0.3.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "142bc4740e452c1e57ade0cbc129f139c9093e354346f0872ef985f4f5cf5f11" +checksum = "03d04c30968dffe80775bd4d7fb676131cd04a1fb46d2686dbffbaec2d9dfd31" dependencies = [ "cfg-if", "futures-util", - "once_cell", "wasm-bindgen", ] -[[package]] -name = "leb128fmt" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2" - [[package]] name = "libc" version = "0.2.186" @@ -929,9 +902,9 @@ checksum = "92daf443525c4cce67b150400bc2316076100ce0b3686209eb8cf3c31612e6f0" [[package]] name = "log" -version = "0.4.30" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "616ec5685824bcc94416c6d4a7a446eea774a31efd7062c8480ba6fd06d7a6e5" +checksum = "0ceec5bc11778974d1bcb055b18002eba7f4b3518b6a0081b3af5f21666da9ad" [[package]] name = "logos" @@ -1027,9 +1000,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.8.1" +version = "2.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8" +checksum = "88904434abc2901f197fe8cc55f0445e7ded921dba5911dad2e2b39b48e663c4" [[package]] name = "miniz_oxide" @@ -1041,15 +1014,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "ntapi" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae" -dependencies = [ - "winapi", -] - [[package]] name = "num-bigint" version = "0.4.6" @@ -1093,25 +1057,6 @@ dependencies = [ "libc", ] -[[package]] -name = "objc2-core-foundation" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536" -dependencies = [ - "bitflags", -] - -[[package]] -name = "objc2-io-kit" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15" -dependencies = [ - "libc", - "objc2-core-foundation", -] - [[package]] name = "object" version = "0.37.3" @@ -1281,6 +1226,28 @@ dependencies = [ "syn", ] +[[package]] +name = "proc-macro-error-attr2" +version = "2.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" +dependencies = [ + "proc-macro2", + "quote", +] + +[[package]] +name = "proc-macro-error2" +version = "2.0.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" +dependencies = [ + "proc-macro-error-attr2", + "proc-macro2", + "quote", + "syn", +] + [[package]] name = "proc-macro2" version = "1.0.106" @@ -1311,9 +1278,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.45" +version = "1.0.46" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" +checksum = "dfbc457d0c7a0759a614551b11a6409e5951f6c7537be1f1b7682b9ae9230368" dependencies = [ "proc-macro2", ] @@ -1363,9 +1330,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.12.3" +version = "1.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276" +checksum = "f1292b7759ae1cb9ec195452d1390a074f0cd8541ab7a5a8c31cd6db45d4a6ba" dependencies = [ "aho-corasick", "memchr", @@ -1386,9 +1353,9 @@ dependencies = [ [[package]] name = "regex-syntax" -version = "0.8.10" +version = "0.8.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc897dd8d9e8bd1ed8cdad82b5966c3e0ecae09fb1907d58efaa013543185d0a" +checksum = "d6f6ff9a378485b298a5286656da665ba74413d36db0979633275d2e708145d4" [[package]] name = "regress" @@ -1400,12 +1367,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "rustc-demangle" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" - [[package]] name = "rustc-hash" version = "2.1.2" @@ -1439,12 +1400,6 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "semver" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd" - [[package]] name = "serde" version = "1.0.228" @@ -1488,15 +1443,6 @@ dependencies = [ "zmij", ] -[[package]] -name = "serde_spanned" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6662b5879511e06e8999a8a235d848113e942c9124f211511b16466ee2995f26" -dependencies = [ - "serde_core", -] - [[package]] name = "shlex" version = "2.0.1" @@ -1521,12 +1467,6 @@ version = "0.4.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c790de23124f9ab44544d7ac05d60440adc586479ce501c1d6d7da3cd8c9cf5" -[[package]] -name = "smallvec" -version = "1.15.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" - [[package]] name = "smc_scan" version = "0.3.0" @@ -1535,7 +1475,6 @@ dependencies = [ "clap", "clap-verbosity-flag", "env_logger", - "human-panic", "indicatif", "log", "serde", @@ -1550,12 +1489,12 @@ dependencies = [ name = "smc_scan_core" version = "0.2.0" dependencies = [ + "bumpalo", "criterion", "flate2", "log", "rand", "rayon", - "smallvec", "thiserror", ] @@ -1666,9 +1605,9 @@ checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" [[package]] name = "syn" -version = "2.0.117" +version = "2.0.118" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" +checksum = "1b9ae57f904213ebb649ce6895b8a66c66f0203b9319718f69a5612a065b1422" dependencies = [ "proc-macro2", "quote", @@ -1686,20 +1625,6 @@ dependencies = [ "syn", ] -[[package]] -name = "sysinfo" -version = "0.38.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92ab6a2f8bfe508deb3c6406578252e491d299cbbf3bc0529ecc3313aee4a52f" -dependencies = [ - "libc", - "memchr", - "ntapi", - "objc2-core-foundation", - "objc2-io-kit", - "windows", -] - [[package]] name = "thiserror" version = "2.0.18" @@ -1722,12 +1647,11 @@ dependencies = [ [[package]] name = "time" -version = "0.3.47" +version = "0.3.51" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "743bd48c283afc0388f9b8827b976905fb217ad9e647fae3a379a9283c4def2c" +checksum = "85c17d80feb7334b40c484e45ed1a5273dfd8bfda537c3be2e74a06a6686f327" dependencies = [ "deranged", - "itoa", "libc", "num-conv", "num_threads", @@ -1739,15 +1663,15 @@ dependencies = [ [[package]] name = "time-core" -version = "0.1.8" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7694e1cfe791f8d31026952abf09c69ca6f6fa4e1a1229e18988f06a04a12dca" +checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "time-macros" -version = "0.2.27" +version = "0.2.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e70e4c5a0e0a8a4823ad65dfe1a6930e4f4d756dcd9dd7939022b5e8c501215" +checksum = "dcef1a61bdb119096e153208ec5cbec23944ce8bca13be5c7f60c634f7403935" dependencies = [ "num-conv", "time-core", @@ -1774,33 +1698,6 @@ dependencies = [ "serde_json", ] -[[package]] -name = "toml" -version = "1.1.2+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81f3d15e84cbcd896376e6730314d59fb5a87f31e4b038454184435cd57defee" -dependencies = [ - "serde_core", - "serde_spanned", - "toml_datetime", - "toml_writer", -] - -[[package]] -name = "toml_datetime" -version = "1.1.1+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3165f65f62e28e0115a00b2ebdd37eb6f3b641855f9d636d3cd4103767159ad7" -dependencies = [ - "serde_core", -] - -[[package]] -name = "toml_writer" -version = "1.1.1+spec-1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "756daf9b1013ebe47a8776667b466417e2d4c5679d441c26230efd9ef78692db" - [[package]] name = "unicode-ident" version = "1.0.24" @@ -1809,9 +1706,9 @@ checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75" [[package]] name = "unicode-segmentation" -version = "1.13.2" +version = "1.13.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9629274872b2bfaf8d66f5f15725007f635594914870f65218920345aa11aa8c" +checksum = "c6f5d3c3b1bf09027a88a6bc961fc00497d651009560b5463668dc81b0fa87a8" [[package]] name = "unicode-width" @@ -1825,12 +1722,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" -[[package]] -name = "unicode-xid" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" - [[package]] name = "unit-prefix" version = "0.5.2" @@ -1849,15 +1740,6 @@ version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" -[[package]] -name = "uuid" -version = "1.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d258b83ceec21034727ecee8c382cfa6c3e133699b0742c64571814fb420c9f7" -dependencies = [ - "getrandom", -] - [[package]] name = "vergen" version = "8.3.2" @@ -1895,29 +1777,11 @@ dependencies = [ "winapi-util", ] -[[package]] -name = "wasip2" -version = "1.0.3+wasi-0.2.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" -dependencies = [ - "wit-bindgen 0.57.1", -] - -[[package]] -name = "wasip3" -version = "0.4.0+wasi-0.3.0-rc-2026-01-06" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5" -dependencies = [ - "wit-bindgen 0.51.0", -] - [[package]] name = "wasm-bindgen" -version = "0.2.122" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ed04576f974d2b2fba0f38c51dbc5518011e38c36bf1143164be765528fd409" +checksum = "8ddb3f79143bced6de84270411622a2699cee572fc0875aeaf1e7867cf9fca1a" dependencies = [ "cfg-if", "once_cell", @@ -1928,9 +1792,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.122" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "916151b09da36bd82f6615cbf3a419e2f0ba23a03c6160e8e92eb6bd4aa1dec6" +checksum = "4e21a184b13fb19e157296e2c46056aec9092264fab83e4ba59e68c61b323c3d" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -1938,9 +1802,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.122" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "299047362ccbfce148b67ab7e73349f77748e00c8296f9542adfad2ad82c5c5e" +checksum = "fecefd9c35bd935a20fc3fc344b5f29138961e4f47fb03297d88f2587afb5ebd" dependencies = [ "bumpalo", "proc-macro2", @@ -1951,52 +1815,18 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.122" +version = "0.2.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a929b2c61f11ba3e9bc35b50c1f25cb38e0e892c0c231ae2b8cf78d5dad4437" +checksum = "23939e44bb9a5d7576fa2b563dc2e136628f1224e88a8deed09e04858b77871f" dependencies = [ "unicode-ident", ] -[[package]] -name = "wasm-encoder" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319" -dependencies = [ - "leb128fmt", - "wasmparser", -] - -[[package]] -name = "wasm-metadata" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909" -dependencies = [ - "anyhow", - "indexmap", - "wasm-encoder", - "wasmparser", -] - -[[package]] -name = "wasmparser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe" -dependencies = [ - "bitflags", - "hashbrown 0.15.5", - "indexmap", - "semver", -] - [[package]] name = "web-sys" -version = "0.3.99" +version = "0.3.102" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d621441cfc37b84979402712047321980c178f299193a3589d05b99e8763436" +checksum = "a6430a72df5eb332242960fe84b3002a241163998241eb596d4f739b9757061d" dependencies = [ "js-sys", "wasm-bindgen", @@ -2043,107 +1873,12 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" -dependencies = [ - "windows-collections", - "windows-core", - "windows-future", - "windows-numerics", -] - -[[package]] -name = "windows-collections" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" -dependencies = [ - "windows-core", -] - -[[package]] -name = "windows-core" -version = "0.62.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8e83a14d34d0623b51dce9581199302a221863196a1dde71a7663a4c2be9deb" -dependencies = [ - "windows-implement", - "windows-interface", - "windows-link", - "windows-result", - "windows-strings", -] - -[[package]] -name = "windows-future" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" -dependencies = [ - "windows-core", - "windows-link", - "windows-threading", -] - -[[package]] -name = "windows-implement" -version = "0.60.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "windows-interface" -version = "0.59.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358" -dependencies = [ - "proc-macro2", - "quote", - "syn", -] - [[package]] name = "windows-link" version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-numerics" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" -dependencies = [ - "windows-core", - "windows-link", -] - -[[package]] -name = "windows-result" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7781fa89eaf60850ac3d2da7af8e5242a5ea78d1a11c49bf2910bb5a73853eb5" -dependencies = [ - "windows-link", -] - -[[package]] -name = "windows-strings" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7837d08f69c77cf6b07689544538e017c1bfcf57e34b4c0ff58e6c2cd3b37091" -dependencies = [ - "windows-link", -] - [[package]] name = "windows-sys" version = "0.61.2" @@ -2153,109 +1888,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-threading" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" -dependencies = [ - "windows-link", -] - -[[package]] -name = "wit-bindgen" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5" -dependencies = [ - "wit-bindgen-rust-macro", -] - -[[package]] -name = "wit-bindgen" -version = "0.57.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" - -[[package]] -name = "wit-bindgen-core" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc" -dependencies = [ - "anyhow", - "heck", - "wit-parser", -] - -[[package]] -name = "wit-bindgen-rust" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21" -dependencies = [ - "anyhow", - "heck", - "indexmap", - "prettyplease", - "syn", - "wasm-metadata", - "wit-bindgen-core", - "wit-component", -] - -[[package]] -name = "wit-bindgen-rust-macro" -version = "0.51.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a" -dependencies = [ - "anyhow", - "prettyplease", - "proc-macro2", - "quote", - "syn", - "wit-bindgen-core", - "wit-bindgen-rust", -] - -[[package]] -name = "wit-component" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2" -dependencies = [ - "anyhow", - "bitflags", - "indexmap", - "log", - "serde", - "serde_derive", - "serde_json", - "wasm-encoder", - "wasm-metadata", - "wasmparser", - "wit-parser", -] - -[[package]] -name = "wit-parser" -version = "0.244.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736" -dependencies = [ - "anyhow", - "id-arena", - "indexmap", - "log", - "semver", - "serde", - "serde_derive", - "serde_json", - "unicode-xid", - "wasmparser", -] - [[package]] name = "writeable" version = "0.6.3" @@ -2264,9 +1896,9 @@ checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "yoke" -version = "0.8.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe8c5fda708d9ca3df187cae8bfb9ceda00dd96231bed36e445a1a48e66f9ca" +checksum = "709fe23a0424b6a435d82152b1bd3fdfb0833487d5fa90d05d42762a9891fef5" dependencies = [ "stable_deref_trait", "yoke-derive", @@ -2287,18 +1919,18 @@ dependencies = [ [[package]] name = "zerocopy" -version = "0.8.50" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b065d4f0e55f82fae73202e189638116a87c55ab6b8e6c2721e13dd9d854ad1" +checksum = "ce1022995ff5ff5d841ad7d994facc23098cd40152f2c1d11cd607c6f530653f" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.8.50" +version = "0.8.52" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b631b19d36a892ab55420c92dbc83ccd79274f25be714855d3074aa71cab639" +checksum = "1ae7f38b72ec2a254e2b87ef277cf2cd4fb97cbebf944faa6f33354da0867930" dependencies = [ "proc-macro2", "quote", @@ -2363,9 +1995,9 @@ dependencies = [ [[package]] name = "zlib-rs" -version = "0.6.3" +version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3be3d40e40a133f9c916ee3f9f4fa2d9d63435b5fbe1bfc6d9dae0aa0ada1513" +checksum = "977347db8caa080403f6b6b7c1cda9479a8e869316f7e13a59b19076a40f94e3" [[package]] name = "zmij" diff --git a/Cargo.toml b/Cargo.toml index 98587f3..7f9d9eb 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,12 @@ categories = [ ] exclude = ["scan_book/*", ".github/*"] +[features] +default = ["scxml", "jani"] +scxml = ["dep:smc_scan_scxml"] +jani = ["dep:smc_scan_jani"] +promela = ["dep:smc_scan_promela"] + [lib] name = "scan" # The name of the target. crate-type = ["lib"] # The crate types to generate. @@ -26,9 +32,15 @@ crate-type = ["lib"] # The crate types to generate. name = "scan" # The name of the target. path = "src/main.rs" -[profile.release] +[profile.release-lto] +inherits = "release" lto = true codegen-units = 1 +debug = "none" + +[profile.profiling] +inherits = "release-lto" +debug = "full" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [workspace] @@ -44,9 +56,9 @@ members = [ [workspace.dependencies] anyhow = "1.0.102" csv = "1.4.0" -log = "0.4.29" +log = "0.4.33" serde = { version = "1.0.228", features = ["derive"] } -serde_json = "1.0.149" +serde_json = "1.0.150" thiserror = "2.0.18" [dependencies] @@ -54,12 +66,11 @@ anyhow = { workspace = true } clap = { version = "4.6.1", features = ["derive"] } clap-verbosity-flag = "3.0.4" env_logger = "0.11.10" -human-panic = "2.0.8" indicatif = { version = "0.18.4", features = ["improved_unicode"] } log = { workspace = true } smc_scan_core = { version = "0.2.0", path = "scan_core" } -smc_scan_jani = { version = "0.2.0", path = "scan_jani" } -smc_scan_scxml = { version = "0.3.0", path = "scan_scxml" } -smc_scan_promela = { version = "0.2.0", path = "scan_promela" } +smc_scan_jani = { version = "0.2.0", path = "scan_jani", optional = true } +smc_scan_scxml = { version = "0.3.0", path = "scan_scxml", optional = true } +smc_scan_promela = { version = "0.2.0", path = "scan_promela", optional = true } serde = { workspace = true } serde_json = { workspace = true } diff --git a/README.md b/README.md index 46f135b..1277353 100644 --- a/README.md +++ b/README.md @@ -19,6 +19,8 @@ API docs for the library crates: - [`smc_scan_scxml`](https://docs.rs/smc_scan_scxml/latest/scan_scxml/) - [`smc_scan_jani`](https://docs.rs/smc_scan_jani/latest/scan_jani/) - [`smc_scan_promela`](https://docs.rs/smc_scan_promela/latest/scan_promela/) +- [`smc_scan_pmtl`](https://docs.rs/smc_scan_pmtl/latest/scan_pmtl/) +- [`smc_scan_mtl`](https://docs.rs/smc_scan_mtl/latest/scan_mtl/) - [`smc_scan`](https://docs.rs/smc_scan/latest/scan/) ## Formalism @@ -35,7 +37,11 @@ At the moment the following languages are planned or (partially) implemented: - [ ] [Promela](https://spinroot.com/spin/Man/Manual.html) - [x] [JANI](https://jani-spec.org/) -## Build prerequisites +## Installation + +Currently, the only way to obtain SCAN is to build it from sources. + +### Build prerequisites SCAN is entirely written in [Rust](https://www.rust-lang.org/), so, to build it, you need to install a recent version of the Rust toolchain. @@ -43,9 +49,7 @@ The easiest and recommended way to do so is by installing [rustup](https://rustu either following the instructions on its homepage or through your OS's package manager. Do not forget to set your `PATH` correctly, if required. -## Installation and usage - -Currently, the only way to use SCAN is to build it from sources. +### Installing with Cargo To install and use SCAN on your system, the easiest way is to use the `cargo install` command. @@ -61,19 +65,9 @@ Cargo will build and install SCAN on your system but it is recommended as it improves build reproducibility by enforcing the use of specified versions for dependencies). -To install a specific SCAN version, e.g., v0.1.0, use: - -```console -cargo install smc_scan --version 0.1.0 --locked -``` - -It is also possible to install SCAN from the latest commit directly from this repository with: +For advanced installation options, refer to the [Install](https://convince-project.github.io/scan/manual/install.html) section of the SCAN Book. -```console -cargo install --git https://github.com/convince-project/scan -``` - -(see `cargo install --help` for more options). +## Usage After installation, SCAN can be used as a CLI tool. To print the help screen, use @@ -92,14 +86,7 @@ scan verify --all where `MODEL` is the path to your model file or folder. -It can be helpful to run SCAN with logging activated. -Use the `--verbose` flag (even multiple times) to increase the verbosity level, or - -```console -RUST_LOG= scan -``` - -where `LOG_LEVEL=error|warn|info|debug|trace`. +For an in-depth documentation of the user interface, refer to the [Interface](https://convince-project.github.io/scan/manual/interface.html) section of the SCAN Book. ## Development diff --git a/scan_book/src/SUMMARY.md b/scan_book/src/SUMMARY.md index b0c4ca7..d83e73c 100644 --- a/scan_book/src/SUMMARY.md +++ b/scan_book/src/SUMMARY.md @@ -2,19 +2,19 @@ [Introduction](./README.md) -# The SCAN User Manual +# The SCAN user manual - [Installation](./manual/install.md) -- [The User Interface](./manual/interface.md) +- [The user interface](./manual/interface.md) -# Model Checking Background in SCAN +# Model checking background - [Channel Systems]() -- [Temporal Logic]() -- [Statistical Model Checking]() +- [Temporal logic]() +- [Statistical model checking]() -# SCXML-based Model Specification Format +# SCXML model specification -- [Model Main File]() -- [Properties](./scxml/properties.md) -- [SCXML Processes]() +- [Model main file]() +- [XML properties](./scxml/properties.md) +- [SCXML processes]() diff --git a/scan_book/src/manual/install.md b/scan_book/src/manual/install.md index 4c6bb7b..6e2662a 100644 --- a/scan_book/src/manual/install.md +++ b/scan_book/src/manual/install.md @@ -1,5 +1,7 @@ # Installation +Currently, the only way to obtain SCAN is to build it from sources. + ## Build prerequisites SCAN is entirely written in [Rust](https://www.rust-lang.org/), @@ -34,3 +36,65 @@ scan to verify that the installation completed successfully by displaying the in-line help. + +## Installing specific versions + +To install a specific SCAN version, e.g., v0.1.0, use: + +```console +cargo install smc_scan --version 0.1.0 --locked +``` + +It is also possible to install SCAN from the latest commit directly from this repository with: + +```console +cargo install --git https://github.com/convince-project/scan +``` + +(see `cargo install --help` for more options). + +## Features + +By default, SCAN includes the SCXML and JANI frontends, +while the Promela frontend is disabled through the use of [Cargo features](https://doc.rust-lang.org/cargo/reference/features.html). +The available features for SCAN are: + +- `scxml` to include the SCXML frontend (enabled by default); +- `jani` to include the JANI frontend (enabled by default); +- `promela` to include the Promela frontend (disabled by default); + +To change which frontends to include at build time, +explicitly select the desired features with the `--features` option as follows: + +```console +cargo install smc_scan --locked --features FEATURES +``` + +where `FEATURES` is a (comma-separated, or space-separated inside quotes) list. +Alternatively, if you want all available features, install SCAN with: + +```console +cargo install smc_scan --locked --all-features +``` + +Be aware that each feature imports extra dependencies and increases build time. + +## Build optimization + +Even though by default the `cargo install` builds are well-optimized, +some further advanced build optimizations are possible. +The extent of the speed-up that can be obtained depends on the use-case, +and is not always worth the extra effort required to enable these configurations. + +Advanced Rust users will already be familiar with compilation settings +and can tune the build as they see fit. +For users that are unfamiliar with Rust but still want to get high performances, +and without going into the details, +a more optimized built can be attempted with: + +```console +RUSTFLAGS="-C target-cpu=native" cargo install smc_scan --locked --profile release-lto +``` + +An excellent, though unofficial, reference on Rust performance optimization is [The Rust Performance Book](https://nnethercote.github.io/perf-book/), +specifically the [Build configuration](https://nnethercote.github.io/perf-book/build-configuration.html) section. diff --git a/scan_book/src/manual/interface.md b/scan_book/src/manual/interface.md index 4900c5b..252d5cd 100644 --- a/scan_book/src/manual/interface.md +++ b/scan_book/src/manual/interface.md @@ -1,4 +1,4 @@ -# The User Interface +# The user interface SCAN provides a command line interface. @@ -95,18 +95,6 @@ via the new adaptive sampling method. This determines the number of necessary samples also based on the outcomes of the previous samples, so that this number cannot be known a-priori but has to be continually recalculated during the verification task. -The `--duration` flag's value sets the maximum duration (in model time) that the execution can take before being stopped. -As this may vary depending on the input model and SCAN has no means to determine it, -SCAN sets a reasonably large default value (10,000 time steps), -but for best results the developer should set a value fitting the model. - -__WARNING:__ if verification seems to be hanging without making any progress, -it might be due to a wrong (too small) duration value. -Indeed, if the model is still running and the properties still undetermined when it reaches the time limit, -the execution is discarded and does not count towards the result. -If this happens systematically, all executions will be discarded. -In such case, increase the duration to a value appropriate to your model. - By default, SCAN only prints a short message informing the user that a verification task is underway, then it hangs silently until the task is finished (if ever). This is a fine behavior for use by other tools or in scripts, @@ -138,7 +126,7 @@ scan [GLOBAL_OPTIONS] trace [OPTIONS] [PROPERTIES] where `TRACES` is the number of traces that are requested. -The available options are `--duration` and `--single-thread`, +The available option is `--single-thread`, with the same meaning as for the `verify` command. The traces produced during verification are saved in a `./traces_NN/` directory, diff --git a/scan_book/src/scxml/properties.md b/scan_book/src/scxml/properties.md index d36e1c6..b1f9143 100644 --- a/scan_book/src/scxml/properties.md +++ b/scan_book/src/scxml/properties.md @@ -1,3 +1,5 @@ +# XML properties + Properties are to be specified in a custom XML format (as there is no property specification format in SCXML). The following example shows the format structure and its elements: diff --git a/scan_core/Cargo.toml b/scan_core/Cargo.toml index ef49c59..fcf051a 100644 --- a/scan_core/Cargo.toml +++ b/scan_core/Cargo.toml @@ -27,7 +27,7 @@ log = { workspace = true } flate2 = { version = "1.1.9", features = ["zlib-rs"], default-features = false } rand = { version = "0.10.1" } rayon = "1.12.0" -smallvec = "1.15.1" +bumpalo = { version = "3.20.3", features = ["collections"] } [dev-dependencies] criterion = "0.8.2" diff --git a/scan_core/benches/program_graph.rs b/scan_core/benches/program_graph.rs index 759ad9e..830fc20 100644 --- a/scan_core/benches/program_graph.rs +++ b/scan_core/benches/program_graph.rs @@ -84,7 +84,7 @@ fn counter_pg() -> ProgramGraphBuilder { let mut pg = ProgramGraphBuilder::new(); let initial = pg.new_initial_location(); let action = pg.new_action(); - let var = pg.new_var(Val::Integer(0)).unwrap(); + let var = pg.new_var(Val::Integer(0)); pg.add_effect( action, var, diff --git a/scan_core/src/channel_system.rs b/scan_core/src/channel_system.rs index 128e4b9..9034e79 100644 --- a/scan_core/src/channel_system.rs +++ b/scan_core/src/channel_system.rs @@ -110,27 +110,26 @@ //! ``` mod builder; +mod run; +use crate::grammar::*; use crate::program_graph::{ Action as PgAction, Clock as PgClock, Location as PgLocation, Var as PgVar, *, }; -use crate::{Time, grammar::*}; pub use builder::*; -use rand::rngs::SmallRng; -use rand::seq::IteratorRandom; -use rand::{RngExt, SeedableRng}; -use smallvec::SmallVec; -use std::collections::VecDeque; +pub use run::ChannelSystemRun; use thiserror::Error; +type PgIndex = u16; + /// An indexing object for PGs in a CS. /// /// These cannot be directly created or manipulated, /// but have to be generated and/or provided by a [`ChannelSystemBuilder`] or [`ChannelSystem`]. #[derive(Debug, Clone, Copy, Hash, PartialEq, Eq, PartialOrd, Ord)] -pub struct PgId(u16); +pub struct PgId(PgIndex); -impl From for u16 { +impl From for PgIndex { #[inline] fn from(val: PgId) -> Self { val.0 @@ -181,8 +180,6 @@ pub struct Var(PgId, PgVar); #[derive(Debug, Clone, Copy, Hash, PartialEq, Eq)] pub struct Clock(PgId, PgClock); -type TimeConstraint = (Clock, Option