官术网_书友最值得收藏!

The Standard Library

Rust's Standard Library, stdlib, contains all primitive types, basic modules, and macros. In fact, nearly all of this book talks about it, with Chapter 11, Exploring the Standard Library filling in some gaps.

It is the well-tested and minimal code that ensures portability to a wide diversity of platforms and on which is built the rest of the ecosystem.

Having installed Rust also means that you have a binary version of the Standard Library on your system. When you compile source code or do a cargo build, this stdlib is included; this explains why the executable file size is not that small (for example 129 KB for welcomec.exe on Windows).

Compile with rustc -C prefer-dynamic welcome.rs to get a small executable, like 10 KB for welcome.

主站蜘蛛池模板: 绍兴县| 怀柔区| 长乐市| 桦甸市| 二连浩特市| 黎平县| 合山市| 郴州市| 隆安县| 杭锦旗| 广宗县| 西宁市| 万源市| 临泉县| 徐州市| 遂溪县| 平远县| 文成县| 沙雅县| 峨眉山市| 海南省| 高邮市| 琼结县| 依兰县| 遂昌县| 云林县| 衡东县| 巴林左旗| 汕头市| 邯郸市| 明光市| 巴青县| 兰坪| 舒城县| 花垣县| 云南省| 明星| 图们市| 五指山市| 双鸭山市| 新邵县|