8d8d1365100a86d93c5e4a0c580d951631b38842
Introduce an injectable, deadline-aware KvBackend boundary and link only the exact wasmeld:kv/store@0.1.0 import requested by a Component. Namespace entries by service ID so revisions share state while services remain isolated, reject registrations without a backend, and enforce 256-byte keys and 64 KiB values. Cover capability discovery, cross-revision sharing, service isolation, missing backends, and resource limits with Component integration tests.
Wasmeld
Wasmeld 是面向 WebAssembly Component 的服务运行与管理平台。内部服务编译为 Component,在受限 Wasmtime Sandbox 中以常驻 Actor 运行,并通过稳定 WIT 契约 暴露能力。
Runtime 内置版本化 Host Capability Registry。注册 Component 时会直接读取其 WIT
imports,只链接实际请求且版本完全匹配的 Host 能力;未知能力会被拒绝。能力不需要在
.wasmpkg 中重复声明,管理面会展示每个服务版本解析出的完整接口标识。
结构
crates/wasmeld-runtime Component Runtime 与 Sandbox
crates/wasmeld-console 管理 API 与持久化
crates/wasmeld-package wasmeld CLI、组件包与 WIT 依赖管理
components/ 示例 Component
console/ TanStack Start 管理面
wit/ Wasmeld WIT package 源码
启动
后端:
cargo +stable run -p wasmeld-console
后端会启动本地管理 API 127.0.0.1:8080 和公开数据面
0.0.0.0:8081。注册 Component 后,通过管理 API 激活一个版本:
curl -X POST http://127.0.0.1:8080/api/v1/deployments/echo/activate \
-H 'Content-Type: application/json' \
-d '{"revision":"0.1.0"}'
客户端只访问 Gateway,并以原始二进制请求调用活动版本:
curl http://127.0.0.1:8081/v1/services/echo/invoke \
-H 'Content-Type: application/octet-stream' \
--data-binary 'hello'
管理面:
cd console
npm run dev
构建组件:
cargo run -p wasmeld-package --bin wasmeld -- \
pack components/echo/Cargo.toml --locked
发布 WIT Package:
cargo run -p wasmeld-package --bin wasmeld -- \
wit publish wit/service --registry http://127.0.0.1:8080
组件在 wasmeld.toml 中声明 Registry 和精确版本依赖,wasmeld wit fetch 会递归
解析依赖、生成 wit/deps,并将完整解析结果记录在 wit.lock。本地开发可使用
[replace] 临时覆盖 Registry 来源。
Description
Languages
Rust
72.2%
TypeScript
18.3%
CSS
8.5%
JavaScript
1%