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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
55
Claude Code × git worktree で並列開発 — サブモジュール構成のリポジトリで成立させる —
nearme_tech
PRO
0
59
LLM + 強化学習
nearme_tech
PRO
0
32
PosthogのA/Bテスト機能の紹介
nearme_tech
PRO
1
67
AIフレンドリーなプロダクトに向けて
nearme_tech
PRO
2
65
初めてのLean言語
nearme_tech
PRO
0
100
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
個人開発基盤をまるごとCloudflareに引っ越して爆速で総合的体験を向上させた話
tinykitten
0
190
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
110
AI Agent時代のリアーキテクチャ戦略と実践
hokaccha
9
4.5k
一参加者から『中の人』へ 〜全通PHPerがブースに立って学んだ、カンファレンスを100倍楽しむコツ〜
wp_daisuke
0
150
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
140
AWS DevOps Agentで インシデント対応をAIに任せたい
honmarkhunt
7
2.9k
新卒PdEのリアル
ryu1013
1
500
Kiroで創り、AgentCoreで繋ぐ!AWSで実践する「AI-DLC」から「AIエージェント統合」までの最新地図
licux
4
690
LL言語やWebフレームワークのPostgreSQL対応 〜DBの機能がユーザーに届くまで〜
kentaroutakeda
1
150
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
210
海上で動くGoサーバー: goroutineとchannelでさばく航行データストリーム
atsuki_seo
0
710
技術的負債の返済は、AI時代の複利で効く投資 — 経営としての意思決定とその遂行
curekoshimizu
0
1.3k
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.3k
Product Roadmaps are Hard
iamctodd
55
13k
Google's AI Overviews - The New Search
badams
0
1.6k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
Accessibility Awareness
sabderemane
1
210
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
Building Adaptive Systems
keathley
44
3.2k
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
Skip the Path - Find Your Career Trail
mkilby
1
230
Chasing Engaging Ingredients in Design
codingconduct
0
310
Making the Leap to Tech Lead
cromwellryan
135
10k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
430
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