r/programming • • 27m ago

Baking assets into an executable in my custom programming language

https://lightsout.afterthought.games/blog/2026-08-05-22-23

I've been developing my own low-budget version of the Jai programming language for a few years now. My game Lights Out is written using that compiler. Most of the assets for that game are baked into the executable for release builds.

The language supports running arbitrary code at compile time. This code can also load files from disk and process them. The return value from these functions that are executed at compile time are normal values, meaning you can assign them to variables (as they are treated as literals by the language).

This means you can share the code for loading assets at run-time in developer builds (e.g. for hot-loading) and baking assets into the executable at compile-time!

1 Upvotes

0 comments sorted by