botan icon indicating copy to clipboard operation
botan copied to clipboard

Feature request: using WASM exceptions.

Open Trafo opened this issue 2 years ago • 2 comments

At the moment Botan is not using the WASM exceptions:

lang_flags "-s DISABLE_EXCEPTION_CATCHING=0 -std=c++20 -D_REENTRANT"
lang_binary_linker_flags "-s ALLOW_MEMORY_GROWTH=1 -s WASM=1 -s NO_DISABLE_EXCEPTION_CATCHING"

(in src/build-data/cc/emcc.txt) Can we make it configurable or directly switch to use WASM exceptions, which are from my point of view, much better?:

lang_flags "-fwasm-exceptions -std=c++20 -D_REENTRANT"
lang_binary_linker_flags "-s ALLOW_MEMORY_GROWTH=1 -s WASM=1 -fwasm-exceptions"

Trafo avatar Oct 26 '23 07:10 Trafo

@reneme it looks like you added the Emscripten build; wdyt?

randombit avatar Oct 26 '23 12:10 randombit

The patch you propose looks reasonable to me. Please feel free to create a pull request for that, @Trafo.

reneme avatar Oct 26 '23 17:10 reneme