Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rust、何もわからない...#6発表資料
Search
Ryuki Kamikubo
January 27, 2023
Programming
1.5k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rust、何もわからない...#6発表資料
こちらのイベントで登壇した際の発表資料です。
https://estie.connpass.com/event/270226/
Ryuki Kamikubo
January 27, 2023
Other Decks in Programming
See All in Programming
act1-costs.pdf
sumedhbala
0
150
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
210
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
340
The NotImplementedError Problem in Ruby
koic
1
1k
エンジニア向け会社紹介/Findy Company Profile
findyinc
6
360k
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
810
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
330
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
280
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
630
ランチタイムLT会3周年!ランチタイムLT会を3年間続けられたお話
y0hgi
1
120
トークンをケチるな、設計しろ:GitHub Copilotを賢く使うコンテキスト戦略
ochtum
0
270
任せる範囲はこう広がった / How the Scope of AI Delegation Has Expanded
nrslib
1
220
Featured
See All Featured
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
62
55k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
1k
First, design no harm
axbom
PRO
2
1.2k
BBQ
matthewcrist
89
10k
A Modern Web Designer's Workflow
chriscoyier
698
190k
The SEO Collaboration Effect
kristinabergwall1
1
500
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
240
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
800
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
380
Transcript
Copyright © LabBase, Inc. All Rights Reserved. LabBaseのサービスプラットフォームの データ収集機能開発にRustを活用した話 株式会社LabBase
プラットフォーム開発本部 上久保 竜輝
Copyright © LabBase, Inc. All Rights Reserved. 自己紹介 上久保 竜輝(Kamikubo
Ryuki) 趣味 > テニス、ランニング、ボドゲ、競プロ(過去形) ソフトウェアエンジニア > frontend : backend = 6:4 > React,TypeScript,Rust,Python,PHP(Laravel) 職歴 > 2019年 4月 大手通信会社 入社 > 2021年10月 株式会社LabBase 入社 最近の興味 > アーキテクチャ,DDD,インフラ周り強くなりたい
Copyright © LabBase, Inc. All Rights Reserved.
Copyright © LabBase, Inc. All Rights Reserved. サービス紹介
Copyright © LabBase, Inc. All Rights Reserved.
Copyright © LabBase, Inc. All Rights Reserved. 約1年前 CTO「Rustやろう」ぼくら「「「はい」」」 Rustで業務開発経験あるエンジニアなし、無茶振りに焦る
> 新しい技術を学ぶのはみんな好き
Copyright © LabBase, Inc. All Rights Reserved. 現在 エンジニアの半数以上がRustで開発している 新規開発のバックエンドは基本的にRust
プラットフォーム基盤などの重要なシステムにもRustを利用 > 実はCTOの無茶振りのおかげで仕事でRustがかなり書ける会社です!!
Copyright © LabBase, Inc. All Rights Reserved. 自分がRustで開発したプロダクト紹介: 企業マスタ 企業情報をバッチ処理で
外部APIを叩いて取得 社内の他プロダクトがア クセスできるようにgRPC サーバを構築
Copyright © LabBase, Inc. All Rights Reserved. 自分がRustで開発したプロダクト紹介: 研究室データ投入 集めた大量の研究室や指導
教官に関するデータを投入 するツール > JSON形式のデータをparseして DB投入
Copyright © LabBase, Inc. All Rights Reserved. 最初はやっぱり大変 無限に所有権で怒られる >
所有権やCopyトレイトを学んで 解決
Copyright © LabBase, Inc. All Rights Reserved. Rust、何もわからない... スマートポインタわからん 動的ディスパッチわからん
ライフタイム注釈わからん > 見た目がいかつくて怖い(※個人の感想で す) > 文法がわかっても存在理由や使い道がしっ くりきていない
Copyright © LabBase, Inc. All Rights Reserved. 慣れてくると段々いい感じに Option型、Result型によるエ ラーハンドリング便利
> ?やmap_errなどを使うとネストが 深くならなくて可読性保てる
Copyright © LabBase, Inc. All Rights Reserved. よかったこと SeaORMいい感じだった >
Seeding,Migration,Entity自動生 成など一通りできる > MockのConnectionなど簡単に作れ てテスト書きやすい
Copyright © LabBase, Inc. All Rights Reserved. よかったこと ユニットテストを実装と同ファイルに書くと、見通し良い
Copyright © LabBase, Inc. All Rights Reserved. 学んだこと ソフトウェアアーキテクチャを 実現するのにRustは向いている
なと思った > 階層ごとにpublic設定しないとアク セスできないので、意図しない公開を 防げる [lib.rs] pub mod models; [models.rs] pub mod laboratory; [laboratory.rs] pub mod lab_name;
Copyright © LabBase, Inc. All Rights Reserved. 学んだこと > domainやinfra層をそれぞれ別の
パッケージとして実装。変更差分の あるパッケージだけビルドできる し、各層間の依存関係も表現できる > テックブログ書きました 企業マスタのディレクトリ構成
Copyright © LabBase, Inc. All Rights Reserved. 学んだこと Rustは早いと言われているが、遅 く書けてしまう(当たり前)
> clone(),to_owned()祭り > 遅いアルゴリズム、不必要なSQLでの呼 び出しなどなど
Copyright © LabBase, Inc. All Rights Reserved. 感じたこと Rustじゃなきゃダメっていう問題解決的な動機での導入では ないが、様々な言語の良い部分がRustに取り入れられてお
り、他の言語からやってくると新たな発見があって楽しい > CargoやCrateの充実もそう > エラー文がとても親切・アドバイスもしてくれる(clippyもいい)
Copyright © LabBase, Inc. All Rights Reserved. 感じたこと 所有権の概念と冗長なコードに慣れれば走り出せる >
実際に開発しながら、これなんだろ?で調べるの繰り返しがいいと思 う つよつよな人が多いおかげでネットで本質的な情報を探しや すい!
Copyright © LabBase, Inc. All Rights Reserved. まとめ Rustは開発しながら学習意欲、知的好奇心を満たせる >
仕様を学ぶごとに2週目ダンジョンの隠しステージが見えてくるよう Rustの難しさは必要な複雑性、自分の理解の甘さ 業務開発の中でアーキテクチャ、アルゴリズムなど疎かにし ない、あくまで総合格闘技
Copyright © LabBase, Inc. All Rights Reserved. 最後に LabBaseで一緒に開発する仲間を募集中です!Rustに興味がある皆 さん是非!
• ソフトウェアエンジニア • リサーチエンジニア
Copyright © LabBase, Inc. All Rights Reserved. 最後に エンジニアメンバーでテックノートを書いています!