I have a DLL file that I want to copy to several locations on the computer.
I don't want this file sitting around in my folder like a potato, so I want the file placed directly into the executable and copy it from there instead.
I have a DLL file that I want to copy to several locations on the computer.
I don't want this file sitting around in my folder like a potato, so I want the file placed directly into the executable and copy it from there instead.
Short answer: You can but depending on use case it might not always be best way to get thing done.
include_bytes!
or include_str!
include_str!
macroinclude_bytes
Keep in mind that: If you are trying to enclose raw file which is large in size or you are including multiple files, it will brings all the drawbacks of having huge binary file. Instead you can include the code to download that file if it can be hosted. Even better, if you are distributing your package as application, you can back everything in AppImage or deb file. I believe windows and mac have something similar.