Will there be cross compilation soon? Building thi...
# compose-desktop
g
Will there be cross compilation soon? Building things in CI/CD like Gitlab without a docker executor is like an absolute nightmare imo (CI/CD related code looks more complicated and shitty). And you also need to have the additional OSs and machines and code. It would be nice to be able to build windows and macos binaries from within a linux docker container. Is that even possible and will that be released soon?
e
Compose Desktop uses Java's jpackage, and unfortunately jpackage only supports the platform it is currently running on
c
Also for the apple platform you need Xcode which is only available on MacOs.
e
yes notarization can only be done with macos
https://openjdk.org/jeps/343 > Non-Goals > • There will be no support for cross compilation.
m
Even if that would work you’d also need something like cross testing then. You can’t take it for granted that if your build succeeds for all platforms that the result will also run without errors on all platforms if you are just testing on one platform. Too often I have encountered the opposite now.
u
Conveyor support cross compilation
r
Technically, Conveyor doesn't do any compilation. It'll take an existing pre-built project and package that up. But if that initial compilation requires cross compilation (e.g. native code) then you're out of luck.
I have my projects mostly cross-compiling their native dependencies by using zig as a C/C++ toolchain -- though this won't work for Kotlin Native.
e
generally a Compose Desktop app can be built on any platform, since the native code is already pre-built. but packaging it into an app image for distribution does require some platform-specific tools (or however Conveyer does it in the cloud)
m
Conveyor doesn't do it in the cloud. It's a CLI tool like jpackage is.
It's just a tool that supports cross-building (assuming your inputs consist of JARs and whatever native libraries you need already)
e
oh it's an alternate packaging tool… I misunderstood how it works then, never used it