Code Monkey home page Code Monkey logo

Comments (30)

philberty avatar philberty commented on May 14, 2024 14

I would love to work on this full time. I think rust has some serious benifits to go which i do really like. Having rust only on LLVM will make stability of the language harder in the long run. Having multiple compilers keeps the language honest. Also GCC for rust would be amazing to run benchmarks vs llvm. I think embeded systems are lacking for LLVM. Many more backends for GCC and GCC is doing well lately. I might have time over the summer to restart the project from scratch. Rust has changed alot since i started this project and i think finally i could make a good start on this since the language is more stable than 0.7 was when i first looked at rust.

from gccrs.

ArneBab avatar ArneBab commented on May 14, 2024 5

I can imagine that … maybe you could get help by asking Mozilla. They should have a vested interest in providing rust to all platforms supported by GCC.

from gccrs.

rafaeldelucena avatar rafaeldelucena commented on May 14, 2024 4

I create a topic to collect some feedback from Rust community. :o)

from gccrs.

wpbirney avatar wpbirney commented on May 14, 2024 4

whats the status on this? Id be interested in lending a hand if needed

from gccrs.

philberty avatar philberty commented on May 14, 2024 3

Hey @wpbirney thanks for your interest i would ideally like to restart the project and implement this within the rust compiler proper as a gcc plugin and there are rust bindings available for this.

https://github.com/swgillespie/gccjit.rs

The main problem implementing this as a frest front-end to GCC is that the amount of static analysis is too much to implement unless i was full time on this project. So implementing this like the LLVM interface to rustc seems like a good place to start and to get it properly maintained but i worry the interfaces to gccjit isn't feature rich enough for error handling and memory leaks that it may not be that great an alternative.

I personally cant decide what i would like to do at this point.

from gccrs.

ArneBab avatar ArneBab commented on May 14, 2024 3

Is there a chance that you could run a fundraiser to see whether there is sufficient interest that you could actually get funded to do this right? Or ask Mozilla for funding?

from gccrs.

sunnystormy avatar sunnystormy commented on May 14, 2024 3

This needs to be done. If crowdfunding happens, I'll take this to Rust meetups here in DC to get the word out. Copyleft FTW!

from gccrs.

philberty avatar philberty commented on May 14, 2024 3

@sunnystormy i am really touched for your kind message i would love to work on this full time thinking of asking my current employer to sponsor me with this or reach out to Mozilla for this also.

I think there is a lot of value in having a separate rust compiler like Go and GCC-go.

from gccrs.

ArneBab avatar ArneBab commented on May 14, 2024 3

Maybe you could even have Mozilla and your current employer cooperate on this.

from gccrs.

rafaeldelucena avatar rafaeldelucena commented on May 14, 2024 3

