Bazel and Docker with rules_oci
Bazel Community Day - San Francisco - May 23
slides: https://hackmd.io/@aspect/rules_oci
Regardless of language,
container images are the most popular deployment artifact.
Most Bazel users want them in bazel-out
Alex Eagle changed 2 years agoSlide mode Like 1 Bookmark
Status: DRAFT
Date: April 20, 2022
Authors: Dylan Martin <dylan@aspect.dev>
Reviewers: Alex Eagle, Thulio Ferraz Assis, Matt Mackay, Greg Magolan
Summary: How to structure the config files and their layout for the aspect cli.
This document follows the conventions from RFC 2119.
Background
Aspect CLI plugins are configurable. Users want to share configurations with their team and CI systems, while also being able to express personal preferences in a non-destructive way. This is desired for a single run of the tool or to change values in CI consistently.
Greg Magolan changed 3 years agoView mode Like Bookmark
SOURCE OF TRUTH IS NOW https://blog.aspect.dev/rulesjs-npm-benchmarks
--DRAFT--
How fast is rules_js? Why is it better than rules_nodejs? How does it compare to non-Bazel npm tools?
If you're reading this you may be considering using rules_js for a new project, migrating your existing project to Bazel with rules_js, or switching your existing project from rules_nodejs to rules_js. If so, you've come to the right place. rules_js was designed from the ground up with performance in mind. The foundational piece to a performant Bazel rule set for javascript is fast fetching & linking of npm dependencies, which is what we'll be measuring here.
In this benchmark we will compare the performance of fetching, linking, and running tools with rules_js against the competition. We'll compare the following tools & rules,
Greg Magolan changed 3 years agoView mode Like Bookmark
Based on rules_container requirements for distroless.
Deliverable in 2-4 months (calendar time).
Components
toolchains
estesp/manifest-tool: to generate manifest lists for multi platform images
cosign
go-containerregistry/crane: append layers, pull and push images and mutate image config (cmd, entrypoint etc), create empty base image
Greg Magolan changed 3 years agoView mode Like Bookmark
--DRAFT--
Aspect's rules_ts is a port of rules_nodejs's @bazel/typescript package that provides a ts_project rule layered on top of rules_js, Aspect's new high-performance Bazel rule set for Javascript, designed from the group up with performance in mind.
The ts_project rule from rules_ts has the same API as its predecessor from @bazel/typescript, but it leaves the gate with performance improvements that were not possible under rules_nodejs.
To learn about how rules_js also makes npm dependencies fast with Bazel check out our rules_js npm benchmarks
In this post, we'll compare build times for ts_project from rules_ts against its predecessor, ts_project from @bazel/typescript, as well as against ts_library from @bazel/concatjs (the original TypeScript rule from Google), and against the vanilla TypeScript compiler, tsc.
Greg Magolan changed 3 years agoView mode Like Bookmark
Context: Aspect is working on first-class Bazel support for formatters and linters across all languages our clients use.
Design invariants:
General solution that handles all languages.
Bazel is responsible for hermetic toolchain.
Minimal fetches. Don't make users wait to pip install the world before they can format a .js file.
No extra toil. Don't force users to declare lint/format stuff in their BUILD files. Instead, walk existing *_library rules.
Or, encourage wrapper macros so that existing load statements for *_library rules change, but the rest of linting setup is tucked into the macro.
Alex Eagle changed 3 years agoView mode Like 2 Bookmark
:herb: Bazel and JavaScript
Bazel community update
August 18 2022
Bazel: most scalable polyglot Build System.
JavaScript & TypeScript: most popular languages.
Note:
Alex Eagle changed 3 years agoSlide mode Like Bookmark
Slides: https://hackmd.io/@aspect/rules_js
Note:
This talk has a bunch of links which you can come find in the slides.
Bazel: most scalable polyglot Build System.
JavaScript & TypeScript: most popular languages.
Note:
Alex Eagle changed 3 years agoSlide mode Like Bookmark
Status: DRAFT | UNDER REVIEW | REVIEWED | PUBLISHED
Date: Month dd, yyyy
Authors: Jesse Tatasciore <jesse@aspect.dev>, Thulio Assis <thulio@aspect.dev>
Reviewers: ...
Summary: Use a short sentence to summarize the design doc.
This document follows the conventions from RFC 2119.
Background
Use a neutral language to succinctly explain the design you are proposing in this document. Use at most 2 paragraphs. Avoid using acronyms here and for the rest of the document. Assume the readers are going to be a mix of technical and non-technical stakeholders. Remember to always use facts in this document. Avoid using any kind of emotional or personal tone (this is a technical document!).
Alex Eagle changed 3 years agoView mode Like Bookmark
The concept of a "linker" is standard across many languages.
It allows the runtime to resolve references from a binary (NodeJS application) to libraries it depends on.
It is similar to:
npm link
pnpm link
build_bazel_rules_nodejs linker
Our task is to make nodejs programs resolve their dependencies when run under Bazel.
Alex Eagle changed 3 years agoView mode Like Bookmark