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
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
660
ソースコードから読み解く - 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
Amazon Quick on DesktopがIAM Identity Centerで動かない理由
yukiogawa
0
150
株式会社シーエーシー エンジニア向け会社紹介資料
cac
0
57k
2026-09-09 【sigma_ucj#1】Sigma を IaC 管理したい! / IaC for Sigma
civitaspo
0
110
synctest時代のhttptest Go 1.27で変わるHTTPサーバテストの裏側 / go conference2026 synctest and httptest
budougumi0617
1
1.2k
Webとヘルスデータ
yukukotani
1
270
多摩川(.dev)ランニング入門 / Tamagawa.dev#3
fujiwara3
3
450
Deploying a Full-Stack Bun-Native Framework on Cloudflare Workers
7nohe
0
130
研究開発部の紹介 / Sansan R&D Profile
sansan33
PRO
4
25k
Tab5をRubyで動くパソコンにする
kishima
2
280
WAF 運用改善の承認サイクル/SRE_BizReach_MIXI_1
visional_engineering_and_design
2
410
Podは生きているのにGoだけが落ちる:GOGCとGOMEMLIMITで追うInvisible OOM Killの謎
tkc66buzz
1
490
PfEingのアプローチで働こう
rindrics
0
210
Featured
See All Featured
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2.2k
Side Projects
sachag
455
43k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
[SF Ruby Conf 2025] Rails X
palkan
2
1.4k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
エンジニアに許された特別な時間の終わり
watany
108
250k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
780
The Pragmatic Product Professional
lauravandoore
37
7.4k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
190
Skip the Path - Find Your Career Trail
mkilby
1
220
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
380
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
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!