Omxcode: from button to GPU kernel, all in Mojo

Hi all.

What if one language wrote the whole app? What if it ran in one process on the GPU, with no backend at all? What if you built it for agents first, and people got the interface for free?

The button? Mojo. The data? Mojo. The GPU kernel? Still Mojo. :melting_face:

That’s omxcode, a framework from button to kernel in one language. Every screen is a toolbox for agents. Humans welcome.

:video_game: Want to play? Real app → Open the gallery. omxcode · gallery

:bar_chart: omxplorer: a spreadsheet with the video and documents behind every row, on your own GPU. Ask it a question in words. Download it and play: omxplorer · 100 million rows, a window that never waits

It runs on omxcore, a GPU-native SQL engine that ran all 22 TPC-H queries (SF10, one RTX 3090) in 3.15 s. DuckDB took 5.08 s. :duck::dashing_away:

:hammer_and_wrench: Want to build your own? (Linux for now) omxcode · one framework for every app, starting with data apps

Star it :star: if it sparks joy. File an issue :bug: if it doesn’t. We’ll fix it.

UPDATE

Ask an agent for a day in Lisbon and you get back a screen, not a wall of text: a map, a plan, the weather. A Mojo app draws it natively while the answer is still streaming in.

omxcode-film

What’s new:

  • Agents build real UI from 36 components, over standard AG-UI (checked against the official SDK). The agent can also run inside the app itself, with no server.
  • Screens build up as they arrive. You see the card, then the map, then the plan. Buttons send their answers back to the agent.
  • Every omxcode app is agent-ready, with no extra code: each button becomes a tool an agent can call.

Runs on Linux and the web today; the Mac is in progress.

Play it yourself: omxcode: write it in Mojo, ask an agent for a screen Learn more: Agents build screens · AG-UI in omxcode Your first app in ten minutes: Get started · omxcode

I want to build a geospatial 3D globe app that will run on my HPC system and ideally as a web app, I have had great success using rerun (rust) and recently wrote my own rasterizer so I can have Mojo native OGC APIs that are super performant and match the rest of my stack. My questions are :

  1. Will omxcode remain OSS and do I have to worry about vendor lock in?
  2. Could I implement my own components that are very geospatially centric?
  3. Do you see omxcode as an alternative to webassembly frameworks like gpui or rune or other such efforts?
  4. Do you have any suggestions/tips for me given I intend to move the 2D geospatial playground I built in Mojo and Python and Rust to your tool?

It will remain OSS.

Thanks for the detailed questions. A geospatial globe on HPC is exactly the kind of app I hoped someone would try. Here are honest answers:

1. Will it stay open source, and is there lock-in?
Yes. omxcode is MIT licensed and will stay that way. An app is plain Mojo: a view() that returns a tree of components and an update() that handles events. Your rasterizer and OGC code stay your own Mojo modules and don’t depend on omxcode. The thin “host” layer (GTK, web, AppKit, Android) is the only platform-specific part, and you can read it, fork it or replace it. The real dependency is Mojo itself, which you’ve already chosen.

One caveat: it’s early, and it’s mostly me working on it.

2. Can you write your own geospatial components?
Yes. That’s the main idea: the product is the component library, and apps are built from it. The building block you’d want is Canvas. It handles pan, zoom, tap, press, release, right-click, keys, and per-frame animation (on_frame). Content is drawn as a display list of keyed layers, and each host replays it on its own GPU path. For data-heavy layers you can run a Mojo GPU kernel. That’s how the point-cloud demo draws 20M points at about 1.5 ms a frame. Your rasterizer would fit as one of those layers: tiles or terrain drawn by your code, with labels, cursor and selection as cheap overlay layers on top.

There’s no ready-made 3D or globe component yet. You’d be building the first one!

3. Is it an alternative to gpui, rune and similar?
It overlaps, but the approach is different. gpui is native Rust. omxcode is “write it once in Mojo, draw with each platform’s own widgets and GPU path.” The web host today does not use wasm: the Mojo app runs on a server and streams its view and canvas frames to a small JavaScript renderer in the browser. That could suit HPC well, since the heavy compute stays on your nodes and the browser only displays. Mojo-to-wasm worked in a small spike, but Mojo doesn’t support it officially, so it’s parked for now.

4. Tips for porting your 2D playground:

  • Start on Linux plus the web host. Those are the most tested. Mac and iPhone build but haven’t been run much on real hardware.
  • Keep the rasterizer and OGC code as a separate Mojo package, and write a thin component that hands its output to a Canvas layer. That way you can still use it outside omxcode.
  • Move the 2D map first: tiles, pan and zoom, picking. Leave the globe projection until the interaction feels right. The gestures you need are already there.
  • Make data-heavy things (points, rasters) GPU layers, and keep UI-like things (labels, selection rings) as display-list items, so panning doesn’t redraw everything.
  • When you need something the framework doesn’t have, open an issue on the repo: GitHub - abhisheksreesaila/omxcode: Write an app once in Mojo; get native Linux, web, Mac and iPhone apps, with the GPU in the same language · GitHub. Real use cases like yours decide what gets built next.

Happy to look at your playground once you’ve started. Feel free to share a link.

1 Like

Thank you so much for your work, I will give it a wack and report back :slight_smile:

I put a globe example (haven’t tested it thoroughly). Feel free to check out.

1 Like

This is so cool!! I am trying to make it work on our end :slight_smile: