Coder Social home page Coder Social logo

wasmersharp's Introduction

WasmerSharp

.NET Bindings for the Wasmer Runtime. This allows you to run WASM code in the same process as your .NET Code.

If you are looking at a way of converting WebAssembly code into .NET IL, suitable to turn C and C++ code into cross-platform mobile IL, use Eric Sink's Wasm2Cil documented here

This binds Wasmer at version ab5f28851a676f9d3672f41d1608e34ddab470ff

Install and use

The best way of using WasmerSharp is to add a reference to the WasmerSharp Nuget package and then follow along "Introduction to WasmerSharp"

The StandaloneSample directory contains a .NET core example that you can use as a reference.

Documentation

See the Introduction to WasmerSharp for a quick crash course on WasmerSharp.

Wasmer API Documentation

Developing WasmerSharp

If you want to contribute to WasmerSharp, you will likely develop against this tree, and not against the published NuGet package in the StandaloneSample which is intended to be a public sample that works with the public release.

WasmerSharp itself is a .NET Standard 2 library, so it works with .NET Desktop, .NET Core and Mono. You can use the projects in the Tests directory to test against the WasmerSharp library built here, as opposed to referencing the official NuGet package.

The bindings will need the Wasmer C runtime to be installed somewhere accessible in your system (either in a location accessible to the dynamic linker in your OS, or you must copy manually those libraries into the development directory).

To obtain the native Wasmer C runtime, you can either download the support library for your platform from Wasmer Releases page or using the toplevel makefile target "fetch-runtimes". Those are named:

  • libwasmer_runtime_c_api.dylib for MacOS
  • libwasmer_runtime_c_api.so for Linux
  • wasmer_runtime_c_api.dll for Windows

The runtime that you get needs to be copied in the appropriate location in bin/Debug or bin/Release in those places.

If you want to work on the Wasmer runtime and produce the support libraries for WasmerSharp, you would build Wasmer like this:

cargo build -p wasmer-runtime-c-api

And then copy the target/debug/libwasmer_runtime_c_api.dylib library to the destination.

LICENSE

This is licensed under the MIT License terms.

wasmersharp's People

Contributors

dcbrewster avatar kripken avatar migueldeicaza avatar phrohdoh avatar yjh0502 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.