Function manganis::file

source ·
pub const fn file(path: &'static str) -> ImageAssetBuilder
Expand description

Create an file asset from the local path or url to the file

Note: This will do nothing outside of the mg! macro

The file builder collects an arbitrary file. Relative paths are resolved relative to the package root

const _: &str = manganis::mg!(file("./src/asset.txt"));

Or you can use URLs to read the asset at build time from a remote location

const _: &str = manganis::mg!(file("https://rustacean.net/assets/rustacean-flat-happy.png"));