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