### Install Project Dependencies Source: https://github.com/solana-program/compute-budget/blob/main/README.md Installs the necessary NPM dependencies for the Solana program template, providing access to all included scripts and development tools. ```sh pnpm install ``` -------------------------------- ### Directly Build and Test JavaScript Client Source: https://github.com/solana-program/compute-budget/blob/main/clients/js/README.md These commands allow for a more granular control over the build and test process. They involve building the main programs, restarting the validator, navigating into the client directory, installing its specific dependencies, building the client, and finally running its tests. ```Shell # Build your programs and start the validator. pnpm programs:build pnpm validator:restart # Go into the client directory and run the tests. cd clients/js pnpm install pnpm build pnpm test ``` -------------------------------- ### Start Solana Local Validator Source: https://github.com/solana-program/compute-budget/blob/main/README.md This command initiates a local Solana validator instance, which is crucial for local development and testing of your programs. By default, it will skip execution if a validator is already running, preventing redundant starts. ```sh pnpm validator:start ``` -------------------------------- ### Run Rust Client Tests Source: https://github.com/solana-program/compute-budget/blob/main/clients/rust/README.md Executes tests for the Rust client library. This command will start a new local Solana validator if one is not already running, and then run the tests. ```sh pnpm clients:js:test ``` -------------------------------- ### Run JavaScript Client Tests from Repository Root Source: https://github.com/solana-program/compute-budget/blob/main/clients/js/README.md This command initiates the build and test process for the JavaScript client from the root of the repository. It automatically starts a new local validator if one is not already running, then executes the client's tests. ```Shell pnpm clients:js:test ``` -------------------------------- ### Build, Test, Format, and Lint Solana Programs Source: https://github.com/solana-program/compute-budget/blob/main/README.md These commands facilitate the standard development workflow for Solana programs. Ensure your program folders are correctly added to the `members` array in your root `Cargo.toml` file for these scripts to recognize and process them. ```sh pnpm programs:build pnpm programs:test pnpm programs:format pnpm programs:lint ``` -------------------------------- ### Generate Solana Program Clients Source: https://github.com/solana-program/compute-budget/blob/main/README.md Once your program's IDLs have been successfully generated, this command allows you to create corresponding clients. These clients are essential for interacting with your on-chain Solana programs from off-chain applications. ```sh pnpm generate:clients ``` -------------------------------- ### Generate Solana IDLs and Clients Simultaneously Source: https://github.com/solana-program/compute-budget/blob/main/README.md For convenience, this single command streamlines the process by generating both the IDLs and the clients for your Solana programs in one go. It's a useful shortcut for setting up your program's interfaces and interaction layers. ```sh pnpm generate ``` -------------------------------- ### Build Program and Restart Validator with External Dependencies Source: https://github.com/solana-program/compute-budget/blob/main/README.md These commands are executed sequentially to ensure that your Solana program is built with the latest changes, including any newly added external program dependencies. Following the build, restarting the validator ensures that these external programs are loaded and available in your local development environment. ```sh pnpm programs:build pnpm validator:restart ``` -------------------------------- ### Generate Solana Program IDLs Source: https://github.com/solana-program/compute-budget/blob/main/README.md This command generates Interface Definition Languages (IDLs) for your Solana programs. Depending on your program's framework, it will utilize either Shank or Anchor, ensuring the correct framework version is downloaded and used locally for accurate IDL generation. ```sh pnpm generate:idls ``` -------------------------------- ### Lint and Format JavaScript Client Code Source: https://github.com/solana-program/compute-budget/blob/main/clients/js/README.md These commands are used to maintain code quality and consistency for the JavaScript client. They allow developers to lint the code for potential issues and format it according to predefined style guidelines, with options to automatically fix detected problems. ```Shell pnpm lint pnpm lint:fix pnpm format pnpm format:fix ``` -------------------------------- ### Configure External Program Dependencies in Cargo.toml Source: https://github.com/solana-program/compute-budget/blob/main/README.md This TOML snippet illustrates how to declare external program addresses within your program's `Cargo.toml` file under the `program-dependencies` array. These programs will be automatically fetched from mainnet and integrated into your local validator environment upon the next build and validator restart. ```toml program-dependencies = [ "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s", "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV", ] ``` -------------------------------- ### Restart Solana Local Validator Source: https://github.com/solana-program/compute-budget/blob/main/README.md Use this command to force a restart of your local Solana validator. This is particularly useful when you need to apply new configurations or ensure a fresh state for your development environment. ```sh pnpm validator:restart ``` -------------------------------- ### Stop Solana Local Validator Source: https://github.com/solana-program/compute-budget/blob/main/README.md This command gracefully terminates the running local Solana validator instance. It's used to shut down your local development environment when it's no longer needed. ```sh pnpm validator:stop ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.