wasmerio / wasmer

🚀 The leading Wasm Runtime supporting WASIX and WASI
https://wasmer.io
MIT License
19k stars 814 forks source link

use Pin<> in place of raw pointers when we require pin-like behaviour #1748

Open nlewycky opened 4 years ago

nlewycky commented 4 years ago

Motivation

Code cleanup!

Proposed solution

The VMContext objects have raw pointers in order to permit access by the compiler-generated code. In practice the pointed-to objects must not be moved or freed or replaced with object of different type. Rust allows us to encode exactly this property using the Pin<> type, and Pin<> is #[repr(transparent)] so they will still work with our existing compiler-generated code.

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 1 year ago

Feel free to reopen the issue if it has been closed by mistake.

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

theduke commented 2 months ago

Not stale.