Skip to content

Commit

Permalink
Update instructions on building/installing BLAKE3 library
Browse files Browse the repository at this point in the history
  • Loading branch information
dr8co committed Sep 23, 2023
1 parent 010cdd6 commit 21d71cf
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
14 changes: 13 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,9 +335,21 @@ or [LLVM Clang 17](https://clang.llvm.org/) (or later) is required.
* [OpenSSL](https://www.openssl.org/) 3+
* [Sodium](https://libsodium.org/) 1.0.18+
* [GCrypt](https://gnupg.org/software/libgcrypt/index.html) 1.10+
* [BLAKE3](https://github.com/BLAKE3-team/BLAKE3) 1.4+
* [BLAKE3](https://github.com/BLAKE3-team/BLAKE3) 1.4+ (see the note below)
* [GNU Readline](https://tiswww.case.edu/php/chet/readline/rltop.html) 8+

### IMPORTANT: A note on installing/building BLAKE3

BLAKE3 is not available in the package repositories of most Linux distributions,
so you will need to build it from source and install it manually.

You can run [install_blake3.sh](./install_blake3.sh) script to install BLAKE3 automatically,
Or you can follow the steps at [BLAKE3's GitHub page](https://github.com/BLAKE3-team/BLAKE3/blob/master/c/README.md#building)

Another option is to install BLAKE3 using a package manager, such as [Vcpkg](https://vcpkg.io): `vcpkg install blake3`.

**Installing with the script is recommended, as it will also set up the required CMake module for BLAKE3 automatically.**

### Installation/Building

After installing the prerequisites, you can install Privacy Shield by following the steps below:
Expand Down
12 changes: 12 additions & 0 deletions install_blake3.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/env bash

# This script is used to build and install BLAKE3 on Unix-like systems.
# Requires CMake, Ninja, and GCC (or a compatible C compiler) to be installed.

# Clone the repository
git clone https://github.com/BLAKE3-team/BLAKE3.git

# Build and install BLAKE3
cd BLAKE3/c || echo "Failed to find BLAKE3/c directory" && exit
cmake -B build -DCMAKE_C_COMPILER=gcc -G Ninja
sudo cmake --build build --config Release --target install -j 4

0 comments on commit 21d71cf

Please sign in to comment.