Rewrite bazel-diff in Rust - #449
Open
csmoe wants to merge 2 commits into
Open
Conversation
Replace the Kotlin production binary and native E2E suite with a Rust implementation using buffa for Bazel protobufs. Update Bazel, Cargo, CI, release, documentation, and service tooling around the Rust binary.
tinder-maxwellelliott
left a comment
Collaborator
There was a problem hiding this comment.
This is a great start, thanks for doing this. I am going to merge in #450 first to make sure that this PR has the necessary test coverage.
Comment on lines
+58
to
+72
| # The benchmark shells out to Bazel, so only its pure parsing/statistics helpers run under | ||
| # `bazel test`. Invoke the real benchmark directly to avoid nesting Bazel under Bazel. | ||
| py_library( | ||
| name = "benchmark_lib", | ||
| srcs = ["benchmark.py"], | ||
| imports = ["."], | ||
| visibility = ["//visibility:private"], | ||
| ) | ||
|
|
||
| py_test( | ||
| name = "benchmark_test", | ||
| srcs = ["benchmark_test.py"], | ||
| python_version = "PY3", | ||
| deps = [":benchmark_lib"], | ||
| ) |
Collaborator
There was a problem hiding this comment.
Should we just inject the Kotlin and rust versions via runfiles in these targets and run them directly? Seems odd to double bazel here
Comment on lines
23
to
+25
| format: | ||
| bazel run //cli/format | ||
| cargo fmt --all |
Collaborator
There was a problem hiding this comment.
Lets add a format pipeline to auto fix the rust after we merge code
Collaborator
|
Updated this from latest main to get coverage enforcement working. Lets update the rust targets to have the necessary coverage enforcement logic and default to 90% throughout |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm not here to argue that Rust is the right language for this project, and I'd rather not relitigate that.
This started as a user problem: Our graph has ~140k targets, and from prior experience with bazel at that size, peak memory was our real worry. So I tried a native port to see if it helped(benchmark based on the
bazel-build/bazelrepo):The Rust candidate was 5.92x faster and used 84.2% less peak RSS.
AI NOTICE: I looked for a policy on LLM-assisted contributions and didn't find one in the repo. If this PR crosses a line you haven't had to write down yet, I apologize for putting it in front of you — please just close it, that's fine. I'd rather you not spend review time on something you didn't want.