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

Fix jq main options: reset in main #27

Merged
merged 2 commits into from
Jul 9, 2023

Conversation

yurenchen000
Copy link
Collaborator

the jq/src/main.c
has a global variable options, which can't be reset at js.

so I add a main.patch for options reset

#15

@fiatjaf
Copy link
Owner

fiatjaf commented Jul 9, 2023

I don't get it, why do you want to reset it? Does this break anything?

@yurenchen000
Copy link
Collaborator Author

sorry for late response,
I explain it here:

#15 (comment)
#15 (comment)

@fiatjaf
Copy link
Owner

fiatjaf commented Jul 9, 2023

I don't know how to compile this to wasm anymore, the emscripten interface has changed too much.

If you know how to and want to help me, please tell me what I must do, or maybe you can setup a script to build these things and push them to npm.

@yurenchen000
Copy link
Collaborator Author

yurenchen000 commented Jul 9, 2023

LMAO, I just follow your README.md to build it
https://github.com/fiatjaf/jq-web#build

I don't known how to upload npm, I just say what steps I compile it (same as README):

I'm on ubuntu18, ubuntu22.
// apt install libtool autoconf
// need python: ln -s /bin/python3 /usr/local/bin/python

install emsdk

git clone https://github.com/emscripten-core/emsdk.git
cd emsdk

./emsdk install 1.38.45
./emsdk activate 1.38.45
cd ..

compile jq-web

git clone [email protected]:fiatjaf/jq-web.git
cd jq-web

source ../emsdk/emsdk_env.sh
make

then got jq.* things:

jq.asm.bundle.js
jq.asm.bundle.min.js
jq.asm.js
jq.asm.js.mem
jq.asm.min.js
jq.wasm.js
jq.wasm.min.js
jq.wasm.wasm

access index.html (via web server) can try it.

@yurenchen000 yurenchen000 changed the title fix jq main options: reset in main Fix jq main options: reset in main Jul 9, 2023
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

Successfully merging this pull request may close these issues.

2 participants