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
140
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
28
Intro to Rust
callahad
1
130
Other Decks in Technology
See All in Technology
コンテナセキュリティの基本と脅威への対策
kyohmizu
3
620
なぜ NOT A HOTEL が Web3 に取り組むのか - NOT A HOTEL TECH TALK
ynunokawa
0
160
The CloudCompare project by Dr. Daniel Girardeau-Montaut
kentaitakura
0
480
少数チームで挑む: SwiftUI, TCA, KMPを用いた 新規動画配信アプリ 「ABEMA Live」の開発について
tomu28
0
480
キャラクター制御のためのプロンプト術 for LINE Bot
uezo
0
490
社内勉強会運営のコツ
senoo
6
1.1k
人間の尊厳、幸福、アクセシビリティ / 第116回「WEB TOUCH MEETING」アクセシビリティSP
nulabinc
PRO
2
160
NLP2024 参加報告LT ~RAGの生成評価と懇親戦略~ / nlp2024_attendee_presentation_LT_masuda
taro_masuda
1
190
Tebiki株式会社 エンジニア採用資料
tebiki
0
4k
Autonomous Database Cloud 技術詳細 / adb-s_technical_detail_jp
oracle4engineer
PRO
13
35k
Pedestrian-Centric大規模交通安全映像解析向けWoven Traffic Safety (WTS) データセットの紹介
kbuster
0
140
株式会社EventHub・エンジニア採用資料
eventhub
0
1.9k
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
21
3.9k
Stop Working from a Prison Cell
hatefulcrawdad
265
19k
Large-scale JavaScript Application Architecture
addyosmani
502
110k
A designer walks into a library…
pauljervisheath
199
23k
GraphQLとの向き合い方2022年版
quramy
29
12k
The Invisible Side of Design
smashingmag
293
49k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
118
38k
Fireside Chat
paigeccino
19
2.6k
A Tale of Four Properties
chriscoyier
150
22k
Visualization
eitanlees
135
14k
Git: the NoSQL Database
bkeepers
PRO
421
63k
No one is an island. Learnings from fostering a developers community.
thoeni
14
2.1k
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]
>