본문으로 건너뛰기
cccskills
무료GitHub에 공개

wasm-edge-computing-expert

Expert guide for WebAssembly (WASM) and Edge Computing. Covers WASI preview 2, Spin/Fermyon, Cloudflare Workers WASM, and high-performance browser computing / Panduan ahli untuk WebAssembly (WASM) dan Edge Computing. Mencakup WASI preview 2, Spin/Fermyon, Cloudflare Workers WASM, dan komputasi performa tinggi di browser.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

연동 도구Cloudflare
설치 방법 보기

포함된 파일(1)

  • SKILL.md5.3 KB

SKILL.md(원문)

설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.

WASM & Edge Computing Expert

English | Bahasa Indonesia


<a name="english"></a>

English

Description

A specialized guide for writing, compiling, and deploying WebAssembly (WASM) modules both on the Edge and in the browser. Covers the new WebAssembly System Interface (WASI) Preview 2, serverless execution environments (Spin, Cloudflare Workers, Fastly Compute), and bidirectional JavaScript-to-WASM interop.

Trigger Conditions

  • When porting heavy computational tasks (image processing, video encoding, cryptography) from JavaScript to Rust/Go via WASM.
  • When deploying ultra-fast, cold-start-free serverless functions on Cloudflare Workers or Fermyon Spin.
  • When the user asks about "WASI", "WebAssembly", or "Edge computing performance".
  • When bridging legacy C/C++ libraries to run in the browser using Emscripten.

Core Architectural Guidelines

1. Language Choice & Toolchain

  • Rust (Recommended): Use wasm-pack for browser modules and cargo component for WASI Preview 2. Rust offers the smallest binary sizes and no garbage collector overhead.
  • Go: Go 1.21+ has native WASI support (GOOS=wasip1 GOARCH=wasm), but binaries are larger due to the included runtime. Use TinyGo for smaller binaries.
  • AssemblyScript: Use when the team only knows TypeScript, though performance is slightly less than Rust.

2. Browser Integration (wasm-bindgen)

When writing Rust for the browser, minimize crossings between JS and WASM, as serialization is expensive.

use wasm_bindgen::prelude::*;

#[wasm_bindgen]
pub fn compute_heavy_task(input: &[u8]) -> Vec<u8> {
    // Process data entirely in WASM before returning
    input.iter().map(|&b| b.wrapping_add(1)).collect()
}

3. Edge & WASI Preview 2

WASI Preview 2 introduces the Component Model, allowing WASM modules to securely access system resources (HTTP, Filesystem) without being tied to a specific language.

  • Deploying to Cloudflare Workers:
    # wrangler.toml
    main = "./build/worker.js"
    [wasm_modules]
    MODULE = "./build/module.wasm"
    
  • Deploying to Fermyon Spin: Use the spin CLI to build microservices entirely in WASM that start in under 1 millisecond.

4. Shared Memory & Atomics

For multi-threaded browser WASM, use SharedArrayBuffer and Web Workers. Ensure your server sends the correct headers:

  • Cross-Origin-Opener-Policy: same-origin
  • Cross-Origin-Embedder-Policy: require-corp

Orchestration & Integration

  • Enhances api-gateway-proxy-expert for running custom logic at the edge (Cloudflare/Kong).
  • Integrates with rust-programming-expert or go-programming-expert for module compilation.
  • Pairs with performance-web-vitals to offload main-thread blocking tasks.

<a name="bahasa-indonesia"></a>

Bahasa Indonesia

Deskripsi

Panduan khusus untuk menulis, mengompilasi, dan mendeploy modul WebAssembly (WASM) baik di Edge maupun di browser. Mencakup WebAssembly System Interface (WASI) Preview 2, lingkungan serverless (Spin, Cloudflare Workers), dan interoperabilitas JavaScript-ke-WASM dua arah.

Kondisi Pemicu

  • Saat memindahkan tugas komputasi berat (pemrosesan gambar, kriptografi) dari JavaScript ke Rust/Go melalui WASM.
  • Saat mendeploy fungsi serverless ultra-cepat tanpa cold start di Cloudflare Workers atau Fermyon Spin.
  • Saat menjembatani library C/C++ lama untuk dijalankan di browser menggunakan Emscripten.

Panduan Arsitektur Inti

