Swift goes further down the stack than you might at first imagine -- there's a lot of Swift written at Apple even in places where you might expect C.
The container CLI tool wraps the underlying Containerization framework, which in turn vends packages for things like EXT4 file system support -- all written in Swift. Here's one example as a jumping off point. https://github.com/apple/containerization/blob/main/Sources/...