News for hackers. Stuff that matters.
Re:GCC Rust: GCC Front-End for Rust by varajelle on Sunday January 10, 2021 @12:48PM (#25717228)
> There is absolutely no reason why the GCC front-end needs to be written in Rust.

How about memory safety and fearless concurrency?

Re:GCC Rust: GCC Front-End for Rust by strongdenial on Sunday January 10, 2021 @12:56PM (#25717331)
Not a requirement for a GCC front-end and certainly not worth sacrificing a potentially faster path to bootstrapping the official compiler implementation. You should be worried about the ease by which various systems can bootstrap and adopt the language, which is a mostly solved problem for C/C++ but not a given for Rust itself. Some maintainers will absolutely refuse bootstrapping off of binary artifacts compiled from other systems, others won't even accept 'compiled to C' artifacts.

Keeping a viable C++ implementation as part of GCC would be the smartest decision.

Re:GCC Rust: GCC Front-End for Rust by pabs3 on Tuesday January 12, 2021 @12:50AM (#25742844)
The Bootstrappable builds folks dislike binary artifacts so much they are implementing bootstrapping a full Linux system from only 512 bytes of machine code plus all the source code:

https://bootstrappable.org/ https://bootstrapping.miraheze.org/wiki/Main_Page

Re:GCC Rust: GCC Front-End for Rust by CameronNemo on Sunday January 10, 2021 @05:46PM (#25721043)
Who are these groups who are demanding such easy bootstrapping? OS or distro developers? Programmers working on embedded and/or safety critical systems?

I know OpenBSD avoids rust because of the bootstrapping issue, but they also avoid LLVM because of a licensing issue.

Re:GCC Rust: GCC Front-End for Rust by IcePic on Monday January 11, 2021 @04:43AM (#25726715)
OpenBSD uses clang/llvm on most arches by now for the system compiler.
Re:GCC Rust: GCC Front-End for Rust by CameronNemo on Tuesday January 12, 2021 @03:37PM (#25753214)
Uf. Brain fart. I meant that they avoid GCC because of licensing.
Re:GCC Rust: GCC Front-End for Rust by gpderetta on Monday January 11, 2021 @07:00AM (#25727799)
bootstrapping is important, but I believe that GCC already allows non-primary (i.e. optional) languages frontends to be written in other languages. The ADA front end is written in ADA for example.
Re:GCC Rust: GCC Front-End for Rust by bonzini on Sunday January 10, 2021 @01:40PM (#25717906)
A compiler front-end is pretty boring software in terms of memory safety. Lots of things that the front-end allocates are simply never freed.

Have you ever seen GCC crash with a SIGSEGV? I rarely did even when I used to be a GCC developer.

Re:GCC Rust: GCC Front-End for Rust by pm215 on Sunday January 10, 2021 @02:06PM (#25718301)
Indeed. Notoriously, a SEGV in gcc during compilation used to usually mean "your hardware is flaky": https://tldp.org/FAQ/sig11/html/index.html
Re:GCC Rust: GCC Front-End for Rust by zzz11 on Sunday January 10, 2021 @06:36PM (#25721647)
That was before the invention of fuzzing.
Re:GCC Rust: GCC Front-End for Rust by jjnoakes on Sunday January 10, 2021 @05:39PM (#25720937)
There are still out-of-bounds concerns and chasing through NULL pointers. (Not arguing against gcc's quality or stability, just listing memory safety concerns that transcend memory deallocation)
Re:GCC Rust: GCC Front-End for Rust by rjsw on Sunday January 10, 2021 @01:27PM (#25717756)
I guess you could rewrite it in a language with no implementation at all if you are worried about purity.
Re:GCC Rust: GCC Front-End for Rust by Guvante on Sunday January 10, 2021 @01:49PM (#25718030)
No one is saying that rustc should be rewritten in C. They are saying that an alternative compiler front-end in an alternative language is sensible.
Re:GCC Rust: GCC Front-End for Rust by varajelle on Sunday January 10, 2021 @09:49PM (#25723754)
No one is saying that someone said rustc should be rewritten.