Skip to content

Extend fixed-width byte codecs to all supported Wave integer widths #774

Description

@LunaStev

Motivation

Wave provides integer types beyond 64 bits, while fixed-width binary byte codecs stop at 64 bits. Users of 128–1024-bit protocol fields cannot use the same checked API family. Textual integer I/O in #726/#727 is a separate feature.

Starting points: std/bytes/endian.wave, std/bytes/read.wave, std/bytes/write.wave.

Scope

Extend BE/LE raw and checked binary codecs across every supported integer width. Preserve signed bit patterns and existing smaller-width APIs. Do not add new language types or arbitrary-precision allocation.

Difficulty: hard.

Completion criteria

  • Cover every supported width rather than completing only u128.
  • Test zero, signed minima/maxima, unsigned maxima and alternating bit patterns.
  • Verify unaligned access, bounds and output preservation.
  • Run native and WebAssembly O0/O2 round-trips.

Design decision needed: Agree on per-width versus generic public APIs and the signed/unsigned codec surface.

Please mention @LunaStev to discuss the design before starting implementation.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    cross-platformIssues related to making Wave work seamlessly across multiple operating systems.discussionIssues that require a technical or community discussion.enhancementA request for a new feature or improvement.help wantedThe issue requires extra attention or help from others.needs testingIssues that require additional testing or verification.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions