evm2wasm icon indicating copy to clipboard operation
evm2wasm copied to clipboard

javascript vs c++

Open cdetrio opened this issue 6 years ago • 1 comments

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.

cdetrio avatar Jul 26 '18 17:07 cdetrio

So the action items here are:

  1. Get the cpp implementation up to scratch
  2. Deprecate/remove the javascript version of index.js

?

lrettig avatar Jul 26 '18 20:07 lrettig