Huawei’s self developed programming language Cangjie is coming to both HarmonyOS NEXT and OpenHarmony

Getting your Trinity Audio player ready...

It has been revealed on the open source repo of OpenAtom OpenHarmony showing the added ffi bridge layer code to support Cangjie calling the ffi interface. What is the purpose of this? It is to call the ffi layer to achieve same capabilities as ArkTS. A foreign function interface (FFI) is a mechanism by which a program written in one programming language can call routines or make use of services written or compiled in another one. CJ – Cangjie created on 2024-04-24 19:18 UTC+8, ahead of HDC 2024, June 21-23 2024, that could reveal the new programming language, dubbed “C++” killer for various applications on native HarmonyOS/OpenHarmony development at the developer keynote and events for developers.

What is Cangjie?

What is Cangjie? Huawei’s self developed programming language that has been rumoured to be in the works since 2020 plans laid by Huawei internally and to developers at HDC events. On January 18, 2024, Huawei officially revealed that HarmonyOS NEXT contains Cangjie alongside ArkTS as the main programming languages alongside other programming language support on the operating system and OpenHarmony, for self and native OS and app development. HarmonyOS NEXT was extended to more internal developers in China with Cangjie not publicly mentioned yet by developers blog. It has been rumoured last auntum that Huawei is working with Tencent using Cangjie to fill the gaps of ArkTS programming language for native HarmonyOS port of official WeChat app in Chinese markets. The purpose of having new programming languages it helps boost it’s native performances of the system, it’s compiler, runtime and even harden the security of their native app system, the operating system and it’s own microkernel further overtime making it harder for hackers in a reduced surface attack where it’s known that C++ has security vulnerabilities where Huawei can fill those vulnerabilities on their own in-house operating system and it’s open source contributions to the community. It enriches Huawei to build new paradigms of software technologies in the future with in-house programming languages, it also boost the security of OpenAtom ecosystems in the future alongside Huawei products. It has been whispered among insiders and experts that Huawei plans to have more future in-house programming languages for different purposes throughout the operating system. It also rumoured that Huawei is working on extending it’s graphics engine tools Phoenix Engine into a full fledge game engine development for developers as an Unity and Unreal Engine competitor. A lot of game engines written in C++, same with CAD software, 3D building applications like Blender. C++ plays a major role in 3D applications. Plus, Metaverse is part of the agenda next to the AI era, we seen Augmented reality applications concept uses for Augmented Reality, Virtual Reality and XR, Mixed Reality headsets.

What would be the practical application use for Cangjie?

Cangjie will likely play a big role with game engines such as potential in-house Phoenix Engine, 3D apps, as a cross platform, for game developer community support, for those who write games on iOS, Android, Windows, macOS etc. outside of primary HarmonyOS and OpenHarmony platforms taking advantage of it’s native shader language of ArkGraphics 3D low level graphics API for HarmonyOS and OpenHarmony platforms, which can also play a role in 3D web applications with future WebGPU support that communicates with the Graphics Engine of Phoenix Engine. It would be very strategic like cross platform ArkUI-X for app developers writing for iOS, Android etc. that is Google Flutter competitor The graphics engine tools are just the foundations and mechanisms for the future game engine by Huawei. It will have use for HarmonyOS Cockpit, as well as OpenHarmony powered cars that will debut by version 5.0 in Q3 2024 that deals with 3D interfaces, interactions, Augmented reality devices, phones, game consoles, game laptops, PCs, wearables etc.

Huawei is not going to just release a PC and a PC oriented software with the HarmonyOS operating system for it and be done with it, they have big long term plans for it and it won’t be a gimped experience. It would be the world standard when it comes to desktop experiences. PC is the central terminal for smart devices use and applications. It can really take full advantage of the Kirin chips, gaming experiences across both Huawei on HarmonyOS side and non-Huawei devices on OpenHarmony side. Huawei can use GameCenter team as a setup for exclusive game content and with partners and also gather third party game partners, app partners to build rich HarmonyOS games, applications, WebGPU applications with ArkUI declarative programming alongside ArkTS, C++, C. Also event driven will be the standard Huawei is setting with it’s DevEco Studio IDE and Phoenix Engine, game engine use. Huawei is doing this, that allows Huawei to set industry standards out of China with quality control of it’s AppGallery store, not just Epic Games and Unity Technologies from the US and there is also another revenue stream in the software business, Huawei has been pushing to transform itself in this ambitious path as a software company since 2018 in the heights of the trade war. It also brings protection for Huawei’s long term strategy if US multinational negotiations and relations fall through in terms of key developer tools support such as gaming engines. With friendly app/game commissions of 20% cut on AppGallery with 80-20 ratio, after it pays developers up to 100% of revenue for the first two years, games, get 85% – that’s close to the 88% that the Epic Store offers (95% if the game is based on the Unreal Engine which Huawei may emulate this model). In the second year, developers can expect 85% of revenue generated by their apps and games (90% for educational apps). Free of charge developer tools such as DevEco Studio IDE to Phoenix Engine, including free developer portal setup, it brings fierce competition to traditional competitors such as Microsoft with Windows that has Microsoft Store, Apple with Apple platforms with App Store and Google with Android GMS and Chrome OS with Play Store. Making Huawei highly competitive as western tech counterparts such as Apple, Google, Epic, Microsoft globally.

Back in 2020 during Android HMS days, Huawei Phoenix Engine is a graphics engine that has broader set of features. It operates at higher level abstraction, integration of self developed multi-layer BVH acceleration structure, Raytracing, It works as a add-on plugin for Unity3D, Cocos game engine which is all integrated with native HarmonyOS Huawei Mobile Services (HMS) Core Scene Kit library at upper level. (I added) Meanwhile Graphics Acceleration Kit adds support for OpenGL and Vulkan to co-exist with native low level ArkGraphics 3D and also ArkGraphics 2D side, but it’s also other means more likely is GPU Turbo optimisation technology in graphics bump, resolution and performance in frame rates. As well as AR Engine API for the base of the OS beyond HMS upper level APIs. XEngine Kit, deep learning video/image optimisation on CPU and GPU hardware.

We hope to see more information about Cangjie, and developers getting their hands on the very first version of Cangjie, dubbed Cangjie 1.0 or CJ 1.0.

Source: X/Twitter, Discord