This PR fixes not FFI-safe warnings when Rutie structs are used as return types.
You can reproduce the warning by building the Ruby example in this repo.
cd examples/rutie_ruby_example
cargo build
Output
warning: `extern` fn uses type `rutie::RString`, which is not FFI-safe
--> src/lib.rs:12:39
|
12 | fn pub_reverse(input: RString) -> RString {
| ^^^^^^^ not FFI-safe
|
= note: `#[warn(improper_ctypes_definitions)]` on by default
= help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
= note: this struct has unspecified layout
warning: `rutie_ruby_example` (lib) generated 1 warning
Hi, thanks for this project!
This PR fixes
not FFI-safe
warnings when Rutie structs are used as return types.You can reproduce the warning by building the Ruby example in this repo.
Output