来源信息
- 仓库
- ffsshhttiikk/opencode-agents-skills
- 最近来源活动
- 2026年2月28日 22:55
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 3
- Forks
- 2
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- wasm
- description
- WebAssembly for high-performance browser code execution
- license
- MIT
- compatibility
- opencode
- metadata
- {"audience":"developers","category":"web-development"}
## What I do
- Write WebAssembly modules
- Use Rust/AssemblyScript for WASM
- Integrate WASM in web apps
- Optimize performance-critical code
## When to use me
When needing near-native performance in browsers.
## Rust to WASM
```rust
#[no_mangle]
pub extern "C" fn add(a: i32, b: i32) -> i32 {
a + b
}
```
```javascript
// Load WASM
const wasm = await WebAssembly.instantiateStreaming(
fetch('add.wasm')
);
wasm.instance.exports.add(1, 2); // 3
```
## JavaScript WASM Loading
```javascript
async function loadWasm(url) {
const response = await fetch(url);
const buffer = await response.arrayBuffer();
const wasm = await WebAssembly.instantiate(buffer);
return wasm.instance.exports;
}
```
在 GitHub 查看