Skip to main content

ab_riscv_primitives/
lib.rs

1//! Composable RISC-V primitives (instructions, registers) and abstractions around them.
2//!
3//! The primitives are designed to be generic over the number of general purpose registers, and a
4//! macro system allows composing base ISA like RV64 with a desired set of standard or custom
5//! extensions/instructions. Trait abstractions are designed to allow expressing generic APIs
6//! without hardcoding specific types whenever possible.
7//!
8//! The immediate needs dictate the current set of available instructions and extensions. Consider
9//! contributing if you need something not yet available.
10//!
11//! `ab-riscv-interpreter` crate contains a complementary interpreter implementation, but these
12//! primitives are completely independent.
13//!
14//! Does not require a standard library (`no_std`) or an allocator.
15
16#![no_std]
17#![feature(
18    const_cmp,
19    const_convert,
20    const_default,
21    const_destruct,
22    const_index,
23    const_ops,
24    const_trait_impl,
25    const_try,
26    const_try_residual,
27    generic_const_exprs,
28    stmt_expr_attributes,
29    try_blocks
30)]
31#![expect(incomplete_features, reason = "generic_const_exprs")]
32
33pub mod instructions;
34pub mod registers;