Stabilization of the Error trait in Rust core allows the usage of the trait in #![no_std] libraries. Sort algorithms also were improved in the latest Rust release. Credit: AL-art/Shutterstock Rust 1.81 is now available, with the newest version of the memory-safe language, featuring a stabilization of the Error trait in the Rust core library. Rust 1.81 was released September 5. Developers with a previous version of Rust installed via rustup can upgrade using the rustup update stable command. Developers can install rustup from the rust-lang.org. With Rust 1.81, the Error trait is stabilized in core, allowing usage of the trait in #![no_std] libraries. Error is a trait representing the basic expectations for error values. The stabilization primarily enables the wider Rust ecosystem to standardize on the same Error trait, regardless of the environments targeted by the library. The no_std attribute allows developers to build Rust applications without using the Rust standard library (std). Rust 1.81 also features new and improved sort implementations. Both the stable and the unstable sort implementations in the standard library have been updated to new algorithms that improve compilation time and runtime performance. The new sort algorithms try to detect incorrect implementations of Ord that prevent these from being able to produce a meaningfully sorted result and will panic on these cases rather than returning randomly arranged data. Users dealing with these panics should audit ordering implementations to ensure they satisfy the requirements documented in PartialOrd and Ord. Rust 1.81 also stabilizes a new lint level, expect, which allows explicitly noting that a particular lint should occur and warning if it does not. The intended use case is temporarily silencing a lint, whether due to bugs or ongoing refactoring, while wanting to know when the lint is no longer necessary. Also in Rust 1.81: Developers will be informed directly in the compiler message if a lint level is changed for some reason. APIs have been stabilized such as core::error, fs:exists, IoSlice::advance, and PanicHookInfo. Usage of the wasm32-wasi target, which targets WASI 1.0, now will issue a compiler warning and request users switch to the wasm32-wasip1 target instead. Std::process::Command now correctly escapes arguments when invoking batch files on Windows in the presence of trailing whitespaces or periods. Rust 1.81 follows Rust 1.80, released January 25, which introduced lazy types to delay initialization of data until first access. Related content feature 14 great preprocessors for developers who love to code Sometimes it seems like the rules of programming are designed to make coding a chore. Here are 14 ways preprocessors can help make software development fun again. By Peter Wayner Nov 18, 2024 10 mins Development Tools Software Development feature Designing the APIs that accidentally power businesses Well-designed APIs, even those often-neglected internal APIs, make developers more productive and businesses more agile. By Jean Yang Nov 18, 2024 6 mins APIs Software Development news Spin 3.0 supports polyglot development using Wasm components Fermyon’s open source framework for building server-side WebAssembly apps allows developers to compose apps from components created with different languages. By Paul Krill Nov 18, 2024 2 mins Microservices Serverless Computing Development Libraries and Frameworks news Go language evolving for future hardware, AI workloads The Go team is working to adapt Go to large multicore systems, the latest hardware instructions, and the needs of developers of large-scale AI systems. By Paul Krill Nov 15, 2024 3 mins Google Go Generative AI Programming Languages Resources Videos