mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-23 07:10:29 +00:00
52 lines
831 B
Python
52 lines
831 B
Python
load("//tools/buck:rust_cxx_bridge.bzl", "rust_cxx_bridge")
|
|
|
|
rust_test(
|
|
name = "test",
|
|
srcs = ["test.rs"],
|
|
deps = [":ffi"],
|
|
)
|
|
|
|
rust_library(
|
|
name = "ffi",
|
|
srcs = [
|
|
"ffi/extra.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",
|
|
":extra/source",
|
|
],
|
|
headers = {
|
|
"ffi/lib.rs.h": ":bridge/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",
|
|
)
|
|
|
|
rust_cxx_bridge(
|
|
name = "extra",
|
|
src = "ffi/extra.rs",
|
|
)
|