Setting up a rust environment on RISC-V

So I've located a userspace RISC-V emulation library written in C++ and would like to incorporate it into something I'm building. However, along with that comes the requirement that I need to construct a C-compatible environment as well. Currently, my code will initialize the RISC-V machine and install the following system call handlers:

  • Ebreak
  • Write(2)
  • exit(2)
  • fcntl(2) (stubbed)
  • ioctl(2) (stubbed)
  • rt_sigprocmask(2) (stubbed)
  • gettimeofday(2)
  • getpid(2) (stubbed)
  • getuid(2) (stubbed)
  • geteuid(2) (stubbed)
  • getgid(2) (stubbed)
  • getegid(2) (stubbed)
  • openat(2)
  • close(2)
  • writev(2)
  • readlinkat(2)
  • stat(2)
  • uname(2)
  • brk(2)
  • munmap(2)
  • mmap(2)
  • mremap(2)
  • mprotect(2)
  • madvise(2)
  • statx(2) (stubbed)

The above syscall list contains a lot of stubs for now; perhaps later on I'll un-stub them. I'm just wondering though: assuming I want a full std-capable environment, is this syscall list enough (and can I configure in STD what I'd like to have) or do I need to add a lot more? If so, what other syscalls do I need to get Rust to function properly in this environment?
Furthermore, I know that there's a target for RISC-V using Riscv64gc. Is there a way I can disable the compressed instructions without having to make a custom target profile?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.