4 ms·
> You can look to Swift for prior art on how this can be done: https://faultlore.com/blah/swift-abi/ https://faultlore.com/blah/swift-abi/ > It would be very h
by jabl 8mo ago
> You can look to Swift for prior art on how this can be done: https://faultlore.com/blah/swift-abi/ https://faultlore.com/blah/swift-abi/
> It would be very hard to accomplish.
Since Rust cares very much about zero-overhead abstractions and performance, I would guess if something like this were to be implemented, it would have to be via some optional (crate/module/function?) attributes, and the default would remain the existing monomorphization style of code generation.
- ninkendo 8mo agoSwift’s approach still monomorphizes within a binary, and only has runtime costs when calling code across a dylib boundary. I think rust could do something like this as well.