Skip to content

build(t27c): put the web stack behind cargo features (212 -> 49 crates) - #5914

Merged
gHashTag merged 1 commit into
masterfrom
claude/t27c-net-feature
Oct 4, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/t27c-net-feature

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Closes #5912. Part of #5905 (weak point 5, t27c build time). Stacked on #5900; retarget to master after #5900 merges.

What changes

cargo build -p t27c stops building an HTTP client, TLS, an async runtime, a web framework and a JWT library. Only serve, bench-endpoints, bridge and audio use them.

feature what it switches on used by
(default) the compiler only parse, typecheck, gen, suite, seal, ...
net reqwest bridge, audio
server net + axum, tokio, hyper, hyper-util, http-body-util, tower-http, tokio-stream, futures-util, jsonwebtoken, serde_urlencoded serve, bench-endpoints
  • uuid, tower and ignore were not imported by any file and are removed.
  • The HTTP half of bridge.rs moves to bridge/client.rs under cfg(feature = "net"). bridge handoff reads a local file, so it stays in every build.
  • Without net, the other bridge subcommands and audio exit 1 and print the rebuild command (--features net). They do not vanish from --help.
  • jsonwebtoken, hyper and serde_urlencoded are also dev-dependencies, so the jwt::tests and proxy::tests unit tests still run under a plain cargo test (proxy.rs tests are stripped before type-checking — no workflow passes --features server #2301).
  • The Dockerfile already builds --features server and is unchanged.

Measured

cargo tree -p t27c -e normal,build --prefix none | sort -u | wc -l:

build crates
base (#5900), default 212
this PR, default 49
this PR, --features net 145
this PR, --features server 215

cargo check --release -p t27c passes for each of the three configurations.

cargo test -p t27c --no-fail-fast, default features: 2789 passed, 2 failed, the same result as the base commit e82a5b4e4. Both failures are already red there and do not involve these crates:

  • each_backend_artefact_write_is_guarded_at_its_own_call_site (tests/corpus_unresolved.rs:309)
  • corpus_classifier_matches_lean_completeness (icarus_lowerable)

The six jwt::tests / proxy::tests tests run and pass.

Behaviour without net:

$ t27c bridge status
Error: 'bridge' requires 'net' feature (only 'bridge handoff' is offline); rebuild with: cargo build --release -p t27c --features net
(exit 1)
$ t27c audio --token x
Error: 'audio' requires 'net' feature (rebuild with: cargo build --release -p t27c --features net)
(exit 1)

🤖 Generated with Claude Code

@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

The default build of t27c compiled reqwest, TLS, tokio, axum, hyper and
jsonwebtoken although only serve, bench-endpoints, bridge and audio use
them. Default now resolves 49 crates instead of 212.

- net = reqwest, for bridge and audio; server implies net
- uuid, tower and ignore were not imported anywhere: removed
- bridge's HTTP half moves to bridge/client.rs; without net, bridge
  (except handoff) and audio exit 1 naming --features net
- jwt/proxy unit tests keep running under plain cargo test through
  dev-dependencies (#2301)

cargo test -p t27c: 2789 passed, 2 failed, identical to the base commit.

Closes #5912

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

📓 NotebookLM Notebook linked to this PR

This notebook contains session context, decisions, and artifacts for this work.

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.

t27c: build the compiler without its web stack -- service crates behind cargo features

1 participant