Why do Rust programs use so much more memory than the C, Haskell and OCaml versions?

Because the standard library is statically linked.

You can overcome this by compiling with the -C prefer-dynamic option.

As to the reason behind having the standard library statically linked: it increases executable portability (ie: no need for the standard library to be installed in target system).

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)