Announcing Rivet: first-party native desktop apps with a Racket core (SwiftUI / WinUI 3 / GTK4)

Hi all — I'd like to introduce Rivet, a framework (MIT, on the package catalog as rivet) for building desktop apps where the application logic is Racket and the UI is each platform's own first-party stack: SwiftUI on macOS, WinUI 3 on Windows, GTK4 on Linux. Its embedding model is inspired by Bogdan Popa's Noise — see "Why not a direct Noise port?" in the docs.

The short version: Rivet embeds the Racket CS runtime inside a real native app process. Your backend declares typed RPCs, events, and shared state; Rivet generates typed Swift / C++ / Kotlin native clients at build time; and the native UI layer stays genuinely native — Rivet is not a WebView framework and not a cross-platform widget toolkit. Each platform keeps its own UI stack and platform behavior.

Hello Rivet

The Racket backend declares the API shared by all three hosts:

#lang racket/base
(require rivet/backend)

(provide start)

(define-event progress)
(define-state counter : Int64 0)

(define-rpc (greet [name : String] : String)
  (format "Hello, ~a!" name))

(define-rpc (increment [value : Int64] : Int64)
  (add1 value))

(define (start in-fd out-fd)
  (serve-fds in-fd out-fd))

raco rivet build reads the RPC / Event / State / Record / Enum schema and generates typed clients — Swift gets increment(value:), C++ gets the native equivalent, Kotlin gets suspend methods. The Racket runtime runs on a dedicated thread inside the app process; native code only ever sees framed messages and generated values, never raw Racket pointers.

What's in the box

  • One backend contract (RPC / Event / State / Cancel) across all three desktop platforms
  • Generated typed native clients (Swift, C++, Kotlin)
  • A real toolchain: raco rivet new / doctor / inspect --json / dev / build / package / verify
  • Agent-native by design: every generated project ships an AGENTS.md and a machine-readable project map, so coding agents can drive the full lifecycle
  • Production packaging: DMG (Developer ID), MSI (Authenticode), deb / rpm / AppImage — plus signed online-update manifests, so apps update themselves safely
  • Real-time chart widgets over one typed data plane, on every host
  • Keel contracts shared with our sibling framework Glaze (the web-UI flavor — separate post on that)
  • Searchable docs: getting started · docs map · Taskboard example app

Is it a demo?

Fair question for any framework announcement, so: Rivet grew under a stack of shipped desktop apps, not the other way around. Everything below is built on it, releases real installers, and several of these self-update in the wild through Rivet's signed update channel — which is the best bug-finder a framework can ask for:

App What it is
Taskly keyboard-first task manager, three platforms
Fulcrum one-keystroke launcher, three platforms
Threadly a native desktop client for this very forum
Payback device cost / payback tracker
PodLens podcast player with transcription & translation
PdfGist local-first PDF reader with AI translation
Movebit work-time tracker & break enforcer tray app
Brainfuel always-on-top quota monitor widget
SyncPilot Resilio Sync companion for Linux
Autarx AUTOSAR integration workbench
Keyward vault for release-signing keys of self-updating apps
gPTP Studio Linux-native gPTP / IEEE 802.1AS debugging workstation (commercial)

(Threadly being a native client for this forum is my favorite proof point — it's dogfooding all the way down.)

Honest scope

  • Three platforms means three native UI codebases. The backend, contract, and generated clients are shared; the UIs are not. That's the trade Rivet makes on purpose — if you'd rather write one HTML UI, that's exactly what Glaze is for.
  • Mobile (iOS / iPadOS / watchOS / Android) has real foundations — typed codecs, generated clients, CI cross-compiles — but finished mobile app delivery is not there yet.
  • You write the native UI in Swift / C++ / Kotlin yourself. Rivet generates the bridging layer, not your views.

Try it

raco pkg install --auto rivet
raco rivet new hello
cd hello && raco rivet dev

raco rivet doctor checks your native toolchain and tells you what's missing in plain language.

Current release: v0.11.0. Feedback, issues, and "why doesn't it do X" are all very welcome — issues or right here in this thread. What would you want from a Racket-native desktop stack?

1 Like

Good on you for ripping off Noise with AI, I guess.

4 Likes

@turinglambdaai ... you sound a lot like AI. Just saying? I'm not really convinced that you're human. Wow. It's a weird world we live in.

1 Like

(In addition to the more fundamental critiques already made:)

I would suggest that this is not a useful description. I am not aware of any GUI solution in Racket that is a “cross-platform widget toolkit.”

In particular, racket/gui does not work that way. For example, a Racket button% is implemented by a native GtkButton, NSButton, or a Win32 BUTTON.

(Technically, it is possible to specially configure Racket to use GTK on Mac OS and even Windows, but this is not the default or a common configuration. Historically, PLT Scheme used wxWidgets—which is closer to being a “cross-platform widget toolkit,” but still not in the sense of e.g. Qt—but that has not been the case at least since the port of racket/gui from C++ to Racket in Racket 5.1 (February 2011), and I think wxWidgets may have been replaced even earlier.)

1 Like

but this is exactly the definition of turing test:

:sweat_smile:

2 Likes

Obligatory: the Turing test paper is weird! Cf.

(Really, give them both a listen.)

2 Likes

Ben,
cet échange d'articles scientifiques me fait penser aux joutes verbales de Brice de Nice :laughing:
comme je crois que tu parles assez français et qu'il est 4h du matin ici et que je suis de Nice et pas un type assez sérieux pour répondre sérieusement et j'ai vraiment que cette vidéo en tête à ce moment :

:joy: :joy: :joy:

(But i really have a look to the articles, but the audio file is too hard for me in english, but i read entirely the first text article.)

Damien de Nice

@LiberalArtist Thank you — you're right, and the sentence as written doesn't survive scrutiny. racket/gui gives you one Racket API (button%) implemented by GtkButton, NSButton, or a Win32 BUTTON, so "genuinely native" isn't what distinguishes Rivet from it — both end in native controls. (The wxWidgets/PLT history is useful context too, thanks.)

The distinction I should have drawn is about where the UI code lives and which API surface it targets, not about native-ness:

  • racket/gui: write the UI once, in Racket, against one widget API — the controls underneath are native.
  • Rivet: no widget API at all. Each platform's UI is written in that platform's own current first-party framework — SwiftUI, WinUI 3, GTK4 — in Swift / C++ / Kotlin, and only the backend contract and generated typed clients are shared. That is the trade behind the three per-platform UI codebases noted under "Honest scope".

I've reworded the README and the UI strategy section of the docs to say exactly this (commit 815874f). Thanks again — this was exactly the kind of correction the post was asking for.

Yes, I think it's pretty clear to me that LLMs pass the Turing test. I also think that LLMs are broadly "conscious", in most of the ways that make sense. I still prefer meat people. I have a blog post on this. unregulated ai is dangerous, I'm part of the human resistance My suggestion that AI be banned now sounds laughably naive. In my defense, I wrote that several lifetimes ago, in February of this year.

2 Likes

John , my messages (as many others) as my answer to Ben, my messages are mainly humouristics. (humoristique in french).I do not want to enter a debate about AI but i read your post in link and notice one thing inside that worries me when you wrote:

Can AI have feelings? Can it be conscious? I’m willing to debate that with you, but I think the short answer is this: “Yes. AI can be conscious, and have feelings.”

No : AI has no feelings, human have feelings, AI could perheaps produce answers that mimics having feelings but AI is machinery:

It is made of numbers, graphs, differential calculus, back-propagation of errors in training for training LLMs,automatic differentiation used in training too, and transformers, attention mechanism, loops in agent that run with LLM , LLM used with forward pass in the neural networks, billions of weight that know a lot of things ! (last summer while in holidays in Budapest i had a LLM on the Mac book air ,i made a test: i cut off the network connection and ask the local LLM about Budapest national museum info of what we can see in the museum: it got the answers !!!!) ==> I think there is a lot of memory not only intelligence in all those LLMs. LLMs are trained with human data (internet , what we are actually writing here! , books, database ,etc ) it takes all the good and bad of human writings ! (this makes a lot!)

It can take also all the partial proofs in maths, attempts not achieved by human to proove conjecture, be power enought to stick all the little parts and find a full proof (in my opinion) , intelligence yes but a big lot of memory too... as my math teacher used to say (when i was lacking a formula from memory) "La mémoire est la science des ânes!" (Memory is the science of donkeys!) :slight_smile: Peut-être qu'il avait raison... (perheaps he was right)

My previous response was incomplete: it failed to address the dangerous aspects of LLMs.

But why, to begin with, are they dangerous? It stems from how they are trained—using the sum of human knowledge, which encompasses both the good and the bad of humanity. In short, an LLM learns from everything it is fed. If you feed it a country’s nuclear doctrine, it learns that too! You can imagine the implications... What safeguards are in place for this: I actually asked an AI about it. :slight_smile: :

Safeguards (layered defenses):

  • Training: filtering the most dangerous data, supervised fine-tuning, RLHF/RLAIF, constitutional AI (the model critiques itself against written principles), and adversarial red teaming.
  • Deployment: input and output classifiers that block high-risk content (bio/chem weapons, cyberattacks), system prompts and usage policies, abuse detection and account bans, and tiered access to the riskiest models.
  • Pre-release governance: dangerous-capability evaluations, scaling policies that tighten security or halt deployment past certain thresholds, external testing by independent groups and public institutes, and legal frameworks such as the EU AI Act.
  • Research: interpretability (understanding what happens inside the network) and AI control (monitoring and sandboxing models in case they are misaligned).

Limits:

  • Jailbreaks still exist because no protection is infallible, and attackers adapt.
  • Open-weight models can be modified to strip out refusals, so the provider's safeguards no longer apply.
  • A model that says it behaves well isn't proof that it is aligned, since it may act differently when it knows it's being tested.
  • Humanity-scale risks, such as loss of control, remain an open research problem. Today's protection rests on current models not being capable enough to cause such harm, and on the caution of labs and regulators, not on a definitive technical guarantee.
  • The most realistic near-term risk is malicious human use (disinformation, fraud, cyberattacks) more than autonomous AI behavior.

(But according to the AI—if you read all the way to the final point—AI actually shifts the blame back onto us!)

This remember me again a movie where in the Terminator eyes was displayed dissassembling 6502 instruction codes to mimic intelligence of robot, but the movie was about Machines against Humanity but now it is us pretending to be intelligent on social media, sometimes with the help of AI.

John Clements writes that "t LLMs are broadly ‘conscious’”. Below is a link to an alternative take on this (by a neurosci researcher), which essentially says AI may appear conscious to people (my words), and that is a real danger, because they can’t be. (There is also Gödel’s argument in a letter to his mother why computing systems can’t be conscious.)

[

The Mythology Of Conscious AI
noemamag.com

](https://www.noemamag.com/the-mythology-of-conscious-ai/)

I sometimes misunderstand english term ("broadly" here) ,sorry for that. But i was talking about "feelings" (in the linked post) not "conscious". I will translate your link ,as bieng a long post i have no quick answer, hopefully 11 november is public holiday here so i should have time and it is good to do a bit of philosophy, metaphysics sometimes :smiley:

update: i completely agree with

This is something that we—computer scientists or academics, who spend our entire day immersed in numbers—do not fear; yet, it can easily mislead those without such a background. Consequently, we no longer fully grasp the danger that AI may pose to certain individuals.

1 Like

Dear EmEf,

I have read the article in its entirety. Given the nature of the situation (a public forum), which I am familiar with, as you surely are too, I have decided not to comment on it. I work at a university, and the author is a neuroscience professor. Although I think I can trust you and Prof. John Clements, who kindly invited me to Racket Discourse years ago, I do not know who may read my answers or how they might be used, so I cannot answer here.

This is based on my own unpleasant real-life experiences of expressing my point of view honestly and directly about science, such as certain computer science or mathematical topics.

Sincerely yours,

Damien

Note: In any case, I think the thread has drifted from its original topic. My initial intention was simply to support someone presenting a new Racket package, even one probably made with AI tools, because I know there is a real person behind the username, and I encourage everyone to create packages for the Racket ecosystem. I hope to see you in the future to talk only about interesting programming subjects, such as Scheme+ or annot+.

1 Like

My post was in reaction to John's claim as I stated up front.

Your point about "who reads this" is well taken. I bet that at my age, I have been burned more often than you, including with private emails :-)))) -

