Installation
Get started with the Growatt API Rust SDK by adding it to your Rust project.Prerequisites
- Rust 2021 edition or later
- An async runtime (tokio)
- A Growatt account with valid credentials
Using Cargo
The SDK requires an async runtime. We recommend tokio with the
full feature set for the best experience.Core Dependencies
The Growatt SDK automatically includes these dependencies:- reqwest - HTTP client with JSON and cookie support
- tokio - Async runtime
- serde - Serialization framework
- serde_json - JSON parsing
- chrono - Date and time handling
- thiserror - Error handling
Optional Dependencies
Environment Variable Configuration
For environment-based configuration, add:.env files for credentials:
.env
Verify Installation
Create a simple test file to verify the installation:src/main.rs
Version Compatibility
| Growatt SDK | Rust Edition | Tokio | Reqwest |
|---|---|---|---|
| 0.1.0 | 2021 | 1.x | 0.11 |
The SDK uses Rust 2021 edition features. Make sure your
Cargo.toml specifies edition = "2021" or later.Next Steps
Quick Start Guide
Learn how to authenticate and make your first API call