Skip to content

feat(cli): Remove solana cli dependency#4099

Merged
jacobcreech merged 17 commits intosolana-foundation:masterfrom
swaroop-osec:feat/remove-solana-cli-dependency-v2
Nov 29, 2025
Merged

feat(cli): Remove solana cli dependency#4099
jacobcreech merged 17 commits intosolana-foundation:masterfrom
swaroop-osec:feat/remove-solana-cli-dependency-v2

Conversation

@swaroop-osec
Copy link
Copy Markdown
Collaborator

Closes #3866

  • account
  • address
  • balance
  • airdrop
  • epoch
  • epoch-info
  • logs
  • program
  • keygen

Based on #3963

@vercel
Copy link
Copy Markdown

vercel bot commented Nov 28, 2025

@swaroop-osec is attempting to deploy a commit to the Solana Foundation Team on Vercel.

A member of the Team first needs to authorize it.

@nutafrost nutafrost moved this to Security Review Required in Anchor 1.0 Nov 28, 2025
@swaroop-osec swaroop-osec marked this pull request as ready for review November 28, 2025 16:27
@jamie-osec
Copy link
Copy Markdown
Collaborator

jamie-osec commented Nov 28, 2025

Just wanted to note that this was removed in #3877 as it's a very heavy dependency that brings in around 50 extra dependencies. Since we use just one function from this crate, is it possible to avoid adding the dependency?

(Not a hard blocker, just preferable)

@swaroop-osec
Copy link
Copy Markdown
Collaborator Author

Just wanted to note that this was removed in #3877 as it's a very heavy dependency that brings in around 50 extra dependencies. Since we use just one function from this crate, is it possible to avoid adding the dependency?

I tried removing it and deploying the program sequentially. It does reduce the binary size by approximately ~8.5%, but the deployment time becomes significantly longer.

With this crate included, the same program deploys around 10× faster. For a better user experience—especially for large program deployments parallel deployment is much more beneficial, so we should keep the solana_client dependency.

@jacobcreech
Copy link
Copy Markdown
Collaborator

With this crate included, the same program deploys around 10× faster. For a better user experience—especially for large program deployments parallel deployment is much more beneficial, so we should keep the solana_client dependency.

This should be fixable. Solana-client just uses the crates under the hood.

Copy link
Copy Markdown
Collaborator

@jacobcreech jacobcreech left a comment

Choose a reason for hiding this comment

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

Going to pull this in but let's see if we can fix the deployment time removing solana-client before we tag the new version

@jacobcreech jacobcreech merged commit ae1c158 into solana-foundation:master Nov 29, 2025
56 of 57 checks passed
@github-project-automation github-project-automation bot moved this from Security Review Required to Done in Anchor 1.0 Nov 29, 2025
Otter-0x4ka5h pushed a commit to Otter-0x4ka5h/anchor that referenced this pull request Mar 25, 2026
* feat: Address command to retrieve public key from wallet config

* feat: Add Balance command

* feat(cli): Added airdrop command

* feat(cli): Add epoch and epoch info commands

* refactor(cli): cargo fmt

* feat(cli): Add support for transaction log streaming

* feat(cli): improve WebSocket URL handling

* feat(cli): add ShowAccount command to display account contents

* feat(cli): implement keypair generation and management commands

* feat(cli): enhance airdrop and balance commands with cluster and wallet configuration retrieval

* feat(cli): introduce program management commands for deploying, upgrading, and managing Solana programs

* feat(cli): add configuration management commands for retrieving and updating Anchor.toml settings

* feat(cli): enhance log streaming with WebSocket subscriptions and improved error handling

* docs(cli): clarify account struct deserialization format in Command enum

* fix(cli): Fix workspace detection in various commands

* refactor(cli): replace external Solana CLI calls with native program deployment and upgrade implementations

* refactor(cli): update with_workspace function to return Result type for improved error handling
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

anchor cli should not depend on solana cli for most actions

4 participants