Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Snap Package Support #6532

Open
wants to merge 8 commits into
base: dev
Choose a base branch
from
Open

feat: add Snap Package Support #6532

wants to merge 8 commits into from

Conversation

fetzsav
Copy link
Contributor

@fetzsav fetzsav commented Mar 22, 2023

What kind of change does this PR introduce?

  • Bugfix
  • [✅] Feature
  • Docs
  • New Binding issue #___
  • Code style update
  • Refactor
  • Build-related changes
  • Other, please describe:

Does this PR introduce a breaking change?

  • Yes, and the changes were approved in issue #___
  • [✅] No

Checklist

  • [✅] When resolving issues, they are referenced in the PR's title (e.g fix: remove a typo, closes #___, #___)
  • [✅] A change file is added if any packages will require a version bump due to this PR per the instructions in the readme.
  • [✅] I have added a convincing reason for adding this feature, if necessary

Other information

##This PR is not ready for merge, but I wanted to go ahead and post it so as to avoid anyone else doing double work or anything.

This will allow tauri-cli's bundler to bundle straight to .snap packages, which can be submitted to the snap store. This will increase compatibility across Linux distros, especially with the v2 release coming. I would like to support all Snap cores (core18, core20, and core22), although due to Tauri's v2 release, we may only be able to use core22 (webkitgtk dependency). This is still in the air.

Of course, any concerns etc. please drop them here. I plan on using serde_yaml crate to parse and generate the yaml files for Snapcraft.

Currently, I've opted to let Tauri handle compiling the project before bundling everything together in snapcraft. Typically, snapcraft will compile the project as well... although I've been having trouble with tauri-cli inside the Snap VM.

@fetzsav fetzsav requested a review from a team as a code owner March 22, 2023 17:46
@amrbashir amrbashir changed the title [feut (issue #4402)] Snap Package Support feat: add Snap Package Support, closes #4402 Mar 22, 2023
@Beanow
Copy link
Member

Beanow commented Mar 25, 2023

Thanks for helping out there @fetzsav!

A few housekeeping notes.

@Beanow Beanow changed the title feat: add Snap Package Support, closes #4402 feat: add Snap Package Support Mar 25, 2023
@Beanow
Copy link
Member

Beanow commented Mar 25, 2023

On topic, one of the big hurdles for adding new targets, is maintaining it for the long run.
Maybe you can talk a bit about the implications of targeting core18, core20, and core22?
What issues could we expect if we dropped some of them?

@fetzsav
Copy link
Contributor Author

fetzsav commented Mar 25, 2023

Issue #4402 sorta side bars off with another user requesting more bundlers to be added to the cli, specifically mentioning snap.

I feel it is closely enough related that you can pretty much call it the same thing. Regardless, the issue is just a feut request, not a bug, so I think we can assume this is nearly the same feuture request from the community as well. Just how I was seeing it, but am new to contributing to opensource.

As for snap core’s, and dropping older cores… I’ll get some answers for you today. Ill be working more on this PR this afternoon. This has been discussed in the Discord a couple times as well.

@fetzsav
Copy link
Contributor Author

fetzsav commented Mar 28, 2023

On topic, one of the big hurdles for adding new targets, is maintaining it for the long run. Maybe you can talk a bit about the implications of targeting core18, core20, and core22? What issues could we expect if we dropped some of them?

As of now, it is logical to only support core22. Older snap cores... which are based on older versions of Ubuntu, do not have the required glibc and webkitgtk versions that Tauri requires.

Update to status of PR:
FINAL STAGES

The PR is in it's final stage, and is working via:
./cargo-tauri build -b snap

Which places the .snap file in your src-tauri/target folder.

I would like to test more on some fresh environments and distros, along with some proofreading and tidying up before getting ready to merge.

Let me know if anyone has any concerns / questions.

@sekwah41
Copy link

sekwah41 commented Oct 1, 2023

Any news on this?

@fetzsav
Copy link
Contributor Author

fetzsav commented Oct 2, 2023

Any news on this?

Hello, forgot about this PR and haven't looked in awhile. Let me fix the merge conflicts quickly and then I want to run some testing on a couple different distributions / architectures, as I think I've only tested this on x86_64 Ubuntu 23.

Working on it today, should be ready for merge soon.

@RoseBlume
Copy link

I am concerned about usage on non debian based distros, will snapcraft be a requirement? If so will there be docs on how to install for each distro?

@ninjadev64
Copy link

Say NO to Snap!
(obviously just my thoughts, don't mean to interject)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: 📬Proposal
Development

Successfully merging this pull request may close these issues.

None yet

5 participants