Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

emscripten miniscript.js errors with fix #29

Open
Kelbie opened this issue Nov 21, 2019 · 0 comments
Open

emscripten miniscript.js errors with fix #29

Kelbie opened this issue Nov 21, 2019 · 0 comments

Comments

@Kelbie
Copy link

Kelbie commented Nov 21, 2019

OS: Macos

So I was trying to build the miniscript.js using emscripten which didn't work initially and gave an error of TypeError: Module.asm.S is undefined. I landed on this issue which fixed my problem, basically you just need to alter the Makefile to:

miniscript.js: $(HEADERS) $(SOURCES) js_bindings.cpp
    em++ -O3 -g0 -Wall -std=c++11 -fno-rtti -flto -Ibitcoin $(SOURCES) js_bindings.cpp -s WASM=1 -s FILESYSTEM=0 -s ENVIRONMENT=web -s DISABLE_EXCEPTION_CATCHING=0 -s EXPORTED_FUNCTIONS='["_miniscript_compile","_miniscript_analyze","_malloc","_free"]' -s EXTRA_EXPORTED_RUNTIME_METHODS='["cwrap","UTF8ToString"]' -o miniscript.js -s WASM=0 --memory-init-file 0

Note the -s WASM=0 --memory-init-file 0 at the end.

I don't fully understand what this does so I didn't feel comfortable putting it into a pull request but thought it should be reported on but I would gladly turn this into a pull request if you sign off on it so let me know what you think.

@Kelbie Kelbie changed the title emscripting miniscript.js errors with fix emscripten miniscript.js errors with fix Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant