1load("//tools/buck:rust_cxx_bridge.bzl", "rust_cxx_bridge") 2 3rust_binary( 4 name = "demo", 5 srcs = glob(["src/**/*.rs"]), 6 edition = "2018", 7 deps = [ 8 ":blobstore-sys", 9 ":bridge", 10 "//:cxx", 11 ], 12) 13 14rust_cxx_bridge( 15 name = "bridge", 16 src = "src/main.rs", 17 deps = [":blobstore-include"], 18) 19 20cxx_library( 21 name = "blobstore-sys", 22 srcs = ["src/blobstore.cc"], 23 compiler_flags = ["-std=c++14"], 24 preferred_linkage = "static", 25 deps = [ 26 ":blobstore-include", 27 ":bridge/include", 28 ], 29) 30 31cxx_library( 32 name = "blobstore-include", 33 exported_deps = ["//:core"], 34 exported_headers = ["include/blobstore.h"], 35) 36