Created
May 31, 2023 22:53
-
-
Save william-smith-skydio/e3b630f7cc826ad33f283b8017a88cc7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
build --cxxopt --std=c++14 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@rules_proto//proto:defs.bzl", "proto_library") | |
load("@rules_proto_grpc//cpp:defs.bzl", "cpp_grpc_library") | |
proto_library( | |
name = "grpc_test_proto", | |
srcs = ["grpc_test.proto"], | |
) | |
cpp_grpc_library( | |
name = "grpc_test_proto_cpp", | |
protos = [":grpc_test_proto"], | |
) | |
cc_binary( | |
name = "test", | |
srcs = ["test.cc"], | |
deps = [":grpc_test_proto_cpp"], | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
package grpc_test; | |
message Foobar { | |
uint32 id = 1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <grpc_test.grpc.pb.h> | |
int main() { return 0; } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | |
http_archive( | |
name = "rules_proto_grpc", | |
sha256 = "928e4205f701b7798ce32f3d2171c1918b363e9a600390a25c876f075f1efc0a", | |
strip_prefix = "rules_proto_grpc-4.4.0", | |
urls = ["https://github.com/rules-proto-grpc/rules_proto_grpc/releases/download/4.4.0/rules_proto_grpc-4.4.0.tar.gz"], | |
) | |
load("@rules_proto_grpc//:repositories.bzl", "rules_proto_grpc_repos", "rules_proto_grpc_toolchains") | |
rules_proto_grpc_toolchains() | |
rules_proto_grpc_repos() | |
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains") | |
rules_proto_dependencies() | |
rules_proto_toolchains() | |
load("@rules_proto_grpc//cpp:repositories.bzl", "cpp_repos") | |
cpp_repos() | |
load("@com_github_grpc_grpc//bazel:grpc_deps.bzl", "grpc_deps") | |
grpc_deps() | |
load("@upb//bazel:workspace_deps.bzl", "upb_deps") | |
upb_deps() | |
http_archive( | |
name = "io_bazel_rules_go", | |
sha256 = "56d8c5a5c91e1af73eca71a6fab2ced959b67c86d12ba37feedb0a2dfea441a6", | |
urls = [ | |
"https://mirror.bazel.build/github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip", | |
"https://github.com/bazelbuild/rules_go/releases/download/v0.37.0/rules_go-v0.37.0.zip", | |
], | |
) | |
load("@io_bazel_rules_go//go:deps.bzl", "go_register_toolchains", "go_rules_dependencies") | |
go_rules_dependencies() | |
go_register_toolchains(version = "1.20.2") | |
load("@com_google_googleapis//:repository_rules.bzl", "switched_rules_by_language") | |
switched_rules_by_language( | |
name = "com_google_googleapis_imports", | |
cc = True, | |
grpc = True, | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment