I think it is Firefly's approach (https://github.com/GetFirefly/firefly). They put a lot of work into it, but never made it fully functional, and it's not maintained anymore. So I agree that you get smaller binaries this way, but I believe we can get to acceptable sizes too, without creating and maintaining a custom compiler.
Cool thing would be to somehow wire it up to liveview to make it possible to run some parts on the frontend side transparently.
I'm not doing any active development on it right now, but it looked pretty doable when I tried last time.