What is Soroban SDK?
The Soroban SDK is a Rust framework for writing smart contracts on the Wasm-powered Soroban smart contract runtime, deployed on Stellar. The SDK provides a comprehensive set of tools and libraries that make it easy to build, test, and deploy smart contracts with the full power of Rust’s type safety and performance.Key Features
Type-Safe Contracts
Build contracts with Rust’s powerful type system ensuring safety and reliability at compile time
Built-in Testing
Comprehensive testing utilities with
testutils feature for simulating contract executionStorage Management
Flexible storage options including persistent, temporary, and instance storage
Event System
Rich event emission and tracking capabilities for contract interactions
Core Components
The Soroban SDK consists of several key components:Contract Macros
Use#[contract] and #[contractimpl] to define your smart contract structure and implementation:
Environment Access
TheEnv type provides access to the contract execution environment, including storage, events, authentication, and more.
Data Types
The SDK provides Soroban-native types likeSymbol, Vec, Map, Address, and custom types via #[contracttype].
The Soroban SDK uses
#![no_std] by default for WASM targets, ensuring minimal binary size and optimal performance.Why Choose Soroban SDK?
Performance
Compiled to WebAssembly for near-native execution speed
Security
Rust’s ownership model prevents common security vulnerabilities
Developer Experience
Rich tooling, comprehensive docs, and helpful error messages
Version Information
- Current Version: 25.1.1
- Minimum Rust Version: 1.84.0
- Target:
wasm32v1-none
Next Steps
Installation
Set up your development environment and install the SDK
Quickstart
Build your first smart contract in minutes