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

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.

主站蜘蛛池模板: 鹤山市| 曲周县| 江西省| 女性| 云和县| 鹤峰县| 独山县| 湘西| 临汾市| 长泰县| 安仁县| 巴塘县| 澎湖县| 仙桃市| 灌阳县| 重庆市| 拉孜县| 永仁县| 荣昌县| 长海县| 太谷县| 沙湾县| 庆阳市| 泸溪县| 河曲县| 开江县| 弋阳县| 东莞市| 呼和浩特市| 安新县| 米脂县| 分宜县| 巴楚县| 南康市| 上林县| 平凉市| 益阳市| 霍城县| 慈利县| 南江县| 宜兰市|