bloqade_lanes_bytecode_core/bytecode/mod.rs
1//! Bytecode instruction set, program format, and validation.
2//!
3//! Every instruction is a fixed 16-byte word: a 32-bit opcode followed by
4//! three 32-bit data words, all little-endian. The opcode packs a device
5//! code (low byte) and instruction code (next byte).
6//!
7//! # Modules
8//!
9//! - [`instruction`] — high-level instruction enum
10//! - [`opcode`] — device codes, instruction codes, opcode packing/decoding
11//! - [`encode`] — binary encoding/decoding of instructions to/from 16-byte words
12//! - [`program`] — `Program` type with BLQD binary serialization
13//! - [`text`] — SST text assembly format (human-readable parse/print)
14//! - [`validate`] — structural, address, and stack-simulation validation
15
16pub mod encode;
17pub mod instruction;
18pub mod opcode;
19pub mod program;
20pub mod text;
21pub mod validate;
22pub mod value;
23
24pub use crate::arch::addr::{Direction, LaneAddr, LocationAddr, MoveType, ZoneAddr};
25pub use encode::DecodeError;
26pub use instruction::{
27 ArrayInstruction, AtomArrangementInstruction, CpuInstruction, DetectorObservableInstruction,
28 Instruction, LaneConstInstruction, MeasurementInstruction, QuantumGateInstruction,
29};
30pub use opcode::DeviceCode;
31pub use program::{Program, ProgramError};
32pub use text::ParseError;
33pub use validate::ValidationError;
34pub use value::{ArrayValue, CpuValue, DeviceValue, Value};