2020-09-24 13:32:12 +00:00
|
|
|
load("//tools/buck:rust_cxx_bridge.bzl", "rust_cxx_bridge")
|
2020-09-22 05:27:30 +00:00
|
|
|
|
2020-02-10 02:59:12 +00:00
|
|
|
rust_binary(
|
2020-09-01 22:51:38 +00:00
|
|
|
name = "demo",
|
|
|
|
srcs = glob(["src/**/*.rs"]),
|
2020-02-10 02:59:12 +00:00
|
|
|
deps = [
|
2020-11-11 04:55:31 +00:00
|
|
|
":blobstore-sys",
|
2020-09-22 05:39:42 +00:00
|
|
|
":bridge",
|
2020-02-10 02:59:12 +00:00
|
|
|
"//:cxx",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
2020-09-24 13:32:12 +00:00
|
|
|
rust_cxx_bridge(
|
2020-09-22 05:39:42 +00:00
|
|
|
name = "bridge",
|
2020-09-24 13:32:12 +00:00
|
|
|
src = "src/main.rs",
|
2020-11-11 04:55:31 +00:00
|
|
|
deps = [":blobstore-include"],
|
2020-09-01 22:51:38 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
2020-11-11 04:55:31 +00:00
|
|
|
name = "blobstore-sys",
|
|
|
|
srcs = ["src/blobstore.cc"],
|
2020-09-01 22:51:38 +00:00
|
|
|
compiler_flags = ["-std=c++14"],
|
|
|
|
deps = [
|
2020-11-11 04:55:31 +00:00
|
|
|
":blobstore-include",
|
2020-09-22 05:39:42 +00:00
|
|
|
":bridge/include",
|
2020-09-01 22:51:38 +00:00
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
cxx_library(
|
2020-11-11 04:55:31 +00:00
|
|
|
name = "blobstore-include",
|
|
|
|
exported_headers = ["include/blobstore.h"],
|
2020-09-01 22:51:38 +00:00
|
|
|
deps = ["//:core"],
|
2020-02-10 02:59:12 +00:00
|
|
|
)
|