rspirv/dr/mod.rs
1//! Data representation of various SPIR-V language constructs.
2//!
3//! By language constructs, I mean general language concepts like module,
4//! function, block, instruction, and operands. This is different
5//! from the "control flow constructs" mentioned in the SPIR-V
6//! [specification](https://goo.gl/YQRcZT).
7//!
8//! This data representation is designed to be lightweight; there are
9//! no excessive sanity check or cross referrences within each language
10//! construct. It is intended to be used as a plain data vehicle of
11//! SPIR-V language constructs in the memory.
12//!
13//! Required components of a language construct may still be wrapped around
14//! using `Option`; it makes the data representation more flexible since
15//! we don't always require valid language constructs.
16//!
17//! Apart from definitions of various language constructs, this module also
18//! provides a [loader](struct.Loader.html) for loading SPIR-V binaries
19//! (together with the [parser](../binary/struct.Parser.html)) and a
20//! [builder](struct.Builder.html) for building a SPIR-V data representation
21//! interactively.
22
23pub use self::build::{Builder, InsertPoint};
24pub use self::constructs::{Block, Function, Instruction};
25pub use self::constructs::{Module, ModuleHeader, Operand};
26pub use self::loader::{load_bytes, load_words, Error, Loader};
27
28mod build;
29mod constructs;
30mod loader;