Laugharne / abf_anchor_build_fixer

The first build with Anchor can be challenging, especially for those who are not familiar with Rust compilations and Anchor environnement. This script which overlays Anchor calls (cli commands), tries to automaticaly fix the build issues you are most likely to encounter as best as it can.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Anchor Build fixer

(Tara Winstead - Pexels)



πŸ”­ Overview

The first build with Anchor can be challenging, especially for those who are not familiar with Rust compilations and Anchor environnement.

This script ("abf.sh") which overlays Anchor calls (cli commands), tries to dynamicaly fix the build issues you are most likely to encounter as best as it can.

It defines several functions in Bash to handle building and fixing errors in an Anchor project. It includes color-coded output and error handling. Each function is documented with comments to explain its purpose and usage.

This project is currently a work in progress and may not be ready for production use !

πŸ•‘ Current versions

I actually build Anchor projects with the following versions of OS and tools:

Tools Versions
OS Ubuntu 22.04.2 LTS x86_64
rustc 1.77.1
cargo 1.77.1
solana 1.17.4
node 18.16.0
anchor 0.29.0

πŸ“¦ Installation

  • bash: cat abf.sh >> ~/.bashrc or cat abf.sh >> ~/.bash_functions
  • zsh: cat alias.sh >> ~/.zshrc

πŸš€ How to run

Go into your projects directory, then type abf init <PROJECT_NAME> to create project sub-directory <PROJECT_NAME>.

πŸ’» Usage

abf <command> <OPTIONAL_PARAMETER>

✏️ Commands

Command Description Parameter
init, i Initializes a workspace <PROJECT_NAME> (1)
build, b Build a workspace none
version Print 'abf' version none
versions Print assets versions none
help Print help message none
  • (1) : mandatory

πŸ“š Additional resources

About

The first build with Anchor can be challenging, especially for those who are not familiar with Rust compilations and Anchor environnement. This script which overlays Anchor calls (cli commands), tries to automaticaly fix the build issues you are most likely to encounter as best as it can.


Languages

Language:Shell 100.0%