add riscv32im-unknown-openvm-elf as tier 3 target#1
Draft
arayikhalatyan wants to merge 7 commits intomasterfrom
Draft
add riscv32im-unknown-openvm-elf as tier 3 target#1arayikhalatyan wants to merge 7 commits intomasterfrom
arayikhalatyan wants to merge 7 commits intomasterfrom
Conversation
compiler/rustc_target/src/spec/targets/riscv32im_unknown_openvm_elf.rs
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| unsafe extern "C" { | ||
| fn sys_panic(msg_ptr: *const u8, len: usize) -> !; |
There was a problem hiding this comment.
is it possible to import from the pal/abi or is this needed even with no_std?
if so we should actually make sure in openvm we always make this extern even without the feature flag
Author
There was a problem hiding this comment.
Oh good point. Yes, it's needed with no_std.
0eed8ae to
7cefc34
Compare
7cefc34 to
512959b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 rust-lang#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 rust-lang#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.