GithubHelp home page GithubHelp logo

gfs / wasm2cil Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ericsink/wasm2cil

0.0 0.0 0.0 2.93 MB

A "compiler" that can take a WebAssembly/WASI module and convert it to a .NET assembly

License: Apache License 2.0

Shell 0.03% C 96.18% C# 0.38% F# 3.40% Rust 0.01%

wasm2cil's Introduction

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 for more information.

wasm2cil's People

Contributors

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