#macro #base64 #compile-time #encoded-string #percent-encoding #data-url

macro data-url-encode-macro-impl

Rust macro to generate base64+percent-encoded strings suitable for data URLs in compile time

2 stable releases

1.0.1 Feb 3, 2020
1.0.0 Feb 2, 2020

#5 in #data-url


Used in data-url-encode-macro

MIT license

3KB

data-url-encode-macro

Rust macro to generate base64+percent-encoded strings suitable for data URLs in compile time.

Example

use data_url_encode_macro::data_url_encode;

const HTML: &str = data_url_encode!("<h1>Hello, World!</h1>");

Dependencies

~2MB
~41K SLoC