25 lines
474 B
C++
25 lines
474 B
C++
#include "common/node.h"
|
|
#include "mnn/node.h"
|
|
#include "ort/node.h"
|
|
|
|
using namespace Napi;
|
|
|
|
#if defined(BUILD_MAIN_WORD)
|
|
Object Init(Env env, Object exports)
|
|
{
|
|
#ifdef RELEASE_VERSION
|
|
exports.Set("__release__", Napi::String::New(env, RELEASE_VERSION));
|
|
#endif
|
|
// OnnxRuntime
|
|
#ifdef USE_ONNXRUNTIME
|
|
InstallOrtAPI(env, exports);
|
|
#endif
|
|
// MNN
|
|
#ifdef USE_MNN
|
|
InstallMNNAPI(env, exports);
|
|
#endif
|
|
|
|
return exports;
|
|
}
|
|
NODE_API_MODULE(addon, Init)
|
|
#endif |