Reference

Structs

Structs provide lightweight named records with positional field layout. Declaration struct Point { x; y; } Construction and Access let p = Point { x: 10, y: 20 }; putf(p.x); p.y = 30; Notes Struct fields are declared by name only, with no type annotations. Field order is positional in the current runtime contract.

Source repo
aoiflux/mutant
Source path
compiler/compiler.go
Last reviewed
2026-07-03
Freshness tier
high

Structs provide lightweight named records with positional field layout.

Declaration

struct Point {
  x;
  y;
}

Construction and Access

let p = Point { x: 10, y: 20 };
putf(p.x);
p.y = 30;

Notes

  • Struct fields are declared by name only, with no type annotations.
  • Field order is positional in the current runtime contract.