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
Lambdaと地方とコミュニティ
miu_crescent
2
240
Intuneお役立ちツールのご紹介
sukank
3
750
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
7
550
Oracle Cloud Infrastructureデータベース・クラウド:各バージョンのサポート期間
oracle4engineer
PRO
28
12k
dev 補講: プロダクトセキュリティ / Product security overview
wa6sn
0
1.6k
freeeのモバイルエンジニアについて
freee
1
100
株式会社島津製作所_研究開発(集団協業と知的生産)の現場を支える、OSS知識基盤システムの導入
akahane92
1
180
音声×Copilot オンコパの世界
kasada
1
110
【令和最新版】AWS Direct Connectと愉快なGWたちのおさらい
minorun365
PRO
2
140
신뢰할 수 있는 AI 검색 엔진을 만들기 위한 Liner의 여정
huffon
0
540
国土交通省 データコンペ参加者向け勉強会
takehikohashimoto
0
400
Spring Frameworkの新標準!? ~ RestClientとHTTPインターフェース入門 ~
ogiwarat
2
260
Featured
See All Featured
Gamification - CAS2011
davidbonilla
80
5k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
Code Reviewing Like a Champion
maltzj
520
39k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
32
1.8k
Teambox: Starting and Learning
jrom
133
8.8k
5 minutes of I Can Smell Your CMS
philhawksworth
202
19k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
BBQ
matthewcrist
85
9.3k
Making the Leap to Tech Lead
cromwellryan
133
8.9k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.2k
The Power of CSS Pseudo Elements
geoffreycrofte
73
5.3k
The Art of Programming - Codeland 2020
erikaheidi
52
13k
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]
>