Skip to main content

Crate neo_solana_compat

Crate neo_solana_compat 

Source
Expand description

Neo-Solana Compatibility Layer

This crate provides a Solana-compatible API surface that compiles to WASM and can be translated to NeoVM bytecode via wasm-neovm.

§Usage

Replace solana_program imports with neo_solana_compat:

// Before (Solana)
use solana_program::{account_info::AccountInfo, entrypoint, pubkey::Pubkey};

// After (Neo-compatible)
use neo_solana_compat::{account_info::AccountInfo, entrypoint, pubkey::Pubkey};

§Architecture

The compatibility layer maps Solana concepts to Neo equivalents:

  • Accounts → Neo contract storage slots
  • Program IDs → Neo contract hashes (UInt160)
  • Syscalls → Neo interop services
  • SignaturesCheckWitness verification

Re-exports§

pub use account_info::AccountInfo;
pub use entrypoint::ProgramResult;
pub use program_error::ProgramError;
pub use pubkey::Pubkey;

Modules§

account_info
Account info structure for Solana compatibility
entrypoint
Entrypoint macros and types for Solana compatibility
prelude
Re-export commonly used items
program
Program invocation utilities
program_error
Program error types for Solana compatibility
pubkey
Pubkey type representing a 32-byte public key
syscalls
Syscall bindings for Solana compatibility

Macros§

entrypoint
Declare the program entrypoint
neo_entrypoint
Simplified entrypoint that receives instruction data directly