Repository navigation
feat(codegen): render built-in plugins from tx3c's built-in templates - #132
Merged
Merged
Conversation
This was referenced Sep 26, 2026
scarmuega
force-pushed
the
codegen/bundled-clients
branch
from
September 26, 2026 18:05
a44cb84 to
ea54db7
Compare
tx3c now ships the first-party templates itself and selects them by name (tx3-lang/tx3#360, #361). A built-in plugin name such as `rust-client` is also the name of its tx3c template, so the built-in plugins (ts-client, rust-client, python-client, go-client) call `tx3c codegen --template <plugin name>` instead of downloading the SDK repos' `.trix/client-lib` at the `codegen-v1beta0` tag. A generated client therefore always matches the installed tx3c, and codegen needs no network access. Custom `{ repo, path, ref }` plugins keep the download and pass the downloaded directory to the same `--template` flag. - Remove CURRENT_CODEGEN_VERSION and the built-in repo/path/ref table. - Raise the tx3c compatibility floor to 0.24.0, the release that ships built-in templates. - A new contract test pins that built-in plugins pass their name as `--template` and never download templates. - Replace the stale `[[bindings]]` blocks in the example projects with `[[codegen]] plugin = "ts-client"`. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
scarmuega
force-pushed
the
codegen/bundled-clients
branch
from
September 26, 2026 18:43
ea54db7 to
8c4ec71
Compare
This was referenced Sep 26, 2026
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
tx3c now ships the first-party templates itself and selects them by name (tx3-lang/tx3#360, tx3-lang/tx3#361). A built-in plugin name such as
rust-clientis also the name of its tx3c template. The built-in pluginsts-client,rust-client,python-clientandgo-clienttherefore calltx3c codegen --template <plugin name>. They no longer download each SDK repo's.trix/client-libat thecodegen-v1beta0tag.{ repo, path, ref }plugins keep the download and pass the downloaded directory to the same--templateflag.CURRENT_CODEGEN_VERSIONand the built-in repo, path and ref table are removed. There is no mapping from plugin to language either, because the plugin name is passed straight through.[[bindings]]blocks with[[codegen]] plugin = "ts-client".Merge order
Release tx3c with tx3#360 and tx3#361 before releasing trix with this PR. A trix release that includes this change rejects any tx3c older than 0.24.0. If the tx3c release gets a different version number, update the floor in
src/spawn/compat.rsbefore merging.Verification
cargo fmt --all -- --checkcargo clippy --all-targets --all-features --locked -- -D warningscargo test --workspace --all-targets --all-features --locked, which passes, including a new contract test. It checks that built-in plugins pass their name as--templateand never download templates.trix initfollowed bytrix codegen --plugin go-client, using the real tx3c built from tx3#361, renderedgo.mod,protocol.goandREADME.mdwith no download. The compatibility gate was skipped, because that unreleased build still reports 0.23.0.🤖 Generated with Claude Code