Perlito icon indicating copy to clipboard operation
Perlito copied to clipboard

wasm backend ?

Open mcarbonneaux opened this issue 3 years ago • 4 comments

while be insteresting to have wasm bytecode backend ! https://webassembly.org/

mcarbonneaux avatar Dec 13 '21 23:12 mcarbonneaux

@mcarbonneaux given emcc we might as well target llvm or C. There is https://github.com/haukex/webperl too and for ref see: https://github.com/jashkenas/coffeescript/wiki/List-of-languages-that-compile-to-JS .

shlomif avatar Dec 14 '21 15:12 shlomif

webperl is perl c binary compiled to wasm not to compile perl to wasm bytecode. perlito compile to javascript not to wasm bytecode. emcc can use javascript but you need to compile perl to javascript before...

mcarbonneaux avatar Dec 14 '21 19:12 mcarbonneaux

@mcarbonneaux we can compile perl to (e.g.) C and use emcc to compile the C code to wasm.

shlomif avatar Dec 15 '21 05:12 shlomif

ok it's possible way... but it's not very direct way ! perlito if i understand can compil directely to java bytecode... the ideal way while be to abel to compil directly to wasm bytecode... perl are very simple language and performante to manipulate string, and wasm can now used as filter in envoy for exemple...

  • https://github.com/proxy-wasm

but for now can only use rust/c++... and this language are so low level and note very simple to use to manipulate the trafic... an proxxy wasm sdk as been done for assemblyscript (typescript like)... but i prefere to code in perl for this type of coding... plus many of the old proxy to migrate from use in generale perl for manipuling the trafic (nginx/apache...), this make simplier to migrate from...

mcarbonneaux avatar Dec 15 '21 13:12 mcarbonneaux