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
Hono v3 - Do Everything, Run Anywhere, But Smal...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Yusuke Wada
January 24, 2023
Programming
1.3k
4
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Hono v3 - Do Everything, Run Anywhere, But Small, And Faster
About the next major version of Hono. "v3".
Yusuke Wada
January 24, 2023
More Decks by Yusuke Wada
See All by Yusuke Wada
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
7
2.3k
Webフレームワークの ベンチマークについて
yusukebe
0
240
AI時代のUIはどこへ行く?その2!
yusukebe
22
8.4k
Dynamic Workersについて
yusukebe
2
770
飯MCP
yusukebe
0
700
へんな働き方
yusukebe
6
3.1k
Cap'n Webについて
yusukebe
0
390
OSS開発者の憂鬱
yusukebe
18
35k
r2-image-worker
yusukebe
1
300
Other Decks in Programming
See All in Programming
S3 を使うアプリケーションをローカル完結で動かすことに全力を注いでみた / Running S3 Apps Offline
contour_gara
0
580
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.9k
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
340
ソフトウェアラスタライザ
fadis
1
480
リアルな遅延を測る仕様
kota_yata
1
120
TSX の <Hoge<Fuga>> という構文に驚いた話 / tsx-type-argument-syntax
kanaru0928
0
240
170k Jobs a Day on GKE: Scaling Mercari's CI Platform - and What's Next for AI-Native Development
junyaokabe
0
120
2年かけて Deno に DOMMatrix を実装した話 / How I implemented DOMMatrix in Deno over two years
petamoriken
0
220
Dockerfile CMD for Node.js
grazie1999
0
110
Flow は今どうなっているか
mizdra
PRO
0
680
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
140
AWS DevOps AgentのAzure接続機能を検証して見えた活用法/Use Cases Verified for the AWS DevOps Agent's Azure Connectivity Feature
masakiokuda
1
260
Featured
See All Featured
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
220
Optimising Largest Contentful Paint
csswizardry
37
3.9k
Practical Orchestrator
shlominoach
191
12k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
210
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
3
470
Building Adaptive Systems
keathley
44
3.2k
Claude Code のすすめ
schroneko
67
230k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.8k
Into the Great Unknown - MozCon
thekraken
41
2.7k
Transcript
Yusuke Wada 2023-01-24 Serverless Frontend Meetup Hono v3 Do Everything,
Run Anywhere, But Small, And Faster * will be released soon!
Me • Yusuke Wada • Supervisor at TravelBook Inc. •
Web developer, Web framework developer • https://yusukebe.com/ • https://github.com/yusukebe 2
Ultrafast web framework for Cloudflare Workers, Deno, Bun, and Node.js
3 What's Hono?
Without Hono
With Hono
6 Web frameworks/routers for Cloudflare Workers •itty-router ~550 bytes •Sunder
•Worktop •Hono
•Fast - 3+1 Routers •Tiny - about 20kB •Multi-runtimes -
CF, Fastly, Deno, Bun, Lagon, Node.js •Fine DX - TypeScript •Batteries Included - Middleware 7 Hono Features
•Deno •Deno Benchmark •cdnjs •Ultra - Deno/React SSR Framework •Cloud
fl are D1 example •substats •Kings League Project •react-starter-kit •Driv.ly 8 Who uses Hono?
Demo 1-minute deploy 9
Current version v2.7.5 shipped today 10
Going to "v3" Not released yet but will be soon.
11 Do Everything, Run Anywhere, But Small, And Faster
Run anywhere 12
13 Multi-runtimes CI support
Node.js support 14
Adapters 15 Cloud fl are Workers, Cloud fl are Pages,
Bun, Deno are available
Cloudflare Pages
`/functions` 17
Next.js Edge API Routes
Use middleware on Vercel 19
Anywhere! thanks to Web Standard • Cloud fl are Workers
• Cloud fl are Pages • Fastly Compute@Edge • Deno • Bun • Lagon • Vercel • Node.js • ... 20 Hono may work on every JavaScript runtime!
Faster 21
Performance improvement 22 15% faster! 3% slower:( Using https://github.com/SaltyAom/bun-http-framework-benchmark Measured
on 2023-01-22
Small 23
A little fatter, but still small. 24 Express => 572
kB Fastify => 1.2 MB
[email protected]
=> 48 kB
Pico - Ultratiny web framework 25 https://github.com/yusukebe/pico May be placed
on @hono/pico ??
Do everything 26
RPC mode - like tRPC but integrated, too simple 27
1. Server: Write the schema 28
2. Use `zod-validator` Middleware 29
3. Write the endpoint with `jsonT()` and `build()` 30
4. Export "types" 31
5. Client: Use `@honoj/hc` and import "types" 32
6. Post JSON and parse the response 33
Share the API specs 34
Demo: https://github.com/honojs/hono/issues/727#issuecomment-1369078973 35
Great 👍 36
`create hono` command 37
@honojs to `@hono` ! 38 • We can make packages
such middleware as `@hono/xxx` • Middleware • @hono/zod-validator • @hono/qwik-city • @hono/graphql-server - by @metrue • @hono/sentry by @sam-lippert • @hono/ fi rebase-auth by @Code-Hex • @hono/node-server • @hono/hc
Ecosystem 39 Hono Middleware hc node-server Adapter Pico `create hono`
@hono/qwik-city 40 Works on Cloud fl are Workers and Bun
(also on Deno?)
It works on your runtime if it works on Hono
41
Others • `HonoRequest` • `HTTPException` • Router - regexp with
slash support 42
Hono v3 will be released soon! 43