pchickey opened PR #3271 from pch/flexible_ser_module_versioning
to main
:
<!--
Please ensure that the following steps are all taken care of before submitting
the PR.
[ ] This has been discussed in issue #..., or if not, please tell us why
here.[ ] A short description of what this does, why it is needed; if the
description becomes long, the matter should probably be discussed in an issue
first.[ ] This PR contains test cases, if meaningful.
- [ ] A reviewer from the core maintainer team has been assigned for this PR.
If you don't know who could review this, please indicate so. The list of
suggested reviewers on the right can help you.Please ensure all communication adheres to the code of conduct.
-->
pchickey updated PR #3271 from pch/flexible_ser_module_versioning
to main
.
pchickey updated PR #3271 from pch/flexible_ser_module_versioning
to main
.
peterhuene submitted PR review.
peterhuene created PR review comment:
:bike: shed: perhaps WasmtimeVersion to remove "cargo" from the identifier if we want to use this 1:1 from other language bindings (they don't know what cargo is).
peterhuene edited PR review comment.
pchickey submitted PR review.
pchickey created PR review comment:
Thanks, I like this idea.
The other thing to figure out is whether to sanitize custom strings to be less than 256 bytes somehow, or to change the length field in the binary to be a u64 instead of a byte.
peterhuene submitted PR review.
peterhuene created PR review comment:
I don't think it's unreasonable to document a length limit, personally.
We have other settings that return
Result<&mut Self>
too, so we could verify it at theConfig
level.
pchickey updated PR #3271 from pch/flexible_ser_module_versioning
to main
.
pchickey edited PR #3271 from pch/flexible_ser_module_versioning
to main
:
replace Config::deserialize_check_wasmtime_version with Config::module_version, which is more expressive.
Instead of just configuring Module::deserialize to ignore version
information, we can configure Module::serialize to emit a custom version
string, and Module::deserialize to check for that string. A new enum
ModuleVersionStrategy is declared, and
Config::deserialize_check_wasmtime_version:bool is replaced with
Config::module_version:ModuleVersionStrategy.For custom versioning, it used to be reasonable to wrap up a serialized module in your own container with its own version information. Now that we have mmap-based module loading, this is no longer as attractive, since it means giving up
Module::deserialize_file
.
pchickey requested peterhuene for a review on PR #3271.
pchickey has marked PR #3271 as ready for review.
pchickey updated PR #3271 from pch/flexible_ser_module_versioning
to main
.
peterhuene submitted PR review.
pchickey updated PR #3271 from pch/flexible_ser_module_versioning
to main
.
pchickey merged PR #3271.
Last updated: Nov 22 2024 at 16:03 UTC