@idlizer/ui2abc
v0.1.10
Published
CLI wrapper for UI2ABC compiler
Readme
@idlizer/ui2abc
CLI wrapper for UI2ABC compiler (UI to ArkTS Bytecode).
Installation
npm install @idlizer/ui2abcThe package is fully self-contained and includes all necessary compiler artifacts, Panda SDK, and OHOS SDK headers. No external dependencies required.
Usage
ui2abc [options] [file]See ui2abc --help for full usage.
Development
This package is part of the Koala monorepo. To build a self-contained distribution:
cd sdk
npm run assembleThe assemble script will:
- Prepare OHOS SDK headers (runs
npm run sdk:allin root) – enabled - Copy absolute SDK from
absolute-sdk-patchedtodest/ohos_sdkand create compatibility symlinkdest/absolute-sdk-patched - Compile fast-arktsc (required for building other components)
- Compile libarkts, ui-plugins-ng, memo-plugin-ng
- Copy compiled artifacts into
dest/ - Copy Panda SDK packages into
dest/panda-sdk(fully self-contained, no external dependency on@panda/sdk) - Compile arkoala-arkts framework for headless execution
- Copy arkoala-arkts build folder (only build directory needed)
- Compile incremental harness (legacy, needed for tests)
Note: The SDK copy ensures the package is fully self-contained. The check script uses the copied SDK from dest/.
After assembly, the package becomes self‑contained and can be published or archived.
Testing
To verify the assembled compiler works, run the check script:
npm run checkThis will compile the trivial test application in tests/trivial/ using the assembled artifacts.
Note: The check requires OHOS SDK headers. If the SDK is not prepared, the check will skip compilation with a warning. Enable sdk:all in the assemble script first.
License
Apache 2.0
