News for hackers. Stuff that matters.
Re:Easy Mode Rust by kbolino on Friday April 05, 2024 @09:48AM (#39942351)
Rust does not have offsetof (the real deal, not some pointer-based hack in a third-party crate) and using FFI to call C or C++ practically requires bindgen which is not stable, not part of the standard library, and tricky to configure in a portable way. Rust also doesn't have a stable ABI yet though slow progress is being made.

If you can write pure Rust in a single library/binary these aren't major issues but as a drop-in replacement for C/C++ in many of the areas where those languages are heavily used today, the edges can be surprisingly sharp.

Re:Easy Mode Rust by steveklabnik on Friday April 05, 2024 @10:02AM (#39942498)
Re:Easy Mode Rust by eddd-ddde on Friday April 05, 2024 @09:56AM (#39942436)
For those kind of applications zig can do a more close feel to C while removing some of the pains such as error handling, matching, null checks, slices, etc.