Expand description
Luau bytecode codec and compiler entry points.
Application embedders usually compile through ruau::surface::Surface, or
through ruau::vm::RuntimeCapabilities when using the lower-level VM API
directly. Those paths apply runtime-capability restrictions before calling
into this crate.
Modules§
Structs§
- Class
Shape - Class-shape constant payload.
- Compile
Error - Compiler failure.
- Compile
Options - Public compile policy for Ruau VM bytecode.
- Debug
Info - Debug local and upvalue names.
- Debug
Local - One local debug-info entry.
- Decode
Error - Bytecode decode failure.
- Encode
Error - Bytecode encode failure.
- Fast
Flag - Fast-flag override.
- FastInt
- Fast-int override.
- Feedback
Slot - Feedback slot metadata.
- Instruction
- One instruction header and its optional static AUX word.
- Known
Member - Known library-member constant.
- Line
Info - Wire-preserving line info.
- Proto
- One decoded proto.
- Table
Entry - One table shape entry with a pre-filled constant.
- Type
Info - Raw type-info payload with decoded counts.
- Userdata
Type Mapping - Userdata type-name remapping entry.
- Validation
Error - One structural bytecode validation failure.
Enums§
- Bytecode
Chunk - One decoded bytecode blob.
- Compile
Error Kind - Stable category of a
CompileError. - Constant
- Constant table entry.
- Known
Member Value - Reified known-member constant values.
- Validation
Error Kind - Structural bytecode validation error categories.
Constants§
- DEFAULT_
TYPE_ VERSION - Type encoding version emitted by the pinned upstream compiler.
- DEFAULT_
VERSION - Version emitted by the pinned upstream compiler without bytecode flags.
Functions§
- code_
word_ count - Returns the total number of instruction words spanned by
code. - compile_
source - Compiles source into a decoded bytecode chunk.
- compile_
source_ bytes - Compiles arbitrary source bytes into a decoded bytecode chunk.
- compile_
source_ bytes_ strict - Byte-preserving form of
compile_source_strict. - compile_
source_ bytes_ strict_ with_ cancel - Cancellation-aware form of
compile_source_bytes_strict. - compile_
source_ bytes_ with_ cancel - Cancellation-aware form of
compile_source_bytes. - compile_
source_ strict - Compiles source, returning malformed programs as
Err. - compile_
source_ strict_ with_ cancel - Cancellation-aware form of
compile_source_strict. - compile_
source_ with_ cancel - Cancellation-aware form of
compile_source. - decode_
chunk - Decodes one Luau bytecode blob into a chunk.
- effective_
compile_ options - Applies source hot comments and attributes to input compiler options.
- encode_
chunk - Encodes a chunk back into upstream wire bytes.
- instruction_
word_ offsets - Returns the absolute instruction-word offset for each decoded instruction.
- jump_
target_ instruction_ index - Resolves one decoded instruction’s jump target to another decoded instruction index.
- validate_
chunk - Returns all structural validation errors in
chunk.