ZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 4 days agoIt's official, Rust is an anti C/C++ elitist slurlemmy.worldimagemessage-square87fedilinkarrow-up1402arrow-down131
arrow-up1371arrow-down1imageIt's official, Rust is an anti C/C++ elitist slurlemmy.worldZILtoid1991@lemmy.world to Programmer Humor@programming.dev · 4 days agomessage-square87fedilink
minus-squareteolan@lemmy.worldlinkfedilinkarrow-up8·4 days agoI’m suggesting building a Rust library and exposing a C ABI. That’s what rsvg does for example.
minus-squareCanadaPlus@lemmy.sdf.orglinkfedilinkarrow-up3·edit-24 days agoOh. There’s a still Rust-y way to do this? Nevermind. OP wanted stability and predictability. I suppose we’ll see how entrenched one library can become.
minus-squareEphera@lemmy.mllinkfedilinkarrow-up2·3 days agoYeah, Rust has pretty good integration of it: https://doc.rust-lang.org/nomicon/ffi.html#calling-rust-code-from-c You do lose some of the Rust-y-ness, because obviously the C ABI is much more simplistic, but in terms of a stable ABI, it’s impossible to beat C.
I’m suggesting building a Rust library and exposing a C ABI. That’s what rsvg does for example.
Oh. There’s a still Rust-y way to do this? Nevermind.
OP wanted stability and predictability. I suppose we’ll see how entrenched one library can become.
Yeah, Rust has pretty good integration of it: https://doc.rust-lang.org/nomicon/ffi.html#calling-rust-code-from-c
You do lose some of the Rust-y-ness, because obviously the C ABI is much more simplistic, but in terms of a stable ABI, it’s impossible to beat C.