3 ms·
>calling conventions are important Curious what you mean by that, in what way learning C made you understand this better than Java or any other language did?
by leppr 10y ago
>calling conventions are important
Curious what you mean by that, in what way learning C made you understand this better than Java or any other language did?
- MrBuddyCasino 10y agoAs mentioned, I don't particularly like C, so I've explored Rust a bit. I tried to expose a Rust function to C, heres the signature: #[no_mangle] pub extern "C" fn count_substrings(value: *const c_char, substr: *const c_char) -> i32 So I came at it from the opposite direction, and once you go down the rabbit hole of what "no_mangle" and "extern C" does, thats where it leads you. Along the way you inevitably pick up topics like alignment and struct packing.