I am not much concerned with hyper optimizations, but I was curious how OCaml would fair with the initial, simple steps, before things get crazy. But I opted for a more complex program:
(\* t.ml \*)
let () = print_endline "Hello, World!"
Then just doing a standard compilation and a strip: $ ocamlopt -o t t.ml && ls -l -h t | cut -d " " -f5
1.5M
$ strip t && ls -l -h t | cut -d " " -f5
356K
$ ./t
Hello, World!
I may be overlooking something, and would be interested to learn what if so, but I was surprised we got a result smaller than the rust binary in the first instance.