-
Notifications
You must be signed in to change notification settings - Fork 866
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
"Nativeness" of IPFS Desktop #867
Comments
Not entirely "native" but DeskGap could be a viable lighter-weight alternative too, it uses the OS webview rather than bundling chromium. Might we worth experimenting with. |
@cwaring didn't know that! I'll keep an eye of them. They're still missing really important APIs for us such as Tray. |
My concerns about switching from a single language/library to three would be related to PMing challenges:
That being said, if we keep app's surface small, getting MVP in sync on all three platforms would be mostly a one-time effort. Everything else would be platform-specific native integrations that do not block/lag other implementations. |
@lidel for me, the main feature of IPFS Desktop is to keep running IPFS in the background. Everything else are native integrations (drag'n'drop, add to context menu, protocol handling, etc...). I can't see many features that could be considered 'attached' to what IPFS Desktop is. Perhaps if we added the possibility of running multiple versions/nodes yes, that would be required to be in all implementations, but those are good functionalities. I think the main point is to provide good and reliable native integrations. So... I agree with you and I believe that basically what we have now is IPFS running + native integrations. The only thing we'd need to ditch is the Web UI inside a Window perhaps. But I don't think that'd be a really big/important change IMO. We could even tell that Web UI's running through Desktop with a URL query value. What do you think? I've been actually taking a look at Swift on macOS and it seems quite straightforward. The only API we use on Desktop and the one important for the native integrations are related to the files. Basically we'd just need to call the daemon directly or use the HTTP Api. It's not really a big thing to implement. At least this is what I think. |
I'd like to improve the stability of what we have first. I think 0.7 is a good release, but I know we can make it better. We're a small team with a large number of websites and apps to look after, so I'd rather we spend the next quarter improving what we have before we explore starting again. I do totally take your point @hacdias that now we have reduced the scope of IPFS Desktop right down, it'd make a lot of sense to try out a fully native alternative, but don't forget that we need to also come up with reliable installers and update mechanism for each platform, it just feels like we should spend our time improving proto.school and js-ipfs and webui in time for camp.ipfs.io as a much higher priority. |
Something just caught my eye: https://wails.io/ |
I think Tauri would work better tbh, as there is Android and iOS support in the works right now, but I could be wrong here. :) |
Just FYI - I tried https://github.com/fyne-io/fyne and it looks promising, but I couldn't get it to work. |
Fyi that selfupdate is possible with wails. Example at https://github.com/achhabra2/riftshare/blob/main/internal/update/selfupdate.go Wails self-update convo at wailsapp/wails#1178 |
Wails maintainer here 👋 Would be happy to support your efforts if you decided to use it or do a PoC 👍 |
@leaanthony I attempted a small PoC with https://github.com/SgtPooki/ipfs-desktop-wails but i'm not a gopher and i'm not sure how best to execute another go-cli(https://github.com/ipfs/kubo) as a subprocess. Ideally, Kubo functionality should all exist in https://github.com/ipfs/boxo but we're not there yet. I attempted a PoC with https://github.com/SgtPooki/ipfs-desktop-wails. But I haven't touched it in a while. I think the only blocker for me right now is figuring out how to execute Kubo on the backend (and get TS types from Kubo's go types) to allow for easy migration to Boxo in the future. If anyone wants to help with that repo, please let me know and I can add you as a maintainer. |
I am not sure if I can be "maintainer" level, but count me interested. Also, @SgtPooki, should we create GitHub discussion or maybe Discord channel on IPFS server to discuss this alternative implementation? ie. I am not sure it is right move to have process fork to run Kubo, while you can just allow (for now) users to run pure Kubo or IPFS Desktop in background, while ipfs-desktop-wails is in alpha state. Also, I was not entirely able to get the embed the IPFS (web) UI to get work from your repo, Later on, ipfs-desktop-wails can be bound to Boxo library and even (ideally) use Go layer instead of JavaScript one. Anyway, I am more than happy to dive into this - I just think we need different thread for that :-/ |
You can expose Go structs and methods to TS via the automatic bindings and model generator. It's not perfect but works for most use cases. |
My understanding is that the conversation on Wails stalled due to the lack of resources. Personally, I'd love to make ipfs-desktop more lean, and leave Electron behind, but rewriting with a different engine requires full-time commitment over a long period of time, which the team is not able to allocate right now. If someone is determined to help and make this happen, In my mind, problems that need to be solved by such person (in order):
Mind, until autoupdate story is not ready, there is no point in spending time porting functionality. |
We don't have an official updater because the feedback from the community was that people wanted to make their own as they have different needs. Not that it's hard mind: https://github.com/achhabra2/riftshare/blob/main/internal/update/selfupdate.go There are plenty of libraries to achieve this, such as https://github.com/fynelabs/selfupdate - The Go way is to compose. Wails is a bit of an exception in being so opinionated. Anyway, if you need any help with this, you know where we are 👍 |
As of building #866, we clearly verify that the app could be much better and simpler if done natively or with something else than Electron that is even snappier/faster. Although, the approach of going full native have pros and cons. I'd like to discuss with you all if this is an effort we should focus on or not.
How
By going native, we'd need to create separate macOS, Windows and Linux apps. During transition period, we could eventually build one by one and keep the Electron version alongside.
We could perhaps have a shared library in C++ if needed for something like a
ipfsd-ctl
. Or perhaps we wouldn't even need it.Cons
Usually people start by the pros, but I thought about starting with the negative aspects of going native:
Pros
On the bright side of the situation:
I'd really like your thoughts on this. There are some things I'd like to implement (native integrations) but that won't be really easy to do with Electron/Node.js. Not impossible, just harder.
This would be a big change and would require a lot of work. Would it be worth it?
The text was updated successfully, but these errors were encountered: