Lovell Fuller a8f68ba7f0
Add infrastructure to build and publish as wasm32 (#3840)
Co-authored-by: Ingvar Stepanyan <me@rreverser.com>
2023-11-09 14:46:07 +00:00

20 lines
478 B
JavaScript

// Copyright 2013 Lovell Fuller and others.
// SPDX-License-Identifier: Apache-2.0
/* global Module, ENV, _vips_shutdown, _uv_library_shutdown */
Module.preRun = () => {
ENV.VIPS_CONCURRENCY = Number(process.env.VIPS_CONCURRENCY) || 1;
};
Module.onRuntimeInitialized = () => {
module.exports = Module.emnapiInit({
context: require('@emnapi/runtime').getDefaultContext()
});
process.once('exit', () => {
_vips_shutdown();
_uv_library_shutdown();
});
};