In 1.62.0 Mutex only needs 5 bytes for its internal state on Linux, though this may change in future versions. Rust's standard library now ships with a raw futex-based implementation of these locks on Linux, which is very lightweight and doesn't require extra allocation. This forced the standard library to allocate a Box behind the scenes for each new mutex for platforms that use pthreads. The mutex implementation, for example, is 40 bytes and cannot be moved. The pthreads locks support more features than the Rust APIs themselves do, including runtime configuration, and are designed to be used in languages with fewer static guarantees than Rust provides. Previously, Mutex, Condvar, and RwLock were backed by the pthreads library on Linux. More information is available in the RFC for this feature. For example, until now you would have to manually write a Default impl for this enum: #Īs of now only "unit" variants (variants that have no fields) are allowed to be marked #. ![]() You can now use # on enums if you specify a default variant. It can also be used to modify existing dependencies.Ĭargo add the cargo documentation for more. This command supports specifying features and versions. You can now add new dependencies directly from the command line using cargo add. Please report any bugs you might come across! What's in 1.62.0 stable cargo add The beta channel ( rustup default beta) or the nightly channel ( rustup default nightly). If you'd like to help us out by testing future releases, you might consider updating locally to use ![]() ![]() If you don't have it already, you can get rustupįrom the appropriate page on our website, and check out theĭetailed release notes for 1.62.0 on GitHub. If you have a previous version of Rust installed via rustup, you can get 1.62.0 with: rustup update stable Rust is a programming languageĮmpowering everyone to build reliable and efficient software. The Rust team is happy to announce a new version of Rust, 1.62.0.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |