@@ -120,7 +120,7 @@ impl Asset {
#[doc(hidden)]
/// This should only be called from the macro
/// Create a new asset from the bundled form of the asset and the link section
- pub const fn new(bundled: fn() -> &'static [u8]) -> Self {
+ pub const fn new(bundled: extern "Rust" fn() -> &'static [u8]) -> Self {
Self { bundled }
}
@@ -120,9 +120,9 @@ impl ToTokens for AssetParser {
static __REFERENCE_TO_LINK_SECTION: &'static [u8] = &__LINK_SECTION;
- manganis::Asset::new(
- || __REFERENCE_TO_LINK_SECTION
- )
+
+ manganis::Asset::new(|| unsafe { std::ptr::read_volatile(&__REFERENCE_TO_LINK_SECTION) })
})