The author uses Flutter for UI, Golang binary for the app backend, and uses channels passing serialized protobuf messages between them. Since adding a new API call requires changes in multiple places, they ended up defining a "god message" which has a oneof with all possible options: message CarrotAPI { oneof api { Function1API function1 = 10; Function2API function2 = 11; } } message Function1API { message Request {}…
I don’t get it. Why not just use dart for the app backend? I understand not using it on the server because it’s not mature there.
Using Go for Mobile Apps
21–27 of 27 posts
Re: Using Go for Mobile Apps
#22Re: Using Go for Mobile Apps
#23Given that even on Linux DNS resolution in Go can be quite... interesting without CGO being enabled, honestly it's hardly surprising that on iOS it would also be quite challenging. I imagine that one more interesting thing to consider is that on iOS you can't fork() or spawn sub-processes, so your Go mobile app is indeed running simultaneously as a Go binary and the UI, and there probably can exist countless interact…
Who enables CGO just for DNS resolution? That is not a thing for a long time, you just reminded me of that. Sure, if you have some complex config instead of a simple default, you would want to use libc and getaddrinfo, that is on you. What other issues are there? Go simple uses the network protocol for DNS, and it reads just resolve.conf; it does not care about LDAP or NSS or whatever there is.
Re: Using Go for Mobile Apps
#24Re: Using Go for Mobile Apps
#25I can highly recommend Rust for this. The same Rust engine powering web app (WASM + React), iOS (SwiftUI), Android (Kotlin Compose) and desktop (Tauri). https://github.com/koofr/vault
Honestly nowadays Swift seems a better fit IMHO, though it is probably a matter of taste.
Re: Using Go for Mobile Apps
#26Earlier quoted context omitted.
Honestly nowadays Swift seems a better fit IMHO, though it is probably a matter of taste.
Also for WASM? It's just not really there compared to Rust's wasm bindgen.