18 releases
| 0.2.3 | Dec 30, 2025 |
|---|---|
| 0.2.2 | Dec 28, 2025 |
| 0.2.0 | Mar 30, 2025 |
| 0.1.13 | Feb 22, 2025 |
| 0.1.7 | Jul 31, 2024 |
#289 in Procedural macros
9,056 downloads per month
Used in 9 crates
(5 directly)
12KB
75 lines
Compile-time URL validation
This crate provides a url! macro for compile-time URL validation.
Examples
// This compiles correctly
let valid = url!("https://www.rust-lang.org/");
// This triggers a compiler error
let invalid = url!("foo");
Installation
cargo add url-macro url
Gratitude
Like the project? ⭐ Star this repo on GitHub!
License
Apache-2.0 or MIT.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this crate by you, shall be licensed as above, without any additional terms or conditions.
Dependencies
~2–3MB
~51K SLoC