Types

pub type boolean size(1)

Primitive types built into lav. True or false value.

pub type integer size(8)

64-bit signed integer.

pub type single size(4)

32-bit floating-point. Good for graphics and performance-sensitive math.

pub type float size(8)

64-bit floating-point. Use when precision matters.

pub type text size(4)

UTF-8 string.

pub type character size(4)

A single Unicode code point.

pub type u8 = integer limit(0, 255) size(1)

Integer subtypes for compact storage in struct fields. Behave as integer in expressions. 0 – 255, 1 byte.

pub type i8 = integer limit(-128, 127) size(1)

-128 – 127, 1 byte.

pub type u16 = integer limit(0, 65535) size(2)

0 – 65535, 2 bytes.

pub type i16 = integer limit(-32768, 32767) size(2)

-32768 – 32767, 2 bytes.

pub type i32 = integer size(4)

Full 32-bit integer range, 4 bytes.

pub type u32 = integer limit(0, 4294967294) size(4)

4-byte unsigned: 0 – 4_294_967_294. size(4) forces 4-byte storage and serialisation symmetric with `i32`. Stored as Parts::Int so the in-memory representation is signed i32; values in the upper half (2^31..2^32-2) round-trip through file I/O via 4-byte raw bytes but read back as negative i64s in expressions. For full 0..2^32-1 values needed in expression-time arithmetic, declare the field / variable as plain `integer` (8-byte) instead — `u32` is for the file / wire-format use cases (magic numbers, counts, tick fields) where the byte width is the load-bearing property.