DioxusLabs / dioxus

Fullstack GUI library for web, desktop, mobile, and more.
https://dioxuslabs.com
Apache License 2.0
19.54k stars 755 forks source link

Support automated bundling of appimage #451

Open evbo opened 2 years ago

evbo commented 2 years ago

Specific Demand

Two best use cases for appimages I can think of:

1. Imagine corporations with internal IT systems that don't permit you to install a thing; an environment where appimages thrive because they are (super sickyearly) drag and dropped and easily run. In these environments, where python scripts reign supreme, the majestic beauty of a Dioxus app would flourish, just as Tauri does with its appimage bundler.

2. Imagine highly containerized development environments, where each container has minimal installations of libraries needed. Suddenly, you want a "helper" utility. Some little GUI that does some stuff for debugging and is shared across a few of these containers. You could spin up yet another container, or install this little gui into them, but it's starting to get messy all the environment changes just to run a little thing. Instead, Appimages are a great way to make Linux-based code portable for minimalist dev environments. Just toss em in a docker volume and let whichever container that needs them run them with zero changes to the environment.

Implement Suggestion

appimages are probably the most painful feature to support for any library... Tauri's is imperfect, but it simply means you bundle an appimage for each individual flavor/version of linux (not 1 appimage to rule them all), which means you keep 5+ docker containers on hand for each environment you run in. A bit hacky but it works. So probably the quickest to done is showcasing a Dioxus web app that builds with Tauri. Then you can piggy back off of Tauri's appimage bundler. I haven't found a better alternative to Tauri's appmage bundler, so I am putting them on a bit of a pedestal, sorry. Some example helpers I use I'd rather not natively install in my containers: SQLite DB_Browser, Balena etcher,

jkelleyrtp commented 2 years ago

I like this idea!

I think a good proof-of-concept would be a repository with a Dioxus app and CI/CD doing the bundling manually.

We haven't added it yet, but the dioxus cli would be the ideal place for better bundling support.

dvc94ch commented 1 year ago

Have you considered using xbuild? I'm currently stripping all the flutter support to refocus it on rust GUIs. Takes care of three things. Downloading sdks for win, Mac, iOS, android. Configuring cargo/clang/lld properly to cross compile any rust/c code for the target and then packaging/signing the result. So for macos we can create a dmg, on android an apk etc. While all this might sound trivial using native tools, we can cross compile from Linux. I don't think there is a simpler way of doing iOS development on Linux for example. It also supports building appimages.

https://github.com/cloudpeers/xbuild/pull/79