Expand description
§noir_macros_core
A robust implementation of thread-safe static initialization and utility macros for no_std environments. This crate provides essential building blocks for systems programming, focusing on safety and zero-cost abstractions.
§Key Features
§Thread-Safe Static Initialization
§Memory Safety and Optimization
§Safe Abstractions
§Performance Considerations
- Zero-cost abstractions where possible
- Careful choice of atomic operations
- Proper alignment for hardware efficiency
- Compile-time evaluation when feasible
§Contributing
We welcome contributions! Please feel free to submit a Pull Request.
§License
noir_macros_core is distributed under the MIT License.
Macros§
- array
- Creates a fixed-size array with the given elements.
- bitflags
- A macro for defining bit flags in a type-safe way.
- const_
assert_ align - Verifies the alignment of a type at compile time.
- const_
assert_ size - Verifies the size of a type at compile time.
- const_
str - Creates a compile-time string literal.
- debug
- A macro for debug formatting in no_std environments.
- format
- A macro for formatting text in a no_std environment.
- Prints formatted text to the standard output.
- println
- Prints formatted text to the standard output, with a newline.
- static_
cell - Creates a new static cell with the specified name and type.
- type_
check - Performs compile-time type checks and assertions.
- vec
- Creates a new vector with the given elements.
Structs§
- Static
Cell - A thread-safe static initialization cell.
Constants§
- DEFAULT_
BUFFER_ SIZE - The default size for new buffers.
- MAX_
BUFFER_ SIZE - The maximum allowed buffer size.