Remix.run Logo
JonChesterfield 4 days ago

It takes a tiny bit of lateral thinking in C.

What if "build" hacked all the source into a single text file, instead of hacking it all into a single archive of object files?

Roughly, write static in front of most functions, don't reuse names between source files, cat them together in some viable order.

Now you can do whatever crazy codegen nonsense you want in the build and the users won't have to deal with it. The sqlite amalgamation build is surprising, using the result is trivial.