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.
62 lines
1.6 KiB
Python
62 lines
1.6 KiB
Python
# One platform per shipped pi_natives addon. linux platforms inherit the zig
|
|
# libc-aware platforms so cc toolchain resolution pins glibc 2.17 (the shipped
|
|
# portability floor) or musl; the cpu_variant constraint selects -Ctarget-cpu
|
|
# in //crates/pi-natives. darwin/win32 resolve against the host Xcode toolchain
|
|
# and //bazel/toolchains/msvc respectively.
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
platform(
|
|
name = "linux-x64-baseline",
|
|
constraint_values = ["//bazel/variants:baseline"],
|
|
parents = ["@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.17"],
|
|
)
|
|
|
|
platform(
|
|
name = "linux-x64-modern",
|
|
constraint_values = ["//bazel/variants:modern"],
|
|
parents = ["@zig_sdk//libc_aware/platform:linux_amd64_gnu.2.17"],
|
|
)
|
|
|
|
platform(
|
|
name = "linux-arm64",
|
|
parents = ["@zig_sdk//libc_aware/platform:linux_arm64_gnu.2.17"],
|
|
)
|
|
|
|
platform(
|
|
name = "linux-musl-x64-baseline",
|
|
constraint_values = ["//bazel/variants:baseline"],
|
|
parents = ["@zig_sdk//libc_aware/platform:linux_amd64_musl"],
|
|
)
|
|
|
|
platform(
|
|
name = "linux-musl-arm64",
|
|
parents = ["@zig_sdk//libc_aware/platform:linux_arm64_musl"],
|
|
)
|
|
|
|
platform(
|
|
name = "darwin-x64-baseline",
|
|
constraint_values = [
|
|
"@platforms//os:macos",
|
|
"@platforms//cpu:x86_64",
|
|
"//bazel/variants:baseline",
|
|
],
|
|
)
|
|
|
|
platform(
|
|
name = "darwin-arm64",
|
|
constraint_values = [
|
|
"@platforms//os:macos",
|
|
"@platforms//cpu:arm64",
|
|
],
|
|
)
|
|
|
|
platform(
|
|
name = "win32-x64-baseline",
|
|
constraint_values = [
|
|
"@platforms//os:windows",
|
|
"@platforms//cpu:x86_64",
|
|
"//bazel/variants:baseline",
|
|
],
|
|
)
|