Fries
f7bbb92d85
the api now requires you to call an async function initWasm to make the functions work instead of using top level await. i also optimized the wasm module to have O3 and fast-math (which the original blurhash makefile had and the results do seem to be the same with the javascript blurhash). I also gave the wasm instance functions inside typescript types and i fixed a bug where i didnt free the pointers in order so if you called decode too many times, you will run out of memory.
7 lines
254 B
Makefile
7 lines
254 B
Makefile
LIBRARY=src/blurhash-decode.wasm
|
|
$(LIBRARY): blurhash/decode.c
|
|
emcc -ffast-math -O3 --no-entry -Wl,--export,decodeToArray -Wl,--export,malloc -Wl,--export,free -Wl,--export,isValidBlurhash -o $@ blurhash/decode.c
|
|
|
|
.PHONY: clean
|
|
clean:
|
|
rm -f $(LIBRARY)
|