From f32760600e089378f751ccef63f7cf7d16fcb287 Mon Sep 17 00:00:00 2001 From: Rich Geldreich Date: Thu, 22 Jan 2026 18:15:52 -0500 Subject: [PATCH] Update README with WASM executable instructions Added instructions for running precompiled WASM WASI executables and provided examples for usage. --- README.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/README.md b/README.md index 35df577..28db4cc 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,29 @@ The system now supports loading basic 2D .DDS files with optional mipmaps, but t ---- +Running the Precompiled WASM WASI Executables +--------------------------------------------- + +There are precompiled, cross platform .WASM WASI executables checked into the `bin` directory: `basisu_mt.wasm` (multithreaded) and `basisu_st.wasm` (single threaded). See the `runwt.sh`, `runwt.bat`, `runw.sh`, or `runw.bat` scripts for examples on how to run the WASM executables using [wasmtime](https://wasmtime.dev/). + +Here's `runwt.bat`: + +``` +wasmtime --wasm threads=yes --wasi threads=yes --dir=. --dir=.. --dir=..\test_files basisu_mt.wasm %* +``` + +Example for XUASTC LDR compression using the arithmetic profile, with Weight Grid DCT level 70: + +``` +cd bin +runwt.bat test_images/xmen.png -xuastc_ldr_6x6 -quality 70 -xuastc_arith +runwt.bat xmen.ktx2 +``` + +The [wasmer](https://wasmer.io/) runtime should work too, but we haven't tested it yet. + +---- + Building (Native) -----------------