Skip to content

tpt-solutions/tpt-zero-bytes

tpt-zero-bytes

The foundational layer: pure core, zero allocation, maximum speed.

23 independent, #![no_std], zero-heap-allocation, zero-external-dependency crates for byte-level encoding, integrity checking, hashing, bit manipulation, and simple identifier/network types — for bare-metal embedded systems, bootloaders, and strict WASM environments where alloc isn't available and every CPU cycle matters.

Every crate here is independently cargo add-able: pulling in CRC32 support never drags in the hashing crates, the UUID crate, or anything else. No crate in this workspace depends on another.

Crates

Crate Purpose
tpt-zero-base64 Standard and URL-safe Base64 encoding/decoding using lookup tables
tpt-zero-hex Blazing-fast, zero-allocation hexadecimal encoding and decoding
tpt-zero-endian Zero-cost, const-evaluable byte-order (endianness) conversion
tpt-zero-varint Variable-length integer (LEB128) encoding for compact payloads
tpt-zero-crc CRC8, CRC16, and CRC32 calculations for data integrity
tpt-zero-checksum Adler-32 and Fletcher checksums
tpt-zero-fnv FNV-1a hashing, optimized for no_std hash maps
tpt-zero-siphash SipHash-1-3 and SipHash-2-4 for HashDoS resistance
tpt-zero-murmur MurmurHash3 for general non-cryptographic hashing
tpt-zero-xxhash Pure Rust XXH32/XXH64 implementation
tpt-zero-cobs Consistent Overhead Byte Stuffing for reliable embedded serial comms
tpt-zero-bitset Fixed-size, highly optimized bit arrays for state tracking
tpt-zero-bitfield Compile-time or runtime safe bitfield accessors
tpt-zero-bytes Safe byte slice manipulation utilities (split, copy, compare, find)
tpt-zero-mem Safe, no_std memory utilities including secure (non-elidable) zeroing
tpt-zero-uuid UUID generation and parsing via pure math
tpt-zero-bloom Fixed-size Bloom filter for probabilistic set membership
tpt-zero-mac MAC address parsing and formatting
tpt-zero-ip IPv4/IPv6 address parsing and manipulation, pure core
tpt-zero-compact Compact integer encoding for network payloads (SCALE-style)
tpt-zero-base85 Z85 (ZeroMQ RFC 32) Base85 encoding/decoding into caller buffers
tpt-zero-cidr Pure-core IPv4/IPv6 CIDR and subnet arithmetic (no std::net)
tpt-zero-checkdigit Luhn, ISBN-10/13/EAN/UPC-A, ISO 7064 MOD 11-2/37-2 check digits

Design

  • #![no_std], no alloc. Every crate builds against core alone — verified in CI by cross-compiling to thumbv6m-none-eabi (bare Cortex-M0, no std, no allocator) and wasm32-unknown-unknown.
  • Zero external dependencies. [workspace.dependencies] is intentionally empty. dev-dependencies (proptest, criterion) exist only for tests and benchmarks — they never ship in a published crate.
  • No cross-crate dependencies. Each crate is a standalone leaf; adopt one without pulling in the rest of the ecosystem.
  • #![forbid(unsafe_code)] in every crate except tpt-zero-mem, which needs one documented unsafe block for a volatile zeroing write that the optimizer cannot elide.

See spec.txt for the full ecosystem design doc and TODO.md for the phased implementation roadmap.

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.

About

Zero-dependency, zero-heap-allocation no_std Rust crates for encoding (base64/hex/varint/endian), integrity checking (CRC/checksums), hashing (FNV/SipHash/xxHash/Murmur), bit manipulation (bitset/bitfield/bloom), and identifiers (UUID/MAC/IP/CIDR).

Resources

License

Unknown, MIT licenses found

Licenses found

Unknown
LICENSE-APACHE
MIT
LICENSE-MIT

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages