-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
https://github.com/flutter/flutter/wiki/Roadmap
We're still not planning on investing in built-in support for code push or hot updates. For code push, our friends at shorebird.dev may have offerings of interest. For UI push (also known as server-driven UI), we recommend the rfw package.
在2024年的roadmap中,flutter仍没有计划内置支持热更新。
官方推荐的shorebird提供了一套热更新方案。
shorebirdtech/shorebird#871
在安卓平台是通过替换产物实现的,没有性能损失。而在iOS平台,是通过把Dart VM切换为JIT模式,并替换字节码产物做到的。
显然,在iOS平台,这种方式是有性能损耗的。并且由于需要支持JIT,编译产物也会大一些。
这个方案的粗糙版本就是直接用flutter的debug产物上线,就可以像安卓一样直接进行产物替换。
不过shorebird做得更细致一些,并且对未来的规划也更靠谱:用的是release流水线,在release产物中加回JIT支持,而不是直接用debug产物;有计划让Dart VM支持混合模式,从而局部切换到动态下发的JIT逻辑,尽量减少性能损耗。
且拭目以待。
Metadata
Metadata
Assignees
Labels
No labels