Skip to Content
이펙티브 러스트
book

이펙티브 러스트

by 데이비드 드라이스데일, 남기혁
October 2024
Beginner to intermediate
344 pages
7h 44m
Korean
Hanbit Media, Inc.
Content preview from 이펙티브 러스트
255
4
의존성
버전인 경우에만 가능하다.
FFI
코드가 포함된 크레이트라면 문제가 발생할 수 있다.
의존성에 대한 셈버 호환 버전들(
"1"
또는 최소 버전을 포함한
"1.4.23"
)을 허용하는 것이 좋다.
Cargo.lock
파일을 사용해 빌드를 반복할 수 있게 만들되,
Cargo.lock
파일은 게시된 크레이트와 함
께 제공되지 않는다는 점에 주의한다.
의존성 문제를 찾거나 해결하는 데 다양한 도구(
cargo tree
,
cargo deny
,
cargo udep
)를 활용
한다.
의존성을 가져오면 코드를 작성하는 시간과 노력을 줄일 수 있지만 그로 인한 비용은 감수해야 한다.
아이템
26
: 피처 팽창에 주의하라
러스트는 카고의 피처
feature
메커니즘을 통해 동일한 코드베이스에서 다양한 설정을 지원한다.
이 메커니즘은 조건부 컴파일을 위한 저수준 메커니즘을 토대로 구축되었다. 그런데 이런 피처
메커니즘에는 몇 가지 주의해야 할 미묘한 점이 있는데, 이번 아이템에서 자세히 알아보자.
조건부 컴파일
러스트는 조건부 컴파일
conditional
compilation
을 지원하며,
cfg
cfg
_
attr
속성으로 동작을 제어
한다.
C
/
C
++의 라인 기반 전처리기
line
-
based
preprocessor
와 달리 이 속성으로 함수, 라인, 블록 등 ...
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