-
Notifications
You must be signed in to change notification settings - Fork 70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DRAFT] add casm json target #1287
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi!
|
||
/// Represents a contract in the Starknet network. | ||
#[derive(Clone, Default, Debug, PartialEq, Eq, Serialize, Deserialize)] | ||
pub struct SerializedCasm { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't we just define some serialization for the struct in Cairo repo (in that repo)? https://github.com/starkware-libs/cairo/blob/233c0fdabe8c5010d10b5d16e02fecf6b656ef6b/crates/cairo-lang-sierra-to-casm/src/compiler.rs#L95
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right it should ideally go there but I wasn't sure if the cairo team wanted to make this a part of that repo based on some discussion in related issues. I'll open a PR there.
Co-authored-by: maciektr <[email protected]> Signed-off-by: tohrnii <[email protected]>
Now that I think about it, please consider if your usage isn't already covered by a tool called |
@maciektr Thank you. That tool should already cover the use case. I'll close this PR. |
@maciektr After discussion with @rodrigo-pino, there are a couple things missing from the generated casm json by the universal-sierra-compiler, namely entrypoint and builtins. It might be better for scarb to produce the json file directly instead of relying on yet another tool since it already generates the sierra json file. What do you think? |
@tohrnii It can be added to the |
Hi @tohrnii! Very sorry for the delay in response, we had a national holidays here in Poland, so I've been out of office for a bit.
I believe this should be added to USC then. I second @Arcticae here.
We do see Scarb as primarily Cairo -> Sierra compiler, and the CASM is just an addition here. We recommend using the USC wherever you rely on CASM programatically and the builtin Scarb feature for by-hand debuging. We move our tooling to use USC as well. Would it be ok for you? |
Addressing #676