#cargo #tutorial #profile #toml #io #dev #build

build cargo_and_crates

This is tutorial crate

1 unstable release

0.1.0 Jul 24, 2023

#468 in Build Utils

MIT license

2KB

Cargo & Crates.io

Cargo 와 Crates.io 의 사용법에 대해 더 알아보자.

프로필을 이용한 빌드 커스터마이징

$ cargo build --release

Cargo.toml 을 이용해서 프로필을 설정 가능하다

[profile.dev]
opt-level = 0

[profile.release]
opt-level = 3

문서화 주석

$ cargo doc --open

Crates.io 배포

$ cargo login <YOUR_TOKEN>
  • 배포: Cargo.toml
$ cargo publish

lib.rs:

My Crate

This is a tutorial crate

No runtime deps