-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove libc dependencies #284
Conversation
@Tacha-S this is looking great, thanks! Let us know when it's ready for review |
I was developing with 1.64. https://doc.rust-lang.org/src/std/ffi/mod.rs.html#157 Which version should be support? |
I don't fully understand – the compiler error sounds like 1.63 has Either way, I think it would be nice to support 1.63 if it's not too ugly. Maybe that requires using |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks pretty good to me! I only saw one spot where a comment's phrasing seemed a little odd.
That being said, a second pair of eyes would be useful, I think. Just in case I missed something.
out_seq.resize_to_at_least(in_seq.len()); | ||
out_seq.clone_from_slice(in_seq.as_slice()); | ||
true | ||
// SAFETY: This is safe since a the point is guaranteed to be valid/initialized. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
// SAFETY: This is safe since a the point is guaranteed to be valid/initialized. | |
// SAFETY: This is safe since the pointer is guaranteed to be valid/initialized. |
rosidl_runtime_rs/src/traits.rs
Outdated
@@ -42,7 +42,7 @@ pub trait RmwMessage: Clone + Debug + Default + Send + Sync + Message { | |||
const TYPE_NAME: &'static str; | |||
|
|||
/// Get a pointer to the correct `rosidl_message_type_support_t` structure. | |||
fn get_type_support() -> libc::uintptr_t; | |||
fn get_type_support() -> usize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While we're here – could we make this pointer and the one in the Service
trait a *const c_void
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
@nnmm does everything look okay to you?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work, thank you! :)
std::ffi