Skip to content

anchor cli should not depend on solana cli for most actions #3866

@jacobcreech

Description

@jacobcreech

Problem

Currently when you do a base installation of Anchor, you need to install the solana cli. This 280mb package of binaries includes a lot of different commands that developers would never need to run, including an entire validator and additional validator tools. Often times because of this binary, Anchor is subject to confusion on what solana cli someone should be running in order to build Anchor successfully. This leads to dependency issues, troubleshooting, and general friction in the developer experience.

Solution

Remove the solana toolsuite as a prerequisite to building with Anchor. This requires an integration of multiple CLI commands into anchor instead of just calling the external CLI. These commands are as follows:

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

Note: The one thing that will be required to install from Solana Toolsuite would still be platform-tools so that you can compile Solana programs. Given that we'd be removing the dependency on solana CLI, we can better tie the correct platform-tools version to the anchor version underneath build. This way we have less problems building programs today on Solana.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions