Skip to main content

LORO_FORMAT_VERSION

Constant LORO_FORMAT_VERSION 

Source
pub const LORO_FORMAT_VERSION: u8 = 1;
Expand description

Envelope version for the Loro snapshot bytes produced and consumed by this module.

Format: [LORO_FORMAT_VERSION: u8][loro snapshot bytes…]

Increment this constant (and add a migration path) whenever the Loro snapshot wire format changes in a backward-incompatible way. The version is checked on every import so that snapshots from an older binary are rejected with a clear error rather than silently corrupting state.