Moving "The Swift Programming Language" book to open source

We’re happy to announce that "The Swift Programming Language" book is now an open source project. This new project will be the basis of publishing the book on Swift.org in the future (more details below), and will use the open source DocC tool. We’re excited to work with the Documentation Workgroup to take the project forward.

We ask that you try building the repository locally with DocC, and file issues you may encounter when compiling, editing, or reading the book. We’ll be adding some initial issues to the book’s GitHub repository, and feel free to add your own. Until this open version is ready to take over, the book published on Swift.org will be generated using Apple’s internal toolchain.

For now, we're expecting most pull requests to be enhancements and bug fixes to support the Swift-DocC publication, with only minor content changes. When the open source repository is able to generate a high-quality version of TSPL, we will switch over to publishing directly from that repository. At that time we'll also start taking pull requests for more content changes.

An open source TSPL is finally possible because of Swift-DocC, a great open source documentation tool well suited to author, maintain, and publish the Swift book. With snippets support, it will also be possible to move inline example code over to buildable sample programs stored in the repository. This is a really exciting time for Swift documentation, and we can’t wait to see how the book evolves with help from so many more enthusiastic developers.

111 Likes

Congrats Kyle and team! :tada: The @swift-documentation-workgroup is super excited to be part of the project's evolution and improve DocC alongside it to make learning Swift more accessible to everyone!

17 Likes

Very cool. Looking forward to contribute

1 Like

I've made some PRs already, but wanted to ask for feedback here on Swift Forums, I've created a PR which proposes to change 'Swift is a new programming language' to just 'Swift is a programming language', do you agree? Time for Swift to graduate! :mortar_board::tada:

I've also made a comment about maybe mentioning what Swift can be used for, which currently only lists Apple app development, shouldn't Unix and Windows be mentioned too?

10 Likes

Wow! Very, very cool! Kudos to all involved ..

will there be a pdf version?

2 Likes

Wow, this is super helpful for the translators!

When I started Ukrainian translation, I spent days just extracting text from epub and formatting it with markdown. Now you can just fork it.

And tracking updates will be much easier as well. Thanks a lot!

8 Likes

Issue #2 in the GitHub repository is tracking support for ePUB, PDF, or other offline forms.

2 Likes

How can i have multiple swift versions installed and defined for specific projects relatively ?

As when i am building the repo, i got this error as "'swift-book': error: package 'swift-book' is using Swift tools version 5.7.0 but the installed version is 5.6.0"

Swift just graduated from school:

:partying_face::woman_student:

5 Likes