jasonwhite / syscalls

Raw Linux system calls for Rust.
Other
109 stars 14 forks source link

Add RISC-V support #37

Closed hack3ric closed 1 year ago

hack3ric commented 1 year ago

Add riscv32 and riscv64 syscall enum and invoke support.

The 32-bit one is not currently supported by Rust, but implemented anyway for future riscv32-linux targets.

jasonwhite commented 1 year ago

Awesome! Everything looks perfect except for a couple of things:

  1. Can you add riscv64gc-unknown-linux-gnu to the list of targets in .github/workflows/ci.yml? (Both the stable and nightly sections.)
  2. Add the architecture-specific feature flags to Cargo.toml. Note that you can still add riscv32 there even though it isn't technically supported by Rust. It just means that the syscall table is enabled, not the syscall functions themselves. There are cases where one might want to have access to the syscall table from another architecture.
hack3ric commented 1 year ago

Done.