Swiftpack.co - swiftwasm/WasmKit as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by swiftwasm.
swiftwasm/WasmKit 0.0.4
WebAssembly Runtime written in Swift
⭐️ 116
🕓 5 days ago
iOS macOS
.package(url: "https://github.com/swiftwasm/WasmKit.git", from: "0.0.4")
WAKit Icon

WasmKit

A WebAssembly runtime written in Swift. Originally developed and maintained by @akkyie.

Implements all of WebAssembly 2.0 binary parsing and execution core spec, with an exclusion of SIMD instructions. The validation and text format parts of the spec are not implemented yet.

It also has rudimentary support for WASI with only a few WASI imports implemented currently, with a goal of eventual full support for wasi_snapshot_preview1. See WASI module for more details.

Usage

Command Line Tool

$ # Usage: wasmkit-cli run <path> <functionName> [<arguments>] ...
$ swift run wasmkit-cli run Examples/wasm/fib.wasm fib i32:10
[I32(89)]

As a Library

Swift Package Manager

Add the URL of this repository to your Package.swift manifest. Then add the WasmKit library product as dependency to the target you'd like to use it with.

Testing

To run the core spec test suite run this:

$ make spectest   # Prepare core spec tests and check their assertions with WasmKit

GitHub

link
Stars: 116
Last commit: Yesterday
Advertisement: IndiePitcher.com - Cold Email Software for Startups

Dependencies

Release Notes

0.0.4
6 days ago

What's Changed

  • Performance improvements
    • Now WasmKit translates Wasm instructions into internal instruction sequence
  • Support CMake build

Pull Requests

New Contributors

Full Changelog: https://github.com/swiftwasm/WasmKit/compare/0.0.3...0.0.4

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics