UNPKG

itk-wasm

Version:

High-performance spatial analysis in a web browser, Node.js, and reproducible execution across programming languages and hardware architectures.

35 lines (30 loc) 1.26 kB
/* eslint-disable @typescript-eslint/triple-slash-reference */ /// <reference types="emscripten" /> // import { cwrap, ccall } from '@types/emscripten' /* eslint-enable @typescript-eslint/triple-slash-reference */ import EmscriptenModule from './itk-wasm-emscripten-module.js' interface PipelineEmscriptenModule extends EmscriptenModule { callMain: (args: string[]) => number // var c_javascript_add = Module.cwrap('c_add', // name of C function // 'number', // return type // ['number', 'number']); // argument types cwrap: typeof cwrap ccall: typeof ccall lengthBytesUTF8: typeof lengthBytesUTF8 writeArrayToMemory: typeof writeArrayToMemory stringToUTF8: typeof stringToUTF8 UTF8ToString: (ptr: number) => string stackSave: () => number stackRestore: (ptr: number) => void resetModuleStdout: () => void resetModuleStderr: () => void getModuleStdout: () => string getModuleStderr: () => string print: (text: string) => void printErr: (text: string) => void // Note: Only available if the module was built with CMAKE_BUILD_TYPE set to // Debug. For example: // itk-wasm-cli build my/project -- -DCMAKE_BUILD_TYPE:STRING=Debug getExceptionMessage: (num: number) => string } export default PipelineEmscriptenModule