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
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
330
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
750
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
250
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
2.5k
IEEE802.1X認証を導入してみた
shinbunbun_
0
360
UBICの食材管理APIを作った話
shinbunbun_
0
280
Other Decks in Programming
See All in Programming
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.4k
Python Lambdaにおけるテストしやすい設計とAI支援の活用 / Designing Testable Python Lambda Functions with AI
kitano_yuichi
1
290
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
230
Distance field of Julia set
kinakomoti321
0
150
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
300
Performance Optimization With LLMs
xleitix
0
240
Event is what happens
moro
2
3.5k
GraphQL の onError と Nullability のこれから
quramy
0
210
Herb in Rails 8.2: Your ERB views, now HTML-aware @ Kaigi on Rails 2026, Tokyo, Japan
marcoroth
2
410
[DroidKnights 2026] Workflow AX: From Auto-Documented Policies to E2E Testing
raeminkang
0
520
React Native経験者が Flutterを30⽇間触って驚いたこと
3saito
0
150
Seven New Principles of Software Engineering
yegor256
0
450
Featured
See All Featured
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
970
Designing Powerful Visuals for Engaging Learning
tmiket
1
650
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
Deep Space Network (abreviated)
tonyrice
0
410
Documentation Writing (for coders)
carmenintech
77
5.6k
Visualization
eitanlees
153
17k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
390
Practical Orchestrator
shlominoach
192
12k
ラッコキーワード サービス紹介資料
rakko
5
5.7M
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
630
RailsConf 2023
tenderlove
30
1.6k
Become a Pro
speakerdeck
PRO
31
6.3k
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作ろう!