
rvkit: A CLI/TUI toolchain for bare-metal Zig on RISC-V (CH32V003 & ESP32-C3)
Hi everyone,
Setting up a bare-metal Zig project on RISC-V microcontrollers typically requires manual memory configuration, writing board-specific linker scripts from scratch, and managing a fragmented toolchain (separate utilities for flashing and serial monitoring).
To solve this, I am developing rvkit, a CLI/TUI toolchain written in Rust that provides a unified workflow for Zig developers targeting RISC-V hardware.
Project link: https://github.com/karagure/rvkit
Core Features & Workflow
rvkit manages the entire development lifecycle through a minimal command interface:
rvkit new --board <target> <name>: Scaffolds a ready-to-build Zig project with preconfigured build.zig and auto-generated linker scripts.rvkit build: Compiles the project using the native Zig toolchain.rvkit flash: Flashes the compiled binary to the target MCU.rvkit monitor: Opens a built-in TUI serial monitor.
Hardware Support
| Board | Architecture | Flash Tool Under the Hood |
|---|---|---|
| CH32V003 | RISC-V 32-bit | wlink (WCH-LinkE) |
| ESP32-C3 | RISC-V 32-bit | esptool |
Project Philosophy & Tech Stack
- Toolchain: Written strictly in stable Rust (no nightly).
- Target Language: Pure bare-metal Zig.
- UX: Text-based. The serial monitor uses a terminal user interface (TUI) to keep dependencies low and integration tight.
- Scope: Do one thing well (scaffold, build, flash, monitor). It does not attempt to replace your LSP (ZLS) or text editor.
Testing and Feedback Request
The toolchain is now functional, but it needs real-world testing. If you have a CH32V003 or an ESP32-C3 available, I would appreciate your feedback on the following:
- Toolchain Workflow: Does the binary installation and project scaffolding work out of the box on your platform?
- Hardware Edge Cases: Does the flashing tool or the TUI serial monitor fail under specific configurations?
- Code Review: For Rust and Zig developers, any feedback on the implementation or architecture is welcome.
Please open an issue on GitHub or leave your technical feedback in the comments below.
Thanks.