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