feat: new bun_build and bun_compile, extend bun_install

This commit is contained in:
eric
2026-03-15 00:11:55 +01:00
parent c446f23a35
commit a0bc998bd2
58 changed files with 1845 additions and 191 deletions

View File

@@ -13,6 +13,16 @@ _BUN_ARCHIVES = {
"asset": "bun-linux-aarch64.zip",
"binary": "bun-linux-aarch64/bun",
},
"bun_linux_x64_musl": {
"sha256": "48a6c32277d343db0148ce066336472ffd380358a4d26bb1329714742492d824",
"asset": "bun-linux-x64-musl.zip",
"binary": "bun-linux-x64-musl/bun",
},
"bun_linux_aarch64_musl": {
"sha256": "d2c81365a2e529b78a42330d3a0056e8dbd7896b4a6782c8e392b6532141e34d",
"asset": "bun-linux-aarch64-musl.zip",
"binary": "bun-linux-aarch64-musl/bun",
},
"bun_darwin_x64": {
"sha256": "c1d90bf6140f20e572c473065dc6b37a4b036349b5e9e4133779cc642ad94323",
"asset": "bun-darwin-x64.zip",
@@ -28,6 +38,11 @@ _BUN_ARCHIVES = {
"asset": "bun-windows-x64.zip",
"binary": "bun-windows-x64/bun.exe",
},
"bun_windows_aarch64": {
"sha256": "6822f3aa7bd2be40fb94c194a1185aae1c6fade54ca4fc2efdc722e37f3257d2",
"asset": "bun-windows-aarch64.zip",
"binary": "bun-windows-aarch64/bun.exe",
},
}
_BUN_GITHUB_RELEASE_URL_TEMPLATE = "https://github.com/oven-sh/bun/releases/download/bun-v{}/{}"
@@ -62,6 +77,12 @@ _install = tag_class(
"bun_lockfile": attr.label(mandatory = True),
"install_inputs": attr.label_list(allow_files = True),
"isolated_home": attr.bool(default = True),
"production": attr.bool(default = False),
"omit": attr.string_list(),
"linker": attr.string(),
"backend": attr.string(),
"ignore_scripts": attr.bool(default = False),
"install_flags": attr.string_list(),
},
)
@@ -75,6 +96,12 @@ def _bun_install_impl(ctx):
bun_lockfile = install.bun_lockfile,
install_inputs = install.install_inputs,
isolated_home = install.isolated_home,
production = install.production,
omit = install.omit,
linker = install.linker,
backend = install.backend,
ignore_scripts = install.ignore_scripts,
install_flags = install.install_flags,
visible_repo_name = install.name,
)