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のLINEBot SDKを自作した話
Search
Yuto Takamune
September 29, 2023
Programming
0
1.7k
RustのLINEBot SDKを自作した話
Yuto Takamune
September 29, 2023
Tweet
Share
More Decks by Yuto Takamune
See All by Yuto Takamune
GPT-3.5 Turbo をファインチューニングして自分のクローンを作った話
shinbunbun_
0
310
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
3.8k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
3.8k
カーネルレベルでTwitterを禁止しよう
shinbunbun_
0
240
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
490
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
190
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
1.6k
IEEE802.1X認証を導入してみた
shinbunbun_
0
270
UBICの食材管理APIを作った話
shinbunbun_
0
210
Other Decks in Programming
See All in Programming
フロントエンドのパフォーマンスチューニング
koukimiura
6
2.3k
ソフトウェア設計とAI技術の活用
masuda220
PRO
25
6.7k
ZeroETLで始めるDynamoDBとS3の連携
afooooil
0
120
リッチエディターを安全に開発・運用するために
unachang113
1
240
コーディングエージェント概観(2025/07)
itsuki_t88
0
130
GPUを計算資源として使おう!
primenumber
1
290
DMMを支える決済基盤の技術的負債にどう立ち向かうか / Addressing Technical Debt in Payment Infrastructure
yoshiyoshifujii
4
590
構文解析器入門
ydah
7
1.8k
バイブコーディング超えてバイブデプロイ〜CloudflareMCPで実現する、未来のアプリケーションデリバリー〜
azukiazusa1
2
700
AI Ramen Fight
yusukebe
0
110
SwiftでMCPサーバーを作ろう!
giginet
PRO
2
190
AI Agent 時代のソフトウェア開発を支える AWS Cloud Development Kit (CDK)
konokenj
6
970
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
337
57k
Keith and Marios Guide to Fast Websites
keithpitt
411
22k
How STYLIGHT went responsive
nonsquared
100
5.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
BBQ
matthewcrist
89
9.7k
4 Signs Your Business is Dying
shpigford
184
22k
The Language of Interfaces
destraynor
158
25k
KATA
mclloyd
30
14k
Why You Should Never Use an ORM
jnunemaker
PRO
58
9.5k
Embracing the Ebb and Flow
colly
86
4.8k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
530
Faster Mobile Websites
deanohume
308
31k
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作ろう!