Back
Rust 1.99.1 fixes regressions in wcslen linking, FFI bool returns and rust-lld on macOS
SiTech AI Team2 min read

Rust 1.99.1 fixes regressions in wcslen linking, FFI bool returns and rust-lld on macOS

Rust 1.99.1 is a point release that fixes three regressions: a missing wcslen fallback, miscompiled FFI bool returns on x86_64, and rust-lld failing to load libLLVM on macOS when the compiler was invoked without the rustup proxy.

What Rust 1.99.1 fixes

The Rust team has published Rust 1.99.1 as a new point release. The release addresses three regressions reported from prior releases, including problems that affected UEFI targets, x86_64 FFI code, and macOS linking setups.

For some Rust targets, projects could hit link errors for a missing wcslen symbol. The function is now present in Rust's compiler-builtins library as a fallback. The issue appeared because the LLVM loop-idiom-wcslen pass can introduce calls to wcslen as an optimization, and some targets did not have the function available in libc or elsewhere. In particular, UEFI targets were broken for any project using std, because some of these calls were introduced in the precompiled standard library, while similar user code patterns could also reproduce the problem.

Return values and linker loading

Rust functions returning bool through FFI could leave bits 1-7 of the return register unspecified, which meant callers could observe raw values other than 0 or 1. The return type is now marked for zero-extension again, as required by the ABI.

Separately, rust-lld could fail to run on macOS when the compiler was invoked without the rustup proxy, because there was no direct setting for the appropriate library search path. Rust 1.99.1 now builds rust-lld with an rpath entry for the directory containing libLLVM.dylib.

How to update and test

Users who installed a previous version through rustup can move to 1.99.1 with rustup update stable. Users who do not have rustup can get it from the appropriate page on the Rust website. The Rust Release Team also invited people to test future releases by using the beta and nightly channels locally and in CI, and to report any bugs found. The team credited the many people who contributed to 1.99.1 and said the release would not have been possible without them.

Sources: Lobsters

SSiTech

SiTech — AI-powered web development

We build fast, modern websites and bring AI into real business workflows. Have a project or a question? We'd love to help.