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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yuto Takamune
September 29, 2023
Programming
2.3k
0
Share
RustのLINEBot SDKを自作した話
Yuto Takamune
September 29, 2023
More Decks by Yuto Takamune
See All by Yuto Takamune
GPT-3.5 Turbo をファインチューニングして自分のクローンを作った話
shinbunbun_
1
380
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
4.7k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
4.8k
カーネルレベルでTwitterを禁止しよう
shinbunbun_
0
300
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
640
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
230
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
2.2k
IEEE802.1X認証を導入してみた
shinbunbun_
0
320
UBICの食材管理APIを作った話
shinbunbun_
0
250
Other Decks in Programming
See All in Programming
Firefoxにコントリビューションして得られた学び
ken7253
2
160
Agentic Elixir
whatyouhide
0
450
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
28
20k
ついに来た!本格的なマルチクラウド時代の Google Cloud
maroon1st
0
410
Explore CoroutineScope
tomoeng11
0
180
「OSSがあるなら自作するな」は AI時代も正しいか ── Build vs Adopt の新しい判断基準
kumorn5s
7
2.6k
My daily life on Ruby
a_matsuda
3
280
Kubernetesを使わない環境にもCloud Nativeなデプロイを実現する / Enabling Cloud Native deployments without the complexity of Kubernetes
linyows
3
380
Agentic UI in the Frontend: Architectures with Open Standards @JAX 2026 in Mainz
manfredsteyer
PRO
0
110
🦞OpenClaw works with AWS
licux
1
350
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
600
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
450
Featured
See All Featured
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
110
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
270
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.2k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.2k
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
2k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
320
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
A designer walks into a library…
pauljervisheath
211
24k
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作ろう!