Skip to content

jondo2010/rules_cc_embed_binary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rules_cc_embed_binary

Bazel rule to embed arbitrary static binary data into an object file, suitable for linking with other cc rules.

Usage

Add the following to MODULE.bazel:

bazel_dep(name="rules_cc_embed_binary", version="0.1.0")

Then in your BUILD file:

load("@rules_cc_embed_binary//embed_binary:defs.bzl", "cc_embed_binary")

cc_embed_binary(
    name = "embedded_data",
    src = "my_data.bin",
)

cc_test(
    name = "test",
    srcs = [..],
    deps = [":embedded_data"],
)

Example

See the test directory in this repo.

About

Bazel rule to embed arbitrary static binary data into an object file, suitable for linking with other cc rules.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors