As pointed out by the folks over at 9to5Mac, Apple has made the open source Darwin code for macOS 10.12 Sierra available for download in its open source website. You’ll also find the Open Source Reference Library, developer tools, along with iOS and OS X Server resources in the release, that builds on an open source code dating back to OS X 10.0.
The lowest layers of macOS, including the kernel, BSD portions, and drivers are based mainly on open source technologies, collectively called Darwin. As such, Apple provides download links to the latest versions of these technologies for the open source community to learn and to use.
Apple has released open source Darwin codes for OS X in the past as well. Shortly after the public release of its latest update to OS X, the company usually updates its open source Darwin code and makes it available for public download.
You can download or get more information regarding the latest open source Darwin code using the link below.