quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.36k stars 2.56k forks source link

quarkus-electron (?) ability to make a electron desktop spp #40920

Open maxandersen opened 1 month ago

maxandersen commented 1 month ago

Description

Interested in this extension, please +1 via the emoji/reaction feature of GitHub (top right).

Would some be interested in extension that let's you bundle Quarkus as backend to an electron app?

Repository name

quarkus-electron

Short description

Create and bundle electron based desktop spps

Repository Homepage URL

https://quarkiverse.github.io/quarkiverse-docs//dev/

Repository Topics

Team Members

Additional context

No response

maxandersen commented 1 month ago

there are also approaches like https://github.com/tauri-apps/tauri that relies on the current system's webkit install.

maxandersen commented 1 month ago

and https://wails.io for golang.

the main difference from electron is that wails and tauri allow for tighter integration from/to the host language from javascript + not bundle its own electron app.

both have its up and downsides.

maxandersen commented 1 month ago

maybe https://github.com/chromiumembedded/java-cef would be an option to use as base then java/quarkus can drive the setup. this would be like electron but with java instead. and diff from wails and tauri is that it allows to bundle the specific binary runtime you want.

would be nice making tauri/wall option of reusing webkit from platform an option too but seems like something one could add later.

maxandersen commented 1 month ago

other interesting graalvm/js/chromium thing https://github.com/frank-dspeed/chromitex/tree/main

https://github.com/oracle/graal/issues/326 and https://github.com/lemanschik/web-modules/issues/4

csotiriou commented 1 month ago

I am somewhat confused by the title and description. The title of this thread is about using Quarkus with Electron, but the description mentions Quarkus be used as a backend for UI, which means replacing electron, so I'm a bit confused...

Electron's goal is to be able to

  1. Bundle the NodeJS runtime which is used by an application as backend for native OS Interactions (required for Desktop applications)
  2. Setup a message system / interop between the embedded browser environment (UI) and the NodeJS runtime so that actions can be triggered from the web side and affect the native side
  3. Setup a system to handle multi-window applications, something that browsers are clunky in.
  4. Be able to generate a desktop executable bundle, able to support all the distribution methodologies of Dekstop OSes (like Apple's notarization procedure, etc)

What parts of the above should / could Quarkus handle? Tauri and the likes are replacing electron as the backend, however, that means that one is not using electron at all.

For me, the value of using Quarkus would be to play the role of the backend, allowing Java to play the part that NodeJS currently plays. That would be valuable since it would allow Dependency Injection, reactive frameworks, and also native OS operations to be handled from Java instead of C++, Rust, or Go.

maxandersen commented 1 month ago

I opened it not fully knowing which approach is best.

I think quarkus-electron as an easy way to use nodejs/electron as a frontend to a java based backend would be nice. especially combined with quinoa or even webbundler.

That would probably be fairly easy to do and would enable easy building of "desktop apps" .

The next level is more like tauri where there is even tighter integration with the language runtime.

Feels like both are interesting. wdyt?

melloware commented 1 month ago

@maxandersen were you thinking like a Quinoa like extension but for electron?

maxandersen commented 1 month ago

@melloware well i was thinking might just use quinoa to do electron apps....? (haven't tested it :)