mirror of
https://github.com/netbirdio/gvisor.git
synced 2026-05-22 17:12:49 -07:00
This creates a `go_template` that can generate a `go_library` rule which extracts a compressed binary to a temporary location, then executes it. This is useful to implement `runsc` subcommands without requiring that these subcommands' dependencies are linked into the main `runsc` binary. PiperOrigin-RevId: 557270682
25 lines
683 B
Python
25 lines
683 B
Python
load("//tools:defs.bzl", "go_binary")
|
|
load("//tools/embeddedbinary:defs.bzl", "embedded_binary_go_library")
|
|
|
|
package(
|
|
default_applicable_licenses = ["//:license"],
|
|
licenses = ["notice"],
|
|
)
|
|
|
|
# helloworld_bundlee is a simple Go program that prints "Hello, gVisor!\n"
|
|
# to stdout. It is bundled by other rules.
|
|
go_binary(
|
|
name = "helloworld_bundlee",
|
|
srcs = ["helloworld_bundlee.go"],
|
|
)
|
|
|
|
# helloworld generates a Go source file called "helloworld.go" which embeds
|
|
# the helloworld_bundlee program.
|
|
embedded_binary_go_library(
|
|
name = "helloworld",
|
|
binary = ":helloworld_bundlee",
|
|
visibility = [
|
|
"//tools/embeddedbinary/test:__subpackages__",
|
|
],
|
|
)
|