Implement the allow-unknown-exports option for the run command.#2879
Conversation
This commit implements the `--allow-unknown-exports` option to the CLI run command that will ignore unknown exports in a command module rather than return an error. Fixes bytecodealliance#2587.
Subscribe to Label Actioncc @peterhuene DetailsThis issue or pull request has been labeled: "wasmtime:api"Thus the following users have been cc'd because of the following labels:
To subscribe or unsubscribe from this label, edit the |
|
Wondering, maybe this should be the default behavior? |
As @sunfishcode explained in the linked issue, we don't want this to be the default because it means that these functions pose a risk of becoming de-facto standardized. If modules start being used widely that export functions under names that future standards might want to use, then we'd risk behavior changing in weird and unexpected ways, so we'd likely be forced to choose different names. This isn't a theoretical concern either: it's the reason why |
sunfishcode
left a comment
There was a problem hiding this comment.
Looks good to me. I recognize the practicality of having this option available 😄 .
This PR implements the
--allow-unknown-exportsoption to the CLI runcommand that will ignore unknown exports in a command module rather than
return an error.
Fixes #2587.