# Environment setup # Ensure UTF-8 locale so CJK / multibyte input is handled correctly ENV LANG=C.UTF-8 ENV ZEROCLAW_WORKSPACE=/zeroclaw-data/workspace ENV HOME=/zeroclaw-data # Default provider and model are set in config.toml, not here, # so config file edits are not silently overridden ENV ZEROCLAW_GATEWAY_PORT=42617
$ /opt/homebrew/bin/ssh user@ip The authenticity of host 'xxxx' can't be established. This key is not known by any other names. Are you sure you want to continue connecting (yes/no/[fingerprint])?
expect fun loadDatabaseBuilder(): IDatabaseBuilder
两端再分别来个 actual 实现:
actual fun loadDatabaseBuilder(): IDatabaseBuilder = DatabaseBuilder()
这个组合拳支持的部分,按属性、方法,类排,进程到了 object 这里会给个提示 are Beta:
'expect'/'actual' classes (including interfaces, objects, annotations, enums, and 'actual' typealiases) are in Beta. You can use -Xexpect-actual-classes flag to suppress this warning. Also see: https:// youtrack. jetbrains. com/ issue/ KT-61573
我不知道 Bate 和正式的区别有多久,毕竟 Google 还有很多东西 3 年前是 alpha 现在还是,并非停止维护也是一直在更新,就是这个正式太难了。
The new K2 compiler is enabled by default starting with 2.0.0. For more information on the new features provided in Kotlin 2.0.0, as well as the new K2 compiler, see What's new in Kotlin 2.0.0.
Performance improvements
To evaluate the performance of the K2 compiler, we ran performance tests on two open-source projects: Anki-Android and Exposed. Here are the key performance improvements that we found:
The K2 compiler brings up to 94% compilation speed gains. For example, in the Anki-Android project, clean build times were reduced from 57.7 seconds in Kotlin 1.9.23 to 29.7 seconds in Kotlin 2.0.0.
The initialization phase is up to 488% faster with the K2 compiler. For example, in the Anki-Android project, the initialization phase for incremental builds was cut from 0.126 seconds in Kotlin 1.9.23 to just 0.022 seconds in Kotlin 2.0.0.
The Kotlin K2 compiler is up to 376% quicker in the analysis phase compared to the previous compiler. For example, in the Anki-Android project, analysis times for incremental builds were slashed from 0.581 seconds in Kotlin 1.9.23 to only 0.122 seconds in Kotlin 2.0.0.
For more details on these improvements and to learn more about how we analyzed the performance of the K2 compiler, see our blog post.