Add a zkASM architecture#94
Conversation
38469bf to
8fd4f82
Compare
|
@sunfishcode would it be possible to get a review/merge here? |
|
zkasm doesn't appear to be a Rust or LLVM target name. We can potentially add it, but since I'm not familiar with zkasm at all: how confident are you that "zkasm" will remain the name of this architecture, and that no other architecture will call itself "zkasm", for the forseeable future? |
This is expected – we’re just now are experimenting with implementing a backend for this architecture in cranelift. Even then it might very well end up as an external backend, than something that's upstream. For the time being we’ve hijacked
Unfortunately I have little I can guarantee about either of these questions. The zkASM project is driven by the Polygon team (which I have a contact with but am not a part of,) and since For what it is worth, I’m perfectly happy with this target not being set in stone in perpetuity. I anticipate the benefit of doing so to be very low and I would imagine it wouldn’t be too onerous to repurpose or remove the architecture string from target-lexicon if a need to do so arises. |
|
Yeah, target-lexicon is kind of in a somewhat awkward position, being used by cranelift which doesn't need to be limited to stable targets, but also having become more broadly used by libraries that want a stable API. Would it make sense to add zkarch under a feature flag, like [features]
...
# Enable unstable zkarch architecture support.
zkarch = [] |
|
Yeah, I think we can do that no problem. I’ll make the change tomorrow. |
8fd4f82 to
638180d
Compare
This is a very initial take on this if only to be able to specify `zkasm-unknown-unknown` target in tooling that uses `target-lexicon`.
638180d to
a6d8fed
Compare
|
Done. I ended up picking |
|
Looks good, thanks! |
|
This is now released in target-lexicon 0.12.12. |
This is a very initial take on this if only to be able to specify
zkasm-unknown-unknowntarget in tooling that usestarget-lexicon. Some of the details are not exactly 100% correct in the current state of the machine (e.g. pointer width is 256 bits), but this will potentially change soon…