array | Array<T, N>: N values of type T, and ways to build new arrays from old ones. Every value is immutable, so each operation returns a new array. |
binary | Fixed-width binary values: bits<N>, signed<N>, bool, and byte order. |
bitfield | Bit ranges, written the way ISA manuals write them. slice(x, 10, 5) is the manual’s x[10:5]: hi and lo are inclusive bit numbers, so a one-bit field is (n, n). The shift, the mask and the result’s width all come from those two numbers, so they can’t disagree. |
bitter/ | byte_order, deferred, layout, link |
ctypes | C’s fixed-width integer names. The signed ones are signed<N>, stored in two’s complement; the unsigned ones are bits<N> that can’t be negative. |
decimal | Exact non-integer numbers, for compile-time math: Decimal, a value scaled by a power of ten, and Fraction, a numerator over a denominator. Both convert to and from int with as. |
enumerated | Enumerated<T>: a value paired with its position. |
formats/ | elf, macho, pe |
iter | Stepped ranges of integers, for @for. |
math | Integer math, and fixed-point math on Decimal and Fraction, all evaluated at compile time. |
option | Option<T>: a value that may be missing. |
pdp10/ | impl, tops10 |
riscv/ | c_like, impl, native |
string | Strings packed into one integer. A string literal like "hi" is a struct of code points; string_from_struct encodes it as UTF-8 bytes in a single int, with its length in bytes. |
unsigned | uint, an int that can’t be negative. |
wasm/ | impl, leb128, module |
x86_64/ | att, impl, intel, nasm |