Isn't this exactly the mess Zig is trying to get out of here?
Every other example I've seen encodes the execution model in the source code.