swamp-abi-memtypes

Crates.ioswamp-abi-memtypes
lib.rsswamp-abi-memtypes
version0.0.1
created_at2025-09-05 11:37:42.289807+00
updated_at2025-09-05 11:37:42.289807+00
descriptionSwamp ABI MemTypes
homepage
repositoryhttps://github.com/swamp/abi
max_upload_size
id1825381
size9,069
Peter Bjorklund (piot)

documentation

README

swamp-abi-memtypes

Strongly-typed sizes, offsets, and alignments for Swamp’s ABI/layout code. Small, predictable, and focused on avoiding “bytes vs elements” mixups.

What it provides

  • MemoryAlignmentU8 | U16 | U32 | U64 (byte-based).
  • MemorySize(u32) — size in bytes (friendly Display via human_memsize).
  • MemoryOffset(u32) — byte offset (+HHHH hex Display).
  • Helpers: align, align_to, adjust_size_to_alignment.

Install

[dependencies]
swamp-abi-memtypes = "0.0.1"

License

This project is licensed under the MIT License - see the LICENSE file for details.

Copyright

Copyright (c) Peter Bjorklund. All rights reserved. https://github.com/swamp/abi

Commit count: 0

cargo fmt