diff --git a/Cargo.lock b/Cargo.lock index 4f21ec418..59b6b2ed6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -103,9 +103,9 @@ dependencies = [ [[package]] name = "anyhow" -version = "1.0.94" +version = "1.0.95" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1fd03a028ef38ba2276dce7e33fcd6369c158a1bca17946c4b1b701891c1ff7" +checksum = "34ac096ce696dc2fcabef30516bb13c0a68a11d30131d3df6f04711467681b04" [[package]] name = "aquamarine" @@ -118,7 +118,7 @@ dependencies = [ "proc-macro-error", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -216,7 +216,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62945a2f7e6de02a31fe400aa489f0e0f5b2502e69f95f853adb82a96c7a6b60" dependencies = [ "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -242,7 +242,7 @@ dependencies = [ "num-traits", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -361,7 +361,7 @@ checksum = "213888f660fddcca0d257e88e54ac05bca01885f258ccdf695bafd77031bb69d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -445,7 +445,7 @@ dependencies = [ "regex", "rustc-hash 1.1.0", "shlex", - "syn 2.0.90", + "syn 2.0.91", "which", ] @@ -466,7 +466,7 @@ dependencies = [ "regex", "rustc-hash 2.1.0", "shlex", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -475,7 +475,16 @@ version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" dependencies = [ - "bit-vec", + "bit-vec 0.6.3", +] + +[[package]] +name = "bit-set" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "08807e080ed7f9d5433fa9b275196cfc35414f66a0c79d864dc51a0d825231a3" +dependencies = [ + "bit-vec 0.8.0", ] [[package]] @@ -484,6 +493,12 @@ version = "0.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" +[[package]] +name = "bit-vec" +version = "0.8.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e764a1d40d510daf35e07be9eb06e75770908c27d411ee6c92109c9840eaaf7" + [[package]] name = "bitflags" version = "2.6.0" @@ -513,9 +528,9 @@ dependencies = [ [[package]] name = "bon" -version = "3.3.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f265cdb2e8501f1c952749e78babe8f1937be92c98120e5f78fc72d634682bad" +checksum = "61030e4aaccae9727cc388843dcc7ad1fb9e1ccdef5571e3e8393976b49b74ce" dependencies = [ "bon-macros", "rustversion", @@ -523,9 +538,9 @@ dependencies = [ [[package]] name = "bon-macros" -version = "3.3.0" +version = "3.3.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38aa5c627cd7706490e5b003d685f8b9d69bc343b1a00b9fdd01e75fdf6827cf" +checksum = "67d5d25cc9bd33120702000acc60836db15f06eabc4466230bf79dc80bd0a6ee" dependencies = [ "darling", "ident_case", @@ -533,7 +548,7 @@ dependencies = [ "proc-macro2", "quote", "rustversion", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -587,9 +602,9 @@ dependencies = [ [[package]] name = "cairo-lang-casm" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3929a38c1d586e35e19dbdf7798b146fba3627b308417a6d373fea8939535b6b" +checksum = "31a9a437bd4015a0f888d0de9876fd4786eb24b4e17b25c86c53980865980f9d" dependencies = [ "cairo-lang-utils", "indoc", @@ -601,9 +616,9 @@ dependencies = [ [[package]] name = "cairo-lang-compiler" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bed098f0c3666b3ad3a93aef6293f91fc1119bef660ce994105f6d1bc2802cf" +checksum = "4608693f366e8e86061c824adaca33b56bf0bd7e1cd5edc8592be7a380950322" dependencies = [ "anyhow", "cairo-lang-defs", @@ -627,18 +642,18 @@ dependencies = [ [[package]] name = "cairo-lang-debug" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7763505dcfe15f36899074c27185bf7e3494875f63fd06350c6e3ed8d1f91d5" +checksum = "4217fd373449a74efde259f8a4df501a7664f6f9c73b547c3aff632ad14feabf" dependencies = [ "cairo-lang-utils", ] [[package]] name = "cairo-lang-defs" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4d29dc5a3cafe94ea4397d41b00cd54a9dffbe9bc3a3092a9ea617ea737bc6e" +checksum = "dadf2d1002c9851ea17d37b83a26bbe6f0f53d5f94ba2e477a7a6e9d498f805b" dependencies = [ "cairo-lang-debug", "cairo-lang-diagnostics", @@ -653,9 +668,9 @@ dependencies = [ [[package]] name = "cairo-lang-diagnostics" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "761d20ca9c3a3eb7025b2488aa6e0e5dc23c5d551dd95e83a989b5e87687f523" +checksum = "4c4ac1831e7c14e5308a66254bcc57a8d4790f18567ef8d4d6768b39ffb955a0" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -665,9 +680,9 @@ dependencies = [ [[package]] name = "cairo-lang-eq-solver" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d778ec864e92c82293370a512195715b12775b05981e14065d85eb5dd3dd96b6" +checksum = "33c5f879bca42caef7e06f1de022d6961d36c5567db600faed8a947e2b705eaa" dependencies = [ "cairo-lang-utils", "good_lp", @@ -675,9 +690,9 @@ dependencies = [ [[package]] name = "cairo-lang-filesystem" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9dc486c554e2df3be8e84c47e30fe55b59d2349b680fbe992bfba801ef93ff5" +checksum = "c632b6d3ee5f1684f757f86e04ba9cf1daa8e4e74c6a5d6c0b7773cc4465a6c6" dependencies = [ "cairo-lang-debug", "cairo-lang-utils", @@ -691,9 +706,9 @@ dependencies = [ [[package]] name = "cairo-lang-formatter" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "675d281a3c9aa365055ce6e201d5dd91534dfccfd2929a41b7397f665c80293c" +checksum = "8295a3ddc62d8d92d942292f103de0434d622f47e936a3aea25eccc3eed88c58" dependencies = [ "anyhow", "cairo-lang-diagnostics", @@ -711,9 +726,9 @@ dependencies = [ [[package]] name = "cairo-lang-lowering" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d880470c94f94fac08c2150bc0ce4af930b6760956a56966e47612de376d57ec" +checksum = "b2a93c2644c64cfdbbe64b1bd6e13d9c6ed511950cfae2e738d228bc89dc5605" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -736,9 +751,9 @@ dependencies = [ [[package]] name = "cairo-lang-parser" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37e2b488f659432c8b866bf540e54ab3696a24ac0f366faac33b860c5313e78c" +checksum = "d884d9418895fef5b8ffd7458211523ab5abf4357845938b354adfbae1089fe2" dependencies = [ "cairo-lang-diagnostics", "cairo-lang-filesystem", @@ -756,9 +771,9 @@ dependencies = [ [[package]] name = "cairo-lang-plugins" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13cf34fd39a1efb997455fa38dbdb6bef489a125a2d17d77ebfea1ee580559f3" +checksum = "b224afdc76d9890edf9009fa8ffff9a91ac15614a41049d48c77c192e8c966e3" dependencies = [ "cairo-lang-defs", "cairo-lang-diagnostics", @@ -781,20 +796,20 @@ checksum = "123ac0ecadf31bacae77436d72b88fa9caef2b8e92c89ce63a125ae911a12fae" [[package]] name = "cairo-lang-proc-macros" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3c4a161868276ce022c44ac500afbfa0d7d8371106feb40dfca34ea7be97503" +checksum = "0ae35a282e5f2d15f47ba6fffae5a32e8aa2f254366865339cf326e2e015b8f8" dependencies = [ "cairo-lang-debug", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] name = "cairo-lang-project" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fde3cc9777fff4daacbfd839a6fcefa29abd660068de47f72ac6d5883fa93ccd" +checksum = "4da40ba380208db0b861d8b1e6e558adaa98dd0b382177b25bdb1abf8fd8d766" dependencies = [ "cairo-lang-filesystem", "cairo-lang-utils", @@ -805,9 +820,9 @@ dependencies = [ [[package]] name = "cairo-lang-runnable-utils" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "872d846834c8fdc886a7dc591c1f6ddd969d25d2c88dd65452931c63dfca7acc" +checksum = "951b72522c8a76e177119699bdcd3c4288bdc0bc784ac22dd7c0f80b2a7444d0" dependencies = [ "cairo-lang-casm", "cairo-lang-sierra", @@ -823,9 +838,9 @@ dependencies = [ [[package]] name = "cairo-lang-runner" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9121164a61b0a8fcadefc8b21240e372bf04e6648ea31d09f9e85701e60877a" +checksum = "35b1d5b0e9103bea4e39ac1099ad47893a25f334c3ca2596d07b1a8920be22cb" dependencies = [ "ark-ff 0.4.2", "ark-secp256k1 0.4.0", @@ -853,9 +868,9 @@ dependencies = [ [[package]] name = "cairo-lang-semantic" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8af1f92ba601fd61a994c44d0c80d711fbb3d64b2b5a1e72905fc6f581b1fadd" +checksum = "babdf14729236dfb455519d35e7e399ba73f0eaa4f1e929474d4c37dc9ef7a29" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -880,9 +895,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "075c6457642ada82b32cf657d871a8545ae7a9d61c78dd5588a794c8c905abdc" +checksum = "74c0e4951ecd88023856e0faa9fd444647d9f1ec69ca09dfa8e3aebf9d2afdef" dependencies = [ "anyhow", "cairo-lang-utils", @@ -907,9 +922,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-ap-change" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b69172fe8354b1dd564bba318ccb5233aa78f70d57145b8c92a0b1cf009fa0fc" +checksum = "9ea9c51356e603fa38fcbd4524d19e391ac25e89e64889c3a4ef849de3d1e911" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -923,9 +938,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-gas" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42b571b73d9b02103f780aeee05dbf9a71d68d8a16341a04aa1dd581d0db3ad6" +checksum = "1af17244a222fd2398caaf09e909f0b584abe14c77e1b5dc8f479ef35d1e8d50" dependencies = [ "cairo-lang-eq-solver", "cairo-lang-sierra", @@ -939,9 +954,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-generator" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d3857cd98a0cb35b32cc962e70c04e6ddfcd8bf61106ac37b6cf453ec76b878" +checksum = "2368d57175b18976222f844e4dda52d0025d70ce8b2dda35e0cc96efaa9bb4a5" dependencies = [ "cairo-lang-debug", "cairo-lang-defs", @@ -963,9 +978,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-to-casm" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add264b156dfb01f18292282a6037070c078acca3bccde05787da1e1c997b78c" +checksum = "866e6cbba9e81bae1c2f6b8f8e718f702fee69980c3f22bdea1e4657f09a540c" dependencies = [ "assert_matches", "cairo-lang-casm", @@ -984,9 +999,9 @@ dependencies = [ [[package]] name = "cairo-lang-sierra-type-size" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bda5388ef862bc26388e999ac7ad62dd8ab3064720c3483b81fd761b051e627" +checksum = "f8e797aa2f4023e984d13c5adf7068688da665328da6b055842f50fb673fb48b" dependencies = [ "cairo-lang-sierra", "cairo-lang-utils", @@ -994,9 +1009,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32d5ed4aa48fe739f643a8c503c14aec0858c31dc73ba4e6a335b77ca7438807" +checksum = "85c16967be9b0befaa0e21f65c9c803f8354d0db09de7adf28cdf0dc54b2c90d" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1024,9 +1039,9 @@ dependencies = [ [[package]] name = "cairo-lang-starknet-classes" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe691200b431e51e3d6cfa84f256a3dd2e8405f44d182843fbe124f803d085ff" +checksum = "b0f7b0c28430c9ad477c38dba089ac5a148443bbeaa77cc3f14980de255a220e" dependencies = [ "cairo-lang-casm", "cairo-lang-sierra", @@ -1047,9 +1062,9 @@ dependencies = [ [[package]] name = "cairo-lang-syntax" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a38f1431f22a9487b9b0dd7aef098c9605fe6b8677e0f620547aa69195f7fb5" +checksum = "f5adf933d378225e031200bd41c82e09cb0fde1042f5fe3f3c82d1ccd559a6f2" dependencies = [ "cairo-lang-debug", "cairo-lang-filesystem", @@ -1064,9 +1079,9 @@ dependencies = [ [[package]] name = "cairo-lang-syntax-codegen" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd7990586c9bb37eaa875ffeb218bdecf96f87881d03263ebf84fcd46514ca9f" +checksum = "4b34c81e723cf05fc0655aa8527f5a2730e30b31368b1b887c3eeb50a00c81c4" dependencies = [ "genco", "xshell", @@ -1074,9 +1089,9 @@ dependencies = [ [[package]] name = "cairo-lang-test-plugin" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5432fb1e290bed1c961a6bd778b3b553480b364524e7dbc343495b79b452131b" +checksum = "2a9c6f1976c28de3e502589f53b97bdc5f8566724d20ff68de83d8f382f5fc99" dependencies = [ "anyhow", "cairo-lang-compiler", @@ -1101,9 +1116,9 @@ dependencies = [ [[package]] name = "cairo-lang-test-utils" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b76c55a742da177540d2a0eb39fa50d011998d0ccfdeae8b48ea0e2d7f077f" +checksum = "aa7c6930beb6f221c1bc274460fca091e93c377570994b612682da30795ed74e" dependencies = [ "cairo-lang-formatter", "cairo-lang-utils", @@ -1114,9 +1129,9 @@ dependencies = [ [[package]] name = "cairo-lang-utils" -version = "2.9.2" +version = "2.10.0-rc.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff5d7609abc99c15de7d7f90b8441b27e2bd52e930a3014c95a9b620e5d3211a" +checksum = "91b6546d9f285c7d4a2700c084f745c35e1884a1dc2e4fa54a71034cea5606aa" dependencies = [ "hashbrown 0.14.5", "indexmap 2.7.0", @@ -1129,7 +1144,7 @@ dependencies = [ [[package]] name = "cairo-native" -version = "0.2.5" +version = "0.2.5-rc2" dependencies = [ "anyhow", "aquamarine", @@ -1152,7 +1167,7 @@ dependencies = [ "cairo-lang-test-plugin", "cairo-lang-utils", "cairo-native-runtime", - "cairo-vm 2.0.0-rc2", + "cairo-vm 2.0.0-rc3", "cc", "clap", "colored", @@ -1183,7 +1198,7 @@ dependencies = [ "stats_alloc", "tempfile", "test-case", - "thiserror 2.0.8", + "thiserror 2.0.9", "tracing", "tracing-subscriber", "utf8_iter", @@ -1192,7 +1207,7 @@ dependencies = [ [[package]] name = "cairo-native-runtime" -version = "0.2.5" +version = "0.2.5-rc2" dependencies = [ "cairo-lang-sierra-gas", "itertools 0.13.0", @@ -1236,9 +1251,9 @@ dependencies = [ [[package]] name = "cairo-vm" -version = "2.0.0-rc2" +version = "2.0.0-rc3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4484410b4bec788003631814514feb58a2ee06606bae94a3f6502d62585aae1" +checksum = "88898d02699b294573d2954d42900c8f0d1fa2c6de0514a36e86be8c8fb3165c" dependencies = [ "anyhow", "ark-ff 0.4.2", @@ -1298,9 +1313,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" [[package]] name = "cc" -version = "1.2.3" +version = "1.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27f657647bcff5394bf56c7317665bbf790a137a50eaaa5c6bfbb9e27a518f2d" +checksum = "c31a0499c1dc64f458ad13872de75c0eb7e3fdb0e67964610c914b034fc5956e" dependencies = [ "jobserver", "libc", @@ -1401,7 +1416,7 @@ dependencies = [ "heck 0.5.0", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1418,12 +1433,12 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" [[package]] name = "colored" -version = "2.1.0" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cbf2150cce219b664a8a70df7a1f933836724b503f8a413af9365b4dcc4d90b8" +checksum = "117725a109d387c937a1533ce01b450cbde6b88abceea8473c4d7a85853cda3c" dependencies = [ "lazy_static", - "windows-sys 0.48.0", + "windows-sys 0.59.0", ] [[package]] @@ -1445,15 +1460,15 @@ dependencies = [ [[package]] name = "console" -version = "0.15.8" +version = "0.15.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" +checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b" dependencies = [ "encode_unicode", - "lazy_static", "libc", - "unicode-width 0.1.14", - "windows-sys 0.52.0", + "once_cell", + "unicode-width", + "windows-sys 0.59.0", ] [[package]] @@ -1553,9 +1568,9 @@ dependencies = [ [[package]] name = "crossbeam-deque" -version = "0.8.5" +version = "0.8.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" +checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" dependencies = [ "crossbeam-epoch", "crossbeam-utils", @@ -1572,9 +1587,9 @@ dependencies = [ [[package]] name = "crossbeam-utils" -version = "0.8.20" +version = "0.8.21" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22ec99545bb0ed0ea7bb9b8e1e9122ea386ff8a48c0922e43f36d45ab09e0e80" +checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crunchy" @@ -1624,7 +1639,7 @@ dependencies = [ "proc-macro2", "quote", "strsim", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1635,7 +1650,7 @@ checksum = "d336a2a514f6ccccaa3e09b02d41d35330c07ddf03a62165fcec10bb561c7806" dependencies = [ "darling_core", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1738,7 +1753,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1750,7 +1765,7 @@ dependencies = [ "enum-ordinalize", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1770,9 +1785,9 @@ dependencies = [ [[package]] name = "encode_unicode" -version = "0.3.6" +version = "1.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" +checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" [[package]] name = "entities" @@ -1797,7 +1812,7 @@ checksum = "0d28318a75d4aead5c4db25382e8ef717932d0346600cacae6357eb5941bc5ff" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1846,9 +1861,9 @@ checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] name = "foldhash" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f81ec6369c545a7d40e4589b5597581fa1c441fe1cce96dd1de43159910a36a2" +checksum = "a0d2fde1f7b3d48b8395d5f2de76c18a528bd6a9cdde438df747bfcba3e05d6f" [[package]] name = "funty" @@ -1912,7 +1927,7 @@ checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -1970,7 +1985,7 @@ checksum = "43eaff6bbc0b3a878361aced5ec6a2818ee7c541c5b33b5880dfa9a86c23e9e7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -2108,11 +2123,11 @@ dependencies = [ [[package]] name = "home" -version = "0.5.9" +version = "0.5.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" +checksum = "589533453244b0995c858700322199b2becb13b627df2851f64a2775d024abcf" dependencies = [ - "windows-sys 0.52.0", + "windows-sys 0.59.0", ] [[package]] @@ -2160,7 +2175,7 @@ checksum = "a0eb5a3343abf848c0984fe4604b2b105da9539376e24fc0a3b0007411ae4fd9" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -2219,7 +2234,7 @@ dependencies = [ "console", "number_prefix", "portable-atomic", - "unicode-width 0.2.0", + "unicode-width", "web-time", ] @@ -2331,7 +2346,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" dependencies = [ "ascii-canvas", - "bit-set", + "bit-set 0.5.3", "ena", "itertools 0.11.0", "lalrpop-util", @@ -2405,9 +2420,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.168" +version = "0.2.169" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5aaeb2981e0606ca11d79718f8bb01164f1d6ed75080182d3abf017e6d244b6d" +checksum = "b5aba8db14291edd000dfcc4d620c7ebfb122c613afb886ca8803fa4e128a20a" [[package]] name = "libloading" @@ -2416,15 +2431,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fc2f4eb4bc735547cfed7c0a4922cbd04a4655978c09b54f1f7b228750664c34" dependencies = [ "cfg-if", - "windows-targets 0.52.6", + "windows-targets", ] -[[package]] -name = "libm" -version = "0.2.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8355be11b20d696c8f18f6cc018c4e372165b1fa8126cef092399c9951984ffa" - [[package]] name = "libredox" version = "0.1.3" @@ -2501,9 +2510,9 @@ dependencies = [ [[package]] name = "melior" -version = "0.20.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ee1cff4225a41563d0517e274eea56d6e07d40004184dda898ef08f421c1546" +checksum = "6359eb3167955f03dd9664feeb042cb31fbb3509e2118ccb044cfd450e7dcf57" dependencies = [ "melior-macro", "mlir-sys", @@ -2511,16 +2520,16 @@ dependencies = [ [[package]] name = "melior-macro" -version = "0.13.0" +version = "0.13.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4c74bfe1b3e796b3dec1b4a178d813398171658a0f55a3ccb963cc9212022d1" +checksum = "6e14d65328cdb958e2b9fa66f440b84d8e410d9e16742cad4237f2458ab8c17e" dependencies = [ "comrak", "convert_case", "proc-macro2", "quote", "regex", - "syn 2.0.90", + "syn 2.0.91", "tblgen-alt", "unindent", ] @@ -2533,9 +2542,9 @@ checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" [[package]] name = "microlp" -version = "0.2.6" +version = "0.2.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53e0c5664f9959f1c3970d523a22f0319024282cb754358c2afc7e1d45280ae3" +checksum = "a4d5845c04529928925fd1abd6776813710ad57ef41cb31958b1d35622a7d8e9" dependencies = [ "log", "sprs", @@ -2549,9 +2558,9 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "4ffbe83022cedc1d264172192511ae958937694cd57ce297164951b8b3568394" dependencies = [ "adler2", ] @@ -2676,7 +2685,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" dependencies = [ "autocfg", - "libm", ] [[package]] @@ -2758,7 +2766,7 @@ dependencies = [ "libc", "redox_syscall", "smallvec", - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -2930,7 +2938,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64d1ec885c64d0457d564db4ec299b2dae3f9c02808b8ad9c3a089c591b18033" dependencies = [ "proc-macro2", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -2977,12 +2985,12 @@ dependencies = [ [[package]] name = "proptest" -version = "1.5.0" +version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4c2511913b88df1637da85cc8d96ec8e43a3f8bb8ccb71ee1ac240d6f3df58d" +checksum = "14cae93065090804185d3b75f0bf93b8eeda30c7a9b4a33d3bdb3988d6229e50" dependencies = [ - "bit-set", - "bit-vec", + "bit-set 0.8.0", + "bit-vec 0.8.0", "bitflags", "lazy_static", "num-traits", @@ -3003,9 +3011,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" [[package]] name = "quote" -version = "1.0.37" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0e4dccaaaf89514f546c693ddc140f729f958c247918a13380cccc6078391acc" dependencies = [ "proc-macro2", ] @@ -3193,7 +3201,7 @@ dependencies = [ "regex", "relative-path", "rustc_version", - "syn 2.0.90", + "syn 2.0.91", "unicode-ident", ] @@ -3223,7 +3231,7 @@ dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -3355,7 +3363,7 @@ dependencies = [ "proc-macro2", "quote", "serde_derive_internals", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -3366,9 +3374,9 @@ checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" [[package]] name = "semver" -version = "1.0.23" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" +checksum = "3cb6eb87a131f756572d7fb904f6e7b68633f09cca868c5df1c4b8d1a694bbba" dependencies = [ "serde", ] @@ -3390,7 +3398,7 @@ checksum = "46f859dbbf73865c6627ed570e78961cd3ac92407a2d117204c49232485da55e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -3401,14 +3409,14 @@ checksum = "18d26a20a969b9e3fdf2fc2d9f21eda6c40e2de84c9408bb5d3b05d499aae711" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] name = "serde_json" -version = "1.0.133" +version = "1.0.134" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7fceb2473b9166b2294ef05efcb65a3db80803f0b03ef86a5fc88a2b85ee377" +checksum = "d00f4175c42ee48b15416f6193a959ba3a0d67fc699a0db9ad12df9f83991c7d" dependencies = [ "itoa", "memchr", @@ -3583,7 +3591,7 @@ checksum = "bbc159a1934c7be9761c237333a57febe060ace2bc9e3b337a59a37af206d19f" dependencies = [ "starknet-curve 0.4.2", "starknet-ff", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -3675,9 +3683,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.90" +version = "2.0.91" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "919d3b74a5dd0ccd15aeb8f93e7006bd9e14c295087c9896a110f490752bcf31" +checksum = "d53cbcb5a243bd33b7858b1d7f4aca2153490815872d86d955d6ea29f743c035" dependencies = [ "proc-macro2", "quote", @@ -3744,7 +3752,7 @@ dependencies = [ "cfg-if", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -3755,7 +3763,7 @@ checksum = "5c89e72a01ed4c579669add59014b9a524d609c0c88c6a585ce37485879f6ffb" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", "test-case-core", ] @@ -3770,11 +3778,11 @@ dependencies = [ [[package]] name = "thiserror" -version = "2.0.8" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f5383f3e0071702bf93ab5ee99b52d26936be9dedd9413067cbdcddcb6141a" +checksum = "f072643fd0190df67a8bab670c20ef5d8737177d6ac6b2e9a236cb096206b2cc" dependencies = [ - "thiserror-impl 2.0.8", + "thiserror-impl 2.0.9", ] [[package]] @@ -3785,18 +3793,18 @@ checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] name = "thiserror-impl" -version = "2.0.8" +version = "2.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2f357fcec90b3caef6623a099691be676d033b40a058ac95d2a6ade6fa0c943" +checksum = "7b50fa271071aae2e6ee85f842e2e28ba8cd2c5fb67f11fcb1fd70b276f9e7d4" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -3869,9 +3877,9 @@ dependencies = [ [[package]] name = "tinyvec" -version = "1.8.0" +version = "1.8.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "445e881f4f6d382d5f27c034e25eb92edd7c784ceab92a0937db7f2e9471b938" +checksum = "022db8904dfa342efe721985167e9fcd16c29b226db4397ed752a761cfce81e8" dependencies = [ "tinyvec_macros", ] @@ -3935,7 +3943,7 @@ checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -4048,12 +4056,6 @@ version = "1.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" -[[package]] -name = "unicode-width" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" - [[package]] name = "unicode-width" version = "0.2.0" @@ -4154,7 +4156,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", "wasm-bindgen-shared", ] @@ -4176,7 +4178,7 @@ checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -4250,22 +4252,13 @@ version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - [[package]] name = "windows-sys" version = "0.52.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" dependencies = [ - "windows-targets 0.52.6", + "windows-targets", ] [[package]] @@ -4274,22 +4267,7 @@ version = "0.59.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" dependencies = [ - "windows-targets 0.52.6", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", + "windows-targets", ] [[package]] @@ -4298,46 +4276,28 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", + "windows_aarch64_gnullvm", + "windows_aarch64_msvc", + "windows_i686_gnu", "windows_i686_gnullvm", - "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", + "windows_i686_msvc", + "windows_x86_64_gnu", + "windows_x86_64_gnullvm", + "windows_x86_64_msvc", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - [[package]] name = "windows_aarch64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - [[package]] name = "windows_aarch64_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - [[package]] name = "windows_i686_gnu" version = "0.52.6" @@ -4350,48 +4310,24 @@ version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - [[package]] name = "windows_i686_msvc" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - [[package]] name = "windows_x86_64_gnu" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - [[package]] name = "windows_x86_64_gnullvm" version = "0.52.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - [[package]] name = "windows_x86_64_msvc" version = "0.52.6" @@ -4455,7 +4391,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] @@ -4475,7 +4411,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.90", + "syn 2.0.91", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index e281e69a1..ba451dab9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cairo-native" -version = "0.2.5" +version = "0.2.5-rc2" edition = "2021" license = "Apache-2.0" description = "A compiler to convert Cairo's intermediate representation Sierra code to MLIR." @@ -58,13 +58,13 @@ normal = ["aquamarine"] [dependencies] aquamarine = "0.5.0" bumpalo = "3.16.0" -cairo-lang-compiler = "2.9.2" -cairo-lang-defs = "2.9.2" -cairo-lang-filesystem = "2.9.2" -cairo-lang-runner = "2.9.2" -cairo-lang-semantic = "2.9.2" -cairo-lang-sierra = "2.9.2" -cairo-lang-sierra-generator = "2.9.2" +cairo-lang-compiler = "2.10.0-rc.0" +cairo-lang-defs = "2.10.0-rc.0" +cairo-lang-filesystem = "2.10.0-rc.0" +cairo-lang-runner = "2.10.0-rc.0" +cairo-lang-semantic = "2.10.0-rc.0" +cairo-lang-sierra = "2.10.0-rc.0" +cairo-lang-sierra-generator = "2.10.0-rc.0" educe = "0.5.11" # can't update until https://github.com/magiclen/educe/issues/27 itertools = "0.13.0" lazy_static = "1.5" @@ -86,12 +86,12 @@ utf8_iter = "1.0.4" # CLI dependencies -cairo-lang-sierra-ap-change = "2.9.2" -cairo-lang-sierra-gas = "2.9.2" -cairo-lang-starknet = "2.9.2" -cairo-lang-utils = "2.9.2" -cairo-lang-starknet-classes = "2.9.2" -cairo-native-runtime = { version = "0.2.5", path = "runtime", optional = true } +cairo-lang-sierra-ap-change = "2.10.0-rc.0" +cairo-lang-sierra-gas = "2.10.0-rc.0" +cairo-lang-starknet = "2.10.0-rc.0" +cairo-lang-utils = "2.10.0-rc.0" +cairo-lang-starknet-classes = "2.10.0-rc.0" +cairo-native-runtime = { version = "0.2.5-rc2", path = "runtime", optional = true } clap = { version = "4.5.23", features = ["derive"], optional = true } libloading = "0.8.6" tracing-subscriber = { version = "0.3.19", features = [ @@ -101,7 +101,7 @@ tracing-subscriber = { version = "0.3.19", features = [ ], optional = true } serde = { version = "1.0", features = ["derive"] } anyhow = { version = "1.0", optional = true } -cairo-lang-test-plugin = { version = "2.9.2", optional = true } +cairo-lang-test-plugin = { version = "2.10.0-rc.0", optional = true } colored = { version = "2.1.0", optional = true } # needed to interface with cairo-lang-* keccak = "0.1.5" @@ -119,8 +119,8 @@ ark-ff = "0.5.0" num-integer = "0.1.46" [dev-dependencies] -cairo-vm = { version = "2.0.0-rc0", features = ["cairo-1-hints"] } -cairo-lang-semantic = { version = "2.9.2", features = ["testing"] } +cairo-vm = { version = "2.0.0-rc3", features = ["cairo-1-hints"] } +cairo-lang-semantic = { version = "2.10.0-rc.0", features = ["testing"] } criterion = { version = "0.5.1", features = ["html_reports"] } lambdaworks-math = "0.11.0" pretty_assertions_sorted = "1.2.3" diff --git a/Makefile b/Makefile index 1b4b1f942..1762fe5a8 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Environment detection. UNAME := $(shell uname) -CAIRO_2_VERSION = 2.9.2 +CAIRO_2_VERSION = 2.10.0-rc.0 SCARB_VERSION = 2.9.2 # Usage is the default target for newcomers running `make`. diff --git a/runtime/Cargo.toml b/runtime/Cargo.toml index f61f8260e..58a63202b 100644 --- a/runtime/Cargo.toml +++ b/runtime/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cairo-native-runtime" -version = "0.2.5" +version = "0.2.5-rc2" description = "The runtime for cairo-native." edition = "2021" license = "Apache-2.0" @@ -15,7 +15,7 @@ starknet-types-core = { version = "0.1.7", default-features = false, features = "serde", "hash", ] } -cairo-lang-sierra-gas = "2.9.2" +cairo-lang-sierra-gas = "2.10.0-rc.0" starknet-curve = "0.5.1" lazy_static = "1.5.0" rand = "0.8.5" diff --git a/src/debug.rs b/src/debug.rs index eeefff5c8..b90ed0779 100644 --- a/src/debug.rs +++ b/src/debug.rs @@ -408,6 +408,7 @@ pub const fn libfunc_to_name(value: &CoreConcreteLibfunc) -> &'static str { BoundedIntConcreteLibfunc::Constrain(_) => "bounded_int_constrain", BoundedIntConcreteLibfunc::IsZero(_) => "bounded_int_is_zero", BoundedIntConcreteLibfunc::WrapNonZero(_) => "bounded_int_wrap_non_zero", + BoundedIntConcreteLibfunc::Trim(_) => "bounded_int_trim", }, CoreConcreteLibfunc::IntRange(selector) => match selector { IntRangeConcreteLibfunc::TryNew(_) => "int_range_try_new", diff --git a/src/executor/contract.rs b/src/executor/contract.rs index 20f2e3424..c6f427487 100644 --- a/src/executor/contract.rs +++ b/src/executor/contract.rs @@ -737,7 +737,6 @@ mod tests { &mut StubSyscallHandler::default(), ) .unwrap(); - assert_eq!(result.return_values, vec![Felt::from(n), Felt::from(n * 2)]); assert_eq!(result.remaining_gas, 18446744073709551615); }); @@ -807,9 +806,8 @@ mod tests { &mut StubSyscallHandler::default(), ) .unwrap(); - assert_eq!(result.return_values, vec![Felt::from(3628800)]); - assert_eq!(result.remaining_gas, 18446744073709538915); + assert_eq!(result.remaining_gas, 18446744073709537615); } #[rstest] diff --git a/src/libfuncs/bounded_int.rs b/src/libfuncs/bounded_int.rs index 5da4785e0..22881cefe 100644 --- a/src/libfuncs/bounded_int.rs +++ b/src/libfuncs/bounded_int.rs @@ -12,7 +12,7 @@ use cairo_lang_sierra::{ extensions::{ bounded_int::{ BoundedIntConcreteLibfunc, BoundedIntConstrainConcreteLibfunc, - BoundedIntDivRemConcreteLibfunc, + BoundedIntDivRemConcreteLibfunc, BoundedIntTrimConcreteLibfunc, }, core::{CoreLibfunc, CoreType}, lib_func::SignatureOnlyConcreteLibfunc, @@ -57,6 +57,9 @@ pub fn build<'ctx, 'this>( BoundedIntConcreteLibfunc::Constrain(info) => { build_constrain(context, registry, entry, location, helper, metadata, info) } + BoundedIntConcreteLibfunc::Trim(info) => { + build_trim(context, registry, entry, location, helper, metadata, info) + } BoundedIntConcreteLibfunc::IsZero(info) => { build_is_zero(context, registry, entry, location, helper, metadata, info) } @@ -699,6 +702,55 @@ fn build_constrain<'ctx, 'this>( Ok(()) } +/// Makes a downcast of a type `T` to `BoundedInt` +/// or `BoundedInt` where `T` can be any type of signed +/// or unsigned integer. +/// +/// ```cairo +/// extern fn bounded_int_trim>( +/// value: T, +/// ) -> core::internal::OptionRev nopanic; +/// ``` +fn build_trim<'ctx, 'this>( + context: &'ctx Context, + _registry: &ProgramRegistry, + entry: &'this Block<'ctx>, + location: Location<'ctx>, + helper: &LibfuncHelper<'ctx, 'this>, + _metadata: &mut MetadataStorage, + info: &BoundedIntTrimConcreteLibfunc, +) -> Result<()> { + let value: Value = entry.arg(0)?; + let trimmed_value = entry.const_int_from_type( + context, + location, + info.trimmed_value.clone(), + value.r#type(), + )?; + + let is_invalid = entry.cmpi(context, CmpiPredicate::Eq, value, trimmed_value, location)?; + + // There is no need to truncate the value type since we're only receiving power-of-two integers + // and constraining their range a single value from either the lower or upper limit. However, + // since we're returning a `BoundedInt` we need to offset its internal representation + // accordingly. + let value = if info.trimmed_value <= BigInt::ZERO { + let offset = entry.const_int_from_type( + context, + location, + &info.trimmed_value + 1, + value.r#type(), + )?; + + entry.append_op_result(arith::subi(value, offset, location))? + } else { + value + }; + + entry.append_operation(helper.cond_br(context, is_invalid, [0, 1], [&[], &[value]], location)); + Ok(()) +} + /// Generate MLIR operations for the `bounded_int_is_zero` libfunc. fn build_is_zero<'ctx, 'this>( context: &'ctx Context, @@ -761,3 +813,106 @@ fn build_wrap_non_zero<'ctx, 'this>( &info.signature.param_signatures, ) } + +#[cfg(test)] +mod test { + use cairo_vm::Felt252; + + use crate::{ + context::NativeContext, execution_result::ExecutionResult, executor::JitNativeExecutor, + utils::test::load_cairo, OptLevel, Value, + }; + + #[test] + fn test_trim_some_u8() { + let (_, program) = load_cairo!( + use core::internal::{OptionRev, bounded_int::BoundedInt}; + use core::internal::bounded_int; + fn main() -> BoundedInt<1, 255> { + let num = match bounded_int::trim::(1) { + OptionRev::Some(n) => n, + OptionRev::None => 1, + }; + + num + } + ); + let ctx = NativeContext::new(); + let module = ctx.compile(&program, false, None).unwrap(); + let executor = JitNativeExecutor::from_native_module(module, OptLevel::Default).unwrap(); + let ExecutionResult { + remaining_gas: _, + return_value, + builtin_stats: _, + } = executor + .invoke_dynamic(&program.funcs[0].id, &[], None) + .unwrap(); + + let Value::BoundedInt { value, range: _ } = return_value else { + panic!(); + }; + assert_eq!(value, Felt252::from(1_u8)); + } + + #[test] + fn test_trim_some_u32() { + let (_, program) = load_cairo!( + use core::internal::{OptionRev, bounded_int::BoundedInt}; + use core::internal::bounded_int; + fn main() -> BoundedInt<0, 4294967294> { + let num = match bounded_int::trim::(0xfffffffe) { + OptionRev::Some(n) => n, + OptionRev::None => 0, + }; + + num + } + ); + let ctx = NativeContext::new(); + let module = ctx.compile(&program, false, None).unwrap(); + let executor = JitNativeExecutor::from_native_module(module, OptLevel::Default).unwrap(); + let ExecutionResult { + remaining_gas: _, + return_value, + builtin_stats: _, + } = executor + .invoke_dynamic(&program.funcs[0].id, &[], None) + .unwrap(); + + let Value::BoundedInt { value, range: _ } = return_value else { + panic!(); + }; + assert_eq!(value, Felt252::from(0xfffffffe_u32)); + } + + #[test] + fn test_trim_none() { + let (_, program) = load_cairo!( + use core::internal::{OptionRev, bounded_int::BoundedInt}; + use core::internal::bounded_int; + fn main() -> BoundedInt<-32767, 32767> { + let num = match bounded_int::trim::(-0x8000) { + OptionRev::Some(n) => n, + OptionRev::None => 0, + }; + + num + } + ); + let ctx = NativeContext::new(); + let module = ctx.compile(&program, false, None).unwrap(); + let executor = JitNativeExecutor::from_native_module(module, OptLevel::Default).unwrap(); + let ExecutionResult { + remaining_gas: _, + return_value, + builtin_stats: _, + } = executor + .invoke_dynamic(&program.funcs[0].id, &[], None) + .unwrap(); + + let Value::BoundedInt { value, range: _ } = return_value else { + panic!(); + }; + assert_eq!(value, Felt252::from(0)); + } +} diff --git a/src/libfuncs/gas.rs b/src/libfuncs/gas.rs index db8a924f8..ffa1b2217 100644 --- a/src/libfuncs/gas.rs +++ b/src/libfuncs/gas.rs @@ -35,7 +35,9 @@ pub fn build<'ctx, 'this>( GasConcreteLibfunc::WithdrawGas(info) => { build_withdraw_gas(context, registry, entry, location, helper, metadata, info) } - GasConcreteLibfunc::RedepositGas(_) => todo!("implement redeposit gas libfunc"), + GasConcreteLibfunc::RedepositGas(info) => { + build_redeposit_gas(context, registry, entry, location, helper, metadata, info) + } GasConcreteLibfunc::GetAvailableGas(info) => { build_get_available_gas(context, registry, entry, location, helper, metadata, info) } @@ -80,7 +82,7 @@ pub fn build_withdraw_gas<'ctx, 'this>( let gas_cost = metadata .get::() - .expect("builtin_withdraw_gas should always have a gas cost") + .expect("withdraw_gas should always have a gas cost") .clone(); let u64_type: melior::ir::Type = IntegerType::new(context, 64).into(); @@ -153,6 +155,83 @@ pub fn build_withdraw_gas<'ctx, 'this>( Ok(()) } +/// Adds the unused to the remaining gas +/// +/// ```cairo +/// extern fn redeposit_gas() implicits(GasBuiltin) nopanic; +/// ``` +pub fn build_redeposit_gas<'ctx, 'this>( + context: &'ctx Context, + _registry: &ProgramRegistry, + entry: &'this Block<'ctx>, + location: Location<'ctx>, + helper: &LibfuncHelper<'ctx, 'this>, + metadata: &mut MetadataStorage, + _info: &SignatureOnlyConcreteLibfunc, +) -> Result<()> { + let current_gas = entry.arg(0)?; + + let gas_cost = metadata + .get::() + .expect("redeposit_gas should always have a gas cost") + .clone(); + + let u64_type: melior::ir::Type = IntegerType::new(context, 64).into(); + + let builtin_ptr = { + let runtime = metadata + .get_mut::() + .ok_or(Error::MissingMetadata)?; + runtime + .get_gas_builtin(context, helper, entry, location)? + .result(0)? + .into() + }; + + let mut total_gas_cost_value = entry.const_int_from_type(context, location, 0, u64_type)?; + + for (cost_count, token_type) in &gas_cost.0 { + if *cost_count == 0 { + continue; + } + + let builtin_costs_index = match token_type { + CostTokenType::Const => 0, + CostTokenType::Pedersen => 1, + CostTokenType::Bitwise => 2, + CostTokenType::EcOp => 3, + CostTokenType::Poseidon => 4, + CostTokenType::AddMod => 5, + CostTokenType::MulMod => 6, + _ => native_panic!("matched an unexpected CostTokenType which is not being used"), + }; + + let cost_count_value = + entry.const_int_from_type(context, location, *cost_count, u64_type)?; + let builtin_costs_index_value = + entry.const_int_from_type(context, location, builtin_costs_index, u64_type)?; + + let builtin_cost_value_ptr = entry.gep( + context, + location, + builtin_ptr, + &[GepIndex::Value(builtin_costs_index_value)], + u64_type, + )?; + let cost_value = entry.load(context, location, builtin_cost_value_ptr, u64_type)?; + let gas_cost_value = entry.muli(cost_count_value, cost_value, location)?; + total_gas_cost_value = entry.addi(total_gas_cost_value, gas_cost_value, location)?; + } + + let resulting_gas = entry.append_op_result( + ods::llvm::intr_uadd_sat(context, current_gas, total_gas_cost_value, location).into(), + )?; + + entry.append_operation(helper.br(0, &[resulting_gas], location)); + + Ok(()) +} + /// Generate MLIR operations for the `withdraw_gas_all` libfunc. pub fn build_builtin_withdraw_gas<'ctx, 'this>( context: &'ctx Context, @@ -289,6 +368,6 @@ mod test { ); let result = run_program(&program, "run_test", &[]); - assert_eq!(result.remaining_gas, Some(18446744073709545195)); + assert_eq!(result.remaining_gas, Some(18446744073709545265)); } } diff --git a/tests/alexandria/Scarb.lock b/tests/alexandria/Scarb.lock index 5619e7201..732296e12 100644 --- a/tests/alexandria/Scarb.lock +++ b/tests/alexandria/Scarb.lock @@ -13,7 +13,7 @@ dependencies = [ [[package]] name = "alexandria_bytes" version = "0.1.0" -source = "git+https://github.com/ishay-starkware/alexandria?rev=e4eb87718e3a870a792ca83361860be800c90acd#e4eb87718e3a870a792ca83361860be800c90acd" +source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3#162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3" dependencies = [ "alexandria_data_structures", "alexandria_math", @@ -22,7 +22,7 @@ dependencies = [ [[package]] name = "alexandria_data_structures" version = "0.2.0" -source = "git+https://github.com/ishay-starkware/alexandria?rev=e4eb87718e3a870a792ca83361860be800c90acd#e4eb87718e3a870a792ca83361860be800c90acd" +source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3#162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3" dependencies = [ "alexandria_encoding", ] @@ -30,7 +30,7 @@ dependencies = [ [[package]] name = "alexandria_encoding" version = "0.1.0" -source = "git+https://github.com/ishay-starkware/alexandria?rev=e4eb87718e3a870a792ca83361860be800c90acd#e4eb87718e3a870a792ca83361860be800c90acd" +source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3#162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3" dependencies = [ "alexandria_bytes", "alexandria_data_structures", @@ -41,12 +41,12 @@ dependencies = [ [[package]] name = "alexandria_math" version = "0.2.1" -source = "git+https://github.com/ishay-starkware/alexandria?rev=e4eb87718e3a870a792ca83361860be800c90acd#e4eb87718e3a870a792ca83361860be800c90acd" +source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3#162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3" [[package]] name = "alexandria_numeric" version = "0.1.0" -source = "git+https://github.com/ishay-starkware/alexandria?rev=e4eb87718e3a870a792ca83361860be800c90acd#e4eb87718e3a870a792ca83361860be800c90acd" +source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3#162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3" dependencies = [ "alexandria_math", "alexandria_searching", @@ -55,7 +55,7 @@ dependencies = [ [[package]] name = "alexandria_searching" version = "0.1.0" -source = "git+https://github.com/ishay-starkware/alexandria?rev=e4eb87718e3a870a792ca83361860be800c90acd#e4eb87718e3a870a792ca83361860be800c90acd" +source = "git+https://github.com/keep-starknet-strange/alexandria.git?rev=162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3#162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3" dependencies = [ "alexandria_data_structures", ] diff --git a/tests/alexandria/Scarb.toml b/tests/alexandria/Scarb.toml index ef1ce6b5e..c507a5b23 100644 --- a/tests/alexandria/Scarb.toml +++ b/tests/alexandria/Scarb.toml @@ -7,7 +7,6 @@ edition = "2024_07" # See more keys and their definitions at https://docs.swmansion.com/scarb/docs/reference/manifest.html [dependencies] -# todo: change to https://github.com/keep-starknet-strange/alexandria.git after pr is merged for 2.9.2 -alexandria_math = { rev = "e4eb87718e3a870a792ca83361860be800c90acd", git = "https://github.com/ishay-starkware/alexandria" } -alexandria_data_structures = { rev = "e4eb87718e3a870a792ca83361860be800c90acd", git = "https://github.com/ishay-starkware/alexandria" } -alexandria_encoding = { rev = "e4eb87718e3a870a792ca83361860be800c90acd", git = "https://github.com/ishay-starkware/alexandria" } +alexandria_math = { rev = "162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3", git = "https://github.com/keep-starknet-strange/alexandria.git" } +alexandria_data_structures = { rev = "162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3", git = "https://github.com/keep-starknet-strange/alexandria.git" } +alexandria_encoding = { rev = "162bed1c636d31ccaaa90ed3eb32c9eb1d5e3bd3", git = "https://github.com/keep-starknet-strange/alexandria.git" } diff --git a/tests/tests/starknet/keccak.rs b/tests/tests/starknet/keccak.rs index 71babc3c7..ff4b4bc49 100644 --- a/tests/tests/starknet/keccak.rs +++ b/tests/tests/starknet/keccak.rs @@ -36,7 +36,7 @@ fn keccak_test() { ); assert!(!result.failure_flag); - assert_eq!(result.remaining_gas, 18446744073709483875); + assert_eq!(result.remaining_gas, 18446744073709484425); assert_eq!(result.return_values, vec![1.into()]); let result_aot_ct = run_native_starknet_aot_contract( diff --git a/tests/tests/starknet/u256.rs b/tests/tests/starknet/u256.rs index b87bff3ff..62295dfc6 100644 --- a/tests/tests/starknet/u256.rs +++ b/tests/tests/starknet/u256.rs @@ -41,5 +41,5 @@ fn u256_test() { result.return_values, vec![Felt::from_hex("0xf70cba9bb86caa97b086fdfa3df602ed").unwrap()] ); - assert_eq!(result.remaining_gas, 18446744073709532575); + assert_eq!(result.remaining_gas, 18446744073709532255); }