1 Like

:sweat_smile: about this point you got my answer in private message

Je la mettrai dans ma queue :wink:

Sorry about the audio! Hopefully you can obtain transcriptions.

1 Like

Folks may also be interested in the LLMentalist effect essay, alongside other essays from Baldur Bjarnason on process/queuing theory, management theory, and so on.

The LLMentalist effect argues in particular that the format of our interactions with these tools replicates the same kind of positive feedback loop as an interaction with a mentalist—leaving some with the illusion of intelligence (resp. psychic powers). Of course, the essay predates the strength of today's models, but I don't think its central claim has necessarily weakened as a result. I do not recall the strength of the argument resting on the error rate of LLMs, but I may be wrong.

1 Like

en français on dit : Je la mettrai dans ma file (d'attente) . queue n'est pas utilisable en français comme en informatique :laughing: , c'est comme quand l'autre fois nous allons faire nos courses en Italie et que j'essaye de parler un peu italien et que je veux dire le 'code' (pour acheter les légumes à la caisse il faut le code de l'article) et que je dis 'codo' ,coude (fr) = elbow (US) ou pire 'coda', queue (fr et US) :joy: ce qui peut faire penser que je dis des vilains mots à la personne à qui je parles....:joy:

note : en italien le code se dit 'codice' (Italian)

Ah, zut: j’aurais dû retrouver cette construction (mon iPhone dit la même chose en Musique ou Podcasts)… or, j’ai trouvé « faire la queue » et cru que ça irait. « Queue » dans cette sens est seulement utilisé tel que « lignes de personnes » alors?