Fix WASI build.

This commit is contained in:
Syoyo Fujita
2024-01-29 07:54:49 +09:00
parent 61fb006049
commit 62c89a1590
2 changed files with 8 additions and 3 deletions

View File

@@ -71,8 +71,8 @@ set(TINYUSDZ_DEP_SOURCES
#../../src/external/string_id/string_id.cpp
#../../src/external/string_id/error.cpp
#../../src/external/string_id/database.cpp
../../src/external/staticstruct.cc
../../src/external/tinyxml2/tinyxml2.cpp
#../../src/external/staticstruct.cc
#../../src/external/tinyxml2/tinyxml2.cpp
)
#../../src/external/ryu/ryu/s2d.c
#../../src/external/ryu/ryu/s2f.c)

View File

@@ -17,7 +17,7 @@ $ make
### Binary size
Currently is less than 4MB when compiled with `-DCMAKE_BUILD_TYPE=MinSizeRel` (650 KB when gzip compressed).
Currently it is less than 4MB when compiled with `-DCMAKE_BUILD_TYPE=MinSizeRel` (650 KB when gzip compressed).
## Run
@@ -33,3 +33,8 @@ Install `wasmtime`, then copy example USD file to `build` folder(where `tinyusdz
$ cp ../../../models/cube-previewsurface.usda .
$ wasmtime --dir=. tinyusdz_wasi cube-previewsurface.usda
```
## TODO
* [ ] Unify CMakeList.txt with <tinyusdz>/CMakelist.txt
* [ ] Write WASI specific AssetResolution/FileSystemHandler example.