WASI experiment.
Setup wasi-sdk https://github.com/WebAssembly/wasi-sdk
Edit WASI_VERSION and path to wasi-sdk in bootstrap-wasi.sh, then
$ ./bootstrap-wasi.sh
$ cd build
$ make
Currently it is less than 4MB when compiled with -DCMAKE_BUILD_TYPE=MinSizeRel (650 KB when gzip compressed).
Currently tested by running app with wasmtime.
https://github.com/bytecodealliance/wasmtime
https://github.com/bytecodealliance/wasmtime/blob/main/docs/WASI-tutorial.md
Install wasmtime, then copy example USD file to build folder(where tinyusdz_wasi is located. Otherwise add path using --dir option)
$ cp ../../../models/cube-previewsurface.usda .
$ wasmtime --dir=. tinyusdz_wasi cube-previewsurface.usda- Unify CMakeList.txt with /CMakelist.txt
- Write WASI specific AssetResolution/FileSystemHandler example.