frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Using Go for Mobile Apps

https://www.davidsobsessions.com/p/one-year-of-gomobile/
18•theHocineSaad•4h ago

Comments

nasretdinov•1h ago
Given 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 interactions between the two being unaware of each other that might cause issues

gen2brain•51m ago
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.
iamcalledrob•41m ago
I've built and shipped some native-UI cross-platform apps to millions of devices, powered by a Go shared library. It works. It's fantastic to use the same language on client and server, and the end-to-end testing story is really strong.

However, in my opinion, "Go Mobile" is a bit of a red herring if you just want a cross-platform shared library. I wouldn't recommend starting there.

It's optimised for writing and packaging an entire app in Go. Incremental builds don't work well (or at all), and cobbled-together "build system" is more to debug. It's also oriented around iOS and Android, which isn't great if you eventually want a native desktop app too. The generated bindings are okay, but the author's approach of using Protobuf (or some kind of wire format + simple API) means you don't really need them.

I found that it's more straightforward to just compile Go code into a library that can be called from C -- and thus can be called from anywhere. Call into it natively from Swift, and via JNI on Android and desktop JVM. With the right toolchain, you can cross-compile pretty easily too.

The biggest issue is that on Android you often want to talk to the OS, but the OS only speaks JVM. https://github.com/timob/jnigi "solves" this, although you will hate your life manually constructing JVM calls that you can't easily test.

gen2brain•18m ago
I did something similar with `go bind`, a library used on both desktop and Android, they simply exchanged JSON, though not on millions of devices. However, today I have a nice cross-platform UI library with native controls, based on IUP, where cross-platform actually means everything, including iOS and Android (and even Haiku). So, you write an app in plain Go, just once, that's it. OK, you would not want the same layout on desktop and mobile, of course, but still the same app.

However, it is still a work in progress, and I would like to improve the mobile support. There are currently many Android-only or iOS-only attributes, but users would still miss some APIs. What are the most essential OS APIs one would need in the app? You can check the library here https://github.com/gen2brain/iup-go .

pjmlp•7m ago
Small correction, Android doesn't speak JVM, it speaks ART, and it isn't exactly the same.
kqr•40m ago
Vaguely related realisation I had a couple of years ago: if you don't need a complicated mobile app, but just something simple for your own use, you can write and run Perl scripts in Termux and there you go – an app, without learning any Android at all!
dizhn•38m ago
I don't get why with all the plumbing the author already set up, Go had to be part of the mobile app at all. Could have been a clean flutter/dart UI with a Go backend. (All of these they already have but somehow they have to deal with passing binary data between Go mobile and dart?)
pjmlp•8m ago
Some people love to make their life harder.

I have long time ago learned to use the official SDK languages for a language and be done with it.

Sleep regularity is a stronger predictor of mortality risk than sleep duration (2023)

https://academic.oup.com/sleep/article/47/1/zsad253/7280269
258•bilsbie•2h ago•114 comments

The Three-Second Theft: Why AI Voice Fraud Outruns Every Defence

https://smarterarticles.co.uk/the-three-second-theft-why-ai-voice-fraud-outruns-every-defence
39•dxs•56m ago•20 comments

Mysteries of Telegram Data Centers

https://dev.moe/en/3025
29•theanonymousone•53m ago•4 comments

Jurassic Park computers in excruciating detail

https://fabiensanglard.net/jurrasic_park_computers/index.html
668•vinhnx•11h ago•166 comments

Privacy Incidents – Real-world examples of why your photos need protection

https://snapsafe.org/incidents.html
31•Cider9986•56m ago•1 comments

SpaceX bond worth 10% less than issue price – heading for junk bond status

https://www.ft.com/content/3a023b95-66c3-41e1-b0ce-df752a499541
124•youngtaff•1h ago•33 comments

Briar Is in Maintenance Mode

https://briarproject.org/news/2026-maintenance-mode/
28•ristello•1h ago•5 comments

Prioritize mental health, and why communication is so important

https://ramones.dev/posts/mental-health/
78•ramon156•2h ago•57 comments

Weathergotchi – an open-source climate Tamagotchi

https://github.com/Michael-Manning/E-Paper-Climate-Logger
44•luanmuniz•3h ago•12 comments

Jiga (YC W21) is hiring the best people to make manufacturing great again

https://jiga.io/about-us/
1•grmmph•2h ago

A Trip to 90s Kansai: Exploring the XD FirstClass Network BBS

https://cdrom.ca/games/2026/05/30/xd.html
35•zetamax•1d ago•2 comments

Societal Impacts: Claude's values across models and languages

https://www.anthropic.com/research/claude-values-models-languages
30•taubek•3h ago•33 comments

Show HN: Grepathy – Claude made a decision nobody approved

https://github.com/evansjp/grepathy
7•evansjp•48m ago•7 comments

What's the most popular number in Hacker News titles?

https://blog.omgmog.net/post/most-popular-numbers-in-hn-post-titles/
9•omgmog•1h ago•6 comments

Ask HN: Is it just me, or is software buggier across the board?

18•kadhirvelm•34m ago•16 comments

Germany maybe found a new source of renewable energy

https://www.schweizerbart.de/papers/zdgg/detail/prepub/108503/Geological_and_geophysical_characte...
17•janandonly•1h ago•6 comments

DSLs Enable Reliable Use of LLMs

https://martinfowler.com/articles/llm-and-dsls.html
74•SirOibaf•4h ago•46 comments

Telegram Serverless

https://core.telegram.org/bots/serverless
73•soheilpro•4h ago•44 comments

Neverclick: Desktop application for performing mouse actions with your keyboard

https://github.com/LazoVelko/neverclick
42•thunderbong•3d ago•39 comments

Vancouver PD website features Quick Escape button that wipes itself from history

https://vpd.ca/
318•LookAtThatBacon•13h ago•128 comments

Bootstrapping GDC with DMD

https://briancallahan.net/blog/20260713.html
6•LorenDB•1d ago•0 comments

What `for x in y` hides from you – From Scratch Code

https://fromscratchcode.com/blog/what-for-x-in-y-hides-from-you/
9•rbanffy•1h ago•5 comments

TS-2026-009: Insecure argument handling in Tailscale SSH permitted root access

https://tailscale.com/security-bulletins
188•jervant•13h ago•114 comments

Show HN: I built a smart proxy so your coding agent can run loose

https://trollbridge.dev/
7•dandriscoll•23h ago•4 comments

Using Go for Mobile Apps

https://www.davidsobsessions.com/p/one-year-of-gomobile/
18•theHocineSaad•4h ago•8 comments

Latent Space as a New Medium

https://kevinkelly.substack.com/p/latent-space-as-a-new-medium
24•thm•1d ago•4 comments

Who's running all those tiny RPKI servers?

https://blog.apnic.net/2026/07/15/whos-running-all-those-tiny-rpki-servers/
59•enz•7h ago•10 comments

Combinatorial Games in Lean

https://github.com/vihdzp/combinatorial-games
27•wertyk•3d ago•3 comments

Microsoft has released software updates to plug at least 570 security holes

https://krebsonsecurity.com/2026/07/microsoft-patches-a-record-570-security-flaws/
170•robin_reala•16h ago•104 comments

If you want Claude to speak nicely to you, try Hindi or Arabic

https://www.theregister.com/ai-and-ml/2026/07/14/if-you-want-claude-to-speak-nicely-to-you-try-hi...
10•Bender•1h ago•0 comments