Bootstrapping Swift Compiler

Out of curiosity, is the ability for the Swift compiler to build itself eventually and be written primarily in Swift, something that's envisioned for the future? Or would such an undertaking be unlikely because of the current dependencies?

Has this topic been discussed before?

I think it's clear that it is the goal. For instance, see the README for swift-driver (emphasis added):

The swift-driver project is a new implementation of the Swift compiler driver that is intended to replace the existing driver with a more extensible, maintainable, and robust code base.

So unless you want a compiler without a driver, at some point you'll need a Swift compiler in order to build a Swift compiler.


Of course, and the community is actually moving toward that goal.

libswift is the first piece of Swift codes in the actual Swift compiler (frontend).

Terms of Service

Privacy Policy

Cookie Policy