How Taro’s Open‑Source HarmonyOS Version Boosts Cross‑Platform Development

The article details the open‑source release of Taro on HarmonyOS, explaining its architectural evolution, performance optimizations, multi‑platform development workflow, and real‑world results from JD’s HarmonyOS app, while outlining future roadmap and ecosystem expansion.

JD Tech
JD Tech
JD Tech
How Taro’s Open‑Source HarmonyOS Version Boosts Cross‑Platform Development

In June 2025, at the Huawei Developer Conference, JD retail technology experts announced the official open‑source release of the Taro framework for HarmonyOS, presenting the technical implementation, core optimization strategies, and main features of the open‑source version.

Background

Since its first open‑source release in June 2018, Taro has grown from a small‑program‑only solution to a mature cross‑platform framework supporting multiple front‑end frameworks, UI libraries, and build tools such as Webpack, Vite, and ESBuild, covering Web, iOS, Android, and HarmonyOS.

The project has earned over 36,000 stars and nearly 5,000 forks on GitHub, thanks to contributions from many enterprises and individual developers.

Technical Architecture Evolution

Starting in 2022, Taro began adapting to HarmonyOS. A JSUI plug‑in laid the foundation, followed by an ETS plug‑in in 2023 that improved development experience and performance. The latest 4.1 release introduces a C‑API plug‑in, marking a major breakthrough in HarmonyOS support.

Ongoing work focuses on multi‑threading and additional features before further open‑sourcing.

Multi‑End Development

Traditional multi‑platform development faces challenges such as inconsistent syntax, divergent component APIs, and complex environments, leading to low code reuse and high maintenance costs.

Taro now delivers consistent UI rendering across Web, mini‑programs, and HarmonyOS, allowing developers to write a single codebase for multiple platforms and significantly reduce development effort.

JD HarmonyOS Version

Using Taro on HarmonyOS, JD achieved a balance between development efficiency and application performance, with results comparable to native apps in high‑complexity, high‑data scenarios like product detail pages.

Technical Architecture

Taro maintains a unified adaptation logic across platforms. Developers write code using a unified DSL, standardized components, and APIs that follow W3C style specifications, enabling rapid onboarding for front‑end developers.

At the compilation level, Taro’s CLI and plug‑in system select Webpack, Vite, or Metro‑based pipelines to transform source code into platform‑specific executables.

At runtime, syntax adapters, DOM/BOM simulators, and core modules ensure stable execution on HarmonyOS and other platforms.

Rendering Layer Adaptation

The rendering process converts developer‑written React code into a virtual node tree, maps it to Taro’s internal node tree, and finally translates it into native ArkUI components for HarmonyOS.

Beyond core rendering, the runtime integrates layout calculation, event handling, and animation modules, continuously adding HarmonyOS‑specific capabilities.

Architecture Iteration

Both ETS and C‑API solutions share a three‑layer node‑tree design: React → Taro → ArkUI. The shift from ETS to C‑API is driven by a pursuit of maximal performance, replacing declarative recursive construction with more flexible, instruction‑based node operations.

Key performance gains come from moving style processing, layout calculation, and event management to the C++ layer, reducing cross‑language calls and improving execution efficiency.

Cross‑Platform Development Standards

Taro is building a comprehensive cross‑platform standard that reuses existing front‑end ecosystems, covering 26 common components, 88 APIs, and 93 style rules based on W3C specifications, with ongoing expansion for more components and APIs.

The standard integrates a C++‑based style engine using Yoga for layout, and a Rust plug‑in with lightingCSS to pre‑process styles for HarmonyOS, ensuring visual consistency and performance.

Performance Experience

Key performance optimizations include moving DOM tree, event handling, and style calculation to C++, reducing JavaScript‑native communication overhead and improving memory management.

High‑order components such as virtual lists and water‑flow are deeply customized to leverage native HarmonyOS capabilities.

An advanced image processing module provides multi‑level caching, compression, format conversion, and size adaptation to lower memory usage and network bandwidth.

Text rendering uses PixelMap for rich font attributes, while Canvas supports path drawing, transformations, and filters for complex graphics.

Video playback is rebuilt on AVPlayer with direct C‑API integration, offering support for multiple formats, precise control, and synchronized audio‑video playback.

Solution Features

Developers benefit from React ecosystem compatibility, W3C style compliance, and “write once, run everywhere” across HarmonyOS, mini‑programs, and Web.

The architecture provides flexible component and API extensions, enabling native‑mix calls between Taro C++ modules and ArkTS modules, reducing duplicated effort.

Future Outlook

Future plans include open‑sourcing multi‑threading and other core features, expanding the cross‑platform standard, migrating more core modules to C++, and encouraging community contributions to further enhance Taro on HarmonyOS.

frontendHarmonyOScross-platformTaro
JD Tech
Written by

JD Tech

Official JD technology sharing platform. All the cutting‑edge JD tech, innovative insights, and open‑source solutions you’re looking for, all in one place.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.