Skip to content

Commit f943d43

Browse files
authored
docs: add default paths to Mollusk::new (#106)
1 parent 039b29d commit f943d43

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

harness/src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,15 @@ impl Mollusk {
464464
/// Attempts the load the program's ELF file from the default search paths.
465465
/// Once loaded, adds the program to the program cache and returns the
466466
/// newly created Mollusk instance.
467+
///
468+
/// # Default Search Paths
469+
///
470+
/// The following locations are checked in order:
471+
///
472+
/// - `tests/fixtures`
473+
/// - The directory specified by the `BPF_OUT_DIR` environment variable
474+
/// - The directory specified by the `SBF_OUT_DIR` environment variable
475+
/// - The current working directory
467476
pub fn new(program_id: &Pubkey, program_name: &str) -> Self {
468477
let mut mollusk = Self::default();
469478
mollusk.add_program(program_id, program_name, &DEFAULT_LOADER_KEY);

0 commit comments

Comments
 (0)