{"id":46613,"date":"2025-02-03T16:24:03","date_gmt":"2025-02-03T21:24:03","guid":{"rendered":"https:\/\/mjtsai.com\/blog\/?p=46613"},"modified":"2025-02-03T16:24:03","modified_gmt":"2025-02-03T21:24:03","slug":"swift-build","status":"publish","type":"post","link":"https:\/\/mjtsai.com\/blog\/2025\/02\/03\/swift-build\/","title":{"rendered":"Swift Build"},"content":{"rendered":"<p><a href=\"https:\/\/www.swift.org\/blog\/the-next-chapter-in-swift-build-technologies\/\">Owen Voorhees<\/a> (<a href=\"https:\/\/x.com\/SwiftLang\/status\/1885730561186308104\">tweet<\/a>, <a href=\"https:\/\/news.ycombinator.com\/item?id=42899703\">Hacker News<\/a>):<\/p>\n<blockquote cite=\"https:\/\/www.swift.org\/blog\/the-next-chapter-in-swift-build-technologies\/\"><p>As a foundational step in this new chapter of Swift build technologies, today Apple is open sourcing <a href=\"https:\/\/github.com\/swiftlang\/swift-build\">Swift Build<\/a>, a powerful and extensible build engine that provides a set of build rules for building Swift projects. Swift Build is the engine used by Xcode, which supports millions of apps in the App Store as well as the internal build process for Apple&rsquo;s own operating systems. The open source repository also includes support for targeting Linux and Windows.<\/p><p>[&#8230;]<\/p><p>Swift Build is an infrastructural component designed to plan and execute builds requested by a higher-level client like Swift Package Manager or Xcode. It builds on top of the existing <a href=\"https:\/\/github.com\/swiftlang\/swift-llbuild\">llbuild<\/a> project to add capabilities including:<\/p><ul><li>Robust integration with the Swift compiler to reliably and efficiently coordinate the build of Swift projects<\/li><li>Support for a wide variety of product types including libraries, command line tools, and GUI applications with advanced build configuration options<\/li><li>Build graph optimizations that maximize parallelism when building Swift and C code<\/li><\/ul><\/blockquote>\n<p>I suspect this is the component responsible for one of my main frustrations with Swift: spurious compilation errors (or sometimes crashes at runtime) unless I clean the build folder, because it doesn&rsquo;t correctly figure out which files need to be recompiled after certain changes.<\/p>\n\n<p><a href=\"https:\/\/x.com\/_saagarjha\/status\/1886357033173049492\">Saagar Jha<\/a>:<\/p>\n<blockquote cite=\"https:\/\/x.com\/_saagarjha\/status\/1886357033173049492\"><p>Swift Build being open sourced is a really huge deal. This should remove barriers for teams that are running into Xcode build performance or correctness limitations because they can now debug, profile, and most importantly <em>fix<\/em> the issues themselves.<\/p><\/blockquote>\n\n<p><a href=\"https:\/\/mastodon.social\/@tonyarnold\/113931323272819464\">Tony Arnold<\/a>:<\/p>\n<blockquote cite=\"https:\/\/mastodon.social\/@tonyarnold\/113931323272819464\">\n<p>I am unbelievably happy to see Apple open source the Xcode build system &mdash; I have checked out the project, explored the tests, and am looking at starter issues alongside a relaxing cup of tea.<\/p>\n<\/blockquote>","protected":false},"excerpt":{"rendered":"<p>Owen Voorhees (tweet, Hacker News): As a foundational step in this new chapter of Swift build technologies, today Apple is open sourcing Swift Build, a powerful and extensible build engine that provides a set of build rules for building Swift projects. Swift Build is the engine used by Xcode, which supports millions of apps in [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"apple_news_api_created_at":"2025-02-03T21:24:05Z","apple_news_api_id":"30644510-ab1b-4acc-bd24-05e9dd3e49ac","apple_news_api_modified_at":"2025-02-03T21:24:05Z","apple_news_api_revision":"AAAAAAAAAAD\/\/\/\/\/\/\/\/\/\/w==","apple_news_api_share_url":"https:\/\/apple.news\/AMGRFEKsbSsy9JAXp3T5JrA","apple_news_coverimage":0,"apple_news_coverimage_caption":"","apple_news_is_hidden":false,"apple_news_is_paid":false,"apple_news_is_preview":false,"apple_news_is_sponsored":false,"apple_news_maturity_rating":"","apple_news_metadata":"\"\"","apple_news_pullquote":"","apple_news_pullquote_position":"","apple_news_slug":"","apple_news_sections":"\"\"","apple_news_suppress_video_url":false,"apple_news_use_image_component":false,"footnotes":""},"categories":[4],"tags":[255,74,71,901,226],"class_list":["post-46613","post","type-post","status-publish","format-standard","hentry","category-programming-category","tag-compiler","tag-opensource","tag-programming","tag-swift-programming-language","tag-xcode"],"apple_news_notices":[],"_links":{"self":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/46613","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/comments?post=46613"}],"version-history":[{"count":1,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/46613\/revisions"}],"predecessor-version":[{"id":46614,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/posts\/46613\/revisions\/46614"}],"wp:attachment":[{"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/media?parent=46613"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/categories?post=46613"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mjtsai.com\/blog\/wp-json\/wp\/v2\/tags?post=46613"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}