# Cubacadabra's Rust Core Eliminates Triplicate Mobile Code

Original title: The Magic Behind Cubacadabra

> Hacker News story 49647860 · language: en · submitted 2026-09-10
> Web version: https://zeli.app/story/49647860
> About this feed: https://zeli.app/llms.txt · Agent guide: https://zeli.app/skill.md

▲ 16 · by [andrewfromx](<https://news.ycombinator.com/user?id=andrewfromx>) · 💬 7
[original](<https://andrewarrow.dev/2026/moon/2/day/19/the-magic-behind-cubacadabra/>) · [HN discussion](<https://news.ycombinator.com/item?id=49647860>)

## Summary

Cubacadabra shares portable app logic across iOS, Android, and web by moving it into Rust crates. Native shells handle only platform-specific UI and device services. One iOS commit removed 269 lines and added 106. The pattern handles username saves, multiplayer sessions, and rendering, with a C ABI on mobile and wasm-bindgen in the browser.

## Key quote

> I want to work out those interactions once. I don't want every new rule to become a coordination problem between three implementations.

## HN discussion (7 comments)

### [Heliodex](<https://news.ycombinator.com/item?id=49679081>)

> https://github.com/cubacadabra/first-game/blob/main/src/main...
>
> I'm puzzled by the -- @import comment syntax used in these main files. Did they have to build custom Luau tooling for type-checking across files for this, and why not use require()?
>
> Other than this, the example games had easily readable and clear code.

### [jnellis](<https://news.ycombinator.com/item?id=49678926>)

> Is it a floor wax or a dessert topping?  I don't know. Don't make me follow other links or search to find out.

### [w4yai](<https://news.ycombinator.com/item?id=49677174>)

> Is the header image supposed to jiggle that much ? Firefox.

---

## Cite

- Page: https://zeli.app/story/49647860
- Date: 2026-09-10
- Source: andrewarrow.dev (https://andrewarrow.dev/2026/moon/2/day/19/the-magic-behind-cubacadabra/)
- Hacker News: https://news.ycombinator.com/item?id=49647860

## Other languages

- zh: https://zeli.app/zh/story/49647860 · markdown: https://zeli.app/zh/story/49647860.md
- ja: https://zeli.app/ja/story/49647860 · markdown: https://zeli.app/ja/story/49647860.md
- ko: https://zeli.app/ko/story/49647860 · markdown: https://zeli.app/ko/story/49647860.md
- de: https://zeli.app/de/story/49647860 · markdown: https://zeli.app/de/story/49647860.md
- es: https://zeli.app/es/story/49647860 · markdown: https://zeli.app/es/story/49647860.md
- ru: https://zeli.app/ru/story/49647860 · markdown: https://zeli.app/ru/story/49647860.md
