I'm building a subset of compose that try to mimic...
# feed
s
I'm building a subset of compose that try to mimic Compose Desktop on mingwX64, macosArm64, linuxX64 and linuxArm64. The window manager is SDL3 and the renderer is skiko on macos/linux and sdl3 renderer (+ sdl ttf and sdl image and freetype for more ttf feature) on windows as skiko is not mingw compat. It use the original compose compiler and compose runtime, everything else is a reimplementation (foundation, ui, animation, material) https://github.com/bitsycore/ComposeDesktopNative
👀 1
K 6
The SDL3 renderer is less good than the skiko and require more dependencies (ttf, image and separated freetype that I use cause sdl ttf don't support settings axis for variable fonts) Also working on Anti aliasing is a bit harder but I try to hack it to get closer to skiko, for now font use a gamma correction to try to mimik skia font rendering (that is really the best font rendering imo)
An issue right now is that it's not compatible with direct compose library, you need to reimplement it as most library don't have these target ... I would need to make a composition fork like how was made compose multiplatform
Some progress with a use case of api manager to find bug and issue.
s
this is really neat! did you have to reimplement all that because skiko isn't available for non-apple kotlin/native? did you consider / explore porting skiko to those targets (or using skia directly in native)?
s
@Sargun Vohra I had to reimplement most of the stuff because the foundation and other "base" library don't target mingwX64 and linuxX64 linuxArm64, there is an experimental compose desktop native on macosArm64 but as I had to reimplement everything and SDL3 already give me a crossplatform layer I used it. I think the problem is that skia can't be built on mingw even with clang frontend, maybe I can still link library built for msvc but i'll end up with two crt ... Maybe I could launch Skia renderer in a separate process and use socket but i'm not sure if it will be efficient enough (or even if I could get gpu acceleration
The sdl3 renderer work really well, I just wanted to go skia at first to be as close as compose in general
Also to go back to the reimplement, I would need to make a sort of fork like compose multiplatform did to add extra target, but for my use case right now I don't feel like forking whole compose multiplatform (maybe it would have been a better solution in the end ? Time will say me)
👍 1
image.png