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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Yuto Takamune
September 29, 2023
Programming
2.4k
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
380
セキュリティキャンプ2023 Y3分散合意ゼミ 最終発表
shinbunbun_
0
4.9k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
4.9k
カーネルレベルでTwitterを禁止しよう
shinbunbun_
0
310
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
670
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
230
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
2.4k
IEEE802.1X認証を導入してみた
shinbunbun_
0
330
UBICの食材管理APIを作った話
shinbunbun_
0
260
Other Decks in Programming
See All in Programming
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
130
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.7k
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
7.9k
JavaDoc 再入門
nagise
1
410
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
750
LaravelLive Japan の裏方のすべて — 第188回 PHP勉強会@東京 (2026-06-24)
suguruooki
2
120
Vite+ Unified Toolchain for the Web
naokihaba
0
340
The NotImplementedError Problem in Ruby
koic
1
920
New "Type" system on PicoRuby
pocke
1
1k
そのテスト、説明できますか?~LWテスト戦略FW~のご紹介
nakahara
0
160
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
560
正しくソフトウェアを作る、前提を疑うための認知の視点 / doubt-premise
minodriven
21
7k
Featured
See All Featured
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
330
Navigating Weather and Climate Data
rabernat
0
230
Utilizing Notion as your number one productivity tool
mfonobong
4
330
Scaling GitHub
holman
464
140k
Mind Mapping
helmedeiros
PRO
1
260
Designing for Performance
lara
611
70k
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
270
Product Roadmaps are Hard
iamctodd
PRO
55
12k
Measuring Dark Social's Impact On Conversion and Attribution
stephenakadiri
2
220
How to make the Groovebox
asonas
2
2.2k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.9k
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作ろう!