riscv-codec 0.4.0

Decode/Encode and Assemble/Disassemble RISC-V instructions
Documentation
1
2
3
4
5
6
7
8
use riscv_codec::instruction::Instruction;
fn main() {
    println!(
        "Instruction size: {} bytes",
        std::mem::size_of::<Instruction>()
    );
    println!("{}", (-2i64).pow(2));
}