FFIString
This is a small crate for moving strings across extern "C"
, giving FFI-safe version of String and &str
NOTE: You should also check out abi_stable, which I didn't know about when I made this crate
This crate contains two new types: FFIString
and FFIStr
These work just like String
and &'a str
, but with #[repr(C)]
Why?
I'm trying to make a game engine that loads game code at runtime, and I want both sides to be written in Rust. Without extern "C"
, both sides would need to be compiled with the exact same version of rustc, so I need a way to way to safely pass String
and &str
in a way that is FFI-safe
If you have any ideas on how this can be improved, please submit an issue on the repository