What changes to WIT are "compatible" and which are not?

未关闭
#335 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
50/100
Issue 类型
文档
描述清晰度
基本清楚
活跃度
冷清
技术栈
wasm
领域
documentation

调研方向

首先查看 issue 中列出的 WIT 兼容性场景,以及链接的 Protobuf“Updating a Message Type”指南。记录六项更改中的每一项在 old-host/new-guest 和 new-host/old-guest 方向上是否兼容,包括相关条件和限制。

由索引模型根据 Issue 内容生成。

描述

Suppose I have a WIT definition, and some old WebAssembly components built/defined using the old definition, and then I want to make a change to my interface without requiring the component to be modified or rebuilt. Or perhaps I want to do the same in the reverse direction—make a change to my WASM component that remains backward-compatible with a host using an older WIT.

What changes to the WIT could be considered "compatible", if any, and which are not?

In essence, I'm looking for guidance similar to what Protobuf offers in their Updating a Message Type documentation.

A few example questions/scenarios I can think of: are the following compatible in one or both directions (old host/new guest vs. new guest/old host)?

  1. Removing an argument to a function
  2. Adding a new optional argument to a function
  3. Adding a new optional field to a struct
  4. Removing a field from a struct
  5. Adding a new case to a variant
  6. Removing a case from a variant
主要语言
Rust
星标
137
派生
88
平均合并
10 小时 38 分钟
30 天内合并 PR
2

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

bytecodealliance/component-docs 的其他 Issue

查看 bytecodealliance/component-docs 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。