‹ 首页

wasm

@tinywasm · 收录于 1 周前 · 上游提交 1 周前

WebAssembly environment rules for tinywasm MCP server, frontend Go compatibility (tinywasm/fmt, tinywasm/time, tinywasm/json), and binary optimization. Use when working on WASM frontend code.

适合你,如果正在用 Go 开发 WebAssembly 前端应用

/ 通过 npx 安装 校验哈希
npx oh-my-skill add tinywasm/devflow/wasm
/ 通过 bash 安装
curl -fsSL https://oh-my-skill.com/install.sh | bash -s -- tinywasm/devflow/wasm
/ 已经装过?验证本机副本,不用重装
npx oh-my-skill verify tinywasm/devflow/wasm
安装目标可用 --agent / --scope 或 --to 明确指定;省略时只会在唯一已存在的 agent 目录上自动选择,零命中或多命中会停止并提示。content_hash 缺失或不一致均拒装。
1GitHub stars
~409上下文体积 · 单文件
索引托管

怎么用

商店整理自技能原文 · 版本 6481063 · 表述以原文为准
它做什么

装上后,Claude 会通过全局 MCP 服务器(端口 6060)管理 WebAssembly 项目,自动使用 tinywasm/fmt、tinywasm/time、tinywasm/json 等兼容库编写前端 Go 代码,并避免在 WASM 代码中使用 map 以减少二进制体积。

什么时候触发

当你在开发 WebAssembly 前端项目,或需要处理 tinywasm MCP 服务器相关任务时触发。

装好后可以这样说
Claude 会使用 tinywasm/fmt 替代标准库。
Claude 会移除 map 声明。
技能原文 SKILL.md作者撰写 · MIT · 6481063

WebAssembly

  • WebAssembly Environment (tinywasm):
  • Global MCP Server: The LLM interacts with projects exclusively via the global MCP server on port 6060. If it is not running, the LLM must start it using the tinywasm -mcp command.
  • Starting Development: Use the start_development MCP tool to run the project compiler and file watcher in the background (headless mode). Do NOT run tinywasm directly in a shell yourself to start a project.
  • TUI Client (Human): The human developer attaches to live logs by running tinywasm in their terminal (acting as a view-only SSE client). If they press Ctrl+C, the TUI closes but the project continues compiling/running in the background for you. To fully stop the active project, they press q.
  • Frontend Go Compatibility: Use standard library replacements for tinygo compatibility. Use tinywasm/fmt instead of fmt/strings/strconv/errors; tinywasm/time instead of time; and tinywasm/json instead of encoding/json.
  • Frontend Optimization: Avoid using map declarations in WASM code to prevent binary bloat. Use structs or slices for small collections instead.
  • Goroutines and Channels: TinyGo's WASM target (targets/wasm.json) uses "scheduler": "asyncify" by default. Channels and blocking channel operations (<-ch) are fully compatible — asyncify pauses the WASM goroutine, lets the JS event loop run, and resumes when the channel receives a value. The goroutine+channel pattern for JS async bridges (js.FuncOf callbacks sending into a channel) is safe and proven in tinywasm/indexdb.
按 MIT 许可原样转载,未经改动 · 在 GitHub 查看 →

评论

登录即可评论;带「已验证安装」的,是发布者名下有本店的安装或持有记录。