diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index da8c0526..9ed4daf0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -92,18 +92,10 @@ jobs: vcpkg: true architecture: ${{ matrix.cpp_arch }} - - name: Install Mac-OS x86_64 Dependencies - if: ${{ contains(matrix.os, 'macos') && matrix.node_arch == 'x64' }} + - name: Install Mac-OS Dependencies + if: ${{ contains(matrix.os, 'macos') }} run: | - brew install libsodium gnutls - - - name: Install Mac-OS arm64 Dependencies - if: ${{ contains(matrix.os, 'macos') && matrix.node_arch == 'arm64' }} - run: | - brew uninstall libsodium --force --ignore-dependencies - source ./script/macos-arm-deps.sh - echo "PATH=$PATH" >> $GITHUB_ENV - echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV + brew install gnutls autoconf automake libtool - uses: pnpm/action-setup@v4 if: ${{ !matrix.docker }} diff --git a/CMakeLists.txt b/CMakeLists.txt index 91c94d73..96334054 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,12 +31,16 @@ endmacro() option(ZMQ_DRAFT "Build and install draft APIs" OFF) set_option_from_env(ZMQ_DRAFT) -option(ZMQ_CURVE "Enable CURVE security" OFF) +option(ZMQ_CURVE "Enable CURVE security" ON) set_option_from_env(ZMQ_CURVE) -option(ZMQ_SODIUM "Using libsodium for CURVE security" OFF) +option(ZMQ_SODIUM "Using libsodium for CURVE security" ON) set_option_from_env(ZMQ_SODIUM) +if(ZMQ_SODIUM AND APPLE) + message(STATUS "building libsodium requires running `brew install autoconf automake libtool`") +endif() + option(ZMQ_WEBSOCKETS "Enable WebSocket transport" OFF) set_option_from_env(ZMQ_WEBSOCKETS) diff --git a/README.md b/README.md index 1b0f19f1..4fa41e72 100644 --- a/README.md +++ b/README.md @@ -29,8 +29,7 @@ - [Prebuilt binaries](#prebuilt-binaries) - [Building from source](#building-from-source) - [Available Build Options](#available-build-options) - - [Curve support](#curve-support) - - [Libsodium for Curve](#libsodium-for-curve) + - [Curve with Libsodium support](#curve-with-libsodium-support) - [Draft support](#draft-support) - [Websocket support](#websocket-support) - [Secure Websocket support](#secure-websocket-support) @@ -117,25 +116,17 @@ When building from source, you can also specify additional build options in a
👉🏻 Options -### Curve support +### Curve with Libsodium support -Enables CURVE security for encrypted communications. To enable CURVE support, -add the following to your .npmrc: +Enables CURVE security for encrypted communications. Zeromq uses libsodium for CURVE security. To enable CURVE support, add the following to your .npmrc: ```ini zmq_curve="true" -``` - -### Libsodium for Curve - -Enable libsodium for CURVE security instead of the built-in tweetnacl -implementation. This can provide better performance for CURVE operations. To use -libsodium, add the following to your .npmrc: - -```ini zmq_sodium="true" ``` +Building libsodium requires running `brew install autoconf automake libtool` + #### Draft support By default `libzmq` is built with support for `Draft` patterns (e.g. diff --git a/script/macos-arm-deps.sh b/script/macos-cross-arm-deps.sh similarity index 100% rename from script/macos-arm-deps.sh rename to script/macos-cross-arm-deps.sh