Skip to content

Runtime Loading #1

@Shadorain

Description

@Shadorain

Summary

Add support for loading assets at runtime instead of just compile time (in the binary).

Idea

I believe this should be quite simple to implement once compile time loading is fully fleshed out.
I have an idea for some sub-attributes that would work for this and they would generate a function load()
that will handle the loading.

use asset_derive::Asset;

#[derive(Asset)]
#[asset(load = "static")] // <-- Default for this enum
enum Icon {
    Select,
    Folder,
    #[asset(load = "dynamic")] // <-- This Variant will not be loaded in at compile time, but will get a function to load in at runtime...
    FolderDim,
}

Conclusion

Still more to flesh out, but this sounds solid enough and shouldn't be too difficult to implement.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requesttodoFor future expansion

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions