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
- Signatures →
CheckWitnessverification
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