rust-embed-url
A Rust procedural macro for embedding URL content at compile time with SHA-256 hash verification.
Features
- Compile-time fetching: Download URL content during compilation
- Integrity verification: SHA-256 checksum validation ensures content hasn't changed
- Type-safe: Returns
Box<[u8]>for easy integration - Clear errors: Descriptive compile-time error messages on failure
Installation
Add this to your Cargo.toml:
[]
= "0.1.0"
Usage
Basic Example
use embed_url;
Example Project
See the example/ directory for a working demonstration.
License
MIT