Skip to content

watInterpreter can parse and execute wat files. This project is mainly just for fun.

License

Notifications You must be signed in to change notification settings

mwo/watInterpreter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 

Repository files navigation

watInterpreter

watInterpreter can parse and execute wat (text representaion of wasm) files. This project is mainly just for fun.

there is included polyfill for an es5 conversion with babel compiler

Goto here to compile some code :) https://webassembly.studio/

example

var watInterpreter = require('./watInterpreter.js'),
    fs = require('fs'),
    file = fs.readFileSync('input/read.wat', 'utf8'),
    _module = new watInterpreter().Module(file, {imports: {
        printMessage(arr, string){
            console.log(arr, string)
        }
    }});
console.log(_module);

other

watInterpreter also includes certain type expantion. Such as the vec_str and vec_arr instructions.

images

Image

Image

loops

Image

Image

About

watInterpreter can parse and execute wat files. This project is mainly just for fun.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published