You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Support for embedding resources in an executable (#6067)
Basic support for a new `.embed` resource rule which will allow embedding the contents of the resource into the executable code by generating a byte array, e.g.
```
struct PackageResources {
static let best_txt: [UInt8] = [104,101,108,108,111,32,119,111,114,108,100,10]
}
```
Note that the current naïve implementaton will not work well for larger resources as it is pretty memory inefficient.
@@ -284,6 +292,37 @@ public final class SwiftTargetBuildDescription {
284
292
self.resourceBundleInfoPlistPath = infoPlistPath
285
293
}
286
294
}
295
+
296
+
tryself.generateResourceEmbeddingCode()
297
+
}
298
+
299
+
// FIXME: This will not work well for large files, as we will store the entire contents, plus its byte array representation in memory and also `writeIfChanged()` will read the entire generated file again.
0 commit comments