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

Summary

Rust is a multi-paradigm language with exceptional concepts: the language emphasizes data and behavior separation with structures and traits, uses macros for metaprogramming, and leverages explicit ownership of memory to determine variable lifetimes. Knowing these lifetimes removes the need for runtime garbage collection and, at the same time, greatly facilitates concurrency by allowing mutable borrowing only in certain circumstances.

Consequently, threads and other asynchronous processes can change variables only when they have mutable ownership of them, something that is mostly enforced at compile time, but can also be done at runtime! Therefore, safe Rust is effectively free of data races.

Another strong point of the Rust ecosystem is its diverse and welcoming community. Sponsored by Mozilla, development is guided by RFCs, events are organized and centrally advertised, and learning resources are available online. Another way to be a part of the ecosystem is to contribute packages to crates.io (https://crates.io/), Rust's public package repository. Read the next chapter to find out more about cargo, Rust's universal tool to build and package.

主站蜘蛛池模板: 吴川市| 独山县| 嘉峪关市| 濮阳市| 吉木乃县| 葫芦岛市| 缙云县| 柏乡县| 江阴市| 涡阳县| 文成县| 政和县| 古田县| 正镶白旗| 合水县| 宾阳县| 乳山市| 永泰县| 陵水| 库车县| 绥宁县| 兴隆县| 鄂州市| 方正县| 得荣县| 集安市| 康定县| 且末县| 乌拉特前旗| 石河子市| 龙游县| 隆昌县| 星座| 邓州市| 尼木县| 卢龙县| 温州市| 台中县| 铜山县| 海伦市| 衢州市|