remote-apis VS rules_rust

Compare remote-apis vs rules_rust and see what are their differences.

remote-apis

An API for caching and execution of actions on a remote system. (by bazelbuild)
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.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
remote-apis rules_rust
5 9
300 610
0.3% 1.8%
5.8 9.6
15 days ago 7 days ago
Starlark Starlark
Apache License 2.0 Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

remote-apis

Posts with mentions or reviews of remote-apis. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-22.
  • Mozilla sccache: cache with cloud storage
    4 projects | news.ycombinator.com | 22 Dec 2023
    In the case of the Remote Execution/Cache API used by Bazel among others[1] at least, it's a bit more detailed. There's an "ActionCache" and an actual content-addressed cache that just stores blobs ("ContentAddressableStorage"). When you run a `gcc -O2 foo.c -o foo.o` command (locally or remotely; doesn't matter), you upload an "Action" into the action cache, which basically said "This command was run. As a result it had this stderr, stdout, error code, and these input files read and output files written." The input and output files are then referenced by the hash of their contents, in this case.

    Most importantly you can look up an action in the ActionCache without actually running it. So now when another person comes by and runs the same build command, they say "Has this Action, with these inputs, been run before?" and the server can say "Yes, and the output is a file identified by hash XYZ" where XYZ is the hash of foo.o

    So realistically you always some mix of "input content hashing" and "output content hashing" (the second being the definition of 'content addressable'.)

    [1] https://github.com/bazelbuild/remote-apis/blob/main/build/ba...

  • Distcc: A fast, free distributed C/C++ compiler
    11 projects | news.ycombinator.com | 1 Jun 2023
    Not only it's distributed like distcc, Bazel also provide sandboxing to ensure that environment factors does not affect the build/test results. This might not mean much for smaller use cases, but at scale with different compiler toolchains targeting different OS and CPU Architecture, the sandbox helps a ton in keeping your cache accurate.

    On top of it, the APIs Bazel uses to communicate with the remote execution environment is standardized and adopted by other build tools with multiple server implementation to match it. Looking into https://github.com/bazelbuild/remote-apis/#clients, you could see big players are involved: Meta, Twitter, Chromium project, Bloomberg while there are commercial supports for some server implementations.

    Finally, on top of C/C++, Bazel also supports these remote compilation / remote test execution for Go, Java, Rust, JS/TS etc... Which matters a lot for many enterprise users.

    Disclaimer: I work for https://www.buildbuddy.io/ which provides one of the remote execution server implementation and I am a contributor to Bazel.

  • When to Use Bazel?
    13 projects | news.ycombinator.com | 13 Sep 2022
    Regardless of whether you should use Bazel or not, my hope is that any future build systems attempt to adopt Bazel's remote execution protocol (or at least a protocol that is similar in spirit):

    https://github.com/bazelbuild/remote-apis

    In my opinion the protocol is fairly well designed.

  • Programming Breakthroughs We Need
    17 projects | news.ycombinator.com | 17 Aug 2022
    > The thing I really would like to see is a smarter CI system. Caching of build outputs, so you don't have to rebuild the world from scratch every time. Distributed execution of tests and compilation, so you are not bottle-necked by one machine.

    This is already achievable nowadays using Bazel (https://bazel.build) as a build system. It uses a gRPC based protocol for offloading/caching the actual build on a build cluster (https://github.com/bazelbuild/remote-apis). I am the author of one of the Open Source build cluster implementations (Buildbarn).

  • Distributed Cloud Builds for Everyone
    4 projects | news.ycombinator.com | 3 Jun 2021
    Very nice! I really like the ease-of-use of this, as well as the scale-to-zero costs. That's a tricky thing to achieve. Seems like it could become a standard path to ease the migration from local to remote builds.

    If the author is interested in standardizing the same, I'd suggest implementing the REAPI protocol (https://github.com/bazelbuild/remote-apis). It should be amenable to implementing on a Lambda-esque back-end, and is already standard amongst most tools doing Remote Execution (including Bazel! Bazel+llama could be fun). And equally, it's totally usable by a distcc-esque distribution tool (recc[1] is one example) - that's also what Android is doing before they finish migrating to Bazel ([2], sadly not yet oss'd).

    The main interesting challenge I expect this project to hit is going to be worker-local caching: for compilation actions it's not too bad to skip assuming the compiler is built into the container environment, but if branching out into either hermetic toolchains or data-heavy action types (like linking), fetching all bytes to the ephemeral worker anew each time may prove to be prohibitive. On the other hand, that might be a nice transition point to switch to persistent workers: use a lambda backed solution for the scale-to-0 case, and switch execution stacks under the hood to something based on reused VMs when hitting sufficient scale that persistent executors start to win out.

    (Disclaimer: I TL'd the creation of this API, and Google implementation of the same).

    [1] https://gitlab.com/BuildGrid/recc

    [2] https://opensource.googleblog.com/2020/11/welcome-android-op...

rules_rust

Posts with mentions or reviews of rules_rust. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2024-01-14.
  • NixOS: Declarative Builds and Deployments
    13 projects | news.ycombinator.com | 14 Jan 2024
    The same reason Bazel builds avoid using Cargo when building Rust software, so I'll describe why Bazel would do this:

    - Bazel wants to cache remote resources, like each respective crate's source files.

    - Bazel then wants to build each crate in a sandbox, and cache the build artifacts

    This is an established practice, and Nix wants to drive the build for the same reasons.

    See:

    - https://github.com/bazelbuild/rules_rust

    - https://github.com/google/cargo-raze

  • Rust fact vs. fiction: 5 Insights from Google's Rust journey in 2022
    5 projects | /r/rust | 27 Jun 2023
    To answer your question, I don't know if Soong or Bazel can reuse the files produced by an incremental Rust compilation. I tried searching the rules_rust repository and found some discussions, but nothing that clearly told me "Yes, this is supported".
  • When to Use Bazel?
    13 projects | news.ycombinator.com | 13 Sep 2022
    Bazel doesn't allow targeting a lot of platforms (especially embedded) from Rust, even when the Rust ecosystem supports these targets. Something is off with its design if new work needs to be done for every platform that's already available behind an interface that's as consistent as what rustc gives.

    What is supported needs to be inferred from this file, as far as I can tell: https://github.com/bazelbuild/rules_rust/blob/main/rust/plat...

  • Cpp-like build tools for Rust?
    4 projects | /r/rustjerk | 9 Sep 2022
    You might be overjoyed to learn that you can use a build tool that forces you to manually write out the dependencies between each file.
  • How to enable suggestions/autocomplete in VS Code?
    1 project | /r/bazel | 1 Jun 2022
    I am using rules_rust and have the VS Code Bazel plugin installed, but I am still not getting autocomplete.
  • Blog Post: Fast Rust Builds
    5 projects | /r/rust | 5 Sep 2021
    Other than that, the performance of both for builds should be determined exactly by the organization of code into separate crates and the rustc invocations. Bazel generally encourages smaller crates, but that's very subtle. There is at least 1 case I can think of where rustc is overfit to cargo, in a way that is not easily replicable by bazel, which is the metadata/rlib pipelining https://github.com/bazelbuild/rules_rust/issues/228
  • Modern C++ Won't Save Us (2019)
    7 projects | news.ycombinator.com | 25 Apr 2021
    Rust integrates pretty seamlessly into Bazel projects via rules_rust (https://github.com/bazelbuild/rules_rust). The existing rules even allow for c calling rust and rust calling c. Example: https://github.com/bazelbuild/rules_rust/blob/main/examples/...
  • Why Zig When There Is Already C++ and Rust?
    10 projects | news.ycombinator.com | 15 Jan 2021
    With any compiled language you can use the compiler and vendor your dependencies instead of using the language's conventional package manager. For example, nothing prevents skipping Cargo and building Rust directly with rustc the way Bazel does.

    https://github.com/bazelbuild/rules_rust

What are some alternatives?

When comparing remote-apis and rules_rust you can also consider the following projects:

dylint - Run Rust lints from dynamic libraries

zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.

bazel-gba-example - Bazel GBA (Game Boy Advance) Example

cargo-chef - A cargo-subcommand to speed up Rust Docker builds using Docker layer caching.

llama

cargo-sweep - A cargo subcommand for cleaning up unused build files generated by Cargo

MyDef - Programming in the next paradigm -- your way

www.ziglang.org

bazel-buildfarm - Bazel remote caching and execution service

wg-allocators - Home of the Allocators working group: Paving a path for a standard set of allocator traits to be used in collections!

embedded-postgres-binaries - Lightweight bundles of PostgreSQL binaries with reduced size intended for testing purposes.

bazel-coverage-report-renderer - Haskell rules for Bazel.