Publish expected native program entrypoint in sdk/

This commit is contained in:
Michael Vines
2018-11-13 18:17:32 -08:00
parent bba19ce667
commit e33f3a2562
3 changed files with 27 additions and 12 deletions

View File

@ -1,5 +1,6 @@
pub mod account;
pub mod loader_instruction;
pub mod native_program;
pub mod pubkey;
extern crate bincode;

View File

@ -0,0 +1,8 @@
use account::KeyedAccount;
// All native programs export a symbol named process()
pub const ENTRYPOINT: &str = "process";
// Native program ENTRYPOINT prototype
pub type Entrypoint =
unsafe extern "C" fn(keyed_accounts: &mut [KeyedAccount], data: &[u8]) -> bool;