rules_rust VS rules_nodejs

Compare rules_rust vs rules_nodejs and see what are their differences.

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
rules_rust rules_nodejs
9 8
610 718
4.1% 0.4%
9.6 8.1
1 day 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.

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

rules_nodejs

Posts with mentions or reviews of rules_nodejs. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-10-25.
  • Bazel jasmine_test issue
    1 project | /r/bazel | 24 Jul 2023
  • Vercel announces Turbopack, the successor to Webpack
    21 projects | news.ycombinator.com | 25 Oct 2022
    Bazel is just the infrastructure to run webpack. You'd need to do some work to make webpack's state be cacheable (I dunno what options and such it has for this, maybe it's already there as an option). But if you're looking at Bazel for JS work you probably just want to use the existing and maintained rules for it: https://github.com/bazelbuild/rules_nodejs It's been a while since I last looked at it but I don't think it has any caching for webpack.
  • Turborepo 1.2: High-performance build system for monorepos
    6 projects | news.ycombinator.com | 8 Apr 2022
    > Is Bazel designed in a way that make it impossible to do JS monorepos well?

    Not impossible, but you really need to go all in with it and follow its conventions and practices. See this for the main docs: https://github.com/bazelbuild/rules_nodejs

    One thing in particular that doesn't work well in the bazel world is doing your own stuff outside its BUILD.bazel files. If you're used to just npm install and jam some code in your package.json scripts... that doesn't usually work in the bazel world. If you have a lot of logic or tools in your build you'll likely need to go all in and make bazel starlark rules or macros that recreate that logic. Nothing is impossible, but expect to spend time getting up to speed and getting things working the bazel way.

  • Advice on build scripts and tooling
    2 projects | /r/typescript | 21 Jan 2022
    I am using Bazel with rules_nodejs and Webpack. There's an example here.
  • Help me figure out writing a webapp in Go and JavaScript, with Bazel
    3 projects | /r/bazel | 14 May 2021
    It is probably possible to build Angular with ts_project(), however you'd need to manually manage the compiler (Angular has its own) and tsconfig (Angular needs special options). ts_library() does a lot of this for you, so I think it would probably be easier to use that than to force yourself onto ts_project(). The canonical Angular example uses ts_library() FWIW: https://github.com/bazelbuild/rules_nodejs/tree/master/examples/angular
  • Developing in a Monorepo While Still Using Webpack
    1 project | news.ycombinator.com | 23 Dec 2020
    https://github.com/bazelbuild/rules_nodejs
  • On Bazel Support
    1 project | dev.to | 2 Nov 2020
    Nx is widely used in the Angular community. The Angular team at Google had plans to add Bazel support to the Angular CLI for many years, but the plans didn't materialize. The key folks (e.g., Alex Eagle) working on the effort left Google. Google employees no longer maintain rules_nodejs.

What are some alternatives?

When comparing rules_rust and rules_nodejs you can also consider the following projects:

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

jazelle - Incremental, cacheable builds for large Javascript monorepos using Bazel

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

bazel-skylib - Common useful functions and rules for Bazel

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

rules_docker - Rules for building and handling Docker images with Bazel

www.ziglang.org

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

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

bazel-linting-system - πŸŒΏπŸ’š Experimental system for registering, configuring, and invoking source-code linters in Bazel.

bazel-typescript-showcase