Scoopfeeds — Intelligent news, curated.
computer-science

Riscrithm – An intuitive RISC-V assembler and optimizer coded in Go

Hacker News · May 25, 2026, 9:01 PM

Key takeaways

  • If you're looking at this, you are probably getting your hands dirty with Riscrithm, a high-level macro-assembly dialect that compiles straight down to pure RISC-V assembly.
  • To compile your source code, you'll use the riscrithm CLI tool.
  • riscrithm "source_code_file" "assembly_target_file" [-o/--optimize] Source Code: Your Riscrithm input file.

Hey there. If you're looking at this, you are probably getting your hands dirty with Riscrithm, a high-level macro-assembly dialect that compiles straight down to pure RISC-V assembly. Think of it as a bridge between the readability of a high-level language and the raw, deterministic control of bare-metal hardware. Let's dive straight into how the compiler works, the syntax rules, and what's happening under the hood.

To compile your source code, you'll use the riscrithm CLI tool. The syntax is straightforward:

riscrithm "source_code_file" "assembly_target_file" [-o/--optimize] Source Code: Your Riscrithm input file. Target File: The generated .s assembly file. If this file doesn't exist, the compiler will create it for you on the fly. Optimization: Pass -o or --optimize to enable the optimization sweep (more on the compiler architecture later). 2. File Structure & Globals Every Riscrithm file must declare its target section and entrypoint at the very top. These, along with macro definitions, are the only lines allowed to exist completely unindented outside of a label block.

Article preview — originally published by Hacker News. Full story at the source.
Read full story on Hacker News → More top stories
Aggregated and edited by the Scoop newsroom. We surface news from Hacker News alongside other reporting so you can compare coverage in one place. Editorial policy · Corrections · About Scoop