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

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.

主站蜘蛛池模板: 永吉县| 赫章县| 桃园县| 封丘县| 武宣县| 香格里拉县| 平潭县| 宁津县| 江永县| 桐城市| 启东市| 阿荣旗| 桓仁| 龙陵县| 错那县| 广东省| 柯坪县| 武定县| 社旗县| 清水河县| 华池县| 长垣县| 吉木乃县| 丽江市| 和龙市| 新绛县| 会泽县| 芜湖县| 江北区| 阳城县| 临桂县| 绵阳市| 宁蒗| 南陵县| 汉寿县| 遵义县| 辉南县| 东阳市| 英德市| 八宿县| 米脂县|