Module sway_ir::asm

source · []
Expand description

An ‘asm’ block represents an opaque set of Fuel VM assembly instructions, embedded in place and intended to be inserted as is into the assembly code generation.

An AsmBlock has symbols for arguments and an optional return name and contains a list of AsmInstruction.

The syntax in Sway for asm blocks is shown by this example, and AsmBlock represents it symbolically:

asm(r1: self, r2: other, r3) {
    add r3 r2 r1;
    r3: u64
}

Structs

A wrapper around an ECS handle into the Context.