# logicaffeine_data > LOGOS runtime values, collections, wire format and CRDTs, shared by native and WASM builds Every public module and item of `logicaffeine_data`, module by module, each with its one-line summary and its address. Item pages hold the full signature, documentation, trait implementations and a link to the source. - Crate page: [logicaffeine_data](https://docs.logicaffeine.com/logicaffeine_data/) - All items on one page: [logicaffeine_data/all](https://docs.logicaffeine.com/logicaffeine_data/all) - Source: [src/logicaffeine_data/lib.rs](https://docs.logicaffeine.com/src/logicaffeine_data/lib.rs) - Every crate: [llms.txt](https://docs.logicaffeine.com/llms.txt) ## logicaffeine_data - [mod backpressure](https://docs.logicaffeine.com/logicaffeine_data/backpressure/): `BoundedRing` — a fixed-capacity queue that drops the OLDEST item on overflow. - [mod crdt](https://docs.logicaffeine.com/logicaffeine_data/crdt/): CRDT (Conflict-free Replicated Data Types) - [mod exact](https://docs.logicaffeine.com/logicaffeine_data/exact/): The value a compiled LOGOS program holds wherever the exact extension reaches: real algebraic numbers, computable reals, the infinitesimal and the hyperreals it generates, infinite integers, ordinals, residue-dependent and provisional values — and every standard value that meets them. - [mod failure](https://docs.logicaffeine.com/logicaffeine_data/failure/): The sentences a program stops with, written once for every tier. - [mod fmt](https://docs.logicaffeine.com/logicaffeine_data/fmt/): The ONE float-display path. - [mod indexing](https://docs.logicaffeine.com/logicaffeine_data/indexing/): Polymorphic indexing traits for Logos collections. - [mod ops](https://docs.logicaffeine.com/logicaffeine_data/ops/): Exact numeric comparison for GENERATED code. - [mod opt](https://docs.logicaffeine.com/logicaffeine_data/opt/): A value or `nothing`: what a compiled program keeps in a place the VM can store `nothing` in. - [mod temporal](https://docs.logicaffeine.com/logicaffeine_data/temporal/): The temporal values of a compiled program: a calendar date, an instant, a time of day and a calendar span, with the arithmetic and the printing every tier shares (base’s `temporal`), and each as an `OtherValue` a `LogosValue` holds, so the exact extension’s values meet them as the interpreter’s do. Reading the clock is the system’s (`logicaffeine_system::temporal::now`). - [mod types](https://docs.logicaffeine.com/logicaffeine_data/types/): Core runtime type definitions. - [mod wire](https://docs.logicaffeine.com/logicaffeine_data/wire/): Shared wire-codec core — the exact byte format of the peer/transport codec (`logicaffeine_compile::concurrency::marshal`), factored out so that TWO value models encode and decode through ONE definition: - [fn logos_cmp_i64_f64](https://docs.logicaffeine.com/logicaffeine_data/fn.logos_cmp_i64_f64): Exact comparison of an i64 against an f64. `None` iff `f` is NaN. - [fn logos_max_f64](https://docs.logicaffeine.com/logicaffeine_data/fn.logos_max_f64): The language’s `min` and `max` of two reals (`logicaffeine_base::numeric::float_min`), which a compiled program calls where the interpreter’s builtins call them. The language’s `max` of two reals: a NaN gives way to the other operand, and of two equal values the one with the positive sign, so `max(0, -0.0)` is `0.0` (IEEE 754-2019 `maximumNumber`). - [fn logos_min_f64](https://docs.logicaffeine.com/logicaffeine_data/fn.logos_min_f64): The language’s `min` and `max` of two reals (`logicaffeine_base::numeric::float_min`), which a compiled program calls where the interpreter’s builtins call them. The language’s `min` of two reals: a NaN gives way to the other operand, and of two equal values the one with the negative sign, so `min(0, -0.0)` is `-0.0` (IEEE 754-2019 `minimumNumber`). One answer on every tier and under every optimizer, where `f64::min` leaves the sign of two equal zeros open. - [type FxHashMap](https://docs.logicaffeine.com/logicaffeine_data/type.FxHashMap): Type alias for a hash map that uses the Fx hashing algorithm. - [type FxHashSet](https://docs.logicaffeine.com/logicaffeine_data/type.FxHashSet): Type alias for a hash set that uses the Fx hashing algorithm. ## logicaffeine_data::backpressure `BoundedRing` — a fixed-capacity queue that drops the OLDEST item on overflow. - [struct BoundedRing](https://docs.logicaffeine.com/logicaffeine_data/backpressure/struct.BoundedRing): A FIFO queue capped at `cap` items; a push into a full ring evicts the oldest. ## logicaffeine_data::crdt CRDT (Conflict-free Replicated Data Types) - [mod causal](https://docs.logicaffeine.com/logicaffeine_data/crdt/causal/): Causal infrastructure for delta-state CRDTs. - [mod sequence](https://docs.logicaffeine.com/logicaffeine_data/crdt/sequence/): Sequence CRDTs for collaborative lists and text. - [struct AddWins](https://docs.logicaffeine.com/logicaffeine_data/crdt/struct.AddWins): Add-wins bias: concurrent add beats remove. - [struct DeltaBuffer](https://docs.logicaffeine.com/logicaffeine_data/crdt/struct.DeltaBuffer): A ring buffer that stores recent deltas along with their versions. - [struct GCounter](https://docs.logicaffeine.com/logicaffeine_data/crdt/struct.GCounter): A grow-only counter that supports distributed increment operations. - [struct LWWRegister](https://docs.logicaffeine.com/logicaffeine_data/crdt/struct.LWWRegister): A register that resolves conflicts using “last write wins” semantics. - [struct LatestWrite](https://docs.logicaffeine.com/logicaffeine_data/crdt/struct.LatestWrite): One value of a shared map, with the Lamport stamp of the write that produced it. - [struct MVRegister](https://docs.logicaffeine.com/logicaffeine_data/crdt/struct.MVRegister): A register that keeps all concurrent values. - [struct ORMap](https://docs.logicaffeine.com/logicaffeine_data/crdt/struct.ORMap): An observed-remove map with nested CRDT values. - [struct ORSet](https://docs.logicaffeine.com/logicaffeine_data/crdt/struct.ORSet): An observed-remove set with configurable bias. - [struct PNCounter](https://docs.logicaffeine.com/logicaffeine_data/crdt/struct.PNCounter): A counter that can be incremented and decremented. - [struct RemoveWins](https://docs.logicaffeine.com/logicaffeine_data/crdt/struct.RemoveWins): Remove-wins bias: concurrent remove beats add. - [trait DeltaCrdt](https://docs.logicaffeine.com/logicaffeine_data/crdt/trait.DeltaCrdt): A CRDT that supports delta-state synchronization. - [trait Merge](https://docs.logicaffeine.com/logicaffeine_data/crdt/trait.Merge): A type that can be merged with another instance of itself. - [trait SetBias](https://docs.logicaffeine.com/logicaffeine_data/crdt/trait.SetBias): Resolution strategy for concurrent add/remove conflicts. - [fn generate_replica_id](https://docs.logicaffeine.com/logicaffeine_data/crdt/fn.generate_replica_id): Generate a unique replica identifier. - [type ReplicaId](https://docs.logicaffeine.com/logicaffeine_data/crdt/type.ReplicaId): Unique identifier for a replica in a distributed CRDT. ## logicaffeine_data::crdt::causal Causal infrastructure for delta-state CRDTs. - [struct Dot](https://docs.logicaffeine.com/logicaffeine_data/crdt/causal/struct.Dot): A unique event identifier in a CRDT’s history. - [struct DotContext](https://docs.logicaffeine.com/logicaffeine_data/crdt/causal/struct.DotContext): Tracks which events have been seen in the system. - [struct VClock](https://docs.logicaffeine.com/logicaffeine_data/crdt/causal/struct.VClock): A vector clock for tracking causal relationships between events. ## logicaffeine_data::crdt::sequence Sequence CRDTs for collaborative lists and text. - [struct RGA](https://docs.logicaffeine.com/logicaffeine_data/crdt/sequence/struct.RGA): Replicated Growable Array - a sequence CRDT. - [struct YATA](https://docs.logicaffeine.com/logicaffeine_data/crdt/sequence/struct.YATA): YATA sequence CRDT. ## logicaffeine_data::exact The value a compiled LOGOS program holds wherever the exact extension reaches: real algebraic numbers, computable reals, the infinitesimal and the hyperreals it generates, infinite integers, ordinals, residue-dependent and provisional values — and every standard value that meets them. - [enum ExtensionBuiltin](https://docs.logicaffeine.com/logicaffeine_data/exact/enum.ExtensionBuiltin): A builtin of the exact extension, as a compiled program names it. A builtin of the exact extension. - [enum LogosValue](https://docs.logicaffeine.com/logicaffeine_data/exact/enum.LogosValue): A value of a compiled program where the exact extension reaches. See the module documentation. - [enum Rel](https://docs.logicaffeine.com/logicaffeine_data/exact/enum.Rel): A comparison, as a compiled program names it. The relational operators the exact types answer. - [trait OtherValue](https://docs.logicaffeine.com/logicaffeine_data/exact/trait.OtherValue): A compiled value of a kind outside the exact tower, as a `LogosValue` holds it: each answers for itself how it prints, what it equals, how it orders and what it combines with, exactly as the interpreter’s value of that kind does. A pair it has no arm for is refused in the interpreter’s words by the caller. - [fn logos_extension](https://docs.logicaffeine.com/logicaffeine_data/exact/fn.logos_extension): `builtin` applied to `args` in a compiled program: `logicaffeine_base::extension::call` on this value model, the interpreter’s own dispatcher, stopping with its refusal. ## logicaffeine_data::failure The sentences a program stops with, written once for every tier. - [const BITAND_OPERANDS](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.BITAND_OPERANDS): The reason `&` stops a program: an operand it has no bits for (a negative big integer, a big integer beside a value that is not a low mask `2^k - 1`, or a kind `&` does not combine). - [const BITOR_OPERANDS](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.BITOR_OPERANDS): The reason `|` stops a program: a big integer, or a kind `|` does not combine. - [const BITXOR_OPERANDS](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.BITXOR_OPERANDS): The reason `^` (`xor`) stops a program: a big integer, or a kind it does not combine. - [const CALL_DEPTH_EXCEEDED](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.CALL_DEPTH_EXCEEDED): The reason a program stops when its calls nest deeper than its stack holds: the interpreter and the VM at their call-depth limit, a compiled program at the end of its stack. - [const DIVIDE_BY_ZERO_QUANTITY](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.DIVIDE_BY_ZERO_QUANTITY): A quantity divided by a quantity whose magnitude is zero. - [const DIVIDE_MONEY_BY_ZERO](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.DIVIDE_MONEY_BY_ZERO): Money divided by the number zero. - [const DIVIDE_MONEY_BY_ZERO_AMOUNT](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.DIVIDE_MONEY_BY_ZERO_AMOUNT): Money divided by money whose amount is zero. - [const DIVIDE_QUANTITY_BY_ZERO](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.DIVIDE_QUANTITY_BY_ZERO): A quantity divided by the number zero. - [const DIVISION_BY_ZERO](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.DIVISION_BY_ZERO): The reason an integer division by zero stops a program. - [const INT_TOO_WIDE](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.INT_TOO_WIDE): The reason a compiled program stops when an integer past a machine word reaches a place it holds one. - [const MODULO_BY_ZERO](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.MODULO_BY_ZERO): The reason an integer remainder by zero stops a program. - [const MODULUS_NOT_POSITIVE](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.MODULUS_NOT_POSITIVE): `modular(v, m)` with `m <= 0`. - [const NO_EXCHANGE_RATES](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.NO_EXCHANGE_RATES): A conversion with no rates in scope at all. - [const NO_MODULAR_INVERSE](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.NO_MODULAR_INVERSE): A modular division whose divisor shares a factor with the modulus. - [const SET_FIELD_ON_NON_RECORD](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.SET_FIELD_ON_NON_RECORD): The stop for setting a field of a value that is not a record. - [const SHL_OPERANDS](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.SHL_OPERANDS): The reason a left shift stops a program: an operand that is not a machine-word integer. - [const SHR_OPERANDS](https://docs.logicaffeine.com/logicaffeine_data/failure/constant.SHR_OPERANDS): The reason a right shift stops a program: an operand that is not a machine-word integer. - [trait ContractReason](https://docs.logicaffeine.com/logicaffeine_data/failure/trait.ContractReason): A value that can stand after `otherwise`. - [trait FailureText](https://docs.logicaffeine.com/logicaffeine_data/failure/trait.FailureText): A value as a failure sentence names it: exactly as `Show` prints it. - [fn answered](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.answered): The value an operation of the exact extension answered, or the stop its refusal names: the sentence the interpreter reports for the same operation on the same values. - [fn cannot_convert](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.cannot_convert): `convert(q, unit)` to a unit of another dimension: the quantity’s own unit and the one asked for. - [fn cannot_read_bytes](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.cannot_read_bytes): `readBytes(path)` on a file that cannot be read, with the reason the system gave. - [fn contract_reason](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.contract_reason): The report a broken contract stops with. - [fn currencies_differ](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.currencies_differ): `verb` (`add`, `subtract`, `compare`) applied to money in two currencies. - [fn decimal_needs_text_or_int](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.decimal_needs_text_or_int): `decimal(…)` given a value of another kind than Text, Int or Decimal, named as the engines name it. - [fn field_access_on](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.field_access_on): The stop for reading a field of a value that is not a record: a value of `type_name`. - [fn found](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.found): The value a map lookup found for `key`, or the stop `key_not_found` names. - [fn index_out_of_bounds](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.index_out_of_bounds): The reason an index outside a sequence or a text stops a program: the index as the program wrote it (1-based, or negative from the end). - [fn invalid_utf8](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.invalid_utf8): The reason `text_from_bytes` stops a program whose bytes are not UTF-8: the decoder’s own account of where they stop being it. - [fn invalid_uuid](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.invalid_uuid): Text that is not a UUID. - [fn key_not_found](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.key_not_found): The reason reading a key a map does not hold stops a program: the key as `Show` prints it. - [fn modular_rings_differ](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.modular_rings_differ): `op` (`add`, `subtract`, `multiply`, `divide`) applied to two residues of different moduli. - [fn no_exchange_rate](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.no_exchange_rate): A conversion between two currencies with no rate for either in scope. - [fn not_a_decimal](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.not_a_decimal): Text `decimal(…)` cannot read as a base-10 number. - [fn not_a_timestamp](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.not_a_timestamp): Text that is not an RFC 3339 timestamp. - [fn pop_from_empty](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.pop_from_empty): The reason popping a list with no items stops a program: the list as the program writes it (`xs`, `b's items`). - [fn quantities_differ](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.quantities_differ): `verb` (`add`, `subtract`) applied to two quantities whose dimensions differ. - [fn quantities_uncomparable](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.quantities_uncomparable): Two quantities compared across dimensions. - [fn unknown_currency](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.unknown_currency): A currency code no currency table holds. - [fn unknown_time_zone](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.unknown_time_zone): A time zone name no zone table holds. - [fn unknown_unit](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.unknown_unit): A unit name no unit table holds. - [fn uuid_needs_16_bytes](https://docs.logicaffeine.com/logicaffeine_data/failure/fn.uuid_needs_16_bytes): `uuid_from_bytes` given the wrong number of bytes. ## logicaffeine_data::fmt The ONE float-display path. - [fn fmt_f64](https://docs.logicaffeine.com/logicaffeine_data/fmt/fn.fmt_f64): Renders an `f64` exactly as LOGOS displays it on every engine. ## logicaffeine_data::indexing Polymorphic indexing traits for Logos collections. - [trait LogosGetChar](https://docs.logicaffeine.com/logicaffeine_data/indexing/trait.LogosGetChar): Zero-allocation character access for string comparisons. - [trait LogosIndex](https://docs.logicaffeine.com/logicaffeine_data/indexing/trait.LogosIndex): Immutable element access by index. - [trait LogosIndexMut](https://docs.logicaffeine.com/logicaffeine_data/indexing/trait.LogosIndexMut): Mutable element access by index. - [trait LogosItems](https://docs.logicaffeine.com/logicaffeine_data/indexing/trait.LogosItems): Borrowing access to the item a 1-based LOGOS index names, under `resolve_logos_index`. A generated program reads and writes a sequence’s items through this, so its fast path costs one compare and every other index means what it means on the interpreter. - [fn logos_offset](https://docs.logicaffeine.com/logicaffeine_data/indexing/fn.logos_offset): The 0-based offset of the item a 1-based LOGOS index names in a sequence of `len` items, or `None` when it names none. Index 1 is the first item and a negative index counts from the back (-1 is the last); 0 and anything past either end name nothing. ONE definition: every engine, every generated program and every fast path indexes through this rule. The arithmetic is 64-bit on every target, so a wasm32 build reads the same item a native one does. - [fn logos_run_before](https://docs.logicaffeine.com/logicaffeine_data/indexing/fn.logos_run_before): `logos_run_through` for a loop that stops before `stop` (`while i < stop`). - [fn logos_run_through](https://docs.logicaffeine.com/logicaffeine_data/indexing/fn.logos_run_through): The items a counted loop over the indices `first` through `last` reads from a sequence of `len` items, in order, as the 0-based range they occupy: empty when `first` is past `last`, and otherwise the stop `resolve_logos_index` makes at the first index in the loop’s order that names no item. A backend that copies such a loop in one step copies this range, so it reads what the loop reads and stops where the loop stops. (A run that crosses 0 always stops at 0; one wholly below 0 counts from the back.) - [fn logos_slice_range](https://docs.logicaffeine.com/logicaffeine_data/indexing/fn.logos_slice_range): The 0-based range `items start through end` names in a sequence of `len` items, or an empty range when the slice reaches outside it (or runs backwards). ONE definition, like `logos_offset`, and 64-bit on every target. - [fn logos_text_run_before](https://docs.logicaffeine.com/logicaffeine_data/indexing/fn.logos_text_run_before): `logos_text_run_through` for a loop that stops before `stop`. - [fn logos_text_run_through](https://docs.logicaffeine.com/logicaffeine_data/indexing/fn.logos_text_run_through): The text a counted loop produces when it copies bytes `first` through `last` of `s` into a sequence and reads them back with `text_from_bytes`: the bytes under `logos_run_through`, and the stop `text_from_bytes` makes when they do not form UTF-8. A slice of text is text exactly when both of its ends fall between characters, so the common case costs two boundary checks. - [fn resolve_logos_index](https://docs.logicaffeine.com/logicaffeine_data/indexing/fn.resolve_logos_index): `logos_offset`, failing with the one sentence every tier reports when the index names no item. ## logicaffeine_data::ops Exact numeric comparison for GENERATED code. - [trait LogosStrPushInt](https://docs.logicaffeine.com/logicaffeine_data/ops/trait.LogosStrPushInt): Fast decimal append of an `i64` to a `String`. The `write!(s, "{}", i)` the string-builder used to emit routes every integer through the `fmt::Display` vtable + formatter machinery; this writes the digits straight into a stack buffer and `push_str`s once — ~1.5× faster on integer-heavy string building (measured: 20.7ms → 13.6ms on a 2M-int build loop), byte-identical output. - [trait Truthy](https://docs.logicaffeine.com/logicaffeine_data/ops/trait.Truthy): Truthiness for GENERATED code — ONE definition shared with the interpreter’s `RuntimeValue::is_truthy` and the VM’s `Value::is_truthy`. Falsy: `false`, numeric zero (`-0.0` is zero; NaN is nonzero and truthy), `nothing` (`None`), and empty Text/Seq/Map/Set. Everything else is truthy. - [fn logos_add_exact](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_add_exact): Exact Int arithmetic for GENERATED code (overflow ruling v2, stage 2): the i64 fast path is a single checked op; overflow spills to the promoting `crate::types::LogosInt` — the AOT’s mirror of the interpreter’s Int→BigInt promotion. `impl Into` lets an already-promoted operand chain through the same helper unchanged. - [fn logos_add_i64](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_add_i64): Fused NARROWED exact ops (overflow ruling v2, stage 2): emitted when a single exact op’s result narrows straight back to i64 — the dominant hot-loop shape. The fast path is one checked op on machine integers (no `LogosInt` materialization, so the value lives in a register and LLVM’s induction reasoning survives); overflow raises the same loud canonical error the `logos_*_exact(..).expect_i64("Int")` chain raises, byte for byte (the printed value is the exact result). - [fn logos_approx_eq](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_approx_eq): `a is approximately b` — the TOLERANT float comparison (`==` is IEEE bit-exact). Python’s `math.isclose` semantics: relative tolerance 1e-9 (nine significant digits agree) with absolute floor 1e-12 (so values near zero compare sanely), plus an exact fast path so `inf is approximately inf` holds. NaN is approximately nothing. ONE definition — the tree-walker, VM, JIT deopt path, AOT, and WASM lowering all share it. - [fn logos_band_exact](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_band_exact): `a & b` on exact integers, as every tier computes it: two machine words AND bit by bit, and a big integer that is not negative, beside a low mask `2^k - 1`, leaves its low `k` bits. Any other big operand is refused in `crate::failure::BITAND_OPERANDS`’s words. - [fn logos_cmp_i64_f64](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_cmp_i64_f64): Exact comparison of an i64 against an f64. `None` iff `f` is NaN. - [fn logos_cold_path](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_cold_path): The branch a guard sends a computation to when its machine-word form may not hold: run out of line, so the exact arithmetic it inlines (big-integer cases and all) never sits in the hot function beside the word form it guards. - [fn logos_div_exact](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_div_exact): Truncating division — loud canonical panic on a zero divisor (the same failure the interpreter raises); `i64::MIN / -1` promotes exactly. - [fn logos_div_i64](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_div_i64): `checked_div` is `None` on exactly the two slow cases (zero divisor, `i64::MIN / -1`); both re-route through the exact helper for the canonical error / exact-promotion narrow. - [fn logos_div_i128](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_div_i128): Truncating i128 division inside a width-bounded exact chain. The zero divisor raises the canonical error; `i128::MIN / -1` cannot occur (chain operands are width-bounded far below `i128::MIN`). - [fn logos_floordiv_exact](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_floordiv_exact): Floor division — the quotient rounded toward NEGATIVE INFINITY (`-7 // 2 → -4`), the `//` operator. Loud canonical panic on a zero divisor; exact (promotes to `BigInt`). Distinct from `logos_div_exact`, which truncates toward zero. - [fn logos_i64_eq_f64](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_i64_eq_f64): `i == f`, exactly (NaN is equal to nothing). - [fn logos_i64_key_of_f64](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_i64_key_of_f64): Numeric-unified map key: a `Float` used to index an `Int`-keyed map matches the Int key `i` iff the float is exactly `i` (integral and in i64 range) — the compiled mirror of the interpreter’s `1 == 1.0` key coercion. A non-integral float (`1.5`) matches no Int key. - [fn logos_mul_exact](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_mul_exact) - [fn logos_mul_i64](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_mul_i64) - [fn logos_narrow_i128](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_narrow_i128): Narrow a width-bounded i128 chain result back to i64 (overflow ruling v2, stage 2): the codegen lowers an exact chain whose worst-case bit-width provably fits i128 as native i128 arithmetic (every intermediate exact by construction) and narrows ONCE at the root. Same canonical error text as `expect_i64` — an i128 prints the same digits `LogosInt` would. - [fn logos_pow_exact](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_pow_exact): Exact integer exponentiation — the i64 fast path promotes to `BigInt` on overflow (`2 ** 100`). Loud canonical panic on a negative exponent (an Int can’t hold the fractional result), mirroring the interpreter. - [fn logos_rem_exact](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_rem_exact): Truncating remainder — loud canonical panic on a zero divisor; `i64::MIN % -1` is 0 (no overflow, no panic). - [fn logos_rem_i64](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_rem_i64): `checked_rem` is `None` on a zero divisor (canonical panic via the exact helper) and on `i64::MIN % -1` (which the helper resolves to 0 — cold but correct). - [fn logos_rem_i128](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_rem_i128): Truncating i128 remainder inside a width-bounded exact chain — the canonical zero-divisor error, sign of the dividend. - [fn logos_sub_exact](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_sub_exact) - [fn logos_sub_i64](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_sub_i64) - [fn logos_truthy](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_truthy): The truthiness entry point the AOT backend emits (`logos_truthy(&x)`). - [fn logos_word_operand](https://docs.logicaffeine.com/logicaffeine_data/ops/fn.logos_word_operand): An exact operand of `|`, `^`, `<<` or `>>`, which act on machine words alone: its value, or the refusal `why` when it is a big integer. ## logicaffeine_data::opt A value or `nothing`: what a compiled program keeps in a place the VM can store `nothing` in. - [struct LogosOpt](https://docs.logicaffeine.com/logicaffeine_data/opt/struct.LogosOpt): A value of `T`, or `nothing`. ## logicaffeine_data::temporal The temporal values of a compiled program: a calendar date, an instant, a time of day and a calendar span, with the arithmetic and the printing every tier shares (base’s `temporal`), and each as an `OtherValue` a `LogosValue` holds, so the exact extension’s values meet them as the interpreter’s do. Reading the clock is the system’s (`logicaffeine_system::temporal::now`). - [struct LogosDate](https://docs.logicaffeine.com/logicaffeine_data/temporal/struct.LogosDate): Date stored as days since Unix epoch (1970-01-01). - [struct LogosMoment](https://docs.logicaffeine.com/logicaffeine_data/temporal/struct.LogosMoment): Moment stored as nanoseconds since Unix epoch. - [struct LogosSpan](https://docs.logicaffeine.com/logicaffeine_data/temporal/struct.LogosSpan): Calendar span with separate month and day components. - [struct LogosTime](https://docs.logicaffeine.com/logicaffeine_data/temporal/struct.LogosTime): Time-of-day stored as nanoseconds from midnight — the wall-clock face of a `Moment`, with no date or zone. Renders `HH:MM:SS[.frac]`, lossless to the nanosecond (the AOT mirror of the interpreter’s `Time`). ## logicaffeine_data::types Core runtime type definitions. - [struct LogosBits](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosBits): A `Seq of Bool` held one bit per item: the representation a local sequence of truth values takes when every use of it is an item read, an item store, a push or its length. A table of `n` flags takes `n / 8` bytes where a `Vec` takes `n`, so a sieve over 10^8 numbers fits in the cache it used to stream past. - [struct LogosBoxed](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosBoxed): A `Boxable` value behind a shared, immutable pointer. Reading it back clones the value out, so sharing the allocation between clones of a tuple never lets one copy observe another’s writes. Two boxes are equal when they hold the same type and equal values. - [struct LogosComplex](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosComplex): An exact complex number `re + im·i` — the AOT mirror of the interpreter’s `Complex`. `complex(0, 1)` compiles to `LogosComplex::new(..)`; `+ − × ÷` stay exact and closed (`i·i = −1`). NOT ordered. `Display` shows `3+4i` / `i` / `-2i`, matching the interpreter. - [struct LogosComplexF](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosComplexF): A floating-point complex `re + im·i` (each part `f64`) — the AOT mirror of the interpreter’s `ComplexF` (LAPACK `Z`). `complex(3.0, 4.0)` compiles to `LogosComplexF::new(..)`; `+ − × ÷` and `sqrt` are inexact `f64` (the reason it exists over the exact `LogosComplex`). NOT ordered. `Display` matches the interpreter (`2+i`, `4+6i`) via `fmt_f64`. - [struct LogosDecimal](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosDecimal): An exact base-10 fixed-point number — money’s runtime type on the compiled-to-Rust path, the AOT mirror of the interpreter’s `Decimal`. `decimal("19.99")` compiles to `LogosDecimal::parse("19.99")`; `+ − ×` stay exact `Decimal` (scale preserved), and `÷` widens to the exact `LogosRational` (base-10 division need not terminate). `Display` shows the scale faithfully (`19.99`, `20.00`), matching the interpreter. - [struct LogosDenseI64Map](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosDenseI64Map): Direct-addressed `i64 → i64` map — the densest representation of a `Map of Int to Int`, emitted when the compiler PROVES every key ever inserted or queried lands in a statically bounded window `[lo, lo + slots)` whose width is ≤ the map’s own `with capacity` hint. Keys index a flat value array (`data[key - lo]`); a parallel presence bitset distinguishes a stored value from an absent slot, so `get` returns `None` for an in-range key that was never inserted. No hashing, no probing, no sparse table — both build and scan phases are sequential array accesses, which the backend vectorizes and the prefetcher loves. This is perfect hashing for dense integer keys: it removes the random-access hash table that costs `LogosI64Map` its cache locality. - [struct LogosDenseI64MapNoPresence](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosDenseI64MapNoPresence): The presence-elided sibling of `LogosDenseI64Map`, emitted ONLY when the compiler additionally proves the get/contains key domain is a subset of a CONTIGUOUSLY FULLY-COVERED insert range — i.e. every key the program reads was definitely written first. With that proof the presence bit is invariably set, so it is dropped: `get` is a bare `Some(data[key - lo])` load, byte-identical to a C array read, and no presence bitset is allocated. The gate forbids this type for any map with a `contains` use (there is no way to answer membership without presence), so `contains_key`/`LogosContains` are intentionally absent — a generated `contains` on this type would fail to compile, surfacing a gate bug loudly rather than silently miscompiling. - [struct LogosDenseI64Set](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosDenseI64Set): Direct-addressed `i64` SET — the keys-only, value-free sibling of `LogosDenseI64Map` (the dense analogue of `LogosI64Set`). Membership lives in a presence bitset over the proven window `[lo, lo + slots)`; `insert` sets a bit, `contains` tests one. No value array → 1 bit per key, the smallest footprint of any map/set representation. - [struct LogosDivU64](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosDivU64): Precomputed unsigned division by a loop-invariant runtime divisor — the magic-multiply that replaces a hardware `div`/`idiv` once the divisor is pinned. Codegen emits `LogosDivU64::new(n)` in a loop’s preheader (computed ONCE) and rewrites each in-loop `x % n` / `x / n` to `.rem(x)` / `.div(x)`, turning a ~20–40-cycle division into a multiply-high plus a shift. gcc and rustc both leave a runtime-invariant divisor as a real `div` (neither synthesizes this), so it is a strict win over the C baseline on division-hot loops (graph_bfs’s `% n` adjacency build). - [struct LogosI32Map](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosI32Map): i32-narrowed open-addressing `i64 → i64` map — the same probe-table shape as `LogosI64Map` but with 8-byte `(i32, i32)` slots, emitted when the compiler PROVES every key AND value stays in `i32` range. Halving the slot width halves the table’s memory traffic — the dominant cost of this random-access workload — for maps the dense gate cannot capture (no proven contiguous key window). The call surface is `i64` (keys/values widen at the boundary; the proof makes the narrowing cast lossless), so codegen emits it identically to `LogosI64Map`. - [struct LogosI32Set](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosI32Set): i32-narrowed open-addressing set — the keys-only sibling of `LogosI32Map` (the i32 analogue of `LogosI64Set`). One flat `Vec`: 4 bytes per slot, a quarter of `LogosI64Map`’s footprint. Emitted for a set-usage `Int → Int` map whose keys are all proven to fit `i32`. The empty-slot sentinel is `0` (the real key `0` tracked separately) so `vec![0; slots]` allocates via `alloc_zeroed` — lazily-zeroed, no eager memset of the table. - [struct LogosI64Map](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosI64Map): A specialized open-addressing `i64 → i64` map with VALUE semantics and no `Rc` indirection. - [struct LogosI64Set](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosI64Set): Open-addressing `i64` SET — the keys-only sibling of `LogosI64Map`, emitted for a `Map of Int to Int` the alias analysis proves is used ONLY as a set (insert + contains; the value is never read — two_sum’s `seen`). ONE flat `Vec` with linear probing and a `0` empty-slot sentinel (the real key `0` tracked separately for full key-space correctness). With no value array it has HALF the store traffic and footprint of the map — 8 bytes/slot, smaller than C’s `struct Entry { long key; int occupied; }`. - [struct LogosMap](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosMap): Key-value mapping with reference semantics. - [struct LogosModular](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosModular): An element of the ring ℤ/nℤ — the AOT mirror of the interpreter’s `Modular`. `modular(value, modulus)` compiles to `LogosModular::new(..)`; `+ − ×` wrap in the ring, `pow` is fast modular exponentiation, and `÷` multiplies by the modular inverse. NOT ordered. - [struct LogosMoney](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosMoney): Money for the compiled tier — an exact amount in a currency, mirroring `base::Money`. `+ −` require the SAME currency (a runtime-panic backstop; the type checker rejects mismatches first), `× ÷` scale by an exact number, and a same-currency `÷` is the dimensionless ratio. - [struct LogosQuantity](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosQuantity): A physical quantity on the compiled-to-Rust path — the AOT mirror of the interpreter’s `Quantity` value. The magnitude rides the exact rational tower (no float drift) and the display unit travels with it so `Show` renders faithfully (`42/127 ft`). `+ −` require the same dimension — the front-end’s type checker proves this, so a mismatch is a compile error, not a runtime one; the runtime check here is a defensive backstop. `× ÷` combine dimensions, and a quantity may be scaled by a dimensionless number (unit preserved). - [struct LogosRational](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosRational): Exact rational number for compiled LOGOS programs — the AOT counterpart of the interpreter’s `RuntimeValue::Rational`. - [struct LogosSeq](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosSeq): Ordered sequence with reference semantics. - [struct LogosSeqIter](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosSeqIter) - [struct LogosTuple](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosTuple): A LOGOS tuple `(a, b, …)` — a positional, heterogeneous value. A newtype over `Vec` that `Deref`s to it, so every existing indexing / destructuring / iteration / return path keeps working unchanged; it exists ONLY to carry a distinct display: a tuple renders with PARENS `(a, b)` and — the whole point — stays distinguishable from a `Seq` even when nested (`[(1, 2), (3, 4)]`), which a bare `Vec` (shown as `[…]`, identical to a Seq) could not. - [struct LogosUuid](https://docs.logicaffeine.com/logicaffeine_data/types/struct.LogosUuid): A 128-bit UUID for the compiled tier (RFC 9562), mirroring `logicaffeine_base::Uuid`. A `Copy` newtype over `[u8; 16]` — no allocation, byte-ordered comparison (so v6/v7 sort by time), canonical text form. - [enum LogosInt](https://docs.logicaffeine.com/logicaffeine_data/types/enum.LogosInt): The exact integer for GENERATED code: `i64` on the fast path, spilling to a heap `logicaffeine_base::BigInt` the moment a value escapes 64 bits — the AOT’s mirror of the interpreter’s Int→BigInt promotion (and of the JIT’s overflow side-exit). Every operation NORMALIZES: a big result that fits `i64` downsizes to `Small`, so representation never leaks into `==`/`Ord`. - [enum Value](https://docs.logicaffeine.com/logicaffeine_data/types/enum.Value): Dynamic value type for heterogeneous collections. - [trait Boxable](https://docs.logicaffeine.com/logicaffeine_data/types/trait.Boxable): A type a compiled program declares that can ride a tuple element as a `Value::Boxed`. The program implements it for each record and variant it declares; `render` is the type’s own `Show` (this crate has no IO, so the rendering is supplied by the implementor). - [trait DecimalArg](https://docs.logicaffeine.com/logicaffeine_data/types/trait.DecimalArg): A value `decimal(…)` takes: Text is read as a base-10 number, an Int widens exactly, a Decimal is itself, and any other kind stops the program with `crate::failure::decimal_needs_text_or_int`, naming it as the engines do. - [trait FillClone](https://docs.logicaffeine.com/logicaffeine_data/types/trait.FillClone): A FILL-SLOT copy: collections copy DEEP, so every slot of a fill (`n copies of x`, `[x] * n`) is an independent row — never `n` aliases of one row (the classic `[[0]] * 3` footgun is designed out). Scalars copy plain. Mirrors the tree-walker’s recursive `RuntimeValue::deep_clone`. - [trait IntoRate](https://docs.logicaffeine.com/logicaffeine_data/types/trait.IntoRate): An exchange rate accepted by `set_rate` — a plain integer (`1`), an exact `LogosDecimal` (`1.10`), or a `LogosRational`. All widen losslessly onto the Rational tower so normalisation stays exact, matching the interpreter’s `set_rate` builtin. - [trait LogosContains](https://docs.logicaffeine.com/logicaffeine_data/types/trait.LogosContains): Unified containment testing for all collection types. - [trait ToRationals](https://docs.logicaffeine.com/logicaffeine_data/types/trait.ToRationals): A value of integers held where the language holds rationals: an integer as the rational it equals, a list item by item, at any depth. - [trait VecCowNoop](https://docs.logicaffeine.com/logicaffeine_data/types/trait.VecCowNoop): A no-op `cow()` for an OWNED `Vec` — a scalarized (non-shared) sequence never aliases, so the copy-on-write barrier the codegen emits before an in-place mutation is unnecessary. This keeps the codegen’s `cow()` emission TOTAL: whether a `Seq` lowered to a shared `LogosSeq` (real copy-on-write) or a scalarized owned `Vec` (a proven-non-aliased buffer — e.g. a `Seq of Real` → `Vec`), `.cow()` always type-checks. Without this, a scalarized float/int vector whose `variable_types` entry still read `LogosSeq` made the emitter write `vec.cow()` on a `Vec`, which has no such method (`error[E0599]: no method named `cow``), breaking every float-sequence program on the compiled tiers. `LogosSeq`’s inherent `cow()` shadows this trait method, so shared handles keep the real barrier. - [fn decimal_of](https://docs.logicaffeine.com/logicaffeine_data/types/fn.decimal_of): `decimal(v)`: see `DecimalArg`. - [fn set_rate](https://docs.logicaffeine.com/logicaffeine_data/types/fn.set_rate): Install (or replace) one exchange rate in the ambient rate context — `1 = rate` reference units. The compiled-tier mirror of the `set_rate` builtin; a fresh process starts with no rates, so a program installs them before any ` in ` conversion. - [fn set_rates](https://docs.logicaffeine.com/logicaffeine_data/types/fn.set_rates): Bulk-install a whole exchange-rate table from a `Map of Text to ` (currency code → rate vs the reference) into the ambient rate context. The compiled-tier mirror of the `set_rates` builtin and the bridge a literal, network-synced, or fetched table feeds. Order-independent. - [fn text_bytes](https://docs.logicaffeine.com/logicaffeine_data/types/fn.text_bytes): A Text’s UTF-8 bytes as a `Seq of Int` (the `text_bytes` builtin, AOT). - [fn text_from_bytes](https://docs.logicaffeine.com/logicaffeine_data/types/fn.text_from_bytes): Rebuild a Text from a `Seq of Int` of UTF-8 bytes (the `text_from_bytes` builtin, AOT — the exact inverse of `text_bytes`). - [fn to_currency](https://docs.logicaffeine.com/logicaffeine_data/types/fn.to_currency): Convert money to another currency via the ambient rate context — the ` in ` surface. Panics (the typed-error backstop, like a currency-mismatch `+`) when no rates are in scope or the currency lacks a rate; the front-end / interpreter surface these as clean errors. - [fn value_semantics_enabled](https://docs.logicaffeine.com/logicaffeine_data/types/fn.value_semantics_enabled): Whether Mutable Value Semantics is enabled for compiled (AOT) programs. The AOT binary is a separate process from the interpreter, so it reads the `LOGOS_VALUE_SEMANTICS` env var itself (inherited from the parent process), cached once. When on, collection `Clone` deep-copies (value semantics); when off it shares the `Rc` (the historical reference semantics — unchanged). - [type Bool](https://docs.logicaffeine.com/logicaffeine_data/types/type.Bool): Boolean truth values. - [type Byte](https://docs.logicaffeine.com/logicaffeine_data/types/type.Byte): Raw bytes (0-255). - [type Char](https://docs.logicaffeine.com/logicaffeine_data/types/type.Char): Unicode scalar values. - [type FxIndexMap](https://docs.logicaffeine.com/logicaffeine_data/types/type.FxIndexMap): The insertion-ordered map behind every LOGOS `Map`: `IndexMap` for the order contract (iteration, display, and serialization follow insertion, like a Python dict), Fx hashing for speed on the small keys LOGOS programs use (no DoS-resistance requirement). - [type FxIndexSet](https://docs.logicaffeine.com/logicaffeine_data/types/type.FxIndexSet): Unordered collections of unique elements with FxHash. The insertion-ordered set behind every LOGOS `Set`: display and iteration follow first-insertion order, identical to the tree-walker’s Vec-backed sets and the direct-WASM linear sets. Fx hashing for speed. NOTE: removal must go through `shift_remove` (order-preserving), never `swap_remove`. - [type Int](https://docs.logicaffeine.com/logicaffeine_data/types/type.Int): Signed integers. - [type Map](https://docs.logicaffeine.com/logicaffeine_data/types/type.Map): Key-value mappings with reference semantics. - [type Nat](https://docs.logicaffeine.com/logicaffeine_data/types/type.Nat): Non-negative integers. Maps to Peano `Nat` in the kernel. - [type Real](https://docs.logicaffeine.com/logicaffeine_data/types/type.Real): IEEE 754 floating-point numbers. - [type Seq](https://docs.logicaffeine.com/logicaffeine_data/types/type.Seq): Ordered sequences with reference semantics. - [type Set](https://docs.logicaffeine.com/logicaffeine_data/types/type.Set) - [type Text](https://docs.logicaffeine.com/logicaffeine_data/types/type.Text): UTF-8 encoded text strings. - [type Tuple](https://docs.logicaffeine.com/logicaffeine_data/types/type.Tuple): Tuple type: Vec of heterogeneous Values (uses LogosIndex from indexing module) - [type Unit](https://docs.logicaffeine.com/logicaffeine_data/types/type.Unit): The unit type (single value). ## logicaffeine_data::wire Shared wire-codec core — the exact byte format of the peer/transport codec (`logicaffeine_compile::concurrency::marshal`), factored out so that TWO value models encode and decode through ONE definition: - [const CANONICAL_NAN_BITS](https://docs.logicaffeine.com/logicaffeine_data/wire/constant.CANONICAL_NAN_BITS): The bits every NaN is written as: the canonical quiet NaN. A NaN’s sign and payload differ by host (x86 arithmetic makes `0xFFF8…`, other hosts and WASM differ), and the wire is the one place a program can read a float’s bits, so every encoder writes a NaN as this and nothing else. - [const T_FALSE](https://docs.logicaffeine.com/logicaffeine_data/wire/constant.T_FALSE): Boolean `false`. - [const T_FLOAT](https://docs.logicaffeine.com/logicaffeine_data/wire/constant.T_FLOAT): An IEEE-754 double, 8 little-endian bytes. - [const T_INDUCTIVE](https://docs.logicaffeine.com/logicaffeine_data/wire/constant.T_INDUCTIVE): An inductive/enum value: `type_name` string, `constructor` string, varint arg count, args. - [const T_INT](https://docs.logicaffeine.com/logicaffeine_data/wire/constant.T_INT): A signed integer, zig-zag + LEB128 varint. - [const T_LIST](https://docs.logicaffeine.com/logicaffeine_data/wire/constant.T_LIST): A heterogeneous list: varint element count, then each element (tagged). - [const T_NOTHING](https://docs.logicaffeine.com/logicaffeine_data/wire/constant.T_NOTHING): `Nothing` / unit. - [const T_TEXT](https://docs.logicaffeine.com/logicaffeine_data/wire/constant.T_TEXT): A UTF-8 string: varint byte-length, then the bytes. - [const T_TRUE](https://docs.logicaffeine.com/logicaffeine_data/wire/constant.T_TRUE): Boolean `true`. - [trait WireDecode](https://docs.logicaffeine.com/logicaffeine_data/wire/trait.WireDecode): A value that reconstructs from the shared wire format. - [trait WireEncode](https://docs.logicaffeine.com/logicaffeine_data/wire/trait.WireEncode): A value that serializes into the shared wire format. - [fn canonical_f64](https://docs.logicaffeine.com/logicaffeine_data/wire/fn.canonical_f64): `x`, or the canonical NaN when `x` is a NaN. - [fn canonical_f64_bits](https://docs.logicaffeine.com/logicaffeine_data/wire/fn.canonical_f64_bits): The bits the wire carries for `x`: its own, or the canonical NaN’s. - [fn expect_tag](https://docs.logicaffeine.com/logicaffeine_data/wire/fn.expect_tag): Read the tag byte at `pos` and advance; `None` if it is not `expected`. - [fn put_f64](https://docs.logicaffeine.com/logicaffeine_data/wire/fn.put_f64): Append `x`’s wire bytes (little-endian, NaN canonical). - [fn put_f64s](https://docs.logicaffeine.com/logicaffeine_data/wire/fn.put_f64s): Append a float column’s wire bytes (little-endian, every NaN canonical) in one pass: each element is loaded, tested and stored once, the memory traffic of a copy. On an AVX2 host the pass runs four elements per instruction (an unordered compare and a blend). - [fn read_inductive_header](https://docs.logicaffeine.com/logicaffeine_data/wire/fn.read_inductive_header): Read an inductive header, returning `(type_name, constructor, nargs)`. The caller dispatches on `constructor` and reads `nargs` arguments via `WireDecode`. - [fn read_str](https://docs.logicaffeine.com/logicaffeine_data/wire/fn.read_str): Inverse of `write_str`; `None` on truncation or invalid UTF-8. - [fn read_uvarint](https://docs.logicaffeine.com/logicaffeine_data/wire/fn.read_uvarint): Inverse of `write_uvarint`; `None` on truncation or overlong (>64-bit) input. - [fn unzigzag](https://docs.logicaffeine.com/logicaffeine_data/wire/fn.unzigzag): Inverse of `zigzag`. - [fn write_inductive_header](https://docs.logicaffeine.com/logicaffeine_data/wire/fn.write_inductive_header): Write the header of an inductive value: `T_INDUCTIVE`, its `type_name`, its `constructor`, and the argument count. The args themselves follow, each written via `WireEncode`. - [fn write_str](https://docs.logicaffeine.com/logicaffeine_data/wire/fn.write_str): A length-prefixed UTF-8 string, UNtagged (used for inductive `type_name`/`constructor`). - [fn write_uvarint](https://docs.logicaffeine.com/logicaffeine_data/wire/fn.write_uvarint): LEB128 unsigned varint. - [fn zigzag](https://docs.logicaffeine.com/logicaffeine_data/wire/fn.zigzag): Map a signed integer onto an unsigned one so small magnitudes stay short.