Skip to main content

Crate ruau_bytecode

Crate ruau_bytecode 

Source
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§

disasm
Human-readable bytecode disassembly.
opcodes
Opcode constants and instruction operand helpers.

Structs§

ClassShape
Class-shape constant payload.
CompileError
Compiler failure.
CompileOptions
Public compile policy for Ruau VM bytecode.
DebugInfo
Debug local and upvalue names.
DebugLocal
One local debug-info entry.
DecodeError
Bytecode decode failure.
EncodeError
Bytecode encode failure.
FastFlag
Fast-flag override.
FastInt
Fast-int override.
FeedbackSlot
Feedback slot metadata.
Instruction
One instruction header and its optional static AUX word.
KnownMember
Known library-member constant.
LineInfo
Wire-preserving line info.
Proto
One decoded proto.
TableEntry
One table shape entry with a pre-filled constant.
TypeInfo
Raw type-info payload with decoded counts.
UserdataTypeMapping
Userdata type-name remapping entry.
ValidationError
One structural bytecode validation failure.

Enums§

BytecodeChunk
One decoded bytecode blob.
CompileErrorKind
Stable category of a CompileError.
Constant
Constant table entry.
KnownMemberValue
Reified known-member constant values.
ValidationErrorKind
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.