Skip to content
.NET Bindings for the Wasmer Runtime
C# Makefile
Branch: master
Clone or download
migueldeicaza Merge pull request #4 from kripken/typo
Fix a tiny typo, 'Shrap' => 'Sharp'
Latest commit 06c9ddb Aug 6, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
DemoDesktop Sample caller Jul 28, 2019
StandaloneSample Small sample shuffling and README updates Aug 2, 2019
Tests Small sample shuffling and README updates Aug 2, 2019
WasmerSharp Small sample shuffling and README updates Aug 2, 2019
docfx Fix a tiny typo, 'Shrap' => 'Sharp' Aug 4, 2019
docs Update docs Jul 30, 2019
ecmadocs/en Add docs Jul 30, 2019
native Small sample shuffling and README updates Aug 2, 2019
.gitignore Add Jul 26, 2019
LICENSE Provide a sample Jul 29, 2019
Makefile Add a couple of additional samples for .NET Core Aug 1, 2019
README.md Small sample shuffling and README updates Aug 2, 2019
WasmerSharp.sln
azure-pipelines.yml Update azure-pipelines.yml for Azure Pipelines Aug 2, 2019

README.md

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 locaion 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.

You can’t perform that action at this time.