You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
50 lines
817 B
50 lines
817 B
load("//tools/buck:rust_cxx_bridge.bzl", "rust_cxx_bridge")
|
|
|
|
rust_test(
|
|
name = "test",
|
|
srcs = ["test.rs"],
|
|
deps = [
|
|
":ffi",
|
|
"//:cxx",
|
|
],
|
|
)
|
|
|
|
rust_library(
|
|
name = "ffi",
|
|
srcs = [
|
|
"ffi/cast.rs",
|
|
"ffi/lib.rs",
|
|
"ffi/module.rs",
|
|
],
|
|
crate = "cxx_test_suite",
|
|
deps = [
|
|
":impl",
|
|
"//:cxx",
|
|
],
|
|
)
|
|
|
|
cxx_library(
|
|
name = "impl",
|
|
srcs = [
|
|
"ffi/tests.cc",
|
|
":bridge/source",
|
|
":module/source",
|
|
],
|
|
headers = {
|
|
"ffi/lib.rs.h": ":bridge/header",
|
|
"ffi/module.rs.h": ":module/header",
|
|
"ffi/tests.h": "ffi/tests.h",
|
|
},
|
|
deps = ["//:core"],
|
|
)
|
|
|
|
rust_cxx_bridge(
|
|
name = "bridge",
|
|
src = "ffi/lib.rs",
|
|
)
|
|
|
|
rust_cxx_bridge(
|
|
name = "module",
|
|
src = "ffi/module.rs",
|
|
)
|