Skip to content

Split out main code to lib for testing - #3150

Merged
palfrey merged 2 commits into
TraceMachina:mainfrom
palfrey:split-main-to-lib
Nov 9, 2026
Merged

palfrey merged 2 commits into
TraceMachina:mainfrom
palfrey:split-main-to-lib

Conversation

@palfrey

@palfrey palfrey commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

What and why

We had a large nativelink.rs binary source file (~1100 lines) which is relatively hard to test. This PR trims that to ~15% of that and moves most of the functionality into a separate lib.rs and adds an initial basic test to that. This isn't a big gain on it's own, but it opens up options for testing new endpoints and other changes to the core functionality there that weren't there before.

How was this verified?

It's primarily a refactor, so mostly just the existing test suite. I've also added a new test that lets us run the server standalone with a config and verify that responds, which is the core feature this unlocks.

Risk

Low. Mostly just a refactor. If CI passes, it's fine :)

AI assistance

None

@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
nativelink Ready Ready Preview Nov 9, 2026 2:03pm UTC
nativelink-aidm Ready Ready Preview Nov 9, 2026 2:03pm UTC

Request Review

@github-actions

This comment has been minimized.

Comment thread nativelink-sim/Cargo.toml

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was already a problem, but probably flagged because I was editing another Cargo.toml

@palfrey
palfrey merged commit 810105f into TraceMachina:main Nov 9, 2026
20 checks passed
@palfrey
palfrey deleted the split-main-to-lib branch November 9, 2026 14:25
MarcusSorealheis added a commit that referenced this pull request Nov 18, 2026
Lets a distribution register additional store implementations without
carrying them in this tree. An `external` store spec selects a provider
by name with a passthrough config value, and the store factory builds it
through a registry the embedding binary populates before startup (the
library split in #3150 is what makes such a binary possible). The stock
binary registers no providers: an `external` spec there fails at startup
naming the unknown provider and the registered (empty) set. Regenerates
the main config reference.
MarcusSorealheis added a commit that referenced this pull request Nov 19, 2026
Lets a distribution register additional store implementations without
carrying them in this tree. An `external` store spec selects a provider
by name with a passthrough config value, and the store factory builds it
through a registry the embedding binary populates before startup (the
library split in #3150 is what makes such a binary possible). The stock
binary registers no providers: an `external` spec there fails at startup
naming the unknown provider and the registered (empty) set. Regenerates
the main config reference.
MarcusSorealheis added a commit that referenced this pull request Nov 19, 2026
Lets a distribution register additional store implementations without
carrying them in this tree. An `external` store spec selects a provider
by name with a passthrough config value, and the store factory builds it
through a registry the embedding binary populates before startup (the
library split in #3150 is what makes such a binary possible). The stock
binary registers no providers: an `external` spec there fails at startup
naming the unknown provider and the registered (empty) set. Regenerates
the main config reference.
MarcusSorealheis added a commit that referenced this pull request Nov 20, 2026
Lets a distribution register additional store implementations without
carrying them in this tree. An `external` store spec selects a provider
by name with a passthrough config value, and the store factory builds it
through a registry the embedding binary populates before startup (the
library split in #3150 is what makes such a binary possible). The stock
binary registers no providers: an `external` spec there fails at startup
naming the unknown provider and the registered (empty) set. Regenerates
the main config reference.

This branch was successfully deployed

2 active and 1 inactive deployments
Preview – nativelink — c96b70a8 Deployed Nov 9, 2026 by vercel[bot]
Preview – nativelink-aidm — c96b70a8 Deployed Nov 9, 2026 by vercel[bot]
public-ci — c96b70a8 Deployed Nov 9, 2026 by palfrey via NativeLink / Linux (PR) #544
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants