WeiTheShinobi opened PR #13638 from WeiTheShinobi:update_stable_api to bytecodealliance:main:
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->Solve a TODO:
Sincestd::mem::MaybeUninit<T>.write()has been stable, use it instead of the wrapperinitialize().
WeiTheShinobi requested pchickey for a review on PR #13638.
WeiTheShinobi requested wasmtime-core-reviewers for a review on PR #13638.
WeiTheShinobi edited PR #13638:
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->/// TODO: Replace calls to this function with /// https://doc.rust-lang.org/nightly/std/mem/union.MaybeUninit.html#method.write /// once it is stable.Solve a TODO:
Sincestd::mem::MaybeUninit<T>.write()has been stable, use it instead of the wrapperinitialize().
WeiTheShinobi edited PR #13638:
<!--
Please make sure you include the following information:
If this work has been discussed elsewhere, please include a link to that
conversation. If it was discussed in an issue, just mention "issue #...".Explain why this change is needed. If the details are in an issue already,
this can be brief.Our development process is documented in the Wasmtime book:
https://docs.wasmtime.dev/contributing-development-process.htmlPlease ensure all communication follows the code of conduct:
https://github.com/bytecodealliance/wasmtime/blob/main/CODE_OF_CONDUCT.md
-->/// TODO: Replace calls to this function with /// https://doc.rust-lang.org/nightly/std/mem/union.MaybeUninit.html#method.write /// once it is stable. pub(crate) fn initialize<T>(dst: &mut std::mem::MaybeUninit<T>, val: T) {Solve a TODO:
Sincestd::mem::MaybeUninit<T>.write()has been stable, use it instead of the wrapperinitialize().
WeiTheShinobi converted PR #13638 Use MaybeUninit.write instead of initialize<T> to a draft
WeiTheShinobi updated PR #13638.
WeiTheShinobi has marked PR #13638 as ready for review.
github-actions[bot] added the label wasmtime:c-api on PR #13638.
:thumbs_up: alexcrichton submitted PR review:
Thanks!
alexcrichton added PR #13638 Use MaybeUninit.write instead of initialize<T> to the merge queue
:check: alexcrichton merged PR #13638.
alexcrichton removed PR #13638 Use MaybeUninit.write instead of initialize<T> from the merge queue
Last updated: Jul 29 2026 at 05:03 UTC