Hey everyone, After several months of work, I'm ve...
# feed
u
Hey everyone, After several months of work, I'm very proud to announce the release of Nucleus 2.0. The main change: a new backend based on tao (Tauri's engine), which makes Compose apps significantly more modern on Windows, Mac, and Linux. Concretely, this brings touch and multitouch support on Windows and Linux, native gestures on all three OSes, native Wayland support on Linux, as well as improved native accessibility. Rendering is also much more performant, resizing issues are gone, and RAM usage has dropped significantly. On the compilation side, native GraalVM is finally stable. And to go along with this release, a brand new website is now available: nucleusframework.dev
🚀 14
👏 16
👏🏻 3
❤️ 7
😍 5
👏🏽 1
mother of god 4
👏🏾 2
🎉 34
kodee happy 24
s
A great achievement! 💪 Thank you so much for your hard work! 🙏🏻
🙏 2
🙏🏾 1
a
Looks legit. do you have any templates or sample projects I can play with? cant find in the docs
u
yes you can find many samples here : github.com/NucleusFramework/…/examples
👍 1
s
trying to migrate from 1.x to 2.0.0 I keep running into
Copy code
A problem occurred configuring project ':app:composeApp'.
> Cannot add task 'unpackDefaultComposeDesktopJvmApplicationResources' as a task with that name already exists.
seems related to github.com/NucleusFramework/Nucleus/issues/284, but how do the example apps even run if this setup fails, since they also apply both plugins?
u
you must not have in the same configuration block
Copy code
compose.desktop {
       application {
and
Copy code
nucleus.application {
     mainClass =
s
I do not have a
compose.desktop
block
🤔 1
u
Maybe try declaring the Nucleus plugin after the Compose plugin, and not before.
s
I already do. for some reason it does not fail if I run the hot reload task. but then there's no window at all, whether using Tao or AWT.
u
If you manage to create a very simple repository with the bug, because everything works correctly on my end.
s
literally the default kmp template as soon as you apply the nucleus plugin github.com/…/nucleustest run
desktopApp [jvm]
u
It works for me 🤔
🤔 1
maybe try with another jdk
s
neither azul nor jbr 21-25 work. are you sure you're not running it with the hot reload mode?
u
no sure
And there are many users who already use Nucleus
I have production apps with CIs that use Nucleus on Windows
m
Great Job, Pushing CMP 🎉
🙏 1
s
well, I'm definitely not the only one with this issue github.com/NucleusFramework/Nucleus/issues/284 I'm using it as well, but pre 2.0
u
Yes, I see you're not the only one, but I don't understand what's going on
a
Can I generate a Windows application while on a Mac?
u
You can develop it, yes, but you can't cross-compile it with Nucleus; you have to use a Windows CI/CD pipeline.
m
Congratulations for this achievement. It pushes the boundaries of compose desktop. I'll do the switch to 2.0 as soon as the dust has settled 😉.
s
@andylamax to cross-compile you'll want to use github.com/fourlastor-alexandria/construo instead
(it only does the one thing tho, it is not a replacement for the rest of Nucleus of course)
a
Thanks a lot @seb. I will definitely try this plugin
👍 1
s
Thank @fourlastor not me 😄
u
I just migrated a small application from Nucleus 1.0 to 2.0. The app was already using GraalVM native compilation. With Nucleus 1.0 and AWT, the app took 0.7s to start; now it takes 0.12s. Before, the app used 170MB of RAM; now it uses 100 🙂
🔥 4
So Nucleus beats Tauri in boot time and RAM usage (a Tauri hello world is 85MB)
image.png
😯 2
s
Nice!
😎 1
p
What can be the cause of black window when using Tao engine?
s
nice work!
k
Nice! Thank you so much for your work
🙏 1
p
I'm using FileKit (github.com/vinceglb/FileKit) for file picker dialogs. Is there any way to provide current window as parent for it?
1
u
What can be the cause of black window when using Tao engine?
@PHondogo First, you need to test if the demo app (available in the GitHub releases) works correctly. If it does, it's probably a configuration problem.
I'm using FileKit (github.com/vinceglb/FileKit) for file picker dialogs. Is there any way to provide current window as parent for it?
Does FileKit allow this with a classic backend? @Vincent
p
FileKit has
io.github.vinceglb.filekit.dialogs.FileKitDialogSettings
where parentWindow of type
java.awt.Window
can be passed
u
No, so it's not possible; a Tao window is not an AWT window.
I'm going to see what's possible to do
thank you color 1
I look forward to hearing your feedback in any case. 🙏
v
Congrats @אליהו הדס, huge achievement 🎉 I took a quick look at it, supporting a Nucleus 2.0 window as the dialog parent seems possible, but it will require some work on the FileKit side. I’ll take a closer look
🙏 3
u
Actually, I looked at the Filekit code, and the
awtwindow
parameter is only used to extract the handle. It seems we would just need to add a parameter to accept the handle directly. Nucleus already provides an API to expose the active window's handle."
w
It’s amazing! After upgrading to the latest version, the performance has improved tremendously.
kodee happy 1
u
And I'm not finished yet!
The next update of nucleus will free itself from liberica to support the enterprise version of graalvm, liberica adds a lot of code to support awt which is no longer necessary with the tao backend, I have again noticed a clear improvement in performance, moreover, what interests me the most is the pgo which allows to reach almost the performance of a native jvm.
K 2
I had fun benchmarking all of this and it's incredible.
🚀 1
What seems counterintuitive to many is that the JVM is so CPU-through efficient, even surpassing Swift on its own platform, and almost on par with Rust (without the headaches), and that without any additional configuration, it remains the benchmark choice for heavy computing and intensive tasks, even when you need to handle demanding applications. What we can also see, and this might be more relevant for power users, is that PGO allows you to reach 90% of the performance of a JVM, making it comparable in terms of performance to Swift or Rust. It also increases responsiveness, and this is reflected in the graphics score, which is even 7-8% higher than on a JVM. There's also ML mode, which allows you to reach 70% of the performance of a JVM, but it increases the binary size, so I don't see much point in it, especially since GraalVM profiles are reusable across platforms. And this always confirms what I argue, for the development of cross-platform desktop apps, if your app does more than read a json and display a list, the Java ecosystem is the one that will provide you with the best compromises, the best dx, and the performance that goes with it, and thanks to Nucleus, deep native integration with the system, and very simple control over compilation modes.
👍 1
w
@אליהו הדס Can Compose Hot Reload work with the latest Tao backend? After I initially migrated to the Tao backend, it stopped working.
u
it's now fix in 2.1.0
🚀 2
K 2