Giter Club home page Giter Club logo

wasm-interpreter-apple's Introduction

WasmInterpreter

WasmInterpreter is a small Swift wrapper around CWasm3, which packages wasm3 inside of a Swift package while adding a few minor conveniences on top. The overriding goal of WasmInterpreter is to provide a clean, Swift-y interface to wasm3.

The core class inside of WasmInterpreter is, naturally, WasmInterpreter. This class is initialized with a stack size (default: 512 KB) and a Wasm module. WasmInterpreter takes care of initializing the WebAssembly environment, runtime, and module, and exposes a clean interface for calling Wasm functions, importing native functions into Wasm modules, and extracting data from the runtime's heap. You can find examples for all of these things by looking at the tests.

Installation

To use WasmInterpreter with the Swift Package Manager, add a dependency to your Package.swift file:

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

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.

wasm-interpreter-apple's People

Contributors

atdrendel avatar brooksmtownsend avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.