ros2_rust icon indicating copy to clipboard operation
ros2_rust copied to clipboard

Remove libc dependencies

Open Tacha-S opened this issue 3 years ago • 4 comments

  • Replace libc crate with std::ffi
  • Remove realloc and memcpy workaround https://github.com/ros2-rust/ros2_rust/issues/215#issuecomment-1279723455

Tacha-S avatar Oct 16 '22 03:10 Tacha-S

@Tacha-S this is looking great, thanks! Let us know when it's ready for review

esteve avatar Oct 16 '22 09:10 esteve

I was developing with 1.64. But unfortunately 1.63(CI version) requires core::ffi instead of std::ffi.

https://doc.rust-lang.org/src/std/ffi/mod.rs.html#157

Which version should be support?

Tacha-S avatar Oct 17 '22 03:10 Tacha-S

I don't fully understand – the compiler error sounds like 1.63 has core::ffi, but the release notes and core::ffi docs look like that module was introduced with 1.64? Maybe these types were available but experimental in 1.63.

Either way, I think it would be nice to support 1.63 if it's not too ugly. Maybe that requires using std::os::raw after all.

nnmm avatar Oct 17 '22 09:10 nnmm

core::ffi was unstable before 1.64.0.

Tacha-S avatar Oct 17 '22 12:10 Tacha-S