Skip to content

Conversation

@sbc100
Copy link
Member

@sbc100 sbc100 commented Jun 20, 2018

s2wasm is no longer used my emscripten and as far as I know now
as no other users.

@sbc100
Copy link
Member Author

sbc100 commented Jun 20, 2018

Probably worth holding off landing this for a week or two..

Copy link
Member

@kripken kripken left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

* **wasm-opt**: Loads WebAssembly and runs Binaryen IR passes on it.
* **asm2wasm**: An asm.js-to-WebAssembly compiler, using Emscripten's asm optimizer infrastructure. This is used by Emscripten in Binaryen mode when it uses Emscripten's fastcomp asm.js backend.
* **wasm2asm**: A WebAssembly-to-asm.js compiler (still experimental).
* **s2wasm**: A compiler from the `.s` format emitted by the new WebAssembly backend being developed in LLVM. This is used by Emscripten in Binaryen mode when it integrates with the new LLVM backend.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

while we update this list, maybe worth adding wasm-emscripten-finalize and wasm-link-metadata?

return false;
}

inline void exportFunction(Module& wasm, Name name, bool must_export) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why inline?

Copy link
Contributor

@jgravelle-google jgravelle-google left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Goodness that's nice

CI failure says there's still an S2WASM in shared.py. grep -ir s2wasm to see if there's any more?

@sbc100
Copy link
Member Author

sbc100 commented Jun 28, 2018

Also removed all the .s files!

s2wasm is no longer used my emscripten and as far as I know now
as no other users.
@sbc100 sbc100 merged commit 11047d8 into master Jun 29, 2018
@sbc100 sbc100 deleted the remove_s2wasm branch June 29, 2018 00:42
@BenHenning
Copy link

Is there a recommended alternative to s2wasm? I was using this for my own pipeline rather than using emscripten. Is there a new recommended build toolchian for folks who don't or can't depend on emscripten?

@jgravelle-google
Copy link
Contributor

Upstream LLVM + LLD, which is what emscripten is using now.
Which is to say, clang hello.c -o hello.wasm --target=wasm32 -nostdlib -Xlinker --no-entry -Xlinker --allow-undefined should just work

@Markyparky56
Copy link
Contributor

Don't mean to resurrect this issue or anything, but if you, like me, happen across this in a search to find a replacement to s2wasm then you'd better get familiar with wasm-ld. Check out wasm-ld --help.

The -Xlinker --no-entry and -Xlinker --allow-undefined switches are just the beginning, wasm-ld includes switches for --import-memory, --initial-memory=X and even has the facility for explicit (or blanket) symbol exporting. By default it is set to --no-export-dynamic which means no functions will be exported, which seems a little odd but at least now you no longer have to deal with it exporting all your C++ name-mangled functions beside your nice clean extern "C" functions.

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.

6 participants