At Notion, we’re moving more and more things into Rust libraries shared across iOS, Android, and, occasionally, web via WASM. A question we’ve seriously considered is “does code sharing still make sense in the age of AI?” In other words, if code is essentially free, why not write specs in Markdown and have agents implement each platform separately?
The argument is that code sharing’s efficiency benefits no longer matter when agents can quickly write platform-specific code. Engineers may also be less familiar with a new language used for code sharing, like Rust.
I see this debate as a small example of an industry-wide question: is AI actually making software better or is it simply helping us generate more slop?
The answer is clearly both, but the decisions you or your company make determine which end of the spectrum you’re on. At least for now, I think investing in code sharing through Rust is a step toward making software better.
AI is very good at zero to one. I’m confident we could start with a Markdown spec and quickly build three platform-specific features. That makes the spec-based approach tempting. What worries me is maintaining and improving multiple implementations as a feature grows more complex. Soon, we’d have an obscure, lossy layer of logic spread across Markdown files, code comments, and AGENTS.md files, to keep everything in sync.
Instead, we build once and try to make it very good with the help of AI. “Try to make it very good” is key. I would rather be in a technical position where we’re more likely to use AI to improve the existing product’s performance and reliability than to churn out features as quickly as possible.
I think this decision would be the same, even for companies using the most AI-aggressive dark factory approach: if agents are writing the code, we might as well have them write code that is as safe and performant as possible.
