blob: 400fd0c0fa7518f10529272020c3e52a4c10567e [file] [log] [blame]
load("@rules_rust//bindgen:defs.bzl", "rust_bindgen_library")
load("@rules_rust//rust:defs.bzl", "rust_binary", "rust_test")
rust_bindgen_library(
name = "simple_bindgen",
bindgen_flags = [
"--allowlist-function=simple_.*",
"--allowlist-var=SIMPLE_.*",
],
cc_lib = "//bindgen/simple",
header = "//bindgen/simple:simple.h",
wrap_static_fns = True,
)
rust_binary(
name = "simple_example",
srcs = ["main.rs"],
deps = [":simple_bindgen"],
)
rust_test(
name = "simple_test",
crate = ":simple_example",
)