bitbound

Crates.iobitbound
lib.rsbitbound
version0.1.1
created_at2025-07-16 10:30:38.761294+00
updated_at2025-07-21 09:52:38.738103+00
descriptionA Rust crate for safe, efficient array access with compile time boundary protection.
homepage
repositoryhttps://github.com/Guilucand/bitbound-rs
max_upload_size
id1755249
size25,144
(Guilucand)

documentation

README

bitbound-rs

A Rust crate for safe, efficient array access with compile time boundary protection.

Overview

bitbound-rs provides mechanisms for safe unchecked access and overread operations on arrays through two primary techniques:

  • Bit-bounded access: Ensures index safety by enforcing array bounds at the bit level. This works by either:

    • Limiting the number of bits in the index
    • Allowing controlled overflow handling
  • Bounded operations: Provides zero-cost abstractions for array access with compile-time safety guarantees

Features

  • Zero runtime overhead for bounds checking when possible
  • Safe array access patterns with configurable behavior
  • Support for overread operations with proper boundary handling
  • Const assertion utilities for compile-time checks

Usage

Add this to your Cargo.toml:

[dependencies]
bitbound = "0.1.0"

License

MIT or Apache-2.0

Commit count: 0

cargo fmt