[Rust] 1.91.0 업데이트 발표 (번역)
https://blog.rust-lang.org/2025/10/30/Rust-1.91.0/
러스트는 누구든 믿음직하고 효과적인 소프트웨어를 만들 수 있게 도와주는 끝내주는 언어입니다.
만약 rustup을 통해서 Rust의 이전버전을 설치해놓은 상대라면, 업데이트는 아주 쉽습니다. 그냥 이렇게 치면 돼요.
rustup update stable
rustup을 설치한 적이 없다면, 우리 웹사이트의 설치 페이지에서 받을 수 있습니다. 그리고 깃허브에서 이번 버전에 대한 릴리즈 노트를 참조해보세요.
미래의 릴리즈를 테스트해서 러스트 팀을 돕고 싶다면, 로컬에서 베타 채널(rustup default beta) 또는 nightly 채널(rustup default nightly)로 업데이트하는 것을 고려할 수 있습니다.
버그를 발견했다면 리포트해주세요!
1.91.0 stable에는 무엇이 있나요?
aarch64-pc-windows-msvc는 이제 1티어 플랫폼입니다
Rust 컴파일러는 넓은 범위의 타겟을 지원하지만, 컴파일러 팀이 모든 타겟에게 동등한 수준의 지원을 제공할 수는 없습니다.
각각의 타겟이 지원되는 정도를 표시하는 것을 우리는 tiering 시스템이라고 합니다.
티어 3 타겟들은 기술적으로 컴파일러 팀이 지원을 해주긴 하지만, 코드가 빌드되거나 테스트에서 통과되는지를 확인하지 않습니다. 그리고 미리 컴파일된 바이너리를 릴리즈로 제공하지도 않습니다.
티어 2 타겟들은 빌드가 되는 것을 보장해주고, 미리 컴파일된 바이너리를 제공합니다.
하지만 각각의 플랫폼에서 테스트를 실행해보진 않습니다. 그래서 버그가 존재할 수도 있어요.
티어 1 타겟은 가장 높은 수준의 지원 보장입니다.
컴파일러에 변경사항이 merge될때마다 해당 플랫폼에 대한 테스트를 전부 실행합니다.
미리 컴파일된 바이너리도 당연히 제공합니다.
Rust 1.91.0은 aarch64-pc-windows-msvc target을 Tier 1 지원으로 올립니다.
따라서 이제 Windows에서 64비트 arm을 사용하는 유저들에게 가장 높은 보장을 제공합니다.
로컬변수로 dangling raw 포인터를 만드는 경우의 린트를 추가
Rust의 borrow check는 반환값으로 참조가 dangling되는 것을 막지만, raw 포인터까지 추적해주진 않습니다.
이번 릴리즈에서는 함수의 반환값에서 지역변수의 raw 포인터가 있는지를 검사하는 린트가 추가됩니다.
예를 들어, 이런 코드가 있다고 해보죠.
fn f() -> const u8 {
** let x = 0;*
** &x**
}
이건 이제 lint 경고를 던질 겁니다.
warning: a dangling pointer will be produced because the local variable x will be dropped
** --> src/lib.rs:3:5**
** |**
1 | fn f() -> const u8 {
** | --------- return type of the function is *const u8*
2 | let x = 0;
** | - x is part the function and will be dropped at the end of the function**
3 | &x
** | ^^**
** |**
** = note: pointers do not have a lifetime; after returning, the u8 will be deallocated**
** at the end of the function because nothing is referencing it as far as the type system is**
** concerned**
** = note: #[warn(dangling_pointers_from_locals)] on by default**
위의 코드는 위험한 연산을 수행하지는 않기 때문에, unsafe는 아닙니다. 함수에서 반환된 raw 포인터를 역참조하는 것이 unsafe한 거죠.
향후 릴리즈에서는 raw 포인터, unsafe 코드와 safe한 상호작용을 할 수 있게 도와줄 기능들을 더 추가할 것 같습니다.
Stable이 된 API
Path::file_prefix
AtomicPtr::fetch_ptr_add
AtomicPtr::fetch_ptr_sub
AtomicPtr::fetch_byte_add
AtomicPtr::fetch_byte_sub
AtomicPtr::fetch_or
AtomicPtr::fetch_and
AtomicPtr::fetch_xor
{integer}::strict_add
{integer}::strict_sub
{integer}::strict_mul
{integer}::strict_div
{integer}::strict_div_euclid
{integer}::strict_rem
{integer}::strict_rem_euclid
{integer}::strict_neg
{integer}::strict_shl
{integer}::strict_shr
{integer}::strict_pow
i{N}::strict_add_unsigned
i{N}::strict_sub_unsigned
i{N}::strict_abs
u{N}::strict_add_signed
u{N}::strict_sub_signed
PanicHookInfo::payload_as_str
core::iter::chain
u{N}::checked_signed_diff
core::array::repeat
PathBuf::add_extension
PathBuf::with_added_extension
Duration::from_mins
Duration::from_hours
impl PartialEq
impl PartialEq
impl PartialEq
impl PartialEq
impl PartialEq
impl PartialEq
impl PartialEq
impl PartialEq
Ipv4Addr::from_octets
Ipv6Addr::from_octets
Ipv6Addr::from_segments
impl
impl
impl
Cell::as_array_of_cells
u{N}::carrying_add
u{N}::borrowing_sub
u{N}::carrying_mul
u{N}::carrying_mul_add
BTreeMap::extract_if
BTreeSet::extract_if
impl Debug for windows::ffi::EncodeWide<'_>
str::ceil_char_boundary
str::floor_char_boundary
impl Sum for Saturating<u{N}>
impl Sum<&Self> for Saturating<u{N}>
impl Product for Saturating<u{N}>
impl Product<&Self> for Saturating<u{N}>
다음의 이전 stable API들은 이제 const context에서도 사용 가능합니다.
<[T; N]>::each_ref
<[T; N]>::each_mut
OsString::new
PathBuf::new
TypeId::of
ptr::with_exposed_provenance
ptr::with_exposed_provenance_mut
Platform Support
aarch64-pc-windows-msv 타겟을 1티어로 올리고, aarch64-pc-windows-gnullvm와 x86_64-pc-windows-gnullvm을 2티어로 올립니다.
llvm-tools과 MSI installers들은 빠졌지만 향후 릴리즈에서 추가될 예정입니다.
Rust의 tiered platform support에 대한 정보를 더 알고 싶다면 support page를 참조하세요.
기타 변경점
이외의 모든 변경사항은 각 Rust, Cargo, Clippy 페이지를 확인하세요
1.91.0의 컨트리뷰터들에게
1.91.0의 완성엔 수많은 사람들이 함께했습니다. 전부 여러분이 없었다면 불가능했을 거에요.