My objrs crate is a collection of attribute macros that transforms Rust code so that it generates Objective-C compatible binaries. This makes some Rust and Swift interactions possible (via Rust Objective-C Swift), but not all. I’ve long been thinking of adding direct Swift support (assuming it’s feasible, which I suspect it is but haven’t actually dug into), but I don’t have time to work on both Swift and Objective-C right now.
Anyway, my point is that I think we should explore the Swift ABI from Rust via user land crates that use macros. If it works out, there might not be much need for core compiler support. If it doesn’t work, then that might help justify core compiler work.
BTW, will it be possible if we create a new Rust grammar or Cargo configuration for exporting function as ABI convention specified by programmers? We can even allow crate authors to implement their own ABI’s, and this could be a nice solution to adapt ABI for other programming languages or runtime platforms.
Just a random thought, feel free to be critical if there is a mistake