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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
990
標準パッケージにおけるテストでの利用例から学ぶ 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
BedrockとLambdaで作る リアルタイム進行型推理ゲーム
kawametho
0
190
AI時代に必要な脅威モデリング― 変化の速度に負けない理解とリスク判断
masakane55
4
960
全人類(ほぼ)AWS Organizations の上でAWSを利用している、その世界を知る話
htan
0
110
営業オントロジーの作り方と、エージェントからの辿り方 ── ナレッジワークの現場から
kworkdev
PRO
1
260
AI Made Us Faster at Solving the Wrong Problems
marceloancelmo
0
160
KanaAI
shreyas1009
0
150
[2026 Oracle Technical Deep Dive] オンプレミスDBのCloud移行アプローチ:移行計画に基づくメソッドとツールの選択 (2026年9月17日開催)
oracle4engineer
PRO
0
140
生成AIを使って「人が」考える技術 ― AI時代の人機共想と実践ノウハウ|UNITT AC2026
ishiirikie
0
550
FinTech 1-2 : Overview of FinTech
ks91
PRO
0
150
[2026 Oracle Technical Deep Dive] エンタープライズAIエージェントを支えるOCIソリューション。ラインナップと特徴を理解しよう! (2026年9月17日開催)
oracle4engineer
PRO
0
510
AIは爆速なのに、私が詰まっていた話 ― 音声入力と鳴くマスコットでボトルネックを削る
yama3133
0
520
[2026 Oracle Technical Deep Dive] AI時代のアプリケーションを支えるCloud NativeとJava EEモダナイゼーション (2026年9月17日開催)
oracle4engineer
PRO
0
120
Featured
See All Featured
How STYLIGHT went responsive
nonsquared
100
6.3k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
710
Why Your Marketing Sucks and What You Can Do About It - Sophie Logan
marketingsoph
0
420
So, you think you're a good person
axbom
PRO
2
2.2k
Building an army of robots
kneath
307
47k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
510
Building AI with AI
inesmontani
PRO
1
1.3k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
510
[SF Ruby Conf 2025] Rails X
palkan
3
1.4k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
580
RailsConf 2023
tenderlove
30
1.6k
Everyday Curiosity
cassininazir
0
340
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!