| Name | Date | Size | #Lines | LOC | ||
|---|---|---|---|---|---|---|
| .. | - | - | ||||
| interface/kits/ | 22-Oct-2025 | - | 4,217 | 811 | ||
| patches/ | 22-Oct-2025 | - | 10 | 9 | ||
| src/ | 22-Oct-2025 | - | 14,049 | 10,971 | ||
| test/unittest/ | 22-Oct-2025 | - | 2,372 | 1,980 | ||
| .clang-format | D | 22-Oct-2025 | 3 KiB | 107 | 106 | |
| BUILD.gn | D | 22-Oct-2025 | 4.3 KiB | 186 | 165 | |
| CMakeLists.txt | D | 22-Oct-2025 | 2.7 KiB | 137 | 122 | |
| CODEOWNEWRS | D | 22-Oct-2025 | 630 | 18 | 16 | |
| LICENSE | D | 22-Oct-2025 | 9.9 KiB | 177 | 150 | |
| README.en.md | D | 22-Oct-2025 | 1.8 KiB | 45 | 31 | |
| README.md | D | 22-Oct-2025 | 1.6 KiB | 44 | 31 | |
| build_jsvm.sh | D | 22-Oct-2025 | 3.8 KiB | 144 | 118 | |
| build_jsvm_inter.sh | D | 22-Oct-2025 | 6.9 KiB | 207 | 164 | |
| bundle.json | D | 22-Oct-2025 | 1.6 KiB | 62 | 61 | |
| copy_llhttp.sh | D | 22-Oct-2025 | 879 | 20 | 4 | |
| copy_v8.sh | D | 22-Oct-2025 | 805 | 21 | 5 | |
| jit_enable_list_appid.conf | D | 22-Oct-2025 | 0 | 1 | 0 | |
| jsvm.gni | D | 22-Oct-2025 | 1.1 KiB | 36 | 31 |
README.en.md
1# arkcompiler_jsvm 2 3#### Description 4OpenHarmony 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. 5 6OpenHarmony JSVM-API provides a set of APIs written in C programming language that complies with C99. 7 8JSVM-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. 9 10#### Directory Structure 11 12``` 13/arkcompiler/jsvm 14├── interfaces 15│ ├── innerkits # interface used in system component 16│ └── kits # interface provided to app developer 17├── src # jsvm source code 18│ ├── inspector # source code about inspector 19│ └── platform # source code related to platform 20├── test # jsvm test suit 21├── BUILD.gn # jsvm compile script 22├── jsvm.gni # jsvm compile script 23└── bundle.json # jsvm config file 24``` 25 26#### Installation 27 281. compile command 29 30``` 31./build.sh --product-name rk3568 --build-target make_all --target-cpu arm64 --gn-args enable_notice_collection=false --keep-ninja-going 32``` 33 34#### Instructions 35 36[Using JSVM-API](https://gitee.com/openharmony/docs/tree/master/zh-cn/application-dev/napi/Readme-CN.md) 37 38#### Contribution 39 401. Fork the repository 412. Create Feat_xxx branch 423. Commit your code 434. Create Pull Request 44 45
README.md
1# arkcompiler_jsvm 2 3## 介绍 4OpenHarmony JSVM-API是基于标准JS引擎提供的一套稳定的API,为开发者提供了较为完整的JS引擎能力,包括创建和销毁引擎,执行JS代码,JS/C++交互等关键能力。 5 6OpenHarmony JSVM-API是C语言接口,遵循C99标准。 7 8通过JSVM-API,开发者可以在应用运行期间直接执行一段动态加载的JS代码。也可以选择将一些对性能、底层系统调用有较高要求的核心功能用C/C++实现并将C++方法注册到JS侧,在JS代码中直接调用,提高应用的执行效率。 9 10## 目录结构 11``` 12/arkcompiler/jsvm 13├── interfaces 14│ ├── innerkits # 系统内接口,部件间使用 15│ └── kits # 应用接口,应用开发者使用 16├── src # jsvm 代码 17│ ├── inspector # inspector 功能实现 18│ └── platform # 平台相关代码 19├── test # jsvm 测试套 20├── BUILD.gn # 部件编译脚本 21├── jsvm.gni # jsvm 源文件定义脚本 22└── bundle.json # 部件配置文件 23``` 24 25## 安装教程 26 271. 编译命令 28 29``` 30./build.sh --product-name rk3568 --build-target make_all --target-cpu arm64 --gn-args enable_notice_collection=false --keep-ninja-going 31``` 32 33## 使用说明 34 35[使用JSVM-API实现JS与C/C++语言交互](https://gitee.com/openharmony/docs/tree/master/zh-cn/application-dev/napi/Readme-CN.md) 36 37## 参与贡献 38 391. Fork 本仓库 402. 新建 Feat_xxx 分支 413. 提交代码 424. 新建 Pull Request 43 44