Skip to main content

aarchmrs_instructions/
lib.rs

1/* Copyright (c) 2010-2026 Arm Limited or its affiliates. All rights reserved.
2 *
3 * This document is Non-confidential and licensed under the BSD 3-clause license.
4 */
5
6/*!*
7# AARCHMRS dataset as Rust code
8
9This Rust library provides functionality for synthesizing ARM64 instruction
10encodings. It was derived from the Arm Limited's [AARCHMRS
11dataset](https://developer.arm.com/Architectures/A-Profile%20Architecture#Downloads).
12
13The crate's module structure follows the dataset tree structure. For each
14instruction variant described in the dataset, a corresponding Rust function is
15generated.
16
17The source code of this crate is generated by tools at the same repository at
18<https://github.com/monoid/harm>.
19
20As with the original dataset, this code is licensed under BSD-3-Clause license.
21
22## Features
23
24As of 2025-06, the dataset contains descriptions for A64, A32 and T32 instructions sets.
25They are guarded by respective feature flags (`A64`, `A32` and `T32`), and `a64` is default.
26The `meta` flag generates additional information for each instructions.
27
28## Regenerating dataset
29
30To regenerate the code, use the `aarchmrs-generate` binary. The dataset URL and
31MD5 checksum are pinned in the `aarchmrs-gen` crate.
32
33```shell
34cargo run -p aarchmrs-generate -- \
35    --doc-file ./aarchmrs-instructions/README.md \
36    ./aarchmrs-instructions/src
37```
38
39Please, run `cargo fmt` afterwards.
40
41*/
42#![no_std]
43#![forbid(unsafe_code)]
44#![allow(
45    non_snake_case,
46    non_camel_case_types,
47    clippy::identity_op,
48    clippy::too_many_arguments,
49    clippy::module_inception
50)]
51#[cfg(feature = "A32")]
52pub mod A32;
53#[cfg(feature = "A64")]
54pub mod A64;
55#[cfg(feature = "T32")]
56pub mod T32;