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入門
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
NearMeの技術発表資料です
PRO
January 19, 2025
Programming
230
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
WASM入門
NearMeの技術発表資料です
PRO
January 19, 2025
More Decks by NearMeの技術発表資料です
See All by NearMeの技術発表資料です
Claude Code × git worktree で並列開発 (続き) -差分のサービスだけを併設する-
nearme_tech
PRO
1
56
Claude Code × git worktree で並列開発 — サブモジュール構成のリポジトリで成立させる —
nearme_tech
PRO
0
70
LLM + 強化学習
nearme_tech
PRO
0
33
PosthogのA/Bテスト機能の紹介
nearme_tech
PRO
1
73
AIフレンドリーなプロダクトに向けて
nearme_tech
PRO
2
65
初めてのLean言語
nearme_tech
PRO
0
110
Apache Airflow Workflow orchestration without turning cron into spaghetti
nearme_tech
PRO
2
39
実務で役立つ幾何学 ボロノイ図の基礎から グラフ・ネットワーク応用まで
nearme_tech
PRO
1
77
SQL/ID抽出タスクから考える 実践的なハルシネーション対策
nearme_tech
PRO
1
90
Other Decks in Programming
See All in Programming
Jetpack Compose メカニズム
skydoves
0
440
wkhtmltopdfの次どうするか問題2026
willnet
2
1.4k
スマート反転とウェブアクセシビリティ
camiha
0
210
新卒PdEのリアル
ryu1013
1
500
thread_parallel_with_free-threaded_Python_and_NumPy.pdf
riku_sakamoto
0
340
Intent as Code
shoppingjaws
6
1k
C#の現在地 進化の歴史と、AI時代の.NET Everywhere
neuecc
4
2.6k
AI × TiDD / 2026.09.05 Redmine 大阪
tokudiro
1
170
What We Talk About When We Talk About XP
m_seki
2
650
Heart of Swift Concurrency
koher
0
900
SONY CISC-NEWS NWS-1750 + NWB-225 フレームバッファの NetBSD/news68k ドライバ実装 / OSC2026Hiroshima
tsutsui
0
120
LoopHub - ローカルで動く GitHub で、AI と共同開発
jugyo
1
560
Featured
See All Featured
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.6k
Collaborative Software Design: How to facilitate domain modelling decisions
baasie
1
320
Fashionably flexible responsive web design (full day workshop)
malarkey
409
67k
KATA
mclloyd
PRO
35
15k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Mind Mapping
helmedeiros
1
360
Building the Perfect Custom Keyboard
takai
2
880
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
5
680
My Coaching Mixtape
mlcsv
0
320
Designing Powerful Visuals for Engaging Learning
tmiket
1
570
The Pragmatic Product Professional
lauravandoore
37
7.4k
Transcript
0 WASM⼊⾨ 2025-01-17 第111回NearMe技術勉強会 @yujiosaka
1 WASMとは? • 低レベルのバイトコードフォーマット • C、C++、Rust等の⾔語のコンパイル対象 • ⾼性能なウェブアプリケーションを実現する • サーバーサイドでの利⽤が増加している
2 Write once, run anywhere Java バイトコード JVM ARM X86
中間表現
3 Write once, run anywhere WASM バイトコード WASM ランタイム ARM
X86 中間表現
4 Write once, run anywhere WASM ランタイム WASM バイトコード ARM
X86 Wasmtime 中間表現
5 WASMの特徴 • 性能 ‒ ほぼネイティブの速度で実⾏ • 多⾔語対応 ‒ 様々なプログラミング⾔語をサポート
• クロスプラットフォーム ‒ ブラウザやネイティブのランタイムに対応 • セキュリティ ‒ サンドボックス環境で実⾏ • クロスアーキテクチャ ‒ 複数のCPUアーキテクチャで実⾏(例:ARM、x86)
6 Confidential 6
7 性能 7
8 検証
9 コラッツ問題 3 Step ステップ数 n 5 8 4 2
1 10 16 1. 任意の正の整数nで開始 2. nが偶数なら2で割る 3. nが奇数なら3倍して1を⾜す 4. nが1になるまでこのプロセスを繰り返す 9
10 JavaScript vs. Rust function collatzSteps(n) { let counter =
0; while (n !== 1) { if (n % 2 === 0) { n /= 2; } else { n = 3 * n + 1; } counter++; } return counter; } pub fn collatz_steps(mut n: u64) -> u64 { let mut counter = 0; while n != 1 { if n % 2 == 0 { n /= 2; } else { n = 3 * n + 1; } counter += 1; } return counter; }
11 n = 670617279 の場合(必要ステップ数:986) 関数 Opt/Sec JS 32,172 WASM
1,465,898
12 n = 7 の場合(必要ステップ数:16) 関数 Opt/Sec JS 21,627,204 WASM
77,805,618
13 多⾔語対応 13
14 WASMにコンパイル可能な⾔語
15 クロスプラットフォーム 15
16 フロント エンド バック エンド エッジ 2025年時点でのユースケース
17 セキュリティ 17
18 JavaScriptの関数をインポートする use wasm_bindgen::prelude::*; #[wasm_bindgen] extern “C” { #[wasm_bindgen(js_namespace =
console)] fn log(s: &str) } #[wasm_bindgen] pub fn hello_world(name: &str) { log(&format!(“Hello, {}!”, name)); }
19 サンドボックスの実⾏環境 Shared Linear Memory hello_world(name: &str) log helloWorld(name: string)
console.log エクス ポート イン ポート 書き 込む 読み 込む 呼び 出す WASMモジュール
20 クロスアーキテクチャ 20
21 Numpyのディストリビューションとの⽐較
22 Thank you