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
Approaching WebAssembly
Search
Dan Callahan
June 24, 2017
Technology
160
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Approaching WebAssembly
Slides from my WebAssembly talk at WeRise.tech
Dan Callahan
June 24, 2017
More Decks by Dan Callahan
See All by Dan Callahan
Rust TechSpeakers Workshop Intro
callahad
0
48
Intro to Rust
callahad
1
150
Other Decks in Technology
See All in Technology
【CEDEC2026】『GRANBLUE FANTASY: Relink - Endless Ragnarok』のバトル制作事例 ~最高のキャラゲーを目指して~
cygames
PRO
0
250
第3回しろおびセキュリティスポンサーセッション
log0417
0
170
変化の早いClaude Codeを 書籍に落とし込む
oikon48
7
1.4k
FORENSIA: ローカルLLMフォレンジックハーネス
sumeshi
2
370
Pavlokで始める電撃駆動開発
sgrsn
0
190
制約理論(ToC)入門 2026版
recruitengineers
PRO
8
2.2k
メルカリのグローバルアプリで挑んだ AlloyDB 運用と課題解決の実践記
hatappi
0
240
FDEの心得
noriakioji
4
4.5k
Model Studio CLI × Token Plan
maigo999
0
160
Eight Engineering Unit 紹介資料
sansan33
PRO
3
8.2k
取引先から届く 「セキュリティチェックシート」の読み解き方
kamadamakoto
0
140
Cursor Meetup Sapporo - Cursor物語 続編
cocacola917
0
150
Featured
See All Featured
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
320
The Limits of Empathy - UXLibs8
cassininazir
1
600
<Decoding/> the Language of Devs - We Love SEO 2024
nikkihalliwell
1
280
The Invisible Side of Design
smashingmag
301
52k
StorybookのUI Testing Handbookを読んだ
zakiyama
31
6.9k
My Coaching Mixtape
mlcsv
0
220
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Darren the Foodie - Storyboard
khoart
PRO
3
3.6k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
2
3.7k
Mind Mapping
helmedeiros
PRO
1
310
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
460
Transcript
Approaching WebAssembly Dan Callahan (@callahad) <
[email protected]
>
None
None
None
None
Lin Clark @linclark hacks.mozilla.org /2017/02/a-cartoon-intro-to-webassembly
Lin Clark @linclark hacks.mozilla.org /2017/06/a-crash-course-in-memory-management/
Lin Clark @linclark youtube.com /watch?v=3GHJ4cbxsVQ
WebAssembly is a compiler target for programs on the Web.
Demos
Plugins were dying, but no replacement. JavaScript is hostile to
optimizations. Can’t re-use existing code on the Web. Why do we need WebAssembly?
Be as safe and universal as JavaScript Run as quickly
as native code Provide consistent, predictable performance Allow code re-use between Web and native Design goals for WebAssembly
WebAssembly is a direct successor to Mozilla’s asm.js.
Demos
WebAssembly is a low-level, binary format.
Live Coding
Performance Code Re-use Portability Reasons to use WebAssembly
Games (e.g., Unreal, Unity) Multimedia (e.g., AV1, FLIF, BPG) Performance
(e.g., KeeWeb, Mega) Libraries (e.g., OpenCV, Box2D, LibSass) 64-bit Math (e.g., MAME, SHA512) Where does WebAssembly make sense?
WebAssembly is an open standard supported by all major browsers.
None
WebAssembly is a general purpose virtual architecture.
None
None
A compiler target for the Web 1. Low-level, binary format
for programs 2. Open standard with cross-browser support 3. Direct successor of asm.js 4. General purpose virtual architecture What is WebAssembly, again?
Doesn’t replace JavaScript, but does expand the Web. Enables new,
hybrid (WASM + JS) designs. For compilers, Web is just another platform. WebAssembly is here. It works. Why is WebAssembly interesting?
Better Tools Multi-threading SIMD See Future Features for more What
is WebAssembly’s future?
FAQs
Is JavaScript dead or dying?
Is JavaScript dead or dying? JavaScript is alive.
Is JavaScript dead or dying? JavaScript is alive. Its client-side
monopoly is dead.
Is JavaScript dead or dying? JavaScript is alive. Its client-side
monopoly is dead. Each complements the other: - High-level vs. Low-level - Text vs. Binary
Is JavaScript dead or dying? JavaScript is alive. Its client-side
monopoly is dead. Each complements the other: - High-level vs. Low-level - Text vs. Binary WASM makes new things possible.
What about older browsers?
What about older browsers? Use asm.js as a fallback.
What about older browsers? Use asm.js as a fallback. C/C++
㱺 asm.js 㱺 wasm
What about older browsers? Use asm.js as a fallback. C/C++
㱺 asm.js 㱺 wasm 㱺 asm.js 㱺
What about older browsers? Use asm.js as a fallback. Emscripten
C/C++ 㱺 asm.js 㱺 wasm 㱺 asm.js 㱺
What about older browsers? Use asm.js as a fallback. Emscripten
Binaryen C/C++ 㱺 asm.js 㱺 wasm 㱺 asm.js 㱺
Can I compile JS to WASM?
Can I compile JS to WASM? Don’t do that.
Can I compile JS to WASM? Don’t do that. You’d
have to ship your own JS runtime.
Can I compile JS to WASM? Don’t do that. You’d
have to ship your own JS runtime. The one included with your browser is great.
What about type errors?
What about type errors? Like in JS, the browser coerces
types.
What about type errors? Like in JS, the browser coerces
types. There are well defined rules for this.
What about type errors? Like in JS, the browser coerces
types. There are well defined rules for this. No different from Math.sqrt(“hello world”);
Demos
Questions? Dan Callahan (@callahad) <
[email protected]
>