Crate tanager

Crate tanager 

Source
Expand description

§tanager

Embed files into your Rust projects with base64.

§about

tanager is a simple proc-macro that allows you to embed files into your Rust source code, similarly to include_str!. However, unlike include_str!, tanager first encodes the file into a base64 string.

This crate also takes advantage of the recently stablized [Span::local_file] to provide a path lookup exactly like the compiler intrinsic include_str!.

§getting started

To start using tanager, you’ll first need to add our package to your Cargo.toml manifest:

cargo add tanager

Then you can embed a base64 string of a file directly into your source code.

const CARGO: &'static str = tanager::include!("../Cargo.toml");

Macros§

include