Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
-
depot
Discontinued @ghuntley's personal monorepo [Moved to: https://github.com/ghuntley/ghuntley] (by ghuntley)
-
bazel-example-rust
An example repository demonstrating Bazel rust_binary and rust_library build targets.
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
> "yeah this was written for a Google project, that other use case didn't apply to our project"
Not only is that a very narrow set of use cases (Read: they only deploy statically linked binaries on mostly unix-y environments), Even the fixes for those very basic use cases take for ever.
Eg. This 7 year old issue is still open: https://github.com/bazelbuild/bazel/issues/1920 . To be able to create a statically linked library, we had to use: https://github.com/hotg-ai/librunecoral/blob/master/runecora... . Had to use some weird hack to build shared libraries too. Overall, it was just annoying.
If you want something similar thats written in Rust instead of Java, look at Buck2 https://github.com/facebook/buck2
hmm. this migration would have been possible with staying with nix and developing a rules_rust equivalent (maybe it already exists) - see https://github.com/ghuntley/depot/tree/trunk/nix/buildGo for example but for golang. provides a simple dsl over nix and hides nix.
I think this would have been useful with some code. My experience with Bazel is that you need a BUILD file in each subdirectory or something like that and every time I add a file I have to add it to that BUILD file.
Exceedingly tedious to use and has poor support in Clion.
It is likely that I don't have the constraints that this company has.
I found an example repo for rust and Bazel and it is just as tedious as I recall https://github.com/laramiel/bazel-example-rust
It is super tedious but for some languages a tool called Gazelle can auto-generate these for you. I know Go works well and there is a Java plugin too [0]. There is definitely some level rust support because that is how external crates are handled.
0 - https://github.com/bazel-contrib/rules_jvm/tree/main/java/ga...
This is my own fork of OpenTelemetry C++ that builds (using bazel with my changes) OpenTelemetry C++ .dll for Windows - https://github.com/malkia/opentelemetry-cpp
to show how awesome bazel is - in one step it can build (compile) and package them into a .zip file ready to deploy to NuGet-like repo or other place.
> "yeah this was written for a Google project, that other use case didn't apply to our project"
Not only is that a very narrow set of use cases (Read: they only deploy statically linked binaries on mostly unix-y environments), Even the fixes for those very basic use cases take for ever.
Eg. This 7 year old issue is still open: https://github.com/bazelbuild/bazel/issues/1920 . To be able to create a statically linked library, we had to use: https://github.com/hotg-ai/librunecoral/blob/master/runecora... . Had to use some weird hack to build shared libraries too. Overall, it was just annoying.
Not sure if this is what you're looking for exactly, but: https://github.com/jvolkman/bazel-ex-20230324