From 8ec15977dc49fd5be3d8ec25a69bab9e8401125e Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Wed, 10 Dec 2025 22:42:33 +0100 Subject: [PATCH 01/13] [Blog] Swift Configuration 1.0 blog post --- _data/authors.yml | 2 +- ...-12-11-swift-configuration-1.0-released.md | 99 +++++++++++++++++++ 2 files changed, 100 insertions(+), 1 deletion(-) create mode 100644 _posts/2025-12-11-swift-configuration-1.0-released.md diff --git a/_data/authors.yml b/_data/authors.yml index ca2dd1db3..ea0c8faf3 100644 --- a/_data/authors.yml +++ b/_data/authors.yml @@ -341,7 +341,7 @@ honzadvorsky: name: Honza Dvorsky email: honza@apple.com github: czechboy0 - about: "Honza Dvorsky is a member of a team working on developer tools and services as part of Apple’s Services Engineering division, and is a core developer on Swift OpenAPI Generator." + about: "Honza Dvorsky works on foundational Swift server libraries at Apple, and is a maintainer of Swift OpenAPI Generator and Swift Configuration." simonjbeaumont: name: Si Beaumont diff --git a/_posts/2025-12-11-swift-configuration-1.0-released.md b/_posts/2025-12-11-swift-configuration-1.0-released.md new file mode 100644 index 000000000..3c8d75f96 --- /dev/null +++ b/_posts/2025-12-11-swift-configuration-1.0-released.md @@ -0,0 +1,99 @@ +--- +layout: new-layouts/post +published: true +date: 2025-12-11 10:00:00 +title: "Swift Configuration 1.0 released" +author: [honzadvorsky] +category: "Developer Tools" +--- + +[**Swift Configuration**](https://github.com/apple/swift-configuration) **1.0** is now available, providing a unified, type-safe approach to reading configuration in Swift applications and libraries. + +This major release marks the library’s production-readiness to serve as the common API for reading configuration across the Swift ecosystem. Since the [initial release announcement](https://forums.swift.org/t/introducing-swift-configuration/82368) in October 2025 over **40 pull requests** have been merged, and its API stability provides a foundation to unlock community integrations.. + +## Why it exists + +Configuration management has long been a challenge across different sources and environments. Previously, configuration in Swift had to be manually stitched together from environment variables, command-line arguments, JSON files, and external systems. Swift Configuration creates a common interface for configuration, enabling you to: +- **Read configuration the same way across your codebase** using a single configuration reader API that's usable from both applications and libraries. +- **Quickly get started with a few lines of code** using simple built-in providers for environment variables, command-line arguments, JSON and YAML files. Later, when your configuration needs require a more sophisticated provider, swap it in easily, without refactoring your existing code. +- **Build and share custom configuration providers** using a public ConfigProvider protocol that anyone can implement and share. This allows domain experts to build and own integrations with external systems like secret stores and feature flagging services. + +Swift Configuration excels in the Swift server ecosystem, where configuration is often read from multiple systems and tools. The library is equally useful in command-line tools, GUI applications, and libraries wherever flexible configuration management is needed. + +For a step-by-step tour of an example service, from hardcoded values all the way to a flexible provider hierarchy, check out the [video of my talk](https://www.youtube.com/watch?v=I3lYW6OEyIs) from the [ServerSide.swift conference](https://www.serversideswift.info/) in London. + +## Getting started + +Swift Configuration's core strength is its ability to combine multiple configuration providers into a clear, predictable hierarchy. This allows you to establish sensible defaults while providing clean override for different deployment environments. + +For example, if you have default configuration in JSON: + +```json +{ + "http": { + "timeout": 30 + } +} +``` + +And want to be able to provide an override using an environment variable: + +```bash +# Environment variables: +HTTP_TIMEOUT=15 +``` + +Sharing configuration as JSON or an environment are examples of Swift Configuration "providers". In this example, we've layered these two providers: + +```swift +let config = ConfigReader(providers: [ + EnvironmentVariablesProvider(), + try await FileProvider(filePath: "/etc/config.json") +]) +let httpTimeout = config.int(forKey: "http.timeout", default: 60) +print(httpTimeout) // 15 +``` + +Providers are checked in the order you specify: earlier providers override later ones, followed by your fallback defaults. This removes ambiguity about which configuration source is actually being used. + +## Advanced capabilities + +Beyond basic lookups, the library includes features intended for production environments: + +* [Multiple access patterns](https://swiftpackageindex.com/apple/swift-configuration/documentation/configuration#Three-access-patterns) – choose between the synchronous, asynchronous, and watching patterns. +* [Hot reloading](https://swiftpackageindex.com/apple/swift-configuration/documentation/configuration#Hot-reloading) – apply configuration updates without restarting your service. +* [Namespacing and scoped readers](https://swiftpackageindex.com/apple/swift-configuration/documentation/configuration#Namespacing-and-scoped-readers) – organize configuration values through nesting. +* [Access logging](https://swiftpackageindex.com/apple/swift-configuration/documentation/configuration#Debugging-and-troubleshooting) – easily debug configuration issues through detailed observability. +* [Secret redaction](https://swiftpackageindex.com/apple/swift-configuration/documentation/configuration/handling-secrets-correctly) – avoid accidental exposure of sensitive configuration values. + +The [documentation](https://swiftpackageindex.com/apple/swift-configuration/documentation) covers these features in detail. + +## Community adoption + +With 1.0, the API is now stable. Projects can depend on Swift Configuration knowing only backward-compatible changes are expected going forward. API stability allows libraries and tools to rely on Swift Configuration as a common integration point for reading configuration. + +Prior to the 1.0 release, a number of ecosystem projects have begun experimenting with and adopting Swift Configuration. Here are some examples of efforts in progress: + +* [**In libraries**](https://swiftpackageindex.com/apple/swift-configuration/main/documentation/configuration/configuring-libraries): Expose configuration entry points built on [`ConfigReader`](https://swiftpackageindex.com/apple/swift-configuration/main/documentation/configuration/configreader), making your library easier to integrate. Projects experimenting with Swift Configuration include: + * [Vapor](https://github.com/vapor/vapor/pull/3403) + * [Hummingbird](https://github.com/hummingbird-project/hummingbird/pull/743) + * [Swift Temporal SDK](https://github.com/apple/swift-temporal-sdk) +* [**In applications**](https://swiftpackageindex.com/apple/swift-configuration/main/documentation/configuration/configuring-applications): Instantiate a [`ConfigReader`](https://swiftpackageindex.com/apple/swift-configuration/main/documentation/configuration/configreader) and pass it to your dependencies. Use any combination of [`ConfigProvider`](https://swiftpackageindex.com/apple/swift-configuration/main/documentation/configuration/configprovider) types - JSON/YAML files, environment variables, or remote systems. + * [Peekaboo](https://github.com/steipete/Peekaboo) + * [swiftodon](https://github.com/JonPulfer/swiftodon) +* [**By implementing custom providers**](https://swiftpackageindex.com/apple/swift-configuration/main/documentation/configuration/configprovider): Extend the ecosystem with new formats or external sources by implementing a [`ConfigProvider`](https://swiftpackageindex.com/apple/swift-configuration/main/documentation/configuration/configprovider). Examples of experimental providers: + * [Swift Configuration TOML](https://github.com/finnvoor/swift-configuration-toml) + * [Vault Courier](https://github.com/vault-courier/vault-courier) + * [Swift Configuration AWS](https://github.com/SongShift/swift-configuration-aws) + +Contributions and new integrations are welcome. + +## Next steps + +With a stable foundation in place, libraries and applications can begin finalizing their own integrations and releasing API-stable versions built on Swift Configuration. + +We encourage you to continue sharing real-world experience across different deployment models and configuration patterns. Your feedback will continue to help guide future refinements of Swift Configuration. + +Try integrating Swift Configuration into your applications, tools, and libraries, check out the project's [documentation](https://swiftpackageindex.com/apple/swift-configuration/documentation), and share your feedback on the [GitHub repository](https://github.com/apple/swift-configuration) through issues, pull requests, or Swift Forums discussions. + +Happy configuring! ⚙️ From 252f0a8daae0cddac8cbe830869b4c1fb6dd4603 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Wed, 10 Dec 2025 22:48:28 +0100 Subject: [PATCH 02/13] More edits --- ...25-12-11-swift-configuration-1.0-released.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/_posts/2025-12-11-swift-configuration-1.0-released.md b/_posts/2025-12-11-swift-configuration-1.0-released.md index 3c8d75f96..3fe67b25c 100644 --- a/_posts/2025-12-11-swift-configuration-1.0-released.md +++ b/_posts/2025-12-11-swift-configuration-1.0-released.md @@ -7,9 +7,11 @@ author: [honzadvorsky] category: "Developer Tools" --- -[**Swift Configuration**](https://github.com/apple/swift-configuration) **1.0** is now available, providing a unified, type-safe approach to reading configuration in Swift applications and libraries. +Every application has configuration: in environment variables, configuration files, values from remote services, command-line flags, or repositories for stored secrets like API keys. But until now, Swift developers have had to wire up each source individually, with parsing logic scattered throughout codebases and application code that is tightly coupled to specific configuration providers. -This major release marks the library’s production-readiness to serve as the common API for reading configuration across the Swift ecosystem. Since the [initial release announcement](https://forums.swift.org/t/introducing-swift-configuration/82368) in October 2025 over **40 pull requests** have been merged, and its API stability provides a foundation to unlock community integrations.. +[**Swift Configuration**](https://github.com/apple/swift-configuration) brings a unified, type-safe approach to this problem for Swift applications and libraries. What makes this compelling isn’t just that it reads configuration files: plenty of libraries do that. It’s the clean abstraction that it introduces between _how_ your code accesses configuration and _where_ that configuration comes from. This separation unlocks something powerful: libraries can now accept configuration without dictating the source, making them genuinely composable across different deployment environments. + +With the release of Swift Configuration 1.0, the library is production-ready to serve as the common API for reading configuration across the Swift ecosystem. Since the [initial release announcement](https://forums.swift.org/t/introducing-swift-configuration/82368) in October 2025 over **40 pull requests** have been merged, and its API stability provides a foundation to unlock community integrations.. ## Why it exists @@ -24,7 +26,16 @@ For a step-by-step tour of an example service, from hardcoded values all the way ## Getting started -Swift Configuration's core strength is its ability to combine multiple configuration providers into a clear, predictable hierarchy. This allows you to establish sensible defaults while providing clean override for different deployment environments. +After adding a package dependency to your project, reading configuration just requires a couple of lines of code. For example: + +```swift +import Configuration + +let config = ConfigReader(provider: EnvironmentVariablesProvider()) +let timeout = config.bool(forKey: "logging.verbose", default: false) +``` + +But Swift Configuration's core strength is its ability to combine _multiple_ configuration providers into a clear, predictable hierarchy, allowing you to establish sensible defaults while providing clean override mechanisms for different deployment scenarios. For example, if you have default configuration in JSON: From d1113e8af21aa326cbfa12a6d3ba35ffba0194b0 Mon Sep 17 00:00:00 2001 From: Dave Lester <18080+davelester@users.noreply.github.com> Date: Wed, 10 Dec 2025 21:48:35 -0800 Subject: [PATCH 03/13] Update _posts/2025-12-11-swift-configuration-1.0-released.md +1, great suggestion! Co-authored-by: Joseph Heck --- _posts/2025-12-11-swift-configuration-1.0-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2025-12-11-swift-configuration-1.0-released.md b/_posts/2025-12-11-swift-configuration-1.0-released.md index 3fe67b25c..68a88aa02 100644 --- a/_posts/2025-12-11-swift-configuration-1.0-released.md +++ b/_posts/2025-12-11-swift-configuration-1.0-released.md @@ -7,7 +7,7 @@ author: [honzadvorsky] category: "Developer Tools" --- -Every application has configuration: in environment variables, configuration files, values from remote services, command-line flags, or repositories for stored secrets like API keys. But until now, Swift developers have had to wire up each source individually, with parsing logic scattered throughout codebases and application code that is tightly coupled to specific configuration providers. +Every application has configuration: in environment variables, configuration files, values from remote services, command-line flags, or repositories for stored secrets like API keys. But until now, Swift developers have had to wire up each source individually, with scattered parsing logic and application code that is tightly coupled to specific configuration providers. [**Swift Configuration**](https://github.com/apple/swift-configuration) brings a unified, type-safe approach to this problem for Swift applications and libraries. What makes this compelling isn’t just that it reads configuration files: plenty of libraries do that. It’s the clean abstraction that it introduces between _how_ your code accesses configuration and _where_ that configuration comes from. This separation unlocks something powerful: libraries can now accept configuration without dictating the source, making them genuinely composable across different deployment environments. From d50534908dd674e57430a1ad6e46fc93c6e9f7ef Mon Sep 17 00:00:00 2001 From: Dave Lester <18080+davelester@users.noreply.github.com> Date: Wed, 10 Dec 2025 21:50:17 -0800 Subject: [PATCH 04/13] Update _posts/2025-12-11-swift-configuration-1.0-released.md Co-authored-by: Joseph Heck --- _posts/2025-12-11-swift-configuration-1.0-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2025-12-11-swift-configuration-1.0-released.md b/_posts/2025-12-11-swift-configuration-1.0-released.md index 68a88aa02..adfc575cd 100644 --- a/_posts/2025-12-11-swift-configuration-1.0-released.md +++ b/_posts/2025-12-11-swift-configuration-1.0-released.md @@ -26,7 +26,7 @@ For a step-by-step tour of an example service, from hardcoded values all the way ## Getting started -After adding a package dependency to your project, reading configuration just requires a couple of lines of code. For example: +After adding a package dependency to your project, reading configuration values requires a couple of lines of code. For example: ```swift import Configuration From e4730971c85c083cea00ddf31de09cb834bdf5d8 Mon Sep 17 00:00:00 2001 From: Dave Lester <18080+davelester@users.noreply.github.com> Date: Wed, 10 Dec 2025 22:02:05 -0800 Subject: [PATCH 05/13] Update _posts/2025-12-11-swift-configuration-1.0-released.md --- _posts/2025-12-11-swift-configuration-1.0-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2025-12-11-swift-configuration-1.0-released.md b/_posts/2025-12-11-swift-configuration-1.0-released.md index adfc575cd..4701c0a47 100644 --- a/_posts/2025-12-11-swift-configuration-1.0-released.md +++ b/_posts/2025-12-11-swift-configuration-1.0-released.md @@ -35,7 +35,7 @@ let config = ConfigReader(provider: EnvironmentVariablesProvider()) let timeout = config.bool(forKey: "logging.verbose", default: false) ``` -But Swift Configuration's core strength is its ability to combine _multiple_ configuration providers into a clear, predictable hierarchy, allowing you to establish sensible defaults while providing clean override mechanisms for different deployment scenarios. +However, Swift Configuration's core strength is its ability to combine _multiple_ configuration providers into a clear, predictable hierarchy, allowing you to establish sensible defaults while providing clean override mechanisms for different deployment scenarios. For example, if you have default configuration in JSON: From 5d403cc843abca80f596ce06e56bf362343f2ea0 Mon Sep 17 00:00:00 2001 From: Dave Lester <18080+davelester@users.noreply.github.com> Date: Wed, 10 Dec 2025 22:02:48 -0800 Subject: [PATCH 06/13] Update _posts/2025-12-11-swift-configuration-1.0-released.md Co-authored-by: Joseph Heck --- _posts/2025-12-11-swift-configuration-1.0-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2025-12-11-swift-configuration-1.0-released.md b/_posts/2025-12-11-swift-configuration-1.0-released.md index 4701c0a47..5af57721f 100644 --- a/_posts/2025-12-11-swift-configuration-1.0-released.md +++ b/_posts/2025-12-11-swift-configuration-1.0-released.md @@ -69,7 +69,7 @@ Providers are checked in the order you specify: earlier providers override later ## Advanced capabilities -Beyond basic lookups, the library includes features intended for production environments: +Beyond basic lookups, the library includes features for production environments: * [Multiple access patterns](https://swiftpackageindex.com/apple/swift-configuration/documentation/configuration#Three-access-patterns) – choose between the synchronous, asynchronous, and watching patterns. * [Hot reloading](https://swiftpackageindex.com/apple/swift-configuration/documentation/configuration#Hot-reloading) – apply configuration updates without restarting your service. From 092f390fa9bdcb8b80f61061d9aae3ccf95e275e Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Thu, 11 Dec 2025 15:19:11 +0100 Subject: [PATCH 07/13] PR feedback - _a_ common API vs _the_ common API --- _posts/2025-12-11-swift-configuration-1.0-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2025-12-11-swift-configuration-1.0-released.md b/_posts/2025-12-11-swift-configuration-1.0-released.md index 5af57721f..29c36bf44 100644 --- a/_posts/2025-12-11-swift-configuration-1.0-released.md +++ b/_posts/2025-12-11-swift-configuration-1.0-released.md @@ -11,7 +11,7 @@ Every application has configuration: in environment variables, configuration fil [**Swift Configuration**](https://github.com/apple/swift-configuration) brings a unified, type-safe approach to this problem for Swift applications and libraries. What makes this compelling isn’t just that it reads configuration files: plenty of libraries do that. It’s the clean abstraction that it introduces between _how_ your code accesses configuration and _where_ that configuration comes from. This separation unlocks something powerful: libraries can now accept configuration without dictating the source, making them genuinely composable across different deployment environments. -With the release of Swift Configuration 1.0, the library is production-ready to serve as the common API for reading configuration across the Swift ecosystem. Since the [initial release announcement](https://forums.swift.org/t/introducing-swift-configuration/82368) in October 2025 over **40 pull requests** have been merged, and its API stability provides a foundation to unlock community integrations.. +With the release of Swift Configuration 1.0, the library is production-ready to serve as a common API for reading configuration across the Swift ecosystem. Since the [initial release announcement](https://forums.swift.org/t/introducing-swift-configuration/82368) in October 2025 over **40 pull requests** have been merged, and its API stability provides a foundation to unlock community integrations.. ## Why it exists From 43e51df1ecc38c84073e0c6180c39a4ee9a1d318 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Thu, 11 Dec 2025 15:20:30 +0100 Subject: [PATCH 08/13] PR feedback --- _posts/2025-12-11-swift-configuration-1.0-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2025-12-11-swift-configuration-1.0-released.md b/_posts/2025-12-11-swift-configuration-1.0-released.md index 29c36bf44..4635a40c6 100644 --- a/_posts/2025-12-11-swift-configuration-1.0-released.md +++ b/_posts/2025-12-11-swift-configuration-1.0-released.md @@ -26,7 +26,7 @@ For a step-by-step tour of an example service, from hardcoded values all the way ## Getting started -After adding a package dependency to your project, reading configuration values requires a couple of lines of code. For example: +After adding a package dependency to your project, reading configuration values requires just a couple of lines of code. For example: ```swift import Configuration From 884eace4510f100d9b3a09b293cdd9f2071194e6 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Thu, 11 Dec 2025 15:25:14 +0100 Subject: [PATCH 09/13] PR feedback --- _posts/2025-12-11-swift-configuration-1.0-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2025-12-11-swift-configuration-1.0-released.md b/_posts/2025-12-11-swift-configuration-1.0-released.md index 4635a40c6..2e6c64db1 100644 --- a/_posts/2025-12-11-swift-configuration-1.0-released.md +++ b/_posts/2025-12-11-swift-configuration-1.0-released.md @@ -54,7 +54,7 @@ And want to be able to provide an override using an environment variable: HTTP_TIMEOUT=15 ``` -Sharing configuration as JSON or an environment are examples of Swift Configuration "providers". In this example, we've layered these two providers: +Then what we have are two Swift Configuration "providers", and we can layer them: ```swift let config = ConfigReader(providers: [ From 3a6f2381f53179802a4b1493d77d4c18f1b8d8e1 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Thu, 11 Dec 2025 15:27:59 +0100 Subject: [PATCH 10/13] PR feedback --- _posts/2025-12-11-swift-configuration-1.0-released.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/_posts/2025-12-11-swift-configuration-1.0-released.md b/_posts/2025-12-11-swift-configuration-1.0-released.md index 2e6c64db1..7e02b48e9 100644 --- a/_posts/2025-12-11-swift-configuration-1.0-released.md +++ b/_posts/2025-12-11-swift-configuration-1.0-released.md @@ -103,8 +103,6 @@ Contributions and new integrations are welcome. With a stable foundation in place, libraries and applications can begin finalizing their own integrations and releasing API-stable versions built on Swift Configuration. -We encourage you to continue sharing real-world experience across different deployment models and configuration patterns. Your feedback will continue to help guide future refinements of Swift Configuration. - -Try integrating Swift Configuration into your applications, tools, and libraries, check out the project's [documentation](https://swiftpackageindex.com/apple/swift-configuration/documentation), and share your feedback on the [GitHub repository](https://github.com/apple/swift-configuration) through issues, pull requests, or Swift Forums discussions. +Try integrating Swift Configuration into your applications, tools, and libraries, check out the project's [documentation](https://swiftpackageindex.com/apple/swift-configuration/documentation), and continue sharing feedback from your real-world experience on the [GitHub repository](https://github.com/apple/swift-configuration) through issues, pull requests, or [Swift Forums](https://forums.swift.org/c/related-projects/swift-configuration/123) discussions. Happy configuring! ⚙️ From 43c0e319c4ecaee710483ce3084a5d7f5bd765d9 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Thu, 11 Dec 2025 15:31:13 +0100 Subject: [PATCH 11/13] More edits' --- _posts/2025-12-11-swift-configuration-1.0-released.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/_posts/2025-12-11-swift-configuration-1.0-released.md b/_posts/2025-12-11-swift-configuration-1.0-released.md index 7e02b48e9..847f78b2b 100644 --- a/_posts/2025-12-11-swift-configuration-1.0-released.md +++ b/_posts/2025-12-11-swift-configuration-1.0-released.md @@ -11,18 +11,18 @@ Every application has configuration: in environment variables, configuration fil [**Swift Configuration**](https://github.com/apple/swift-configuration) brings a unified, type-safe approach to this problem for Swift applications and libraries. What makes this compelling isn’t just that it reads configuration files: plenty of libraries do that. It’s the clean abstraction that it introduces between _how_ your code accesses configuration and _where_ that configuration comes from. This separation unlocks something powerful: libraries can now accept configuration without dictating the source, making them genuinely composable across different deployment environments. -With the release of Swift Configuration 1.0, the library is production-ready to serve as a common API for reading configuration across the Swift ecosystem. Since the [initial release announcement](https://forums.swift.org/t/introducing-swift-configuration/82368) in October 2025 over **40 pull requests** have been merged, and its API stability provides a foundation to unlock community integrations.. +With the release of Swift Configuration 1.0, the library is production-ready to serve as a common API for reading configuration across the Swift ecosystem. Since the [initial release announcement](https://forums.swift.org/t/introducing-swift-configuration/82368) in October 2025 over **40 pull requests** have been merged, and its API stability provides a foundation to unlock community integrations. ## Why it exists Configuration management has long been a challenge across different sources and environments. Previously, configuration in Swift had to be manually stitched together from environment variables, command-line arguments, JSON files, and external systems. Swift Configuration creates a common interface for configuration, enabling you to: - **Read configuration the same way across your codebase** using a single configuration reader API that's usable from both applications and libraries. - **Quickly get started with a few lines of code** using simple built-in providers for environment variables, command-line arguments, JSON and YAML files. Later, when your configuration needs require a more sophisticated provider, swap it in easily, without refactoring your existing code. -- **Build and share custom configuration providers** using a public ConfigProvider protocol that anyone can implement and share. This allows domain experts to build and own integrations with external systems like secret stores and feature flagging services. +- **Build and share custom configuration providers** using a public ConfigProvider protocol that anyone can implement and share. This allows domain experts to create integrations with external systems like secret stores and feature flagging services. Swift Configuration excels in the Swift server ecosystem, where configuration is often read from multiple systems and tools. The library is equally useful in command-line tools, GUI applications, and libraries wherever flexible configuration management is needed. -For a step-by-step tour of an example service, from hardcoded values all the way to a flexible provider hierarchy, check out the [video of my talk](https://www.youtube.com/watch?v=I3lYW6OEyIs) from the [ServerSide.swift conference](https://www.serversideswift.info/) in London. +For a step-by-step evolution of an example service, from hardcoded values all the way to a flexible provider hierarchy, check out the [video of my talk](https://www.youtube.com/watch?v=I3lYW6OEyIs) from the [ServerSide.swift conference](https://www.serversideswift.info/) in London. ## Getting started @@ -97,8 +97,6 @@ Prior to the 1.0 release, a number of ecosystem projects have begun experimentin * [Vault Courier](https://github.com/vault-courier/vault-courier) * [Swift Configuration AWS](https://github.com/SongShift/swift-configuration-aws) -Contributions and new integrations are welcome. - ## Next steps With a stable foundation in place, libraries and applications can begin finalizing their own integrations and releasing API-stable versions built on Swift Configuration. From 6ec99d3a3d069a88e34cc8fc1482d5ca983c2811 Mon Sep 17 00:00:00 2001 From: Dave Lester <18080+davelester@users.noreply.github.com> Date: Thu, 11 Dec 2025 14:02:17 -0800 Subject: [PATCH 12/13] Update _posts/2025-12-11-swift-configuration-1.0-released.md --- _posts/2025-12-11-swift-configuration-1.0-released.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2025-12-11-swift-configuration-1.0-released.md b/_posts/2025-12-11-swift-configuration-1.0-released.md index 847f78b2b..41fd7607b 100644 --- a/_posts/2025-12-11-swift-configuration-1.0-released.md +++ b/_posts/2025-12-11-swift-configuration-1.0-released.md @@ -32,7 +32,7 @@ After adding a package dependency to your project, reading configuration values import Configuration let config = ConfigReader(provider: EnvironmentVariablesProvider()) -let timeout = config.bool(forKey: "logging.verbose", default: false) +let timeout = config.bool(forKey: "http.timeout", default: 60) ``` However, Swift Configuration's core strength is its ability to combine _multiple_ configuration providers into a clear, predictable hierarchy, allowing you to establish sensible defaults while providing clean override mechanisms for different deployment scenarios. From 0ec2607dbe0ab4b79281c6c902141f6d201054d4 Mon Sep 17 00:00:00 2001 From: Honza Dvorsky Date: Thu, 11 Dec 2025 23:09:52 +0100 Subject: [PATCH 13/13] Apply suggestions from code review --- _posts/2025-12-11-swift-configuration-1.0-released.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_posts/2025-12-11-swift-configuration-1.0-released.md b/_posts/2025-12-11-swift-configuration-1.0-released.md index 41fd7607b..fd9fc8570 100644 --- a/_posts/2025-12-11-swift-configuration-1.0-released.md +++ b/_posts/2025-12-11-swift-configuration-1.0-released.md @@ -32,7 +32,7 @@ After adding a package dependency to your project, reading configuration values import Configuration let config = ConfigReader(provider: EnvironmentVariablesProvider()) -let timeout = config.bool(forKey: "http.timeout", default: 60) +let timeout = config.int(forKey: "http.timeout", default: 60) ``` However, Swift Configuration's core strength is its ability to combine _multiple_ configuration providers into a clear, predictable hierarchy, allowing you to establish sensible defaults while providing clean override mechanisms for different deployment scenarios. @@ -61,8 +61,8 @@ let config = ConfigReader(providers: [ EnvironmentVariablesProvider(), try await FileProvider(filePath: "/etc/config.json") ]) -let httpTimeout = config.int(forKey: "http.timeout", default: 60) -print(httpTimeout) // 15 +let timeout = config.int(forKey: "http.timeout", default: 60) +print(timeout) // 15 ``` Providers are checked in the order you specify: earlier providers override later ones, followed by your fallback defaults. This removes ambiguity about which configuration source is actually being used.