[HN Gopher] A primer on code generation in Cranelift
___________________________________________________________________
A primer on code generation in Cranelift
Author : bzbarsky
Score : 55 points
Date : 2021-05-08 04:31 UTC (18 hours ago)
(HTM) web link (blog.benj.me)
(TXT) w3m dump (blog.benj.me)
| rajandatta wrote:
| Thanks for sharing. Very interesting. I wasn't aware of
| Cranelift. Will read.
|
| What are people's thoughts on the current state of the art in
| using Cofe generation for higher level and lower level
| development?
| zinclozenge wrote:
| I'd love it if there was a guide/tutorial on how to use it as an
| alternative to LLVM.
| winter_blue wrote:
| Just FYI, there's an LLVM tutorial (for C++), but it's quite
| succinct, and you have to figure a lot of things out on your
| own: https://llvm.org/docs/tutorial/
| runevault wrote:
| I dunno that it is meant to be a full on replacement. Rust
| intends to use it as an alternative backend for debug builds
| that focuses on really fast build times with little if any
| optimizations.
| winter_blue wrote:
| It looks this is used for WASM development, and it's built by the
| Bytecode Alliance[1].
|
| One thing I want to see in the future (for use by programming
| language designers), is some convenient _relatively-stable_ way
| to target the Rust MIR or the Rust HIR[2], _directly_.
|
| [1]
| https://github.com/bytecodealliance/wasmtime/tree/main/crane...
|
| [2] https://blog.rust-lang.org/2016/04/19/MIR.html
___________________________________________________________________
(page generated 2021-05-08 23:02 UTC)