feat: bootstrap bun toolchain skeleton and smoke test

This commit is contained in:
Eric
2026-03-04 02:54:12 +00:00
parent b66339a33b
commit ebce24804c
17 changed files with 261 additions and 1 deletions

21
bun/toolchain.bzl Normal file
View File

@@ -0,0 +1,21 @@
BunToolchainInfo = provider(fields = ["bun_bin", "version"])
def _bun_toolchain_impl(ctx):
return [
platform_common.ToolchainInfo(
bun = BunToolchainInfo(
bun_bin = ctx.executable.bun,
version = ctx.attr.version,
),
),
]
bun_toolchain = rule(
implementation = _bun_toolchain_impl,
attrs = {
"bun": attr.label(allow_single_file = True, executable = True, cfg = "exec"),
"version": attr.string(mandatory = True),
},
)