Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
4 changes: 2 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,12 @@ build_wally_release_files:
- mv release wallycore-android-jni
- tar czf wally_dist/wallycore-android-jni.tar.gz --remove-files wallycore-android-jni
- source /opt/emsdk/emsdk_env.sh
- EMCC_OPTIONS="-s EXPORT_ES6=1 -s MODULARIZE=1" tools/build_wasm.sh
- tools/build_wasm.sh
- cp contrib/wally_js_example.html dist/wallycore.html
- cd dist
- tar czf ../wally_dist/wallycore-wasm.tar.gz --remove-files wallycore.html wallycore.js wallycore.wasm
- cd ..
- EMCC_OPTIONS="-s MODULARIZE=1" EXPORTED_FUNCTIONS="['_malloc','_free','_wally_init','_wally_asset_value_commitment','_wally_asset_generator_from_bytes']" tools/build_wasm.sh
- EMCC_OPTIONS="-s MODULARIZE=1 -s EXPORT_NAME=InitWally" EXPORTED_FUNCTIONS="['_malloc','_free','_wally_init','_wally_asset_value_commitment','_wally_asset_generator_from_bytes']" tools/build_wasm.sh
- cd dist
- tar czf ../wally_dist/esplora-wasm.tar.gz --remove-files wallycore.js wallycore.wasm
- cd ..
Expand Down
4 changes: 1 addition & 3 deletions src/ccan/ccan/str/hex/hex.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@ static char hexchar(unsigned int val)
{
if (val < 10)
return '0' + val;
if (val < 16)
return 'a' + val - 10;
abort();
return 'a' + val - 10;
}

bool hex_encode(const void *buf, size_t bufsize, char *dest, size_t destsize)
Expand Down
2 changes: 1 addition & 1 deletion src/wasm_package/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -xeo pipefail

# Build WASM (Note Elements is always enabled)
(cd ../.. && EMCC_OPTIONS="-s EXPORT_ES6=1 -s MODULARIZE=1" ./tools/build_wasm.sh)
(cd ../.. && ./tools/build_wasm.sh)
mkdir -p libwally_wasm && cp ../../dist/wallycore.{js,wasm} libwally_wasm/
touch libwally_wasm/index # necessary for webpack to work (fixes "Can't resolve './' in 'wasm_package/libwally_wasm'")

Expand Down
2 changes: 1 addition & 1 deletion tools/build_wasm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export CFLAGS="-fno-stack-protector"
emconfigure ./configure --build=$HOST_OS ac_cv_c_bigendian=no --disable-swig-python --disable-swig-java $DISABLE_ELEMENTS --disable-tests --enable-export-all --enable-wasm-interface
emmake make -j $num_jobs

EMCC_OPTIONS="$EMCC_OPTIONS -s EXPORT_NAME=InitWally -s WASM_BIGINT"
: ${EMCC_OPTIONS:="-s EXPORT_ES6=1 -s WASM_BIGINT"}
: ${OPTIMIZATION_LEVEL:=3}
: ${EXPORTED_RUNTIME_METHODS:='cwrap,ccall,getValue,UTF8ToString'}
# Get the list of functions to export
Expand Down
Loading