Repository navigation
Decouple the Solana Rust SDK from the program and enable crate releases - #19
Merged
Merged
Conversation
edo-chan
marked this pull request as ready for review
October 29, 2026 21:51
edo-chan
marked this pull request as draft
October 29, 2026 21:54
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.
The Rust SDK currently pulls the on-chain
swigprogram into every consumer and cannot be published to crates.io. This change givesswig-interfaceits own program ID, instruction discriminants, fixed instruction headers, and authority-proof constants. The program remains a pinned test-only dependency so compatibility is checked against the same wallet revision already recorded insolana/source.json.Instruction builders and account ordering remain unchanged. The public
swig_interface::swigprogram re-export is removed for the 3.0.0 release; consumers can usePROGRAM_ID,program_id(), andinstruction_datainstead. Existing state and compact-instruction crates remain pinned Git dependencies during development, with exact registry version fallbacks for publication.Adds
.github/workflows/publish-solana-rust.yml: pull requests and relevant pushes tomainrun formatting, Clippy, ABI/runtime tests, and archive/consumer checks. After successful verification onmain, the workflow publishesswig-interfacethenswig-sdkusing crates.io trusted publishing. No release tag or GitHub Release is required to trigger publishing.Publishing uses the version committed in the workspace
Cargo.toml. Each new release needs a version bump with matching internal dependency requirements and lockfile; already-published versions are skipped, so a source-only merge without a version bump does not create a new crate version. Concurrent runs use GitHub's native queue instead of replacing a pending publication (up to 100 waiting runs).Validation:
Rust workspace runtime suite and all three ABI parity tests pass, with five existing skips.
ABI checks compare all 23 fixed headers byte-for-byte, all 26 discriminants, program ID, and proof constants against pinned wallet revision
c5edad67f82958f7fb282634ad91c752602e76ca.cargo clippy --workspace --all-targets --lockedand formatting checks pass; existing warnings remain.Both crate archives package and compile, and an external consumer builds from the extracted archives using local prerequisite crate candidates. Production dependency trees exclude
swigand Shank.Packaging also passes against a clean checkout of the exact pinned wallet revision.
bun run testpasses for the Solana TypeScript SDK.Actionlint 1.7.12 passes with a narrow ignore only for its unsupported
concurrency.queuekey, which is documented by GitHub; all other lint checks remain enabled.GitHub Rust verification and all other PR checks pass on
861eb9f0da4761651dc7403874559c9f8f2eeafe; independent review found no remaining blocker.Release prerequisites: publish the helper/state crates using the standalone wallet publishing PR #243. This SDK uses auth-lock state APIs from wallet #226, which are absent from current wallet
main; its registry dependency must resolve to a version containing those APIs. Ifswig-state3.0.0 is first published from currentmain, release the auth-lock state under an unused version and update this SDK's Git pin, exact registry requirements, and lockfile before publishing. New crate names (includingswig-interface) require their initial owner-authenticated publication before configuring trusted publishing. Configure this workflow for both SDK crates. Archive checks use local prerequisite candidates and do not claim those versions are already on crates.io. No crate uploads are part of this PR.