Yes. You need some syscalls and unsafe, but it's possible.
wazero does this, on amd64 and arm64: https://github.com/wazero/wazero
You can read more about the approach - from the creator - here: https://mathetake.github.io/posts/runtime-code-generation-in...
Okay wow. I could not have gotten a better reply. This one feels like an early Christmas gift, my sincere thanks!