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 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