Giter Site home page Giter Site logo

gmh5225 / wasm-interpeter-web49 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fastvm/web49

0.0 1.0 0.0 5.41 MB

Web49: WebAssembly Interpeter

License: MIT License

Shell 0.01% C++ 0.61% Python 0.13% C 39.29% Objective-C 0.28% Lua 0.02% Makefile 0.11% WebAssembly 59.54%

wasm-interpeter-web49's Introduction

Web49

Web49 is a WebAssembly toolkit and interpreter.

Try the first release! v0.0.1

Web49 contains a few tools for working with WebAssembly.

  • interpreters
    • miniwasm
      • fast wasm interpreter
      • suports multiple wasm formats
        • wasm binary format: ~100% complete
        • wasm text format: ~95% complete
        • wasm spect test: ~75% complete
      • includes a custom WASI implementation
    • raywasm
  • wasm binary tools rewrite
    • much simpler than WABT's tools
    • much smaller than Binaryen's tools
    • wat2wasm
      • convert wasm text into wasm binary
    • wasm2wat
      • generates nearly identical wat as binaryen or wabt
      • turn wasm binary into wasm text
      • supports all of wasm 1.0 and some extensions
    • wasm2wasm
      • shrink numbers in wasm files generated by llvm
        • saves 0-4 bytes per 32 bit number
        • saves 0-10 bytes per 64 bit number
      • round trip parse and reemit

Benchmarks

Benchmarks performed by wasm3 and Web49's miniwasm. Ran on an 2020 Macbook Air (M1 + 8GiB ram) using bench.py.

All Benchmarks compiled with: emcc -O2

One can also view results run on github actions One can run the benchmarks for themselves.

  • python3
    • with pip
  • emcc
  • wasm3
  • make
    • tested with GNUMake
    • works with BSDMake too
  • and a C compiler
    • gcc/clang/tcc works
    • msvc would work if someone rewrites two macros
      • #define NEXT() break
      • #define LABEL(X) case X:
      • probably a couple others
git clone https://github.com/fastvm/web49
cd web49
make CC=gcc # gcc is fastest in my tests
python3 -m pip install matplotlib
python3 bench.py

wasm-interpeter-web49's People

Contributors

shawsumma avatar

Watchers

 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.