libCEED icon indicating copy to clipboard operation
libCEED copied to clipboard

emscripten build

Open jedbrown opened this issue 3 years ago • 0 comments

I can build and run the pure libceed examples, which means we could embed them in a static web page that would run simulations in the user's browser.

This now builds cleanly:

$ emmake make STATIC=1 OPT=-O build/ex2-surface.wasm
[...]
$ wasmer run build/ex2-surface.wasm -- -s 32767
[...]
Exact mesh surface area    :  6
Computed mesh surface area :  5.9548265118955
Surface area error         : -0.04517348810445

Increasing the size causes calloc to fail, likely to do some default memory limits that I haven't worked out yet.

Emscripten docs: https://emscripten.org/docs/compiling/Building-Projects.html#building-projects

jedbrown avatar Aug 12 '22 13:08 jedbrown