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でつくるWebアプリケーション(2)
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
NearMeの技術発表資料です
PRO
January 20, 2023
Programming
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
RustでつくるWebアプリケーション(2)
NearMeの技術発表資料です
PRO
January 20, 2023
More Decks by NearMeの技術発表資料です
See All by NearMeの技術発表資料です
AIエージェントのための 隔離された安全なインフラ設計
nearme_tech
PRO
0
22
Claude Code × git worktree で並列開発 (続き) -差分のサービスだけを併設する-
nearme_tech
PRO
1
69
Claude Code × git worktree で並列開発 — サブモジュール構成のリポジトリで成立させる —
nearme_tech
PRO
0
79
LLM + 強化学習
nearme_tech
PRO
0
37
PosthogのA/Bテスト機能の紹介
nearme_tech
PRO
1
110
AIフレンドリーなプロダクトに向けて
nearme_tech
PRO
2
70
初めてのLean言語
nearme_tech
PRO
0
110
Apache Airflow Workflow orchestration without turning cron into spaghetti
nearme_tech
PRO
2
50
実務で役立つ幾何学 ボロノイ図の基礎から グラフ・ネットワーク応用まで
nearme_tech
PRO
1
93
Other Decks in Programming
See All in Programming
IBM Bob Dojo #1 仕様駆動開発入門
oniak3ibm
PRO
0
390
ChromeでローカルLLM
ryu1013
0
140
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.1k
TechTown - Creating Composable Callables in Contemporary C++
rollbear
0
130
個人開発者よ、Honoを使え(おじさんver)
tanahiro2010
2
260
Web Framework Benchmark Battle 2026, Any%
a_matsuda
2
2k
Railsのためのパスキー実践入門 〜マルチテナントSaaSでの意思決定〜
utakaha
2
550
[Dev Group Paris Octobre 26] Agentforce, SIforce, Claudeforce, Slackbot… on s'y retrouve ?
nabondance
0
110
Optunaを作ったときにやりたかったこと、その後 (2026/10/16, Optuna Meetup #3)
iwiwi
1
430
作って学ぶSpring BootのAuto Configuration / JJUG Night Seminar 2026-10-19
rshindo
0
150
AIに “答え“を書かせるのを やめてみた
___akari11
0
120
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
Featured
See All Featured
Become a Pro
speakerdeck
PRO
31
6.3k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
460
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
1
570
Mind Mapping
helmedeiros
1
400
Skip the Path - Find Your Career Trail
mkilby
1
260
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
74
43k
Between Models and Reality
mayunak
4
500
Accessibility Awareness
sabderemane
1
250
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
520
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
300
Practical Orchestrator
shlominoach
192
12k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
1
450
Transcript
0 RustでつくるWebアプリケーション(2) 2023-01-20 第29回NearMe技術勉強会 Asahi Kaito
1 今回は、RustとReactを用いたシングルページの アプリケーションを作成します!!
2 今後は、 (1) Reactの確認 (2) WebAssemblyについて (3) RustとReact ついてまとめます。
3 ですが、今回はその前段階として、 WebAssembly についてまとめます!!
4 WebAssembly(Wasm)について • Webブラウザで実行可能なバイナリ形式アセンブリライクな言語 → 字句解析と構文解析の大半を省くことができ、起動がより高速に • Webアプリケーションの高速化 → JavaScriptのような動的型付けの処理の一部をWasmに置きかえる
→ より高速な動作が期待される!! • Rust+Wasm → wasm-packを通してビルドできる
5 WebAssembly in Rust • JavaScriptの関数alertをRustで扱う → externを用いてalert関数を取り入れる #[wasm_bindgen] extern
{ pub fn alert(s: &str); }
6 WebAssembly in Rust • Rustで定義した関数をJavaScriptで扱う → #[wasm_bindgen]マクロを用いる #[wasm_bindgen] pub
fn greet(name: &str) { alert(&format!("Hello, {}", name)); } → 簡単にRustでWasmを利用できる!!
7 WebAssembly in Rust • JavaScriptでは... → greet関数とalert関数が以下のように扱われている /** *
@param {string} name */ export function greet(name) { const ptr0 = passStringToWasm0(name, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc); const len0 = WASM_VECTOR_LEN; wasm.greet(ptr0, len0); } export function __wbg_alert_8755b7883b6ce0ef(arg0, arg1) { alert(getStringFromWasm0(arg0, arg1)); };
8 参考文献 • WebAssemblyとは (https://qiita.com/ShuntaShirai/items/3ac92412720789576f22) • WebAssembly Rust(https://www.rust-lang.org/ja/what/wasm) • WebAssembly
from MDN (https://developer.mozilla.org/ja/docs/WebAssembly)
9 Thank you