Skip to Content
이펙티브 러스트
book

이펙티브 러스트

by 데이비드 드라이스데일, 남기혁
October 2024
Beginner to intermediate
344 pages
7h 44m
Korean
Hanbit Media, Inc.
Content preview from 이펙티브 러스트
248
이펙티브 러스트
이렇게 하면 호출하는 측의 코드에서는
dep
_
lib
::
rand
를 이용해
0
.
7
버전의
rand
를 직접 참
조하는 다른 방법을 갖게 된다.
let mut prev_rng = dep_lib::rand::thread_rng(); // v0.7 Rng 인스턴스
let choice = dep_lib::pick_number_with(&mut prev_rng, max);
이 예제를 이해했다면 이번 아이템의 제목인 ‘
API
에 타입으로 나오는 의존성을 다시 익스포트
하라’는 조언이 조금씩 이해될 것이다.
아이템
25
: 의존성 그래프를 관리하라
대부분의 최신 프로그래밍 언어와 마찬가지로 러스트도 외부 라이브러리를 쉽게 가져오는 메
커니즘을 제공한다. 러스트는 이 기능을 크레이트 형태로 제공한다. 어느 정도 규모 있는 러스
트 프로그램이라면 대부분 외부 크레이트를 사용한다. 이런 크레이트 역시 나름대로 의존성을
가진 경우가 많아서 프로그램 전체로 보면
의존성 그래프
dependency
graph
를 형성하게 된다.
카고는 기본적으로
Cargo
.
toml
파일의
[
dependencies
]
부분에 명시된 크레이트를 모두
crates
.
io
에서 다운로드한 뒤,
Cargo
.
toml
에 명시된 요구 사항과 일치하는 크레이트 버전
을 찾는다.
이 간단한 문장 안에는 몇 가지 주의 ...
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