All a bit less relevant now since recent C++ versions have this built in by default. Generally something languages have been IMO too slow on (e.g. Go picked this up four or so years ago, after a bunch of less nice home-grown alternatives), it's actually just really useful to make things work in the real world, especially for languages that you can distribute as single-file binaries (which IMO should be all of them, but sadly it's not always).
it might be a bit 'arcane' way to do it idk... but to me it always seemed the logical way.. u can also define symbols etc around it and use extern in ur c/cpp program to reference those.to access the data in light of dynamic linking / alsr etc.
here is some resource on it with some examples: https://wiki.osdev.org/Linker_Scripts
u can include any file. another executable, images, etc. etc. no need for weird stuff in the c sources?
on the flipside, is there a benefit of doing it inside the source code?? (apart from not having to roll ur own linker script and learn that dragon?)
``` inline constexpr auto bootstrap = #include "bootstrap.lua" ;
// ... later
lua.script(bootstrap, "@bootstrap"); ```
The lua code ``` R"( -- your code here )"; ```
Regardless all of the methods suggested are terrible. If you don't have access to #embed, just write a trivial python script.