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のLINEBot SDKを自作した話
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yuto Takamune
September 29, 2023
Programming
2.6k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
RustのLINEBot SDKを自作した話
Yuto Takamune
September 29, 2023
More Decks by Yuto Takamune
See All by Yuto Takamune
GPT-3.5 Turbo をファインチューニングして自分のクローンを作った話
shinbunbun_
1
400
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
5.1k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
5.2k
カーネルレベルでTwitterを禁止しよう
shinbunbun_
0
320
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
740
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
250
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
2.5k
IEEE802.1X認証を導入してみた
shinbunbun_
0
350
UBICの食材管理APIを作った話
shinbunbun_
0
280
Other Decks in Programming
See All in Programming
JRuby: Past, Present, and Future
headius
0
220
CodeRabbitの効果検証と過ごしてみた3ヶ月
armondando
0
200
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
34
16k
残高管理から台帳サービスへの進化
artoy
0
180
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8k
WebRTC映像をAirPlayに対応させる挑戦.pdf
monolithic_adam
0
350
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
5
5k
mrbgem 三角測量 開発
ogom
0
220
外から家のPCの電源入れたい!をPHPで解決する
kawashimo0
1
120
setup-vp GitLab対応の裏側
naokihaba
0
150
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.4k
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
How to Talk to Developers About Accessibility
jct
2
570
Making the Leap to Tech Lead
cromwellryan
135
10k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
530
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
VelocityConf: Rendering Performance Case Studies
addyosmani
331
25k
Exploring anti-patterns in Rails
aemeredith
4
530
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
The Curse of the Amulet
leimatthew05
3
15k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
7k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
400
Transcript
RustのLINEBot SDKを自作した話 しんぶんぶん
自己紹介 • 名前: しんぶんぶん • 所属: 会津大学学部3年 • Twitter: @shinbunbun_,
@4fa19623 • LINE API Expert / seccamp ’23 / Cybozu labyouth 13th ◦ セキュキャン: 分散合意ゼミ(Raft) ◦ ラボユース: CRDTを使ったP2P分散データベースの開発
LINE Messaging APIについて/今回作ったもの • いわゆるLINEBotを作るのに必要な API • 各言語でSDKが公式から提供されて いる •
Rustは公式で提供されていないので 自作してみた • リポジトリ: https://github.com/shinbunbun/line- bot-sdk-rust LINEBot→
実装したもの • 基本的には構造体の型を定義してい く作業 • LINEから送られてくるメッセージと サーバから送信するメッセージそれぞ れの型を、ドキュメントを見ながら地道 に書いた •
いろいろなAPIがあるので、それらの ラッパーを書いた
使用した(主な)Crate • awc ◦ APIを叩くのに使用 • typed-builder ◦ 型レベルビルダーパターンでメッセージの structを構築できるようにした
• thiserror ◦ エラーハンドリングを良い感じにするのに使用
使用イメージ
使用イメージ
SDKを使ったサンプル実装 • Hands-on LINEBOT Rust編 Vol.1 ◦ 技術書典で頒布した本 • リポジトリ
◦ https://github.com/shinbunbun/Hands-on-LINEB OT-Rust-Vol.1
みんなもRustでLINEBot作ろう!