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
2.2k
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_
1
360
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
4.5k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
4.5k
カーネルレベルでTwitterを禁止しよう
shinbunbun_
0
290
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
620
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
220
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
2k
IEEE802.1X認証を導入してみた
shinbunbun_
0
320
UBICの食材管理APIを作った話
shinbunbun_
0
240
Other Decks in Programming
See All in Programming
猫の手も借りたい!ので AIエージェント猫を作って社内に放した話 Claude Code × Container Lambda の Slack Bot "DevNeko"
naramomi7
0
260
What Spring Developers Should Know About Jakarta EE
ivargrimstad
0
150
CSC307 Lecture 14
javiergs
PRO
0
470
AWS×クラウドネイティブソフトウェア設計 / AWS x Cloud-Native Software Design
nrslib
15
3k
Go1.26 go fixをプロダクトに適用して困ったこと
kurakura0916
0
360
エラーログのマスキングの仕組みづくりに役立ったASTの話
kumoichi
0
180
Railsの気持ちを考えながらコントローラとビューを整頓する/tidying-rails-controllers-and-views-as-rails-think
moro
5
390
Ruby and LLM Ecosystem 2nd
koic
1
490
RAGでハマりがちな"Excelの罠"を、データの構造化で突破する
harumiweb
9
2.7k
SourceGeneratorのマーカー属性問題について
htkym
0
180
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
7.9k
Claude Code の Skill で複雑な既存仕様をすっきり整理しよう
yuichirokato
1
360
Featured
See All Featured
Practical Orchestrator
shlominoach
191
11k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
220
Heart Work Chapter 1 - Part 1
lfama
PRO
5
35k
Building an army of robots
kneath
306
46k
For a Future-Friendly Web
brad_frost
183
10k
Music & Morning Musume
bryan
47
7.1k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
850
How to Talk to Developers About Accessibility
jct
2
150
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
68
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作ろう!