Hacker News new | past | comments | ask | show | jobs | submit login

MIT license makes this great for WebAssembly!

Looking forward to benchmarking this in a wasm context.




You can already try LibBF online at http://numcalc.com


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).


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.


Do you have a link for this ?




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: