Hacker News new | ask | show | jobs
by david2ndaccount 1162 days ago
For snprintf I use stb sprintf [1]. For the reasonable functions from string.h (memset, memcpy, memmove), you can just use compiler builtins (__builtin_memset, etc.) as long as you enable the bulk memory extension (-mbulk-memory). I haven’t needed much of math.h for the stuff I’ve made, when I have I just called stuff on the `Math` object in javascript.

[1] https://github.com/nothings/stb/blob/master/stb_sprintf.h