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.5k
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
5k
NixOSでもご自宅k8sがしたい!
shinbunbun_
2
5.1k
カーネルレベルでTwitterを禁止しよう
shinbunbun_
0
310
CRDTで始めるコンフリクトしないデータ同期
shinbunbun_
0
700
Haskell初心者がHaskellの楽しさについて語る
shinbunbun_
0
240
Rustで楕円曲線暗号の署名アルゴリズムをフルスクラッチ実装してみた話
shinbunbun_
0
2.4k
IEEE802.1X認証を導入してみた
shinbunbun_
0
340
UBICの食材管理APIを作った話
shinbunbun_
0
260
Other Decks in Programming
See All in Programming
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
490
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
210
PostgreSQL 18で考えるUUID主キー
kazuhiro1982
0
470
数百円から始めるRuby電子工作
tarosay
0
140
源内ハンズオン概要編
hideg
0
160
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
270
AIが無かった頃の素敵な出会いの話
codmoninc
1
410
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
210
Google Apps Script で Ruby を動かす
kawahara
0
150
yield再入門 #phpcon
o0h
PRO
0
1k
Android CLI
fornewid
0
220
OpenSpecのproposalにbrainstormingを持たせてみた
tigertora7571
1
220
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
408
67k
SEO for Brand Visibility & Recognition
aleyda
0
4.7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
240
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
290
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
200
Chasing Engaging Ingredients in Design
codingconduct
0
260
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.8k
Done Done
chrislema
186
16k
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作ろう!