@pumpkin-plugins/build API / wasi-wit / ensureWasiWit
Function: ensureWasiWit()
ensureWasiWit(
options):Promise<string>
Defined in: tools/build/src/wasi-wit.ts:150
Makes the WASI WIT files available locally. Files already cached with the right hash are kept; missing or damaged upstream files are downloaded and generated files are materialized from the lock. Every file is checked against its hash before it is written and published with a rename, so concurrent builds never see a partial file. Nothing is downloaded when the cache is complete.
Parameters
options
Cache location and optional lock contents or downloader.
Returns
Promise<string>
The folder holding <package>/<interface>.wit.
Throws
When the lock is invalid, a file can't be downloaded, or content doesn't match its pinned hash.