Technology

Engineering record

FoundationsIn use

Moving shared code into its own repository

To use the shared code, an app also had to download unrelated server, website and app files. We move the shared code into its own repository.

Putting code that several apps share in one place is natural. But each time an app took one version of the shared code, it had to download the files of the unrelated server, website and other apps as well. One version was about 619 MB, and 61 GB had piled up in the cache. Sharing code and downloading a whole repository turned out to be different things.

A repository with only the shared code is about 9 MB. We merge the six shared Rust modules into one. We don't keep a compatibility module that connects through the old names, because then we'd be using the new structure while still maintaining the old one. We delete code nothing uses, and the version of the shared code is set in only one place, a submodule in the repository that collects the apps.

It wasn't only the code that was stale

Across 425 files we added 120 lines and deleted 46,915. Of 408 documents, 400 described a structure that no longer existed. An outdated document can be more dangerous than an empty one. An empty one shows that we don't know; an outdated one points down the wrong road.

The script that ran Cargo for us was also calling a file that no longer existed. Every Cargo run through this script failed, yet the work went on to the next step, and the simulator still had the previous app. If you keep going after a failure, you can mistake the previous result for the new one. We deleted this script too.

A smaller line count doesn't mean better quality. The other apps haven't moved to the new engine yet, either. What we settled this time is what to share and what to keep separate.

Written from that day’s point of view, using the documents and change history of the time. Published 2026.12.01.