Live data from Hacker News

Scaling Rust Builds with Bazel

mmapped.blog

1–10 of 133 posts

Re: Scaling Rust Builds with Bazel

#6
One question I have after all these articles and internal company presentations is: how exactly does Bazel track dependencies? Module A importing module B importing module C is a language-level feature, not a build system-level feature.

Re: Scaling Rust Builds with Bazel

#7
post #3

If you want something similar thats written in Rust instead of Java, look at Buck2 https://github.com/facebook/buck2

The readme states the following

> This project is not yet polished. We are continuing to develop it in the open, but don't expect it to be suitable for most people…

So it’s not ready yet to be used for anything serious I assume.

Re: Scaling Rust Builds with Bazel

#8

One question I have after all these articles and internal company presentations is: how exactly does Bazel track dependencies? Module A importing module B importing module C is a language-level feature, not a build system-level feature.

You need to duplicate all dependency declarations of the language into the bazel build system.

Re: Scaling Rust Builds with Bazel

#9

One question I have after all these articles and internal company presentations is: how exactly does Bazel track dependencies? Module A importing module B importing module C is a language-level feature, not a build system-level feature.

You basically have to declare all those dependencies in Bazel. For instance, if you look at rules for Go, they declare the whole dependency graph (Modules, their relations) in Bazel. There is tooling to generate that for you, so it's not really that bad.

Where it gets harder is when this language feature is integrated with an existing build system. C# is normally build with it's own build system, and to build it with Bazel you have to essentially rewrite some of it's logic in Bazel, which can be hard, but doable.

Re: Scaling Rust Builds with Bazel

#10

One question I have after all these articles and internal company presentations is: how exactly does Bazel track dependencies? Module A importing module B importing module C is a language-level feature, not a build system-level feature.

You have to declare them in each BUILD file.
Post reply on HN