# Rust 1.97.0 발표

> Clean Markdown view of GeekNews topic #31303. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=31303](https://news.hada.io/topic?id=31303)
- GeekNews Markdown: [https://news.hada.io/topic/31303.md](https://news.hada.io/topic/31303.md)
- Type: GN+
- Author: [neo](https://news.hada.io/@neo)
- Published: 2026-07-11T05:01:57+09:00
- Updated: 2026-07-11T05:01:57+09:00
- Original source: [blog.rust-lang.org](https://blog.rust-lang.org/2026/07/09/Rust-1.97.0/)
- Points: 1
- Comments: 1

## Topic Body

- Rust 1.97.0 stable 릴리스는 컴파일 산출물의 심볼 생성 방식과 빌드 경고 처리 흐름을 바꾸며, `rustup update stable`로 업데이트할 수 있음
- **symbol mangling v0**가 stable 기본값이 되어 Rust 전용 심볼 이름 체계로 전환되고, 기존 Itanium ABI 기반 방식은 제거 방향으로 이동함
- Cargo는 `RUSTFLAGS=-Dwarnings` 대신 **`CARGO_BUILD_WARNINGS`** 로 경고를 `allow`, `warn`, `deny`로 제어해 CI와 로컬 빌드 정책을 나누기 쉬워짐
- rustc는 성공한 링크에서도 링커 출력을 **`linker_messages`** 경고로 보여주며, 이 lint는 현재 `warnings` lint group의 영향을 받지 않음
- 표준 라이브러리에는 `RepeatN`의 `Default`, UEFI의 `std::fs::File`에 대한 `Send`, 정수·`NonZero` 비트 메서드, const context의 `char::is_control` 안정화가 포함됨

---

### Rust 1.97.0 업데이트
- Rust 1.97.0은 stable 릴리스이며, 기존에 `rustup`으로 Rust를 설치한 사용자는 다음 명령으로 업데이트할 수 있음

```bash
rustup update stable
```

- `rustup`이 없다면 Rust 웹사이트의 [`rustup`](https://www.rust-lang.org/install.html) 설치 페이지에서 받을 수 있음
- 상세 변경 사항은 [detailed release notes for 1.97.0](https://doc.rust-lang.org/stable/releases.html#version-1970-2026-07-09)에 정리돼 있음
- 향후 릴리스 테스트에 참여하려면 `rustup default beta` 또는 `rustup default nightly`로 beta/nightly 채널을 사용할 수 있고, 발견한 버그는 [Rust issue tracker](https://github.com/rust-lang/rust/issues/new/choose)에 보고할 수 있음

### stable에서 달라진 컴파일·빌드 동작
- ## symbol mangling v0 기본 활성화
  - Rust가 오브젝트 파일이나 바이너리로 컴파일될 때 함수, static 등 각 항목은 전역에서 고유한 **symbol**을 가져야 함
  - 서로 다른 Rust 프로그램을 함께 링크할 때 충돌을 피하려고, Rust는 원래 항목 이름에 모듈 경로, 정의 crate, 제네릭 같은 문맥을 포함해 이름을 맹글링함
  - 기존 맹글링은 C++에서도 쓰이는 경우가 있는 **Itanium ABI**에 기반했음
  - 새 방식은 제네릭 매개변수 인스턴스화 값을 보존하고, 일부만 Itanium ABI를 쓰던 불일치 때문에 커스텀 디맹글링이 여전히 필요했던 문제를 줄임
  - Rust 1.59부터 `-Csymbol-mangling-version=v0`로 Rust 전용 맹글링 방식을 선택할 수 있었고, 2025년 11월부터 nightly 기본값으로 적용됨
  - Rust 1.97에서는 이 방식이 stable Rust의 기본값이 되며, legacy 맹글링은 nightly에서만 활성화할 수 있음
  - 현재 계획은 legacy 맹글링을 완전히 제거하는 것임
  - 자세한 내용은 이전 글 [switching to v0 mangling on nightly](https://blog.rust-lang.org/2025/11/20/switching-to-v0-mangling-on-nightly/)에서 확인할 수 있음
- ## Cargo의 경고 제어
  - CI에서 경고를 빌드 실패로 처리하는 것은 일반적인 관행이며, 기존에는 보통 `RUSTFLAGS=-Dwarnings`를 사용했음
  - Rust 1.97부터 Cargo가 경고와 빌드 성공의 관계를 직접 제어함
    - `allow`: 경고를 숨김
    - `warn`: 실패시키지 않고 표시하는 기본값
    - `deny`: 경고를 거부해 빌드 실패로 처리함
  - 이 기능은 Cargo 설정으로 동작이 결정되므로 **기본 빌드 캐시를 무효화하지 않음**
  - 리팩터링 후 오류를 고치는 동안 경고 노이즈를 임시로 줄이고 싶다면 다음처럼 실행할 수 있음

```bash
CARGO_BUILD_WARNINGS=allow cargo check
```

  - CI에서는 `CARGO_BUILD_WARNINGS=deny`를 설정해 경고를 거부할 수 있음
  - `--keep-going`과 함께 쓰면 첫 번째 실패 package에서 멈추지 않고 모든 오류와 경고를 수집할 수 있음
  - 자세한 설정은 Cargo의 [`build.warnings` documentation](https://doc.rust-lang.org/cargo/reference/config.html#buildwarnings)에 있음
- ## 링커 출력 기본 표시
  - rustc는 사용자를 대신해 **linker**를 호출하며, 기존에는 link가 성공하면 linker 출력을 기본적으로 숨겼음
  - Rust 1.97부터 linker message가 기본 표시되고, 다음과 같은 warning lint로 출력됨

```text
warning: linker stderr: ignoring deprecated linker optimization setting '1'
  |
  = note: `#[warn(linker_messages)]` on by default
```

  - rustc는 false positive나 의도된 동작으로 진단된 일반적인 linker message를 필터링함
  - nightly에서 이 출력을 숨기지 않게 된 뒤 여러 결함이 수정됨
  - 현재 `linker_messages`는 특수 lint이며, **`warnings` lint group의 영향을 받지 않음**
  - rustc가 linker 출력을 정밀하게 제어하지 못하는 경우가 일반적이고, 출력이 일부 platform에서만 나타날 수도 있음
  - linker의 false positive 출력으로 보이면 [issue](https://github.com/rust-lang/rust/issues/new/choose)를 제출할 수 있음
  - 경고를 숨기려면 lint level을 `allow`로 설정할 수 있으며, `Cargo.toml`에 다음 lints section을 추가할 수 있음

```toml
[lints.rust]
linker_messages = "allow"
```

### 안정화된 API
- Rust 1.97에서 다음 API가 stable로 안정화됨
  - [`Default for RepeatN`](https://doc.rust-lang.org/stable/std/iter/struct.RepeatN.html#impl-Default-for-RepeatN%3CA%3E)
  - [`Copy for ffi::FromBytesUntilNulError`](https://doc.rust-lang.org/stable/std/ffi/struct.FromBytesUntilNulError.html#impl-Copy-for-FromBytesUntilNulError)
  - [`Send for std::fs::File` on UEFI](https://github.com/rust-lang/rust/pull/154003)
  - [`<{integer}>::isolate_highest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.isolate_highest_one)
  - [`<{integer}>::isolate_lowest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.isolate_lowest_one)
  - [`<{integer}>::highest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.highest_one)
  - [`<{integer}>::lowest_one`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.lowest_one)
  - [`<{uN}>::bit_width`](https://doc.rust-lang.org/stable/std/primitive.u32.html#method.bit_width)
  - [`NonZero<{integer}>::isolate_highest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.isolate_highest_one)
  - [`NonZero<{integer}>::isolate_lowest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.isolate_lowest_one)
  - [`NonZero<{integer}>::highest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.highest_one)
  - [`NonZero<{integer}>::lowest_one`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.lowest_one)
  - [`NonZero<{uN}>::bit_width`](https://doc.rust-lang.org/stable/std/num/struct.NonZero.html#method.bit_width)
- 기존에 stable이던 [`char::is_control`](https://doc.rust-lang.org/stable/std/primitive.char.html#method.is_control)은 이제 **const context**에서도 stable임

### 관련 변경 로그
- 전체 변경 사항은 Rust, Cargo, Clippy 각각의 변경 로그에서 확인할 수 있음
  - [Rust 1.97.0 release](https://github.com/rust-lang/rust/releases/tag/1.97.0)
  - [Cargo 1.97 changelog](https://doc.rust-lang.org/nightly/cargo/CHANGELOG.html#cargo-197-2026-07-09)
  - [Clippy changelog for Rust 1.97](https://github.com/rust-lang/rust-clippy/blob/master/CHANGELOG.md#rust-197)

## Comments



### Comment 61569

- Author: neo
- Created: 2026-07-11T05:01:58+09:00
- Points: 1

###### [Lobste.rs 의견들](https://lobste.rs/s/o9edbl/announcing_rust_1_97_0) 
- Rust 1.97에서 Cargo가 **경고와 빌드 성공 여부**의 관계를 제어할 수 있게 된 건 아주 좋은 새 기능임  
  리팩터링 뒤 오류를 고치는 동안 경고가 방해되면 `CARGO_BUILD_WARNINGS=allow cargo check`로 잠시 숨길 수 있고, CI에서는 `CARGO_BUILD_WARNINGS=deny`로 경고를 실패 처리할 수 있음. `--keep-going`과 함께 쓰면 첫 실패 패키지에서 멈추지 않고 모든 오류와 경고를 모을 수 있음

- 업그레이드는 잠시 미루는 편이 좋을 수 있음. **오컴파일 버그**가 있는 것 같음  
  https://github.com/rust-lang/rust/issues/159035
  - 흥미롭게도 이 오컴파일은 10개 릴리스 동안 이미 있었는데, 예전에는 살짝 범위를 벗어나 읽던 것이 이제는 훨씬 크게 벗어나 읽어서 **세그폴트**가 나는 듯함
  - LLVM 버그였음. 다행히 수정은 꽤 직선적인 것으로 보임  
    https://github.com/llvm/llvm-project/pull/208683

- 멋지다. 여기 **패턴 타입** 구현 진행 상황을 요약해 줄 수 있는 사람이 있을지 궁금함

- 아쉽게도 **never type**은 이번에도 안정화되지 않았음. 다음 릴리스를 기대함
  - “never type은 안정화 날짜에서 이름을 따왔다”는 농담도 이제 거의 끝물이 되어감
  - 컴파일러 팀 멤버 중 한 명이 RustWeek에서 **never type**에 대해 발표했음. 안정화 전망을 더 잘 가늠하는 데 도움이 될 수 있으니 보는 걸 추천함: <https://www.youtube.com/watch?v=3jM4cnEVrLc>
