Skip to content

Commit

Permalink
switches to Bazlmod
Browse files Browse the repository at this point in the history
  • Loading branch information
karnseth committed Dec 18, 2024
1 parent c0cb3f5 commit a00b422
Show file tree
Hide file tree
Showing 17 changed files with 5,764 additions and 216 deletions.
1 change: 0 additions & 1 deletion .bazeliskrc

This file was deleted.

48 changes: 48 additions & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
###############################################################################
# Bazel now uses Bzlmod by default to manage external dependencies.
# Please consider migrating your external dependencies from WORKSPACE to MODULE.bazel.
#
# For more details, please check https://github.com/bazelbuild/bazel/issues/18958
###############################################################################

module(
name = "private_join_and_compute",
version = "0.0.1",
)

bazel_dep(name = "bazel_skylib", version = "1.7.1")
bazel_dep(name = "grpc", version = "1.66.0.bcr.2", repo_name = "com_github_grpc_grpc")
bazel_dep(name = "glog", version = "0.7.1")
bazel_dep(name = "gflags", version = "2.2.2")
bazel_dep(name = "abseil-cpp", version = "20240722.0")
bazel_dep(name = "googletest", version = "1.15.2")
bazel_dep(name = "boringssl", version = "0.20240913.0")
bazel_dep(name = "rules_cc", version = "0.0.16")
bazel_dep(name = "protobuf", version = "29.0")
bazel_dep(name = "rules_proto_grpc", version = "5.0.0")
bazel_dep(name = "rules_proto_grpc_cpp", version = "5.0.0")
bazel_dep(name = "rules_pkg", version = "1.0.1")
bazel_dep(name = "rules_java", version = "8.6.2")
bazel_dep(name = "rules_python", version = "1.0.0")

# Python
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(
is_default = True,
python_version = "3.12",
)
use_repo(
python,
# register toolchains
"python_3_12",
# Handy helper for all
"python_versions",
)

pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
use_repo(pip, "pjc_pip_deps")
pip.parse(
hub_name = "pjc_pip_deps",
python_version = "3.12",
requirements_lock = "//private_join_and_compute/py/requirements:requirements_lock_3_12.txt",
)
5,576 changes: 5,576 additions & 0 deletions MODULE.bazel.lock

Large diffs are not rendered by default.

19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@ as Private Intersection-Sum.

## How to run the protocol

In order to run Private Join and Compute, you need to install Bazelisk (Note
this release requires Bazel version < 7.0.)
[Follow the instructions for your platform on the Bazelisk website.](https://github.com/bazelbuild/bazelisk/blob/master/README.md)
In order to run Private Join and Compute, you need to install Bazel, if you
don't have it already.
[Follow the instructions for your platform on the Bazel website.](https://docs.bazel.build/versions/master/install.html)

You also need to install Git, if you don't have it already.
[Follow the instructions for your platform on the Git website.](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git)

Once you've installed Bazelisk and Git, open a Terminal and clone the Private
Join and Compute repository into a local folder:
Once you've installed Bazel and Git, open a Terminal and clone the Private Join
and Compute repository into a local folder:

```shell
git clone https://github.com/google/private-join-and-compute.git
Expand All @@ -56,7 +56,7 @@ the Private Join and Compute library and dependencies using Bazel:

```bash
cd private-join-and-compute
bazelisk build //private_join_and_compute:all
bazel build //private_join_and_compute:all
```

(All the following instructions must be run from inside the
Expand Down Expand Up @@ -131,7 +131,7 @@ careful analysis of whether any party has an incentive to lie about their
inputs. This risk can also be mitigated by external enforcement such as code
audits.

### Leakage from the Intersection-Sum with Cardinality.
### Leakage from Intersection-Sum with Cardinality.

While the Private Join and Compute functionality is supposed to reveal only the
intersection-size and intersection-sum, it is possible that these outputs
Expand Down Expand Up @@ -169,3 +169,8 @@ explore mitigations. We refer readers to these works for further discussion.

This is not an officially supported Google product. The software is provided
as-is without any guarantees or warranties, express or implied.

## Acknowledgements

Thank you to Nick Angelou ([s0l0ist@](https://github.com/s0l0ist)) who's work
provided the basis for the Bzlmod migration.
48 changes: 0 additions & 48 deletions WORKSPACE

This file was deleted.

70 changes: 0 additions & 70 deletions bazel/pjc_deps.bzl

This file was deleted.

28 changes: 14 additions & 14 deletions private_join_and_compute/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ cc_library(
deps = [
":private_join_and_compute_proto",
"//private_join_and_compute/util:status_includes",
"@com_google_absl//absl/memory",
"@abseil-cpp//absl/memory",
],
)

Expand Down Expand Up @@ -109,8 +109,8 @@ cc_library(
":match_proto",
"//private_join_and_compute/crypto:bn_util",
"//private_join_and_compute/util:status_includes",
"@com_google_absl//absl/container:btree",
"@com_google_absl//absl/strings",
"@abseil-cpp//absl/container:btree",
"@abseil-cpp//absl/strings",
],
)

Expand All @@ -119,10 +119,10 @@ cc_binary(
srcs = ["generate_dummy_data.cc"],
deps = [
":data_util",
"@com_google_absl//absl/base",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/flags:parse",
"@com_google_absl//absl/log",
"@abseil-cpp//absl/base",
"@abseil-cpp//absl/flags:flag",
"@abseil-cpp//absl/flags:parse",
"@abseil-cpp//absl/log",
],
)

Expand All @@ -148,11 +148,11 @@ cc_binary(
":private_join_and_compute_rpc_impl",
":protocol_server",
":server_impl",
"@abseil-cpp//absl/base",
"@abseil-cpp//absl/flags:flag",
"@abseil-cpp//absl/flags:parse",
"@com_github_grpc_grpc//:grpc",
"@com_github_grpc_grpc//:grpc++",
"@com_google_absl//absl/base",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/flags:parse",
],
)

Expand All @@ -164,11 +164,11 @@ cc_binary(
":data_util",
":private_join_and_compute_proto",
":protocol_client",
"@abseil-cpp//absl/base",
"@abseil-cpp//absl/flags:flag",
"@abseil-cpp//absl/flags:parse",
"@abseil-cpp//absl/strings",
"@com_github_grpc_grpc//:grpc",
"@com_github_grpc_grpc//:grpc++",
"@com_google_absl//absl/base",
"@com_google_absl//absl/flags:flag",
"@com_google_absl//absl/flags:parse",
"@com_google_absl//absl/strings",
],
)
Loading

0 comments on commit a00b422

Please sign in to comment.