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
README.md: Clarify Swift version and SwiftPM instructions (#203)
Added new SwiftPM CLI commands for adding dependencies.
List of supported platforms was updated to include the broader support matrix. While some of these newly mentioned Linux distributions aren't directly tested by WasmKit CI, they are tested indirectly on ci.swift.org, as all Swift toolchain Linux jobs build WasmKit as a dependency.
Assorted wording refinements and helpful links for beginners are also included.
Copy file name to clipboardExpand all lines: README.md
+29-12Lines changed: 29 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,15 +2,15 @@
2
2
3
3
# WasmKit
4
4
5
-
**WasmKit** is a standalone and embeddable WebAssembly runtime implementation written in Swift.
5
+
**WasmKit** is a standalone and embeddable [WebAssembly](https://webassembly.org) runtime (virtual machine) implementation and related tooling written in Swift. Starting with Swift 6.2, WasmKit CLI executable is included in [Swift toolchains distributed at swift.org](https://swift.org/install) for Linux and macOS.
6
6
7
7
## Usage
8
8
9
-
The best way to learn how to use WasmKit is to look at the [Examples](./Examples) directory.
9
+
You can find introductory examples and API documentation on the [Swift Package Index documentation page](https://swiftpackageindex.com/swiftwasm/WasmKit/main/documentation/wasmkit).
10
10
11
11
### Command Line Tool
12
12
13
-
WasmKit provides a command line tool to run WebAssembly binaries compliant with WASI.
13
+
WasmKit provides a command line tool to run WebAssembly binaries compatible with [WASI](https://wasi.dev).
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
+
To use WasmKit in your package, add it as a [Swift Package Manager](https://www.swift.org/documentation/package-manager/) dependency.
27
+
28
+
Run the following commands in the same directory as your `Package.swift` manifest 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 instead to your `Package.swift` file:
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/).
95
+
The minimum supported version is Swift 6.0, which is the version used to bootstrap the Swift toolchain on[ci.swift.org](https://ci.swift.org/).
0 commit comments