|
|
Subscribe / Log in / New account

Debian, Rust, and librsvg

Debian, Rust, and librsvg

Posted Nov 16, 2018 10:32 UTC (Fri) by Ieee754 (guest, #128655)
In reply to: Debian, Rust, and librsvg by glaubitz
Parent article: Debian, Rust, and librsvg

> What Rust needs is a gcc frontend like Google has for Go,

Rust does not need this, architectures/targets that are not supported by LLVM and want to use software written in Rust need this.

That's a pretty big difference.

GCC is designed to make it very hard to use as the backend of a programming language front-end.

The Rust pipeline is HIR->MIR->LLVM-IR->MachineCode. There have been prototypes of adding different backends, like Cranelift, to this pipeline, by generating something else instead of LLVM-IR, and then calling a different backend.

If Rust could generate GIMPLE and then call a GCC backend, a GCC backend wouldn't really be that hard to add. But GCC is designed so that there has to be a lot of back and forth between GIMPLE and the previous stages of the pipe line. So platforms that depend on GCC for support have locked themselves away from the rest of the world.

It is much easier to add LLVM backeds to support these platforms, and then minimal front-end support in Rust, than to contort Rust's compilation pipeline to support a project (GCC) that does everything possible to not be reusable by the outside world.


to post comments


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds