Win32 resources are much more than that. They have names and type information associated with them, and they can be multilingual (see e.g. [0]). A rich runtime API is provided to dynamically find and load resources from executables/libraries. You can distribute a resource library that other programs can statically link in or dynamically load. Basically, it’s an ABI for resources, including localization support and a schema for UI-related resource types.
This feature of Go tool chain is so underrated. Yes, there is nothing magical here. I can achieve similar outcome with some custom preprocessing, but having it built into the ecosystem, with type checking and inferencing, single binary compilation, etc. is a great productivity booster.
You can use `objcopy`, `as`, or `ld`. There are several ways, some of which even allow setting the symbol size (which most people never care about, but sometimes matters for nerds introspecting your object files).
Yeah but the original post was talking about "Linux" which doesn't really have any use for that on the kernel level. I also doubt Freedesktop are going to specify special ELF sections or something for icons.
18 comments
[ 3.3 ms ] story [ 55.3 ms ] threadhttps://docs.gtk.org/gio/struct.Resource.html
I was wrong on C++ side, apparently it is on track for C++26.
[0] https://learn.microsoft.com/en-us/windows/win32/api/winbase/...
> I also doubt Freedesktop are going to specify special ELF sections or something for icons
They should. It would stop my icons from disappearing / changing on me while Iam not looking.