Hi guys :slightly_smiling_face:, I’m not able to c...
# multiplatform
j
Hi guys 🙂, I’m not able to configure KMM project so it uses
native-mt
coroutines and works on apple silicon ios simulator. Did anybody make it work please ?
j
fwiw the combination that worked best for me involved using "normal" 1.6.0 version of coroutines along with enabling new memory model
j
Thank your for info 🙂, I’m gonna give the new memory model a chance.
j
native-mt
will be I think at least deprecated if not completely removed in 1.7 so I think it's worth starting to use new model sooner rather than later. I haven't seen any issues yet but of course depends on particular use case....some mentions perhaps of it still being somewhat slower so worth keeping that in mind
found where I saw that....what was mentioned was that it would be "decomissioned" in 1.7! (https://twitter.com/joreilly/status/1472925676999262208?s=20)
j
Again thank you 🙂 (I’m fan of your work for the community). The reason I haven’t switched yet is this message
Copy code
The new Kotlin/Native memory manager is Experimental. It may be dropped or changed at any time. Opt-in is required (see details below), and you should use it only for evaluation purposes. We would appreciate your feedback on it in YouTrack.
But I’m giving it a shot now 🙂
j
I think there's very little chance of it being dropped.....following for example I think backs that as well https://twitter.com/kpgalligan/status/1474101883686068227
fwiw I'm using it in https://github.com/joreilly/PeopleInSpace if you want to compare settings/versions used etc
🙏 1
note am using both of following...latter can be useful when using existing libraries that haven't switched yet to new model
Copy code
kotlin.native.binary.memoryModel=experimental
kotlin.native.binary.freezing=disabled
j
I’m gonna read migration guide https://github.com/JetBrains/kotlin/blob/master/kotlin-native/NEW_MM.md After that I will checkout your repo and try it out in my project, thanks 🙂
👍 1
j
note that article still talks about using ktor
1.6.2-native-mm-eap-196
which I don't believe supports apple silicon.....I'm using ktor 2.0 beta which seems to work well
j
Noted, I will try 1.6.2 standard with new MM and ktor 2.0 beta
p
We can't use the new memory model because of the watchos arm32 limitations :/
m
I agree, that you should give a new memory model a chance and @John O'Reilly’s PeopleInSpace is of great help when migrating (I know because I used it to migrate to new memory model 😁). Anyway, if for some reason, you prefer not to upgrade just now, you can check my project - before change to new memory model (https://github.com/MartinRajniak/CatViewerDemo/commit/5b052fcbda7425abc98077591161447b6323cf30), I was using
native-mt
and it worked for me on M1 (with Apple Silicon iOS Simulator). That was the machine that I used since I started developing the project (and I couldn't test on physical device), so hopefully it will be helpful to you too.