Hiprup

What is the difference between AOT and JIT compilation in Flutter?

Two distinct compilation strategies, used by Flutter for different lifecycle stages.

JIT (Just-in-Time) — compiles Dart at runtime inside the Dart VM. Self-modifying code enables Hot Reload. Slower startup, larger memory. Used in DEBUG mode.

AOT (Ahead-of-Time) — compiles Dart to native ARM machine code at build time. No runtime code modification → no Hot Reload, but near-native performance and faster cold start. Used in PROFILE and RELEASE.

Why both: Flutter uses JIT in development for sub-second Hot Reload (the killer DX feature) and AOT in release for native ARM performance. Apple disallows runtime code generation on iOS, so AOT is mandatory for App Store builds — also true for any cross-platform framework on iOS.

In a release APK, the AOT-compiled native code lives in libapp.so.

Two signals of real understanding: (1) 'Flutter uses BOTH — JIT in debug for Hot Reload, AOT in release for native performance' — the whole framework is designed around this duality; (2) 'Apple disallows runtime code gen on iOS, so AOT is mandatory for App Store builds' — that's the historical reason every cross-platform framework on iOS needs AOT. Bonus: mention libapp.so is the precompiled native ARM blob inside a release APK.

What is the difference between AOT and JIT compilation in Flutter? | Hiprup