8facd237d5
- Replaced the napi-cli/cargo-zigbuild/cargo-xwin/sccache build path with Bazel: rules_rust + crate_universe over Cargo.lock, hermetic zig cc toolchains (linux-gnu pinned to glibc 2.17, linux-musl), host Xcode for darwin, and a repo-local hermetic clang-cl + llvm-ml + xwin toolchain for windows-msvc (bazel/toolchains/msvc). - All eight shipped addons build as //:natives-<target> via the release transition in bazel/defs.bzl (opt, thin LTO, cgu=16, stripped, canonical .node naming); scripts/bazel-natives.ts is the single driver for local dev and CI. - Rust validation moved to bazel test + clippy aspects (strict workspace policy for opted-in crates, default lints elsewhere, mirroring cargo semantics) and the rustfmt aspect; cargo stays as the dev-iteration surface, with brush-core/brush-builtins promoted to workspace members and excluded from cargo dev tasks to keep their historical scope. - CI caches through an in-cluster bazel-remote action cache (TLS + basic auth, cluster-internal only); GitHub-hosted runners never touch the infrastructure and use an actions/cache-backed disk cache instead. - Deleted the hand-rolled caching machinery: ci-target-cache, ci-native-artifact-cache, ci-build-native, native-source-hash, find-native-artifacts, restore-linux-native, native-prewarm workflow, ensure-* toolchain actions, and all sccache/Swatinem wiring. - Warm native rebuilds drop from ~20 minutes to seconds; a cold client with a warm remote cache rebuilds the linux x64 pair in ~2.5 minutes.
86 lines
2.3 KiB
Python
86 lines
2.3 KiB
Python
load("@crates//:defs.bzl", "aliases", "all_crate_deps")
|
|
load("@rules_rust//rust:defs.bzl", "rust_library", "rust_test")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
exports_files(["Cargo.toml"])
|
|
|
|
# Vendored fork, promoted to a workspace member so Bazel treats it as
|
|
# first-party (crate_universe's path-dep rendering is machine-local and breaks
|
|
# lockfile portability). Feature list mirrors cargo's resolved default set.
|
|
rust_library(
|
|
name = "brush-builtins",
|
|
srcs = glob(["src/**/*.rs"]),
|
|
aliases = aliases(),
|
|
crate_features = [
|
|
"builtin.alias",
|
|
"builtin.bg",
|
|
"builtin.bind",
|
|
"builtin.break",
|
|
"builtin.builtin",
|
|
"builtin.caller",
|
|
"builtin.cd",
|
|
"builtin.colon",
|
|
"builtin.command",
|
|
"builtin.compgen",
|
|
"builtin.complete",
|
|
"builtin.compopt",
|
|
"builtin.continue",
|
|
"builtin.declare",
|
|
"builtin.dirs",
|
|
"builtin.dot",
|
|
"builtin.echo",
|
|
"builtin.enable",
|
|
"builtin.eval",
|
|
"builtin.exec",
|
|
"builtin.exit",
|
|
"builtin.export",
|
|
"builtin.false",
|
|
"builtin.fc",
|
|
"builtin.fg",
|
|
"builtin.getopts",
|
|
"builtin.hash",
|
|
"builtin.help",
|
|
"builtin.history",
|
|
"builtin.jobs",
|
|
"builtin.kill",
|
|
"builtin.let",
|
|
"builtin.mapfile",
|
|
"builtin.popd",
|
|
"builtin.printf",
|
|
"builtin.pushd",
|
|
"builtin.pwd",
|
|
"builtin.read",
|
|
"builtin.return",
|
|
"builtin.set",
|
|
"builtin.shift",
|
|
"builtin.shopt",
|
|
"builtin.suspend",
|
|
"builtin.test",
|
|
"builtin.times",
|
|
"builtin.trap",
|
|
"builtin.true",
|
|
"builtin.type",
|
|
"builtin.ulimit",
|
|
"builtin.umask",
|
|
"builtin.unalias",
|
|
"builtin.unset",
|
|
"builtin.wait",
|
|
],
|
|
crate_name = "brush_builtins",
|
|
edition = "2024",
|
|
proc_macro_deps = all_crate_deps(proc_macro = True),
|
|
version = "0.2.0",
|
|
deps = all_crate_deps(normal = True) + [
|
|
"//crates/vendor/brush-core",
|
|
],
|
|
)
|
|
|
|
rust_test(
|
|
name = "brush-builtins_test",
|
|
crate = ":brush-builtins",
|
|
edition = "2024",
|
|
proc_macro_deps = all_crate_deps(proc_macro_dev = True),
|
|
deps = all_crate_deps(normal_dev = True),
|
|
)
|