Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch from Emscripten to clang+WASI SDK for building decoder
To make it easier to build gltfpack as a library, we're going to switch to clang and WASI SDK for building Wasm code in this codebase. This change starts the process by converting meshopt_decoder.js to this. Since WASI SDK doesn't provide a small enough memcpy/memset by default, or a version of sbrk() that actually works with byte aligned allocations, we provide our own versions for now to keep the size minimal. As a result, the cumulative size of .js.gz actually decreases by 337 bytes. To build the decoder, you now need to specify paths to clang-11 (unless clang is clang-11 on the target system) and WASI SDK: make WASMCC=clang-11 WASI_SDK=../wasi js/meshopt_decoder.js
- Loading branch information