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
なんでRustの環境構築してないのにRust製のツールが動くの? / Why Do Rust-...
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
TOMIKAWA Sotaro
October 25, 2025
Programming
57k
15
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
なんでRustの環境構築してないのにRust製のツールが動くの? / Why Do Rust-Based Tools Run Without a Rust Environment?
https://vuefes.jp/2025/
TOMIKAWA Sotaro
October 25, 2025
More Decks by TOMIKAWA Sotaro
See All by TOMIKAWA Sotaro
フロントエンドUIフレームワークのこれまでとこれから
ssssota
5
3.3k
ReactとSvelteのその先、Ripple-TS / Beyond React and Svelte: Ripple-TS
ssssota
3
2.8k
Atomics APIを知る / Understanding Atomics API
ssssota
2
1.5k
Web技術を最大限活用してRAW画像を現像する / Developing RAW Images on the Web
ssssota
2
3.5k
漸進。
ssssota
0
3.8k
Preact、HooksとSignalsの両立 / Preact: Harmonizing Hooks and Signals
ssssota
1
3.9k
useSyncExternalStoreを使いまくる
ssssota
6
7.2k
React CompilerとFine Grained Reactivityと宣言的UIのこれから / The next chapter of declarative UI
ssssota
8
6.4k
新しいAPI createRawSnippet触ってみた / What is the createRawSnippet?
ssssota
2
370
Other Decks in Programming
See All in Programming
ActionController meets Protocol Buffers
sorah
1
760
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
200
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
3
2k
sbt 2.0: takeoff
eed3si9n
0
180
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
150
AI主導のプログラミング学習アプリを作ってみた
econanringo
0
210
TS 7.0 で baseUrl が使えなくなった今、パスエイリアスをどうするか
bicstone
2
290
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
180
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
4.9k
golang-bob.pdf
iwatsukayura
0
150
AIが生成したコードは読むべきか?抽象化設計とコードの品質保証 / abstraction-design-and-quality
minodriven
12
7.8k
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
130
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
500
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
750
The SEO Collaboration Effect
kristinabergwall1
1
610
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
300
Practical Orchestrator
shlominoach
192
12k
A Soul's Torment
seathinner
8
3.9k
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
Dominate Local Search Results - an insider guide to GBP, reviews, and Local SEO
greggifford
PRO
0
390
A Modern Web Designer's Workflow
chriscoyier
699
190k
Building AI with AI
inesmontani
PRO
1
1.3k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
22k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.8k
Transcript
なんでRustの環境構築してないのに Rust製のツールが動くの? Why Do Rust-Based Tools Run Without a Rust
Environment? sssssota / #vuefes
深刻な「Rust製ツールチェイン侵⾷」問題 いま、フロントエンド開発を始めるとRust製のツールチェインが必ず登場する(?) Rolldown, Oxc, SWC, Biome, Deno, Rspack, Lightning CSS,
etc... その勢いはとどまるところを知らず、 ランタイム、エンジン、リンター、フォーマッター、バンドラー、などなど...
いや、待てよ...? JavaScriptのためにNode.jsは⼊れたけど、 「Rustの環境構築」してないぞ...?
なぜか動くRust製ツールたち なんでうごくの...?こわくなってきた...😰 Rust製ツールこわい npmでinstallしただけなのに (そうじゃないものもあるけど) なんなら、JavaScriptで機能を拡張したり協調して動くことだってある。ヒェッ ...主にパターンは3つ。CLIかNode-APIかWASM。
1. CLIベースのRust製ツール DenoやBiomeがこれに該当。 インストールすると、単純なCLI、バイナリが配置される。 Node.jsをインストールする行為に近い。 バイナリということは、OS/CPUによって対応してたりしてなかったり。 package.jsonの `optionalDependencies` という仕組みで OS/CPUに応じたバイナリがインストールされる。
2. Node-APIベースのRust製ツール Rolldown, Oxc, SWC, Rspackなどが該当。 OS/CPU依存のネイティブバイナリ、でもNode.jsと通信できる。 =Node-API Rustには、Node-APIを実装するためのフレームワークNAPI-RSがある。 NAPI-RSにより手軽にNode.jsとRustの世界をつなぐことができる。
3. WASMベースのRust製ツール WebAssemblyベースのRust製ツールはOS/CPUに依存しない。 →ブラウザ上でも動かせる。OS/CPU毎にビルドしなくて良い。 ただし、1,2のようなネイティブな手法よりは動作が遅い。 現在、RustからWASMを作る方法としては以下の2つが主流: 1. wasm-bindgen 2. NAPI-RS
(WASI) (上記のいずれも使わない方法もあるが省略)
WASM (WebAssembly: ワズム) WebAssemblyはいわば高階関数(関数を返す関数)みたいなもの できることは関数呼び出し、メモリ操作と計算だけ。Importsでできることが決まる
WASI (WebAssembly System Interface: ワズィ) WASIは入出力の仕様が決まっているWASM ファイルの読み書き、時間取得など入出力関数のシグネチャが定義されている。
3. WASMベースのRust製ツール(wasm-bindgen) wasm-bindgenは • 非WASIなWebAssembly • それを使うためのJavaScript + 型定義ファイル を出力する。
Rustで提供される標準ライブラリの大部分は使えない。 =ファイルシステムやネットワークへのアクセスには工夫が必要 一方、DOM操作APIをRustから使える仕組みがあるなどの利点もある。 SWCやNode.jsのTypeScript対応(Amaro)などで利用されている。
3. WASMベースのRust製ツール(NAPI-RS) NAPI-RSはWASIベースのWASMも出力できる。 wasm-bindgenと比べ制約も少なく、RustのコードベースをWASMにできる。 WASIなので、ファイルシステムなども扱えるし、WASMなのでブラウザで動く。 →ブラウザで動く開発環境(StackBlitz等)を支える主力な技術となっている
おわり Rust製ツールチェインは、 • ネイティブコンパイル (CLI / Node-API) • WASM (WASI)
により開発環境がなくてもJavaScriptと協調して動く。 今後のRust製ツールチェインの進化が怖い!