News for hackers. Stuff that matters.
Re:Cranelift code generation comes to Rust by rishav_sharan on Monday March 18, 2024 @11:44AM (#39746072)
It sucks that there is no way to use cranelift from outside of rust to create your own toy language. I would have loved to use cranelift in a toy compiler, but I am not ready to pay the Rust price of complexity.
Re:Cranelift code generation comes to Rust by sigsev_251 on Monday March 18, 2024 @12:18PM (#39746444)
There is always qbe if you need something simpler
Re:Cranelift code generation comes to Rust by kibwen on Monday March 18, 2024 @12:22PM (#39746495)
As far as I know, you should be able to generate textual CLIF files and feed them to Cranelift: https://github.com/bytecodealliance/wasmtime/blob/main/crane...
Re:Cranelift code generation comes to Rust by littlestymaar on Tuesday March 19, 2024 @05:03PM (#39760188)
Would using cranelift frontend[1] with PyO3[2] be an option for you?

[1]: https://docs.rs/cranelift-frontend/0.105.3/cranelift_fronten... [2]: https://pyo3.rs/v0.15.1/