Support concat! and other macros in asset path (#3809)

This commit is contained in:
David Tolnay authored and GitHub committed 2025-03-03 12:55:59 -06:00
1 parent 062ea02e07
commit 9361c3ecd9
6 files changed
+154 -117

No files matched your search

@@ -19,6 +19,11 @@ use linker::generate_link_section;
/// # use manganis::{asset, Asset};
/// const _: Asset = asset!("/assets/asset.txt");
/// ```
/// Macros like `concat!` and `env!` are supported in the asset path.
/// ```rust
/// # use manganis::{asset, Asset};
/// const _: Asset = asset!(concat!("/assets/", env!("CARGO_CRATE_NAME"), ".dat"));
/// ```
///
/// # Images
///