From 232b4209a8961e251115642b38a1ec0f4db31f15 Mon Sep 17 00:00:00 2001 From: Joe Caulfield Date: Thu, 19 Dec 2024 18:42:37 +0800 Subject: [PATCH] use bpf-entrypoint feature --- program/Cargo.toml | 2 +- program/src/entrypoint.rs | 2 -- program/src/lib.rs | 2 +- scripts/program/test.mjs | 2 +- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/program/Cargo.toml b/program/Cargo.toml index c8e07fb..6022959 100644 --- a/program/Cargo.toml +++ b/program/Cargo.toml @@ -8,7 +8,7 @@ license = "Apache-2.0" edition = "2021" [features] -no-entrypoint = [] +bpf-entrypoint = [] test-sbf = [] [dependencies] diff --git a/program/src/entrypoint.rs b/program/src/entrypoint.rs index 6f0a9d7..46498be 100644 --- a/program/src/entrypoint.rs +++ b/program/src/entrypoint.rs @@ -1,7 +1,5 @@ //! Program entrypoint -#![cfg(not(feature = "no-entrypoint"))] - use { crate::processor::Processor, solana_program::{account_info::AccountInfo, entrypoint::ProgramResult, msg, pubkey::Pubkey}, diff --git a/program/src/lib.rs b/program/src/lib.rs index 287b645..de02e3b 100644 --- a/program/src/lib.rs +++ b/program/src/lib.rs @@ -3,7 +3,7 @@ use solana_program::native_token::LAMPORTS_PER_SOL; pub mod helpers; pub mod processor; -#[cfg(not(feature = "no-entrypoint"))] +#[cfg(feature = "bpf-entrypoint")] pub mod entrypoint; pub use solana_program; diff --git a/scripts/program/test.mjs b/scripts/program/test.mjs index 9e27ec3..b128466 100644 --- a/scripts/program/test.mjs +++ b/scripts/program/test.mjs @@ -11,7 +11,7 @@ import './dump.mjs'; // Configure additional arguments here, e.g.: // ['--arg1', '--arg2', ...cliArguments()] -const testArgs = cliArguments(); +const testArgs = ['--features', 'bpf-entrypoint', ...cliArguments()]; const hasSolfmt = await which('solfmt', { nothrow: true });