1# call this script manually to regen bindings from a new version of libsodium
2# make sure that you have up-to-date bindgen (at least 0.48.0 to avoid problems with alignments)
3
4# a whitelist regex to generate entities
5REGEX="(SODIUM|sodium|crypto|randombytes)_.*"
6
7bindgen ../libsodium/src/libsodium/include/sodium.h -o sodium_bindings.rs \
8  --ctypes-prefix=libc --use-core \
9  --generate=functions,types,vars \
10  --no-layout-tests \
11  --whitelist-function=$REGEX \
12  --whitelist-type=$REGEX \
13  --whitelist-var=$REGEX
14