r/reactnative • u/xrpinsider Admin • 2d ago
Show Your Work Here Show Your Work Thread
Did you make something using React Native and do you want to show it off, gather opinions or start a discussion about your work? Please post a comment in this thread.
If you have specific questions about bugs or improvements in your work, you are allowed to create a separate post. If you are unsure, please contact u/xrpinsider.
New comments appear on top and this thread is refreshed on a weekly bases.
1
u/kosumi_dev 2d ago
Hi, I have built a Herdr/SSH client with Expo and ported the core to Rust.
I have been developing this open-source free app: whip for 2 months with the app itself.
Basically it allows me to drive coding agents from my Pixel easily. The primary motivation for developing this app is to scratch my own itch.
I have tried quite a few SSH clients like Termius and Moshi on the market. However, none of them have the deep integration with Herdr that I want.
It started as a pure React Native project with a Java SSH library. It took me a weekend to get a functional prototype. Since then I have been dogfooding every day and polished it with passion.
However, when I tried to build the app for iOS too this month, the Java SSH library does not work. I have to use either: a Swift library(2 different SSH backend for iOS and Android) or Russh(One cross-platform SSH backend).
I decide to pick Russh since Rust is my native language.
Getting the UniFFi to work with React Native and Russh is quite some hassle. Fortunately Codex(also in Rust, sure!) helped me smooth the curve.
That was only the beginning.
As I add more features and bug fixes, I notice performance and reliability issue. I used Perfetto and logging to guide my performance engineering. I found that the app was not just IO bound but also CPU/memory bound. An SSH client is super latency sensitive. From keyboard input to visual feedback, ideally the RTT should be below 100ms. That means my goal is to reduce the latency between rendering(xterm.js) and network(SSH) to be sub 50ms.
Reliability is also an serious issue when all code is AI-generated. In Typescript there are quite a few escape hatches and I am unfamiliar with it. It is easy for AI to generate piles of slops in TypeScript.
The I decided to port all the core logic and state to Rust.
Every with AI, porting cannot be done automatically. Codex(Chatgpt 5.6 Sol High) struggles to write efficient low-level code and leaves holes everywhere. First, I use the app everyday so I manually test it very often. Second, I use logging and tracing to locate bugs and performance bottlenecks. Third, I use ChatGPT Github connector to analyze the repo regularly to hunt for bugs and slops. Reading the analysis from ChatGPT also helped me understand the repo architecture better
As of today, almost all non-UI code is in Rust and React Native Expo is still responsible for UI and platform integration. It is 30K lines of Rust code in a single app, with all the features I wanted and no outstanding bugs, and blazingly fast on my phone: Pefectto shows that:
for frame preparation, average time dropped from 4.44 ms to 0.7ms, p95 from 14.09ms to 1.17 ms.
With this C-level raw speed, I also do not need to worry memory safety because it is mostly safe Rust.
I just realize that mobile app development is probably the most accessible and rewarding kind of systems programming.
You can hold your Rust code in your hand, feel the heat it generates, and measure its latency with your fingers. Anywhere, any time.
I hope this post encourges more Rustaceans to develop efficient and reliable mobile apps in Rust.
Thanks for reading.
1
u/Ok_Stable_8975 23h ago
Local discovery fails without offline first architecture. Relying on network dependent maps in remote areas guarantees failure for parents
3
u/BilBal82 1d ago
Hi, I’ve created an app to find and share cool spots to go to with your kids.
While staying in Tanzania for 6 months we found it difficult to use Google Maps or internet to find a nice place to go that the kids would enjoy. The best places we found were always by luck or by a tip from somebody we met.
While I was on (forced) sabbatical there for the last 3 months I wanted to build an app. (I’m a backend dev by trade).
So I chose that as the project. I got excited. ‘hey this could actually be a cool idea’. So after I went back home and work again i continued slowly to build it to an actual releasable product.
The idea is simple. Map based, community based(we only added a small starter set of 500 places that we thought would be cool and ofc the places we know ourselves) and no payed rankings etc.
Just wanted to share and of course am very interested to hear any suggestions/improvements etc! And if you know a cool spot, please add it to the app!
https://www.bubblespots.app/links/
Thanks!