Hello, i am interested i writing a functional compiler bac end for a functional language. I have been thining of targetting llvm but cranelift may be an easier to use alternative. One of my main questions Is whether cranelift can Targets wasm like llvm can
Hey, currently cranelift only supports 4 targets, x86, AArch64, S390X and RISC-V. Adding a WebAssembly backend has been brought up before in this issue: https://github.com/bytecodealliance/wasmtime/issues/2566
I see, so it could be done, but it has Yet to be implemented. Is there anything in the cranelift ir that would make it not an ideal Fit to Target wasm?
I have seem other SSA ir that Targets wasm so i hope it Is as well:
https://github.com/GetFirefly/firefly
I'm not entirely sure if there's anything cranelift specific that makes it worse, @Chris Fallin has a good summary on the topic in this comment.
Thanks. That comment links to a very useful project
I have been talking with the Gerbil/ Gambit scheme developers and the lead developer of Gambit says he would rather target web assembly directly as another IR could limit the performance of the generated code and the Gambit Bytecode Machine already does relooping of sorts to target other languages and is already an stack machine
I am checking the Gambit Bytecode Machine to see whether its actually similar to wasm and cranelift to see if using it would add a performance penalty.
Would rather use cranelift ( or a similar alternative ) to gain more native backends, low level optimizations and the ability to define custom calling conventions
Redox os developers say faster context switching could be achieved by using a non standard system call ABI
Last updated: Dec 23 2024 at 12:05 UTC