Installation
Get started with NeoRust SDK by installing it in your development environment.
System Requirementsโ
- Rust: Version 1.70 or later
- Cargo: Rust's package manager (included with Rust)
- Operating System: Windows, macOS, or Linux
Install Rustโ
If you don't have Rust installed, get it from rustup.rs:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Create a New Projectโ
cargo new my-neo-app
cd my-neo-app
Add NeoRust Dependencyโ
Add NeoRust to your Cargo.toml
:
[dependencies]
neo3 = "0.4.2"
tokio = { version = "1.0", features = ["full"] }
Feature Flagsโ
NeoRust provides several optional features:
[dependencies]
neo3 = { version = "0.4.2", features = ["futures", "ledger", "websocket"] }
Available Featuresโ
futures
- Async/await support (recommended)ledger
- Hardware wallet supportwebsocket
- WebSocket client supportserde
- Serialization support
Verify Installationโ
Create a simple test to verify everything works:
// src/main.rs
use neo3::prelude::*;
fn main() {
println!("NeoRust SDK v0.4.2 is ready!");
// Create a simple account
let account = Account::create().expect("Failed to create account");
println!("Generated address: {}", account.get_address());
}
Run it:
cargo run
You should see output like:
NeoRust SDK v0.4.2 is ready!
Generated address: NXXXXxxxXXXxxxXXXxxxXXXxxxXXXxxx
Troubleshootingโ
Build Errorsโ
If you encounter build errors, make sure you have the latest stable Rust:
rustup update stable
Platform-Specific Issuesโ
macOSโ
You may need to install additional tools:
xcode-select --install
Windowsโ
Ensure you have the Microsoft C++ Build Tools installed.
Linuxโ
Install build essentials:
# Ubuntu/Debian
sudo apt update && sudo apt install build-essential
# CentOS/RHEL
sudo yum groupinstall "Development Tools"
Next Stepsโ
- Quick Start Guide - Your first Neo application
- Examples - Practical code examples