Skip to content

Commit f13f42f

Browse files
authored
Enable new format for embedding component types by default (#1308)
This commit enables the support for the new format of type information embedded in custom sections for `wit-component` first implemented in #1260. The new format minimizes type information to only that which was bound for the `world` selected as opposed to all packages and interfaces regardless of whether they're referenced or not. A bug with this format was fixed with #1270 and shipped in Wasmtime 15 so there's at least one stable release that supports the old and the new without bugs. This commit turns on the new format by default while leaving in an environment variable to turn it off. This isn't expected to have any practical breakage at this time.
1 parent c3b322f commit f13f42f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/wit-component/src/metadata.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ pub fn encode(
191191
Some(true) => EncodingFormat::Next,
192192
Some(false) => EncodingFormat::Previous,
193193
None => match std::env::var("WIT_COMPONENT_NEW_ENCODE") {
194-
Ok(s) if s == "1" => EncodingFormat::Next,
195-
_ => EncodingFormat::Previous,
194+
Ok(s) if s == "0" => EncodingFormat::Previous,
195+
_ => EncodingFormat::Next,
196196
},
197197
};
198198

0 commit comments

Comments
 (0)