evm2wasm
evm2wasm copied to clipboard
javascript vs c++
evm2wasm is made up of two modules: generateInterface.js and index.js. The interface generator generates a library of wast files ("interface wast files", with each wast file corresponds to an EVM opcode, for example). Index.js contains the run-time logic, which takes as input some EVM bytecode and transpiles it to ewasm bytecode using the library of interface wast files.
generateInterface.js can remain written in javascript. There is no rationale for porting it to a different language since it is only a build step, and not used during run-time.
index.js is being ported to c++, as the file evm2wasm.cpp. The rationale for porting it to C++ is that it can then be compiled to wasm, and then used as a system contract by any ewasm client.
So the action items here are:
- Get the cpp implementation up to scratch
- Deprecate/remove the javascript version of
index.js
?