-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add mips-zkm-zkvm-elf triple #134721
base: master
Are you sure you want to change the base?
Add mips-zkm-zkvm-elf triple #134721
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @jieyouxu (or someone else) some time within the next two weeks. Please see the contribution instructions for more information. Namely, in order to ensure the minimum review times lag, PR authors and assigned reviewers should ensure that the review label (
|
These commits modify compiler targets. |
This comment has been minimized.
This comment has been minimized.
// Some crates (*cough* crossbeam) assume you have 64 bit | ||
// atomics if the target name is not in a hardcoded list. |
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.
Btw, as for crossbeam, this issue was already resolved over a year ago. crossbeam-rs/crossbeam#1033
This comment was marked as off-topic.
This comment was marked as off-topic.
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.
Thanks for the PR. Before this target can be accepted, this PR will need two things:
- Can you please also add platform support docs for this Tier 3 target?
- Please also confirm that the target conforms with the Tier 3 target policy, as described in Adding a new target.
- For example, see Add arm64e-apple-tvos target #130614 (comment).
It is not at all clear to me (as a compiler maintainer who just tried to use Google to learn about zkvm) that these two uses of the term "zkvm" are referring to the same thing. It would be rather bad if they are not, so I would like some step taken to prevent/clarify problems here. |
@saethlin there is one already. https://doc.rust-lang.org/rustc/platform-support/riscv32im-risc0-zkvm-elf.html @jieyouxu thanks! I will follow the instruction and add the docs. |
I have read that. It is not clear to me, based on the terminology and authorship of this PR that these two things called "zkvm" are affiliated with each other, or are referring to a generic concept that they both agree they do not own. |
Good question. you are right, zkVM is a general concept that representing it can generate the validity proof (I would use this instead of zero knowledge proof for easier understanding) for some instruction set. For RISC0, it builds a zkVM for RV32, and for zkMIPS, we build a zkVM for MIPS32R2. More generally speaking, there are also some other impls, like zkWASM, or custom instruction set, like Miden. For your concern, should dev be aware of different zkVMs? I think we should due to:
|
@eigmax Does "zkvm" actually have a specific meaning with regards to these targets that they all uniformly share, or are they allowed to have entirely different ZK proof implementations? Do they share a syscall standard or some other abstract interface? Why does "zkvm" matter for the target's name? To put it another way, if tomorrow Apple decided to make their entire Darwin OS run on a ZKVM, would we want to rename all the Apple targets to |
cc @flaub @jbruestle @SchmErik Can you explain your perspective on the matter of using |
//@ revisions: mips_zkm_zkvm_elf | ||
//@ [mips_unknown_linux_uclibc] compile-flags: --target mips-zkm-zkvm-elf | ||
//@ [mips_unknown_linux_uclibc] needs-llvm-components: mips |
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 copied the revision name, this is incorrect.
I suspect that the OS section is useful here, is that the ZK may be some different with BareMetal embedded software developing. |
I guess that there may be a case that, a same app can be useful for both baremetal embedded hardware and zKVM emulator. |
Would that mean I do not think it is appropriate to introduce future possibilities about "what if we make |
In general, code compiled for "bare metal" targets does not necessarily have code to initialize hardware. Case in point: |
We are trying to add a new target
mips-zkm-zkvm-elf
into rustc.We have implemented a MIPS zkVM(zero knowledge virtual machine) to generate validity/ZK proof for general purpose computing. It allows the dev to compile the rust program into MIPS ELF, and the it proves the MIPS emulator/VM and generate a succinct proof to tell the verifier that the computing has been executed as expected.
This new target can significantly reduce the installation overhead for Rust dev.