With going unikernel with Haskell still being a little steep (but definitely on my wish list), then the next-best would be a mini VM/container image. And 5MB sure is mini!
Once again, thanks FPComplete!
My main reason for going with Haskell is that I know the costs of bugs, and feel that I get to old for fighting bugs on tight deadlines.
1: http://slides.com/technolo-g/intro-to-unikernels-and-erlang-...
There was a go web server I dockerized and came under 5MB [1]. But the thttpd image by larsks was an amazing 1MB [2].
I later adapted that for use in propellor too, when it's deploying docker/etc containers. This allows propellor to bootstrap itself to run inside an arbitrary docker container. http://joeyh.name/blog/entry/propelling_containers/
Later, I used propellor's ability to bootstrap itself this way to let it copy itself onto a VM and run there to replace its content with a clean reinstall of Debian. http://joeyh.name/blog/entry/clean_OS_reinstalls_with_propel...
The resulting image for "hello world" compressed with `xz` (default options) is 1.5MB. And it runs in a chroot or with qemu too.