# Rust Binary 크기 최소화 하기

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

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=2257](https://news.hada.io/topic?id=2257)
- GeekNews Markdown: [https://news.hada.io/topic/2257.md](https://news.hada.io/topic/2257.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2020-06-13T14:34:03+09:00
- Updated: 2020-06-13T14:34:03+09:00
- Original source: [github.com](https://github.com/johnthagen/min-sized-rust)
- Points: 7
- Comments: 0

## Topic Body

Rust는 기본적으로 실행속도 쪽으로 최적화 하므로,

특정 상황에 바이너리 크기를 줄여야 할 때 쓸수 있는 옵션들

→ --release 모드로 빌드하기

→ 심볼들 strip 하기

→ opt-level='z' ( 기본값 3 )

→ LTO(Link Time Optimization)=true

→ codegen-units = 1

→ panic = 'abort'

## Comments



_No public comments on this page._
