From bcb43dc00878c931c1ec353d96bf104675566cd5 Mon Sep 17 00:00:00 2001 From: Alex Crichton Date: Fri, 3 Apr 2026 07:43:09 -0700 Subject: [PATCH] Adjust validation of `memory` in `canonopt`s Change the subtyping check to check for `(memory 0)` instead of `(memory 1)` to allow memories that start empty but are allowed to grow. This is a bit more relaxed from the previous predicate while still restricting it to non-shared, 32-bit, 64k page-size memories. --- design/mvp/CanonicalABI.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/design/mvp/CanonicalABI.md b/design/mvp/CanonicalABI.md index 4257e46a..44750779 100644 --- a/design/mvp/CanonicalABI.md +++ b/design/mvp/CanonicalABI.md @@ -3187,7 +3187,7 @@ specifying `string-encoding=utf8` twice is an error. Each individual option, if present, is validated as such: * `string-encoding=N` - can be passed at most once, regardless of `N`. -* `memory` - this is a subtype of `(memory 1)` +* `memory` - this is a subtype of `(memory 0)` * `realloc` - the function has type `(func (param i32 i32 i32 i32) (result i32))` * if `realloc` is present, then `memory` must be present * `post-return` - only allowed on [`canon lift`](#canon-lift), which has rules