mirror of
https://github.com/openharmony/ark_ts2abc.git
synced 2026-07-01 09:24:57 -04:00
d035862fbaa7e2847dc121e58219ebd5047f91a1
Signed-off-by: wanyanglan <wanyanglan1@huawei.com> Change-Id: I3f5f1ddb0ff30ce85c8cccace6d78b7030cff2c6
ts2abc
Introduction
As a module of the ARK platform, ts2abc is a front-end tool for JavaScript (JS) in the ARK compiler. It converts JS files into ARK bytecode files.
Directory Structure
/ark/ts2abc/
├── ts2panda
├── doc # Documents
├── scripts # Dependency scripts
├── src # Source code directory
├── templates # Ruby templates
├── tests # Unit test cases
├── tools # Tools provided by ts2abc
└── ts2abc # ts2abc source code
Note
ts2abc uses the command line interaction mode and converts JS code into ARK bytecode files that can be run on an ARK runtime system. ts2abc supports Windows, Linux, and macOS.
Usage Guidelines
You can run node --expose-gc your_path_to/index.js [options] your_file.js to convert a JS file into an ARK bytecode file using ts2abc. If no parameter is specified for [options], an ARK binary file is generated by default. The index.js file is the executable file generated after ts2abc compilation.
Repositories Involved
Description
Languages
C++
49.9%
TypeScript
42.5%
Python
2.9%
JavaScript
2.5%
HTML
0.9%
Other
1.3%