SwiftGir is a library, with accompanying CLI-tool to convert GObject repository files to their Swift source representation.
Before starting to develop this library, I took a look at the bigger ecosystem surrounding Swift and GObject.
There two implementations, which generate Swift from GIR files. The first option, which can be seen as a mature, is gir2swift by Rene Hexel and the second option is GtkCodeGen by stackotter developed as part of their swift-cross-ui efforts.
One outstanding implementation, I want to highlight and plan on referencing a lot, is gotk4 by diamondburned, which did an exceptional job at providing a Go-esque abstraction over the GObject libraries.
To build the CLI from source, run the following command.
$ swift build -c release
The produced binary is placed at .build/release/swift-gir
.