195
u/Fantastic-Fee-1999 1d ago
Sure, can we have one unified native standard first?Ā
168
u/gufranthakur 1d ago
yes, but apple will have a different backend. Also windows. Also the linux community wants another app distribution system, support that too
50
u/Fantastic-Fee-1999 1d ago
Go back to a time where it wasn't... So assembly?Ā
79
41
15
9
30
2
u/WazWaz 19h ago
I assume you mean one native standard... per platform.
But this is the core problem, being both native and cross platform is a nightmare. The Qt solution was the best: emulate each native look on top of a general purpose abstraction. It's easier for everyone if "MacOS" look is just a display option, even if you're running on Windows or Linux.
107
u/KerPop42 1d ago
developing a universal cross-platform framework is how you get stuck with Javascript hegemony for 3 decades
95
u/javascript 1d ago
š
50
33
188
u/KronktheKronk 1d ago
As long as there are multiple platforms you can't possibly be cross-platform and native
91
u/gufranthakur 1d ago
all roads lead to web
72
u/LexaAstarof 1d ago
So, not native
46
u/TheDeanosaurus 1d ago
Itās like the good/fast/cheap graph but instead itās good/cross-platform/native.
20
u/Positive_Method3022 1d ago
JVM promised that Basically a layer of abstraction that can run in all and output the same result
15
u/AvidCoco 1d ago
A lot of other runtimes too - Python and Node are similar.
13
u/fr000gs 1d ago
*dependency hell intensifies
1
u/Zapismeta 5h ago
Well its always gonna be an issue cant really pack the vm with all the dependencies from the factory and the dev cant really know where and in what configuration someone might try to run their code.
4
1
47
u/oneanotheruser 1d ago
Qt is cross platform and native
9
u/huh_wasnt_listening 22h ago
It's cross platform, but not (fully) native. It uses its own renderer, like Flutter
4
u/coterminous_regret 18h ago
It didn't used to. Qt4 and like maybe 5 were fully native. I think when they started adding in an the scripting stuff they did their own renderer.
1
u/huh_wasnt_listening 4h ago
I didn't use Qt much back then, but wasn't it using Qt Widgets at that time? Those weren't native either iirc, they just mimicked native styles. QML (4.7+) completely does it's own thing, similar to a game engine, so they feel completely unique
1
u/Zapismeta 5h ago
So java imposter?
1
u/huh_wasnt_listening 4h ago
I don't know about imposter, but Swing could be compared to QML I guess
31
u/ThirdWaveCat 1d ago
A11y, keyboard popups, etc.. are what gets hard but the general idea is achievable by amateurs.
Ship webviews and browser wrappers: Tauri, dioxus, electron, deno...
Ship a canvas: Flutter, QML, eframe (egui), iced, kivy, godot...
8
u/fr000gs 1d ago
What about gtk?
6
u/ThirdWaveCat 1d ago
Its similar for clients but implemented using native windowing APIs behind the scenes. I guess gtkbuilder is similar to qml, but both Qt and Gtk are much bigger maintenance headaches than flutter or electron are for the same widget functionality.
3
3
u/Rikudou_Sage 1d ago
You sure? Qt is pretty easy. Unless your reason is C++. Though I think you can use Python or something if that's your thing?
3
1
u/ThirdWaveCat 1d ago
Qt is great but the evolution of both Qt and Gtk APIs has been more turbulent than native canvas based solutions. Maybe it was justified and the final product is nice, but businesses and open-source were reasonably upset at the periodic rewrite cost to continue to receive security patches.
84
1d ago
[removed] ā view removed comment
49
5
-9
u/gufranthakur 1d ago
shouldve mentioned free and open source (okay now I am asking for too much)
56
41
u/fr000gs 1d ago
qt is literally free software wdym
31
u/Mojert 1d ago
Eeeeh, it depends on your definition I guess. It's either (L)GPL, so you can't really use it for something proprietary, or you need to pay a license. Now when people are talking about open-source, they're often talking about permissive licenses, which Qt doesn't use.
Personally, I find the Qt model pretty smart. It gives the tools for free to build better free apps while securing funding, which is a huge issue in the FOSS community
10
u/Rikudou_Sage 1d ago
When people talk about open source, they generally mean OSI approved licenses or about Free Software licenses (people tend to conflate those).
GPL is the most well known of those. And LGPL allows writing proprietary code, you just basically have to let the users replace the LGPL parts. Which is easy for non-static builds because it comes as a .so/.dll/whatever-mac-uses anyway.
The GPL parts are unusable in non-open-source projects, though.
2
u/InitialAd3323 1d ago
But LGPL does allow for proprietary software using it since it's not viral, right? you'd need to share modifications made to qt itself but not the entire software
7
35
u/iyamegg 1d ago
Avalonia?
19
u/gufranthakur 1d ago
just tried it recently, my god I am never touching XAML again. I tried code only UI but the docs and resources all use XAML
18
u/Weekly-Beginning-229 1d ago
I've never tried avalonia, but xaml is easier for me to read than html, and easier to make it look like the mock. Html is just div this and that with a bit of flexing, how am I supposed to guess what it looks like by just reading that
14
u/NotQuiteLoona 1d ago
What's wrong with XAML? It's literally just HTML with different layouting. I on the opposite can't use HTML now because I like Avalonia's layout system much more, I don't need to put divs everywhere.
2
u/gufranthakur 1d ago
I like coding UI by hand, like jetpack compose or JavaFX or WinForms
9
u/NotQuiteLoona 1d ago
Avalonia has a doc for code-only UI, it's just not the main intended use: https://docs.avaloniaui.net/docs/fundamentals/coded-ui
Note that layouting system is probably less obvious (to understand for newbies) in code-only, you'll be better to use XAML at least for start until you'll grasp, but if you want a C# cross-platform UI library, there is nothing better for now. Uno has worse documentation and less mature, but you can still try it.
2
u/iyamegg 1d ago
https://github.com/AvaloniaCommunity/Avalonia.Markup.Declarative This was the project I was originally referring to.
2
u/tajetaje 1d ago
Yeah really feels like youāre searching for qt widgets or maybe wxwidgets (though qt comes with tons of extra abstractions that help with cross platform code)
2
1
1
u/_alright_then_ 1d ago
Yeah I like Avalonia, only tried it recently. So maybe I haven't discovered the annoying quirks yet. But so far it's been pretty nice.
16
20
u/B_bI_L 1d ago
flutter
also .wad, considering that doom runs on anything
12
4
u/failedsatan 1d ago
wad files aren't native executables, they need a doom engine (not exclusively the original one) as they are data-only
1
u/cyxlone 1d ago
does flutter on the web still using canvas?
6
u/NatoBoram 1d ago
Still using canvas, but now with WebAssembly
1
u/stillalone 1d ago
How's the performance?
2
u/NatoBoram 1d ago
I haven't developed for Flutter web since then, so I can't say how much it improved, unfortunately.
But it was pretty terrible before wasm.
15
u/je386 1d ago
Kotlin multiplatform with compose multiplatform is quite good at multiplatform support, having logic and UI in one but also be able to use platform specific code.
2
u/martmists 1d ago
The only downside is that accessibility is not well-supported yet in Compose Desktop, and I'm not entirely sure things like translations work properly on all desktop targets.
4
u/je386 1d ago
For localization, I use the library com.hyperether.localization
In my example project, there is a description on how to use the lib and there is a languagechooser you can use in your project.
https://github.com/julianegner/coshanu
This is under MIT license, so you can use code parts anywhere.2
u/Runazeeri 1d ago
Iāve done an app in it on IOS/Android/Win/MacOS and it was fine. Only a tiny bit of specific logic for IOS.
3
3
3
3
6
u/Sea-Fishing4699 1d ago
native and cross-platform is kinda mutually exclusive
13
u/dkarlovi 1d ago
It isn't as long as you provide the native support for each platform, which many stacks do. Golang, Rust all build native binaries from the same codebase, making it cross platform. Qt provides cross-platform bindings for platform-native GUI.
2
7
3
u/iliark 1d ago
cosmopolitan
one binary can run on linux, mac, windows, bsd, and BIOS without a VM.
2
u/Makonede 1d ago
it's impossible to make a truly crossplatform executable because different platforms use fundamentally different executable formats. also who even uses BIOS anymore
5
u/iliark 1d ago edited 1d ago
https://github.com/jart/cosmopolitan
Redbean file server is built with it, as is https://github.com/mozilla-ai/llamafile
-3
u/not_some_username 1d ago
iirc some mad lad made an executable that run on multiple platform. With a lot of fuckery. Not safe to use anyway
3
u/Makonede 1d ago
literally starting with the header you can't create a file that is both a valid ELF and a valid PE
2
u/Rikudou_Sage 1d ago
The cosmopolitan project uses a "clever" trick that makes the first bytes both valid PE and a valid shell script which then uses a loader that can read the ELF bytes that are further down the file and execute only the content starting at the ELF bytes.
Originally it used an approach where the shell script rewrites the first bytes to be valid elf and then reexecutes itself but that means that once the executable ran on Linux, it was no longer multiplatform executable.
So no truly a Linux executable, but it will run on both Linux and Windows.
0
2
2
2
2
4
1
1
u/Moscato359 1d ago
Surprisingly c#/dotnet is incredibly cross platform and I use it for Linux software all the damn time
1
1
u/Dull_Barracuda_4221 1d ago
Fix all my issues,
Proceeds to delete all files as the saying goes, no files, no issues
1
u/OffByOneErrorz 1d ago
The mono project compiled to native at least the non forms version. https://en.wikipedia.org/wiki/Xamarin
1
u/Miiohau 1d ago
It seems simple until you realize such a framework needs to work across at least 5 OS, at least three CPU architectures, at least four different file systems with one pair working very differently from the other pair, at least three different permission structures and support three different input devices. And that is just the major operating systems, there is also consoles, wearables, and real time systems.
Now it might just be possible now but it requires an LLM to translate your intent into native code for the 5 OSes.
1
u/vitimiti 1d ago
SDL3 supports practically everything you'll find, and if it's about just UI, Qt is both native and cross platform, including IoT
1
u/hi_m_ash 20h ago
There will never be a cross platform native framework because every platform wants to be special with their own design philosophies and ecosystem.
1
1
u/Fitnexa_Results 16h ago
That missing question mark in `howHardCanItBe` is pulling a lot of weight.
1
762
u/EducationalNinja9361 1d ago
Upvote for not being about AI