Skip to content

Commit f300472

Browse files
committed
replace term RLP with EDSL
1 parent b02a4ac commit f300472

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

proposals/NNNN-replaceable-library-plugins.md renamed to proposals/NNNN-environment-dependent-shared-libraries.md

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
# Replaceable Library Plugins
1+
# Environment Dependent Shared Libraries
22

3-
* Proposal: [SE-NNNN](NNNN-replaceable-library-plugins.md)
3+
* Proposal: [SE-NNNN](NNNN-environment-dependent-shared-libraries.md)
44
* Authors: [tayloraswift](https://github.com/tayloraswift)
55
* Review Manager: TBD
66
* Implementation: [swiftlang/swift-package-manager#8249](https://github.com/swiftlang/swift-package-manager/pull/8249)
77
* Bugs: [SR-5714](https://github.com/swiftlang/swift-package-manager/issues/5714)
88

99
## Introduction
1010

11-
SwiftPM currently has no support for non-system binary library dependencies on Linux. This proposal adds support for **Replaceable Library Plugins**, which are a type of dynamic library that is shared across a fleet of machines and can be upgraded without recompiling and redeploying all applications running on those machines. We will distribute Replaceable Library Plugins through the existing `.artifactbundle` format.
11+
SwiftPM currently has no support for non-system binary library dependencies on Linux. This proposal adds support for **Environment Dependent Shared Libraries**, which are a type of dynamic library that is shared across a fleet of machines and can be upgraded without recompiling and redeploying all applications running on those machines. We will distribute Environment Dependent Shared Libraries through the existing `.artifactbundle` format.
1212

1313
Swift-evolution thread: [Discussion thread](https://forums.swift.org/t/pitch-replaceable-library-plugins/77605)
1414

@@ -29,13 +29,13 @@ While macOS has Dynamic Library support through XCFrameworks, on Linux we curren
2929

3030
On Linux, there are a lot of obstacles to having fully general support for Dynamic Libraries. Swift is not ABI stable on Linux, and Linux itself is not a single platform but a wide range of similar platforms that provide few binary compatibility guarantees. This means it is pretty much impossible for a public Swift library to vend precompiled binaries that will Just Work for everyone, and we are not going to try to solve that problem in this proposal.
3131

32-
Instead, we will focus on **Replaceable Library Plugins** (RLPs). We choose this term to emphasize the distinction between our use case and fully general Dynamic Libraries.
32+
Instead, we will focus on **Environment Dependent Shared Libraries** (EDSLs). We choose this term to emphasize the distinction between our use case and fully general Dynamic Libraries.
3333

3434
### Organization-Defined Platforms (ODPs)
3535

36-
Unlike fully general Dynamic Libraries, you would distribute Replaceable Library Plugins strictly for internal consumption within an organization, or to a small set of paying clients.
36+
Unlike fully general Dynamic Libraries, you would distribute Environment Dependent Shared Libraries strictly for internal consumption within an organization, or to a small set of paying clients.
3737

38-
The organization that distributes an RLP is responsible for defining what exactly constitutes a “platform” for their purposes. An Organization-Defined Platform (ODP) is not necessarily an operating system or architecture, or even a specific distribution of an operating system. A trivial example of two ODPs might be:
38+
The organization that distributes an EDSL is responsible for defining what exactly constitutes a “platform” for their purposes. An Organization-Defined Platform (ODP) is not necessarily an operating system or architecture, or even a specific distribution of an operating system. A trivial example of two ODPs might be:
3939

4040
1. Ubuntu 24.04 with the Swift 6.0.3 runtime installed at `/home/ubuntu/swift`
4141
2. Ubuntu 24.04 with the Swift 6.0.3 runtime installed at `/home/ubuntu/swift-runtime`
@@ -44,13 +44,13 @@ Concepts like Platform Triples are not sufficient to describe an ODP. Even thoug
4444

4545
Organizations add and remove ODPs as needed, and trying to define a global registry of all possible ODPs is a non-goal.
4646

47-
To keep things simple, we identify ODPs by the URL of the Artifact Bundle that contains the RLP.
47+
To keep things simple, we identify ODPs by the URL of the Artifact Bundle that contains the EDSL.
4848

49-
### Creating RLPs
49+
### Creating EDSLs
5050

51-
To compile an RLP, you just need to build an ordinary SwiftPM library product with the `-enable-library-evolution` flag. This requires no modifications to SwiftPM.
51+
To compile an EDSL, you just need to build an ordinary SwiftPM library product with the `-enable-library-evolution` flag. This requires no modifications to SwiftPM.
5252

53-
You would package an RLP as an `.artifactbundle` just as you would an executable, with the following differences:
53+
You would package an EDSL as an `.artifactbundle` just as you would an executable, with the following differences:
5454

5555
- The `info.json` must have `schemaVersion` set to `1.2` or higher.
5656
- The artifact type must be `library`, a new enum case introduced in this proposal.
@@ -59,21 +59,21 @@ You would package an RLP as an `.artifactbundle` just as you would an executable
5959

6060
Because SwiftPM is not (and cannot be) aware of a particular organization’s ODPs, this enforces the requirement that each ODP must have its own Artifact Bundle.
6161

62-
The organization that distributes the RLP is responsible for upholding ABI stability guarantees, including the exact Swift compiler and runtime versions needed to safely consume the RLP.
62+
The organization that distributes the EDSL is responsible for upholding ABI stability guarantees, including the exact Swift compiler and runtime versions needed to safely consume the EDSL.
6363

6464

65-
### Consuming RLPs
65+
### Consuming EDSLs
6666

67-
To consume an RLP, you would add a `binaryTarget` to your `Package.swift` manifest, just as you would for an executable. Because ODPs are identified by the URL of the Artifact Bundle, there are no new fields in the `PackageDescription` API.
67+
To consume an EDSL, you would add a `binaryTarget` to your `Package.swift` manifest, just as you would for an executable. Because ODPs are identified by the URL of the Artifact Bundle, there are no new fields in the `PackageDescription` API.
6868

69-
We expect that the logic for selecting the correct RLP for a given ODP would live within the `Package.swift` file, that it would be highly organization-specific, and that it would be manipulated using existing means such as environment variables.
69+
We expect that the logic for selecting the correct EDSL for a given ODP would live within the `Package.swift` file, that it would be highly organization-specific, and that it would be manipulated using existing means such as environment variables.
7070

7171

72-
### Deploying RLPs
72+
### Deploying EDSLs
7373

74-
Deploying RLPs does not involve SwiftPM or Artifact Bundles at all. You would deploy an RLP by copying the latest binaries to the appropriate `@rpath` location on each machine in your fleet. The `@rpath` location is part of the ODP definition, and is not modeled by SwiftPM.
74+
Deploying EDSLs does not involve SwiftPM or Artifact Bundles at all. You would deploy an EDSL by copying the latest binaries to the appropriate `@rpath` location on each machine in your fleet. The `@rpath` location is part of the ODP definition, and is not modeled by SwiftPM.
7575

76-
Some organizations might choose to forgo the `@rpath` mechanism entirely and simply install the RLPs in a system-wide location.
76+
Some organizations might choose to forgo the `@rpath` mechanism entirely and simply install the EDSLs in a system-wide location.
7777

7878

7979
## Detailed design
@@ -110,7 +110,7 @@ Below is an example of an `info.json` file for an Artifact Bundle containing a s
110110
}
111111
```
112112

113-
The artifact must have exactly one variant in the `variants` list, and the `supportedTriples` field is forbidden. An RLP Artifact Bundle can contain multiple libraries at the top level.
113+
The artifact must have exactly one variant in the `variants` list, and the `supportedTriples` field is forbidden. An EDSL Artifact Bundle can contain multiple libraries at the top level.
114114

115115
Below is an example of the layout of an Artifact Bundle containing a single library called `MyLibrary`. Only the `info.json` must appear at the root of the Artifact Bundle; all other files can appear at whatever paths are defined in the `info.json`, as long as they are within the Artifact Bundle.
116116

@@ -122,12 +122,12 @@ Below is an example of the layout of an Artifact Bundle containing a single libr
122122
📝 info.json
123123
```
124124

125-
A macOS Artifact Bundle would contain a `.dylib` instead of a `.so`. RLPs will be supported on macOS, although we expect this will be an exceedingly rare use case.
125+
A macOS Artifact Bundle would contain a `.dylib` instead of a `.so`. EDSLs will be supported on macOS, although we expect this will be an exceedingly rare use case.
126126

127127

128128
## Security
129129

130-
RLPs are not intended for public distribution, and are not subject to the same security concerns as public libraries. Organizations that distribute RLPs are responsible for ensuring that the RLPs are safe to consume.
130+
EDSLs are not intended for public distribution, and are not subject to the same security concerns as public libraries. Organizations that distribute EDSLs are responsible for ensuring that the EDSLs are safe to consume.
131131

132132

133133
## Impact on existing packages
@@ -143,11 +143,11 @@ SwiftPM currently uses Platform Triples to select among artifact variants when c
143143

144144
We could extend Platform Triples to model ODPs, but this would privilege a narrow set of predefined deployment architectures, and if you wanted to add a new ODP, you would have to modify SwiftPM to teach it to recognize the new ODP.
145145

146-
### Supporting multiple variants of an RLP in the same Artifact Bundle
146+
### Supporting multiple variants of an EDSL in the same Artifact Bundle
147147

148-
We could allow an Artifact Bundle to contain multiple variants of an RLP, but we would still need to support a way to identify those variants, which in practice makes SwiftPM aware of ODPs.
148+
We could allow an Artifact Bundle to contain multiple variants of an EDSL, but we would still need to support a way to identify those variants, which in practice makes SwiftPM aware of ODPs.
149149

150-
We also don’t see much value in this feature, as you would probably package and upload RLPs using one CI/CD workflow per ODP anyway. Combining artifacts would require some kind of synchronization mechanism to await all pipelines before fetching and merging bundles.
150+
We also don’t see much value in this feature, as you would probably package and upload EDSLs using one CI/CD workflow per ODP anyway. Combining artifacts would require some kind of synchronization mechanism to await all pipelines before fetching and merging bundles.
151151

152152
One benefit of merging bundles would be that it reduces the number of checksums you need to keep track of, but we expect that most organizations will have a very small number of ODPs, with new ODPs continously phasing out old ODPs.
153153

0 commit comments

Comments
 (0)