third_party_rust_cxx/tests/BUCK

59 lines
937 B
Python
Raw Permalink Normal View History

load("//tools/buck:rust_cxx_bridge.bzl", "rust_cxx_bridge")
rust_test(
name = "test",
srcs = ["test.rs"],
edition = "2018",
deps = [
":ffi",
"//:cxx",
],
)
rust_library(
name = "ffi",
2020-05-08 09:16:29 +00:00
srcs = [
"ffi/cast.rs",
2020-05-08 09:16:29 +00:00
"ffi/lib.rs",
"ffi/module.rs",
],
crate = "cxx_test_suite",
edition = "2018",
deps = [
":impl",
"//:cxx",
],
)
cxx_library(
name = "impl",
srcs = [
"ffi/tests.cc",
":bridge/source",
2020-10-10 23:29:58 +00:00
":module/source",
],
2022-12-02 02:13:54 +00:00
exported_deps = ["//:core"],
exported_headers = [
":bridge/header",
":module/header",
"ffi/tests.h",
],
preferred_linkage = "static",
)
rust_cxx_bridge(
name = "bridge",
src = "ffi/lib.rs",
2022-12-02 02:13:54 +00:00
deps = [
":impl",
],
)
2020-10-10 23:19:20 +00:00
rust_cxx_bridge(
2020-10-10 23:29:58 +00:00
name = "module",
src = "ffi/module.rs",
2022-12-02 02:13:54 +00:00
deps = [
":impl",
],
2020-10-10 23:19:20 +00:00
)