How about create a bounty in some bounty platform, like www.bountysource.com? (I've already finished some bounties here and it works).

A description and some analysis about the problem, some proposed solutions will be awesome, helping backers to know the size of the problem and the benefits of the implementations.

Mozilla already support multiple bounties at bounty source.

from gccrs.

bjorn3 avatar bjorn3 commented on May 14, 2024 3

https://users.rust-lang.org/t/call-for-help-implementing-an-independent-rust-frontend-for-gcc/32163/

from gccrs.

ArneBab avatar ArneBab commented on May 14, 2024 2

Thank you for taking it there. Keep in mind that there’s currently one person there who wouldn’t want to do anything with GCC (whitequark), and that’s a maintainer of parts of LLVM, so might not be totally unbiased.

Maybe there might actually be companies willing to fund this — similar to the gccgo backend for Go? If you bet the future of your company on Rust, there better be more than just one implementation (or at least there better be a copyleft one which cannot be re-proprietarized by wrapping it into effectively mandatory proprietary code).

from gccrs.

sunnystormy avatar sunnystormy commented on May 14, 2024 2

poke
Any updates? If funding is still an issue, have you considered a Patreon, or Kickstarter/IndieGoGo page?

from gccrs.

Serentty avatar Serentty commented on May 14, 2024 2

I would also love to help with this. I can't stand the fact that Rust is limited to such a limited selection of platforms, and LLVM is making glacial progress at catching up with GCC in terms of targets. I'd be willing to contribute both code and cash to make this. I would love to talk to someone such as @redbrain to learn where I could start.

from gccrs.

sunnystormy avatar sunnystormy commented on May 14, 2024 2

@Serentty I understand your concern. Truth is, if the original Rust authors had considered gcc support many years ago, we wouldn’t be worrying about this right now. I know it’s a lot of work, but writing a proper Rust front-end for gcc is the right call. Writing a plug-in for the already existing Rust compiler is a bandaid at best, and forces users to depend upon the software that they’re actively trying to move away from. Let’s find people ready and willing to make this happen, and then let’s find ways to fund their efforts! Go team gccrs, go!

—Addendum

That being said... @redbrain, do you have any ideas about the resources you’d need to begin a proper gcc implementation? Don’t be afraid to let the community know so we can back you up!

from gccrs.

wpbirney avatar wpbirney commented on May 14, 2024 2

I agree a #gccrs channel on freenode sounds like a great idea

from gccrs.

philberty avatar philberty commented on May 14, 2024 1

This means a lot the enthusiasm for this project. I am really torn on between writing the full front-end or doing it via a gcc plugin interface for the rust compiler as a command line switch.

The later is much more concise project but a full front-end is much better solution to test GCC vs LLVM.

The current code up there is pretty poor so i really need to start from scratch again with a fresh branch of gcc. Some of the parser can be reused but it also needs a pre-processor pass.

from gccrs.

rafaeldelucena avatar rafaeldelucena commented on May 14, 2024 1

@redbrain I can help you with the implementation, but I need some directions to not duplicate work.

from gccrs.

Serentty avatar Serentty commented on May 14, 2024 1

When you say a full front-end, do you mean a completely new Rust compiler that takes Rust code and then uses GCC as a back-end? As much as I would love for there to be a second working Rust compiler, I worry that it would lag behind the reference implementation in terms of keeping up with the rapidly evolving language. Plus there's the fact that there is still no Rust specification to determine which aspects of the original compiler need to be replicated faithfully. If this can be pulled off really well, it would be way better than a GCC plugin for the Rust compiler, but if not, I would personally rather see the plugin.

from gccrs.

Serentty avatar Serentty commented on May 14, 2024 1

Is there a good place (IRC, Matrix, or something like that) for people who are interested in collaborating on this to get together and discuss how it could be done? I seems to me like a #gccrs channel on Freenode could be useful for getting this going, but I wouldn't dare create it myself.

from gccrs.

oleid avatar oleid commented on May 14, 2024 1

AFAIK the rust developers are trying to make their compiler more backend independent. This is needed for fast debug builds via cranelift. So in theory, it should become easier to plunge libgccjit (or whatever will be used) to MIR.

from gccrs.

ArneBab avatar ArneBab commented on May 14, 2024

Several news articles about Firefox with Rust note that this would lose Firefox support on less widespread platforms (where there is no LLVM) — a problem the Rust frontend for GCC could solve.

Is the GCC wiki up to date? https://gcc.gnu.org/wiki/RustFrontEnd

from gccrs.

philberty avatar philberty commented on May 14, 2024

Thanks for your interest. I would love to restart but its quite daunting how complex rust is. Its alot of work now to catchup. I am not sure i would have anything useable for people a long time unless i attract bunch of developers which could happen if i rewrite and make the code much cleaner.

from gccrs.

rafaeldelucena avatar rafaeldelucena commented on May 14, 2024

Maybe isn't the best place to question this but looking the answers, seems like they don't have much interest in starting this effort.

I think it's a good idea to make this happen, I don't have much experience with GCC frontends neither Rust internals, but I don't mind in study those awesome technologies even further also, I can help if we have some issue list x)

@redbrain Do you have intend to continue this work, even without the full support from Mozilla?

Best Regards

from gccrs.

ArneBab avatar ArneBab commented on May 14, 2024

Poke poke :-)

I’d join a Patreon right away (with 5€ per month).

from gccrs.

sunnystormy avatar sunnystormy commented on May 14, 2024

@redbrain The free and open ISA, RISC-V, is properly supported by gcc (and has been for quite some time) but not fully by LLVM. It is clear that we need proper gcc support for Rust in order for it to remain relevant on future hardware platforms. Please let us know how we can help! Thank you!

from gccrs.

sunnystormy avatar sunnystormy commented on May 14, 2024

@redbrain Do a full front-end, please. We want to have a proper alternative to gccgo. : )

from gccrs.

Serentty avatar Serentty commented on May 14, 2024

I suppose it really depends on what it is that you want to move away from. For me, it's LLVM, and I'm not bothered as much by having to use the reference compiler. Also, given that that compiler is making efforts to decouple itself from LLVM, I wouldn't consider adding a GCC backend to it to be a bandaid solution. However, I do see how this project has the potential to kill two birds with one stone if it manages to provide an alternative to that compiler as well. If it can pull that off. For that reason, maybe it is best to write full Rust frontend for GCC. If it actually pans out, I agree that it's much better than the plugin solution.

from gccrs.

Serentty avatar Serentty commented on May 14, 2024

Someone actually did end up creating that channel on Freenode it seems. I'll certainly be hanging out there.

from gccrs.

elichai avatar elichai commented on May 14, 2024

Too bad that no rustc developer commented here on what do they think and if they'd like to help make this easier.

from gccrs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.