binaryen icon indicating copy to clipboard operation
binaryen copied to clipboard

[emscripten] Drop `-sWASM=0` variant build

Open sbc100 opened this issue 2 months ago • 1 comments

There is now just one emscripten target called binaryen_js. The settings for these two targets were almost identical except for.

  1. Some JS_OF_OCAML specific stuff which is kept for the new unified target.
  2. -sASSERTIONS was being forced (See #2507). I dropped this in favor of doing a debug build in testing where this is enabled by default.

sbc100 avatar Oct 24 '25 23:10 sbc100

It looks like that JS_OF_OCAML stuff was added back in #4637

@phated are you guys limited to -sWASM=0 in some fundamental way? i.e. is dropping the pure JS build going to be a pain for you?

sbc100 avatar Oct 25 '25 00:10 sbc100

It looks like that JS_OF_OCAML stuff was added back in #4637

@phated are you guys limited to -sWASM=0 in some fundamental way? i.e. is dropping the pure JS build going to be a pain for you?

The requirement for ES5 for JS_OF_OCAML was dropped a little bit ago; we have just been slow to upgrade libbinaryen. I've been playing around with trying to drop both the es5 and JS-only requirements on libbinaryen, mostly with success, though a tiny bit more work to do.

spotandjake avatar Dec 13 '25 17:12 spotandjake

It looks like that JS_OF_OCAML stuff was added back in #4637 @phated are you guys limited to -sWASM=0 in some fundamental way? i.e. is dropping the pure JS build going to be a pain for you?

The requirement for ES5 for JS_OF_OCAML was dropped a little bit ago; we have just been slow to upgrade libbinaryen. I've been playing around with trying to drop both the es5 and JS-only requirements on libbinaryen, mostly with success, though a tiny bit more work to do.

It would be really nice if we could drop JS_OF_OCAML completely from the CMakeLists file at some point. Are you close to being able to use the defaults?

sbc100 avatar Dec 16 '25 00:12 sbc100

It looks like that JS_OF_OCAML stuff was added back in #4637 @phated are you guys limited to -sWASM=0 in some fundamental way? i.e. is dropping the pure JS build going to be a pain for you?

The requirement for ES5 for JS_OF_OCAML was dropped a little bit ago; we have just been slow to upgrade libbinaryen. I've been playing around with trying to drop both the es5 and JS-only requirements on libbinaryen, mostly with success, though a tiny bit more work to do.

It would be really nice if we could drop JS_OF_OCAML completely from the CMakeLists file at some point. Are you close to being able to use the defaults?

We will still need the jsoo export wrapper even after getting the default build settings to work. I was getting somewhere with the defaults, though it seemed like a bit more work was required before we could use them just yet. (hoping to have time over the next month to allocate towards figuring things out).

spotandjake avatar Dec 16 '25 02:12 spotandjake

We will still need the jsoo export wrapper

Can you explain what this is? Are you referring to binaryen.jsoo-extern-pre.js or something else?

binaryen.jsoo-extern-pre.js in particular looks like it should be easy enough to inject from outside of the binaryen project?

sbc100 avatar Dec 16 '25 02:12 sbc100