|
|
Log in / Subscribe / Register

Swift vs Rust ABI

Swift vs Rust ABI

Posted Nov 24, 2025 23:15 UTC (Mon) by DemiMarie (subscriber, #164188)
In reply to: Shared libraries by zyga
Parent article: APT Rust requirement raises questions

Part of how Swift achieved ABI stability is to implicitly heap-allocate data in certain situations. I don’t believe this is permitted in Rust. In particular, Rust doesn’t require that a heap even exists.


to post comments

Swift vs Rust ABI

Posted Nov 25, 2025 2:11 UTC (Tue) by khim (subscriber, #9252) [Link] (4 responses)

That can be solved by declaring that thing an “std-only” feature.

There's nothing impossible there, but it's a lot of work—means it's unlikely to happen without serious funding… who can provide it?

Swift vs Rust ABI

Posted Nov 25, 2025 6:52 UTC (Tue) by josh (subscriber, #17465) [Link] (3 responses)

It's not just funding, because we've got a strong interest in trying it. It's design, because the Swift design is a good source of inspiration but not *exactly* what would work for Rust, in various different ways.

We're working on it, though.

Good to know that Rust is working on ABI!

Posted Nov 27, 2025 18:23 UTC (Thu) by DemiMarie (subscriber, #164188) [Link]

I’m glad to read this!

Swift vs Rust ABI

Posted Nov 28, 2025 9:51 UTC (Fri) by farnz (subscriber, #17727) [Link]

It's a really hard problem to get right, and I am extremely grateful that the Rust team is thinking it through, and not getting stuck with the first design that solves 99% of the problem space.

Swift vs Rust ABI

Posted Nov 28, 2025 10:26 UTC (Fri) by bluca (subscriber, #118303) [Link]

Excellent news, looking forward to learn more about these developments


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