Support for C-string literals makes it easier to write code that interoperates with foreign language interfaces requiring null-terminated strings. Credit: cortixxx Rust 1.77, the latest version of the Mozilla Research-founded programming language focused on safety, speed, and concurrency, adds support for C-string literals. C-string literals in Rust expand to a null-byte terminated string in memory of type & ‘static CStr. This makes it easier to write code that will interoperate with foreign language interfaces that require null-terminated strings. All relevant error-checking, such as for a missing interior null byte, is performed at compile time. Announced March 21, Rust 1.77 can be installed using rustup: $ rustup update stable Another improvement in Rust 1.77 is support for recursion in async fn. Async functions previously could not call themselves due to a compiler limitation, but Rust 1.77 lifts that limitation. Recursive calls now are permitted as long as they use a form of indirection to avoid an infinite size for the state of the function. Also in Rust 1.77, the offsetof! macro for struct fields has been stabilized. This provides access to the byte offset of the relevant public field of a struct. This macro can be most useful when the offset of a field is needed without an existing instance of a type, the Rust team said. Additionally, Cargo package manager profiles in Rust 1.77 that do not enable debuginfo in outputs will enable strip = "debugiinfo" by default. This is mostly needed because the precompiled standard library ships with debuginfo, meaning that statically linked results would include the debuginfo from the standard library even if the local compilation did not explicitly request debuginfo. Finally, Clippy in Rust 1.77 adds a new lint, incompatible_msrv, which will tell users if functionality being referenced is only available on newer versions than the declared minimum supported Rust version. Rust 1.77 follows last month’s release of Rust 1.76, which featured ABI compatibility updates. Related content analysis Beyond the usual suspects: 5 fresh data science tools to try today The mid-month report includes quick tips for easier Python installation, a new VS Code-like IDE just for Python and R users, and five newer data science tools you won't want to miss. By Serdar Yegulalp Jul 12, 2024 2 mins Python Programming Languages Software Development analysis Generative AI won’t fix cloud migration You’ve probably heard how generative AI will solve all cloud migration problems. It’s not that simple. Generative AI could actually make it harder and more costly. By David Linthicum Jul 12, 2024 5 mins Generative AI Artificial Intelligence Cloud Computing news HR professionals trust AI recommendations HireVue survey finds 73% of HR professionals trust AI to make candidate recommendations, while 75% of workers are opposed to AI making hiring decisions. By Paul Krill Jul 11, 2024 3 mins Technology Industry Careers how-to Safety off: Programming in Rust with `unsafe` What does it mean to write unsafe code in Rust, and what can you do (and not do) with the 'unsafe' keyword? The facts may surprise you. By Serdar Yegulalp Jul 11, 2024 8 mins Rust Programming Languages Software Development Resources Videos