|
|
Log in / Subscribe / Register

Shared libraries

Shared libraries

Posted Nov 25, 2025 17:55 UTC (Tue) by ssokolow (guest, #94568)
In reply to: Shared libraries by ibukanov
Parent article: APT Rust requirement raises questions

Of cause even with Rust one can expose things across shared libraries using C-ABI, but then Rust code calling such C-based API will have to use unsafe when calling those even when the implementation is fully safe.
I don't remember seeing unsafe use in the examples for the abi_stable crate.

It's a Rust-to-C-to-Rust binding generator for making things like .so-based systems, similar to how PyO3 will let you write code to interface Rust and Python and it'll take care of generating the unsafe bits and wrapping them up in invariant-enforcing abstractions.

There are a lot of that sort of binding helper for Rust:


to post comments


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