ArkRuntime Interop Development
SkillDev toolsExpert assistant for ArkTS-JS interoperability in ArkCompiler (ArkTS runtime). Trigger scenarios: modifying/debugging ArkCompiler interop layer code (static_core/plugins/ets/runtime/interop_js/), implementing cross-language calls between ArkTS and JS, handling value conversion between ETS and JS (js
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the ArkRuntime Interop Development skill
What this skill tells your AI
The instructions your AI receives, as published by openharmonyinsight/openharmony-skills in skills/ohos-dev-arkruntime-interop-development/SKILL.md and read by ahel’s review.
Overview
This skill specializes in the ArkTS <-> JavaScript Interoperability layer located in runtime_core/static_core/plugins/ets/runtime/interop_js/. It bridges the ArkTS runtime (ETS) with the JavaScript engine via NAPI.
Core Capabilities
1. Navigating the Interop Layer
The directory structure is segmented by function:
ets_proxy/: ETS objects in JS.js_proxy/: JS objects in ETS.intrinsics/: Direct interop access from ArkTS.napi_impl/: Implementation of NAPI interfaces.- Reference: architecture.md
2. Underlying Runtimes
Interop depends on both the JS runtime and the NAPI framework:
- JS Runtime: Core VM, interpreter, and compiler context. See ets-runtime.md.
- NAPI Framework: The abstraction layer for JS engines. See napi-framework.md.
3. Value Conversion
Handled by js_convert and JSRefConvert classes.
- Key Files:
js_convert.h,js_refconvert_*.h.
Common Workflows
Debugging Interop Issues
- Crashes: Check
napi_envusage and scope mismatches. - Leaks: Monitor
GlobalObjectStorageand proxy reference counting. - Exceptions: Use
InteropCtx::ThrowJSErrororThrowETSError.
Performance & Memory
- Use
napi_create_async_workfor heavy tasks. - Respect GC safepoints and handle allocation through
EcmaVM. - Use
napi_handle_scopeto prevent memory leaks.
Coding Standards
- Formatting: Always run
bash code-format.sh format-changedbefore committing. - Validation: Ensure
check <path>passes andtidyreports no new warnings.
Key Headers
interop_context.h: Main context.js_convert.h: Value conversion.ets_proxy/ets_class_wrapper.h: ETS classes in JS.js_proxy/js_proxy.h: JS objects in ETS.
Signals
- GitHub stars
- 34
- Forks
- 7
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
ohos-dev-arkruntime-interop-development- Source
- github.com/openharmonyinsight/openharmony-skills