Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ericsink/wasm2cil
A "compiler" that can take a WebAssembly/WASI module and convert it to a .NET assembly
https://github.com/ericsink/wasm2cil
Last synced: 6 days ago
JSON representation
A "compiler" that can take a WebAssembly/WASI module and convert it to a .NET assembly
- Host: GitHub
- URL: https://github.com/ericsink/wasm2cil
- Owner: ericsink
- License: apache-2.0
- Created: 2019-03-28T02:26:43.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-14T17:36:09.000Z (over 4 years ago)
- Last Synced: 2025-01-02T17:16:12.851Z (13 days ago)
- Language: C
- Homepage:
- Size: 2.86 MB
- Stars: 283
- Watchers: 23
- Forks: 24
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE.TXT
Awesome Lists containing this project
- awesome-wasi - wasm2cil
- AwesomeCompiler - wasm2cil
README
# wasm2cil
This is a .NET compiler for WebAssembly modules, including
support for WASI.Specifically, it can take a WebAssembly module and
translate it into a .NET assembly on disk.The resulting DLL is not interpreted -- it contains
the same functions as the WebAssembly module, translated
from Wasm instructions to CIL instructions.This is designed to be used with Clang 8 and
wasi-sysroot. In that sense, this provides a way
to compile C/C++ for .NET, using Wasm as a halfway
point. Like an alternative to pinvoke.(Rust should hopefully work too, but I haven't tried that yet.)
All of this is very much a work in progress.
But the current status is that some basic things
do work. Working test apps in this repo include a
small ray tracer and a basic port of SQLite. The
latter can read and write SQLite database files that
seem to be fully interoperable with "regular" SQLite
builds.Still, I suggest you not try using this for anything serious yet.
The subdirectories of this repo have README files with
a bit more info.See [my blog entry](https://ericsink.com/entries/wasm_wasi_dotnet.html) for more information.