Skip to content

Commit af5c3f5

Browse files
authored
Clarify Swift version, SwiftPM instructions in README.md
Also added new SwiftPM CLI commands for adding dependencies.
1 parent d9b56a7 commit af5c3f5

File tree

1 file changed

+24
-6
lines changed

1 file changed

+24
-6
lines changed

README.md

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,30 @@ Hello, World!
2323

2424
#### Swift Package Manager
2525

26-
You can use WasmKit as a [Swift Package Manager](https://www.swift.org/documentation/package-manager/) dependency by adding the following to your `Package.swift` file:
26+
You can use WasmKit as a [Swift Package Manager](https://www.swift.org/documentation/package-manager/) dependency.
27+
28+
Run the following command to add the dependency:
29+
30+
```
31+
swift package add-dependency https://github.com/swiftwasm/WasmKit --up-to-next-minor-from 0.1.6
32+
swift package add-target-dependency WasmKit <your-package-target-name> --package WasmKit
33+
```
34+
35+
You can also add the following snippet manually to your `Package.swift` file:
2736

2837
```swift
2938
dependencies: [
30-
.package(url: "https://github.com/swiftwasm/WasmKit.git", from: "0.1.0"),
39+
// ...other dependencies
40+
.package(url: "https://github.com/swiftwasm/WasmKit.git", .upToNextMinor(from: "0.1.6")),
3141
],
42+
// ...other package configuration
43+
targets: [
44+
// ...other targets
45+
.target(
46+
name: "<your-package-target-name",
47+
dependencies: [.product(name: "WasmKit", package: "WasmKit")],
48+
)
49+
]
3250
```
3351

3452
You can find API documentation on the [Swift Package Index](https://swiftpackageindex.com/swiftwasm/WasmKit/main/documentation/wasmkit).
@@ -47,11 +65,11 @@ You can find API documentation on the [Swift Package Index](https://swiftpackage
4765

4866
## Supported Platforms
4967

50-
WasmKit engine works on all major platforms supported by Swift. It is continuously tested on macOS, Ubuntu, and Windows,
68+
WasmKit engine works on all major platforms supported by Swift. It is continuously tested on macOS, Ubuntu, Amazon Linux 2, and Windows,
5169
and should work on the following platforms:
5270

5371
- macOS 10.13+, iOS 12.0+, tvOS 12.0+, watchOS 6.0+
54-
- Ubuntu 20.04+
72+
- Amazon Linux 2, Debian 12, Ubuntu 22.04+, Fedora 39+
5573
- Windows 10+
5674

5775
## Implementation Status
@@ -70,12 +88,12 @@ and should work on the following platforms:
7088
| | [Memory64](https://github.com/WebAssembly/memory64/blob/main/proposals/memory64/Overview.md) | ✅ Implemented |
7189
| | [Tail call](https://github.com/WebAssembly/tail-call/blob/master/proposals/tail-call/Overview.md) | ✅ Implemented |
7290
| | [Threads and atomics](https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md) | 🚧 Parser implemented |
73-
| WASI | WASI Preview 1 | ✅ Implemented |
91+
| WASI | WASI Preview 1 | 🚧 [Majority of syscalls implemented](https://github.com/swiftwasm/WasmKit/blob/d9b56a7b3f979a72682c0d37f6cc71b3493dae65/Tests/WASITests/IntegrationTests.swift#L31) |
7492

7593

7694
## Minimum Supported Swift Version
7795

78-
The minimum supported Swift version of WasmKit is 5.8, which is the version used to bootstrap the Swift toolchain in [ci.swift.org](https://ci.swift.org/).
96+
The minimum supported version is Swift 6.0, which is the version used to bootstrap the Swift toolchain in [ci.swift.org](https://ci.swift.org/).
7997

8098
## Testing
8199

0 commit comments

Comments
 (0)