id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id
title
category
status
canonical_id
aliases
duplicate_of
source_trust_level
confidence_score
verification_status
tags
raw_sources
last_reinforced
github_commit
tech_stack
wiki-2026-0508-webassembly
WebAssembly
10_Wiki/Topics
verified
self
none
A
0.9
applied
webassembly
wasm
performance
compile-target
2026-05-10
pending
language
framework
WASM/Rust/C++
Web Platform / Wasmtime / WASI
WebAssembly
매 한 줄
"매 portable binary — near-native speed 의 web" . WASM 매 stack-based VM 의 bytecode — 모든 browser + Node + Wasmtime 의 실행. 2026 modern state 매 Component Model + WASI Preview 2 + GC + threads + SIMD — 매 server / edge / plugin 의 polyglot runtime.
매 핵심
매 binary format
Module : types / functions / memory / tables / imports / exports.
Linear memory : single contiguous ArrayBuffer — i32/i64/f32/f64 + v128 (SIMD).
Stack machine : structured control flow — block/loop/if + br/br_if.
Validation : load-time type-check — 매 sandboxed by design.
매 toolchain (2026)
Rust : wasm-bindgen + wasm-pack — 매 web ecosystem 의 dominant.
C/C++ : Emscripten / clang --target=wasm32-wasi.
AssemblyScript : TypeScript-like → WASM.
Go : TinyGo (small binary) / stdlib (large).
Zig / .NET / Kotlin / Swift : 매 first-class targets.
매 응용
CPU-heavy web : video codec / image processing / crypto / physics.
Edge compute : Cloudflare Workers / Fastly Compute@Edge — 매 cold-start <1ms.
Plugin systems : Figma / Shopify Functions / Envoy filters — 매 sandbox.
Server runtime : Wasmtime / Wasmer — 매 polyglot microservices.
💻 패턴
Rust → WASM 매 wasm-bindgen
Streaming instantiate
Linear memory 매 zero-copy
SIMD 매 v128
Threads 매 SharedArrayBuffer
Component Model + WASI
Edge: Cloudflare Workers
매 결정 기준
상황
WASM vs JS
Tight numeric loop
WASM 2-5x faster
DOM manipulation
JS — WASM 매 boundary cost
Large library port (FFmpeg, OpenCV)
WASM
<1KB hot path
JS — load + boundary overhead
Plugin sandbox
WASM 매 isolation
Edge cold-start
WASM — <1ms vs JS 5-50ms
기본값 : hot CPU path 의 Rust+wasm-bindgen / 일반 web logic 의 JS.
🔗 Graph
🤖 LLM 활용
언제 : CPU-bound hot path / portable plugin sandbox / edge runtime / large native library port.
언제 X : simple business logic — JS 매 충분 / DOM-heavy work / small one-off scripts.
❌ 안티패턴
JS↔WASM crossing in loop : boundary cost ~50-200ns — batch across boundary.
No streaming compile : instantiate(bytes) 의 main-thread block — instantiateStreaming 사용.
Memory growth thrash : pre-size WebAssembly.Memory.maximum.
String marshalling : UTF-8 copy 매 expensive — pass pointer+len, decode batch.
🧪 검증 / 중복
Verified (WebAssembly Specification 2.0 / WASI Preview 2 / W3C WebAssembly WG).
신뢰도 A.
🕓 Changelog
날짜
변경
2026-05-08
Phase 1
2026-05-10
Manual cleanup — toolchain, SIMD, threads, Component Model, edge patterns