Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow assets exported from libraries to be preloaded by the consumer #50

Open
ealmloff opened this issue Jul 31, 2024 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@ealmloff
Copy link
Member

Specific Demand

Libraries can't preload assets directly, but they could export an asset that could be preloaded by the final binary

Implement Suggestion

mod library {
    const ASSET: &Asset = manganis::mg!("image.png");
}

// You could preload the asset defined in the library in the final binary
const ASSET: &Asset = manganis::mg!(ASSET.preload());
@ealmloff ealmloff added the enhancement New feature or request label Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant