What is Swift written in?

Year 2014 Paradigm object-oriented, functional, imperative Typing static Self-hosting yes
The Swift compiler is written in C, C++, Swift, and LLVM (documented). Swift uses a bootstrap chain from Machine Code (reported). Swift is self-hosting.

Relationship Graph

All directly connected languages. Click any node to navigate to its page.

Compiler Implementation

LanguageConfidenceNotesSource
C 85% Early Swift compiler had significant C components Source
C++ 95% Swift compiler primarily in C++ Source
Swift 90% Swift compiler increasingly written in Swift Source
LLVM 95% Swift uses LLVM as compiler backend Source

Bootstrap Chain

LanguageConfidenceNotesSource
Machine Code 80% Swift bootstrap chain via LLVM Source

Influenced By

Languages Swift Influenced

Frequently Asked Questions

What language is Swift written in?
Swift is primarily implemented in C and C++ and Swift and Machine Code and LLVM. See the implementation section above for details and source references.
What languages influenced Swift?
Swift was influenced by Objective-C, Rust, Haskell among others. See the influence section above for the full list.
Which languages did Swift influence?
Swift influenced Rust among others.
Is Swift self-hosting?
Yes, Swift is self-hosting — its compiler can compile itself.

Evidence Sources

Related Languages

Explore Swift in Graph →