Skip to content

Docs/interoperability mode #8902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions Sources/PackageDescription/BuildSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -575,12 +575,15 @@ public struct SwiftSetting: Sendable {
name: "strictMemorySafety", value: ["ON"], condition: condition)
}

/// The interoperability mode
public enum InteroperabilityMode: String {
/// Emit code compatible with being imported from C and Objective-C.
case C
/// Emit code compatible with being imported from C++ and Objective-C++.
case Cxx
}

/// Enable Swift interoperability with a given language.
/// Enables Swift interoperability with a given language.
///
/// This is useful for enabling interoperability between Swift and C++ for
/// a given target.
Expand All @@ -591,7 +594,7 @@ public struct SwiftSetting: Sendable {
/// - Since: First available in PackageDescription 5.9.
///
/// - Parameters:
/// - mode: The language mode, either C or Cxx.
/// - mode: The interoperability mode, either C-compatible or C++-compatible.
/// - condition: A condition that restricts the application of the build
/// setting.
@available(_PackageDescription, introduced: 5.9)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,28 @@

- ``define(_:_:)``
- ``unsafeFlags(_:_:)``
- ``strictMemorySafety(_:)``
- ``treatAllWarnings(as:_:)``
- ``treatWarning(_:as:_:)``

### Configuring Swift Language Mode

- ``swiftLanguageMode(_:_:)``

### Configuring Swift Concurrency

- ``strictMemorySafety(_:)``
- ``defaultIsolation(_:_:)``

### Configuring Swift Experimental and Upcoming Features

- ``enableExperimentalFeature(_:_:)``
- ``enableUpcomingFeature(_:_:)``

### Configuring Swift Interoperability

- ``interoperabilityMode(_:_:)``
- ``InteroperabilityMode``

### Deprecated configurations

- ``swiftLanguageVersion(_:_:)``
3 changes: 1 addition & 2 deletions Sources/PackageDescription/Resource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
/// Alternatively, exclude resource files from a target by passing them to the
/// target initializer's ``Target/exclude`` parameter.
///
/// To learn more about package resources, see
/// <doc:bundling-resources-with-a-swift-package>.
/// To learn more about package resources, see [Bundling resources as a Swift Package](https://developer.apple.com/documentation/xcode/bundling-resources-with-a-swift-package).
@available(_PackageDescription, introduced: 5.3)
public struct Resource: Sendable {

Expand Down
3 changes: 1 addition & 2 deletions Sources/PackageDescription/Target.swift
Original file line number Diff line number Diff line change
Expand Up @@ -210,8 +210,7 @@ public final class Target {
/// package compute-checksum path/to/MyFramework.zip` at the command line to
/// make sure you create a correct SHA256 checksum.
///
/// For more information, see
/// <doc:distributing-binary-frameworks-as-swift-packages>.
/// For more information, see [Distributing binary frameworks as Swift packages](https://developer.apple.com/documentation/xcode/distributing-binary-frameworks-as-swift-packages).
@available(_PackageDescription, introduced: 5.3)
public var checksum: String?

Expand Down