docs: document live Component preview workflow
Explain the wasmeld dev watch-build-package-deploy loop, isolated development service IDs, hash revisions, failure retention, cleanup behavior, and command options. Document the inactive-revision DELETE endpoint and the switch-before-unregister safety rule.
This commit is contained in:
@@ -56,6 +56,24 @@ cd console
|
||||
npm run dev
|
||||
```
|
||||
|
||||
## 组件开发
|
||||
|
||||
Console 启动后,使用开发模式监听组件源码和本地 WIT `replace`:
|
||||
|
||||
```bash
|
||||
cargo run -p wasmeld-package --bin wasmeld -- \
|
||||
dev components/echo/Cargo.toml --locked
|
||||
```
|
||||
|
||||
首次构建和每次源码变化都会自动完成 WIT 同步、Debug 编译、打包、注册和 Deployment
|
||||
切换。默认使用 `echo-dev` 这类独立服务 ID,并根据 Component 内容生成
|
||||
`0.1.0-dev.h<hash>` Revision,不会覆盖正式服务。新版本构建、校验或启动失败时,上一
|
||||
版本继续运行;切换成功后旧开发 Revision 会被注销并释放。
|
||||
|
||||
管理面每 5 秒刷新一次,可以直接在调用面板预览新版本。只构建并部署一次可使用
|
||||
`--once`;其它选项包括 `--id`、`--console`、`--release` 和 `--poll-ms`。管理 API
|
||||
地址也可通过 `WASMELD_CONSOLE` 设置。
|
||||
|
||||
构建组件:
|
||||
|
||||
```bash
|
||||
|
||||
Reference in New Issue
Block a user