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
Tab5をRubyで動くパソコンにする
kishima
1
170
PdMをやめて、 "プロダクトビルダー"という 働き方に変えました / PdM to Product Builder
shikichee
2
700
全員がプロダクトへ向き合う組織を持続成長させるために——組織づくりのフライホイールと4象限 / The Flywheel Model and Four Quadrants for Organizational Design
hiro_torii
3
790
AIエージェントを雇う前に決める5つのこと
knishioka
1
150
Bet AI Day 2026丨AIを「使う」から、AIが「働く」へ ― LayerXが進める「組織AI」の社会実装
layerx
PRO
2
2.1k
ブラウザアプリの継続的パフォーマンスモニタリング (序) / Continuous Browser Application Performance Monitoring; Act 1
moznion
0
110
Autonomous AI Databaseサービス・アップデート(FY27)/ adb-service-update-jp-fy27
oracle4engineer
PRO
0
100
AIで開発は速くなったのに、なぜ現場は楽にならないのか 〜あなたの組織のボトルネックを突き止めるワークショップ〜
jacopen
1
260
Backstageでつくるセルフサービスな社内開発基盤
kikunosuke75
1
240
Does an AI Watermark Survive Translation?
machinetranslation
0
520
APIセキュリティを組織で実現するには~注力する点と設計・実装に入れたい対策~
riiimparm
3
930
設計の世代交代を乗り越える、14年続くAndroidアプリの開発戦略
sansantech
PRO
1
120
Featured
See All Featured
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.7k
Heart Work Chapter 1 - Part 1
lfama
PRO
8
36k
[RailsConf 2023] Rails as a piece of cake
palkan
59
7k
Java REST API Framework Comparison - PWX 2021
mraible
34
9.7k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
490
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
600
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
230
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
660
Fireside Chat
paigeccino
42
4k
Ruling the World: When Life Gets Gamed
codingconduct
0
320
How to Talk to Developers About Accessibility
jct
2
540
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]
>