Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Wasm 101
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
Polina Gurtovaya
March 19, 2020
Programming
520
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Wasm 101
WebAssembly с нуля :)
Polina Gurtovaya
March 19, 2020
More Decks by Polina Gurtovaya
See All by Polina Gurtovaya
Не учите алгоритмы
hellsquirrel
1
1.1k
Давайте все заблокируем
hellsquirrel
0
370
Wasmысле?
hellsquirrel
0
280
Магия декларативныx схем.
hellsquirrel
0
400
ML for HolyJS
hellsquirrel
0
200
Идеальный способ заблюрить белочку
hellsquirrel
0
200
ML/DL на фронте
hellsquirrel
0
250
InsertableStreams
hellsquirrel
0
120
WebRTC-404
hellsquirrel
0
580
Other Decks in Programming
See All in Programming
TiDB Cloudのカスタムコントローラーによるオートスケール対応
takaidohigasi
0
130
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
240
GraphRAGのKnowledge Graphを 直接!見る/View-GraphRAG's-KnowledgeGraph-directly!
tyumugi1113
1
390
技術的負債を組織課題として解く-増えすぎたマイクロサービスとの戦い-
reimaru
1
2.3k
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
160
AWS Step Functions 大規模並列の壁を越える / jaws-sonic-2026-niigata-step-functions
kasacchiful
PRO
1
510
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
140
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
2.7k
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
4.9k
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
2.9k
標準パッケージに uuid が追加された 背景から見る Go らしい意思決定 / go_127_uuid_decision
convto
5
8.2k
難しいけど、読めた。- OSSの入口に立った話。
sts11142
0
120
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
330
41k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
23k
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
260
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
420
4 Signs Your Business is Dying
shpigford
187
23k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
300
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.8k
Have SEOs Ruined the Internet? - User Awareness of SEO in 2025
akashhashmi
0
500
Transcript
Wasm 101
2
3
4
5 Ссылка на слайды и прочие материалы будет в конце
доклада
Wasm 101
7 Wasm можно использовать везде кроме IE
8 WebAssembly Core
9 WebAssembly is a binary instruction format for a stack-based
virtual machine.
10 (func (export "add") (param i32) (param i32) (result i32)
local.get 0 local.get 1 i32.add) add(1, 2) Module Memory Function Instruction Table
11 .wasm и .wat У WebAssembly есть текстовое представление
12 (module (func $i (import "imports" "logger") (param i32)) (memory
(import "imports" "importedMemory") 1) (func (export "exportedFunc") i32.const 42 call $i) (func (export "add") (param i32 i32) (result i32) local.get 0 local.get 1 i32.add) (data (i32.const 0) "Fifty"))
Embeddings 13
Wasm и JavaScript — лучшие друзья 14 (module (func $i
(import "imports" "logger") (param i32)) (memory (import "imports" "importedMemory") 1) (func (export "exportedFunc") i32.const 42 call $i) (func (export "add") (param i32 i32) (result i32) local.get 0 local.get 1 i32.add) (data (i32.const 0) "tver.io")) const importedMemory = new WebAssembly.Memory({ initial: 1, maximum: 10 }); WebAssembly.instantiateStreaming(fetch("simple.wasm"), { imports: { logger: function(arg) { console.log("first function call", arg); }, importedMemory } }).then(obj => { obj.instance.exports.exportedFunc(); const three = obj.instance.exports.add(1, 2); console.log("1 + 2 =", three); var memoryArray = new Uint32Array(importedMemory.buffer, 0, 10); console.log( "reading from memory", new TextDecoder("utf8").decode(memoryArray) ); });
Мы поняли, что: Wasm = IR Wasm легко парсить Wasm
= легкий формат Wasm = песочница 15
Portability в примерах Pyodide Squoosh Unity 16
17 WebAssembly embeddings
18 Wasm это технология для Web?
19 Да: пилится под Web
20 Wasm design principles Модульность из коробки Живет в песочнице
Работает быстро Не ломает Web
21 Нет: может быть любой embedder
22 C/C++ wasm (emscripten)
23 JS vs. asm.js vs. wasm
Hello world на 300Кб 24
25 emcc -O3 \ -s ENVIRONMENT="web" \ -s EXTRA_EXPORTED_RUNTIME_METHODS='["cwrap"]' \
-I libwebp libwebp/src/{dec,dsp,demux,enc,mux,utils}/*.c \ -o encoder.js encoder.c Вот так можно скомпилировать libwebp в wasm
26 Что насчет других языков? wasm-pack Assembly Script
27 Performance
28 Скорость wasm зависит окружения
29 V8
30 V8
31 Чтобы все было быстро, делайте так: WebAssembly.instantiateStreaming Content-Type: application/wasm
32 Что планируется дальше? Status: MVP SIMD Threads
33 Wasm и webpack { test: /\.wasm$/, type: "javascript/auto", loader:
"file-loader" },
34 Как дебажить?
35 Как дебажить?
36 Wasm дополняет JS-экосистему Wasm = predictable performance Фууух, почти
все :)
37 Спасибо! @polina_gurtovaya @pgurtovaya
[email protected]
37 @evilmartians @evilmartians_ru evilmartians.com github.com/HellSquirrel/wasm-101-talk