mun-lang / mun

Source code for the Mun language and runtime.
https://mun-lang.org
Other
1.83k stars 73 forks source link

Replace `*const` and `*mut` with `&` and `&mut` in mun_abi #422

Closed Wodann closed 1 year ago

Wodann commented 2 years ago

cbindgen supports conversion of references - with a lifetime - into pointers. Currently, we are using raw pointers in our mun_abi, but by converting them to references, we can make our Rust code safer.

Wodann commented 1 year ago

The remaining occurrences of raw pointers in the mun_abi are either dynamic arrays or strings. Those cannot currently be converted to safer Rust types: