mirror of
https://gitee.com/openharmony/third_party_rust_cxx
synced 2024-11-27 09:20:33 +00:00
37 lines
719 B
Python
37 lines
719 B
Python
load("@rules_cc//cc:defs.bzl", "cc_library")
|
|
load("@rules_rust//rust:defs.bzl", "rust_binary")
|
|
load("//tools/bazel:rust_cxx_bridge.bzl", "rust_cxx_bridge")
|
|
|
|
rust_binary(
|
|
name = "demo",
|
|
srcs = glob(["src/**/*.rs"]),
|
|
edition = "2018",
|
|
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"],
|
|
)
|