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
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の技術発表資料です
Claude Code × git worktree で並列開発 (続き) -差分のサービスだけを併設する-
nearme_tech
PRO
1
60
Claude Code × git worktree で並列開発 — サブモジュール構成のリポジトリで成立させる —
nearme_tech
PRO
0
74
LLM + 強化学習
nearme_tech
PRO
0
34
PosthogのA/Bテスト機能の紹介
nearme_tech
PRO
1
96
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
41
実務で役立つ幾何学 ボロノイ図の基礎から グラフ・ネットワーク応用まで
nearme_tech
PRO
1
81
SQL/ID抽出タスクから考える 実践的なハルシネーション対策
nearme_tech
PRO
1
92
Other Decks in Programming
See All in Programming
Intent as Code
shoppingjaws
6
1.1k
20260914 AIエージェント時代のPlatform Engineering LLM基盤とプロダクトの責務境界線
kanfab1
7
2.2k
ソニーのクラウド共通基盤の変遷とAI時代の開発スタイルに合わせた進化 / The Journey of Sony’s Common Cloud Platform and Its Evolution for AI-Native Development
kenjiyoneyama
0
140
一人だけ、Kiroが静止する日
hideg
0
130
Omarchy Tokyo やると聞いて UMPC 買ってセットアップしてきた
mtsmfm
0
170
Heart of Swift Concurrency
koher
0
1k
Snowflakeで業務アプリを作ろう。 Snowflakeのアプリ機能解説&実践ガイド
ayumu_yamaguchi
2
310
仕様駆動開発による爆速プロダクト開発 / Bakusoku Spec Driven Development
kobakei
0
140
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
690
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
4.2k
マイコン向けの軽量Ruby「PicoRuby」で各種デバイスを制御するネイティブアプリの実現手法
bash0c7
0
460
Featured
See All Featured
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6.1k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Amusing Abliteration
ianozsvald
1
320
RailsConf 2023
tenderlove
30
1.6k
A better future with KSS
kneath
240
18k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
370
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
410
The Invisible Side of Design
smashingmag
301
52k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.6k
AI Search: Where Are We & What Can We Do About It?
aleyda
0
8k
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
740
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