Skip to content

Commit

Permalink
Consume the dynamic library version of Synchronized
Browse files Browse the repository at this point in the history
  • Loading branch information
atdrendel committed Apr 10, 2021
1 parent eb82bff commit 196de47
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
"repositoryURL": "https://github.com/shareup/synchronized.git",
"state": {
"branch": null,
"revision": "e8bbab660d61b4f78fd94c3640f1a03886c326ea",
"version": "2.1.0"
"revision": "56f5956cbd9cf4bcd2f92153c03ae293dffb0987",
"version": "2.3.0"
}
}
]
Expand Down
16 changes: 12 additions & 4 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// swift-tools-version:5.2

import PackageDescription

let package = Package(
Expand All @@ -13,13 +12,22 @@ let package = Package(
targets: ["WasmInterpreter"]),
],
dependencies: [
.package(name: "CWasm3", url: "https://github.com/shareup/cwasm3.git", .upToNextMinor(from: "0.4.7")),
.package(name: "Synchronized", url: "https://github.com/shareup/synchronized.git", .upToNextMajor(from: "2.1.0")),
.package(
name: "CWasm3",
url: "https://github.com/shareup/cwasm3.git",
from: "0.4.7"),
.package(
name: "Synchronized",
url: "https://github.com/shareup/synchronized.git",
from: "2.3.0"),
],
targets: [
.target(
name: "WasmInterpreter",
dependencies: ["CWasm3", "Synchronized"]),
dependencies: [
"CWasm3",
.product(name: "SynchronizedDynamic", package: "Synchronized"),
]),
.testTarget(
name: "WasmInterpreterTests",
dependencies: ["WasmInterpreter"]),
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,16 @@ To use `WasmInterpreter` with the Swift Package Manager, add a dependency to you

```swift
dependencies: [
package(name: "WasmInterpreter", url: "https://github.com/shareup/wasm-interpreter-apple.git", .upToNextMinor(from: "0.4.0")),
package(name: "WasmInterpreter", url: "https://github.com/shareup/wasm-interpreter-apple.git", .upToNextMinor(from: "0.5.0")),
],
```

## Troubleshooting

### Can't build tests with 'ld: Could not open or create -dependency_info file' error

The Address Sanitizer can't be run when linking against SynchronizedDynamic—the dynamic library version of Synchronized. So, either change WasmInterpreter to use Synchronized or disable the Address Sanitizer.

## License

The license for `WasmInterpreter` is the standard MIT license. You can find it in the `LICENSE` file.
Expand Down

0 comments on commit 196de47

Please sign in to comment.