Registry / other / riscv
library0.16.1rscratesunverified

Low level access to RISC-V processors

# Cargo.toml [dependencies] riscv = "0.16.1"
INSTALL
IMPORT
SIG · RISCV
R
riscv
otherrustv0.16.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

mstatus
use riscv::register::mstatus;

Read the mstatus CSR register

use riscv::register::mstatus; fn main() { unsafe { let mstatus_val = mstatus::read(); println!("{:?}", mstatus_val); } }
Debug
Known issues
gotchaRequires unsafe code for register access; only works on RISC-V targets.
fix
Ensure target is riscv32 or riscv64 and use unsafe blocks.
affects: >=0.16.0
Upgrade
Version history
0.16.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
10 hits · last 30 days
node
10
Resources
riscv — cargo add riscv · libregistry