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
1
150
Approaching WebAssembly
Slides from my WebAssembly talk at WeRise.tech
Dan Callahan
June 24, 2017
Tweet
Share
More Decks by Dan Callahan
See All by Dan Callahan
Rust TechSpeakers Workshop Intro
callahad
0
40
Intro to Rust
callahad
1
130
Other Decks in Technology
See All in Technology
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
240
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
120
日経電子版のStoreKit2フルリニューアル
shimastripe
1
150
SDN の Hype Cycle を一通り経験してみて思うこと / Going through the Hype Cycle of SDN
mshindo
1
140
あなたの知らない Function.prototype.toString() の世界
mizdra
PRO
2
390
20241120_JAWS_東京_ランチタイムLT#17_AWS認定全冠の先へ
tsumita
2
310
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
ドメインの本質を掴む / Get the essence of the domain
sinsoku
2
160
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
テストコード品質を高めるためにMutation Testingライブラリ・Strykerを実戦導入してみた話
ysknsid25
7
2.7k
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
Featured
See All Featured
Agile that works and the tools we love
rasmusluckow
327
21k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
Building Your Own Lightsaber
phodgson
103
6.1k
For a Future-Friendly Web
brad_frost
175
9.4k
Designing Experiences People Love
moore
138
23k
How STYLIGHT went responsive
nonsquared
95
5.2k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
27
4.3k
GitHub's CSS Performance
jonrohan
1030
460k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
10 Git Anti Patterns You Should be Aware of
lemiorhan
655
59k
Practical Orchestrator
shlominoach
186
10k
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]
>