Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
プログラミング言語Rust
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Yusuke Hosonuma
November 09, 2016
Technology
770
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
プログラミング言語Rust
Rustの紹介的な勉強会
Yusuke Hosonuma
November 09, 2016
More Decks by Yusuke Hosonuma
See All by Yusuke Hosonuma
KotlinTest で始める Property-based Testing/kotlintest-property-based-testing
yusukehosonuma
2
1.6k
Marzipan の正体は何だったのか そして SwiftUI の衝撃/wwdc19_marzipan_swiftui
yusukehosonuma
2
1k
標準パッケージにおけるテストでの利用例から学ぶ testing / quick パッケージ/golang-testing-quick
yusukehosonuma
4
12k
Swift で ParameterizedTest をやってみた話/swift-parameterized-test
yusukehosonuma
4
2.3k
Property-based test beginning with SwiftCheck
yusukehosonuma
1
6.3k
XCTest(再)入門/reintroduction-to-xctest
yusukehosonuma
0
670
ソースコードから読み解く - Quick はどのように実装されているのか?/quick-code-reading
yusukehosonuma
7
11k
Swift 4.2 はどのような進化をしているのか/whats-new-swift42
yusukehosonuma
16
15k
HTTPモックライブラリ「Mockingjay」を使ってみた話/swift-mockingjay
yusukehosonuma
5
4.4k
Other Decks in Technology
See All in Technology
LLM Content Moderationを支える評価・改善ループの実践
suikabar
2
360
LLM-as-a-Judgeは本当に信頼できるのか――評価器を評価する話
taka_aki
3
1.1k
Obsidian Vault Architectures
x5gtrn
PRO
0
160
[re:Invent2026事前勉強会(有志開催)]続きは、ラスベガスの廊下で / continue-in-the-vegas-hallway
sh_fk2
0
260
Filter What the LLM Reads: RAG Governance with AgentCore Gateway
yakumo
0
110
これだけは抑えておきたい!後悔しない re:Invent の過ごし方 / AWS re:Invent 2026 prestudy
kinunori
2
380
AIエージェント時代、Kaggleにどう取り組むか
takanao
1
190
僕のハーネスを紹介します
watany
6
1.6k
"計画的無茶振り"を通してAIネイティブ世代の新人を育てる
subroh0508
1
110
契約で守るコンパウンドプロダクトのデザインシステム
yug1224
1
1.4k
クラウドサインを止めずに Nuxt へ 次の10年のために先に決めたこと
bengo4com
1
160
ガチで放置できるClaude Code実行環境の作り方.pdf
lamaglama39
5
9.8k
Featured
See All Featured
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.6k
Faster Mobile Websites
deanohume
310
32k
Building an army of robots
kneath
307
47k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.1k
Darren the Foodie - Storyboard
khoart
PRO
4
4k
Designing Experiences People Love
moore
143
24k
Claude Code のすすめ
schroneko
67
230k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
420
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
Test your architecture with Archunit
thirion
2
2.5k
How to Think Like a Performance Engineer
csswizardry
28
2.9k
Transcript
ϓϩάϥϛϯάݴޠ Rust
ࣗݾհ • Yusuke Hosonuma • https://github.com/YusukeHosonuma • Qiitaͨ·ʹॻ͍ͯΔΑɻ • ϚΠϯυϑϧωε࣮ફதɻ
Rustͬͯʁ
Rustͬͯʁ • Mozilla͕࡞ͬͨγεςϜϓϩάϥϛϯάݴޠ • ߴੑɺ҆શੑɺฒߦੑɺʹϑΥʔΧε • C/C++/GoͷΑ͏ʹγϯάϧόΠφϦग़ྗͰ͖Δ • Ϟμϯͳ֓೦ʢؔܕͱ͔ʣΛऔΓೖΕͯΔ •
Swift͕ӨڹΛड͚ͨݴޠͰ͋Δ
ߴʁ
ߴʁ • C/C++ͷΑ͏ͳθϩΦʔόʔϔουΛࢦ͢ • GCͳ͠ɺࢀরΧϯτͳ͠ɺͷϝϞϦཧ • Ϟμϯͳ֓೦Λαϙʔτͭͭ͠ɺΦʔόʔϔου ͕ݶΓͳ͘ൃੜ͠ͳ͍Α͏ʹߟ͑ΒΕͯΔ • ʮθϩίετநԽʯ(zero-cost
abstractions)
҆શʁ
҆શʁ • C/C++ͰϝϞϦؔ࿈ͷόά͕ઈ͑ͳ͍ • ະॳظԽ or ൣғ֎ͷྖҬʹΞΫηεͨ͠Γ • όοϑΝʔΦʔόʔϑϩʔ੬ऑੑͷѱເ •
RustͰίϯύΠϧ࣌ʹແޮͳϝϞϦΞΫηε͕ൃ ੜ͠ͳ͍͜ͱΛอূ͢Δ • ੩తܕ͚Ͱܕਪ͋Γ
ฒߦʁ
ฒߦʁ • Ұൠతʹฒߦϓϩάϥϛϯά͍͠ • ෳͷεϨου͕ಉ͡σʔλΛಉ࣌ʹಡΈॻ͖ ͠ͳ͍Α͏ʹࡉ৺ͷҙ͕ඞཁ • ࠶ݱੑͷ͍όάੜΈग़͍͢͠ • RustͰίϯύΠϧ࣌ʹσʔλڝ߹Λ͙Έ
͕͋Δ
࣮ʁ
࣮ʁ • Friends of Rust https://www.rust-lang.org/en-US/friends.html ↑࣮ϓϩμΫτʹRustΛ͍ͬͯΔ৫ • MozillaFirefoxͷϝσΟΞύʔβͰར༻
ˠ 10ԯਓҎ্͕ར༻͍ͯ͠Δͷʹɺ1݅Τϥʔ͕ ൃੜ͍ͯ͠ͳ͍ʢΒ͍͠ʣ • DropboxLINEͱ͍ͬͨେޚॴར༻͍ͯ͠Δ
Why Rust ?
Why Rust ? • C/C++ͷΑ͏ʹߴੑ͕ٻΊΒΕΔιϑτΣΞ ʢOS/υϥΠόͳͲʣʹ͍͍ͯΔ • C/C++ߴ͚ͩͲɺϝϞϦཧ҆શͰͳ͍͠ɺ ฒߦϓϩάϥϛϯά͍͠ •
ݱঢ়ͷʢGoݴޠҎ֎ͷʣϞμϯݴޠ͔ΒݟΔͱػೳ ऑ͍ʢ͖ͼ͠Ίʹݴ͑࣌Εʣ • ͦ͜ͰRustͰ͢Αʂ
ͭ·Γʁ
ͭ·Γʁ • ϙετC++Λࢦ͢ݴޠ • ߴɺ҆શɺฒྻɺʹϑΥʔΧεͨ͠ݴޠ • ࠷େͷڝ߹Dݴޠ
Hello Rust
Hello Rust fn main() { println!("Hello, world!"); // This is
macro }
ϑΟϘφονྻ
ϑΟϘφονྻ fn fib(n: u32) -> u32 { // Function definition
match n { // Pattern match 0 => 1, 1 => 1, _ => fib(n - 1) + fib(n - 2), // Recursive call } // not need `return` } fn main() { let fib5 = fib(5); // local variable (Immutable is default) println!("fib(5): {}", fib5); // `{}` is placeholder // => 8 }
Cargo(Χϧΰ)
Cargo(Χϧΰ) • Rustඪ४ͷϏϧυπʔϧ • ಉ࣌ʹύοέʔδϚωʔδϟͰ͋Δ • ͭ·ΓɺϏϧυɺϥΠϒϥϦͷμϯϩʔυɺ ґଘؔͷղܾɺΛશ෦Δ • ʮધՙʯͱ͍͏ҙຯ͕͋Δ
Rustͷ࢝Ίํ
Rustͷ࢝Ίํ • $ brew install rust • $ cargo new
hello --bin • $ cd ./hello • $ cargo run • > Hello, world!
Rust Samurai ͷಓ ʻࡶίϥͰѱ͔ͬͨͳ
Rust Samurai ͷಓ • ϓϩάϥϛϯάݴޠRustʢຊޠ༁ʣ https://rust-lang-ja.github.io/the-rust- programming-language-ja/1.6/book/ README.html • όʔδϣϯ1.6Ͱͪΐͬͱݹ͍͚Ͳ͔Γ͍͢
Rust Samurai ͷಓ • Rust by Example http://rustbyexample.com/index.html • αϯϓϧίʔυΛϕʔεʹֶͯ͠·͢ɻͨͩ͠
ӳޠɻ
Rust Samurai ͷಓ • APIϦϑΝϨϯε https://doc.rust-lang.org/std/ • ݕࡧػೳ͕ͳ͔ͳ͔༏लͰ͢ɻ
Join us?
Join us? • StackOverflowʹ͓͍ͯɺ2016ͷѪ͞ΕͯΔݴޠϥ ϯΩϯά1ҐΛ֫ಘ͍ͯ͠·͢ɻ • طʹηϧϑϗεςΟϯάʢࣗͰࣗΛίϯύΠϧʣ Λ࣮ݱ͍ͯ͠·͢ɻ • GoݴޠͷΑ͏ʹޙΖ६͕ແ͖ͯͯͨ͘͠ݴޠ
Ͱ͢ɻ • ࠷ۙʹͳͬͯར༻࣮͕֦େ͍ͯ͠·͢ɻ
Rust͍͍ͧʂ
Thanks!