Expand description
§avila-atom
Atomic Computational Structures - Fundamental Data Structures
This library implements core data structures built from first principles, providing type-safe primitives for systems programming with zero-compromise performance characteristics.
§Available Structures
Option<T>- Optional value (presence/absence) - zero-cost abstractionResult<T, E>- Result type (success/failure) - enum-based sum typeDynamicArray<T>- Contiguous growable array with amortized O(1) pushAssociativeArray<K, V>- Hash-based or tree-based key-value storeStringBuffer- UTF-8 encoded string with growable capacity
§Philosophy
These structures are atomic computational primitives - stable elements that compose infinitely to build complex software systems.
§Performance Characteristics
- Zero-cost abstractions: No runtime overhead vs manual implementation
- Memory locality: Contiguous allocation for cache efficiency
- Compile-time optimization: Monomorphization enables aggressive inlining
- Stack-preferred: Structures optimize for stack allocation when possible
§no_std Compatibility
All structures work in no_std environments with alloc feature:
AssociativeArrayfalls back to B-Tree (O(log n)) instead of HashMap (O(1))- Memory allocation via global allocator trait
- Zero dependency on operating system primitives
Modules§
- fixed
- Specialized array types with compile-time known sizes
- iter
- Iterator utilities and extensions
- sizes
- Compile-time size constants for common types
Macros§
- array
- Macro for creating fixed-size arrays with type inference
- list
- Macro for convenient vector initialization
- map
- Macro for convenient map initialization with capacity hint
- static_
assert_ size - Macro for compile-time size assertions
Enums§
- Option
- Optional value type - represents presence or absence of a value
- Result
- Result type - represents success (Ok) or failure (Err)
Constants§
- VERSION
- Library version constant
Type Aliases§
- Associative
Array - Hash map (std) or B-Tree map (no_std) for key-value storage
- Dynamic
Array - Dynamic array with contiguous memory layout
- String
Buffer - UTF-8 encoded string buffer