|
|
Subscribe / Log in / New account

Packaging Rust for Fedora

Packaging Rust for Fedora

Posted Oct 30, 2022 17:09 UTC (Sun) by ssokolow (guest, #94568)
In reply to: Packaging Rust for Fedora by khim
Parent article: Packaging Rust for Fedora

There is no free lunch. Either you have ABI-stable standard library or shared libraries are, basically, impossible.
Or you marshal your data in some way, like the abi_stable crate does for enabling dlopen-able libraries using higher-level Rust constructs via Rust-Rust FFI through the C ABI.
And it's not as if Rust standard library can do sudden, radical, changes. It just wasn't in use for as long as C++ one.
The Rust standard library has two advantages over C++ on that front:
  1. Static linking and no stable ABI (eg. Rust 1.0 didn't do automatic structure packing. That was added later.)
  2. Stronger API encapsulation (Rust has already done things C++ balked at, such as Rust 1.36 swapping out its original, slower HashMap implementation for a vendored copy of a port of Google's SwissTable. There's currently a PR being refined to replace the internals of std::sync::mpsc with a vendored copy of crossbeam-channel.)


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds