Skip to content
Discussion options

You must be logged in to vote

I've been playing around with compiling QuickJS-NG to WASM. I commented a bunch of lines in qjs.c so that when executed qjs (qjs-wasi.wasm from release.yml)

cmake -B build -DCMAKE_TOOLCHAIN_FILE=/opt/wasi-sdk/share/cmake/wasi-sdk.cmake -DQJS_BUILD_WERROR=ON
make -C build qjs_exe
mv build/qjs build/qjs-wasi.wasm

evaluates the JavaScript embedded in qjs.c. After wasm-opt I get the resulting WASM down to around 969.1 KiB. Right now I'm jus using bun build --minify on the JavaScript I intend to embed and copy/pasting that code in qjs.c.

Now I have two questions:

  1. Besides the lines commented out in

Replies: 3 comments 30 replies

Comment options

You must be logged in to vote
1 reply
@guest271314
Comment options

Comment options

You must be logged in to vote
7 replies
@guest271314
Comment options

@saghul
Comment options

@guest271314
Comment options

@guest271314
Comment options

@saghul
Comment options

Answer selected by guest271314
Comment options

You must be logged in to vote
22 replies
@guest271314
Comment options

@guest271314
Comment options

@guest271314
Comment options

@guest271314
Comment options

@guest271314
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants