4 ms·
MIT license makes this great for WebAssembly! Looking forward to benchmarking this in a wasm context.
by slartibardfast0 9y ago
MIT license makes this great for WebAssembly!
Looking forward to benchmarking this in a wasm context.
- kodablah 9y agoLooking 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).
- slartibardfast0 9y agocheers, 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.
- GSGSGS 9y agoDo you have a link for this ?
- hint23 9y agoYou can already try LibBF online at http://numcalc.com http://numcalc.com