onnxruntime
56 строк · 1.5 Кб
1// Copyright (c) Microsoft Corporation. All rights reserved.
2// Licensed under the MIT License.
3
4/* eslint-disable @typescript-eslint/naming-convention */
5
6/**
7* The interface BuildDefinitions contains a set of flags which are defined at build time.
8*
9* Those flags are processed in bundler for tree shaking to remove unused code.
10* No flags in this file should present in production build.
11*/
12interface BuildDefinitions {13// #region Build definitions for Tree Shaking14
15/**16* defines whether to disable the whole WebGL backend in the build.
17*/
18readonly DISABLE_WEBGL: boolean;19/**20* defines whether to disable the whole WebGpu/WebNN backend in the build.
21*/
22readonly DISABLE_JSEP: boolean;23/**24* defines whether to disable the whole WebNN backend in the build.
25*/
26readonly DISABLE_WASM: boolean;27/**28* defines whether to disable proxy feature in WebAssembly backend in the build.
29*/
30readonly DISABLE_WASM_PROXY: boolean;31/**32* defines whether to disable training APIs in WebAssembly backend.
33*/
34readonly DISABLE_TRAINING: boolean;35/**36* defines whether to disable dynamic importing WASM module in the build.
37*/
38readonly DISABLE_DYNAMIC_IMPORT: boolean;39
40// #endregion41
42// #region Build definitions for ESM43
44/**45* defines whether the build is ESM.
46*/
47readonly IS_ESM: boolean;48/**49* placeholder for the import.meta.url in ESM. in CJS, this is undefined.
50*/
51readonly ESM_IMPORT_META_URL: string|undefined;52
53// #endregion54}
55
56declare const BUILD_DEFS: BuildDefinitions;57