Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: switch yacl examples to bzlmod #495

Merged
merged 3 commits into from
Mar 11, 2025
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bazeliskrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
USE_BAZEL_VERSION=7.4.1
USE_BAZEL_VERSION=7.5.0
101 changes: 101 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/index.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022-2024 Ant Group Co., Ltd
# This file is distributed under the same license as the YACL package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: YACL \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-11 10:28+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <[email protected]>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.17.0\n"

#: ../../index.rst:18
msgid "Contents"
msgstr ""

#: ../../index.rst:2
msgid "YACL Documentation"
msgstr ""

#: ../../index.rst:4
msgid ""
"YACL (Yet Another Common Cryptography Library) is a sub-project of "
"`SecretFlow <https://github.com/secretflow/>`_, it is a C++ library that "
"provides cryptography, network and io modules for other SecretFlow "
"repositories. Yacl is designed to be a **low-level** library that could "
"be either integrated into a big **secure system**, or used in a "
"standalone way for a **quick POC** (see: `Develop "
"<src/develop/index.html>`_), or even help with your "
"**security/cryptography research** (see: `Research "
"<src/research/index.html>`_)."
msgstr ""

#: ../../index.rst:6
msgid ""
"**About Cryptography Modules:** The crypto modules in Yacl implement many"
" state-of-art secure computation protocols, including primitives like OT,"
" VOLE, TPRE, and tools like PRG, RO. Check the full list of Yacl's "
"`supported algorithms list <src/algorithms.html>`_."
msgstr ""

#: ../../index.rst:7
msgid ""
"**About Network (\"link\") Modules:** The network (\"link\") module in "
"Yacl uses `BRPC <https://brpc.apache.org/>`_ to handle network. And we "
"also provide a \"mocked\" in-memory link."
msgstr ""

#: ../../index.rst:8
msgid ""
"**About IO Modules:** Yacl also provides many io modules for kv storage, "
"file io, `bristol circuits <https://nigelsmart.github.io/MPC-"
"Circuits/>`_, and so on."
msgstr ""

#: ../../index.rst:10
msgid "The following parts describes the top-level folders of Yacl repository."
msgstr ""

#: ../../index.rst:12
msgid ""
"`yacl/base/ <https://github.com/secretflow/yacl/tree/main/yacl/base>`_: "
"some basic types and utils in yacl."
msgstr ""

#: ../../index.rst:13
msgid ""
"`yacl/crypto/ "
"<https://github.com/secretflow/yacl/tree/main/yacl/crypto>`_: crypto "
"algorithm without link."
msgstr ""

#: ../../index.rst:14
msgid ""
"`yacl/kernel/ "
"<https://github.com/secretflow/yacl/tree/main/yacl/kernel>`_: crypto "
"kernel that includes link with (WIP) multi-thread support, i.e. OT, DPF."
msgstr ""

#: ../../index.rst:15
msgid ""
"`yacl/io/ <https://github.com/secretflow/yacl/tree/main/yacl/io>`_: a "
"simple streaming-based io library."
msgstr ""

#: ../../index.rst:16
msgid ""
"`yacl/link/ <https://github.com/secretflow/yacl/tree/main/yacl/link>`_: a"
" simple rpc-based MPI framework, providing the `SPMD "
"<https://en.wikipedia.org/wiki/SPMD>`_ parallel programming capability."
msgstr ""

116 changes: 116 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/src/develop/example_psi.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
# Translations template for PROJECT.
# Copyright (C) 2025 ORGANIZATION
# This file is distributed under the same license as the PROJECT project.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PROJECT VERSION\n"
"Report-Msgid-Bugs-To: EMAIL@ADDRESS\n"
"POT-Creation-Date: 2025-03-11 10:28+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <[email protected]>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.17.0\n"

#: ../../src/develop/example_psi.rst:2
msgid "Example: Build a PSI Protocol"
msgstr ""

#: ../../src/develop/example_psi.rst:4
msgid ""
"This is an example of how to use Yacl's ECC api and link to build up a "
"`PSI (Private Set Intersection) "
"<https://en.wikipedia.org/wiki/Private_set_intersection>`_ protocol. The "
"code of this example is avaliable at `link "
"<https://github.com/secretflow/yacl/tree/main/examples/psi/cpp>`_."
msgstr ""

