Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression. Learn more →
Top 23 Starlark Bazel Projects
-
Project mention: Reddit temporarily ban subreddit and user advertising rival self-hosted platform (Lemmy) | /r/selfhosted | 2023-06-07
Docker doesn't do this all the time. Distroless Docker containers are relatively common. https://github.com/GoogleContainerTools/distroless
-
My company uses Bazel's rules docker to build our images: https://github.com/bazelbuild/rules_docker
They're pretty great and have a lot of the caching and parallelism benefits mentioned in the post for free out of the box, along with determinism (which Docker files don't have because you can run arbitrary shell commands). Our backend stack is also built with Bazel so we get a nice tight integration to build our images that is pretty straightforward.
We've also built some nice tooling around this to automatically put our maven dependencies into different layers using Bazel query and buildozer. Since maven deps don't change often we get a lot of nice caching advantages.
-
InfluxDB
Access the most powerful time series database as a service. Ingest, store, & analyze all types of time series data in a fully-managed, purpose-built database. Keep data forever with low-cost storage and superior data compression.
-
Project mention: Vercel announces Turbopack, the successor to Webpack | news.ycombinator.com | 2022-10-25
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.
-
-
rules_foreign_cc
Build rules for interfacing with "foreign" (non-Bazel) build systems (CMake, configure-make, GNU Make, boost, ninja)
Hello, readline or ncurses can be built using bazel rules foreign cc. Just in case…
-
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...
-
Project mention: Build faster with Buck2: Our open source build system | news.ycombinator.com | 2023-04-06
Regarding bazel, the rules_python has a py_wheel rule that helps you creating wheels that you can upload to pypi (https://github.com/bazelbuild/rules_python/blob/52e14b78307a...).
If you want to see an approach of bazel to pypi taken a bit to the extreme you can have a look at tensorflow on GitHub to see how they do it. They don't use the above-mentioned building rule because I think their build step is quite complicated (C/C++ stuff, Vida/ROCm support, python bindings, and multiOS support all in one before you can publish to pypi).
-
SonarLint
Clean code begins in your IDE with SonarLint. Up your coding game and discover issues early. SonarLint is a free plugin that helps you find & fix bugs and security issues from the moment you start writing code. Install from your favorite IDE marketplace today.
-
Project mention: A Comprehensive guide to build a cross-platform application by Bazel | dev.to | 2022-11-17
git_repository( name = "build_bazel_rules_apple", remote = "https://github.com/bazelbuild/rules_apple.git", tag = "1.1.3", ) git_repository( name = "build_bazel_rules_swift", remote = "https://github.com/bazelbuild/rules_swift.git", tag = "1.2.0", ) load("@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies") swift_rules_dependencies()
-
-
-
-
Project mention: A Comprehensive guide to build a cross-platform application by Bazel | dev.to | 2022-11-17
git_repository( name = "rules_jvm_external", remote = "https://github.com/bazelbuild/rules_jvm_external.git", tag = "4.2", ) load("@rules_jvm_external//:defs.bzl", "maven_install") maven_install( artifacts = [ "androidx.appcompat:appcompat:1.3.0", "com.google.android.material:material:1.4.0", "androidx.constraintlayout:constraintlayout:2.0.4", ], repositories = [ "https://maven.google.com", ], )
-
Project mention: A Comprehensive guide to build a cross-platform application by Bazel | dev.to | 2022-11-17
git_repository( name = "build_bazel_rules_apple", remote = "https://github.com/bazelbuild/rules_apple.git", tag = "1.1.3", ) git_repository( name = "build_bazel_rules_swift", remote = "https://github.com/bazelbuild/rules_swift.git", tag = "1.2.0", ) load("@build_bazel_rules_swift//swift:repositories.bzl", "swift_rules_dependencies") swift_rules_dependencies()
-
Project mention: Is there some truth to this hyperbole? "Haskell is beautiful and elegant, but unmaintainable and painful" | /r/haskell | 2022-06-27
There's https://haskell.build/ for that.
-
rules_proto_grpc
Bazel rules for building Protobuf and gRPC code and libraries from proto_library targets
-
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") BAZEL_TOOLCHAIN_TAG = "0.7.2" BAZEL_TOOLCHAIN_SHA = "f7aa8e59c9d3cafde6edb372d9bd25fb4ee7293ab20b916d867cd0baaa642529" http_archive( name = "com_grail_bazel_toolchain", sha256 = BAZEL_TOOLCHAIN_SHA, strip_prefix = "bazel-toolchain-{tag}".format(tag = BAZEL_TOOLCHAIN_TAG), canonical_id = BAZEL_TOOLCHAIN_TAG, url = "https://github.com/grailbio/bazel-toolchain/archive/{tag}.tar.gz".format(tag = BAZEL_TOOLCHAIN_TAG), ) load("@com_grail_bazel_toolchain//toolchain:deps.bzl", "bazel_toolchain_dependencies") bazel_toolchain_dependencies() load("@com_grail_bazel_toolchain//toolchain:rules.bzl", "llvm_toolchain") llvm_toolchain( name = "llvm_toolchain", llvm_version = "15.0.5", ) load("@llvm_toolchain//:toolchains.bzl", "llvm_register_toolchains") llvm_register_toolchains() http_archive( name = "com_google_googletest", urls = ["https://github.com/google/googletest/archive/609281088cfefc76f9d0ce82e1ff6c30cc3591e5.zip"], strip_prefix = "googletest-609281088cfefc76f9d0ce82e1ff6c30cc3591e5", )
-
For Bazel you can find a good example of this functionality in rules_js with the integration of pnpm workspaces and the npm_package rule (macro) which recently gained a .publish runnable target that will publish the package.
-
-
Not that I'd recommend it, but if you symlink your system library into the bazel build area, as long as your sandboxing setup don't hose you (or you just turn it off), bazel will track system tools/library in the same way as everything else.
Bazel's rules_cc even has a system_library.bzl you can import a `system_library` from that automates this for you. https://github.com/bazelbuild/rules_cc/blob/main/cc/system_l...
I'd still recommend building everything from scratch (and understanding the relationships and graph of your dependencies), but if your build isn't that complicated and you want to role the dice on UB, this isn't that hard.
As an aside, the most galling part of bazel's cache key calculations has to be that it's up to the individual rules to implement this how they see fit. The rules native to bazel written in java vary wildly compared to starlark-written rules. On thing you (or someone in your org) end up becoming pretty comfortable with while using bazel in anger is RTFC.
-
-
-
Project mention: Problems compiling Python gRPC libraries in Bazel - different errors in deps | /r/grpc | 2022-12-15
Repository rule http_archive defined at: /usr/local/home/wrp/.cache/bazel/_bazel_wrp/254c50c69c3701cca4e904bef759573b/external/bazel_tools/tools/build_defs/repo/http.bzl:370:31: in ERROR: /usr/local/home/wrp/.cache/bazel/_bazel_wrp/254c50c69c3701cca4e904bef759573b/external/bazel_tools/platforms/BUILD:89:6: in alias rule @bazel_tools//platforms:windows: Constraints from @bazel_tools//platforms have been removed. Please use constraints from @platforms repository embedded in Bazel, or preferably declare dependency on https://github.com/bazelbuild/platforms. See https://github.com/bazelbuild/bazel/issues/8622 for details. ERROR: /usr/local/home/wrp/.cache/bazel/_bazel_wrp/254c50c69c3701cca4e904bef759573b/external/bazel_tools/platforms/BUILD:89:6: Analysis of target '@bazel_tools//platforms:windows' failed INFO: Repository cython instantiated at: /usr/local/home/bill/depot/src/project/WORKSPACE:448:10: in /usr/local/home/wrp/.cache/bazel/_bazel_wrp/254c50c69c3701cca4e904bef759573b/external/com_github_grpc_grpc/bazel/grpc_deps.bzl:458:21: in grpc_deps /usr/local/home/wrp/.cache/bazel/_bazel_wrp/254c50c69c3701cca4e904bef759573b/external/com_github_grpc_grpc/bazel/grpc_python_deps.bzl:69:21: in grpc_python_deps Repository rule http_archive defined at: /usr/local/home/wrp/.cache/bazel/_bazel_wrp/254c50c69c3701cca4e904bef759573b/external/bazel_tools/tools/build_defs/repo/http.bzl:370:31: in
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
Starlark Bazel related posts
- Reddit temporarily ban subreddit and user advertising rival self-hosted platform (Lemmy)
- Any nice patterns for releasing libraries?
- Bazel Build Rules for Standard ML
- Reviews
- [Docker] Welches Basisbetriebssystem für Docker?
- Distroless images
- Fearless Distroless
-
A note from our sponsor - InfluxDB
www.influxdata.com | 9 Jun 2023
Index
What are some of the best open-source Bazel projects in Starlark? This list will help you:
Project | Stars | |
---|---|---|
1 | distroless | 15,690 |
2 | rules_docker | 1,038 |
3 | rules_nodejs | 700 |
4 | examples | 685 |
5 | rules_foreign_cc | 598 |
6 | rules_rust | 505 |
7 | rules_python | 439 |
8 | rules_apple | 425 |
9 | bazel-compilation-database | 414 |
10 | rules_scala | 335 |
11 | bazel-skylib | 303 |
12 | rules_jvm_external | 272 |
13 | rules_swift | 270 |
14 | bazel-coverage-report-renderer | 250 |
15 | rules_proto_grpc | 214 |
16 | bazel-toolchain | 208 |
17 | rules_js | 205 |
18 | rules_nixpkgs | 204 |
19 | rules_cc | 130 |
20 | rules_gitops | 124 |
21 | bazel-embedded | 79 |
22 | platforms | 78 |
23 | rules_scala | 64 |