Re:LibBF – a small library to handle arbitrary precision flo...
by hint23 on Wednesday March 07, 2018 @07:38AM
(#16535949)
You can already try LibBF online at http://numcalc.com
Re:LibBF – a small library to handle arbitrary precision flo...
by kodablah on Tuesday March 06, 2018 @04:45PM
(#16532373)
Looking at the code this should be quite simple since libc is the only dep. You can Emscripten at first to be easy, but to wrap it up as a JS lib, you can probably implement the libc calls yourself easily and remove the Emscripten dep. The author even broke off bf_realloc to put your own alloc impl (which can be written in WASM, but I suggest writing it in C before the compilation).
Re:LibBF – a small library to handle arbitrary precision flo...
by slartibardfast0 on Tuesday March 06, 2018 @05:09PM
(#16532533)
cheers, sadly I won't be exploring JS lib wrapper approach.
we're already deep down the EMSCRIPTEN_BINDINGS() rabbit-hole :)
originally, the fixed size heap (/w optimisations) meant unbound use from a JS lib was too hard to reason about; hence avoided entirely in favour of a emscripten blackbox.
Looking forward to benchmarking this in a wasm context.