1. Pilihan Bahasa & Toolchain

  • Rust (Direkomendasikan): Menghasilkan ukuran biner terkecil. Gunakan wasm-pack untuk web dan cargo component untuk WASI.
  • Go: Gunakan TinyGo untuk ukuran modul yang lebih kecil, atau Go native GOOS=wasip1 untuk dukungan WASI penuh (namun biner akan lebih besar).
  • AssemblyScript: Jika tim hanya menguasai TypeScript.

2. Integrasi Browser

Minimalkan pertukaran data (crossing) antara JavaScript dan WASM karena biaya serialisasinya tinggi. Kirim array besar (seperti Uint8Array) sekali, proses seluruhnya di WASM, lalu kembalikan hasilnya.

3. Edge & WASI Preview 2 (Component Model)

WASI Preview 2 memungkinkan modul WASM mengakses resource sistem (HTTP, File) secara aman. Anda dapat mendeploy service WASM murni ke infrastruktur edge seperti Fermyon Spin atau Fastly dengan waktu mulai (startup time) di bawah 1 milidetik, jauh lebih cepat daripada container Docker tradisional.

4. Shared Memory & Web Workers

Untuk performa multi-threading sejati di browser menggunakan WASM, gunakan SharedArrayBuffer. Pastikan server Anda mengirimkan header keamanan COOP dan COEP yang diwajibkan oleh browser modern.

Integrasi Orkestrasi

  • Memperkuat api-gateway-proxy-expert untuk logika kustom di edge.
  • Terintegrasi dengan rust-programming-expert untuk kompilasi modul.
  • Melengkapi performance-web-vitals dengan memindahkan komputasi berat dari main thread JavaScript.

리뷰

아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.

댓글

로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.

아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.

보내면 바로 공개됩니다. 이메일 주소나 전화번호 같은 개인 정보는 쓰지 마세요. URL은 2개까지입니다.

0 / 1,000자

이 양식은 reCAPTCHA로 보호되며 Google 개인정보처리방침 및 서비스 약관이 적용됩니다.

같은 저장소의 스킬

Expert guide for automated and manual Web Accessibility (a11y) testing — axe-core, Pa11y, Playwright a11y, screen reader testing, and WCAG 2.2 Level AA/AAA compliance / Panduan ahli pengujian aksesibilitas web.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug802026년 10월 19일 업데이트

Expert guide for intelligent model cascading and routing — complexity-scored task routing from Flash/Haiku to Sonnet/Opus/Astra, dynamic escalation with quality gates, 40-60% token cost reduction while maintaining output quality / Panduan ahli untuk kaskade dan routing model cerdas — routing tugas berbasis skor kompleksitas dari Flash/Haiku ke Sonnet/Opus/Astra, eskalasi dinamis dengan gerbang kualitas, pengurangan biaya token 40-60% dengan kualitas output terjaga.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug802026년 10월 19일 업데이트

Expert guide for Affective Computing, emotional AI, and real-time sentiment analysis through native multimodal tokens (voice intonation and facial micro-expressions) / Panduan ahli komputasi afektif, AI emosional, dan analisis sentimen real-time melalui token multimodal native.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug802026년 10월 19일 업데이트

Expert guide for AI-assisted coding workflows — agentic code generation, multi-agent code swarms, self-healing CI/CD, automated PR review, spec-to-code pipelines, codebase knowledge graphs, and human-in-the-loop approval gates / Panduan ahli untuk workflow pengkodean berbasis AI — generasi kode agentic, code swarm multi-agen, CI/CD self-healing, review PR otomatis, pipeline spec-to-code, knowledge graph codebase, dan gate persetujuan human-in-the-loop.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug802026년 10월 19일 업데이트

Expert guide for autonomous Machine-to-Machine (M2M) agent settlement, dual-rail fiat & stablecoin micro-clearing, dynamic budget envelopes, and cryptographic agent invoicing / Panduan ahli settlement otonom antar-agen (M2M), kliring mikro dual-rail fiat & stablecoin, pagu anggaran dinamis, dan penagihan agen kriptografis.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug802026년 10월 19일 업데이트

Expert guide for long-term episodic memory integration (Mem0 v2, Letta/MemGPT, Zep v2), memory tier architecture, pgvector HNSW storage, and unified context management for autonomous AI agents / Panduan ahli untuk integrasi memori episodik jangka panjang (Mem0 v2, Letta/MemGPT, Zep v2), arsitektur tier memori, penyimpanan pgvector HNSW, dan manajemen konteks terpadu untuk agen AI otonom.

한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.

roedyrustam/vibes-plug802026년 10월 19일 업데이트

roedyrustam의 스킬 모두 보기

이 스킬의 문제 신고