arkcompiler_jsvm:基于 OpenHarmony 的 JS 虚拟机接口项目

可用于在OpenHarmony应用中动态执行JS代码,实现JS与C/C++高效交互。该项目是OpenHarmony JSVM-API组件,基于标准JS引擎提供C99接口,支持引擎创建销毁、JS代码执行及JS/C++双向调用,适用于对性能和底层系统调用有较高要求的场景。【此简介由AI生成】

Branch123Tags9
FilesLast commitLast update
5 months ago
4 months ago
1 year ago
17 days ago
17 days ago
1 year ago
1 month ago
1 month ago
1 year ago
1 year ago
1 year ago
1 year ago
5 months ago
5 months ago
1 month ago
1 year ago
1 year ago
5 months ago
1 year ago
5 months ago

arkcompiler_jsvm

Description

OpenHarmony JSVM-API provides a set of stable APIs based on the standard JavaScript (JS) engine. It provides complete JS engine capabilities, including creating and destroying a JS engine, executing JS code, and implementing interaction between JS and C/C++ modules.

OpenHarmony JSVM-API provides a set of APIs written in C programming language that complies with C99.

JSVM-API allows dynamically loaded JS code segment to be directly run during application runtime. With JSVM-API, you can also use C/C++ to implement core functionalities that demand high performance or closely rely on underlying system invocation, register C++ methods in JS code, and directly call the JS code to improve the execution speed.

Directory Structure

/arkcompiler/jsvm
├── interfaces
│ ├── innerkits             # interface used in system component
│ └── kits                  # interface provided to app developer
├── src                     # jsvm source code
│ ├── inspector             # source code about inspector
│ └── platform              # source code related to platform
├── test                    # jsvm test suit
├── BUILD.gn                # jsvm compile script
├── jsvm.gni                # jsvm compile script
└── bundle.json             # jsvm config file

Installation

  1. compile command
./build.sh --product-name rk3568 --build-target make_all --target-cpu arm64 --gn-args enable_notice_collection=false --keep-ninja-going

Instructions

Using JSVM-API

Contribution

  1. Fork the repository
  2. Create Feat_xxx branch
  3. Commit your code
  4. Create Pull Request

Introduction

可用于在OpenHarmony应用中动态执行JS代码,实现JS与C/C++高效交互。该项目是OpenHarmony JSVM-API组件,基于标准JS引擎提供C99接口,支持引擎创建销毁、JS代码执行及JS/C++双向调用,适用于对性能和底层系统调用有较高要求的场景。【此简介由AI生成】

Customize your domain