Calling & Building / Build Targets
Build Targets
One aero build command produces different targets depending on the arguments.
Target Overview
| Standalone executable | aero build [file | dir] | .exe or target/aero/<pkg>.exe |
| Shared library | aero build f --shared | .dll / .so / .dylib | |
| Python extension | aero build f --pyext | .pyd / .so | |
| C++ binding | aero build f --cpp | shared library + <name>.hpp | |
| Android .so | aero build f --shared --target aarch64-linux-android [--ndk] | lib<name>.so (API 21) | |
| iOS .dylib | aero build f --shared --target aarch64-apple-ios | lib<name>.dylib (iOS 13) | |
| Cross-compilation | --target <triple> | generated according to the triple | |
| Optimization level | -O0..-O3 | default O2 |
Examples
# 独立 exe
aero build app.aero
# Python 扩展
aero build kernel.aero --pyext --py-module kernel
# Android 交叉编译(NDK)
aero build lib.aero --shared --target aarch64-linux-android --ndk C:/Android/ndk
# iOS 交叉编译(需 macOS + Xcode)
aero build lib.aero --shared --target aarch64-apple-iosAndroid / iOS Support
aarch64-linux-android (arm64-v8a), armv7-linux-androideabi, x86_64-linux-android, i686-linux-androidaarch64-apple-ios (real device), aarch64-apple-ios-sim, x86_64-apple-ios (simulator)--ndk → ANDROID_NDK_HOME → common install directories