For those familiar with napi-rs or cross-build, this capability will be quite familiar. Given Zig's excellent build system, we can use Zig as a compiler to achieve cross-platform cross-compilation.
Currently, Zig HarmonyOS adaptation-related capabilities have been split into an independent organization openharmony-zig for maintenance. Current progress:
- Support cross-platform cross-compilation capabilities based on Zig through cross-build.
- Provide a simple zig-napi implementation based on Zig for native module development.
For the overall picture, you can refer to the repository zig-napi.