Why are Rust executables so huge?

后端 未结 6 1357
醉酒成梦
醉酒成梦 2020-11-30 17:34

Just having found Rust and having read the first two chapters of the documentation, I find the approach and the way they defined the language particularly interesting. So I

6条回答
  •  温柔的废话
    2020-11-30 18:19

    This is a feature, not a bug!

    You can specify the library versions (in the project's associated Cargo.toml file) used in the program (even the implicit ones) to ensure library version compatibility. This, on the other hand, requires that the specific library be statically linked to the executable, generating large run-time images.

    Hey, it's not 1978 any more - many people have more than 2 MB RAM in their computers :-)

提交回复
热议问题