ITADN
bazelbuild/rules_swift

版本发布 8

3.5.0
? · 2026-01-21

## What's Changed * Update protobuf dependency version to 33.4 for Bazel 9 by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1648 * chore: update 3.x CI for Bazel 9 by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1643 **Full Changelog**: https://github.com/bazelbuild/rules_swift/compare/3.4.2...3.5.0 This release is compatible with Bazel 7.x LTS, 8.x LTS, 9.x LTX, and 10.x rolling releases. ## MODULE.bazel Snippet ```bzl bazel_dep(name = "rules_swift", version = "3.5.0", repo_name = "build_bazel_rules_swift") ``` ## Workspace Snippet ```bzl load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "build_bazel_rules_swift", sha256 = "350b31bc38629816c5d0a81622e24dbbb8281886cd11db834974a8d8a78acd75", url = "https://github.com/bazelbuild/rules_swift/releases/download/3.5.0/rules_swift.3.5.0.tar.gz", ) load( "@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies", ) swift_rules_dependencies() load( "@build_bazel_rules_swift//swift:extras.bzl", "swift_rules_extra_dependencies", ) swift_rules_extra_dependencies() ```

3.4.0
? · 2025-11-25

## What's Changed * Fix last_green bazel support by @keith in https://github.com/bazelbuild/rules_swift/pull/1606 * feat(examples): make -cxx-interoperability-mode a feature by @ma-oli in https://github.com/bazelbuild/rules_swift/pull/1567 * Support `additional_linker_inputs` in `swift_binary` by @adincebic in https://github.com/bazelbuild/rules_swift/pull/1584 * feat(swift): add embedded Swift feature by @ma-oli in https://github.com/bazelbuild/rules_swift/pull/1608 * feat(toolchain): add embedded OS support in swift toolchain by @ma-oli in https://github.com/bazelbuild/rules_swift/pull/1609 * feat(toolchain): add missing action types to toolchain configs by @ma-oli in https://github.com/bazelbuild/rules_swift/pull/1611 * Allow setting `exec_group` in more places by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1588 * Fix `SWIFT_TOOLCHAIN_TYPE` to work with Bzlmod + AEGs by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1587 * refactor(toolchain): fix --plugin-path on non-Xcode toolchains by @ma-oli in https://github.com/bazelbuild/rules_swift/pull/1610 * Fix windows toolchain target_compatible_with by @keith in https://github.com/bazelbuild/rules_swift/pull/1616 * Move the C++ toolchain into its own execution group so that it does not have to be bound by the same constraints as the execution platform selected for the Swift toolchain. by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1586 * Enable support for AEGs by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1585 * Add rpaths for the toolchain's compatibility back-deployment librarie by @adincebic in https://github.com/bazelbuild/rules_swift/pull/1589 **Full Changelog**: https://github.com/bazelbuild/rules_swift/compare/3.3.0...3.4.0 This release is compatible with Bazel 7.x LTS, 8.x LTS, and 9.x rolling releases. ## MODULE.bazel Snippet ```bzl bazel_dep(name = "rules_swift", version = "3.4.0", repo_name = "build_bazel_rules_swift") ``` ## Workspace Snippet ```bzl load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "build_bazel_rules_swift", sha256 = "13219bde174594c7af5403c7f3f41c37d1a62041294a0fd14c0834ca472fa8dc", url = "https://github.com/bazelbuild/rules_swift/releases/download/3.4.0/rules_swift.3.4.0.tar.gz", ) load( "@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies", ) swift_rules_dependencies() load( "@build_bazel_rules_swift//swift:extras.bzl", "swift_rules_extra_dependencies", ) swift_rules_extra_dependencies() ```

3.2.0
? · 2025-10-31

## What's Changed TODO This release is compatible with: TODO ## MODULE.bazel Snippet ```bzl bazel_dep(name = "rules_swift", version = "3.2.0", repo_name = "build_bazel_rules_swift") ``` ## Workspace Snippet ```bzl load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "build_bazel_rules_swift", sha256 = "e07a9870c2b2023a1212cb8ea7f436f26d68acddae99c868abb0fab710a247d9", url = "https://github.com/bazelbuild/rules_swift/releases/download/3.2.0/rules_swift.3.2.0.tar.gz", ) load( "@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies", ) swift_rules_dependencies() load( "@build_bazel_rules_swift//swift:extras.bzl", "swift_rules_extra_dependencies", ) swift_rules_extra_dependencies() ```

3.1.2
? · 2025-08-06

## What's Changed TODO This release is compatible with: TODO ## MODULE.bazel Snippet ```bzl bazel_dep(name = "rules_swift", version = "3.1.2", repo_name = "build_bazel_rules_swift") ``` ## Workspace Snippet ```bzl load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "build_bazel_rules_swift", sha256 = "5eff717c18bb513285b499add68f2331509cd4e411ff085e96a86b3342c1e5aa", url = "https://github.com/bazelbuild/rules_swift/releases/download/3.1.2/rules_swift.3.1.2.tar.gz", ) load( "@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies", ) swift_rules_dependencies() load( "@build_bazel_rules_swift//swift:extras.bzl", "swift_rules_extra_dependencies", ) swift_rules_extra_dependencies() ```

