Enterprise-grade framework for building secure, efficient, and standards-compliant smart contracts for Neo N3 blockchain using Rust. Complete toolchain from development to deployment.
use neo_contract::prelude::*;
#[neo_contract]
pub struct HelloWorld;
#[neo_contract_impl]
impl HelloWorld {
pub fn deploy(&self) -> bool {
rt::log("Hello, Neo N3!");
true
}
#[safe]
pub fn say_hello(&self, name: String) -> String {
format!("Hello, {}!", name)
}
}
Built for developers who demand safety, performance, and comprehensive tooling
Zero-cost abstractions with Rust's ownership system. Compile-time safety preventing common smart contract vulnerabilities.
13 complete examples from basic storage to enterprise DeFi applications. Progressive complexity designed for developers at all levels.
Rust-to-WASM compilation with optimized build pipeline. WASM-to-NEF compiler for Neo N3 deployment with automatic manifest generation.
Full support for NEP-17 (tokens), NEP-11 (NFTs), and NEP-24 (royalties). Automatic standard detection based on method signatures.
100% build success rate across all examples. Comprehensive security features and gas optimization patterns used in production.
Enterprise-scale modular design patterns. Clean separation of concerns with reusable components for complex applications.
Complete toolchain from Rust development to Neo N3 deployment
Write type-safe contracts with our framework
Compile to optimized WASM bytecode
Transform to Neo Executable Format
Deploy to Neo N3 blockchain
Core Rust framework library
β ProductionProcedural macros & attributes
β ProductionWASMβNEF compiler (Go)
β Production13 comprehensive examples
β Production13 production-ready examples from beginner to enterprise level
Contract basics with storage, events, and authorization
Advanced storage with multiple data types and serialization
State management with access control and statistics
Full NEP-17 compliant fungible token implementation
Complete NEP-11 non-fungible token implementation
NFT with NEP-24 royalty distribution system
DeFi crowdfunding with goal-based funding and refunds
Multi-pool staking system with yield farming
Decentralized exchange with AMM and liquidity pools
Enterprise security with M-of-N signatures and governance
DAO governance with token-weighted voting system
External data integration with oracle systems
Enterprise NFT marketplace with modular architecture
Get up and running with your first Neo N3 smart contract in minutes
Install Rust nightly and Go for the complete toolchain
# Install Rust nightly
rustup install nightly
rustup default nightly
rustup target add wasm32-unknown-unknown
# Install Go 1.23+
# Visit https://golang.org/dl/
Clone the repository and build the compiler
# Clone the repository
git clone https://github.com/your-org/neo-contract-rs
cd neo-contract-rs
# Build the compiler
cd neo-wasm
go build -o neo-wasm .
cd ..
Try the hello-world example to verify everything works
# Navigate to hello-world example
cd examples/01-hello-world
# Build everything
make all
# Files generated:
# βββ target/wasm32-unknown-unknown/release/hello_world.wasm
# βββ build/hello_world.nef
# βββ build/hello_world.manifest.json
A simple contract to get you started
use neo_contract::prelude::*;
#[neo_contract]
pub struct HelloWorld {
owner: H160,
}
#[neo_contract_impl]
impl HelloWorld {
pub fn deploy(&self, owner: H160) -> bool {
self.owner.set(owner);
rt::log("HelloWorld deployed!");
true
}
#[safe]
pub fn get_owner(&self) -> H160 {
self.owner.get()
}
pub fn say_hello(&self, name: String) -> String {
format!("Hello, {}!", name)
}
}
Comprehensive guides, API documentation, and learning resources
Comprehensive guide to all 13 examples with detailed explanations
Enterprise patterns and modular architecture for complex applications
Understanding the WASM-to-NEF compiler and manifest generation
Official Neo N3 documentation and blockchain specifications
Neo Enhancement Proposals and smart contract standards
Learn Rust programming language fundamentals