xsil
Reference CLI for the .xsil RISC-V ISA extension package format.
xsil lets you describe a custom RISC-V instruction set extension, scaffold a
runnable package (with Spike extension skeleton, opcodes, tests and examples),
run it locally, and publish it to a registry — without waiting for silicon.
TL;DR
Install
Recommended — prebuilt binary (no Rust toolchain required):
|
Or from GitHub Releases.
From source — needs a recent Rust toolchain (rustup stable; Ubuntu apt install cargo is often too old for unpinned builds):
|
Use --locked so dependency versions match the crate’s Cargo.lock.
xsil new — interactive wizard
The fastest way to start. The wizard asks for:
- package name, version, ISA base (e.g.
RV64GC), license - repository URL (mandatory)
- honest classification:
standardStatus(ratified|draft|vendor|research|custom) and free-textauthority(e.g. RISC-V International, T-Head / XuanTie, University of Michigan). Both are mandatory. Don't label a packageratifiedunless RISC-V International has actually frozen the spec — the registry checks. - one or more custom instructions: mnemonic, format (R/I/S/B/U/J),
opcode,
funct3,funct7, operands, summary
It then generates a ready-to-build .xsil tree:
manifest.json— package metadata + instruction listopcodes.json— machine-readable encoding tableopcodes.h— C header with.insn-based inline-assembly macrosexamples/<mnemonic>.S— one runnable example per instructiontests/instructions.S— combined regression testsim/spike-extension/— Spikeextension_tC++ skeleton + Makefile + READMEtoolchain/,LICENSE(full SPDX text),CHANGELOG.md,README.md
Prefer non-interactive? Use xsil init <name> for a minimal scaffold,
or pass xsil new the same fields as flags:
What xsil does not touch
A package's provenance on a registry — whether it was auto-seeded
from upstream, ported by the community, claimed by the maintainer, or
admin-verified as official — is tracked server-side in a separate
portStatus field. The CLI does not read or write it; the registry
sets it for you (see spec §4.8). This is intentional: it prevents
publishers from misrepresenting themselves as the official upstream
maintainer.
What is .xsil?
A .xsil is a reproducible, gzipped tarball with SHA-256 payload checksums
that bundles everything needed to describe and exercise a custom RISC-V
extension. The format spec lives at
https://github.com/ExtenSilica/xsil/blob/main/spec/xsil.md.
Common commands
| Command | What it does |
|---|---|
xsil new |
Interactive wizard — generates a runnable skeleton |
xsil init <name> |
Non-interactive minimal scaffold |
xsil run <path> |
Execute a .xsil package locally |
xsil test <path> |
Run the package's test suite |
xsil install <pkg> |
Install a published package from the registry |
xsil publish <path> |
Upload a .xsil to the configured registry |
xsil login |
Authenticate against the registry |
xsil search <query> |
Search the registry |
xsil request … |
File and browse implementation requests (coordination, no payments) |
The hosted registry, web UI, and an equivalent web wizard are at https://extensilica.com.
License
ISC — see LICENSE.