hex-macro
hex-macro is a Rust crate that provides a hex! macro for compile-time hex decoding.
use hex;
pub const DATA: = hex!; // Also works without the '0x' prefix
assert_eq!;
Features
- Decodes hex strings into byte arrays at compile time.
- Supports hex strings with and without the
0xprefix.
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
TODO
- Add support for other decoding backends using feature flags
License
This project is licensed under the MIT License.
Contributing
Contributions are welcome! Please open an issue or submit a pull request on GitHub.