Skip to content
New issue

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

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

Already on GitHub? # to your account

feat: make emscripten works #248

Merged
merged 1 commit into from
Mar 6, 2024
Merged

Conversation

henrydf
Copy link
Contributor

@henrydf henrydf commented Jan 18, 2024

sometings changed in emscripten v3.x
let it works.

@saghul
Copy link
Contributor

saghul commented Jan 18, 2024

Thank you!

@saghul
Copy link
Contributor

saghul commented Jan 18, 2024

 total 76K
-rw-r--r--  1 runner docker  17K Jan 18 12:00 CMakeCache.txt
drwxr-xr-x 13 runner docker 4.0K Jan 18 12:00 CMakeFiles
-rw-r--r--  1 runner docker  21K Jan 18 12:00 Makefile
-rw-r--r--  1 runner docker 4.5K Jan 18 12:00 cmake_install.cmake
-rw-r--r--  1 runner docker  13K Jan 18 12:00 qjs_wasm.js
-rwxr-xr-x  1 runner docker  133 Jan 18 12:00 qjs_wasm.wasm

Idn't the output size way too small?

@henrydf
Copy link
Contributor Author

henrydf commented Jan 19, 2024

It is a runtime exception. you can repoduce issues by simple run "console.log(123)".

$ emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.51 (c0c2ca1314672a25699846b4663701bcb6f69cca)
clang version 18.0.0git (https://github.com/llvm/llvm-project f2464ca317bfeeedddb7cbdea3c2c8ec487890bb)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/henry/demo/emsdk/upstream/bin

@henrydf
Copy link
Contributor Author

henrydf commented Jan 19, 2024

maybe my comments are confused. i am sorry for that.
the default stack memory size are 16kB in emscripten v3.
that will cause a stack overflow in runtime before any application code runs.

@saghul
Copy link
Contributor

saghul commented Jan 19, 2024

That was after your change. Do you think anything is missing?

We don't need a comprehensive build, there is quickjs-emacripten for that, we just want to make sure it builds.

@henrydf
Copy link
Contributor Author

henrydf commented Jan 20, 2024

yes, it builds. but could not run directly.
i think this is worse than it can not build. because the users of quickjs maybe only know how to write js code.

@henrydf
Copy link
Contributor Author

henrydf commented Mar 4, 2024

@saghul how to trigger another rebuild? only one check is failled because network issue.

@saghul
Copy link
Contributor

saghul commented Mar 4, 2024

Weird, the option to retry is missing. Can you please rebase and force-push? That will trigger a rebuild.

@henrydf henrydf force-pushed the feature/emscpriten3 branch from 253c27b to 55f0bf6 Compare March 6, 2024 05:11
@henrydf
Copy link
Contributor Author

henrydf commented Mar 6, 2024

It seems done.

@saghul saghul merged commit 4d6c981 into quickjs-ng:master Mar 6, 2024
35 checks passed
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants