fglock / Perlito

"Perlito" Perl programming language compiler
http://fglock.github.io/Perlito/
Other
414 stars 47 forks source link

wasm backend ? #66

Open mcarbonneaux opened 2 years ago

mcarbonneaux commented 2 years ago

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

shlomif commented 2 years ago

@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 .

mcarbonneaux commented 2 years ago

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...

shlomif commented 2 years ago

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

mcarbonneaux commented 2 years ago

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...

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...