Getting Started With Rust
The wallet.rs library is published on crates.io. You can also download the source code from the official GitHub repository.
Requirements
We recommend you update Rust to the latest stable version rustup update stable.
The library uses cmake and openssl. You may need install additional build tools on your system to run the build process successfully using Cargo.
- Windows
- macOS
- Linux
You can install all needed prerequisites on Windows with Chocolatey. If you have any of the tools already installed just remove them from the command
Install Chocolatey with
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
and install the needed packages with
choco install visualstudio2022buildtools visualstudio2022-workload-vctools rust-ms msys2 llvm
You can install cmake and openssl with Homebrew by running the following commands:
brew install cmake
brew install openssl@1.1
# you may want to add this to your .zshrc or .bashrc since you'll need it to compile the crate
OPENSSL_ROOT_DIR=$(brew --prefix openssl@1.1)
You can install cmake and openssl with your distro's package manager or download from their websites. On Debian and Ubuntu you will also need the build-essential package.
Include the Library
The only thing you need to do to start using the library is to add it as dependency in your Cargo.toml
file:
[dependencies]
iota-wallet = { git = "https://github.com/iotaledger/wallet.rs", branch = "develop" }
tokio = "1.21.2"
Use the Library
In order to use the library, you need to create an AccountManager
:
In a production setup, do not store passwords in the host's environment variables or in the source code. See our backup and security recommendations for production setups.
loading...
What's Next?
Now that you are up and running, you can get acquainted with the library using its how-to guides and the repository's code examples.