Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
AE Rust 勉強会: github-webhook-rs
Search
sksat
June 07, 2023
Programming
340
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
AE Rust 勉強会: github-webhook-rs
アークエッジ・スペース Rust 勉強会の懇親会で突発 LT したやつ
#arkedge_lt
connpass:
https://connpass.com/event/282286/
sksat
June 07, 2023
More Decks by sksat
See All by sksat
:syncing_time:
sksat
3
1.1k
探査機自作ゼミ2026
sksat
1
660
SIMD
sksat
1
32
同時複数機開発・運用のDevOpsサイクル高速化のための取り組み
sksat
0
1.3k
探査機自作ゼミ2025スライド
sksat
3
2.2k
人になにかを教えるときに考えていること(2025-05版 / VRC-LT #18)
sksat
6
2.5k
人工衛星開発のための C2A フレームワークとその開発体験
sksat
1
730
人工衛星の開発体験向上のために、ソフトウェアからできること
sksat
4
1.5k
3ヶ月でできる! 探査機自作ゼミ教材自作入門
sksat
6
4.1k
Other Decks in Programming
See All in Programming
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
160
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Findy - エンジニア向け会社紹介/Findy Company Deck
findyinc
6
400k
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
520
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6k
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
140
Verilogで学ぶCPU自作入門
uyuki234
8
4.1k
R8 の設定見直しでアプリサイズ削減
andpad
0
190
機械に任せるテスト、人が見るテスト ⽣成AIで引き直した、運⽤保守フェーズの線引き
dske104
0
170
APNsからLive Activityを開始する話
yumnumm
0
160
Turning Architecture into Unit Tests in the AI Era (NSSpain XIV)
steliosf
PRO
1
140
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
280
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
20k
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
1
620
Ethics towards AI in product and experience design
skipperchong
2
420
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
340
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
31
3.4k
Large-scale JavaScript Application Architecture
addyosmani
516
110k
SEO for Brand Visibility & Recognition
aleyda
0
4.8k
Amusing Abliteration
ianozsvald
1
330
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
490
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
280
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
590
Transcript
github-webhook-rs 2023/06/07 アークエッジ・スペース Rust 勉強会 sksat
自己紹介 - sksat - SW部正社員 && 学部2年生(2回目) - 中指を立てているわけではない(アイコン) -
ビルドシステム大臣 - Rust そのものより Cargo.toml と build.rs ばかり書いている - 不自由な開発環境の森を焼き尽くして回っている - 泣きながら CMakeLists.txt も殴る - ときどき社内システム(self-hosted Renovate, hubhook, etc)
hubhook - GitHub webhook を吸い上げて Slack に通知しまくる君 - インターン生時代に Rust
の練習に書いた - OSS - かなりの社員が使っている
なお実装 - Rust の練習で書いた - かなり雑なコード - 勢い良く unwrap() -
まあ panic しても k8s で走ってるのでいいが...... - しかし,通知を取りこぼすのは困る - どこでコケるのか? → webhook payload JSON の deserialize
GitHub webhook payload - かなり巨大な構造の JSON - serde 最高! -
巨大すぎて struct のメンテがダルい - でもできるだけ情報は取りたい - 実物を眺めて書き起こすのは面倒 - たまーに構造が一部変わる
octokit/webhooks - machine-readable, always up-to-date GitHub Webhooks specifications - 丁寧な
JSON Schema がメンテされている - TypeScript の型にも変換されてる - これだ!!!
Rust の型になってほしい!!! - serde-compatible な形で - JSON Schema -> Rust
あるでしょ - ex: schemafy - draft 7 未対応がちで怪しい雰囲気 - 他のファイル読み出しまくってる - 素直に変換すると使い勝手の悪い型に - 共通部分もそれぞれのフィールドとしてダンプされてしまう,など
ところで......? - octokit/webhooks/payload-types/schema.d.ts - TypeScript にはキレイな型がある - こういうのでいいんだよ,こういうので
TypeScript と Rust - なんか聞いたことあるな......?
swc - JS/TS compiler を Rust で書き直そうぜプロジェクト - 今コンパイラって言った?
I have a octokit/webhooks/payload-types/schema.d.ts I have a swc_ecma_parser
Oh!
できた
おわり - https://github.com/sksat/github-webhook-rs - 作ったはいいけどまだ使ってない(え?) - 最近社内ツールをリファクタして回って遊んでいるインターン生にめちゃめちゃリファク タしてもらった(ありがとう) - リファクタによって
JSON Schema 自力で読んでもいい気がしてきた(え?) - こらそこ TS で書いてもいいんじゃないかとか言わない