Skip to Content
이펙티브 러스트
book

이펙티브 러스트

by 데이비드 드라이스데일, 남기혁
October 2024
Beginner to intermediate
344 pages
7h 44m
Korean
Hanbit Media, Inc.
Content preview from 이펙티브 러스트
318
이펙티브 러스트
// 앞의 검증을 거쳤다면 다음 연산은 안전하게 수행할 수 있다.
v.push(1);
v.push(2);
v.push(3);
v.push(4);
Ok(v)
}
실패 가능한 할당 설정을 추가하는 동시에, 디폴트로 설정된
no
_
global
_
oom
_
handling
플래
그를 꺼서
실패 불가능한 할당 연산
을 비활성화할 수도 있다. 리눅스 커널처럼 힙이 제한된 환경
에서는 이 플래그를 명시적으로 비활성화하면 실수로 실패 불가능한 할당이 코드에 스며드는
것을 방지할 수 있다.
기억할 사항
std
크레이트에 제공되는 항목 중 상당수는
core
alloc
에 있다.
라이브러리 코드를
no_std
에 호환되게 만드는 것이 생각보다 쉬울 수 있다.
no_std
호환성을 검사하도록
CI
시스템을 설정해서 코드를 항상
no_std
에 호환되게 유지한다.
제한된 힙 환경에서 작업할 때 라이브러리 지원에 제약이 있다는 점을 명심한다.
아이템
34
:
FFI
경계를 넘어서는 것을 제어하라
러스트의 표준 라이브러리에서 제공하는 기능도 풍부해지고 있고, 크레이트 생태계도 급성장
하고 있지만, 여전히 세상에는 러스트로 작성된 코드보다는 다른 언어로 작성된 코드가 훨씬
많다.
러스트는 다른 최신 언어와 마찬가지로 이 문제를 해결하기 위해 다른 언어로 작성된 코드나 ...
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