Skip to content

Commit

Permalink
use bpf-entrypoint feature (#27)
Browse files Browse the repository at this point in the history
* use bpf-entrypoint feature

* add to build script
  • Loading branch information
buffalojoec authored Jan 16, 2025
1 parent 20f697f commit 5250ea9
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion program/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ license = "Apache-2.0"
edition = "2021"

[features]
no-entrypoint = []
bpf-entrypoint = []
test-sbf = []

[dependencies]
Expand Down
2 changes: 0 additions & 2 deletions program/src/entrypoint.rs
Original file line number Diff line number Diff line change
@@ -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},
Expand Down
2 changes: 1 addition & 1 deletion program/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion scripts/program/build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import './dump.mjs';

// Configure additional arguments here, e.g.:
// ['--arg1', '--arg2', ...cliArguments()]
const buildArgs = cliArguments();
const buildArgs = ['--features', 'bpf-entrypoint', ...cliArguments()];

// Build the programs.
await Promise.all(
Expand Down
2 changes: 1 addition & 1 deletion scripts/program/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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 });

Expand Down

0 comments on commit 5250ea9

Please sign in to comment.