proofs.rs

FixedInt overview and methods disagree about endianness

FixedInt overview and methods disagree about endianness

Found in Report #10 v1 · Updated 2026-10-28 13:59 UTC

Description

The FixedInt overview says the emitted bytes use machine endianness. The same trait's method descriptions describe little-endian encoding and decoding, including conversion on big-endian machines. These statements disagree on a big-endian host.

The built-in implementations use to_le_bytes and from_le_bytes. On Rust 1.91.1, macOS arm64, with default features, the output was also little-endian. This host observation does not establish behavior on every host.

Please make the overview and method descriptions consistent about the intended byte order. This is a documentation contradiction in integer-encoding 4.1.0; later upstream revisions have not been checked.

Change history
  1. v1 · created · 2026-10-28 13:59 UTC
    {
      "title": "FixedInt overview and methods disagree about endianness",
      "body": "## Description\n\nThe [FixedInt overview](https://github.com/dermesser/integer-encoding-rs/blob/e0a10d01e86a38d0df177676c62f9a10c845ab53/src/fixed.rs#L4-L9) says the emitted bytes use machine endianness. The same trait's [method descriptions](https://github.com/dermesser/integer-encoding-rs/blob/e0a10d01e86a38d0df177676c62f9a10c845ab53/src/fixed.rs#L13-L32) describe little-endian encoding and decoding, including conversion on big-endian machines. These statements disagree on a big-endian host.\n\nThe [built-in implementations](https://github.com/dermesser/integer-encoding-rs/blob/e0a10d01e86a38d0df177676c62f9a10c845ab53/src/fixed.rs#L39-L64) use `to_le_bytes` and `from_le_bytes`. On Rust 1.91.1, macOS arm64, with default features, the output was also little-endian. This host observation does not establish behavior on every host.\n\nPlease make the overview and method descriptions consistent about the intended byte order. This is a documentation contradiction in integer-encoding 4.1.0; later upstream revisions have not been checked.",
      "validity": "reported",
      "upstream_status": "not_reported"
    }

Read and join the discussion on the report →