Open bluesign opened 2 years ago
Interesting, I did not know this exists! Does the resulting build work properly? What is the performance compared to the WebAssembly build?
@turbolent let me try to parse all mainnet contracts with both of them and compare performance and correctness in the weekend.
So far in my tests working fast and correct, but can be some edge cases
@turbolent I ran the tests ( though it was super tricky running both at the same time, so I separated and ran in 2 pass )
I think it can still worth to compile with gopherJS though, or at least can be another package.
Nice! It's funny how size almost 1:1 correlates with speed for this one.
Issue To Be Solved
Currently cadence parser is compiled for webassembly, but it can be more effectively can be compiled with gopherJS. [0]
I tried running with :
~/go/bin/gopherjs build --minify ./runtime/cmd/parse
result was 2.8M pure js file. ( I just had to change tags to js from wasm , code didn't require any change )
[0] https://github.com/gopherjs/gopherjs