defs.md
August 2, 2026 ยท View on GitHub
appimage
load("@rules_appimage//appimage:defs.bzl", "appimage")
appimage(name, data, binary, build_args, env)
Package your binary into an AppImage.
Inspect intermediate build artifacts with --output_groups=appimage_debug
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| data | Any additional data that will be made available inside the appimage | List of labels | optional | [] |
| binary | The executable that is packaged and run inside the appimage, e.g. //path/to:my_binary | Label | required | |
| build_args | Extra arguments passed to mksquashfs when building the appimage, e.g. ['-comp', 'xz'] | List of strings | optional | [] |
| env | Runtime environment variables. See https://bazel.build/reference/be/common-definitions#common-attributes-tests | Dictionary: String -> String | optional | {} |
appimage_test
load("@rules_appimage//appimage:defs.bzl", "appimage_test")
appimage_test(name, data, binary, build_args, env)
Package your test target into an AppImage.
Inspect intermediate build artifacts with --output_groups=appimage_debug
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| data | Any additional data that will be made available inside the appimage | List of labels | optional | [] |
| binary | The executable that is packaged and run inside the appimage, e.g. //path/to:my_binary | Label | required | |
| build_args | Extra arguments passed to mksquashfs when building the appimage, e.g. ['-comp', 'xz'] | List of strings | optional | [] |
| env | Runtime environment variables. See https://bazel.build/reference/be/common-definitions#common-attributes-tests | Dictionary: String -> String | optional | {} |
appimage_toolchain
load("@rules_appimage//appimage:defs.bzl", "appimage_toolchain")
appimage_toolchain(name, appimage_runtime)
Declare an AppImage toolchain wrapping a platform-specific AppImage runtime binary.
A separate toolchain target should be registered for each supported CPU architecture, constrained to the matching platform, so that the appimage() rule automatically selects the correct runtime for the target platform.
ATTRIBUTES
| Name | Description | Type | Mandatory | Default |
|---|---|---|---|---|
| name | A unique name for this target. | Name | required | |
| appimage_runtime | - | Label | optional | None |