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

Add support for Tauri (native desktop app) #19

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from
Draft

Conversation

walkah
Copy link
Contributor

@walkah walkah commented Nov 16, 2023

Description

This PR integrates tauri to bundle homestar and create a download & install desktop app.

To get this running:

  1. Copy the homestar binary for your platform into ./src-tauri/binaries naming it homestar-$TARGET_TRIPLE where $TARGET_TRIPLE is the result of rustc -Vv | grep host | cut -f2 -d' '. (For more details see: https://tauri.app/v1/guides/building/sidecar/ )
  2. Run npm install then npm run tauri dev

TODO

  • update app icons
  • figure out how best to bundle homestar (custom build script? github action?)
  • figure out build & release process
  • macOS currently has a security prompt for using WebCrypto
Screenshot 2023-11-16 at 5 18 00 PM

Type of change

Please delete options that are not relevant.

  • New feature (non-breaking change that adds functionality)
  • This change requires a documentation update

Screenshots/Screencaps

Please add previews of any UI Changes

Copy link

New dependencies detected. Learn more about Socket for GitHub ↗︎

Packages Version New capabilities Transitives Size Publisher
@tauri-apps/cli 1.5.6 environment +10 167 MB tauri-apps-ci-user

@avivash
Copy link
Member

avivash commented Nov 16, 2023

I'm getting this error when running npm run tauri dev, but let me know if it's too early to be playing with this yet. i know it's still just a draft PR 😅
image

@walkah
Copy link
Contributor Author

walkah commented Nov 17, 2023

I'm getting this error when running npm run tauri dev, but let me know if it's too early to be playing with this yet. i know it's still just a draft PR 😅

That's totally my fault, I added some more install instructions to this PR. Basically it's expecting a bundled homestar runtime binary (a la how ipfs-desktop works) but I haven't figured out the best way to automatically build that in (yet).

@avivash
Copy link
Member

avivash commented Nov 30, 2023

@walkah noob question here, but where do I copy the homestar binary from? I'm looking through $HOME/.cargo/bin, but can't find the binary 🤔 also looked through homestar

@walkah nevermind, TIL cargo build 😅

@avivash
Copy link
Member

avivash commented Nov 30, 2023

also, this isn't great haha, but i'm not sure there's much we can do about it right now
image

@avivash
Copy link
Member

avivash commented Nov 30, 2023

actually, i can try some of the workarounds here GHSA-2rcp-jvr4-r259

Update: I implemented the envPrefix workaround, which is basically the default behaviour anyway. It won't remove the npm audit warning, but it should remove any risk of having the env vars leaked

@avivash
Copy link
Member

avivash commented Nov 30, 2023

@walkah i went through the setup steps, but after running npm run tauri dev it keeps looping on this screen https://www.loom.com/share/658c68306a004f07b58f632e74bec5ea?sid=d4c44a23-5745-40f8-8f06-eca0592930c9

(one thought is maybe because i'm running out of hard drive space) i'm surprised i could actually fit the 30 gig binary on my computer 😅

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

Successfully merging this pull request may close these issues.

2 participants