Add and remove libs and components for Arduino Core 3 (#400)

* Add and remove libs and components for Arduino Core 3

* Add back NimBLE-Arduino in resources
This commit is contained in:
iranl
2024-06-20 18:34:49 +02:00
committed by GitHub
parent 90d13068c9
commit b673fb4d5c
1217 changed files with 118233 additions and 140 deletions

View File

@@ -0,0 +1,14 @@
EXTRA_DIST = \
android-build.sh \
android-aar.sh \
android-armv7-a.sh \
android-armv8-a.sh \
android-x86.sh \
android-x86_64.sh \
emscripten.sh \
apple-xcframework.sh \
macos.sh \
msys2-win32.sh \
msys2-win64.sh \
wasm32-wasi.sh

View File

@@ -0,0 +1,144 @@
#! /bin/sh
# Create an AAR with libsodium in all combinations of static | shared | minimal | full.
#
# The x86 static library will not work due to text relocation rules, so static x86 versions are limited to shared libraries.
# To simplify linking, library variants have distinct names: sodium, sodium-static, sodium-minimal and sodium-minimal-static.
SODIUM_VERSION="1.0.19.0"
NDK_VERSION=$(grep "Pkg.Revision = " <"${ANDROID_NDK_HOME}/source.properties" | cut -f 2 -d '=' | cut -f 2 -d' ' | cut -f 1 -d'.')
DEST_PATH=$(mktemp -d)
cd "$(dirname "$0")/../" || exit
make_abi_json() {
echo "{\"abi\":\"${NDK_ARCH}\",\"api\":${SDK_VERSION},\"ndk\":${NDK_VERSION},\"stl\":\"none\"}" >"$1/abi.json"
}
make_prefab_json() {
echo "{\"name\":\"sodium\",\"schema_version\":1,\"dependencies\":[],\"version\":\"$SODIUM_VERSION\"}" >"$1/prefab.json"
}
make_manifest() {
echo "<manifest xmlns:android=\"http://schemas.android.com/apk/res/android\" package=\"com.android.ndk.thirdparty.sodium\" android:versionCode=\"1\" android:versionName=\"1.0\">
<uses-sdk android:minSdkVersion=\"19\" android:targetSdkVersion=\"21\"/>
</manifest>" >"${1}/AndroidManifest.xml"
}
make_prefab_structure() {
mkdir "$DEST_PATH"
for variant_dirs in "prefab" "prefab/modules" "META-INF"; do
mkdir "${DEST_PATH}/${variant_dirs}"
done
make_prefab_json "${DEST_PATH}/prefab"
make_manifest "${DEST_PATH}"
cp "LICENSE" "${DEST_PATH}/META-INF"
for variant in \
"prefab/modules/sodium" "prefab/modules/sodium-static" \
"prefab/modules/sodium-minimal" "prefab/modules/sodium-minimal-static"; do
mkdir "${DEST_PATH}/${variant}"
if [ "$variant" = "prefab/modules/sodium-minimal" ]; then
echo "{\"library_name\":\"libsodium\"}" >"${DEST_PATH}/${variant}/module.json"
else
echo "{}" >"${DEST_PATH}/${variant}/module.json"
fi
mkdir "${DEST_PATH}/${variant}/libs"
for arch in "arm64-v8a" "armeabi-v7a" "x86" "x86_64"; do
mkdir "$DEST_PATH/${variant}/libs/android.${arch}"
mkdir "$DEST_PATH/${variant}/libs/android.${arch}/include"
NDK_ARCH="$arch"
if [ $arch = "arm64-v8a" ] || [ $arch = "x86_64" ]; then
SDK_VERSION="21"
else
SDK_VERSION="19"
fi
make_abi_json "$DEST_PATH/${variant}/libs/android.${arch}"
done
done
}
copy_libs() {
SRC_DIR="libsodium-android-${1}"
SHARED_DEST_DIR="${DEST_PATH}/prefab/modules/sodium${3}/libs/android.${2}"
STATIC_DEST_DIR="${DEST_PATH}/prefab/modules/sodium${3}-static/libs/android.${2}"
cp -r "${SRC_DIR}/include" "$SHARED_DEST_DIR"
cp -r "${SRC_DIR}/include" "$STATIC_DEST_DIR"
cp "${SRC_DIR}/lib/libsodium.so" "${SHARED_DEST_DIR}/libsodium.so"
cp "${SRC_DIR}/lib/libsodium.a" "${STATIC_DEST_DIR}/libsodium${3}-static.a"
rm -r "$SRC_DIR"
}
build_all() {
dist-build/android-armv7-a.sh
dist-build/android-armv8-a.sh
dist-build/android-x86_64.sh
dist-build/android-x86.sh
}
make_prefab_structure
build_all
copy_libs "armv7-a" "armeabi-v7a" "-minimal"
copy_libs "armv8-a+crypto" "arm64-v8a" "-minimal"
copy_libs "i686" "x86" "-minimal"
copy_libs "westmere" "x86_64" "-minimal"
LIBSODIUM_FULL_BUILD="Y"
export LIBSODIUM_FULL_BUILD
build_all
copy_libs "armv7-a" "armeabi-v7a"
copy_libs "armv8-a+crypto" "arm64-v8a"
copy_libs "i686" "x86"
copy_libs "westmere" "x86_64"
AAR_PATH="$(pwd)/libsodium-${SODIUM_VERSION}.aar"
cd "$DEST_PATH" || exit
rm "$AAR_PATH"
zip -9 -r "$AAR_PATH" META-INF prefab AndroidManifest.xml
cd .. || exit
rm -r "$DEST_PATH"
echo
echo "Congrats you have built an AAR containing libsodium! To use it with
gradle or cmake (as set by default for Android Studio projects):
- Edit the app/build.gradle file to add:
android {
buildFeatures {
prefab true
}
}
and
dependencies {
implementation fileTree(dir:'path/to/aar/',include:['libsodium-$SODIUM_VERSION.aar'])
}
Optionally, store multiple AAR files in the same folder and include '*.aar'
- Edit your module's CMakeLists.txt file to add:
find_package(sodium REQUIRED CONFIG)
- Then, specify 'sodium::x' as an item in the relevant 'target_link_libraries' statement.
The first part is the AAR name and should be 'sodium'.
The second part ('x', to be replaced) should be set to:
- 'sodium' for the full shared library,
- 'sodium-static' for the full static library
- 'sodium-minimal' for the minimal shared library, or
- 'sodium-minimal-static' for the minimal static library."

View File

@@ -0,0 +1,4 @@
#!/bin/sh
export TARGET_ARCH=armv7-a
export CFLAGS="-Os -mfloat-abi=softfp -mfpu=vfpv3-d16 -mthumb -marm -march=${TARGET_ARCH}"
ARCH=arm HOST_COMPILER=armv7a-linux-androideabi "$(dirname "$0")/android-build.sh"

View File

@@ -0,0 +1,4 @@
#!/bin/sh
export TARGET_ARCH=armv8-a+crypto
export CFLAGS="-Os -march=${TARGET_ARCH}"
NDK_PLATFORM=android-21 ARCH=arm64 HOST_COMPILER=aarch64-linux-android "$(dirname "$0")/android-build.sh"

View File

@@ -0,0 +1,92 @@
#! /bin/sh
if [ -z "$NDK_PLATFORM" ]; then
export NDK_PLATFORM="android-19"
fi
export NDK_PLATFORM_COMPAT="${NDK_PLATFORM_COMPAT:-${NDK_PLATFORM}}"
export NDK_API_VERSION="$(echo "$NDK_PLATFORM" | sed 's/^android-//')"
export NDK_API_VERSION_COMPAT="$(echo "$NDK_PLATFORM_COMPAT" | sed 's/^android-//')"
if [ -z "$ANDROID_NDK_HOME" ]; then
echo "You should probably set ANDROID_NDK_HOME to the directory containing"
echo "the Android NDK"
exit 1
fi
if [ ! -f ./configure ]; then
echo "Can't find ./configure. Wrong directory or haven't run autogen.sh?" >&2
exit 1
fi
if [ -z "$TARGET_ARCH" ] || [ -z "$ARCH" ] || [ -z "$HOST_COMPILER" ]; then
echo "You shouldn't use android-build.sh directly, use android-[arch].sh instead" >&2
exit 1
fi
export PREFIX="$(pwd)/libsodium-android-${TARGET_ARCH}"
export TOOLCHAIN_OS_DIR="$(uname | tr '[:upper:]' '[:lower:]')-x86_64/"
export TOOLCHAIN_DIR="$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/${TOOLCHAIN_OS_DIR}"
echo "$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/${TOOLCHAIN_OS_DIR}/${HOST_COMPILER}"
export PATH="${PATH}:${TOOLCHAIN_DIR}/bin"
SDK_VERSION_NUM=$(echo $NDK_PLATFORM | cut -d'-' -f2)
export CC=${CC:-"${HOST_COMPILER}${SDK_VERSION_NUM}-clang"}
echo
echo "Warnings related to headers being present but not usable are due to functions"
echo "that didn't exist in the specified minimum API version level."
echo "They can be safely ignored."
echo
echo
if [ "$NDK_PLATFORM" != "$NDK_PLATFORM_COMPAT" ]; then
echo "Building for platform [${NDK_PLATFORM}], retaining compatibility with platform [${NDK_PLATFORM_COMPAT}]"
else
echo "Building for platform [${NDK_PLATFORM}]"
fi
echo
if [ -z "$LIBSODIUM_FULL_BUILD" ]; then
export LIBSODIUM_ENABLE_MINIMAL_FLAG="--enable-minimal"
else
export LIBSODIUM_ENABLE_MINIMAL_FLAG=""
fi
./configure \
--disable-soname-versions \
--disable-pie \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
--host="${HOST_COMPILER}" \
--prefix="${PREFIX}" \
--with-sysroot="${TOOLCHAIN_DIR}/sysroot" || exit 1
if [ "$NDK_PLATFORM" != "$NDK_PLATFORM_COMPAT" ]; then
egrep '^#define ' config.log | sort -u >config-def-compat.log
echo
echo "Configuring again for platform [${NDK_PLATFORM}]"
echo
./configure \
--disable-soname-versions \
--disable-pie \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
--host="${HOST_COMPILER}" \
--prefix="${PREFIX}" \
--with-sysroot="${TOOLCHAIN_DIR}/sysroot" || exit 1
grep -E '^#define ' config.log | sort -u >config-def.log
if ! cmp config-def.log config-def-compat.log; then
echo "Platform [${NDK_PLATFORM}] is not backwards-compatible with [${NDK_PLATFORM_COMPAT}]" >&2
diff -u config-def.log config-def-compat.log >&2
exit 1
fi
rm -f config-def.log config-def-compat.log
fi
NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
PROCESSORS=${NPROCESSORS:-3}
make clean &&
make -j${PROCESSORS} install &&
echo "libsodium has been installed into ${PREFIX}"

View File

@@ -0,0 +1,4 @@
#!/bin/sh
export TARGET_ARCH=i686
export CFLAGS="-Os -march=${TARGET_ARCH}"
ARCH=x86 HOST_COMPILER=i686-linux-android "$(dirname "$0")/android-build.sh"

View File

@@ -0,0 +1,4 @@
#!/bin/sh
export TARGET_ARCH=westmere
export CFLAGS="-Os -march=${TARGET_ARCH}"
NDK_PLATFORM=android-21 ARCH=x86_64 HOST_COMPILER=x86_64-linux-android "$(dirname "$0")/android-build.sh"

View File

@@ -0,0 +1,537 @@
#! /bin/sh
export PREFIX="$(pwd)/libsodium-apple"
export MACOS_ARM64_PREFIX="${PREFIX}/tmp/macos-arm64"
export MACOS_X86_64_PREFIX="${PREFIX}/tmp/macos-x86_64"
export IOS32_PREFIX="${PREFIX}/tmp/ios32"
export IOS32s_PREFIX="${PREFIX}/tmp/ios32s"
export IOS64_PREFIX="${PREFIX}/tmp/ios64"
export IOS_SIMULATOR_ARM64_PREFIX="${PREFIX}/tmp/ios-simulator-arm64"
export IOS_SIMULATOR_I386_PREFIX="${PREFIX}/tmp/ios-simulator-i386"
export IOS_SIMULATOR_X86_64_PREFIX="${PREFIX}/tmp/ios-simulator-x86_64"
export WATCHOS32_PREFIX="${PREFIX}/tmp/watchos32"
export WATCHOS64_32_PREFIX="${PREFIX}/tmp/watchos64_32"
export WATCHOS64_PREFIX="${PREFIX}/tmp/watchos64"
export WATCHOS_SIMULATOR_ARM64_PREFIX="${PREFIX}/tmp/watchos-simulator-arm64"
export WATCHOS_SIMULATOR_I386_PREFIX="${PREFIX}/tmp/watchos-simulator-i386"
export WATCHOS_SIMULATOR_X86_64_PREFIX="${PREFIX}/tmp/watchos-simulator-x86_64"
export TVOS_PREFIX="${PREFIX}/tmp/tvos"
export TVOS_SIMULATOR_ARM64_PREFIX="${PREFIX}/tmp/tvos-simulator-arm64"
export TVOS_SIMULATOR_X86_64_PREFIX="${PREFIX}/tmp/tvos-simulator-x86_64"
export VISIONOS_PREFIX="${PREFIX}/tmp/visionos"
export VISIONOS_SIMULATOR_PREFIX="${PREFIX}/tmp/visionos-simulator"
export CATALYST_ARM64_PREFIX="${PREFIX}/tmp/catalyst-arm64"
export CATALYST_X86_64_PREFIX="${PREFIX}/tmp/catalyst-x86_64"
export LOG_FILE="${PREFIX}/tmp/build_log"
export XCODEDIR="$(xcode-select -p)"
export MACOS_VERSION_MIN=${MACOS_VERSION_MIN-"10.10"}
export IOS_SIMULATOR_VERSION_MIN=${IOS_SIMULATOR_VERSION_MIN-"9.0.0"}
export IOS_VERSION_MIN=${IOS_VERSION_MIN-"9.0.0"}
export WATCHOS_SIMULATOR_VERSION_MIN=${WATCHOS_SIMULATOR_VERSION_MIN-"4.0.0"}
export WATCHOS_VERSION_MIN=${WATCHOS_VERSION_MIN-"4.0.0"}
export TVOS_SIMULATOR_VERSION_MIN=${TVOS_SIMULATOR_VERSION_MIN-"9.0.0"}
export TVOS_VERSION_MIN=${TVOS_VERSION_MIN-"9.0.0"}
echo
echo "Warnings related to headers being present but not usable are due to functions"
echo "that didn't exist in the specified minimum iOS version level."
echo "They can be safely ignored."
echo
echo "Define the LIBSODIUM_FULL_BUILD environment variable to build the full"
echo "library (including all deprecated/undocumented/low-level functions)."
echo
echo "Define the LIBSODIUM_SKIP_SIMULATORS environment variable to skip building"
echo "the simulators libraries (iOS, watchOS, tvOS, visionOS simulators)."
echo
if [ -z "$LIBSODIUM_FULL_BUILD" ]; then
export LIBSODIUM_ENABLE_MINIMAL_FLAG="--enable-minimal"
else
export LIBSODIUM_ENABLE_MINIMAL_FLAG=""
fi
APPLE_SILICON_SUPPORTED=false
echo 'int main(void){return 0;}' >comptest.c && cc --target=arm64-macos comptest.c 2>/dev/null && APPLE_SILICON_SUPPORTED=true
rm -f comptest.c
NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
PROCESSORS=${NPROCESSORS:-3}
swift_module_map() {
echo 'module Clibsodium {'
echo ' header "sodium.h"'
echo ' export *'
echo '}'
}
build_macos() {
export BASEDIR="${XCODEDIR}/Platforms/MacOSX.platform/Developer"
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
## macOS arm64
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
export CFLAGS="-Ofast -arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
export LDFLAGS="-arch arm64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-darwin23 --prefix="$MACOS_ARM64_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
fi
## macOS x86_64
export CFLAGS="-Ofast -arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
export LDFLAGS="-arch x86_64 -mmacosx-version-min=${MACOS_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=x86_64-apple-darwin10 --prefix="$MACOS_X86_64_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
}
build_ios() {
export BASEDIR="${XCODEDIR}/Platforms/iPhoneOS.platform/Developer"
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
export SDK="${BASEDIR}/SDKs/iPhoneOS.sdk"
## 32-bit iOS
export CFLAGS="-Ofast -mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
export LDFLAGS="-mthumb -arch armv7 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-darwin10 --prefix="$IOS32_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
## 32-bit armv7s iOS
export CFLAGS="-Ofast -mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
export LDFLAGS="-mthumb -arch armv7s -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-darwin10 --prefix="$IOS32s_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
## 64-bit iOS
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mios-version-min=${IOS_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-darwin10 --prefix="$IOS64_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
}
build_ios_simulator() {
export BASEDIR="${XCODEDIR}/Platforms/iPhoneSimulator.platform/Developer"
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
export SDK="${BASEDIR}/SDKs/iPhoneSimulator.sdk"
## arm64 simulator
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-darwin23 --prefix="$IOS_SIMULATOR_ARM64_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
fi
## i386 simulator
export CFLAGS="-Ofast -arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
export LDFLAGS="-arch i386 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=i686-apple-darwin10 --prefix="$IOS_SIMULATOR_I386_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
## x86_64 simulator
export CFLAGS="-Ofast -arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mios-simulator-version-min=${IOS_SIMULATOR_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=x86_64-apple-darwin10 --prefix="$IOS_SIMULATOR_X86_64_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG}
make -j${PROCESSORS} install || exit 1
}
build_watchos() {
export BASEDIR="${XCODEDIR}/Platforms/WatchOS.platform/Developer"
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
export SDK="${BASEDIR}/SDKs/WatchOS.sdk"
# 32-bit watchOS
export CFLAGS="-Ofast -mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
export LDFLAGS="-mthumb -arch armv7k -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-darwin10 --prefix="$WATCHOS32_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
## 64-bit arm64_32 watchOS
export CFLAGS="-Ofast -mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
export LDFLAGS="-mthumb -arch arm64_32 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-darwin10 --prefix="$WATCHOS64_32_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
## 64-bit arm64 watchOS
export CFLAGS="-Ofast -mthumb -arch arm64 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
export LDFLAGS="-mthumb -arch arm64 -isysroot ${SDK} -mwatchos-version-min=${WATCHOS_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-darwin10 --prefix="$WATCHOS64_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
}
build_watchos_simulator() {
export BASEDIR="${XCODEDIR}/Platforms/WatchSimulator.platform/Developer"
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
export SDK="${BASEDIR}/SDKs/WatchSimulator.sdk"
## arm64 simulator
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-darwin23 --prefix="$WATCHOS_SIMULATOR_ARM64_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
fi
## i386 simulator
export CFLAGS="-Ofast -arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
export LDFLAGS="-arch i386 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=i686-apple-darwin10 --prefix="$WATCHOS_SIMULATOR_I386_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
## x86_64 simulator
export CFLAGS="-Ofast -arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mwatchos-simulator-version-min=${WATCHOS_SIMULATOR_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=x86_64-apple-darwin10 --prefix="$WATCHOS_SIMULATOR_X86_64_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
}
build_tvos() {
export BASEDIR="${XCODEDIR}/Platforms/AppleTVOS.platform/Developer"
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
export SDK="${BASEDIR}/SDKs/AppleTVOS.sdk"
## 64-bit tvOS
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mtvos-version-min=${TVOS_VERSION_MIN}"
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mtvos-version-min=${TVOS_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-darwin10 --prefix="$TVOS_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
}
build_tvos_simulator() {
export BASEDIR="${XCODEDIR}/Platforms/AppleTVSimulator.platform/Developer"
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
export SDK="${BASEDIR}/SDKs/AppleTVSimulator.sdk"
## arm64 simulator
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
export LDFLAGS="-arch arm64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-darwin23 --prefix="$TVOS_SIMULATOR_ARM64_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
fi
## x86_64 simulator
export CFLAGS="-Ofast -arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
export LDFLAGS="-arch x86_64 -isysroot ${SDK} -mtvos-simulator-version-min=${TVOS_SIMULATOR_VERSION_MIN}"
make distclean >/dev/null 2>&1
./configure --host=x86_64-apple-darwin10 --prefix="$TVOS_SIMULATOR_X86_64_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG}
make -j${PROCESSORS} install || exit 1
}
build_visionos() {
export BASEDIR="${XCODEDIR}/Platforms/XROS.platform/Developer"
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
export SDK="${BASEDIR}/SDKs/XROS.sdk"
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK}"
export LDFLAGS="-arch arm64 -isysroot ${SDK}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-darwin10 --prefix="$VISIONOS_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
}
build_visionos_simulator() {
export BASEDIR="${XCODEDIR}/Platforms/XRSimulator.platform/Developer"
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
export SDK="${BASEDIR}/SDKs/XRSimulator.sdk"
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
export CFLAGS="-Ofast -arch arm64 -isysroot ${SDK}"
export LDFLAGS="-arch arm64 -isysroot ${SDK}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-darwin23 --prefix="$VISIONOS_SIMULATOR_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
fi
}
build_catalyst() {
export BASEDIR="${XCODEDIR}/Platforms/MacOSX.platform/Developer"
export PATH="${BASEDIR}/usr/bin:$BASEDIR/usr/sbin:$PATH"
export SDK="${BASEDIR}/SDKs/MacOSX.sdk"
## arm64 catalyst
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
export CFLAGS="-Ofast -arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}"
export LDFLAGS="-arch arm64 -target arm64-apple-ios13.1-macabi -isysroot ${SDK}"
make distclean >/dev/null 2>&1
./configure --host=arm-apple-ios --prefix="$CATALYST_ARM64_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
fi
## x86_64 catalyst
export CFLAGS="-Ofast -arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}"
export LDFLAGS="-arch x86_64 -target x86_64-apple-ios13.1-macabi -isysroot ${SDK}"
make distclean >/dev/null 2>&1
./configure --host=x86_64-apple-ios --prefix="$CATALYST_X86_64_PREFIX" \
${LIBSODIUM_ENABLE_MINIMAL_FLAG} || exit 1
make -j${PROCESSORS} install || exit 1
}
mkdir -p "${PREFIX}/tmp"
echo "Building for macOS..."
build_macos >"$LOG_FILE" 2>&1 || exit 1
echo "Building for iOS..."
build_ios >"$LOG_FILE" 2>&1 || exit 1
echo "Building for watchOS..."
build_watchos >"$LOG_FILE" 2>&1 || exit 1
echo "Building for tvOS..."
build_tvos >"$LOG_FILE" 2>&1 || exit 1
echo "Building for visionOS..."
build_visionos >"$LOG_FILE" 2>&1 || exit 1
echo "Building for Catalyst..."
build_catalyst >"$LOG_FILE" 2>&1 || exit 1
if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
echo "Building for the iOS simulator..."
build_ios_simulator >"$LOG_FILE" 2>&1 || exit 1
echo "Building for the watchOS simulator..."
build_watchos_simulator >"$LOG_FILE" 2>&1 || exit 1
echo "Building for the tvOS simulator..."
build_tvos_simulator >"$LOG_FILE" 2>&1 || exit 1
echo "Building for the visionOS simulator..."
build_visionos_simulator >"$LOG_FILE" 2>&1 || exit 1
else
echo "[Skipping the simulators]"
fi
echo "Adding the Clibsodium module map for Swift..."
find "$PREFIX" -name "include" -type d -print | while read -r f; do
swift_module_map >"${f}/module.modulemap"
done
echo "Bundling macOS targets..."
mkdir -p "${PREFIX}/macos/lib"
cp -a "${MACOS_X86_64_PREFIX}/include" "${PREFIX}/macos/"
for ext in a dylib; do
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
lipo -create \
"${MACOS_ARM64_PREFIX}/lib/libsodium.${ext}" \
"${MACOS_X86_64_PREFIX}/lib/libsodium.${ext}" \
-output "${PREFIX}/macos/lib/libsodium.${ext}"
else
lipo -create \
"${MACOS_X86_64_PREFIX}/lib/libsodium.${ext}" \
-output "${PREFIX}/macos/lib/libsodium.${ext}"
fi
done
echo "Bundling iOS targets..."
mkdir -p "${PREFIX}/ios/lib"
cp -a "${IOS64_PREFIX}/include" "${PREFIX}/ios/"
for ext in a dylib; do
lipo -create \
"$IOS32_PREFIX/lib/libsodium.${ext}" \
"$IOS32s_PREFIX/lib/libsodium.${ext}" \
"$IOS64_PREFIX/lib/libsodium.${ext}" \
-output "$PREFIX/ios/lib/libsodium.${ext}"
done
echo "Bundling watchOS targets..."
mkdir -p "${PREFIX}/watchos/lib"
cp -a "${WATCHOS64_32_PREFIX}/include" "${PREFIX}/watchos/"
for ext in a dylib; do
lipo -create \
"${WATCHOS32_PREFIX}/lib/libsodium.${ext}" \
"${WATCHOS64_32_PREFIX}/lib/libsodium.${ext}" \
"${WATCHOS64_PREFIX}/lib/libsodium.${ext}" \
-output "${PREFIX}/watchos/lib/libsodium.${ext}"
done
echo "Bundling tvOS targets..."
mkdir -p "${PREFIX}/tvos/lib"
cp -a "${TVOS_PREFIX}/include" "${PREFIX}/tvos/"
for ext in a dylib; do
lipo -create \
"$TVOS_PREFIX/lib/libsodium.${ext}" \
-output "$PREFIX/tvos/lib/libsodium.${ext}"
done
echo "Bundling visionOS targets..."
mkdir -p "${PREFIX}/visionos/lib"
cp -a "${VISIONOS_PREFIX}/include" "${PREFIX}/visionos/"
for ext in a dylib; do
lipo -create \
"$VISIONOS_PREFIX/lib/libsodium.${ext}" \
-output "$PREFIX/visionos/lib/libsodium.${ext}"
done
echo "Bundling Catalyst targets..."
mkdir -p "${PREFIX}/catalyst/lib"
cp -a "${CATALYST_X86_64_PREFIX}/include" "${PREFIX}/catalyst/"
for ext in a dylib; do
if [ ! -f "${CATALYST_X86_64_PREFIX}/lib/libsodium.${ext}" ]; then
continue
fi
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
lipo -create \
"${CATALYST_ARM64_PREFIX}/lib/libsodium.${ext}" \
"${CATALYST_X86_64_PREFIX}/lib/libsodium.${ext}" \
-output "${PREFIX}/catalyst/lib/libsodium.${ext}"
else
lipo -create \
"${CATALYST_X86_64_PREFIX}/lib/libsodium.${ext}" \
-output "${PREFIX}/catalyst/lib/libsodium.${ext}"
fi
done
if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
echo "Bundling iOS simulators..."
mkdir -p "${PREFIX}/ios-simulators/lib"
cp -a "${IOS_SIMULATOR_X86_64_PREFIX}/include" "${PREFIX}/ios-simulators/"
for ext in a dylib; do
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
lipo -create \
"${IOS_SIMULATOR_ARM64_PREFIX}/lib/libsodium.${ext}" \
"${IOS_SIMULATOR_I386_PREFIX}/lib/libsodium.${ext}" \
"${IOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
-output "${PREFIX}/ios-simulators/lib/libsodium.${ext}" || exit 1
else
lipo -create \
"${IOS_SIMULATOR_I386_PREFIX}/lib/libsodium.${ext}" \
"${IOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
-output "${PREFIX}/ios-simulators/lib/libsodium.${ext}" || exit 1
fi
done
echo "Bundling watchOS simulators..."
mkdir -p "${PREFIX}/watchos-simulators/lib"
cp -a "${WATCHOS_SIMULATOR_X86_64_PREFIX}/include" "${PREFIX}/watchos-simulators/"
for ext in a dylib; do
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
lipo -create \
"${WATCHOS_SIMULATOR_ARM64_PREFIX}/lib/libsodium.${ext}" \
"${WATCHOS_SIMULATOR_I386_PREFIX}/lib/libsodium.${ext}" \
"${WATCHOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
-output "${PREFIX}/watchos-simulators/lib/libsodium.${ext}"
else
lipo -create \
"${WATCHOS_SIMULATOR_I386_PREFIX}/lib/libsodium.${ext}" \
"${WATCHOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
-output "${PREFIX}/watchos-simulators/lib/libsodium.${ext}"
fi
done
echo "Bundling tvOS simulators..."
mkdir -p "${PREFIX}/tvos-simulators/lib"
cp -a "${TVOS_SIMULATOR_X86_64_PREFIX}/include" "${PREFIX}/tvos-simulators/"
for ext in a dylib; do
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
lipo -create \
"${TVOS_SIMULATOR_ARM64_PREFIX}/lib/libsodium.${ext}" \
"${TVOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
-output "${PREFIX}/tvos-simulators/lib/libsodium.${ext}" || exit 1
else
lipo -create \
"${TVOS_SIMULATOR_X86_64_PREFIX}/lib/libsodium.${ext}" \
-output "${PREFIX}/tvos-simulators/lib/libsodium.${ext}" || exit 1
fi
done
echo "Bundling visionOS simulators..."
mkdir -p "${PREFIX}/visionos-simulators/lib"
cp -a "${VISIONOS_SIMULATOR_PREFIX}/include" "${PREFIX}/visionos-simulators/"
for ext in a dylib; do
if [ "$APPLE_SILICON_SUPPORTED" = "true" ]; then
lipo -create \
"${VISIONOS_SIMULATOR_PREFIX}/lib/libsodium.${ext}" \
-output "${PREFIX}/visionos-simulators/lib/libsodium.${ext}" || exit 1
fi
done
fi
echo "Creating Clibsodium.xcframework..."
rm -rf "${PREFIX}/Clibsodium.xcframework"
XCFRAMEWORK_ARGS=""
for f in macos ios watchos tvos visionos catalyst; do
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library ${PREFIX}/${f}/lib/libsodium.a"
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers ${PREFIX}/${f}/include"
done
if [ -z "$LIBSODIUM_SKIP_SIMULATORS" ]; then
for f in ios-simulators watchos-simulators tvos-simulators visionos-simulators; do
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -library ${PREFIX}/${f}/lib/libsodium.a"
XCFRAMEWORK_ARGS="${XCFRAMEWORK_ARGS} -headers ${PREFIX}/${f}/include"
done
fi
xcodebuild -create-xcframework \
${XCFRAMEWORK_ARGS} \
-output "${PREFIX}/Clibsodium.xcframework" >/dev/null
ls -ld -- "$PREFIX"
ls -l -- "$PREFIX"
ls -l -- "$PREFIX/Clibsodium.xcframework"
echo "Done!"
# Cleanup
rm -rf -- "$PREFIX/tmp"
make distclean >/dev/null

View File

@@ -0,0 +1,651 @@
_crypto_aead_aegis128l_abytes 0 1
_crypto_aead_aegis128l_decrypt 0 1
_crypto_aead_aegis128l_decrypt_detached 0 1
_crypto_aead_aegis128l_encrypt 0 1
_crypto_aead_aegis128l_encrypt_detached 0 1
_crypto_aead_aegis128l_keybytes 0 1
_crypto_aead_aegis128l_keygen 0 1
_crypto_aead_aegis128l_messagebytes_max 0 1
_crypto_aead_aegis128l_npubbytes 0 1
_crypto_aead_aegis128l_nsecbytes 0 1
_crypto_aead_aegis256_abytes 0 1
_crypto_aead_aegis256_decrypt 0 1
_crypto_aead_aegis256_decrypt_detached 0 1
_crypto_aead_aegis256_encrypt 0 1
_crypto_aead_aegis256_encrypt_detached 0 1
_crypto_aead_aegis256_keybytes 0 1
_crypto_aead_aegis256_keygen 0 1
_crypto_aead_aegis256_messagebytes_max 0 1
_crypto_aead_aegis256_npubbytes 0 1
_crypto_aead_aegis256_nsecbytes 0 1
_crypto_aead_aes256gcm_abytes 0 0
_crypto_aead_aes256gcm_beforenm 0 0
_crypto_aead_aes256gcm_decrypt 0 0
_crypto_aead_aes256gcm_decrypt_afternm 0 0
_crypto_aead_aes256gcm_decrypt_detached 0 0
_crypto_aead_aes256gcm_decrypt_detached_afternm 0 0
_crypto_aead_aes256gcm_encrypt 0 0
_crypto_aead_aes256gcm_encrypt_afternm 0 0
_crypto_aead_aes256gcm_encrypt_detached 0 0
_crypto_aead_aes256gcm_encrypt_detached_afternm 0 0
_crypto_aead_aes256gcm_is_available 0 0
_crypto_aead_aes256gcm_keybytes 0 0
_crypto_aead_aes256gcm_keygen 0 0
_crypto_aead_aes256gcm_messagebytes_max 0 0
_crypto_aead_aes256gcm_npubbytes 0 0
_crypto_aead_aes256gcm_nsecbytes 0 0
_crypto_aead_aes256gcm_statebytes 0 0
_crypto_aead_chacha20poly1305_abytes 1 1
_crypto_aead_chacha20poly1305_decrypt 1 1
_crypto_aead_chacha20poly1305_decrypt_detached 1 1
_crypto_aead_chacha20poly1305_encrypt 1 1
_crypto_aead_chacha20poly1305_encrypt_detached 1 1
_crypto_aead_chacha20poly1305_ietf_abytes 1 1
_crypto_aead_chacha20poly1305_ietf_decrypt 1 1
_crypto_aead_chacha20poly1305_ietf_decrypt_detached 1 1
_crypto_aead_chacha20poly1305_ietf_encrypt 1 1
_crypto_aead_chacha20poly1305_ietf_encrypt_detached 1 1
_crypto_aead_chacha20poly1305_ietf_keybytes 1 1
_crypto_aead_chacha20poly1305_ietf_keygen 1 1
_crypto_aead_chacha20poly1305_ietf_messagebytes_max 1 1
_crypto_aead_chacha20poly1305_ietf_npubbytes 1 1
_crypto_aead_chacha20poly1305_ietf_nsecbytes 1 1
_crypto_aead_chacha20poly1305_keybytes 1 1
_crypto_aead_chacha20poly1305_keygen 1 1
_crypto_aead_chacha20poly1305_messagebytes_max 1 1
_crypto_aead_chacha20poly1305_npubbytes 1 1
_crypto_aead_chacha20poly1305_nsecbytes 1 1
_crypto_aead_xchacha20poly1305_ietf_abytes 1 1
_crypto_aead_xchacha20poly1305_ietf_decrypt 1 1
_crypto_aead_xchacha20poly1305_ietf_decrypt_detached 1 1
_crypto_aead_xchacha20poly1305_ietf_encrypt 1 1
_crypto_aead_xchacha20poly1305_ietf_encrypt_detached 1 1
_crypto_aead_xchacha20poly1305_ietf_keybytes 1 1
_crypto_aead_xchacha20poly1305_ietf_keygen 1 1
_crypto_aead_xchacha20poly1305_ietf_messagebytes_max 1 1
_crypto_aead_xchacha20poly1305_ietf_npubbytes 1 1
_crypto_aead_xchacha20poly1305_ietf_nsecbytes 1 1
_crypto_auth 1 1
_crypto_auth_bytes 1 1
_crypto_auth_hmacsha256 0 1
_crypto_auth_hmacsha256_bytes 0 1
_crypto_auth_hmacsha256_final 0 1
_crypto_auth_hmacsha256_init 0 1
_crypto_auth_hmacsha256_keybytes 0 1
_crypto_auth_hmacsha256_keygen 0 1
_crypto_auth_hmacsha256_statebytes 0 1
_crypto_auth_hmacsha256_update 0 1
_crypto_auth_hmacsha256_verify 0 1
_crypto_auth_hmacsha512 0 1
_crypto_auth_hmacsha512256 0 1
_crypto_auth_hmacsha512256_bytes 0 1
_crypto_auth_hmacsha512256_final 0 1
_crypto_auth_hmacsha512256_init 0 1
_crypto_auth_hmacsha512256_keybytes 0 1
_crypto_auth_hmacsha512256_keygen 0 1
_crypto_auth_hmacsha512256_statebytes 0 1
_crypto_auth_hmacsha512256_update 0 1
_crypto_auth_hmacsha512256_verify 0 1
_crypto_auth_hmacsha512_bytes 0 1
_crypto_auth_hmacsha512_final 0 1
_crypto_auth_hmacsha512_init 0 1
_crypto_auth_hmacsha512_keybytes 0 1
_crypto_auth_hmacsha512_keygen 0 1
_crypto_auth_hmacsha512_statebytes 0 1
_crypto_auth_hmacsha512_update 0 1
_crypto_auth_hmacsha512_verify 0 1
_crypto_auth_keybytes 1 1
_crypto_auth_keygen 1 1
_crypto_auth_primitive 0 1
_crypto_auth_verify 1 1
_crypto_box 0 1
_crypto_box_afternm 0 1
_crypto_box_beforenm 1 1
_crypto_box_beforenmbytes 1 1
_crypto_box_boxzerobytes 0 1
_crypto_box_curve25519xchacha20poly1305_beforenm 0 1
_crypto_box_curve25519xchacha20poly1305_beforenmbytes 0 1
_crypto_box_curve25519xchacha20poly1305_detached 0 1
_crypto_box_curve25519xchacha20poly1305_detached_afternm 0 1
_crypto_box_curve25519xchacha20poly1305_easy 0 1
_crypto_box_curve25519xchacha20poly1305_easy_afternm 0 1
_crypto_box_curve25519xchacha20poly1305_keypair 0 1
_crypto_box_curve25519xchacha20poly1305_macbytes 0 1
_crypto_box_curve25519xchacha20poly1305_messagebytes_max 0 1
_crypto_box_curve25519xchacha20poly1305_noncebytes 0 1
_crypto_box_curve25519xchacha20poly1305_open_detached 0 1
_crypto_box_curve25519xchacha20poly1305_open_detached_afternm 0 1
_crypto_box_curve25519xchacha20poly1305_open_easy 0 1
_crypto_box_curve25519xchacha20poly1305_open_easy_afternm 0 1
_crypto_box_curve25519xchacha20poly1305_publickeybytes 0 1
_crypto_box_curve25519xchacha20poly1305_seal 0 1
_crypto_box_curve25519xchacha20poly1305_seal_open 0 1
_crypto_box_curve25519xchacha20poly1305_sealbytes 0 1
_crypto_box_curve25519xchacha20poly1305_secretkeybytes 0 1
_crypto_box_curve25519xchacha20poly1305_seed_keypair 0 1
_crypto_box_curve25519xchacha20poly1305_seedbytes 0 1
_crypto_box_curve25519xsalsa20poly1305 0 1
_crypto_box_curve25519xsalsa20poly1305_afternm 0 1
_crypto_box_curve25519xsalsa20poly1305_beforenm 0 1
_crypto_box_curve25519xsalsa20poly1305_beforenmbytes 0 1
_crypto_box_curve25519xsalsa20poly1305_boxzerobytes 0 1
_crypto_box_curve25519xsalsa20poly1305_keypair 0 1
_crypto_box_curve25519xsalsa20poly1305_macbytes 0 1
_crypto_box_curve25519xsalsa20poly1305_messagebytes_max 0 1
_crypto_box_curve25519xsalsa20poly1305_noncebytes 0 1
_crypto_box_curve25519xsalsa20poly1305_open 0 1
_crypto_box_curve25519xsalsa20poly1305_open_afternm 0 1
_crypto_box_curve25519xsalsa20poly1305_publickeybytes 0 1
_crypto_box_curve25519xsalsa20poly1305_secretkeybytes 0 1
_crypto_box_curve25519xsalsa20poly1305_seed_keypair 0 1
_crypto_box_curve25519xsalsa20poly1305_seedbytes 0 1
_crypto_box_curve25519xsalsa20poly1305_zerobytes 0 1
_crypto_box_detached 1 1
_crypto_box_detached_afternm 1 1
_crypto_box_easy 1 1
_crypto_box_easy_afternm 1 1
_crypto_box_keypair 1 1
_crypto_box_macbytes 1 1
_crypto_box_messagebytes_max 1 1
_crypto_box_noncebytes 1 1
_crypto_box_open 0 1
_crypto_box_open_afternm 0 1
_crypto_box_open_detached 1 1
_crypto_box_open_detached_afternm 1 1
_crypto_box_open_easy 1 1
_crypto_box_open_easy_afternm 1 1
_crypto_box_primitive 0 1
_crypto_box_publickeybytes 1 1
_crypto_box_seal 1 1
_crypto_box_seal_open 1 1
_crypto_box_sealbytes 1 1
_crypto_box_secretkeybytes 1 1
_crypto_box_seed_keypair 1 1
_crypto_box_seedbytes 1 1
_crypto_box_zerobytes 0 1
_crypto_core_ed25519_add 0 1
_crypto_core_ed25519_bytes 0 1
_crypto_core_ed25519_from_hash 0 0
_crypto_core_ed25519_from_uniform 0 1
_crypto_core_ed25519_hashbytes 0 1
_crypto_core_ed25519_is_valid_point 0 1
_crypto_core_ed25519_nonreducedscalarbytes 0 1
_crypto_core_ed25519_random 0 1
_crypto_core_ed25519_scalar_add 0 1
_crypto_core_ed25519_scalar_complement 0 1
_crypto_core_ed25519_scalar_invert 0 1
_crypto_core_ed25519_scalar_is_canonical 0 1
_crypto_core_ed25519_scalar_mul 0 1
_crypto_core_ed25519_scalar_negate 0 1
_crypto_core_ed25519_scalar_random 0 1
_crypto_core_ed25519_scalar_reduce 0 1
_crypto_core_ed25519_scalar_sub 0 1
_crypto_core_ed25519_scalarbytes 0 1
_crypto_core_ed25519_sub 0 1
_crypto_core_ed25519_uniformbytes 0 1
_crypto_core_hchacha20 0 1
_crypto_core_hchacha20_constbytes 0 1
_crypto_core_hchacha20_inputbytes 0 1
_crypto_core_hchacha20_keybytes 0 1
_crypto_core_hchacha20_outputbytes 0 1
_crypto_core_hsalsa20 0 1
_crypto_core_hsalsa20_constbytes 0 1
_crypto_core_hsalsa20_inputbytes 0 1
_crypto_core_hsalsa20_keybytes 0 1
_crypto_core_hsalsa20_outputbytes 0 1
_crypto_core_ristretto255_add 0 1
_crypto_core_ristretto255_bytes 0 1
_crypto_core_ristretto255_from_hash 0 1
_crypto_core_ristretto255_hashbytes 0 1
_crypto_core_ristretto255_is_valid_point 0 1
_crypto_core_ristretto255_nonreducedscalarbytes 0 1
_crypto_core_ristretto255_random 0 1
_crypto_core_ristretto255_scalar_add 0 1
_crypto_core_ristretto255_scalar_complement 0 1
_crypto_core_ristretto255_scalar_invert 0 1
_crypto_core_ristretto255_scalar_is_canonical 0 1
_crypto_core_ristretto255_scalar_mul 0 1
_crypto_core_ristretto255_scalar_negate 0 1
_crypto_core_ristretto255_scalar_random 0 1
_crypto_core_ristretto255_scalar_reduce 0 1
_crypto_core_ristretto255_scalar_sub 0 1
_crypto_core_ristretto255_scalarbytes 0 1
_crypto_core_ristretto255_sub 0 1
_crypto_core_ristretto255_uniformbytes 0 1
_crypto_core_salsa20 0 1
_crypto_core_salsa2012 0 1
_crypto_core_salsa2012_constbytes 0 1
_crypto_core_salsa2012_inputbytes 0 1
_crypto_core_salsa2012_keybytes 0 1
_crypto_core_salsa2012_outputbytes 0 1
_crypto_core_salsa208 0 1
_crypto_core_salsa208_constbytes 0 1
_crypto_core_salsa208_inputbytes 0 1
_crypto_core_salsa208_keybytes 0 1
_crypto_core_salsa208_outputbytes 0 1
_crypto_core_salsa20_constbytes 0 1
_crypto_core_salsa20_inputbytes 0 1
_crypto_core_salsa20_keybytes 0 1
_crypto_core_salsa20_outputbytes 0 1
_crypto_generichash 1 1
_crypto_generichash_blake2b 0 1
_crypto_generichash_blake2b_bytes 0 1
_crypto_generichash_blake2b_bytes_max 0 1
_crypto_generichash_blake2b_bytes_min 0 1
_crypto_generichash_blake2b_final 0 1
_crypto_generichash_blake2b_init 0 1
_crypto_generichash_blake2b_init_salt_personal 0 1
_crypto_generichash_blake2b_keybytes 0 1
_crypto_generichash_blake2b_keybytes_max 0 1
_crypto_generichash_blake2b_keybytes_min 0 1
_crypto_generichash_blake2b_keygen 0 1
_crypto_generichash_blake2b_personalbytes 0 1
_crypto_generichash_blake2b_salt_personal 0 1
_crypto_generichash_blake2b_saltbytes 0 1
_crypto_generichash_blake2b_statebytes 0 1
_crypto_generichash_blake2b_update 0 1
_crypto_generichash_bytes 1 1
_crypto_generichash_bytes_max 1 1
_crypto_generichash_bytes_min 1 1
_crypto_generichash_final 1 1
_crypto_generichash_init 1 1
_crypto_generichash_keybytes 1 1
_crypto_generichash_keybytes_max 1 1
_crypto_generichash_keybytes_min 1 1
_crypto_generichash_keygen 1 1
_crypto_generichash_primitive 0 1
_crypto_generichash_statebytes 1 1
_crypto_generichash_update 1 1
_crypto_hash 1 1
_crypto_hash_bytes 1 1
_crypto_hash_primitive 0 1
_crypto_hash_sha256 0 1
_crypto_hash_sha256_bytes 0 1
_crypto_hash_sha256_final 0 1
_crypto_hash_sha256_init 0 1
_crypto_hash_sha256_statebytes 0 1
_crypto_hash_sha256_update 0 1
_crypto_hash_sha512 0 1
_crypto_hash_sha512_bytes 0 1
_crypto_hash_sha512_final 0 1
_crypto_hash_sha512_init 0 1
_crypto_hash_sha512_statebytes 0 1
_crypto_hash_sha512_update 0 1
_crypto_kdf_blake2b_bytes_max 0 1
_crypto_kdf_blake2b_bytes_min 0 1
_crypto_kdf_blake2b_contextbytes 0 1
_crypto_kdf_blake2b_derive_from_key 0 1
_crypto_kdf_blake2b_keybytes 0 1
_crypto_kdf_bytes_max 1 1
_crypto_kdf_bytes_min 1 1
_crypto_kdf_contextbytes 1 1
_crypto_kdf_derive_from_key 1 1
_crypto_kdf_hkdf_sha256_bytes_max 1 1
_crypto_kdf_hkdf_sha256_bytes_min 1 1
_crypto_kdf_hkdf_sha256_expand 1 1
_crypto_kdf_hkdf_sha256_extract 1 1
_crypto_kdf_hkdf_sha256_extract_final 1 1
_crypto_kdf_hkdf_sha256_extract_init 1 1
_crypto_kdf_hkdf_sha256_statebytes 1 1
_crypto_kdf_hkdf_sha256_extract_update 1 1
_crypto_kdf_hkdf_sha256_keybytes 1 1
_crypto_kdf_hkdf_sha256_keygen 1 1
_crypto_kdf_hkdf_sha512_bytes_max 1 1
_crypto_kdf_hkdf_sha512_bytes_min 1 1
_crypto_kdf_hkdf_sha512_expand 1 1
_crypto_kdf_hkdf_sha512_extract 1 1
_crypto_kdf_hkdf_sha512_extract_final 1 1
_crypto_kdf_hkdf_sha512_extract_init 1 1
_crypto_kdf_hkdf_sha512_statebytes 1 1
_crypto_kdf_hkdf_sha512_extract_update 1 1
_crypto_kdf_hkdf_sha512_keybytes 1 1
_crypto_kdf_hkdf_sha512_keygen 1 1
_crypto_kdf_keybytes 1 1
_crypto_kdf_keygen 1 1
_crypto_kdf_primitive 0 1
_crypto_kx_client_session_keys 1 1
_crypto_kx_keypair 1 1
_crypto_kx_primitive 0 1
_crypto_kx_publickeybytes 1 1
_crypto_kx_secretkeybytes 1 1
_crypto_kx_seed_keypair 1 1
_crypto_kx_seedbytes 1 1
_crypto_kx_server_session_keys 1 1
_crypto_kx_sessionkeybytes 1 1
_crypto_onetimeauth 0 1
_crypto_onetimeauth_bytes 0 1
_crypto_onetimeauth_final 0 1
_crypto_onetimeauth_init 0 1
_crypto_onetimeauth_keybytes 0 1
_crypto_onetimeauth_keygen 0 1
_crypto_onetimeauth_poly1305 0 1
_crypto_onetimeauth_poly1305_bytes 0 1
_crypto_onetimeauth_poly1305_final 0 1
_crypto_onetimeauth_poly1305_init 0 1
_crypto_onetimeauth_poly1305_keybytes 0 1
_crypto_onetimeauth_poly1305_keygen 0 1
_crypto_onetimeauth_poly1305_statebytes 0 1
_crypto_onetimeauth_poly1305_update 0 1
_crypto_onetimeauth_poly1305_verify 0 1
_crypto_onetimeauth_primitive 0 1
_crypto_onetimeauth_statebytes 0 1
_crypto_onetimeauth_update 0 1
_crypto_onetimeauth_verify 0 1
_crypto_pwhash 0 1
_crypto_pwhash_alg_argon2i13 0 1
_crypto_pwhash_alg_argon2id13 0 1
_crypto_pwhash_alg_default 0 1
_crypto_pwhash_argon2i 0 1
_crypto_pwhash_argon2i_alg_argon2i13 0 1
_crypto_pwhash_argon2i_bytes_max 0 1
_crypto_pwhash_argon2i_bytes_min 0 1
_crypto_pwhash_argon2i_memlimit_interactive 0 1
_crypto_pwhash_argon2i_memlimit_max 0 1
_crypto_pwhash_argon2i_memlimit_min 0 1
_crypto_pwhash_argon2i_memlimit_moderate 0 1
_crypto_pwhash_argon2i_memlimit_sensitive 0 1
_crypto_pwhash_argon2i_opslimit_interactive 0 1
_crypto_pwhash_argon2i_opslimit_max 0 1
_crypto_pwhash_argon2i_opslimit_min 0 1
_crypto_pwhash_argon2i_opslimit_moderate 0 1
_crypto_pwhash_argon2i_opslimit_sensitive 0 1
_crypto_pwhash_argon2i_passwd_max 0 1
_crypto_pwhash_argon2i_passwd_min 0 1
_crypto_pwhash_argon2i_saltbytes 0 1
_crypto_pwhash_argon2i_str 0 1
_crypto_pwhash_argon2i_str_needs_rehash 0 1
_crypto_pwhash_argon2i_str_verify 0 1
_crypto_pwhash_argon2i_strbytes 0 1
_crypto_pwhash_argon2i_strprefix 0 1
_crypto_pwhash_argon2id 0 1
_crypto_pwhash_argon2id_alg_argon2id13 0 1
_crypto_pwhash_argon2id_bytes_max 0 1
_crypto_pwhash_argon2id_bytes_min 0 1
_crypto_pwhash_argon2id_memlimit_interactive 0 1
_crypto_pwhash_argon2id_memlimit_max 0 1
_crypto_pwhash_argon2id_memlimit_min 0 1
_crypto_pwhash_argon2id_memlimit_moderate 0 1
_crypto_pwhash_argon2id_memlimit_sensitive 0 1
_crypto_pwhash_argon2id_opslimit_interactive 0 1
_crypto_pwhash_argon2id_opslimit_max 0 1
_crypto_pwhash_argon2id_opslimit_min 0 1
_crypto_pwhash_argon2id_opslimit_moderate 0 1
_crypto_pwhash_argon2id_opslimit_sensitive 0 1
_crypto_pwhash_argon2id_passwd_max 0 1
_crypto_pwhash_argon2id_passwd_min 0 1
_crypto_pwhash_argon2id_saltbytes 0 1
_crypto_pwhash_argon2id_str 0 1
_crypto_pwhash_argon2id_str_needs_rehash 0 1
_crypto_pwhash_argon2id_str_verify 0 1
_crypto_pwhash_argon2id_strbytes 0 1
_crypto_pwhash_argon2id_strprefix 0 1
_crypto_pwhash_bytes_max 0 1
_crypto_pwhash_bytes_min 0 1
_crypto_pwhash_memlimit_interactive 0 1
_crypto_pwhash_memlimit_max 0 1
_crypto_pwhash_memlimit_min 0 1
_crypto_pwhash_memlimit_moderate 0 1
_crypto_pwhash_memlimit_sensitive 0 1
_crypto_pwhash_opslimit_interactive 0 1
_crypto_pwhash_opslimit_max 0 1
_crypto_pwhash_opslimit_min 0 1
_crypto_pwhash_opslimit_moderate 0 1
_crypto_pwhash_opslimit_sensitive 0 1
_crypto_pwhash_passwd_max 0 1
_crypto_pwhash_passwd_min 0 1
_crypto_pwhash_primitive 0 1
_crypto_pwhash_saltbytes 0 1
_crypto_pwhash_scryptsalsa208sha256 0 1
_crypto_pwhash_scryptsalsa208sha256_bytes_max 0 1
_crypto_pwhash_scryptsalsa208sha256_bytes_min 0 1
_crypto_pwhash_scryptsalsa208sha256_ll 0 1
_crypto_pwhash_scryptsalsa208sha256_memlimit_interactive 0 1
_crypto_pwhash_scryptsalsa208sha256_memlimit_max 0 1
_crypto_pwhash_scryptsalsa208sha256_memlimit_min 0 1
_crypto_pwhash_scryptsalsa208sha256_memlimit_sensitive 0 1
_crypto_pwhash_scryptsalsa208sha256_opslimit_interactive 0 1
_crypto_pwhash_scryptsalsa208sha256_opslimit_max 0 1
_crypto_pwhash_scryptsalsa208sha256_opslimit_min 0 1
_crypto_pwhash_scryptsalsa208sha256_opslimit_sensitive 0 1
_crypto_pwhash_scryptsalsa208sha256_passwd_max 0 1
_crypto_pwhash_scryptsalsa208sha256_passwd_min 0 1
_crypto_pwhash_scryptsalsa208sha256_saltbytes 0 1
_crypto_pwhash_scryptsalsa208sha256_str 0 1
_crypto_pwhash_scryptsalsa208sha256_str_needs_rehash 0 1
_crypto_pwhash_scryptsalsa208sha256_str_verify 0 1
_crypto_pwhash_scryptsalsa208sha256_strbytes 0 1
_crypto_pwhash_scryptsalsa208sha256_strprefix 0 1
_crypto_pwhash_str 0 1
_crypto_pwhash_str_alg 0 1
_crypto_pwhash_str_needs_rehash 0 1
_crypto_pwhash_str_verify 0 1
_crypto_pwhash_strbytes 0 1
_crypto_pwhash_strprefix 0 1
_crypto_scalarmult 1 1
_crypto_scalarmult_base 1 1
_crypto_scalarmult_bytes 1 1
_crypto_scalarmult_curve25519 0 1
_crypto_scalarmult_curve25519_base 0 1
_crypto_scalarmult_curve25519_bytes 0 1
_crypto_scalarmult_curve25519_scalarbytes 0 1
_crypto_scalarmult_ed25519 0 1
_crypto_scalarmult_ed25519_base 0 1
_crypto_scalarmult_ed25519_base_noclamp 0 1
_crypto_scalarmult_ed25519_bytes 0 1
_crypto_scalarmult_ed25519_noclamp 0 1
_crypto_scalarmult_ed25519_scalarbytes 0 1
_crypto_scalarmult_primitive 0 1
_crypto_scalarmult_ristretto255 0 1
_crypto_scalarmult_ristretto255_base 0 1
_crypto_scalarmult_ristretto255_bytes 0 1
_crypto_scalarmult_ristretto255_scalarbytes 0 1
_crypto_scalarmult_scalarbytes 1 1
_crypto_secretbox 0 1
_crypto_secretbox_boxzerobytes 0 1
_crypto_secretbox_detached 1 1
_crypto_secretbox_easy 1 1
_crypto_secretbox_keybytes 1 1
_crypto_secretbox_keygen 1 1
_crypto_secretbox_macbytes 1 1
_crypto_secretbox_messagebytes_max 1 1
_crypto_secretbox_noncebytes 1 1
_crypto_secretbox_open 0 1
_crypto_secretbox_open_detached 1 1
_crypto_secretbox_open_easy 1 1
_crypto_secretbox_primitive 0 1
_crypto_secretbox_xchacha20poly1305_detached 0 1
_crypto_secretbox_xchacha20poly1305_easy 0 1
_crypto_secretbox_xchacha20poly1305_keybytes 0 1
_crypto_secretbox_xchacha20poly1305_macbytes 0 1
_crypto_secretbox_xchacha20poly1305_messagebytes_max 0 1
_crypto_secretbox_xchacha20poly1305_noncebytes 0 1
_crypto_secretbox_xchacha20poly1305_open_detached 0 1
_crypto_secretbox_xchacha20poly1305_open_easy 0 1
_crypto_secretbox_xsalsa20poly1305 0 1
_crypto_secretbox_xsalsa20poly1305_boxzerobytes 0 1
_crypto_secretbox_xsalsa20poly1305_keybytes 0 1
_crypto_secretbox_xsalsa20poly1305_keygen 0 1
_crypto_secretbox_xsalsa20poly1305_macbytes 0 1
_crypto_secretbox_xsalsa20poly1305_messagebytes_max 0 1
_crypto_secretbox_xsalsa20poly1305_noncebytes 0 1
_crypto_secretbox_xsalsa20poly1305_open 0 1
_crypto_secretbox_xsalsa20poly1305_zerobytes 0 1
_crypto_secretbox_zerobytes 0 1
_crypto_secretstream_xchacha20poly1305_abytes 1 1
_crypto_secretstream_xchacha20poly1305_headerbytes 1 1
_crypto_secretstream_xchacha20poly1305_init_pull 1 1
_crypto_secretstream_xchacha20poly1305_init_push 1 1
_crypto_secretstream_xchacha20poly1305_keybytes 1 1
_crypto_secretstream_xchacha20poly1305_keygen 1 1
_crypto_secretstream_xchacha20poly1305_messagebytes_max 1 1
_crypto_secretstream_xchacha20poly1305_pull 1 1
_crypto_secretstream_xchacha20poly1305_push 1 1
_crypto_secretstream_xchacha20poly1305_rekey 1 1
_crypto_secretstream_xchacha20poly1305_statebytes 1 1
_crypto_secretstream_xchacha20poly1305_tag_final 1 1
_crypto_secretstream_xchacha20poly1305_tag_message 1 1
_crypto_secretstream_xchacha20poly1305_tag_push 1 1
_crypto_secretstream_xchacha20poly1305_tag_rekey 1 1
_crypto_shorthash 1 1
_crypto_shorthash_bytes 1 1
_crypto_shorthash_keybytes 1 1
_crypto_shorthash_keygen 1 1
_crypto_shorthash_primitive 0 1
_crypto_shorthash_siphash24 0 1
_crypto_shorthash_siphash24_bytes 0 1
_crypto_shorthash_siphash24_keybytes 0 1
_crypto_shorthash_siphashx24 0 1
_crypto_shorthash_siphashx24_bytes 0 1
_crypto_shorthash_siphashx24_keybytes 0 1
_crypto_sign 1 1
_crypto_sign_bytes 1 1
_crypto_sign_detached 1 1
_crypto_sign_ed25519 0 1
_crypto_sign_ed25519_bytes 0 1
_crypto_sign_ed25519_detached 0 1
_crypto_sign_ed25519_keypair 0 1
_crypto_sign_ed25519_messagebytes_max 0 1
_crypto_sign_ed25519_open 0 1
_crypto_sign_ed25519_pk_to_curve25519 1 1
_crypto_sign_ed25519_publickeybytes 0 1
_crypto_sign_ed25519_secretkeybytes 0 1
_crypto_sign_ed25519_seed_keypair 0 1
_crypto_sign_ed25519_seedbytes 0 1
_crypto_sign_ed25519_sk_to_curve25519 1 1
_crypto_sign_ed25519_sk_to_pk 0 1
_crypto_sign_ed25519_sk_to_seed 0 1
_crypto_sign_ed25519_verify_detached 0 1
_crypto_sign_ed25519ph_final_create 0 1
_crypto_sign_ed25519ph_final_verify 0 1
_crypto_sign_ed25519ph_init 0 1
_crypto_sign_ed25519ph_statebytes 0 1
_crypto_sign_ed25519ph_update 0 1
_crypto_sign_edwards25519sha512batch 0 0
_crypto_sign_edwards25519sha512batch_keypair 0 0
_crypto_sign_edwards25519sha512batch_open 0 0
_crypto_sign_final_create 1 1
_crypto_sign_final_verify 1 1
_crypto_sign_init 1 1
_crypto_sign_keypair 1 1
_crypto_sign_messagebytes_max 1 1
_crypto_sign_open 1 1
_crypto_sign_primitive 0 1
_crypto_sign_publickeybytes 1 1
_crypto_sign_secretkeybytes 1 1
_crypto_sign_seed_keypair 1 1
_crypto_sign_seedbytes 1 1
_crypto_sign_statebytes 1 1
_crypto_sign_update 1 1
_crypto_sign_verify_detached 1 1
_crypto_stream 0 1
_crypto_stream_chacha20 0 1
_crypto_stream_chacha20_ietf 0 1
_crypto_stream_chacha20_ietf_keybytes 0 1
_crypto_stream_chacha20_ietf_keygen 0 1
_crypto_stream_chacha20_ietf_messagebytes_max 0 1
_crypto_stream_chacha20_ietf_noncebytes 0 1
_crypto_stream_chacha20_ietf_xor 0 1
_crypto_stream_chacha20_ietf_xor_ic 0 1
_crypto_stream_chacha20_keybytes 0 1
_crypto_stream_chacha20_keygen 0 1
_crypto_stream_chacha20_messagebytes_max 0 1
_crypto_stream_chacha20_noncebytes 0 1
_crypto_stream_chacha20_xor 0 1
_crypto_stream_chacha20_xor_ic 0 1
_crypto_stream_keybytes 0 1
_crypto_stream_keygen 0 1
_crypto_stream_messagebytes_max 0 1
_crypto_stream_noncebytes 0 1
_crypto_stream_primitive 0 1
_crypto_stream_salsa20 0 1
_crypto_stream_salsa2012 0 1
_crypto_stream_salsa2012_keybytes 0 1
_crypto_stream_salsa2012_keygen 0 1
_crypto_stream_salsa2012_messagebytes_max 0 1
_crypto_stream_salsa2012_noncebytes 0 1
_crypto_stream_salsa2012_xor 0 1
_crypto_stream_salsa208 0 1
_crypto_stream_salsa208_keybytes 0 1
_crypto_stream_salsa208_keygen 0 1
_crypto_stream_salsa208_messagebytes_max 0 1
_crypto_stream_salsa208_noncebytes 0 1
_crypto_stream_salsa208_xor 0 1
_crypto_stream_salsa20_keybytes 0 1
_crypto_stream_salsa20_keygen 0 1
_crypto_stream_salsa20_messagebytes_max 0 1
_crypto_stream_salsa20_noncebytes 0 1
_crypto_stream_salsa20_xor 0 1
_crypto_stream_salsa20_xor_ic 0 1
_crypto_stream_xchacha20 0 1
_crypto_stream_xchacha20_keybytes 0 1
_crypto_stream_xchacha20_keygen 0 1
_crypto_stream_xchacha20_messagebytes_max 0 1
_crypto_stream_xchacha20_noncebytes 0 1
_crypto_stream_xchacha20_xor 0 1
_crypto_stream_xchacha20_xor_ic 0 1
_crypto_stream_xor 0 1
_crypto_stream_xsalsa20 0 1
_crypto_stream_xsalsa20_keybytes 0 1
_crypto_stream_xsalsa20_keygen 0 1
_crypto_stream_xsalsa20_messagebytes_max 0 1
_crypto_stream_xsalsa20_noncebytes 0 1
_crypto_stream_xsalsa20_xor 0 1
_crypto_stream_xsalsa20_xor_ic 0 1
_crypto_verify_16 0 1
_crypto_verify_16_bytes 0 1
_crypto_verify_32 0 1
_crypto_verify_32_bytes 0 1
_crypto_verify_64 0 1
_crypto_verify_64_bytes 0 1
_randombytes 1 1
_randombytes_buf 1 1
_randombytes_buf_deterministic 1 1
_randombytes_close 1 1
_randombytes_implementation_name 0 1
_randombytes_random 1 1
_randombytes_seedbytes 1 1
_randombytes_set_implementation 0 0
_randombytes_stir 1 1
_randombytes_uniform 1 1
_sodium_add 0 0
_sodium_allocarray 0 0
_sodium_base642bin 1 1
_sodium_base64_encoded_len 1 1
_sodium_bin2base64 1 1
_sodium_bin2hex 1 1
_sodium_compare 0 0
_sodium_free 0 0
_sodium_hex2bin 1 1
_sodium_increment 0 0
_sodium_init 1 1
_sodium_is_zero 0 0
_sodium_library_minimal 1 1
_sodium_library_version_major 1 1
_sodium_library_version_minor 1 1
_sodium_malloc 0 0
_sodium_memcmp 0 0
_sodium_memzero 0 0
_sodium_misuse 0 0
_sodium_mlock 0 0
_sodium_mprotect_noaccess 0 0
_sodium_mprotect_readonly 0 0
_sodium_mprotect_readwrite 0 0
_sodium_munlock 0 0
_sodium_pad 1 1
_sodium_runtime_has_aesni 0 0
_sodium_runtime_has_armcrypto 0 0
_sodium_runtime_has_avx 0 0
_sodium_runtime_has_avx2 0 0
_sodium_runtime_has_avx512f 0 0
_sodium_runtime_has_neon 0 0
_sodium_runtime_has_pclmul 0 0
_sodium_runtime_has_rdrand 0 0
_sodium_runtime_has_sse2 0 0
_sodium_runtime_has_sse3 0 0
_sodium_runtime_has_sse41 0 0
_sodium_runtime_has_ssse3 0 0
_sodium_set_misuse_handler 0 0
_sodium_stackzero 0 0
_sodium_sub 0 0
_sodium_unpad 1 1
_sodium_version_string 1 1

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,59 @@
#! /bin/sh
set -e
LIBSODIUM=${LIBSODIUM:-/tmp/sodium/lib/libsodium.26.dylib}
symbols() {
{
SUMO="$1"
while read symbol standard sumo; do
found="$standard"
if [ "x$SUMO" = "xsumo" ]; then
found="$sumo"
fi
if [ "$found" = "1" ]; then
eval "defined_${symbol}=yes"
else
eval "defined_${symbol}=no"
fi
done <emscripten-symbols.def
/usr/bin/nm "$LIBSODIUM" |
fgrep ' T _' |
cut -d' ' -f3 | {
while read symbol; do
eval "found=\$defined_${symbol}"
if [ "$found" = "yes" ]; then
echo "$symbol"
elif [ "$found" != "no" ]; then
echo >&2
echo "*** [$symbol] was not expected ***" >&2
echo >&2
exit 1
fi
done
}
} |
sort |
{
out='"_malloc","_free"'
while read symbol; do
if [ ! -z "$out" ]; then
out="${out},"
fi
out="${out}\"${symbol}\""
done
echo "[${out}]"
}
}
out=$(symbols standard)
sed s/EXPORTED_FUNCTIONS_STANDARD=\'.*\'/EXPORTED_FUNCTIONS_STANDARD=\'${out}\'/ <emscripten.sh >emscripten.sh.tmp &&
mv -f emscripten.sh.tmp emscripten.sh
out=$(symbols sumo)
sed s/EXPORTED_FUNCTIONS_SUMO=\'.*\'/EXPORTED_FUNCTIONS_SUMO=\'${out}\'/ <emscripten.sh >emscripten.sh.tmp &&
mv -f emscripten.sh.tmp emscripten.sh
chmod +x emscripten.sh

View File

@@ -0,0 +1,26 @@
#! /bin/sh
export PREFIX="$(pwd)/libsodium-osx"
export MACOS_VERSION_MIN=${MACOS_VERSION_MIN-"10.10"}
if [ -z "$LIBSODIUM_FULL_BUILD" ]; then
export LIBSODIUM_ENABLE_MINIMAL_FLAG="--enable-minimal"
else
export LIBSODIUM_ENABLE_MINIMAL_FLAG=""
fi
NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
PROCESSORS=${NPROCESSORS:-3}
mkdir -p $PREFIX || exit 1
export CFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN} -Ofast"
export LDFLAGS="-mmacosx-version-min=${MACOS_VERSION_MIN}"
make distclean >/dev/null
./configure ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
--prefix="$PREFIX" || exit 1
make -j${PROCESSORS} check && make -j${PROCESSORS} install || exit 1
# Cleanup
make distclean >/dev/null

View File

@@ -0,0 +1,18 @@
#! /bin/sh
export CFLAGS="-Ofast -fomit-frame-pointer -m32 -march=pentium3 -mtune=westmere"
export PREFIX="$(pwd)/libsodium-win32"
if (i686-w64-mingw32-gcc --version >/dev/null 2>&1); then
echo MinGW found
else
echo Please install mingw-w64-i686-gcc >&2
exit
fi
./configure --prefix="$PREFIX" --exec-prefix="$PREFIX" \
--host=i686-w64-mingw32 &&
make clean &&
make &&
make check &&
make install

View File

@@ -0,0 +1,18 @@
#! /bin/sh
export CFLAGS="-Ofast -fomit-frame-pointer -m64 -mtune=westmere"
export PREFIX="$(pwd)/libsodium-win64"
if (x86_64-w64-mingw32-gcc --version >/dev/null 2>&1); then
echo MinGW found
else
echo Please install mingw-w64-x86_64-gcc >&2
exit
fi
./configure --prefix="$PREFIX" --exec-prefix="$PREFIX" \
--host=x86_64-w64-mingw32 &&
make clean &&
make &&
make check &&
make install

View File

@@ -0,0 +1,45 @@
#! /bin/sh
export PATH="/opt/zig/bin:/opt/zig:/opt/homebrew/bin:$PATH"
export PREFIX="$(pwd)/libsodium-wasm32-wasi"
mkdir -p $PREFIX || exit 1
export CC="zig cc"
export CFLAGS="--target=wasm32-wasi -O3"
export LDFLAGS="-s"
export AR="zig ar"
export RANLIB="zig ranlib"
make distclean >/dev/null
if [ "x$1" = "x--bench" ]; then
export BENCHMARKS=1
export CPPFLAGS="-DBENCHMARKS -DITERATIONS=200"
else
export CPPFLAGS="-DED25519_NONDETERMINISTIC=1"
fi
if [ -n "$LIBSODIUM_MINIMAL_BUILD" ]; then
export LIBSODIUM_ENABLE_MINIMAL_FLAG="--enable-minimal"
else
export LIBSODIUM_ENABLE_MINIMAL_FLAG=""
fi
if ! ./configure ${LIBSODIUM_ENABLE_MINIMAL_FLAG} \
--prefix="$PREFIX" \
--host=wasm32-wasi \
--disable-ssp --disable-shared --without-pthreads; then
cat config.log
exit 1
fi
NPROCESSORS=$(getconf NPROCESSORS_ONLN 2>/dev/null || getconf _NPROCESSORS_ONLN 2>/dev/null)
PROCESSORS=${NPROCESSORS:-3}
if [ -z "$BENCHMARKS" ]; then
make -j${PROCESSORS} check && make install && make distclean >/dev/null
else
make -j${PROCESSORS} && make check
fi