Skip to content
Tech News
← Back to articles

Ladybird: Closing this as we are no longer pursuing Swift adoption

read original get Ladybird Book → more articles

List of issues preventing moving forward on moving Swift 6.0 support out of an experimental state:

Swift issues:

Interop: Compiler and C++ Bridging header disagree on ABI of Optional<CxxValueType> swiftlang/swift#75593 Details: It is not currently possible to return a swift optional of a small C++ type back to C++. The compiler and the generated bridging header disagree on how that is supposed to be done. Workaround: Don't use Optional, use a return type that forces the C++ type to be heap allocated. Array is one alternative.

Interop: Cannot return swift::Optional<swift::String> from C++ function swiftlang/swift#76024 Details: Returning binding types swift::Optional<T> or swift::String from a C++ function is not supported Workaround: Return std:: types?

Swift cannot import libstdc++-13 chrono header in C++23 mode swiftlang/swift#76809 Details: Swift 6.0 cannot import libstdc++-13 or higher <chrono> header. Workaround: Use libc++ or a lower libstdc++ version. libstdc++-13 is default on Ubuntu 24.04 LTS. Fixed in swiftlang/swift:main as of Oct 18, 2024

CxxInterop: Swift does not synthesize CxxConvertibleToContainer iterator operator== in some cases swiftlang/swift#77607 Details: Vector<u32, 2> is not recognized as CxxConvertibleToContainer

Workaround: Treat it as a sequence instead, and any transfer to a swift type requires manual copying of elements