-
Notifications
You must be signed in to change notification settings - Fork 0
add riscv32im-unknown-openvm-elf as tier 3 target #1
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: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.
Oh good point. Yes, it's needed with no_std.
0eed8ae to
7cefc34
Compare
7cefc34 to
512959b
Compare
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.