Attaching an Icon Resource to a Rust Application
How do I add an icon resource to a Rust app? I've seen it done in C, but I don't understand how it works in Rust. It will be on Windows. I know Linux and OS X work differently. If anyone has any advice on this for OS X that would be great too.
+3
Chris root
source
to share
1 answer
Rust has no idea about icon files for windows, so you'll do it the same way as in C, albeit through the Rust External Function Interface (FFI). There are FFI wrappers for the windows API, winapi in particular .
Here's an example showing how to link an icon to an executable (via an .rc file).
+5
Jorge Israel Peña
source
to share