DEV Community

Cover image for I built a fetch tool that only runs on RISC-V (riscfetch v2.2.0)
kako-jun
kako-jun

Posted on

I built a fetch tool that only runs on RISC-V (riscfetch v2.2.0)

This is Part 1 of a three-part series about building, running, and trying to distribute a RISC-V tool.

  1. Part 1 (this post): I built a fetch tool that only runs on RISC-V
  2. Part 2: I bought a SATA SSD instead of NVMe by mistake — Orange Pi RV2 review
  3. Part 3: I tried to reach China — Creating a Gitee account as a foreigner

I bought my first RISC-V board because I thought it was cool. Not for work. Not for a startup. I just wanted to see what a non-x86, non-ARM computer felt like.

Then I ran neofetch on it.

It showed me... Ubuntu. Kernel version. Uptime. RAM. The same stuff it shows on every Linux machine. Nothing about the architecture that made this board interesting in the first place.

That felt wrong.

The thing neofetch can't tell you

RISC-V isn't like x86 or ARM. Those architectures ship a fixed set of instructions. You get what you get.

RISC-V is modular. The base instruction set is tiny. Everything else — floating point, atomics, vector operations, cryptography — comes as extensions. Each chip vendor picks which ones to implement. It's like a skill tree in an RPG. Two RISC-V boards sitting on your desk might have completely different capabilities.

When I started collecting boards — Orange Pi RV2, VisionFive 2, a Milk-V Duo — the first question I always had was: "What can this thing actually do?" Which extensions does it support? Does it have vector instructions? What's the VLEN? Which vendor's silicon is this?

neofetch couldn't answer any of that. fastfetch couldn't either. They're architecture-agnostic by design, which means they treat RISC-V like just another Linux box.

So I built a tool that doesn't.

The real struggle: buying RISC-V boards

Here's the thing nobody warns you about. The hard part of a RISC-V hobby isn't the code. It's getting the hardware.

I've been buying boards from AliExpress, which means navigating an ecosystem that runs on its own rules. The same board shows up in five different shops at five different prices. Product titles are half in Chinese, half in machine-translated English, and the specs might or might not match reality. I've been burned on AliExpress before — fake SD cards, packages that vanished into the void — so every order comes with a little prayer.

But here's the thing: every RISC-V board I've ordered has actually arrived, and worked. Maybe the RISC-V sellers are just a more honest crowd. Each board that shows up feels a little special. And the first thing I want to do when I plug one in is find out exactly what's inside.

riscfetch: the anti-portable tool

riscfetch is a system information tool exclusively for RISC-V. If you run it on x86 or ARM, it exits. That's intentional.

Most things don't run on RISC-V. So I made something that only runs on RISC-V. I liked the irony.

It checks 155 ISA extensions — 11 standard, 98 Z-extensions, and 46 S-extensions — organized by category: Bit Manipulation, Cryptography, Vector, Compressed, Atomics, and more.

v2.2.0: Automatic vendor detection

The headline feature in v2.2.0 is automatic vendor detection. It auto-detects across 12 RISC-V vendors — SiFive, StarFive, Pine64, Milk-V, Espressif, SpacemiT, and others — so you get a personalized display with the right ASCII art logo for your hardware, without configuring anything.

It also shows hart count, vector capabilities, and cache info.

The --all flag shows checkmarks and crosses for every single extension. It's like opening the skill tree screen and seeing what's unlocked:

Ext:  ✓I ✗E ✓M ✓A ✓F ✓D ✗Q ✓C ✗B ✓V ✗H
Z-Bit: ✓Zba ✓Zbb ✓Zbc ✓Zbs
Z-Crypto: ✗Zbkb ✗Zbkc ✗Zbkx ✓Zk ✗Zkn ...
Z-Vector: ✓Zve32f ✓Zve32x ✓Zve64d ✓Zve64f ✓Zve64x ✓Zvfh ✓Zvfhmin ...
Enter fullscreen mode Exit fullscreen mode

The --explain flag adds human-readable descriptions. Because knowing you have Zba is less useful than knowing what it actually does:

Zba        Address Generation
Zbb        Basic Bit Manipulation
Zbc        Carry-less Multiply
Zbs        Single-bit Operations
Enter fullscreen mode Exit fullscreen mode

And --json gives you machine-readable output for scripts and dashboards.

Pro tip: fastfetch && riscfetch -r gives you the complete picture — fastfetch for general system info, riscfetch for the RISC-V-specific stuff.

Studying the spec so you don't have to

Supporting 155 extensions meant reading the actual RISC-V ISA specification. Not just the base spec — the ratified extensions, the draft extensions, the vendor-specific ones.

The naming convention has layers. Single-letter standard extensions (I, E, M, A, F, D, Q, C, B, V, H) cover the fundamentals. Z-extensions get finer-grained — 98 of them across 10+ categories like bit manipulation (4 extensions), cryptography (8), vector (20+), compressed (5), atomics (3). Then S-extensions for supervisor-level features. The raw names — Zbkb, Zbkc, Zvfhmin — are meaningless unless you've memorized the spec. riscfetch groups them into categories and, with --explain, translates them into plain language.

The point isn't to memorize these. The point is that when you plug in a new board, you can run one command and see exactly what you're working with.

The technical bits

riscfetch is written in Rust and split into two crates:

  • riscfetch-core: A library crate that does the actual detection and parsing. You can use this in your own projects.
  • riscfetch-cli: The binary that formats and displays everything.

It reads from /proc/cpuinfo, device tree nodes, and other Linux interfaces to gather RISC-V-specific information. No kernel modules, no special privileges needed.

On using AI

I'll be upfront: I built riscfetch with Claude Code. The coding, the spec research, the extension categorization — most of it was done by AI. My job was to know what I wanted, steer the direction, and verify the results on real hardware.

I'm not embarrassed about that. If there are mistakes in how riscfetch parses some obscure extension, I'll fix them — or more likely, I'll retry with a smarter version of Claude and it'll get it right. That's how this works now.

What I did bring was the motivation. No AI wakes up one morning and thinks "I wish neofetch showed me RISC-V extensions." That frustration was mine. The idea was mine. The boards sitting on my desk are mine. The tool just needed someone to want it to exist.

I think the era of hiding AI collaboration is over. What matters is the "what" and the "why." The "how" keeps changing.

The most useful tool

And I think the lesson generalizes. The most useful tool is sometimes one that goes deep on one thing instead of being shallow across everything. There was exactly zero tools that could tell you which RISC-V cryptography extensions your board supports. Now there's one.

Try it

I'll keep updating riscfetch as new boards and extensions hit the market. The RISC-V spec keeps growing, and so will this tool. Current version is 2.2.0.

cargo install riscfetch && riscfetch --all
Enter fullscreen mode Exit fullscreen mode

Or grab a pre-built binary from GitHub Releases. It's MIT licensed.

If you have a RISC-V board — any board — I'd love to see what riscfetch shows on it. Drop your output in the comments. I've tested on a handful of boards, but the ecosystem is diverse and I know there are configurations I haven't seen yet. RV32E systems, unusual VLEN settings, boards from vendors I haven't added logos for.

github.com/kako-jun/riscfetch


In Part 2, I'll walk through setting up Orange Pi RV2 with USB SSD boot and building a dev environment on RISC-V hardware.

Top comments (0)