Skip to content

Commit

Permalink
Merge pull request #6 from bitcoinerlab/node-environment
Browse files Browse the repository at this point in the history
feat: Update bindings for compatibility with React Native's Metro Bun…
  • Loading branch information
landabaso authored Sep 13, 2023
2 parents 6d26e39 + 783b650 commit d420729
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
HEADERS := miniscript/bitcoin/util/vector.h miniscript/bitcoin/util/strencodings.h miniscript/bitcoin/span.h miniscript/bitcoin/util/spanparsing.h miniscript/bitcoin/script/script.h miniscript/bitcoin/script/miniscript.h miniscript/compiler.h miniscript/bitcoin/crypto/common.h miniscript/bitcoin/serialize.h miniscript/bitcoin/prevector.h miniscript/bitcoin/compat/endian.h miniscript/bitcoin/compat/byteswap.h miniscript/bitcoin/attributes.h miniscript/bitcoin/tinyformat.h miniscript/bitcoin/primitives/transaction.h
SOURCES := miniscript/bitcoin/util/strencodings.cpp miniscript/bitcoin/util/spanparsing.cpp miniscript/bitcoin/script/script.cpp miniscript/bitcoin/script/miniscript.cpp miniscript/compiler.cpp
src/bindings.js: miniscript $(HEADERS) $(SOURCES) miniscript/js_bindings.cpp
em++ -O3 -g0 -Wall -std=c++17 -fno-rtti -flto -Iminiscript/bitcoin $(SOURCES) miniscript/js_bindings.cpp -s WASM=0 -s EXPORT_ES6=1 --memory-init-file 0 -s MODULARIZE=1 -s MALLOC=emmalloc -s WASM_ASYNC_COMPILATION=0 -s FILESYSTEM=0 -s ENVIRONMENT=web -s DISABLE_EXCEPTION_CATCHING=0 -s EXPORTED_FUNCTIONS='["_miniscript_compile","_miniscript_analyze","_malloc","_free"]' -s EXPORTED_RUNTIME_METHODS='["cwrap","UTF8ToString"]' -o src/bindings.js
em++ -O3 -g0 -Wall -std=c++17 -fno-rtti -flto -Iminiscript/bitcoin $(SOURCES) miniscript/js_bindings.cpp -s WASM=0 -s EXPORT_ES6=0 --memory-init-file 0 -s MODULARIZE=1 -s MALLOC=emmalloc -s WASM_ASYNC_COMPILATION=0 -s FILESYSTEM=0 -s ENVIRONMENT=web -s DISABLE_EXCEPTION_CATCHING=0 -s EXPORTED_FUNCTIONS='["_miniscript_compile","_miniscript_analyze","_malloc","_free"]' -s EXPORTED_RUNTIME_METHODS='["cwrap","UTF8ToString"]' -o src/bindings.js
miniscript:
git clone https://github.com/sipa/miniscript
#484386a50dbda962669cc163f239fe16e101b6f0 is the last commit where this Makefile has been checked to work:
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@
"descriptors"
],
"homepage": "https://bitcoinerlab.com/modules/miniscript",
"version": "1.3.0",
"version": "1.4.0",
"description": "Bitcoin Miniscript, a high-level language for describing Bitcoin spending conditions. It includes a Policy and Miniscript compiler, as well as a novel Satisfier for generating expressive witness scripts.",
"main": "dist/index.js",
"types": "types/index.d.ts",
"scripts": {
"build": "rollup -c --bundleConfigAsCjs",
"build:prod": "NODE_ENV=production rollup -c --bundleConfigAsCjs",
"prepublishOnly": "npm run build:prod && make clean && make && npm test",
"prepublishOnly": "make clean && make && npm run build:prod && npm test",
"test": "jest",
"example": "node ./example.js",
"docs": "typedoc --options ./node_modules/@bitcoinerlab/configs/js_typedoc.json",
Expand Down

0 comments on commit d420729

Please sign in to comment.