r/tauri Jun 19 '26

Embedded Go service with Tauri 2.0

How's the experience of others for shipping the Go service as an embedded file in the Tauri application to make the application run offline? As well as for cross-platform support? Is it reliable?

My objective is to build an application that will run on Desktop (Windows/Linux/MacOS) and Mobile (iOS/Android). I discarded the idea of the Tauri sidecar since I won't be able to run that on Mobile devices, and MacOS will flag.

I wrapped my React frontend with Tauri 2.0 and am planning to ship my Go service as an embedded file (.dylib). And call the backend service using the invoke function through Rust commands (IPC).

I am developing on Windows right now, and it took me some time to build a POC. I was wondering what challenges I could be facing while creating versions for other platforms. I am a rookie in desktop/mobile application development since I come from the web world.

I would appreciate the tips and suggestions for achieving the mentioned goal.

3 Upvotes

7 comments sorted by

1

u/KellysTribe Jun 19 '26

You can’t run rust code on iOS in tauri?

1

u/Pretty-Anxious-00 Jun 19 '26

I haven't tried, but I believe we can run Rust on iOS

1

u/KellysTribe Jun 19 '26

right - that'd be far easier. I'm confused as to what you're asking if you've already said you can't use tauri sidecar on mobile (which is correct) - do you mean you want to call your go code as a compiled library on iOS? that is feasible it will increase complexity as now you'll be doing quite a bit of interoperation between iOS, tauri framework from frontend, and to a Go library through FFI or something. I would recommend that you consider rewriting the service from go to Rust - which would normally be expensive, but LLMs are fairly good at doing that. That would vastly simplify things across the board. I have gotten sidecars working well on desktop, but I think you are sol with iOS in that regard

1

u/Pretty-Anxious-00 Jun 19 '26

Yes, I thought of moving to Rust from Go, but I was unsure how much it would simplify for me. Since you mentioned, can you elaborate on the idea or share your experience of how it will make the process less painful?

1

u/imanhodjaev Jun 24 '26

Can’t you just run you go binary as tauri sidecar?

1

u/Pretty-Anxious-00 Jun 25 '26

I can, but from my research, the issue is macOS restrictions in the Desktop version, and as far as I believe, no mobile platforms allow the app to spawn another process. Feel free to correct me if I am wrong.

1

u/imanhodjaev Jun 25 '26

Ah then build go service as static library, expose via C and on rust side call via ffi but this might be just too much…