feat: bootstrap bun toolchain skeleton and smoke test
This commit is contained in:
21
bun/toolchain.bzl
Normal file
21
bun/toolchain.bzl
Normal 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),
|
||||
},
|
||||
)
|
||||
Reference in New Issue
Block a user