-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Status of the riscv32im-risc0-zkvm-elf target #135376
Comments
As far as target APIs we would consider as a minimum basis, notably, in the recent discussion on a prospective VexOS target, having at least a rudimentary form of @SchmErik In general, people use Rust because "if it compiles, it works". However, we have already encountered this problem with wasm32-unknown-unknown: by having an almost-entirely-stubbed-out stdlib implementation, we create a situation where if it compiles, it DOESN'T work. And it seems to me many people will discover their code doesn't work at significant expense! That is, because this is a target designed primarily for computation on expensive-to-operate distributed systems, even the cheapest executions can be significantly more costly than simply running the compiler and executing a built program on my local machine. Time, if nothing else. The model for the wasm32-unknown-unknown target is a quagmire that is due to a unique situation for wasm32 and does not seem to apply in your case. It exists because there was an unwillingness to commit to e.g. having both a Regarding the |
We (T-compiler) should probably always involve T-libs when a target can only have "incomplete standard libraries" before accepting/merging a new target (with/without std). As @workingjubilee already mentioned, T-libs was in the loop regarding the recent VexOS target, and even-through that target is only missing
Based on that I would be in favour of removing |
Removing |
I'm also nominating for libs discussion about whether libs wants to have a target with std like this. |
From the target tier policy document: Tier 3:
Tier 2:
The libs team is happy to have as a tier 3 target but would block it from any higher tier. |
Discussed in T-compiler triage. So, we're fine with a stubbed One solution could be to giving them large time (say, 6 months) to fix the target_os and then swtich the compile target (comment). @rustbot label -I-compiler-nominated |
Okay. @SchmErik, @jbruestle, @flaub as the maintainers of the target, we ask you to transition the target to change the |
Is there anything more you can say about this? What would you recommend is a better approach? |
Projects could set something like |
Thanks for the info! Yes, I think this sounds good. I'll chat with @flaub and we'll be in touch |
We currently have a target called
riscv32im-risc0-zkvm-elf
, which targets the RISC Zero Zero Knowledge VM. This target is maintained by @SchmErik, @jbruestle, @flaub #134721 has revealed some issues in this target.The biggest issue is that the target sets
target_os = "zkvm"
. A "Zero Knowledge VM" is a generic concept and not an operating system. The correcttarget_os
would berisc0
.But there is another question, whether this target should exist in the first place. The alternative to this target would be using the existing
riscv32im-unknown-none-elf
target with a RISC0-provided crate for the system calls.The thing that is currently gained from having this target is that it can have
std
, where the very few syscalls that exist are used to implement some standard library interfaces.Concretely, the following functionality is provided:
other features like
std::fs
,std::io
,std::process
,std::thread
,std::time
,std::net
are not supported.@SchmErik, who is a maintainer of the target, highlights how the
std
support is useful in #134721 (comment):Additionally, they mentioned how having the target allows them to add cfgs to forked ecosystem crates to make them use more of RISC Zero's APIs (though this could also be implemented without a target and a normal custom cfg).
It is always unsatisfactory to have targets with such incomplete standard libraries (at least it's not as bad as
wasm32-unknown-unknown
in this case). On the other hand, (just like the wasm target) the APIs that are implemented are likely useful.This issue is about figuring out what to do with this target, whether to keep it (renamed) or remove it alltogether.
The text was updated successfully, but these errors were encountered: