Live data from Hacker News

Scaling Rust Builds with Bazel

mmapped.blog

41–50 of 133 posts

Re: Scaling Rust Builds with Bazel

#41

NixOS maintainer here and I hate bazel through and through. I don't know any other build system that is more anti distro them bazel.

In what way?

I guess because package managers (apt, nix, ..) build around the idea of shared libraries, while bazel assume statically built.

TBH it’s hard to say which operate model is better anyway. They are simply incompatible :)

Related topic: https://youtu.be/Pzl1B7nB9Kc

Re: Scaling Rust Builds with Bazel

#42
post #12

Hey, what a surprise, ex-google engineers dragging everyone into bazel... Maybe you have some really complicated use case that makes cargo insufficient, but really, it's pretty damn nice and it's integrated with everything. There are languages that need bazel, rust isn't one of them

At the only job I've had where Bazel was in use, we had a team of 4-5 engineers dedicated to maintaining Bazel for a larger team of about 25. Bazel is a nightmare . I wouldn't wish it on my worst enemy.

I worked at a company where a DevOps team was 5 to support a team of 35. They hired someone incredibly talented, knowledgeable and driven for change. They shrunk in size and are still over capacity and could now be 2 only.

Don't look at headcount to gauge complexity, difficulty, etc.

What I've experienced is the larger the team the more likely to have dilution of ownership. The less ownership the less likely each person will spend the energy or fully understand solving root causes.

Re: Scaling Rust Builds with Bazel

#43
post #41

Earlier quoted context omitted.

In what way?

I guess because package managers (apt, nix, ..) build around the idea of shared libraries, while bazel assume statically built. TBH it’s hard to say which operate model is better anyway. They are simply incompatible :) Related topic: https://youtu.be/Pzl1B7nB9Kc

Bazel does not assume statically built. Where do you get this idea?

Re: Scaling Rust Builds with Bazel

#44
post #12

Hey, what a surprise, ex-google engineers dragging everyone into bazel... Maybe you have some really complicated use case that makes cargo insufficient, but really, it's pretty damn nice and it's integrated with everything. There are languages that need bazel, rust isn't one of them

> Hey, what a surprise, ex-google engineers dragging everyone into bazel...

Hey look another nimwit that make stupid assumptions without understanding the nature of the problem being solved.

> and it's integrated with everything.

Oh wow Cargo integrates with Python, shell scripts, C++ and node JS? Holly sh*t that’s amazing.

/s

Re: Scaling Rust Builds with Bazel

#45
There is a broad tendency in software to jump onto whatever the big FAANG guys are doing. The trouble with this is often that they are working at a vastly bigger scale than you are, hence their solutions are vastly overfitted to your problem. So it's definitely interesting to read about this stuff but I'm sure Cargo is fine for most folks.

Re: Scaling Rust Builds with Bazel

#46
post #17

We use a similar setup where I work. One challenge we have has been generating bazel targets for different sets of crate features for dependencies. We have solved this by writing Bazel tooling, but learning how to do this has cost a fair bit of time. We also rely heavily on cargo-raze, which has rough edges. As with all things Bazel, it's great when it works, but it has a steep learning curve that could be hard to ju…

Have you tried to migrate from raze to crate universe? It's close to feature parity and raze seems to be close to deprecation.

I successfully migrated recently and it's such a gigantic improvement.

Re: Scaling Rust Builds with Bazel

#47
post #37

Earlier quoted context omitted.

Lol, Googler here, I can't deny that I have he urge to force Bazel into the world. It's just, when I joined Google I found a build system I didn't hate. This was the first time. I don't actually love Bazel (Blaze internally), but I love that I don't hate it. Every time I have to learn a new build system in open source work I groan. Why are there so many systems for essentially the same thing?

Because the outside world is diverse and open source does not have the ressources to write bazel rules. Nor does it fit their history. There is definitely a need for better (and Meson is the foss answer, as well as Shake). But Bazel need a context that OpenSource do not have. Time and a clean slate of dependencies cooperating. Also noone fund tools for DX for OpenSource devs :) only for JS and even that...

> Because the outside world is diverse and open source does not have the ressources to write bazel rules.

But the open source world has the resources to write new build systems (and ecosystems!) time and time again. This argument does not hold up.

Re: Scaling Rust Builds with Bazel

#48
post #12

Hey, what a surprise, ex-google engineers dragging everyone into bazel... Maybe you have some really complicated use case that makes cargo insufficient, but really, it's pretty damn nice and it's integrated with everything. There are languages that need bazel, rust isn't one of them

At the only job I've had where Bazel was in use, we had a team of 4-5 engineers dedicated to maintaining Bazel for a larger team of about 25. Bazel is a nightmare . I wouldn't wish it on my worst enemy.

Any build system is a nightmare when you don't understand it. I don't know what that team moved to Bazel from. I suppose it was Makefiles, and I'm sure if that's what the team was using, almost all of those 25 people did not understand them either.

What parts of Bazel were a nightmare? What problems were fixed by these 4-5 people that were previously impacting all 25 people routinely?

Re: Scaling Rust Builds with Bazel

#49
post #12

Hey, what a surprise, ex-google engineers dragging everyone into bazel... Maybe you have some really complicated use case that makes cargo insufficient, but really, it's pretty damn nice and it's integrated with everything. There are languages that need bazel, rust isn't one of them

Lol, Googler here, I can't deny that I have he urge to force Bazel into the world. It's just, when I joined Google I found a build system I didn't hate. This was the first time. I don't actually love Bazel (Blaze internally), but I love that I don't hate it. Every time I have to learn a new build system in open source work I groan. Why are there so many systems for essentially the same thing?

on the other hand, there are some of us that really dislike Bazel. Try compiling something for ARM and then realising you can't find a build of the build tool for ARM... That was a special level of pain.

Tools commonly available in distros are typically much easier to use for outsiders.

Re: Scaling Rust Builds with Bazel

#50
post #17

We use a similar setup where I work. One challenge we have has been generating bazel targets for different sets of crate features for dependencies. We have solved this by writing Bazel tooling, but learning how to do this has cost a fair bit of time. We also rely heavily on cargo-raze, which has rough edges. As with all things Bazel, it's great when it works, but it has a steep learning curve that could be hard to ju…

Have you tried to migrate from raze to crate universe? It's close to feature parity and raze seems to be close to deprecation. I successfully migrated recently and it's such a gigantic improvement.

I didn't know about this but will check it out, thanks.
Post reply on HN