Wasmer: Add support for C#/.Net Core

Created on 17 Jan 2019  路  7Comments  路  Source: wasmerio/wasmer

Is there any plan to add support for C#/.Net Core built wasm. Currently Microsoft is using the Blazor https://github.com/aspnet/Blazor project for C# wasm in the browser.

Most helpful comment

Supporting C#/.Net Core would be super interesting!

We will research about it and post here our thoughts and findings after :)

All 7 comments

Supporting C#/.Net Core would be super interesting!

We will research about it and post here our thoughts and findings after :)

Blazor uses mono, corert also has experimental support for wasm (not enough to run Blazor). Both use emscripten so will need the syscalls first.

In the meantime, could a C# program just call the wasmer CLI to run a WASM module? But, how would it get or send any data to/from the module?

The emscripten syscalls are now much more advanced, so it might be easier to run C# wasm-generated programs with Wasmer.

In the meantime, could a C# program just call the wasmer CLI to run a WASM module? But, how would it get or send any data to/from the module?

I think with the wasmer C bindings we could embed wasmer runtime into C#. In fact, I believe we should be able to emit a .dll to be used from C#.
I would love to provide guidance if someone wants to start working on it :)

C# can access any native dlls through pinvoke. You would just need to load the dll and have entry points to the functions. Here is an example of what I am talking about: https://www.codeproject.com/Articles/403285/P-Invoke-Tutorial-Basics-Part

This project creates the C# bindings for Wasmer, so anyone can use Wasmer easily from C# :)

https://github.com/migueldeicaza/WasmerSharp

Hope this is useful! I'm quite excited about the project 馃檪

Closing the issue as:

  1. The bindings for .Net/C# are stable and usable
  2. The wasm compilation from .Net is using Emscripten, and the output should be able to be run with Wasmer (as Wasmer already supports Emscripten)
Was this page helpful?
0 / 5 - 0 ratings

Related issues

RReverser picture RReverser  路  4Comments

robinvanemden picture robinvanemden  路  4Comments

MaxGraey picture MaxGraey  路  3Comments

hrydgard picture hrydgard  路  4Comments

danchitnis picture danchitnis  路  4Comments