Trying 1.6.0-M1. It looks like windows is being bu...
# kotlin-native
k
Trying 1.6.0-M1. It looks like windows is being built on mac now? At least I see the mingwX64 folder. I may have missed that.
s
Yep: https://youtrack.jetbrains.com/issue/KT-43024 Hopefully, it will make life of library authors easier.
๐Ÿ‘ 1
k
Yeah, absolutely! I'm giving a talk on libraries today, so new slide...
r
So does that mean the mips targets will be the only ones that can't be built from a macos host as of 1.6?
s
Yes, but honestly, I never heard about anyone who actually tried these targets :)
k
You'd think "nobody", but somebody eventually asks for them.
I mean, depends on the library, of course.
s
Well, IIRC, we had 0 external bug reports about MIPS binaries compilation. I'm highly doubt that is because there are no bugs there.
k
Interesting. We should make a collective vote to simply not have that target available ๐Ÿ™‚
s
We have a bit better idea regarding current targets support in general. Hopefully, will be able to share in the next 6 month :)
๐Ÿ‘€ 6
k
Curious...
r
I publish interfaces to all platforms in Multiplatform Settings on the off-chance that people might supply their own implementations. I do see a couple hundred downloads from the mips artifacts each month, but it's in-line with the other interface-only targets so it probably doesn't indicate much in the way of real usage. (For comparison, Android and iOS artifacts see 10k-15k downloads per month)
a
This is helpful. Are there any plans to go in the other direction and add cross compilation of mac targets from linux hosts? Most CI providers don't have mac runners to build from, and the ones that do are slower and more expensive than linux runners.
๐Ÿ‘ 2
n
If the Linux MIPS targets are being removed in a future Kotlin version, then it would be fair (balanced) to add some Linux RISCV targets in its place ๐Ÿ™ƒ โš–๏ธ. Would require the Linux RISCV ecosystem to mature to a sufficient level, and there would need to a reasonable selection of cheap RISCV SBCs (aka a RISCV version of the Beagle Board or Raspberry Pi) that run some form of Embedded Linux (preferably Debian based).
s
@AJ Alt, no. Currently, Kotlin/Native depends heavily on Xcode when it comes to compiling for Apple targets, and it is illegal to use Xcode components on something other than "Apple-branded computer".
๐Ÿ‘€ 1
j
How does zig achieve it?
s
Yeah, I remember them doing some clever stuff around cross-compilation. I'll take a closer look at my spare time. Probably, they don't try to provide whole macOS SDK (this is what we do with
platform.*
packages), but only its subset which is open-sourced. Unfortunately, currently Kotlin/Native targets are tied to a specific "SDK" (e.g. as of 1.6.0 macosX64 is tied to macOS SDK from Xcode 12.5 and linuxX64 is tied to glibc 2.19) and it is impossible to provide one set of platform libs for macosX64 on macOS host and another one on Linux/Windows. We know about this nasty problem and we will solve it sooner or later, but it requires a lot of resources as it touches many aspects of the Kotlin/Native, including cinterop and ABI.
๐Ÿ‘ 2