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
ブラウザの外側でWasmを使おう
Search
teru0x1
July 24, 2023
Programming
0
300
ブラウザの外側でWasmを使おう
kernel/vm #16 LT
teru0x1
July 24, 2023
Tweet
Share
More Decks by teru0x1
See All by teru0x1
マルチクラスタの認知負荷に立ち向かう! Ubieのプラットフォームエンジニアリング
teru0x1
4
3.5k
スタブサーバ自動生成ツール 〜負荷試験をもっと楽に〜
teru0x1
0
1.7k
バッチシステムをクラウドネイティブにするために考えたこと
teru0x1
17
8.1k
クラウド環境をFargateに 移行して得た知見
teru0x1
0
1.5k
Goと定数 DMM.go #3
teru0x1
0
2.5k
はてなインターン2020成果発表
teru0x1
0
1k
入門QUIC
teru0x1
0
500
【衝撃】Archlinuxをインストールした結果がヤバすぎた!
teru0x1
0
68
Docker講習会
teru0x1
0
130
Other Decks in Programming
See All in Programming
color-scheme: light dark; を完全に理解する
uhyo
6
460
Domain-Driven Transformation
hschwentner
2
1.9k
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
7
4.1k
GitHub Actions × RAGでコードレビューの検証の結果
sho_000
0
280
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
120
Lottieアニメーションをカスタマイズしてみた
tahia910
0
130
Open source software: how to live long and go far
gaelvaroquaux
0
650
Code smarter, not harder - How AI Coding Tools Boost Your Productivity | Angular Meetup Berlin
danielsogl
0
100
第3回関東Kaggler会_AtCoderはKaggleの役に立つ
chettub
3
1.1k
React 19アップデートのために必要なこと
uhyo
4
720
『品質』という言葉が嫌いな理由
korimu
0
180
負債になりにくいCSSをデザイナとつくるには?
fsubal
10
2.5k
Featured
See All Featured
Automating Front-end Workflow
addyosmani
1368
200k
Bash Introduction
62gerente
611
210k
A Tale of Four Properties
chriscoyier
158
23k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
30
4.6k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
1k
Designing Experiences People Love
moore
140
23k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
Adopting Sorbet at Scale
ufuk
74
9.2k
How to train your dragon (web standard)
notwaldorf
91
5.8k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
4
420
Transcript
ブラウザの外側でWasmを使おう
本日話すこと WebAssembly(Wasm)
WebAssembly “binary instruction format for stack-based virtual machine” 実行環境: (当初)Webブラウザ
(現在) あらゆる環境 Safe: sandbox model import/export Efficient and fast: aim to executed at near-native speed Portable: language/platform independent Open and debuggable: WAT
WASI • WebAssembly System Interface • ファイルIOやネットワークIOなどのAPIセットを定めたもの ◦ POSIX的なもの •
Webブラウザの外でもポータビリティを持たせることが可能に ◦ ブラウザ内外問わず Wasmが使えるように https://github.com/bytecodealliance/wasmtime/blob/main/docs/W ASI-overview.md
Shopify function • ShopifyのインフラでECサイト開発者が作成 したコードを呼び出せる機能 ◦ Shopifyのインフラで動作 • Wasmが実行される ◦
Wasmにビルドできる言語ならなんでも使える • Wasmが採用された理由 ◦ Security ◦ Flexibility ◦ Performance https://shopify.engineering/shopify-webassembly
github.com/ncruces/go-sqlite3 • Golang製SQLite3のドライバの1つ • WasmにビルドしたSQLiteをラップし、 wazero(Go moduleとして使えるwasmラ ンタイム)から呼び出す • 既存の資産を利用しつつドライバをCGO
非依存にできる ◦ pure-goになって嬉しい ←sqlite3.wasm(1.4MB)
おわりに • Wasm/WASIとブラウザ外で使われるWasm事例を紹介 向いてそうな例 • プラットフォーム上で第三者にコードを実行させたい • ↑この際多様な言語の選択肢を提供したい • プラグインの仕組みを提供したい
◦ Proxy-Wasmなど • C/C++などの既存資産を利用したい
自己紹介 小野 輝也(@teru0x1) Software Engineer@Ubie We are hiring!