3.1.1
? · 2025-07-15

## What's Changed TODO This release is compatible with: TODO ## MODULE.bazel Snippet ```bzl bazel_dep(name = "rules_swift", version = "3.1.1", repo_name = "build_bazel_rules_swift") ``` ## Workspace Snippet ```bzl load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "build_bazel_rules_swift", sha256 = "a05b5aa112278c0f934fa8352c07b489f92014f437349b12e074bd0b12f53e30", url = "https://github.com/bazelbuild/rules_swift/releases/download/3.1.1/rules_swift.3.1.1.tar.gz", ) load( "@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies", ) swift_rules_dependencies() load( "@build_bazel_rules_swift//swift:extras.bzl", "swift_rules_extra_dependencies", ) swift_rules_extra_dependencies() ```

3.1.0
? · 2025-07-09

## What's Changed TODO This release is compatible with: TODO ## MODULE.bazel Snippet ```bzl bazel_dep(name = "rules_swift", version = "3.1.0", repo_name = "build_bazel_rules_swift") ``` ## Workspace Snippet ```bzl load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "build_bazel_rules_swift", sha256 = "a7753fc930005bd1fffde96a63b562db873d58d5ad07752c1f7e16581feb4bb6", url = "https://github.com/bazelbuild/rules_swift/releases/download/3.1.0/rules_swift.3.1.0.tar.gz", ) load( "@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies", ) swift_rules_dependencies() load( "@build_bazel_rules_swift//swift:extras.bzl", "swift_rules_extra_dependencies", ) swift_rules_extra_dependencies() ```

3.0.2
? · 2025-06-10

## What's Changed TODO This release is compatible with: TODO ## MODULE.bazel Snippet ```bzl bazel_dep(name = "rules_swift", version = "3.0.2", repo_name = "build_bazel_rules_swift") ``` ## Workspace Snippet ```bzl load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "build_bazel_rules_swift", sha256 = "b17bdad10f3996cffc1ae3634e426d5280848cdb25ae5351f39357599938f5c6", url = "https://github.com/bazelbuild/rules_swift/releases/download/3.0.2/rules_swift.3.0.2.tar.gz", ) load( "@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies", ) swift_rules_dependencies() load( "@build_bazel_rules_swift//swift:extras.bzl", "swift_rules_extra_dependencies", ) swift_rules_extra_dependencies() ```

3.0.1
? · 2025-06-10

