Skip to content

Commit

Permalink
Revert D66561332: Rewrite TARGETS files to BUCK files for facebook/sa…
Browse files Browse the repository at this point in the history
…pling

Differential Revision:
D66561332

Original commit changeset: 47d3c0a9efe7

Original Phabricator Diff: D66561332

fbshipit-source-id: 8ad0c9c3d4803fa82cf719f81fdb2ab052547a56
  • Loading branch information
Alex Jackson Lambert authored and facebook-github-bot committed Dec 3, 2024
1 parent 9ae37ca commit fb8b8a5
Showing 1 changed file with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions shed/hostcaps/BUCK
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
load("@fbcode_macros//build_defs:cpp_library.bzl", "cpp_library")
load("@fbcode_macros//build_defs:rust_binary.bzl", "rust_binary")
load("@fbcode_macros//build_defs:rust_library.bzl", "rust_library")

oncall("autocargo")

rust_library(
name = "hostcaps",
srcs = glob(["src/**/*.rs"]),
autocargo = {
"cargo_toml_config": {
"lints": {
"rust": {
"unexpected_cfgs": {
"check-cfg": ["cfg(fbcode_build)"],
"level": "warn",
},
},
},
},
},
crate_root = "src/lib.rs",
deps = [
"fbsource//third-party/rust:derive_more",
"fbsource//third-party/rust:once_cell",
"//common/rust/fbwhoami:fbwhoami",
],
)

cpp_library(
name = "hostcaps_ffi",
headers = ["hostcaps.h"],
exported_deps = [
":hostcaps",
],
)

rust_binary(
name = "test-hostcaps",
srcs = ["src/bin/test.rs"],
crate_root = "src/bin/test.rs",
deps = [":hostcaps"],
)

0 comments on commit fb8b8a5

Please sign in to comment.