Stream: git-wasmtime

Topic: wasmtime / PR #4407 Remove dependency on the `region` crate


view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2022 at 18:03):

alexcrichton opened PR #4407 from remove-region to main:

This commit removes Wasmtime's dependency on the region crate. The
motivation for this came about when I was updating dependencies and saw
that region had a new major version at 3.0.0 as opposed to our
currently used 2.3 track. In reviewing the use cases of region within
Wasmtime I found two trends in particular which motivated this commit:

Overall I opted to remove the dependency on the region crate to avoid
chasing its versions over time. Unix-specific changes of protections
were easily changed to rustix::mm::mprotect. There were two locations
where a windows/unix split is now required and I subjectively ruled
"that seems ok". Finally removing region also meant that the "what is
the current page size" query needed to be inlined into
wasmtime_runtime, which I have also subjectively ruled "that seems
fine".

Finally one final refactoring here was that the unix.rs and linux.rs
split for the pooling allocator was merged. These two files already only
differed in one function so I slapped a cfg_if! in there to help
reduce the duplication.

<!--

Please ensure that the following steps are all taken care of before submitting
the PR.

Please ensure all communication adheres to the code of conduct.
-->

view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2022 at 18:41):

fitzgen submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2022 at 18:44):

alexcrichton has enabled auto merge for PR #4407.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2022 at 18:56):

sunfishcode submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2022 at 18:56):

sunfishcode submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2022 at 18:56):

sunfishcode created PR review comment:

These extra rustix::mm::* qualifiers are redundant because ProtFlags and MapFlags are already in scope.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2022 at 19:05):

alexcrichton updated PR #4407 from remove-region to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2022 at 20:32):

alexcrichton updated PR #4407 from remove-region to main.

view this post on Zulip Wasmtime GitHub notifications bot (Jul 07 2022 at 21:28):

alexcrichton merged PR #4407.


Last updated: Nov 22 2024 at 16:03 UTC