8000 emscripten miniscript.js errors with fix · Issue #29 · sipa/miniscript · GitHub
[go: up one dir, main page]

Skip to content

emscripten miniscript.js errors with fix #29

Open

Description

@Kelbie

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.

Activity

  1. changed the title [-]emscripting miniscript.js errors with fix[/-] [+]emscripten miniscript.js errors with fix[/+] on Nov 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0