Announcement

Collapse
No announcement yet.

Initial GCC Rust Front-End Compiler Patches Submitted For Review

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Initial GCC Rust Front-End Compiler Patches Submitted For Review

    Phoronix: Initial GCC Rust Front-End Compiler Patches Submitted For Review

    Following this month's approval by the steering committee of GCC Rust as a compiler front-end for the Rust programming language, the first formal series has been sent out for review...

    Phoronix, Linux Hardware Reviews, Linux hardware benchmarks, Linux server benchmarks, Linux benchmarking, Desktop Linux, Linux performance, Open Source graphics, Linux How To, Ubuntu benchmarks, Ubuntu hardware, Phoronix Test Suite

  • #2
    Michael

    Typo/grammar,

    "layo ut" should be "layout".



    Comment


    • #3
      Heh. LLVM Rust on m68k has been so close to being done for a year or so. I think there's only one issue left, but it seems a tricky one. Maybe GCC will pip it to the post?

      Comment


      • #4
        Rust without borrow checker is nor Rust, not even close

        Comment


        • #5
          Originally posted by nazar-pc View Post
          Rust without borrow checker is nor Rust, not even close
          Yes, but borrow checking can be done separately e.g. by rustc. It is not required for the actual compilation assuming that the code is valid.

          Comment


          • #6
            Originally posted by nazar-pc View Post
            Rust without borrow checker is nor Rust, not even close
            They'll add it further down the line. In its current state it is still useful. You have a code which you compile with rustc to x86 but want to also crosscompile to another architecture unsupported in rustc.

            Then you know lifetimes are okay. You only want to generate the asm for the target architecture. That's where GCC-Rust comes in.

            They plan on adding the borrow checker way down the line though.

            Comment


            • #7
              Can't wait to see the benchmarks.

              Comment


              • #8
                Originally posted by pkunk View Post

                Yes, but borrow checking can be done separately e.g. by rustc. It is not required for the actual compilation assuming that the code is valid.
                So you need Rustc to verify that code is correct and then you can compile it with GCC hoping that nothing regressed in the process?
                I'm seriously worried that GCC's crappy initial implementation will split Rust community into crates that target GCC and use limited feature set/do not compile with Rustc at all and those that are tested against Rustc and have full set of guarantees.

                Not to say that writing Rust compiler in 2022 in C++ is... well, I don't want to write such words on the forum, let's say not a very smart idea.

                Comment


                • #9
                  Originally posted by nazar-pc View Post

                  So you need Rustc to verify that code is correct and then you can compile it with GCC hoping that nothing regressed in the process?
                  I'm seriously worried that GCC's crappy initial implementation will split Rust community into crates that target GCC
                  Nobody is going to use an experimental, disabled by default frontend in GCC for production code. This is purely being done as an incremental step in the development process. Also refer to https://github.com/Rust-GCC/gccrs/wi...orrow-checking

                  Comment


                  • #10
                    Originally posted by nazar-pc View Post
                    Not to say that writing Rust compiler in 2022 in C++ is... well, I don't want to write such words on the forum, let's say not a very smart idea.
                    rustc in 2022, and in 3022 and 4022 is mostly C++ due to its heavy dependence on llvm.

                    Oh and all the surrounding tools like the linker (and all the underlying dependencies it drags in from crates) are too. Perhaps chuck a bit of ANSI C in the mix.

                    It makes you wonder if there really is any rust code at all?
                    Last edited by kpedersen; 28 July 2022, 11:10 AM.

                    Comment

                    Working...
                    X