# ark_ts2abc **Repository Path**: wanyanglan/ark_ts2abc ## Basic Information - **Project Name**: ark_ts2abc - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 1055 - **Created**: 2021-09-04 - **Last Updated**: 2021-09-13 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # ts2abc - [Introduction](#section11660541593) - [Directory Structure](#section161941989596) - [Note](#section0446154755015) - [Usage Guidelines](#section33105542504) - [Repositories Involved](#section1371113476307) ## 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.

Option

Abbreviation

Description

Value Range

Default Value

--modules

-m

Compiles the code based on the module.

-

-

--debug-log

-l

Enables the log function.

-

-

--dump-assembly

-a

Outputs an assembly file.

-

-

--debug

-d

Provides debug information.

-

-

--show-statistics

-s

Displays statistics about bytecodes.

-

-

--output

-o

Specifies the path of the output file.

-

-

--timeout

-t

Specifies the timeout threshold.

-

-

--opt-log-level

-

Specifies the log level for compilation optimization.

['debug', 'info', 'error', 'fatal']

error

--opt-level

-

Specifies the level for compilation optimization.

-

1

--help

-h

Displays help information.

-

-

--bc-version

-v

Outputs the current bytecode version.

-

-

--bc-min-version

-

Outputs the lowest bytecode version supported.

-

-

## Repositories Involved [ARK Runtime Subsystem](https://gitee.com/openharmony/ark_js_runtime/blob/master/docs/ARK-Runtime-Subsystem.md) [ark/runtime\_core](https://gitee.com/openharmony/ark_runtime_core/blob/master/README.md) [ark/js\_runtime](https://gitee.com/openharmony/ark_js_runtime/blob/master/README.md) **[ark/ts2abc](README.md)**