diff --git a/.github/workflows/bench.yml b/.github/workflows/bench.yml index cf4a54a96d..5c53a840bf 100644 --- a/.github/workflows/bench.yml +++ b/.github/workflows/bench.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 with: components: rustfmt, clippy - uses: actions/checkout@v3 diff --git a/.github/workflows/cairo_1_programs.yml b/.github/workflows/cairo_1_programs.yml index c2872a03b4..fec819d458 100644 --- a/.github/workflows/cairo_1_programs.yml +++ b/.github/workflows/cairo_1_programs.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 - name: Set up Cargo cache uses: Swatinem/rust-cache@v2 - name: Checkout diff --git a/.github/workflows/fresh_run.yml b/.github/workflows/fresh_run.yml index fd523f7c75..5b83d740ff 100644 --- a/.github/workflows/fresh_run.yml +++ b/.github/workflows/fresh_run.yml @@ -38,7 +38,7 @@ jobs: uses: actions/checkout@v3 - name: Install Rust - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 - name: Install Pyenv uses: "gabrielfalcao/pyenv-action@v13" diff --git a/.github/workflows/hint_accountant.yml b/.github/workflows/hint_accountant.yml index 3bd9ca4ff0..fde516d43b 100644 --- a/.github/workflows/hint_accountant.yml +++ b/.github/workflows/hint_accountant.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 - name: Set up Cargo cache uses: Swatinem/rust-cache@v2 - name: Checkout diff --git a/.github/workflows/hyper_threading_benchmarks.yml b/.github/workflows/hyper_threading_benchmarks.yml index cebfa0084c..30e668ed7d 100644 --- a/.github/workflows/hyper_threading_benchmarks.yml +++ b/.github/workflows/hyper_threading_benchmarks.yml @@ -26,7 +26,7 @@ jobs: sudo apt-get install -y hyperfine - name: Install Rust - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 with: components: rustfmt, clippy diff --git a/.github/workflows/hyperfine.yml b/.github/workflows/hyperfine.yml index de80f816dd..51912147bd 100644 --- a/.github/workflows/hyperfine.yml +++ b/.github/workflows/hyperfine.yml @@ -74,7 +74,7 @@ jobs: - name: Install Rust if: ${{ steps.cache.outputs.cache-hit != 'true' }} - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 - name: Checkout if: ${{ steps.cache.outputs.cache-hit != 'true' }} diff --git a/.github/workflows/iai_main.yml b/.github/workflows/iai_main.yml index f61eef7e3e..41df9d4dee 100644 --- a/.github/workflows/iai_main.yml +++ b/.github/workflows/iai_main.yml @@ -11,7 +11,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Install Rust - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 - name: Set up cargo cache uses: Swatinem/rust-cache@v2 - name: Python3 Build diff --git a/.github/workflows/iai_pr.yml b/.github/workflows/iai_pr.yml index afb9e3a97c..0db3c0e05f 100644 --- a/.github/workflows/iai_pr.yml +++ b/.github/workflows/iai_pr.yml @@ -23,7 +23,7 @@ jobs: - name: Install Rust if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }} - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 - name: Set up cargo cache if: ${{ steps.cache-iai-results.outputs.cache-hit != 'true' }} uses: Swatinem/rust-cache@v2 @@ -51,7 +51,7 @@ jobs: - name: Checkout uses: actions/checkout@v3 - name: Install Rust - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 - name: Set up cargo cache uses: Swatinem/rust-cache@v2 - name: Python3 Build diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a06efe8806..46deef477b 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,7 +13,7 @@ jobs: - name: Checkout sources uses: actions/checkout@v2 - name: Install stable toolchain - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 - name: Publish crate cairo-vm env: CRATES_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 385908a897..7f2b270f01 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -161,7 +161,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 with: components: rustfmt, clippy - name: Set up cargo cache @@ -201,7 +201,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 with: targets: wasm32-unknown-unknown @@ -247,7 +247,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 with: targets: wasm32-unknown-unknown @@ -287,7 +287,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 with: targets: wasm32-unknown-unknown @@ -329,7 +329,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 with: components: llvm-tools-preview - name: Set up cargo cache @@ -395,7 +395,7 @@ jobs: runs-on: ubuntu-22.04 steps: - name: Install Rust - uses: dtolnay/rust-toolchain@1.74.1 + uses: dtolnay/rust-toolchain@1.76.0 - name: Set up cargo cache uses: Swatinem/rust-cache@v2 - name: Checkout diff --git a/CHANGELOG.md b/CHANGELOG.md index 5045d23905..1a8a2e412b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ #### Upcoming Changes +* chore: bump `cairo-lang-` dependencies to 2.7.0-rc.3 [#1807](https://github.com/lambdaclass/cairo-vm/pull/1807) + * chore: update Rust required version to 1.76.0 + #### [1.0.0-rc5] - 2024-07-13 * fix: Fixed deserialization of negative numbers in scientific notation [#1804](https://github.com/lambdaclass/cairo-vm/pull/1804) diff --git a/Cargo.lock b/Cargo.lock index a711001c6a..421e6f4007 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -237,19 +237,19 @@ dependencies = [ "memchr", "pin-project-lite", "tokio", - "zstd 0.13.1", - "zstd-safe 7.1.0", + "zstd 0.13.2", + "zstd-safe 7.2.0", ] [[package]] name = "async-trait" -version = "0.1.80" +version = "0.1.81" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" +checksum = "6e0c28dcc82d7c8ead5cb13beb15405b57b8546e93215673ff8ca0349a028107" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -412,6 +412,16 @@ dependencies = [ "alloc-stdlib", ] +[[package]] +name = "bstr" +version = "1.9.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "05efc5cfd9110c8416e471df0e96702d58690178e206e61b7173706673c93706" +dependencies = [ + "memchr", + "serde", +] + [[package]] name = "bumpalo" version = "3.16.0" @@ -432,9 +442,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.6.0" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" +checksum = "a12916984aab3fa6e39d655a33e09c0071eb36d6ab3aea5c2d78551f1df6d952" [[package]] name = "bzip2" @@ -457,24 +467,11 @@ dependencies = [ "pkg-config", ] -[[package]] -name = "cairo-felt" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae932292b9ba497a4e892b56aa4e0c6f329a455180fdbdc132700dfe68d9b153" -dependencies = [ - "lazy_static", - "num-bigint", - "num-integer", - "num-traits 0.2.19", - "serde", -] - [[package]] name = "cairo-lang-casm" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6296d5748288d9fb97175d31aff9f68ea3f602456923895e512b078e9a2210a0" +checksum = "5abf875e93f696e783412d3f2a7c6f66e94e07c30b01559380b4d0707dc0050e" dependencies = [ "cairo-lang-utils", "indoc", @@ -486,9 +483,9 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7be5083c3328dad2248a94f0a24b3520c588e7d3bd5891770e4c91d3facade3" +checksum = "f135e1768e199e88b04f824e34b9411ff49fc31970e77cbf5c6f448170441d18" dependencies = [ "anyhow", "cairo-lang-defs", @@ -502,6 +499,7 @@ dependencies = [ "cairo-lang-sierra-generator", "cairo-lang-syntax", "cairo-lang-utils", + "indoc", "salsa", "smol_str", "thiserror", @@ -509,18 +507,18 @@ dependencies = [ [[package]] name = "cairo-lang-debug" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a3cbf67fd766cb7ed48b72e6abf7041857518c9b9fd42475a60c138671c6603" +checksum = "87e2bf0a6caf1e54938bc67ca082cbeb5385969784bfb1109c187ca9dc5e1806" dependencies = [ "cairo-lang-utils", ] [[package]] name = "cairo-lang-defs" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b284e41dfc158dfbdc02612dbfdb27a55547d23063bdc53105eeec41d8df006" +checksum = "c65bb0e855afeb88d11585605f836bd0cd444375b234103e87342df2c91aba1b" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -528,28 +526,28 @@ dependencies = [ "cairo-lang-parser", "cairo-lang-syntax", "cairo-lang-utils", - "itertools 0.11.0", + "itertools 0.12.1", "salsa", "smol_str", ] [[package]] name = "cairo-lang-diagnostics" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6314b24901af8be75cd0e1363e3ff1a8020066372501f4cfc9161726b06ec2a" +checksum = "ab96083f60a077d300d0b89bd4b9c31731c95f5db355a11c4657ee25f3acc198" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", "cairo-lang-utils", - "itertools 0.11.0", + "itertools 0.12.1", ] [[package]] name = "cairo-lang-eq-solver" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f95f5c8f7ea75580d164b5304251022e3d47f43fc1c778a01381b55ca9f268c" +checksum = "3bf2aaa50fa5b15070b2bf02c60a62f917f9aa1ff6dedf5a2627ecafe8e33cfa" dependencies = [ "cairo-lang-utils", "good_lp", @@ -557,9 +555,9 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3e58b80f0b413ef1320358fde1a0877fc3fbf740f5cead0de3e947a1bc3bfd4" +checksum = "8094bcf7e44204c2fc2f10760e7e2e5769a6267cba5d8a303c0331dd480d5663" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", @@ -569,11 +567,32 @@ dependencies = [ "smol_str", ] +[[package]] +name = "cairo-lang-formatter" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8a1d92f1163b3b0e22e6392d22f7a275b9e64ab453f32b8b62bb1aeedbe73e04" +dependencies = [ + "anyhow", + "cairo-lang-diagnostics", + "cairo-lang-filesystem", + "cairo-lang-parser", + "cairo-lang-syntax", + "cairo-lang-utils", + "diffy", + "ignore", + "itertools 0.12.1", + "salsa", + "serde", + "smol_str", + "thiserror", +] + [[package]] name = "cairo-lang-lowering" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abe6d604a06ea96c05b3666f2e8fac63cb8709e13667de272912f81db004a16b" +checksum = "25eb629a773c07c2863717d1711fd3ecc17807c1fc094bb90cccac56061056a4" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -585,7 +604,7 @@ dependencies = [ "cairo-lang-syntax", "cairo-lang-utils", "id-arena", - "itertools 0.11.0", + "itertools 0.12.1", "log", "num-bigint", "num-traits 0.2.19", @@ -596,9 +615,9 @@ dependencies = [ [[package]] name = "cairo-lang-parser" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf1c279de47a77422f81b8a98023cd523cf0ae79f7153d60c4cf8b62b8ece2f" +checksum = "ff7b1d7af8e1bff971b8b9bbce796650a57de93dfb092bc0c17c2f85d915de6e" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -606,7 +625,7 @@ dependencies = [ "cairo-lang-syntax-codegen", "cairo-lang-utils", "colored", - "itertools 0.11.0", + "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", "salsa", @@ -616,9 +635,9 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1177a07498bdf45cba62f0c727388ff7433072847dbf701c58fa3c3e358154e" +checksum = "7eccf06d643d155a72057dc93c40cf34dabe11e8c629dbf3111c528a3d750a66" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -628,27 +647,27 @@ dependencies = [ "cairo-lang-utils", "indent", "indoc", - "itertools 0.11.0", + "itertools 0.12.1", "salsa", "smol_str", ] [[package]] name = "cairo-lang-proc-macros" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c90d812ec983c5a8e3173aca3fc55036b9739201c89f30271ee14a4c1189379" +checksum = "ffa10434f9ce0828e8d77f3a13ae2f878da453345b14d54a66de3e196c0e4674" dependencies = [ "cairo-lang-debug", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] name = "cairo-lang-project" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3985495d7e9dc481e97135d7139cfa098024351fb51d5feef8366b5fbc104807" +checksum = "d4882d2263fb7c95dbab0c3b5578d8c0e2417fd680df8cc61aa50321b6a5a40d" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -660,9 +679,9 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d5cfadbb9ca3479a6b5c02c0a125a5747835ba57a2de9c4e9764f42d85abe059" +checksum = "1ba49614f98322e1ccda33265f8193f66cbd88eff23b0deb94db981aa0666650" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -672,78 +691,84 @@ dependencies = [ "cairo-lang-plugins", "cairo-lang-proc-macros", "cairo-lang-syntax", + "cairo-lang-test-utils", "cairo-lang-utils", "id-arena", "indoc", - "itertools 0.11.0", + "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", "once_cell", "salsa", "smol_str", + "toml", ] [[package]] name = "cairo-lang-sierra" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74a57492267a5a8891866b6e48cdefa508b5f05931a5f8eaf004b9de15b1ffd6" +checksum = "81a41d56c6afebdbe2c5ffb4e216f60b07391c29c91fccf0a60790817f49ba68" dependencies = [ "anyhow", - "cairo-felt", "cairo-lang-utils", "const-fnv1a-hash", "convert_case", "derivative", - "itertools 0.11.0", + "itertools 0.12.1", "lalrpop", "lalrpop-util", "num-bigint", + "num-integer", "num-traits 0.2.19", + "once_cell", "regex", "salsa", "serde", "serde_json", "sha3", "smol_str", + "starknet-types-core", "thiserror", ] [[package]] name = "cairo-lang-sierra-ap-change" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fdbb4bd95477123653b9200bd4e9dceae95a914f6fe85b2bed83b223e36fb5a" +checksum = "667050b93db661ebce0b33c92ce44abffebde37c5645e4761722ad3c49a1c34f" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", "cairo-lang-sierra-type-size", "cairo-lang-utils", - "itertools 0.11.0", + "itertools 0.12.1", + "num-bigint", "num-traits 0.2.19", "thiserror", ] [[package]] name = "cairo-lang-sierra-gas" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "882cb178f1b79aabf70acce1d87b08d569d8a4b0ce8b1d8f538a02cdb36789db" +checksum = "27fcbf81e8ed4efe7e9c30bbdfa8074b9af01a5e16154999dd9527baba27f1fb" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", "cairo-lang-sierra-type-size", "cairo-lang-utils", - "itertools 0.11.0", + "itertools 0.12.1", + "num-bigint", "num-traits 0.2.19", "thiserror", ] [[package]] name = "cairo-lang-sierra-generator" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d80c9d29e6d3f4ab60e698ebe2de84dcf90570c3dd1cfa7b01bd5c42470331c" +checksum = "058c05d10913a130fb21964f0bf1a37b05eafcf2f50a73cd4aa3e11da7e4cfc7" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -755,21 +780,22 @@ dependencies = [ "cairo-lang-sierra", "cairo-lang-syntax", "cairo-lang-utils", - "itertools 0.11.0", + "itertools 0.12.1", "num-traits 0.2.19", "once_cell", "salsa", + "serde", + "serde_json", "smol_str", ] [[package]] name = "cairo-lang-sierra-to-casm" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3ac02c90be2630ae861db6af226090da92741020519768332dd2c07e24d94c75" +checksum = "8607cc5cf16f3a930ad4b3799e986b0ca36ada2c0da1dd6bd2ef35cbb1eb9e74" dependencies = [ "assert_matches", - "cairo-felt", "cairo-lang-casm", "cairo-lang-sierra", "cairo-lang-sierra-ap-change", @@ -777,17 +803,18 @@ dependencies = [ "cairo-lang-sierra-type-size", "cairo-lang-utils", "indoc", - "itertools 0.11.0", + "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", + "starknet-types-core", "thiserror", ] [[package]] name = "cairo-lang-sierra-type-size" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d102b10989f9637b1c916dd950cbd1bd8bb1b6a7aaa1a3035390be0683b92d85" +checksum = "224624b1e279b3eea7693680f577335e66e6dd5fbfbd2576f4a7d0b5d697f61d" dependencies = [ "cairo-lang-sierra", "cairo-lang-utils", @@ -795,12 +822,11 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a27921a2bf82d191d28afd570b913341080c8fc25c83bf870dbf1252570b1b41" +checksum = "81a54ebea4ea990a33a2158ecdf46ffb3cb1af8fff6a79c3dd310c6a9ed43e82" dependencies = [ "anyhow", - "cairo-felt", "cairo-lang-compiler", "cairo-lang-defs", "cairo-lang-diagnostics", @@ -816,27 +842,27 @@ dependencies = [ "const_format", "indent", "indoc", - "itertools 0.11.0", + "itertools 0.12.1", "once_cell", "serde", "serde_json", "smol_str", + "starknet-types-core", "thiserror", ] [[package]] name = "cairo-lang-starknet-classes" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8623b076ef3569e4262da5da270a84658b1ff242fe0c9624fbe432e7a937d101" +checksum = "1bb66ae799e1963318e1bab782848f53797787c396dfd590be539f3f12d56ac4" dependencies = [ - "cairo-felt", "cairo-lang-casm", "cairo-lang-sierra", "cairo-lang-sierra-to-casm", "cairo-lang-utils", "convert_case", - "itertools 0.11.0", + "itertools 0.12.1", "num-bigint", "num-integer", "num-traits 0.2.19", @@ -845,15 +871,15 @@ dependencies = [ "serde_json", "sha3", "smol_str", - "starknet-crypto", + "starknet-types-core", "thiserror", ] [[package]] name = "cairo-lang-syntax" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c62f5bd74e249636e7c48d8b95e6cc0ee991206d4a6cbe5c2624184a828e70b" +checksum = "5e673dc1058a8639c094a330a701e8902cbd34defe659a3d95bcf6c3f3de249d" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -867,23 +893,36 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a744747e9ab03b65480265304490f3e29d99e4cb297e39d0e6fdb047c1bc86a7" +checksum = "5d0dd466dbac4263573b81b83e22534285da30a4e7c15b888407fbb33d8accb9" dependencies = [ "genco", "xshell", ] +[[package]] +name = "cairo-lang-test-utils" +version = "2.7.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09431da22acc1cf081b1802b73ff484bdc75ca1cd5ad6fa9b84fba8753b2e08f" +dependencies = [ + "cairo-lang-formatter", + "cairo-lang-utils", + "colored", + "log", + "pretty_assertions", +] + [[package]] name = "cairo-lang-utils" -version = "2.6.4" +version = "2.7.0-rc.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6f98e8769412907ceb106c21c70907cc0c87ca0a2a44c82b6229a695a6f9b48" +checksum = "97498c08958be8d569c16982cac431d785adc3effdfa6d0775c65aec578dfd91" dependencies = [ "hashbrown 0.14.5", "indexmap 2.2.6", - "itertools 0.11.0", + "itertools 0.12.1", "num-bigint", "num-traits 0.2.19", "schemars", @@ -1001,13 +1040,12 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.0.101" +version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac367972e516d45567c7eafc73d24e1c193dcf200a8d94e9db7b3d38b349572d" +checksum = "324c74f2155653c90b04f25b2a47a8a631360cb908f92a772695f430c7e31052" dependencies = [ "jobserver", "libc", - "once_cell", ] [[package]] @@ -1055,9 +1093,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.7" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5db83dced34638ad474f39f250d7fea9598bdd239eaced1bdf45d597da0f433f" +checksum = "64acc1846d54c1fe936a78dc189c34e28d3f5afc348403f28ecf53660b9b8462" dependencies = [ "clap_builder", "clap_derive", @@ -1065,9 +1103,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.7" +version = "4.5.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7e204572485eb3fbf28f871612191521df159bc3e15a9f5064c66dba3a8c05f" +checksum = "6fb8393d67ba2e7bfaf28a23458e4e2b543cc73a99595511eb207fdb8aede942" dependencies = [ "anstream", "anstyle", @@ -1077,14 +1115,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.5" +version = "4.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c780290ccf4fb26629baa7a1081e68ced113f1d3ec302fa5948f1c381ebf06c6" +checksum = "2bac35c6dafb060fd4d275d9a4ffae97917c13a6327903a8be2153cd964f7085" dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1294,7 +1332,22 @@ checksum = "67e77553c4162a157adbf834ebae5b415acbecbeafc7a74b0e886657506a7611" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", +] + +[[package]] +name = "diff" +version = "0.1.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" + +[[package]] +name = "diffy" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e616e59155c92257e84970156f506287853355f58cd4a6eb167385722c32b790" +dependencies = [ + "nu-ansi-term", ] [[package]] @@ -1465,7 +1518,7 @@ checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1523,7 +1576,7 @@ checksum = "553630feadf7b76442b0849fd25fdf89b860d933623aec9693fed19af0400c78" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -1555,6 +1608,19 @@ version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" +[[package]] +name = "globset" +version = "0.4.14" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "57da3b9b5b85bd66f31093f8c408b90a74431672542466497dcbdfdc02034be1" +dependencies = [ + "aho-corasick", + "bstr", + "log", + "regex-automata", + "regex-syntax", +] + [[package]] name = "good_lp" version = "1.8.1" @@ -1679,9 +1745,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "hyper" -version = "0.14.29" +version = "0.14.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f361cde2f109281a220d4307746cdfd5ee3f410da58a70377762396775634b33" +checksum = "a152ddd61dfaec7273fe8419ab357f33aee0d914c5f4efbf0d96fa749eea5ec9" dependencies = [ "bytes", "futures-channel", @@ -1721,6 +1787,22 @@ version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "25a2bc672d1148e28034f176e01fffebb08b35768468cc954630da77a1449005" +[[package]] +name = "ignore" +version = "0.4.22" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b46810df39e66e925525d6e38ce1e7f6e1d208f72dc39757880fcb66e2c58af1" +dependencies = [ + "crossbeam-deque", + "globset", + "log", + "memchr", + "regex-automata", + "same-file", + "walkdir", + "winapi-util", +] + [[package]] name = "impl-trait-for-tuples" version = "0.2.2" @@ -1848,6 +1930,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.12.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.11" @@ -1993,9 +2084,9 @@ dependencies = [ [[package]] name = "log" -version = "0.4.21" +version = "0.4.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" +checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lru" @@ -2044,9 +2135,9 @@ checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" [[package]] name = "mime_guess" -version = "2.0.4" +version = "2.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4192263c238a5f0d0c6bfd21f336a313a4ce1c450542449ca191bb657b4642ef" +checksum = "f7c44f8e672c00fe5308fa235f821cb4198414e1c77935c1ab6948d3fd78550e" dependencies = [ "mime", "unicase", @@ -2129,9 +2220,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.5" +version = "0.4.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c165a9ab64cf766f73521c0dd2cfdff64f488b8f0b3e621face3462d3db536d7" +checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" dependencies = [ "num-integer", "num-traits 0.2.19", @@ -2222,9 +2313,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.0" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "576dfe1fc8f9df304abb159d767a29d0476f7750fbf8aa7ad07816004a207434" +checksum = "081b846d1d56ddfc18fdf1a922e4f6e07a11768ea1b92dec44e42b72712ccfce" dependencies = [ "memchr", ] @@ -2237,9 +2328,9 @@ checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" [[package]] name = "oorandom" -version = "11.1.3" +version = "11.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" +checksum = "b410bbe7e14ab526a0e86877eb47c6996a2bd7746f027ba551028c925390e4e9" [[package]] name = "overload" @@ -2316,9 +2407,9 @@ checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" dependencies = [ "cfg-if", "libc", - "redox_syscall 0.5.2", + "redox_syscall 0.5.3", "smallvec", - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -2404,7 +2495,7 @@ checksum = "2f38a4412a78282e09a2cf38d195ea5420d15ba0602cb375210efbc877243965" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -2471,6 +2562,16 @@ version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" +[[package]] +name = "pretty_assertions" +version = "1.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" +dependencies = [ + "diff", + "yansi", +] + [[package]] name = "proc-macro-crate" version = "3.1.0" @@ -2606,9 +2707,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.2" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c82cf8cff14456045f55ec4241383baeff27af886adb72ffb2162f99911de0fd" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags 2.6.0", ] @@ -2823,7 +2924,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -2846,22 +2947,22 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7253ab4de971e72fb7be983802300c30b5a7f0c2e56fab8abfc6a214307c0094" +checksum = "bc76f558e0cbb2a839d37354c575f1dc3fdc6546b5be373ba43d95f231bf7c12" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.203" +version = "1.0.204" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "500cbc0ebeb6f46627f50f3f5811ccf6bf00643be300b4c3eabc0ef55dc5b5ba" +checksum = "e0cd7e117be63d3c3678776753929474f3b04a43a080c744d6b0ae2a8c28e222" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -2872,14 +2973,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] name = "serde_json" -version = "1.0.118" +version = "1.0.120" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d947f6b3163d8857ea16c4fa0dd4840d52f3041039a85decd46867eb1abef2e4" +checksum = "4e0d21c9a8cae1235ad58a00c11cb40d4b1e5c784f1ef2c537876ed6ffd8b7c5" dependencies = [ "itoa", "ryu", @@ -3043,7 +3144,7 @@ checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ "starknet-curve", "starknet-ff", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -3069,13 +3170,14 @@ dependencies = [ [[package]] name = "starknet-types-core" -version = "0.1.4" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "65799574816ba83cb04b21a3cb16f791b9882687cd9093415fd1b3821dbac29d" +checksum = "ce6bacf0ba19bc721e518bc4bf389ff13daa8a7c5db5fd320600473b8aa9fcbd" dependencies = [ "arbitrary", "lambdaworks-crypto", "lambdaworks-math", + "lazy_static", "num-bigint", "num-integer", "num-traits 0.2.19", @@ -3120,9 +3222,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.68" +version = "2.0.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "901fa70d88b9d6c98022e23b4136f9f3e54e4662c3bc1bd1d84a42a9a0f0c1e9" +checksum = "b146dcf730474b4bcd16c311627b31ede9ab149045db4d6088b3becaea046462" dependencies = [ "proc-macro2", "quote", @@ -3166,22 +3268,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.61" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c546c80d6be4bc6a00c0f01730c08df82eaa7a7a61f11d656526506112cc1709" +checksum = "f2675633b1499176c2dff06b0856a27976a8f9d436737b4cf4f312d4d91d8bbb" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.61" +version = "1.0.62" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46c3384250002a6d5af4d114f2845d37b57521033f30d5c3f46c4d70e1197533" +checksum = "d20468752b09f49e909e55a5d338caa8bedf615594e9d80bc4c565d30faf798c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -3254,9 +3356,9 @@ dependencies = [ [[package]] name = "tokio" -version = "1.38.0" +version = "1.38.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba4f4a02a7a80d6f274636f0aa95c7e383b912d41fe721a31f29e29698585a4a" +checksum = "eb2caba9f80616f438e09748d5acda951967e1ea58508ef53d9c6402485a46df" dependencies = [ "backtrace", "bytes", @@ -3277,7 +3379,7 @@ checksum = "5f5ae998a069d4b5aba8ee9dad856af7d520c3699e6159b185c2acd48155d39a" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -3302,7 +3404,7 @@ dependencies = [ "serde", "serde_spanned", "toml_datetime", - "toml_edit 0.22.14", + "toml_edit 0.22.15", ] [[package]] @@ -3327,9 +3429,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.22.14" +version = "0.22.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f21c7aaf97f1bd9ca9d4f9e73b0a6c74bd5afef56f2bc931943a6e1c37e04e38" +checksum = "d59a3a72298453f564e2b111fa896f8d07fabb36f51f06d7e875fc5e0b5a3ef1" dependencies = [ "indexmap 2.2.6", "serde", @@ -3416,7 +3518,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -3516,9 +3618,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.9.1" +version = "1.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5de17fd2f7da591098415cff336e12965a28061ddace43b59cb3c430179c9439" +checksum = "81dfa00651efa65069b0b6b651f4aaa31ba9e3c3ce0137aaad053604ee7e0314" dependencies = [ "getrandom", ] @@ -3590,7 +3692,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", "wasm-bindgen-shared", ] @@ -3624,7 +3726,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -3657,7 +3759,7 @@ checksum = "b7f89739351a2e03cb94beb799d47fb2cac01759b40ec441f7de39b00cbf7ef0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -3727,7 +3829,7 @@ version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.5", + "windows-targets 0.52.6", ] [[package]] @@ -3747,18 +3849,18 @@ dependencies = [ [[package]] name = "windows-targets" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" +checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.5", - "windows_aarch64_msvc 0.52.5", - "windows_i686_gnu 0.52.5", + "windows_aarch64_gnullvm 0.52.6", + "windows_aarch64_msvc 0.52.6", + "windows_i686_gnu 0.52.6", "windows_i686_gnullvm", - "windows_i686_msvc 0.52.5", - "windows_x86_64_gnu 0.52.5", - "windows_x86_64_gnullvm 0.52.5", - "windows_x86_64_msvc 0.52.5", + "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]] @@ -3769,9 +3871,9 @@ checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" [[package]] name = "windows_aarch64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" +checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" [[package]] name = "windows_aarch64_msvc" @@ -3781,9 +3883,9 @@ checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" [[package]] name = "windows_aarch64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" +checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" [[package]] name = "windows_i686_gnu" @@ -3793,15 +3895,15 @@ checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" [[package]] name = "windows_i686_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" +checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" [[package]] name = "windows_i686_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" +checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" [[package]] name = "windows_i686_msvc" @@ -3811,9 +3913,9 @@ checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" [[package]] name = "windows_i686_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" +checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" [[package]] name = "windows_x86_64_gnu" @@ -3823,9 +3925,9 @@ checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" [[package]] name = "windows_x86_64_gnu" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" +checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" [[package]] name = "windows_x86_64_gnullvm" @@ -3835,9 +3937,9 @@ checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" [[package]] name = "windows_x86_64_gnullvm" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" +checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" [[package]] name = "windows_x86_64_msvc" @@ -3847,9 +3949,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "windows_x86_64_msvc" -version = "0.52.5" +version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" +checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" [[package]] name = "winnow" @@ -3893,24 +3995,30 @@ version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9d422e8e38ec76e2f06ee439ccc765e9c6a9638b9e7c9f2e8255e4d41e8bd852" +[[package]] +name = "yansi" +version = "0.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" + [[package]] name = "zerocopy" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae87e3fcd617500e5d106f0380cf7b77f3c6092aae37191433159dda23cfb087" +checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" dependencies = [ "zerocopy-derive", ] [[package]] name = "zerocopy-derive" -version = "0.7.34" +version = "0.7.35" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15e934569e47891f7d9411f1a451d947a60e000ab3bd24fbb970f000387d1b3b" +checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -3930,7 +4038,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.68", + "syn 2.0.71", ] [[package]] @@ -3964,11 +4072,11 @@ dependencies = [ [[package]] name = "zstd" -version = "0.13.1" +version = "0.13.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d789b1514203a1120ad2429eae43a7bd32b90976a7bb8a05f7ec02fa88cc23a" +checksum = "fcf2b778a664581e31e389454a7072dab1647606d44f7feea22cd5abb9c9f3f9" dependencies = [ - "zstd-safe 7.1.0", + "zstd-safe 7.2.0", ] [[package]] @@ -3983,18 +4091,18 @@ dependencies = [ [[package]] name = "zstd-safe" -version = "7.1.0" +version = "7.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd99b45c6bc03a018c8b8a86025678c87e55526064e38f9df301989dce7ec0a" +checksum = "fa556e971e7b568dc775c136fc9de8c779b1c2fc3a63defaafadffdbd3181afa" dependencies = [ "zstd-sys", ] [[package]] name = "zstd-sys" -version = "2.0.11+zstd.1.5.6" +version = "2.0.12+zstd.1.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75652c55c0b6f3e6f12eb786fe1bc960396bf05a1eb3bf1f3691c3610ac2e6d4" +checksum = "0a4e40c320c3cb459d9a9ff6de98cff88f4751ee9275d140e2be94a2b74e4c13" dependencies = [ "cc", "pkg-config", diff --git a/Cargo.toml b/Cargo.toml index 92d06a543f..5f058e4a3b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -66,15 +66,15 @@ thiserror-no-std = { version = "2.0.2", default-features = false } bitvec = { version = "1", default-features = false, features = ["alloc"] } # Dependencies for cairo-1-hints feature -cairo-lang-starknet = { version = "2.6.4", default-features = false } -cairo-lang-casm = { version = "2.6.4", default-features = false } +cairo-lang-starknet = { version = "2.7.0-rc.3", default-features = false } +cairo-lang-casm = { version = "2.7.0-rc.3", default-features = false } -cairo-lang-starknet-classes = { version = "2.6.4", default-features = false } -cairo-lang-compiler = { version = "2.6.4", default-features = false } -cairo-lang-sierra-to-casm = { version = "2.6.4", default-features = false } -cairo-lang-sierra = { version = "2.6.4", default-features = false } -cairo-lang-runner = { version = "2.6.4", default-features = false } -cairo-lang-utils = { version = "2.6.4", default-features = false } +cairo-lang-starknet-classes = { version = "2.7.0-rc.3", default-features = false } +cairo-lang-compiler = { version = "=2.7.0-rc.3", default-features = false } +cairo-lang-sierra-to-casm = { version = "2.7.0-rc.3", default-features = false } +cairo-lang-sierra = { version = "2.7.0-rc.3", default-features = false } +cairo-lang-runner = { version = "2.7.0-rc.3", default-features = false } +cairo-lang-utils = { version = "=2.7.0-rc.3", default-features = false } # TODO: check these dependencies for wasm compatibility ark-ff = { version = "0.4.2", default-features = false } diff --git a/README.md b/README.md index 1115281012..f077a403f6 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ It's Turing-complete and it was created by [Starkware](https://starkware.co/) as These are needed in order to compile and use the project. -- [Rust 1.74.1 or newer](https://www.rust-lang.org/tools/install) +- [Rust 1.76.0 or newer](https://www.rust-lang.org/tools/install) - Cargo #### Optional diff --git a/cairo-vm-cli/src/main.rs b/cairo-vm-cli/src/main.rs index f213c2527e..08095128ca 100644 --- a/cairo-vm-cli/src/main.rs +++ b/cairo-vm-cli/src/main.rs @@ -95,7 +95,7 @@ enum Error { PublicInput(#[from] PublicInputError), #[error(transparent)] #[cfg(feature = "with_tracer")] - TraceDataError(#[from] TraceDataError), + TraceData(#[from] TraceDataError), } struct FileWriter { @@ -173,19 +173,17 @@ fn run(args: impl Iterator) -> Result<(), Error> { ..Default::default() }; - let mut cairo_runner = match { - if args.run_from_cairo_pie { - let pie = CairoPie::read_zip_file(&args.filename)?; - let mut hint_processor = BuiltinHintProcessor::new( - Default::default(), - RunResources::new(pie.execution_resources.n_steps), - ); - cairo_run::cairo_run_pie(&pie, &cairo_run_config, &mut hint_processor) - } else { - let program_content = std::fs::read(args.filename).map_err(Error::IO)?; - let mut hint_processor = BuiltinHintProcessor::new_empty(); - cairo_run::cairo_run(&program_content, &cairo_run_config, &mut hint_processor) - } + let mut cairo_runner = match if args.run_from_cairo_pie { + let pie = CairoPie::read_zip_file(&args.filename)?; + let mut hint_processor = BuiltinHintProcessor::new( + Default::default(), + RunResources::new(pie.execution_resources.n_steps), + ); + cairo_run::cairo_run_pie(&pie, &cairo_run_config, &mut hint_processor) + } else { + let program_content = std::fs::read(args.filename).map_err(Error::IO)?; + let mut hint_processor = BuiltinHintProcessor::new_empty(); + cairo_run::cairo_run(&program_content, &cairo_run_config, &mut hint_processor) } { Ok(runner) => runner, Err(error) => { diff --git a/cairo1-run/Cargo.toml b/cairo1-run/Cargo.toml index 556500bc8c..a842073140 100644 --- a/cairo1-run/Cargo.toml +++ b/cairo1-run/Cargo.toml @@ -12,9 +12,9 @@ keywords.workspace = true cairo-vm = {workspace = true, features = ["std", "cairo-1-hints", "clap"]} serde_json = { workspace = true } -cairo-lang-sierra-type-size = { version = "2.6.4", default-features = false } -cairo-lang-sierra-ap-change = { version = "2.6.4", default-features = false } -cairo-lang-sierra-gas = { version = "2.6.4", default-features = false } +cairo-lang-sierra-type-size = { version = "2.7.0-rc.3", default-features = false } +cairo-lang-sierra-ap-change = { version = "2.7.0-rc.3", default-features = false } +cairo-lang-sierra-gas = { version = "2.7.0-rc.3", default-features = false } cairo-lang-starknet-classes.workspace = true cairo-lang-sierra-to-casm.workspace = true cairo-lang-compiler.workspace = true diff --git a/cairo1-run/Makefile b/cairo1-run/Makefile index 8f94ccc459..e30df875d9 100644 --- a/cairo1-run/Makefile +++ b/cairo1-run/Makefile @@ -13,7 +13,7 @@ TRACES:=$(patsubst $(CAIRO_1_FOLDER)/%.cairo, $(CAIRO_1_FOLDER)/%.trace, $(CAIRO MEMORY:=$(patsubst $(CAIRO_1_FOLDER)/%.cairo, $(CAIRO_1_FOLDER)/%.memory, $(CAIRO_1_PROGRAMS)) deps: - git clone --depth=1 -b v2.6.4 https://github.com/starkware-libs/cairo.git \ + git clone --depth=1 -b v2.7.0-rc.3 https://github.com/starkware-libs/cairo.git \ && mv cairo/corelib/ . \ && rm -rf cairo/ diff --git a/cairo1-run/src/cairo_run.rs b/cairo1-run/src/cairo_run.rs index 52a5ea2676..700225b880 100644 --- a/cairo1-run/src/cairo_run.rs +++ b/cairo1-run/src/cairo_run.rs @@ -25,7 +25,6 @@ use cairo_lang_sierra::{ program::{Function, GenericArg, Program as SierraProgram}, program_registry::ProgramRegistry, }; -use cairo_lang_sierra_gas::objects::CostInfoProvider; use cairo_lang_sierra_to_casm::{ compiler::{CairoProgram, SierraToCasmConfig}, metadata::calc_metadata_ap_change_only, @@ -855,7 +854,7 @@ fn create_entry_code( }; inst.target = deref_or_immediate!( post_call_size - + casm_program.debug_info.sierra_statement_info[func.entry_point.0].code_offset + + casm_program.debug_info.sierra_statement_info[func.entry_point.0].start_offset ); Ok(( CasmContext { @@ -1232,7 +1231,7 @@ fn serialize_output_inner<'a>( .expect("Missing return value") .get_relocatable() .expect("Box Pointer is not Relocatable"); - let type_size = type_sizes.type_size(&info.ty); + let type_size = type_sizes[&info.ty].try_into().expect("could not parse to usize"); let data = vm .get_continuous_range(ptr, type_size) .expect("Failed to extract value from nullable ptr"); @@ -1301,7 +1300,7 @@ fn serialize_output_inner<'a>( } _ => panic!("Invalid Nullable"), }; - let type_size = type_sizes.type_size(&info.ty); + let type_size = type_sizes[&info.ty].try_into().expect("could not parse to usize"); let data = vm .get_continuous_range(ptr, type_size) .expect("Failed to extract value from nullable ptr"); @@ -1554,7 +1553,9 @@ mod tests { .build() .unwrap(); let main_crate_ids = setup_project(&mut db, Path::new(filename)).unwrap(); - compile_prepared_db(&mut db, main_crate_ids, compiler_config).unwrap() + compile_prepared_db(&mut db, main_crate_ids, compiler_config) + .unwrap() + .program } fn main_hash_panic_result(sierra_program: &SierraProgram) -> bool { diff --git a/cairo1-run/src/main.rs b/cairo1-run/src/main.rs index 4560482486..8a4a5058bb 100644 --- a/cairo1-run/src/main.rs +++ b/cairo1-run/src/main.rs @@ -180,7 +180,10 @@ fn run(args: impl Iterator) -> Result, Error> { .build() .unwrap(); let main_crate_ids = setup_project(&mut db, &args.filename).unwrap(); - compile_prepared_db(&mut db, main_crate_ids, compiler_config).unwrap() + let sierra_program_with_dbg = + compile_prepared_db(&mut db, main_crate_ids, compiler_config).unwrap(); + + sierra_program_with_dbg.program } }; diff --git a/fuzzer/Cargo.lock b/fuzzer/Cargo.lock index b923c1d944..e1ccedbfb8 100644 --- a/fuzzer/Cargo.lock +++ b/fuzzer/Cargo.lock @@ -127,6 +127,12 @@ dependencies = [ "rand", ] +[[package]] +name = "arrayvec" +version = "0.7.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" + [[package]] name = "autocfg" version = "1.1.0" @@ -210,7 +216,7 @@ dependencies = [ [[package]] name = "cairo-vm" -version = "1.0.0-rc3" +version = "1.0.0-rc5" dependencies = [ "anyhow", "arbitrary", @@ -227,6 +233,7 @@ dependencies = [ "num-prime", "num-traits", "rand", + "rust_decimal", "serde", "serde_json", "sha2", @@ -521,9 +528,9 @@ dependencies = [ [[package]] name = "lambdaworks-crypto" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "458fee521f12d0aa97a2e06eaf134398a5d2ae7b2074af77eb402b0d93138c47" +checksum = "7fb5d4f22241504f7c7b8d2c3a7d7835d7c07117f10bff2a7d96a9ef6ef217c3" dependencies = [ "lambdaworks-math", "serde", @@ -533,9 +540,9 @@ dependencies = [ [[package]] name = "lambdaworks-math" -version = "0.6.0" +version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c74ce6f0d9cb672330b6ca59e85a6c3607a3329e0372ab0d3fe38c2d38e50f9" +checksum = "358e172628e713b80a530a59654154bfc45783a6ed70ea284839800cebdf8f97" dependencies = [ "serde", "serde_json", @@ -915,6 +922,16 @@ dependencies = [ "subtle", ] +[[package]] +name = "rust_decimal" +version = "1.35.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1790d1c4c0ca81211399e0e0af16333276f375209e71a37b67698a373db5b47a" +dependencies = [ + "arrayvec", + "num-traits", +] + [[package]] name = "rustc_version" version = "0.4.0" @@ -1071,9 +1088,9 @@ dependencies = [ [[package]] name = "starknet-types-core" -version = "0.1.1" +version = "0.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b537ba94c95a6c320065653f2a784a395750650c86ef14779be91a233380e9b3" +checksum = "ce6bacf0ba19bc721e518bc4bf389ff13daa8a7c5db5fd320600473b8aa9fcbd" dependencies = [ "arbitrary", "lambdaworks-crypto", diff --git a/rust-toolchain b/rust-toolchain index 4da0ec7b8e..907951458e 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,4 +1,4 @@ [toolchain] -channel = "1.74.1" +channel = "1.76.0" components = ["rustfmt", "clippy"] profile = "minimal" diff --git a/vm/src/air_public_input.rs b/vm/src/air_public_input.rs index 1994eb3046..d4f39dfc80 100644 --- a/vm/src/air_public_input.rs +++ b/vm/src/air_public_input.rs @@ -89,6 +89,7 @@ impl From<(usize, usize)> for MemorySegmentAddresses { } } +#[allow(clippy::manual_non_exhaustive)] #[derive(Serialize, Deserialize, Debug)] pub struct PublicInput<'a> { pub layout: &'a str, diff --git a/vm/src/tests/mod.rs b/vm/src/tests/mod.rs index daff9ce61c..11026af5ad 100644 --- a/vm/src/tests/mod.rs +++ b/vm/src/tests/mod.rs @@ -165,7 +165,7 @@ fn run_cairo_1_entrypoint( // Load calldata let calldata_start = runner.vm.add_memory_segment(); - let calldata_end = runner.vm.load_data(calldata_start, &args.to_vec()).unwrap(); + let calldata_end = runner.vm.load_data(calldata_start, args).unwrap(); // Create entrypoint_args @@ -269,7 +269,7 @@ fn run_cairo_1_entrypoint_with_run_resources( // Load calldata let calldata_start = runner.vm.add_memory_segment(); - let calldata_end = runner.vm.load_data(calldata_start, &args.to_vec()).unwrap(); + let calldata_end = runner.vm.load_data(calldata_start, args).unwrap(); // Create entrypoint_args diff --git a/vm/src/types/relocatable.rs b/vm/src/types/relocatable.rs index 4631a79b4b..0614b6ae8d 100644 --- a/vm/src/types/relocatable.rs +++ b/vm/src/types/relocatable.rs @@ -361,7 +361,7 @@ impl MaybeRelocatable { /// If the value is RelocatableValue, it will relocate it according to the relocation_table pub fn relocate_value( value: MaybeRelocatable, - relocation_table: &Vec, + relocation_table: &[usize], ) -> Result { match value { MaybeRelocatable::Int(num) => Ok(num), @@ -375,7 +375,7 @@ pub fn relocate_value( // Relocates a Relocatable value according to the relocation_table pub fn relocate_address( relocatable: Relocatable, - relocation_table: &Vec, + relocation_table: &[usize], ) -> Result { let (segment_index, offset) = if relocatable.segment_index >= 0 { (relocatable.segment_index as usize, relocatable.offset) diff --git a/vm/src/vm/runners/cairo_runner.rs b/vm/src/vm/runners/cairo_runner.rs index 0f4d2ab0fc..c6cb1ae141 100644 --- a/vm/src/vm/runners/cairo_runner.rs +++ b/vm/src/vm/runners/cairo_runner.rs @@ -901,7 +901,7 @@ impl CairoRunner { } ///Relocates the VM's trace, turning relocatable registers to numbered ones - pub fn relocate_trace(&mut self, relocation_table: &Vec) -> Result<(), TraceError> { + pub fn relocate_trace(&mut self, relocation_table: &[usize]) -> Result<(), TraceError> { if self.relocated_trace.is_some() { return Err(TraceError::AlreadyRelocated); } @@ -931,7 +931,7 @@ impl CairoRunner { /// Relocates the VM's memory, turning bidimensional indexes into contiguous numbers, and values /// into Felt252s. Uses the relocation_table to asign each index a number according to the value /// on its segment number. - fn relocate_memory(&mut self, relocation_table: &Vec) -> Result<(), MemoryError> { + fn relocate_memory(&mut self, relocation_table: &[usize]) -> Result<(), MemoryError> { if !(self.relocated_memory.is_empty()) { return Err(MemoryError::Relocation); } diff --git a/vm/src/vm/trace/mod.rs b/vm/src/vm/trace/mod.rs index 5a9f683570..108ce583e2 100644 --- a/vm/src/vm/trace/mod.rs +++ b/vm/src/vm/trace/mod.rs @@ -28,7 +28,7 @@ pub mod trace_entry { pub fn relocate_trace_register( value: Relocatable, - relocation_table: &Vec, + relocation_table: &[usize], ) -> Result { let segment_index: usize = value.segment_index.try_into().map_err(|_| { TraceError::MemoryError(MemoryError::AddressInTemporarySegment(value.segment_index)) diff --git a/vm/src/vm/vm_core.rs b/vm/src/vm/vm_core.rs index 5b54b18b5d..a65014a7b3 100644 --- a/vm/src/vm/vm_core.rs +++ b/vm/src/vm/vm_core.rs @@ -871,7 +871,7 @@ impl VirtualMachine { pub fn load_data( &mut self, ptr: Relocatable, - data: &Vec, + data: &[MaybeRelocatable], ) -> Result { if ptr.segment_index == 0 { self.instruction_cache.resize(data.len(), None); @@ -4218,7 +4218,7 @@ mod tests { let segment = vm.segments.add(); vm.load_data( segment, - &vec![ + &[ mayberelocatable!(1), mayberelocatable!(2), mayberelocatable!(3), @@ -4239,7 +4239,7 @@ mod tests { let segment = vm.segments.add(); vm.load_data( segment, - &vec![ + &[ mayberelocatable!(1), mayberelocatable!(2), mayberelocatable!(3), @@ -4397,7 +4397,7 @@ mod tests { assert_eq!( virtual_machine_from_builder .builtin_runners - .get(0) + .first() .unwrap() .name(), BuiltinName::pedersen diff --git a/vm/src/vm/vm_memory/memory_segments.rs b/vm/src/vm/vm_memory/memory_segments.rs index c68503c112..71b727c1cc 100644 --- a/vm/src/vm/vm_memory/memory_segments.rs +++ b/vm/src/vm/vm_memory/memory_segments.rs @@ -67,7 +67,7 @@ impl MemorySegmentManager { pub fn load_data( &mut self, ptr: Relocatable, - data: &Vec, + data: &[MaybeRelocatable], ) -> Result { // Starting from the end ensures any necessary resize // is performed once with enough room for everything @@ -175,7 +175,7 @@ impl MemorySegmentManager { if let Some(vector) = arg.downcast_ref::>() { self.load_data(ptr, vector).map(Into::into) } else if let Some(vector) = arg.downcast_ref::>() { - let data = &vector.iter().map(|value| value.into()).collect(); + let data: &Vec = &vector.iter().map(|value| value.into()).collect(); self.load_data(ptr, data).map(Into::into) } else { Err(MemoryError::WriteArg) diff --git a/vm/src/without_std.rs b/vm/src/without_std.rs index c7fd0c501c..42066f41a4 100644 --- a/vm/src/without_std.rs +++ b/vm/src/without_std.rs @@ -37,6 +37,5 @@ pub mod without_std { pub mod borrow { pub use alloc::borrow::*; - pub use core::borrow::*; } }