Skip to Content
이펙티브 러스트
book

이펙티브 러스트

by 데이비드 드라이스데일, 남기혁
October 2024
Beginner to intermediate
344 pages
7h 44m
Korean
Hanbit Media, Inc.
Content preview from 이펙티브 러스트
301
5
도구 활용
기억할 사항
광범위한 테스트를 수행하는 단위 테스트를 작성한다. 내부 전용 코드에도 작성한다. 테스트는
cargo
test
로 실행한다.
공개
API
를 실행하는 통합 테스트를 작성한다. 테스트는
cargo test
로 실행한다.
공개
API
에서 개별 항목을 사용하는 방법을 예제로 보여 주는 문서 테스트를 작성한다. 테스트는
cargo
test
로 실행한다.
공개
API
전체에 대한 사용 방법을 보여 주는 예제 프로그램을 작성한다. 예제는
cargo test --exam
ples
또는
cargo run --example <name>
으로 실행한다.
성능이 특히 중요한 코드에 대해서는 벤치마크를 작성한다. 벤치마크는
cargo bench
로 실행한다.
코드에 악의적인 입력값이 들어올 가능성이 있다면 퍼즈 테스트를 수행한다. 퍼즈 테스트는
cargo
fuzz
로 연속적으로 실행한다.
아이템
31
: 도구 생태계를 최대한 활용하라
러스트 생태계에서 제공하는 다양한 도구를 사용하면 러스트 코드를 기계어로 변환하는 핵심
작업뿐만 아니라 다양한 기능을 수행할 수 있다.
러스트 개발 환경을 설정할 때 흔히 사용하는 기본 도구는 다음과 같다.
11
의존성을 구성하고 컴파일러를 구동하는
cargo
(아이템
25
)
설치된 러스트 툴체인을 ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

이펙티브 타입스크립트

이펙티브 타입스크립트

Dan Vanderkam
파이썬으로 살펴보는 아키텍처 패턴

파이썬으로 살펴보는 아키텍처 패턴

오현석, 해리 퍼시벌, 밥 그레고리

Publisher Resources

ISBN: 9791169212946