fuzion icon indicating copy to clipboard operation
fuzion copied to clipboard

bundling resource files at compile time

Open michaellilltokiwa opened this issue 1 year ago • 1 comments

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?

michaellilltokiwa avatar Apr 15 '24 09:04 michaellilltokiwa

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.

fridis avatar Apr 15 '24 10:04 fridis