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

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.

主站蜘蛛池模板: 陕西省| 金华市| 桂平市| 亚东县| 晋宁县| 青岛市| 吴旗县| 柘荣县| 安宁市| 准格尔旗| 钟祥市| 乐都县| 齐河县| 林芝县| 满洲里市| 南丰县| 延长县| 久治县| 逊克县| 兰考县| 互助| 明光市| 广州市| 博罗县| 黎城县| 濉溪县| 嵊泗县| 呈贡县| 揭西县| 赣州市| 锦州市| 大名县| 喀喇| 定州市| 冕宁县| 遂宁市| 兰考县| 广灵县| 保靖县| 哈尔滨市| 双辽市|