Worth mentioning that Quake 3 used C as a scripting language back in 1999. The engine used a modified LCC compiler [1] to generate byte code for execution in its own virtual machine. The same could be achieved today by embedding a WASM VM and compiling your C/Zig/Rust whatever to web assembly.

As an aside, I find the idea of writing game code in unmanaged C++ perplexing. Even the original Quake, which targeted DOS-era hardware, relied on a scripting language running in a plain vanilla interpreter (no JIT here). In the [current year] I would think advances in computing power, parallelism, and JIT technology would be more than adequate to accommodate an interpreted scripting language.

[1] https://en.wikipedia.org/wiki/LCC_(compiler)#Projects_incorp...

>As an aside, I find the idea of writing game code in unmanaged C++ perplexing.

https://github.com/id-Software/DOOM-3