- Documentation: https://docs.outscale.com/en/
- Project website: https://github.com/outscale/osc-sdk-rust
- Crate on crates.io: https://crates.io/crates/outscale_api
- Join our community on Discord
Outscale SDK for Rust is the official Rust SDK for the OUTSCALE API, based on the Rust 2021 edition (stable).
Key features:
- Rust-first API client generated from OUTSCALE’s OpenAPI definition
- Strongly typed models for OUTSCALE resources
- HTTP client based on
reqwestwith configurable TLS backends (default-tlsandrustls-tls)
- A working Rust toolchain (Rust 2021 edition, stable)
- Cargo package manager
- Access to the OUTSCALE API (valid access key / secret key)
- Network access to the OUTSCALE API endpoints
Add the outscale_api crate to your project using cargo:
cargo add outscale_apiOr manually add it to your Cargo.toml:
[dependencies]
outscale_api = "1"See the crate page on crates.io for the latest version.
git clone https://github.com/outscale/osc-sdk-rust.git
cd osc-sdk-rust
cargo build --releaseThe SDK itself is a Rust library: you configure it directly from your code (for example through a configuration struct or builder).
Refer to the examples/ directory in this repository for concrete examples of how to build and pass configuration to the client.
Add the crate to your Cargo.toml (see Installation), then use it in your code.
For real-world examples (including how to authenticate and call specific APIs), check the
examples/directory.
Calls will block the current thread from executing, instead of returning futures that must be run on a runtime.
Conversely, it must not be executed within an async runtime, or it will panic when it tries to block.
Consider changing the caller to wrap those calls in tokio::task::spawn_blocking.
use outscale_api::apis::profile::Profile;
use outscale_api::apis::vm_api::read_vms;
use outscale_api::models::ReadVmsRequest;
let config = Profile::default().and_then(|p| p.try_into()).unwrap();
let res = task::spawn_blocking(move || {
read_vms(&config, Some(ReadVmsRequest::new()))
}).await.unwrap();The crate exposes features to select the TLS backend used by reqwest:
default: enables thedefault-tlsfeature inreqwest(Rustls-based).native-tls: usesOpenSSLinstead of the default Rustls backend. When usingnative-tls, you typically also want to disable default features to avoid pulling indefault-tls:
[dependencies]
outscale_api = { version = "1", default-features = false, features = ["native-tls"] }Clone the repository and run the examples:
git clone https://github.com/outscale/osc-sdk-rust.git
cd osc-sdk-rust
cargo run --example <example-name>Examples are available in the examples/ directory and are a good starting point to:
- Set up authentication
- Call common OUTSCALE API endpoints
- Inspect responses and work with the generated models
Outscale SDK for Rust is released under the BSD-3-Clause license.
© 2026 Outscale SAS
See LICENSE for full details.
This project is compliant with REUSE.
We welcome contributions!
Please read our Contributing Guidelines and Code of Conduct before submitting a pull request.