When I return i32 data from my C FFI functions, I use the datatype int32_t and it works like a charm. What is the equivalent of Rust's f64 datatype in C?
Use libc::c_double.
Other direct mappings:
f32 | c_float
f64 | c_double
i8 | int8_t
i16 | int16_t
i32 | int32_t
i64 | int64_t
u8 | uint8_t
u16 | uint16_t
u32 | uint32_t
u64 | uint64_t
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With