I was trying to write something like this in rust at some point, just for the joke that you can compile that rust to wasm, and then it can compile itself to JVM assembly. The complexity of it turned out to be quite a bit too high for a joke only.