Comment by hypendev
7 days ago
I'm working on https://hypen.space/
It's a cross-platform UI framework for developing native mobile, desktop and web apps using Typescript, Rust, Go, Kotlin and Swift.
Currently it's aimed at "server-driven UI" where your app lives in the cloud but renders on the client, with full compilation to WASM packages coming soon. Of course, you can just embed the server/use it as a library.
Some cool things the framework does/has/lets you do:
- Renders real native components that look the same across platforms
- Out of the box routing system, tailwind support, accessibility and animations
- On the web, switch between DOM and canvas rendering with one boolean
- Embedding apps - you can embed Hypen in any app, but also embed any Hypen app into another Hypen app, letting you nest apps (i.e. the homescreen example)
- Deploy the whole app to CloudFlare just by using the adapter. Then you can have a whole desktop/mobile/web app running as a CF worker.
- You can build a mobile app feature in Hypen and update it by deploying to your backend, skipping app store reviews for bug fixes
- Build apps that share state across devices without building a whole sync layer
- Use DB as a data source - the current state can be persisted anywhere, so if you add a persistence plugin, you can use DB as a direct state source (i.e. have @db.messagess come directly from your DB)
- Make the app a normal part of your backend, use your stack, and just have a small Hypen part that emits the UI
- Let LLM's use your app - not via accessibility and screen reading, but purely exposing state and actions as tools. This is in progress as it's being built with the WASM target, but support will be soon included into the non-WASM builds too.
---
I started working on this about 6 years ago out of disappointment with the "mobile stack".
I've build a similar thing for internal use in companies multiple times over the last 10+ years, so I decided to build a public version too. And even tho it took me some time, and native/RN/Flutter got better in the meantime, I am still disappointed by all of them so I kept on building.
The original versions of it - parsers, engine, renderer - were written by hand in Kotlin, then got slowly migrated to Rust, but once LLM's got good enough the rest of it got built with AI based on my handwritten code and guidance. So it's not "vibecoded" into existence, but definitely AI re/written.
I really like this. The box/row/column UI generality is exactly what I have in my head and have not found anywhere, that alone will have me playing with it.
I'll also want to see how I can get it plugged into my Postgres database.
What are your goals for client-side performance in the browser? Do you make any claims to be better than React or Angular?
Glad you're liking it! If you ever encounter problems or have feedback, feel free to reach out (email in profile).
>What are your goals for client-side performance in the browser?
To have as minimal and efficient patches as possible - while there are some limits due to WASM serialization boundary, I believe nearly native TS/native TS speeds are achievable.
>Do you make any claims to be better than React or Angular?
Not yet - while the architecture is designed with that in mind, there is a loooot of low-hanging performance fruit lying around, so current perf is somewhere around 10x slower than React. A part of that is on purpose, to make debugging across engine and SDK's as easy as possible during development, and part of that is just simple bugs in internals/unimplemented changes. With some really minor fixes, it can get to about 2-3x of React.
I want to lock in the API's completely and achieve proper platform parity before going towards performance optimizations, as its only then that I feel the optimizations would be worth it. From 0.8-1.0 release, I'll be focusing more on performance itself and trimming it down.
Just to update - did some minor perf ops yesterday to cover some silly bugs in perf (like a late return causing O(n) iterations) and benchmarked on 1k item and 10k item lists. Currently it stands around 2-3x react, swapping rows in a list is faster than react and mutation is pretty much the same, will release that update today as a patch.