Skip to content

Comments

harness: Add program with loader helper#182

Merged
buffalojoec merged 3 commits intoanza-xyz:mainfrom
febo:add-program-with-loader
Dec 1, 2025
Merged

harness: Add program with loader helper#182
buffalojoec merged 3 commits intoanza-xyz:mainfrom
febo:add-program-with-loader

Conversation

@febo
Copy link
Collaborator

@febo febo commented Nov 29, 2025

Problem

While there are a couple of add_program* helpers, there is none that adds a program under the DEFAULT_LOADER_KEY. This requires to always have to specify a loader when adding additional programs – see here.

Solution

Refactor the helpers to include 3 different variations:

  • add_program
  • add_program_with_loader
  • add_program_with_loader_and_elf

@febo febo added the breaking Breaking change label Nov 29, 2025
@febo febo requested a review from buffalojoec November 29, 2025 11:16
@febo febo force-pushed the add-program-with-loader branch from ec11fe1 to b46743c Compare November 29, 2025 11:27
///
/// If you intend to CPI to a program, this is likely what you want to use.
pub fn add_program_with_elf_and_loader(
pub fn add_program_with_loader_and_elf(
Copy link
Contributor

@sonicfromnewyoke sonicfromnewyoke Nov 29, 2025

Choose a reason for hiding this comment

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

maybe it worth to change the order of arguments to the function also to not confuse naming and how to use?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Good catch - updated.

@buffalojoec buffalojoec merged commit 50d2a3d into anza-xyz:main Dec 1, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking Breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants