frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Build Android apps using Rust and Iced

https://github.com/ibaryshnikov/android-iced-example
30•rekireki•4h ago
Some time ago I decided to try building an Android app using Rust. After a few weeks I got it working. There was a new iced release recently, so I've just updated the example to new iced and wgpu. I'd like to share my experience to attract more attention to Rust on Android.

First things, I want to thank all the people who work on the foundational crates and tools such as: - https://github.com/rust-mobile/android-activity - https://github.com/jni-rs/jni-rs - https://github.com/gfx-rs/wgpu - https://github.com/rust-windowing/winit - and many others

When I started I had to learn what tools and examples already exist. Luckily, there's a good set of examples using both NativeActivity and GameActivity: https://github.com/rust-mobile/rust-android-examples

The basic approach is that we take android-activity, winit and wgpu and that's it. On top of that you can find a few egui examples in the rust-android-examples repo.

Alright, so after I've got the basic examples running, I wanted to combine them with iced. Iced is a crossplatform gui library focusing on desktop and web. The mobile support is explicitly a non-goal, as far as I can tell at the moment of writing. Yet, there's an issue where some people posted their experiments. That's how I knew it was possible: https://github.com/iced-rs/iced/issues/302

There's a way to integrate iced in wgpu applications, so called integration example: https://github.com/iced-rs/iced/tree/0.14.0/examples/integra...

Above I mentioned that using winit and wgpu in combination with android-activity is enough to build the app. Putting together 1 + 1 I got 2: let's use iced integration example with android-activity. It was quite easy to compile with almost no errors. First issue I encountered is that there was no text rendered. I solved this by loading fonts the way it was shown here: https://github.com/pop-os/cosmic-text/issues/243#issue-21899...

Then I patched a few widgets to add touch support. And that's it. My role here was to take all the prior work and combine it together in a way that there's a working example.

Some other ways of building Android apps using Rust: - xilem has an explicit goal to support mobile https://github.com/linebender/xilem - egui supports mobile https://github.com/emilk/egui - game engines such as Fyrox and Bevy support mobile: - https://github.com/FyroxEngine/Fyrox - https://github.com/bevyengine/bevy - pretty much anything built on top of winit and wgpu

All of the above is related to building native apps using either NativeActivity or GameActivity. I'm leaving webview out of scope of current post.

What about iOS? As far as I know it should be similar or maybe simpler compared to Android. I haven't built it yet, but the next time I have a sizeable amount of free time, I'll try to make it work. The plan is the same: pick winit, wgpu, iced integration example, mix it together until it works. It'll require the same trick to load fonts, and maybe something else, but no visible blockers as of now.

Once again, thanks to all the people who made it possible and I wish you have a great time building mobile apps with Rust!

Comments

bbkane•1h ago
Super impressive, can you link to this post in that issue?

I'd like to try iced, but switched to egui on the official Android support.

nubinetwork•49m ago
Just in time for google to block sideloading and blocking new apps unless you pay them 6 figures...
serial_dev•43m ago
You gotta check Crux: Cross-platform app development in Rust

https://github.com/redbadger/crux

phi-go•14m ago
Crux seems interesting to share app logic between platforms but I don't see how it helps actually render something. Don't you still need a gui framework that supports android or ios?
bbkane•1m ago
Yes (from the README)
vlovich123•37m ago
How does this compare for you with slint and dioxus? Dioxus uses web views but still a small app (based on Tauri which uses the OS web view instead of shipping the browser) and slint is native, but may have some slightly more unique license terms than typical Rust projects.
nicoburns•19m ago
There is a huge amount of potential for shared infrastructure for "native integrations" for Rust UI projects. Think: React Native modules but in Rust.

I'm hoping this can be a reality sooner rather than later. But we're definitely lacking in manpower willing or able to work on the more foundational pieces. Winit in particular is sadly undermaintained. 1 or 2 people working full time on Winit and/or other platform integration pieces would do wonders for the ecosystem.

A guide to local coding models

https://www.aiforswes.com/p/you-dont-need-to-spend-100mo-on-claude
338•mpweiher•9h ago•170 comments

Deliberate Internet Shutdowns

https://www.schneier.com/blog/archives/2025/12/deliberate-internet-shutdowns.html
114•WaitWaitWha•3d ago•35 comments

Webb observes exoplanet that may have an exotic helium and carbon atmosphere

https://science.nasa.gov/missions/webb/nasas-webb-observes-exoplanet-whose-composition-defies-exp...
26•taubek•2d ago•4 comments

I'm just having fun

https://jyn.dev/i-m-just-having-fun/
276•lemper•5d ago•86 comments

Disney Imagineering Debuts Next-Generation Robotic Character, Olaf

https://disneyparksblog.com/disney-experiences/robotic-olaf-marks-new-era-of-disney-innovation/
156•ChrisArchitect•8h ago•64 comments

Show HN: Books mentioned on Hacker News in 2025

https://hackernews-readings-613604506318.us-west1.run.app
391•seinvak•13h ago•148 comments

Build Android apps using Rust and Iced

https://github.com/ibaryshnikov/android-iced-example
30•rekireki•4h ago•9 comments

ONNX Runtime and CoreML May Silently Convert Your Model to FP16

https://ym2132.github.io/ONNX_MLProgram_NN_exploration
54•Two_hands•5h ago•7 comments

Kernighan's Lever

https://linusakesson.net/programming/kernighans-lever/index.php
28•xk3•2d ago•9 comments

Show HN: Rust/WASM lighting data toolkit – parses legacy formats, generates SVGs

https://eulumdat.icu
9•holg•9h ago•0 comments

CO2 batteries that store grid energy take off globally

https://spectrum.ieee.org/co2-battery-energy-storage
197•rbanffy•14h ago•167 comments

Show HN: WalletWallet – create Apple passes from anything

https://walletwallet.alen.ro/
341•alentodorov•14h ago•98 comments

Luke Howard’s essay on the modification of clouds (1865)

https://publicdomainreview.org/collection/essay-on-the-modification-of-clouds/
6•Petiver•17h ago•0 comments

I program on the subway

https://www.scd31.com/posts/programming-on-the-subway
199•evankhoury•5d ago•134 comments

Evaluating chain-of-thought monitorability

https://openai.com/index/evaluating-chain-of-thought-monitorability/
45•mfiguiere•3d ago•16 comments

Show HN: Autograd.c – A tiny ML framework built from scratch

https://github.com/sueszli/autograd.c
77•sueszli•5d ago•8 comments

The Going Dark initiative or ProtectEU is a Chat Control 3.0 attempt

https://mastodon.online/@mullvadnet/115742530333573065
517•janandonly•11h ago•168 comments

Functional Flocking Quadtree in ClojureScript

https://www.lbjgruppen.com/en/posts/flocking-quadtrees
8•lbj•5d ago•0 comments

Exploring Speculative JIT Compilation for Emacs Lisp with Java

https://kyo.iroiro.party/en/posts/juicemacs-exploring-jit-for-elisp/
8•gudzpoz•2d ago•1 comments

Aliasing

https://xania.org/202512/15-aliasing-in-general
3•ibobev•5d ago•0 comments

Cursed circuits #3: true mathematics

https://lcamtuf.substack.com/p/cursed-circuits-3-true-mathematics
3•zdw•1h ago•0 comments

Autoland saves King Air, everyone reported safe

https://avbrief.com/autoland-saves-king-air-everyone-reported-safe/
196•bradleybuda•13h ago•112 comments

E.W.Dijkstra Archive

https://www.cs.utexas.edu/~EWD/welcome.html
129•surprisetalk•14h ago•12 comments

86Box v5.3

https://86box.net/2025/12/21/86box-v5-3.html
52•chungy•4h ago•1 comments

You’re not burnt out, you’re existentially starving

https://neilthanedar.com/youre-not-burnt-out-youre-existentially-starving/
265•thanedar•11h ago•317 comments

Ruby website redesigned

https://www.ruby-lang.org/en/
385•psxuaw•23h ago•157 comments

Indoor tanning makes youthful skin much older on a genetic level

https://www.ucsf.edu/news/2025/12/431206/indoor-tanning-makes-youthful-skin-much-older-genetic-level
232•SanjayMehta•1d ago•175 comments

I can't upgrade to Windows 11, now leave me alone

https://idiallo.com/byte-size/cant-update-to-windows-11-leave-me-alone
435•firefoxd•11h ago•403 comments

Waymo halts service during S.F. blackout after causing traffic jams

https://missionlocal.org/2025/12/sf-waymo-halts-service-blackout/
239•rwoll•1d ago•340 comments

Structured outputs create false confidence

https://boundaryml.com/blog/structured-outputs-create-false-confidence
130•gmays•15h ago•60 comments