#: ../../src/develop/example_psi.rst:7
msgid ""
"This example is merely designed for demonstration only, please do not use"
" this example in production."
msgstr ""

#: ../../src/develop/example_psi.rst:10
msgid "Step 1: Understand ECDH-PSI"
msgstr ""

#: ../../src/develop/example_psi.rst:12
msgid ""
"Before we start, the ECDH-PSI protocols are formally designed as the "
"following, where lambda indicates the computational security parameter, "
"and H() indicates a cryptographically secure (collision-free) hash "
"function."
msgstr ""

#: ../../src/develop/example_psi.rst:-1
msgid "Alternative text"
msgstr ""

#: ../../src/develop/example_psi.rst:23
msgid "Step 2: Implement Protocol"
msgstr ""

#: ../../src/develop/example_psi.rst:25
msgid ""
"We provide the implementation in the following codes. Note that it's "
"almost always a good idea to separate the definitions and implementations"
" into ``*.h`` and ``*.cc`` files."
msgstr ""

#: ../../src/develop/example_psi.rst:33
msgid ""
"Besides the two files, you also need to write a `BUILD.bazel` file to "
"tell `bazel` how to compile your files together."
msgstr ""

#: ../../src/develop/example_psi.rst:62
msgid "Step 2: Write and Run Tests"
msgstr ""

#: ../../src/develop/example_psi.rst:64
msgid ""
"Also, we recommend all users to write unit tests for implementations. In "
"oder to run the following tests, you can ``cd examples && bazel test "
"//psi/cpp:ecdh_psi_test``."
msgstr ""

#: ../../src/develop/example_psi.rst:70
msgid "Step 3: Generate Executables and Run with CSV files"
msgstr ""

#: ../../src/develop/example_psi.rst:72
msgid ""
"Also, alternatively you can build an executable for two users to actually"
" run the PSI protocols with their private data. We show an example "
"``main.cc`` file in the below."
msgstr ""

#: ../../src/develop/example_psi.rst:77
msgid ""
"In order to compile, run ``bazel build //psi/cpp:ecdh_psi_main -c opt``. "
"The ``-c opt`` flag tells the bazel build system to build a release (or, "
"optimized) version of the executable."
msgstr ""

#: ../../src/develop/example_psi.rst:79
msgid "To run the exeutable, open two terminals in the same machine."
msgstr ""

#: ../../src/develop/example_psi.rst:83
msgid "Please make sure your machine's 10086 and 10087 ports are avaliable."
msgstr ""

#: ../../src/develop/example_psi.rst:85
msgid "In the first terminal, at yacl's project root, run"
msgstr ""

#: ../../src/develop/example_psi.rst:92
msgid "Then in the second terminal, at yacl's project root, run"
msgstr ""

49 changes: 49 additions & 0 deletions docs/locale/zh_CN/LC_MESSAGES/src/develop/example_psi_java.po
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2022-2024 Ant Group Co., Ltd
# This file is distributed under the same license as the YACL package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2025.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: YACL \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-03-11 10:28+0800\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language: zh_CN\n"
"Language-Team: zh_CN <[email protected]>\n"
"Plural-Forms: nplurals=1; plural=0;\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.17.0\n"

#: ../../src/develop/example_psi_java.rst:2
msgid "Example: Bind PSI to Java"
msgstr ""

#: ../../src/develop/example_psi_java.rst:4
msgid ""
"This is an example of how to use Yacl's ECC api and link to build up a "
"`PSI (Private Set Intersection) "
"<https://en.wikipedia.org/wiki/Private_set_intersection>`_ protocol, and "
"provide a java language binding using JNI. The code of this example is "
"avaliable on `Github "
"<https://github.com/secretflow/yacl/tree/main/examples/psi/java>`_."
msgstr ""

#: ../../src/develop/example_psi_java.rst:7
msgid ""
"This example is merely designed for demonstration only, please do not use"
" this example in production."
msgstr ""

#: ../../src/develop/example_psi_java.rst:10
msgid "Step 1: Implement"
msgstr ""

#: ../../src/develop/example_psi_java.rst:19
msgid "Step 2: Build and Test"
msgstr ""

Loading
Loading