From 057989c48b35d8d26dd29f37456f989c7637d401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 10 Jun 2025 16:46:34 -0300 Subject: [PATCH 01/12] Use workspace version --- debug_utils/sierra-emu/Cargo.toml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/debug_utils/sierra-emu/Cargo.toml b/debug_utils/sierra-emu/Cargo.toml index 71fbc3484..0ad595b7c 100644 --- a/debug_utils/sierra-emu/Cargo.toml +++ b/debug_utils/sierra-emu/Cargo.toml @@ -1,10 +1,10 @@ [package] name = "sierra-emu" -version = "0.1.0" -edition = "2021" -license = "Apache-2.0" description = "A Cairo (Sierra) Virtual Machine." -repository = "https://github.com/lambdaclass/sierra-emu" +version.workspace = true +edition.workspace = true +license.worksace = true +repository.workspace = true readme = "README.md" keywords = ["starknet", "cairo", "compiler", "mlir"] From f560105537ec7a9919dadf946258b339d879369b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 10 Jun 2025 16:46:48 -0300 Subject: [PATCH 02/12] Specify version for sierra emu --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 61435a933..1cabf2d32 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -90,7 +90,7 @@ tempfile = "3.15.0" thiserror = "2.0.9" tracing = "0.1" utf8_iter = "1.0.4" -sierra-emu = { path = "debug_utils/sierra-emu", optional = true } +sierra-emu = { version = "0.5.0-rc.5", path = "debug_utils/sierra-emu", optional = true } # CLI dependencies From 2d4b5b3062e1530b2457dd09a366ae4a5a519337 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 10 Jun 2025 16:48:23 -0300 Subject: [PATCH 03/12] Fix typo --- debug_utils/sierra-emu/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debug_utils/sierra-emu/Cargo.toml b/debug_utils/sierra-emu/Cargo.toml index 0ad595b7c..f6e5ed4b3 100644 --- a/debug_utils/sierra-emu/Cargo.toml +++ b/debug_utils/sierra-emu/Cargo.toml @@ -3,7 +3,7 @@ name = "sierra-emu" description = "A Cairo (Sierra) Virtual Machine." version.workspace = true edition.workspace = true -license.worksace = true +license.workspace = true repository.workspace = true readme = "README.md" keywords = ["starknet", "cairo", "compiler", "mlir"] From cea49337a773a1f30f4a6e9b588eacef9a65fccd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 10 Jun 2025 16:57:31 -0300 Subject: [PATCH 04/12] Move keywords --- debug_utils/sierra-emu/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debug_utils/sierra-emu/Cargo.toml b/debug_utils/sierra-emu/Cargo.toml index f6e5ed4b3..67652bd11 100644 --- a/debug_utils/sierra-emu/Cargo.toml +++ b/debug_utils/sierra-emu/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "sierra-emu" description = "A Cairo (Sierra) Virtual Machine." +readme = "README.md" +keywords = ["starknet", "cairo", "vm", "sierra"] version.workspace = true edition.workspace = true license.workspace = true repository.workspace = true -readme = "README.md" -keywords = ["starknet", "cairo", "compiler", "mlir"] [dependencies] cairo-lang-compiler.workspace = true From e72b9713f59de3610a45180a634f4097e0e14ae4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 10 Jun 2025 16:57:44 -0300 Subject: [PATCH 05/12] Use workspace package --- Cargo.toml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 1cabf2d32..a1c526464 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,17 +1,26 @@ -[package] -name = "cairo-native" +[workspace] +members = ["debug_utils/sierra-emu", "debug_utils/casm-data-flow"] + +# Explicitly set the resolver to the default for edition >= 2021 +# https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html +resolver = "2" + +[workspace.package] version = "0.5.0-rc.6" edition = "2021" license = "Apache-2.0" -description = "A compiler to convert Cairo's IR Sierra code to MLIR and execute it." repository = "https://github.com/lambdaclass/cairo_native" + +[package] +name = "cairo-native" +description = "A compiler to convert Cairo's IR Sierra code to MLIR and execute it." readme = "README.md" keywords = ["starknet", "cairo", "compiler", "mlir"] categories = ["compilers"] - -# Explicitly set the resolver to the default for edition >= 2021 -# https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html -resolver = "2" +version.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [[bin]] name = "cairo-native-dump" @@ -178,9 +187,6 @@ harness = false name = "libfuncs" harness = false -[workspace] -members = ["debug_utils/sierra-emu", "debug_utils/casm-data-flow"] - [workspace.dependencies] cairo-lang-casm = "=2.12.0-dev.1" cairo-lang-compiler = "=2.12.0-dev.1" From 019d58fe75f3fb1bf7fbaa06cd34da25c1144696 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 10 Jun 2025 16:58:04 -0300 Subject: [PATCH 06/12] Update casm-data-flow also --- debug_utils/casm-data-flow/Cargo.toml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/debug_utils/casm-data-flow/Cargo.toml b/debug_utils/casm-data-flow/Cargo.toml index 8c0b59622..be2bf2a10 100644 --- a/debug_utils/casm-data-flow/Cargo.toml +++ b/debug_utils/casm-data-flow/Cargo.toml @@ -1,7 +1,9 @@ [package] name = "casm-data-flow" -version = "0.1.0" -edition = "2021" +version.workspace = true +edition.workspace = true +license.workspace = true +repository.workspace = true [dependencies] bincode = { version = "2.0.0-rc.3", default-features = false } From 1f311ef0c6729a6e61f0a2ada0300c78ad24724f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 10 Jun 2025 17:01:31 -0300 Subject: [PATCH 07/12] Update lock --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2b81047cc..92d3d6569 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1208,7 +1208,7 @@ dependencies = [ [[package]] name = "casm-data-flow" -version = "0.1.0" +version = "0.5.0-rc.6" dependencies = [ "bincode 2.0.1", "cairo-lang-casm", @@ -3368,7 +3368,7 @@ checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" [[package]] name = "sierra-emu" -version = "0.1.0" +version = "0.5.0-rc.6" dependencies = [ "cairo-lang-compiler", "cairo-lang-filesystem", From 57af3fbe0ed743d843d99f51610239c15e846a90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 10 Jun 2025 17:02:27 -0300 Subject: [PATCH 08/12] Update sierra emu version --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index a1c526464..7b9513f09 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,7 +99,7 @@ tempfile = "3.15.0" thiserror = "2.0.9" tracing = "0.1" utf8_iter = "1.0.4" -sierra-emu = { version = "0.5.0-rc.5", path = "debug_utils/sierra-emu", optional = true } +sierra-emu = { version = "0.5.0-rc.6", path = "debug_utils/sierra-emu", optional = true } # CLI dependencies From b44f30e4999a2fec10537f153591cb2d462bc608 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 10 Jun 2025 17:02:53 -0300 Subject: [PATCH 09/12] Reorder --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7b9513f09..7a3ec3551 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,7 +99,7 @@ tempfile = "3.15.0" thiserror = "2.0.9" tracing = "0.1" utf8_iter = "1.0.4" -sierra-emu = { version = "0.5.0-rc.6", path = "debug_utils/sierra-emu", optional = true } +sierra-emu = { path = "debug_utils/sierra-emu", version = "0.5.0-rc.6", optional = true } # CLI dependencies From c63a66da96b71fa7ce56ce39ccf967deb72e46c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 10 Jun 2025 17:06:22 -0300 Subject: [PATCH 10/12] Try --- Cargo.toml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 7a3ec3551..0fc21fafa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -99,7 +99,7 @@ tempfile = "3.15.0" thiserror = "2.0.9" tracing = "0.1" utf8_iter = "1.0.4" -sierra-emu = { path = "debug_utils/sierra-emu", version = "0.5.0-rc.6", optional = true } +sierra-emu = { workspace = true, optional = true } # CLI dependencies @@ -188,6 +188,7 @@ name = "libfuncs" harness = false [workspace.dependencies] +sierra-emu = { path = "debug_utils/sierra-emu", version = "0.5.0-rc.6" } cairo-lang-casm = "=2.12.0-dev.1" cairo-lang-compiler = "=2.12.0-dev.1" cairo-lang-defs = "=2.12.0-dev.1" From 7ab2fa07ac3bc74d4928a18fa07bb1f204e5ea32 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 10 Jun 2025 17:09:53 -0300 Subject: [PATCH 11/12] Publish sierra emu before cairo native --- .github/workflows/publish.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index bbe343539..cb8d100e5 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -37,5 +37,7 @@ jobs: keys-asc: https://apt.llvm.org/llvm-snapshot.gpg.key - name: Install LLVM run: sudo apt-get install llvm-19 llvm-19-dev llvm-19-runtime clang-19 clang-tools-19 lld-19 libpolly-19-dev libmlir-19-dev mlir-19-tools - - name: publish the crate + - name: publish sierra emu + run: cargo publish --token ${CRATES_TOKEN} --all-features -p sierra-emu + - name: publish cairo native run: cargo publish --token ${CRATES_TOKEN} --all-features -p cairo-native From 1b278a439accd7ba7812e3d38c90e60b34b1a567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juli=C3=A1n=20Gonz=C3=A1lez=20Calder=C3=B3n?= Date: Tue, 10 Jun 2025 17:28:20 -0300 Subject: [PATCH 12/12] Revert reorg of Cargo.toml --- Cargo.toml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 0fc21fafa..0f4789419 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,10 +1,3 @@ -[workspace] -members = ["debug_utils/sierra-emu", "debug_utils/casm-data-flow"] - -# Explicitly set the resolver to the default for edition >= 2021 -# https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html -resolver = "2" - [workspace.package] version = "0.5.0-rc.6" edition = "2021" @@ -22,6 +15,10 @@ edition.workspace = true license.workspace = true repository.workspace = true +# Explicitly set the resolver to the default for edition >= 2021 +# https://doc.rust-lang.org/edition-guide/rust-2021/default-cargo-resolver.html +resolver = "2" + [[bin]] name = "cairo-native-dump" required-features = ["build-cli"] @@ -187,6 +184,9 @@ harness = false name = "libfuncs" harness = false +[workspace] +members = ["debug_utils/sierra-emu", "debug_utils/casm-data-flow"] + [workspace.dependencies] sierra-emu = { path = "debug_utils/sierra-emu", version = "0.5.0-rc.6" } cairo-lang-casm = "=2.12.0-dev.1"