• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2 * Copyright (c) 2021-2022 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16let penv = process.env;
17globalThis.etsVm = require(penv.MODULE_PATH + "/ets_interop_js_napi.node");
18
19const etsVmRes = globalThis.etsVm.createRuntime({
20    "log-level": "error",
21    "log-components": "ets_interop_js",
22    "boot-panda-files": penv.ARK_ETS_STDLIB_PATH + ":" + penv.ARK_ETS_INTEROP_JS_GTEST_ABC_PATH,
23    "panda-files": penv.ARK_ETS_INTEROP_JS_GTEST_ABC_PATH,
24    "gc-trigger-type": "heap-trigger",
25    "compiler-enable-jit": "false",
26    "run-gc-in-place": "true",
27});
28
29if (!etsVmRes) {
30    console.error(`Failed to create ETS runtime`);
31    return 1;
32}
33
34require('./demo');
35