mirror of
https://github.com/topjohnwu/cxx.git
synced 2024-12-02 17:06:24 +00:00
36 lines
693 B
Python
36 lines
693 B
Python
load("@rules_cc//cc:defs.bzl", "cc_library")
|
|
load("//tools/bazel:rust.bzl", "rust_binary")
|
|
load("//tools/bazel:rust_cxx_bridge.bzl", "rust_cxx_bridge")
|
|
|
|
rust_binary(
|
|
name = "demo",
|
|
srcs = glob(["src/**/*.rs"]),
|
|
deps = [
|
|
":blobstore-sys",
|
|
":bridge",
|
|
"//:cxx",
|
|
],
|
|
)
|
|
|
|
rust_cxx_bridge(
|
|
name = "bridge",
|
|
src = "src/main.rs",
|
|
deps = [":blobstore-include"],
|
|
)
|
|
|
|
cc_library(
|
|
name = "blobstore-sys",
|
|
srcs = ["src/blobstore.cc"],
|
|
copts = ["-std=c++14"],
|
|
deps = [
|
|
":blobstore-include",
|
|
":bridge/include",
|
|
],
|
|
)
|
|
|
|
cc_library(
|
|
name = "blobstore-include",
|
|
hdrs = ["include/blobstore.h"],
|
|
deps = ["//:core"],
|
|
)
|