[Openmcl-devel] M1 port: Call for funding

Chris Hanson cmhanson at eschatologist.net
Tue Jan 2 14:16:29 PST 2024


On Dec 30, 2023, at 11:43 PM, R. Matthew Emerson <rme at acm.org> wrote:
> 
> Swift doesn’t have a stable ABI as far as I know, so it’s not possible yet to talk about calling Swift directly from CCL (without going through C somehow).

Swift has supported a stable ABI for several years now, via its “library evolution” mechanism.

However, it’s designed to be something code opts into because it imposes additional costs on the user, both in terms of extra work during development and in terms of performance.

The extra work is in areas like requiring that pattern-matching of an ABI-stable enum in code always has to include an “unknown” match, to accommodate newer clients. (It’s the client’s responsibility to not pass a match the library can’t support, but for robustness the library needs to also anticipate that and fail properly.)

The performance is in terms of not being able to inline as much, higher memory management traffic at ABI boundaries, etc. So “leaf” code is intended to be built *without* library evolution for maximum performance, and OS-and-other-large-system is intended to be built *with* library evolution to provide binary compatibility.

  — Chris



More information about the Openmcl-devel mailing list