Stream: general

Topic: How's cranelift for riscv64gc?


view this post on Zulip Jason Qin (Nov 06 2022 at 00:49):

Im interested in the idea of using cranelift as a target for a language that can compile down to bare metal riscv for building kernels and embedded systems. Does bare metal riscv work quite well with cranelift?

view this post on Zulip Jamey Sharp (Nov 07 2022 at 18:15):

Cranelift's riscv backend is new, so I don't think anyone has much experience using it. We have pretty good confidence in the portions that are exercised by Wasmtime (with caveats; I believe there's no SIMD support for example). I wouldn't draw any conclusions about using it on bare metal from that. Your best bet may be to try it and see! Note that there's no support for inline assembly in Cranelift, so if you need any privileged instructions, or stack switching, you'll have to wrap those in separate functions and call them from your Cranelift-generated code.


Last updated: Nov 22 2024 at 16:03 UTC