-
Notifications
You must be signed in to change notification settings - Fork 14.1k
riscv32im-unknown-openvm-elf: add target #149797
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
base: main
Are you sure you want to change the base?
riscv32im-unknown-openvm-elf: add target #149797
Conversation
|
The Miri subtree was changed cc @rust-lang/miri Some changes occurred in src/doc/rustc/src/platform-support cc @Noratrieb These commits modify compiler targets. |
|
r? @ChrisDenton rustbot has assigned @ChrisDenton. Use |
|
|
r? compiler |
This comment has been minimized.
This comment has been minimized.
|
New targets need an MCP to be filed at https://github.com/rust-lang/compiler-team/issues. I don't think that has happened yet for this one? The MCP should explain what exactly is meant by "limited" std support. Which operations work, which don't? We want to avoid repeating the mistake that is wasm32-unk-unk where hardly anything in std works -- that target should have been no_std. |
|
The job Click to see the possible cause of the failure (guessed by this bot) |
|
MCP is optional for tier 3 targets:
IIRC, it has changed this year. |
|
Ah, I see. The comment about "limited" std support stands though -- please summarize what exactly that means in terms of which operations are available and which are missing. In particular, are there any operations that just panic because they cannot return a |
Yes, the intention is that if it's non-controversial, a PR suffices, but the reviewer can elect to request a MCP esp. if the proposed target has quirks ™️ (such as limited std support, or discuss things about a target that possibly can never progress past Tier 3 for whatever reason). |
|
I believe libs have previously said that they would want new tier 2 std targets to at least support cc @rust-lang/libs-api @rust-lang/libs |
This pull request adds OpenVM as a new target for Rust. The
riscv32im-unknown-openvm-elftarget runs inside a virtual machine with full support for the RV32IM ISA. The target includes limited support forstdthrough customizable non-standard RISC-V instruction set extensions which are configurable in the OpenVM framework. Whilestdlibrary support is currently limited (see book for details), it is important to have this functionality for downstream users to compile existing crates that are notno_stdbut in practice require limited OS functionality. Moreover, additional support for morestdfeatures is expected and can be customizable through extensions of the VM.We have chosen the
-unknown-openvm-elfnaming policy in accordance with the discussion in #135376 (comment)Further details may be found in the target description doc.
Tier 3 target policy:
Here is a copy of the tier 3 target policy:
The maintainers are named in the target description file
We understand. While the target shares similarities to
riscv32im-risc0-zkvm-elf, we choose theriscv32im-unknown-openvm-elfnaming in accordance with the discussion in #135376 (comment)We understand and will not introduce incompatibilities.
We understand. The code added to the Rust repository is under
MIT OR Apache-2.0license.We understand. The runtime libraries and the execution environment and software associated with this environment uses
MIT OR Apache-2.0so this should not be an issue.We understand. All OpenVM crates that may be required for correct linking are also licensed under
MIT OR Apache-2.0license.There are no such terms present
We understand.
We understand.
The target implements core and alloc. Support for
stdis limited, with some functionality stubbed out. The target providesstdsupport through custom RISC-V instruction set extensions (see book for details) and is not meant to provide a full OS. Howeverstdsupport is still important for downstream users of the target due to the need to compile existing crates that are notno_stdbut in practice require limited OS functionality. Furthermore, due to the customizable framework of the target virtual machines, more comprehensivestdsupport may be implemented with extensions in the future.See file target description file
We understand.
We understand.
We understand.
ELF binaries for the target can be generated using the LLVM backend.
We understand.