Skip to content

mateocabanal/riscvm

Repository files navigation

    RISCVM

A RV64GC userspace emulator, written in Rust 🦀.


Description

What is RISCVM?

RISCVM is a userspace emulator. It emulates the RVGC64 unprivileged spec, so this is not meant to run any baremetal software (e.g kernels). It only runs Linux ELF files.

How is RISCVM emulating RVGC64?

RISCVM is an interpreted emulator, but I have plans to implement a JIT for x86_64 and ARM later down the road.

Installation

cargo install --git https://github.com/mateocabanal/riscvm riscvm-runner # Installs the 'riscvm' binary

# OPTIONAL
cargo install --git https://github.com/mateocabanal/riscvm riscvm-debugger # Installs the 'riscvm-debugger' binary

Usage

riscvm <ELF_FILE>

Features

  • ELF execution
  • Support statically linked binaries
  • Start libc (gets to int main() when using libc)
  • Start libstdc++ (gets to int main() when using libstdc++ (C++))
  • Start Rust (gets to fn main() when using Rust) see issue
  • Support dynamically linked binaries
  • Multi-threading support

About

WIP RVGC64 interpreter written in Rust

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published