Package base for C/C++ based projects.
-
Download the latest release of wasi-sdk for your platform, and install it somewhere.
-
Find the absolute path to the wasi-sdk root folder (it should contain
bin/
,lib/
andshare/
subfolders) and set the npm config itemwasi_sdk_root
to this path, i.e.:npm config set wasi_sdk_root <path>
- Add this package as a dev dependency.
- Create a
prepublishOnly
scriptwasmatazz-c path/to/c/*.c
wherepath/to/c/*.c
is replaced with one or more paths to C files to compile.