As you probably know by now, 3.0 is a complete rewrite of Vapor and all of its related packages. It’s a big change. The growth of Vapor and server-side Swift over these past two years has been astonishing and we want to make sure we have a rock-solid foundation to build on for years to come. This has been our main focus this release and has lead to three important new features:

Async: Vapor is now completely non-blocking and runs on Apple’s SwiftNIO. This means Vapor 3 is ready to handle high levels of concurrency when your application needs it.

Services: Gone are the JSON configuration files. Everything is Swift now thanks to Vapor’s new Dependency Injection framework Services.

Codable: Parsing and serializing content from HTTP messages, creating database models, and rendering views is now more type safe and performant thanks to Codable integration throughout all of Vapor.

While those are the three biggest improvements, there are countless others. If you have used Vapor previously or you are just getting introduced, we recommend reading our new Getting Started guide.

Documentation

A huge focus during this release has been put on documentation. This is the main reason 3.0’s release process has been so much slower than previous releases. Writing documentation is incredibly time consuming and frankly exhausting, but we think it is critical for Vapor 3’s success going forward.

API Docs

Vapor’s API docs are updated and better than ever. Every package has 100% docblock coverage including:

Helpful code samples where possible.

Method parameter descriptions.

MARK and code re-org to help make things readable in API doc form.

The API docs are available at https://api.vapor.codes. Use the selector to choose which repo, module, and version you would like to view docs for.

Guide Docs

With the improvement of Vapor’s API documentation, the main docs are moving more toward a guide / tutorial feel. In contrast to the API docs which heavily focus on particular methods and protocols, we want the guide docs to cover broad use cases and practices. For example, “saving your first model”, or “making an external API request”.

We were pleasently surprised to see Vapor coming in first as being asynchronous does not really help with plaintext benchmarks. Plaintext benchmarks are really only good at testing how fast a web framework is capable of parsing and serializing HTTP headers. However, it is a good indication of the performance of Swift.

We will be releasing benchmarks that deal with more realistic server-side workloads such as CRUD operations on a database and view rendering when the related packages (Fluent and Leaf) are officially released.

Packages

Vapor 3 offers a couple of new packages this release. Most notably are the MySQL and PostgreSQL packages which are now non-blocking and built on SwiftNIO.

Some packages are still Release Candidates (indicated by ⚠️). These packages are subject to change before official release and may have missing or outdated documentation.

Here is a list of all Vapor 3 compatible packages and latest version at time of writing.