jit_core/lib.rs
1#![no_std]
2#![forbid(unsafe_code)]
3#![deny(
4 missing_docs,
5 dead_code,
6 nonstandard_style,
7 unused_imports,
8 unused_mut,
9 unused_variables,
10 unused_unsafe,
11 unreachable_patterns
12)]
13
14//! Core `no_std` types and encoding logic for AArch64 instruction synthesis.
15//!
16//! This crate is the runtime heart of the project:
17//! - [`types`] defines the structured operand model and generated spec metadata.
18//! - [`engine`] implements variant selection, validation, and bitfield encoding.
19//!
20//! Design goals:
21//! - `no_std` compatibility (with `alloc` only where needed for diagnostics).
22//! - deterministic, metadata-driven encoding (no handwritten opcode tables).
23//! - strict error reporting for ambiguous or invalid operand forms.
24//!
25//! Typical call paths:
26//! - high-level: [`encode`] with canonical mnemonic + structured operands.
27//! - low-level: [`encode_by_spec_operands`] when variant/spec is already known.
28//! - dispatch assist: [`operand_shape_keys`] for precomputed shape-based routing.
29
30extern crate alloc;
31
32mod engine;
33mod types;
34
35pub use engine::{
36 encode, encode_by_spec, encode_by_spec_operands, encode_candidates, operand_shape_keys,
37};
38pub use types::*;
39pub use types::{AliasNoMatchHint, NoMatchingHint};