Skip to content

Commit

Permalink
Add python proto bindings
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 580645110
  • Loading branch information
ksteuck authored and copybara-github committed Nov 8, 2023
1 parent f764b18 commit efda2d0
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 1 deletion.
13 changes: 13 additions & 0 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,19 @@ load("@com_google_protobuf//:protobuf_deps.bzl", "protobuf_deps")

protobuf_deps()

http_archive(
name = "rules_proto",
sha256 = "dc3fb206a2cb3441b485eb1e423165b231235a1ea9b031b4433cf7bc1fa460dd",
strip_prefix = "rules_proto-5.3.0-21.7",
url = "https://github.com/bazelbuild/rules_proto/archive/refs/tags/5.3.0-21.7.tar.gz",
)

load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")

rules_proto_dependencies()
rules_proto_toolchains()


###############################################################################
# Minor third_party dependencies
###############################################################################
Expand Down
21 changes: 21 additions & 0 deletions proto/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
# All SiliFuzz ptotocol messages are to live here.
# Exceptions are example or for-test protos with very local usage scope.

load("@rules_python//python:proto.bzl", "py_proto_library")
load("@rules_cc//cc:defs.bzl", "cc_proto_library")

package(default_visibility = ["//visibility:public"])
Expand All @@ -34,6 +35,11 @@ cc_proto_library(
deps = [":snapshot"],
)

py_proto_library(
name = "snapshot_py_proto",
deps = [":snapshot"],
)

proto_library(
name = "player_result",
srcs = ["player_result.proto"],
Expand All @@ -48,6 +54,11 @@ cc_proto_library(
deps = [":player_result"],
)

py_proto_library(
name = "player_result_py_proto",
deps = [":player_result"],
)

proto_library(
name = "corpus_metadata_proto",
srcs = ["corpus_metadata.proto"],
Expand Down Expand Up @@ -86,6 +97,11 @@ cc_proto_library(
deps = [":snapshot_execution_result_proto"],
)

py_proto_library(
name = "snapshot_execution_result_py_proto",
deps = [":snapshot_execution_result_proto"],
)

proto_library(
name = "binary_log_entry_proto",
srcs = ["binary_log_entry.proto"],
Expand All @@ -101,3 +117,8 @@ cc_proto_library(
name = "binary_log_entry_cc_proto",
deps = [":binary_log_entry_proto"],
)

py_proto_library(
name = "binary_log_entry_py_pb2",
deps = [":binary_log_entry_proto"],
)
1 change: 0 additions & 1 deletion runner/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -446,7 +446,6 @@ nosan_filegroup(
srcs = [
":reading_runner_main_nolibc",
],
visibility = ["//visibility:private"],
)

# A single library for obtaining all runner binaries that can be depended on
Expand Down

0 comments on commit efda2d0

Please sign in to comment.