Skip to content
/ rarsjs Public

An assembler, editor, simulator and debugger for teaching RISC-V

License

Notifications You must be signed in to change notification settings

ldlaur/rarsjs

Repository files navigation

rars.js

A minimal assembler, editor, simulator and debugger for RISC-V (RV32IM), meant to be a useful tool for computer architecture students. This project was inspired by RARS, but it is not affiliated with it in any way.

You can try it now online on rarsjs.vercel.app.

Screenshot of the rars.js Web UI, debugging a recursive factorial program

Features

This initial release introduces the following core features:

Web UI version:

  • modern editing experience:
    • whole-UI light and dark themes
    • CodeMirror 6-based editor with RV32IM syntax highighting
    • live error reporting
  • debugging tools:
    • register and memory visualization with live updates
    • call stack inspector
    • breakpoint management
    • step/next/continue debugging

Command-line utilities

  • minimal, cross-platform C
  • ELF binary and object file generation
  • headless execution of the emulator

Installation

Command-line utilities

Note

The CLI version relies on ezld, so make sure you cloned recursively, or alternatively do git submodule update --init --recursive

A working C compiler and

make

Web UI

Clang with support for WASM (if you're using macOS, ensure you're not using AppleClang), node and npm

npm install
npm run dev # for a developement live reload server
npm run build # to build in dist/

About

An assembler, editor, simulator and debugger for teaching RISC-V

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages