WebAssembly / WebAssembly/binaryen

Is it possible avoid c++ exeptions?

Open
#2,917 33 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
WebAssembly
Stars
8.6k
Forks
885
Avg merge
1d 19h
Merged PRs (30d)
69

Description

I mean build binaryen with emscripten with "-fno-exceptions" for asmjs / wasm. But I guess other build targets without exceptions will be also benefits for it's size. As I know LLVM (but use noexcept hints) and GCC avoid exceptions at all and it's make sense especially for binaryen.js and binaryen.wasm.

So I'm wondering how hard refactor binaryen codebase for exclude exceptions or at least add noexcept hints if it's totally impossible.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by surveying Binaryen's C++ exception usage and the Emscripten build targets for asmjs and wasm. Determine whether removing exceptions or adding noexcept hints is feasible across the named build targets, then compare build and size results for binaryen.js and binaryen.wasm.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, wasm
Domain
compilers
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.