3 ms·
Rust's combination of no GC, unsafe escape hatch, and zero-cost C ABI FFI (both function calls and struct layouts) are among its biggest technically differentia
by kllrnohj 9y ago
Rust's combination of no GC, unsafe escape hatch, and zero-cost C ABI FFI (both function calls and struct layouts) are among its biggest technically differentiating factors.
The FFI story seems to be overshadowed, but if you want to use things like Vulkan, DX12, etc... then C FFI performance becomes absolutely critical, and many languages are really bad at it.
- vvanders 9y agoI think the importance of selecting a C FFI is very much undersold. You pretty much get interop with every major language for free. I've embedded Rust in Python, Java, C# and WASM/ASMJS pretty much with just that one feature alone. Also makes the migration story really strong, which I think was largely driven by needing to be integrated into FireFox in a sane way.
- nickpsecurity 9y agoI've gone further to say the freight train of an ecosystem behind and legacy effects of C mean any intended replacement should be fully compatible with its structure, calling conventions, etc. This lets anyone leverage existing C libraries or those in new language seemlessly. From there, the new stuff might all be done in better language with optional, incremental rewrites of older stuff. https://lobste.rs/s/5pnqdv/why_is_sqlite_coded_c#c_vhdcyt https://lobste.rs/s/5pnqdv/why_is_sqlite_coded_c#c_vhdcyt
- earenndil 9y agoAcide from GC, all of those apply to d.