fuzion
fuzion copied to clipboard
bundling resource files at compile time
A lot of programming languages can do this.
- https://learn.microsoft.com/en-us/dotnet/core/extensions/create-resource-files
- https://pkg.go.dev/embed
- https://doc.rust-lang.org/std/macro.include_bytes.html
Do we want this / need this?
Yes, we will need this. Java's Class.getResourceAsStream() is another example. Would be good to get inspiration from other languages what API would be best for this.
The way resources are implelemented should depend on the backend in use and its capabilities: With C, it would be great to be able to mmap a data section from the object file into memory and lazily load only those pages that are accessed, while the JVM backend should use Java resources that probably need to be unpacked fully when accessed.