frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Goiaba: An experimental Go compiler, written in Rust

https://github.com/raphamorim/goiaba
45•SchwKatze•4h ago

Comments

schoen•3h ago
(It's Portuguese for "guava".)
mariusseufzer•3h ago
man i love this fruit
swah•1h ago
I hate it but starts with Go so great choice...
tbrockman•2h ago
Given that Go can already be compiled to WebAssembly (with the ability to use TinyGo if you want to trade-off some language features for efficiency), is there anything that would make this more attractive than the alternatives? That it's written in Rust and can be used as a library by Rust code?
kibwen•2h ago
The Go-in-Go compiler was significantly slower than the Go-in-C compiler that it replaced, although most users didn't notice it because the new compiler contained many algorithmic improvements that were judiciously not backported to the old compiler in order to make the transition smoother. A compiler written in Rust could conceivably be faster than the current Go compiler.
kyrra•2h ago
The original port was slower because it was a near straight transpile impl of the original C compiler. It didn't do anything to try to speed things up, they went for correctness first. Then in subsequent releases they worked on speed improvements.
xyzzy_plugh•2h ago
The Go compiler is already ridiculously fast. As far as I know the garbage collector usually doesn't even activate for short-lived programs, which compilation usually is. Turning garbage collection off entirely doesn't have much of an impact on build times.

What significant opportunities exist for performance with a Rust implementation that aren't possible in Go?

pjmlp•2h ago
Yes, and with time improvements were made.

Compilation speed is not something I worry about in Go, versus Rust, which I seldom bother with nowadays, compilation speed being one of the reasons.

littlestymaar•1h ago
It really puzzles me that people complain about compilation speed in Rust these days: I've worked on pretty big Rust code bases with lots of dependencies also, and cargo check has always been pretty much instant for me, including when I'm traveling and I use my mid-range laptop from 2012! (my main desktop is from 2018, I bought it because my previous desktop, from 2009 struggled to compile servo, mostly due to having too little RAM).

Debug build take a bit longer (a few seconds) on the desktop, while still staying below a minute on the laptop (remember, I'm talking about a 12 years old Clevo laptop, not a recent Macbook). It's definitely not worse than Typescript compilation or even Javascript bundling, yet we pretty much never hear complains about how typescript has too big compile times.

Yes, it could be faster with a different compiler architecture, especially on clean release builds and that would be nice, but it's a very minor annoyance (I don't do a full release build unless I've updated my compiler version, which only happens a few times a year).

The contrast between the discourse and my day-to-day experience on near obsolete hardware is very striking.

(Compilation artifact eating up hundreds of GB of my hard drive are a much, much bigger nuisance in practice, yet nobody seem to talk about that here on HN).

nicoburns•27m ago
> I don't do a full release build unless I've updated my compiler version, which only happens a few times a year

That's probably part of the difference. I do tens of these every single day.

GUI apps can be quite slow in debug mode, and as you say, the compilation artifacts build up quickly, which requires a cargo clean and then a fresh build.

pjmlp•18m ago
This sample code took 12 minutes on a clean build on my travel netbook, now dead.

https://github.com/pjmlp/gwc-rs

Maybe nowadays it is faster, I have not bothered since I made the RIR exercise.

Get the community editions of Delphi, FreePascal, or D and see what a fast build means.

Better yet, take the lastest version of Turbo Pascal for MS-DOS, meaning 7, and try it out on FreeDOS.

jerf•2h ago
If the Go compiler was twice as fast, I wouldn't really notice.

If the Go linker was twice as fast, that would be a minor convenience, sometimes.

I wouldn't expect much more that twice, maybe thrice at the very outside. And it'd be a long journey to get there with bugs and such to work through. The blow-your-socks-off improvements come from when you start with scripting languages. Go may be among the slower compiled languages, but it's still a compiled language with performance in the compiled-language class; there's not a factor of 10 or 20 sitting on the table.

But having another implementation could be useful on its own merits. I haven't heard much about gccgo lately, though the project [1] seems to be getting commits still. A highly-compatible Go compiler that also did a lot of compile-time optimizations, the sort of code that may be more fun and somewhat more safe to write in Rust (though I would perceive that the challenge of such code is for the optimizations themselves to be correct rather than the optimization process not crashing, and Rust's ability to help with that is marginal). The resulting compiler would be slower but might be able to create much faster executables.

[1]: https://github.com/golang/gofrontend

kyrra•2h ago
Semi related: there is an active proposal of having a go OS Target of "none" (or noos (No-OS)).

https://github.com/golang/go/issues/73608

Sounds like they want to maybe include https://github.com/usbarmory/tamago in the compiler.

syrusakbary•2h ago
This is very interesting! Would love to see it in play in Wasmer at some point.

I was aware of TinyGo, which allows compiling Go programs via LLVM (and targeting Wasm, for example). They have a very tiny footprint (programs could even run on the browser) https://tinygo.org/

But this approach is very interesting. I wonder how much compatible Goiaba is with Go vs TinyGo https://tinygo.org/docs/reference/lang-support/stdlib/

dkga•2h ago
Love the name!
citizenpaul•2h ago
While Its a cool experiment. Is there some purpose I'm missing? Go can already do this natively and compilation speed is already its selling point so not sure how rust could help there.

Seems like effort would be better towards improving rust compilation speed. Unless you just wanted to create a compiler for learning or HN points which here ya go.

pjmlp•2h ago
While interesting for the author, as learning exercise, the existing reference compiler is a much better proposition, being bootstraped and proving the point Go is usable for systems programming.

Unless writing compilers, linkers, assemblers, a GC runtime is no longer considered systems programming.

Web Server Is a Restaurant

https://www.offthebricks.com/articles/your-web-server-is-a-restaurant
1•mircerlancerous•5m ago•0 comments

Couple Gets Trapped for 10 Hours After EV Charging Station Welds Itself to Car

https://www.theautopian.com/elderly-couple-gets-trapped-for-10-hours-after-an-ev-charging-station...
3•throw7•7m ago•0 comments

AI as both authors and reviewers of research papers

https://openreview.net/forum?id=SF7BjKnqdh
2•lilnhi18•12m ago•0 comments

Tesla investigated over self-driving cars on wrong side of road

https://www.bbc.com/news/articles/cvg02rdxxz7o
1•choult•14m ago•1 comments

Making Slint Desktop-Ready

https://slint.dev/blog/making-slint-desktop-ready
1•Bogdanp•14m ago•0 comments

Show HN: Create a live-stream from a list of video URLs

https://liveplaylist.pages.dev/
1•GamingAtWork•15m ago•4 comments

Show HN: Saoirse, a privacy-first research assistant (Mac Beta)

https://getsaoirse.ai/
2•unclecolm•17m ago•0 comments

How Hackathons Make You a Better Software Engineer [video]

https://www.youtube.com/watch?v=ux184jvdY60
1•toomuchtodo•18m ago•0 comments

Mystery of Prince Rupert's Drop at 130k FPS [video]

https://www.youtube.com/watch?v=xe-f4gokRBs
2•akshatjiwan•21m ago•0 comments

Show HN: An open-source framework for building "Apps in ChatGPT"

https://github.com/DooiLabs/Chat.js
1•zachpark•23m ago•0 comments

Robert Roberson: Death row inmate's execution halted by Texas CCA

https://www.cnn.com/2025/10/09/us/robert-roberson-execution-stay
2•rossant•23m ago•1 comments

The Burrows-Wheeler Transform

https://sandbox.bio/concepts/bwt
3•g0xA52A2A•25m ago•0 comments

Future of Work: How AI Is Reshaping Software Development

https://bignorthmarketing.com/blog/future-of-work-how-ai-is-reshaping-software-development
1•bignorthchris•26m ago•0 comments

Show HN: I Built a Hub for Infosec

https://pentestlist.com
1•MrTurvey•26m ago•1 comments

Which Cars Get Pooped on the Most? The Bird Dropping Report

https://alansfactoryoutlet.com/infographics/car-bird-droppings-report/
2•gnabgib•27m ago•1 comments

Nucleon Decays into Light New Particles in Neutrino Detectors

https://journals.aps.org/prl/abstract/10.1103/cxvm-p412
1•PaulHoule•28m ago•0 comments

Spoils System

https://en.wikipedia.org/wiki/Spoils_system
2•geox•28m ago•0 comments

Naked mole rat lifespan: A 30-year long mystery unraveled

https://www.science.org/doi/10.1126/science.adp5056
2•bilsbie•29m ago•0 comments

Faster and safer instant euro payments become a reality

https://ec.europa.eu/commission/presscorner/detail/en/ip_25_2321
4•raybb•31m ago•0 comments

Not Even Wrong: On the Limits of Prediction as Explanation in Cognitive Science

https://arxiv.org/abs/2510.03311
1•kjhughes•31m ago•1 comments

Signs That You Don't Understand Obesity

https://www.exfatloss.com/p/signs-that-you-dont-understand-obesity
3•paulpauper•34m ago•0 comments

Yo-Yo Theory: Up and Down Clears the PUFAs

https://theheartattackdiet.substack.com/p/yo-yo-theory
1•paulpauper•34m ago•0 comments

Code Is Never Neutral: Why All Software Is Political [video]

https://www.youtube.com/watch?v=Kpfff6TS018
1•todsacerdoti•36m ago•0 comments

Intel Fab 52 in Chandler Arizona Is Running 18A – ServeTheHome

https://www.servethehome.com/intel-fab-52-in-chandler-arizona-is-running-18a/
2•rbanffy•37m ago•2 comments

Show HN: Transcript-based video editor that runs 100% locally on Mac

https://apps.apple.com/us/app/scriptedit-video-editor/id6752915051?mt=12
2•zhendlin•37m ago•0 comments

More than 30% of this century's science Nobel prizewinners immigrated

https://www.nature.com/articles/d41586-025-03247-6
5•rntn•38m ago•0 comments

Quantum Networks: Cisco Software Boosts Classical Tech

https://spectrum.ieee.org/quantum-networks-cisco-quantum-computing
1•rbanffy•40m ago•0 comments

Show HN: Go CLI to create instant PostgreSQL branches of your database

https://github.com/quicdb/quic
1•rafaelquicdb•41m ago•0 comments

We're about to find more interstellar interlopers

https://arstechnica.com/features/2025/10/were-about-to-find-many-more-interstellar-interlopers-he...
2•rbanffy•42m ago•0 comments

New York City Sues Social Media Companies over 'Youth Mental Health Crisis'

https://gizmodo.com/new-york-city-sues-social-media-companies-over-youth-mental-health-crisis-200...
3•mikece•43m ago•0 comments