ArticleslgStudy

computer science

Ark Compiler

Ark Compiler is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Ark Compiler rather than just read about it. In short: Ark Compiler, also known as ArkCompiler, is a unified compilation and runtime platform by Huawei that supports joint compilation and running across programming languages and chip platforms, also operating systems of open-source OpenHarmony, Oniro, alongside proprietary HarmonyOS with single core system HarmonyOS NEXT included on native APP in Event-driven programming in a unified development environment and formerly…

Key takeaways

  • Ark Compiler belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Ark Compiler to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Ark Compiler from memory before moving on to harder problems.

Reference excerpt

Ark Compiler, also known as ArkCompiler, is a unified compilation and runtime platform by Huawei that supports joint compilation and running across programming languages and chip platforms, also operating systems of open-source OpenHarmony, Oniro, alongside proprietary HarmonyOS with single core system HarmonyOS NEXT included on native APP in Event-driven programming in a unified development environment and formerly built for Android-based EMUI for Huawei smartphones and tablets with HMS-enabled apk apps on AppGallery that improves app performance. It supports a variety of dynamic and static programming languages including Java, C++, JavaScript, TypeScript, and ArkTS. It is the compilation and runtime base that enables OpenHarmony, Oniro OS alongside HarmonyOS NEXT to run on multiple device forms such as smart devices, mobile phones, PCs, tablets, TVs, automobiles, and wearables. ArkCompiler consists of two parts, compiler toolchain and runtime. Huawei initially open sourced Ark Compiler for Android platform on GitHub, on September 9, 2019, as they were transitioning away from the operating system via US sanctions. Then the company, open sourced Ark Compiler with OpenArkCompiler as part of the Huawei Ark Compiler open source project (HACOSP) in early February 2022 and ArkJS_runtime, in the previous year in September 2021 after two years of inception in August 2019.

Overview ArkCompiler has a built-in componentized and configurable multi-language compilation and runtime platform of OpenHarmony and HarmonyOS with HarmonyOS NEXT. It contains the core components such as the compiler, toolchain, and runtime. It supports compilation and running of high-level programming languages on the multi-chip platform. ArkCompiler JS Runtime provides the capability of compiling and running the JavaScript (JS) language on the OpenHarmony operating system side. ArkCompiler JS Runtime consists of two parts such as the JS compiler toolchain and JS runtime. The JS compiler toolchain compiles JS source code into ArkCompiler bytecodes. The JS runtime executes the generated ArkCompiler bytecodes.

ArkCompiler Runtime Core

The common module of language runtime in the OpenHarmony operating system family is called ArkCompiler Runtime Core, also called Ark Runtime. It runs on top of HarmonyOS Runtime base on a dual-framework, alongside the single framework OpenHarmony-based HarmonyOS NEXT, which consists of language-independent basic runtime libraries. The ArkCompiler file provides bytecodes and information required for executing them. Tooling supports the runtime debugger. The Base is responsible for implementing platform related utilities. ISA function provides a common instruction set architecture that is language-independent, allowing it to run HarmonyOS applications regardless of differences in instruction sets.

ArkCompiler JS Runtime ArkCompiler JS Runtime is the default JS runtime on OpenHarmony. It supports ECMAScript libraries and efficient container libraries. It also provides a set of native APIs for C++ and JS interaction and a variety of garbage collectors that features high performance.

ArkCompiler eTS Runtime ArkCompiler eTS Runtime is a runtime used in ArkTS applications derived from former HarmonyOS 3.0/OpenHarmony 3.1 API 8 eTS (extendedTypeScript) on OpenHarmony as well as HarmonyOS apps taking advantage of custom OpenHarmony-based HarmonyOS NEXT core operating system. It contains an allocator and garbage collector (GC) for ArkTS/JS objects, a standard library that conforms to the ECMAScript specification, an interpreter for running the ARK Bytecode (abc) generated by ARK front-end components, an inline cache for acceleration, a statically typed compiler, a C++/C function interface for Native API (NAPI) application development at runtime, and other modules in Ahead-of-time compilation via DevEco Studio since version 3.1.1 on both HarmonyOS 3.1 SDK and OpenHarmony 3.2 SDK API 9.

ets_frontend The ets_frontend is a front-end tool in the ARK Runtime Subsystem which combines the ace-ets2bundle component that supports converting ETS programming language files into ARK bytecode files. They correspond with ArkTS app development in OpenHarmony and HarmonyOS development under HarmonyOS NEXT system.

ArkCompiler Toolchain The ArkCompiler Toolchain provides developers with debugging tools for ArkTS application development, such as the Debugger, CPUProfiler, and HeapProfiler. The debugging and tuning capabilities provided by the Ark Toolchain is used through DevEco Studio IDE that relies on the ArkCompiler Runtime to provide runtime-related information to developers.

References

Worked examples

Example 1 — a first encounter with Ark Compiler

Start with the simplest possible case. Write down what Ark Compiler claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Ark Compiler before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Ark Compiler ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Ark Compiler

In research
Ark Compiler appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Ark Compiler in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Ark Compiler is common in secondary-school and first-year university syllabi. It links to neighbouring topics 2019 software, 2024 software, Compilers, so understanding it makes those chapters shorter.
In everyday life
Look for Ark Compiler outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “Ark Compiler” →

How to study Ark Compiler in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Ark Compiler means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Ark Compiler out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Ark Compiler in simple terms?

Ark Compiler, also known as ArkCompiler, is a unified compilation and runtime platform by Huawei that supports joint compilation and running across programming languages and chip platforms, also operating systems of open-source OpenHarmony, Oniro, alongside proprietary HarmonyOS with single core sy…

Why does Ark Compiler matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Ark Compiler?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Ark Compiler.

Tags

  • 2019 software
  • 2024 software
  • Compilers
  • Free and open source compilers
  • Huawei products
  • Runtime systems
  • Software using the Apache license

Keep exploring