## Breaking changes * Increased `compatibility_level` to `3` by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1536 * Drop support for Bazel 6 by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1422 * Remove support for the `objc_library.module_map` attribute in `swift_clang_module_aspect` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1328 * Remove old `SwiftInfo` arguments by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1427 * Remove `swift_common.toolchain_attrs` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1385 * Remove the `emit_swiftinterface` build setting by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1393 * Remove support for the `SWIFT_CUSTOM_TOOLCHAIN` define by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1432 * Remove `swift_module_alias` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1390 * Disable `swift.emit_swiftsourceinfo` by default by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1409 ## Fixed * Fix `apple.swizzle_absolute_xcttestsourcelocation` usage by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1457 * Fix typo in `_check_supports_language_mode_6` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1484 * Fix index-import on all Xcode 16.x versions by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1504 * Fix documentation of per_module_swiftcopt flag by @jschear in https://github.com/bazelbuild/rules_swift/pull/1508 * Fix ensure undeclared outputs are deleted when not tracked by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1533 ## Added * Improved Swift Testing support by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1443 * Introduce a pure Swift runfiles library by @cerisier in https://github.com/bazelbuild/rules_swift/pull/1310 * Add execution groups for actions that don't have to use the same toolchain used when building the target by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1317 * Add back API docs for function removed from `swift_common` by @brentleyjones in * Add back API docs for function removed from `swift_common` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1429 * Add `swift_overlay` rule by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1431 * Support sharding and regex-based `--test_filter` in `swift_test` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1410 * Add `data` attribute to `mixed_language_library` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1450 * Add an API that lets aspects ask whether a target is a `swift_overlay` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1441 * Add support for `package_name` in `mixed_language_library` by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1458 * Add implicit deps to `swift_library_group` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1468 * Add `swift.suppress_warnings` feature by @aaronsky in https://github.com/bazelbuild/rules_swift/pull/1489 * Add instrumented files info to `swift_binary` and `swift_compiler_plugin` by @sebastianv1 in https://github.com/bazelbuild/rules_swift/pull/1512 * Add env attribute to swift_{binary,test} and env_inherit to swift_test by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1517 * Swift 6.0.3 for Linux by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1491 * Add a feature to allow certain targets to ignore the implicit dependencies from the toolchain. by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1518 * Add an advanced API to create a custom instance of swift_clang_module_aspect with a different toolchain type than the default by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1524 * Add swift_common.is_action_enabled as a public API. by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1523 * Implement `swift_synthesize_interface_aspect`. by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1522 ## Changed * Update `doc/README.md` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1428 * Change `swift_library` `alwayslink` default to True by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1398 * Warn instead of fail when `swiftc` not found on Linux by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1433 * Prefer Swift toolchain clang over system clang by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1434 * Stop trying to extract symbol graphs from actions that don’t compile Swift or Objective-C code by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1435 * Allow `swift_cross_import_overlay` to specify a disambiguating explicit module name for the declaring and/or bystanding module by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1417 * Put the `swift_overlay`'s deps `SwiftInfo`s into the *transitive* `SwiftInfo`s of the propagated `SwiftInfo` instead of the direct `SwiftInfo`s (which causes them to be merged with the overlay module itself) by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1438 * Don't drop compilation contexts for `private_deps` when compiling the target that imports them by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1437 * Update docs to say that a source file should only be in a single `swift_*` target, and a `swift_overlay` should only be referenced by a single other target's `aspect_hints` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1439 * Set `alwayslink` on the clang target of `mixed_language_library` as well by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1451 * Stop using config.string(allow_multiple = True) by @EdSchouten in https://github.com/bazelbuild/rules_swift/pull/1452 * Make sure that the path to the generated header in the generated module map is workspace-relative when the feature configuration asks for it by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1442 * Don't drop `swift_overlay` linking contexts when an overlay depends on another library that has an overlay by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1440 * Apply -enable-bare-slash-regex action config to SWIFT_ACTION_DERIVE_F… by @jschear in https://github.com/bazelbuild/rules_swift/pull/1464 * Map const-values in output file map for incremental by @vikage in https://github.com/bazelbuild/rules_swift/pull/1471 * Include swift_proto_library attrs in compilation by @sebastianv1 in https://github.com/bazelbuild/rules_swift/pull/1473 * Mark non_module_deps extension as reproducible by @cerisier in https://github.com/bazelbuild/rules_swift/pull/1481 * Print a warning, instead of an error, when not finding `swiftc.exe` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1483 * Create fewer Xcode toolchains by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1487 * Always create all toolchains by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1488 * Only warn about missing `swiftc` on matching host platform by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1490 * Support swift plugins in mixed_language_library by @qyang-nj in https://github.com/bazelbuild/rules_swift/pull/1493 * Deduplicate plugin arguments by @qyang-nj in https://github.com/bazelbuild/rules_swift/pull/1495 * Update `swift.suppress_warnings` comment by @mattrobmattrob in https://github.com/bazelbuild/rules_swift/pull/1499 * Use `exec_group` for `SWIFT_ACTION_DERIVE_FILES` and `SWIFT_ACTION_DUMP_AST` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1510 * Only pass the strict Obj-C include paths from _direct_ dependencies to compilation actions by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1516 * Use a different attribute than features on toolchain rules to specify which features should be enabled/disabled by default for all targets built with that toolchain by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1519 * Use a new provider to wrap symbol graph extraction used for test discovery by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1521 * Ensure that `swift_synthesize_interface_aspect` generates unique outputs by @luispadron in https://github.com/bazelbuild/rules_swift/pull/1526 * Remove prints when toolchain is skipped by @keith in https://github.com/bazelbuild/rules_swift/pull/1535 ## Removed * Remove `apple_common.Objc` provider usage related to linking now that the Apple linking logic in Bazel gets everything from `CcInfo` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1383 * Remove implicit dependencies of `_allowlist_function_transition` in third_party by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1402 * Remove unnecessary `SwiftBinaryInfo` required provider from `plugins` attribute by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1445 * Remove redundant code in `swift_import` by @brentleyjones in https://github.com/bazelbuild/rules_swift/pull/1446 ## New Contributors * @EdSchouten made their first contribution in https://github.com/bazelbuild/rules_swift/pull/1452 * @jschear made their first contribution in https://github.com/bazelbuild/rules_swift/pull/1464 * @vikage made their first contribution in https://github.com/bazelbuild/rules_swift/pull/1471 * @cerisier made their first contribution in https://github.com/bazelbuild/rules_swift/pull/1481 * @qyang-nj made their first contribution in https://github.com/bazelbuild/rules_swift/pull/1493 * @thelvis4 made their first contribution in https://github.com/bazelbuild/rules_swift/pull/1503 **Full Changelog**: https://github.com/bazelbuild/rules_swift/compare/2.8.2...3.0.1 This release is compatible with Bazel 7.x LTS, 8.x LTS, and 9.x rolling releases. ## MODULE.bazel Snippet ```bzl bazel_dep(name = "rules_swift", version = "3.0.1", repo_name = "build_bazel_rules_swift") ``` ## Workspace Snippet ```bzl load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") http_archive( name = "build_bazel_rules_swift", sha256 = "ae6673d27024914fa89e32fd1369e9563fb8ede463feac703aaec1ba6ca0358c", url = "https://github.com/bazelbuild/rules_swift/releases/download/3.0.1/rules_swift.3.0.1.tar.gz", ) load( "@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies", ) swift_rules_dependencies() load( "@build_bazel_rules_swift//swift:extras.bzl", "swift_rules_extra_dependencies", ) swift_rules_extra_dependencies() ```