docs.rs failed to build fuel-asm-0.64.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
fuel-asm-0.63.0
Fuel ASM
Instruction set for the FuelVM.
Compile features
std
: Unless set, the crate will link to the core-crate instead of the std-crate. More info here.serde
: Add support for serde for the types exposed by this crate.
Example
use *;
// A sample program to perform ecrecover
let program = vec!;
// Convert program to bytes representation
let bytes: = program.iter.copied.collect;
// A program can be reconstructed from an iterator of bytes
let restored: = from_bytes.collect;
assert_eq!;
// Every instruction can be described as `u32` big-endian bytes
let halfwords: = program.iter.copied.collect;
let bytes = halfwords.iter.copied.map.flatten;
let restored: = from_bytes.collect;
assert_eq!;
// We can also reconstruct the instructions individually
let restored: = from_u32s.collect;
assert_eq!;
// An instruction is composed by the opcode representation, register IDs and immediate value.
let instruction = program;
assert_eq!;
let slli = match instruction ;
let = slli.unpack;
assert_eq!;
assert_eq!;
assert_eq!;