Skip to content

outscale/osc-sdk-rust

Repository files navigation

Outscale SDK for Rust

Project Incubating

Outscale Python SDK


🌐 Links


📄 Table of Contents


🧭 Overview

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 reqwest with configurable TLS backends (default-tls and rustls-tls)

✅ Requirements

  • 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

⚙ Installation

Option 1: Install from crates.io (recommended)

Add the outscale_api crate to your project using cargo:

cargo add outscale_api

Or manually add it to your Cargo.toml:

[dependencies]
outscale_api = "1"

See the crate page on crates.io for the latest version.

Option 2: Install from source

git clone https://github.com/outscale/osc-sdk-rust.git
cd osc-sdk-rust
cargo build --release

🛠 Configuration

The 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.


🚀 Usage

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.

Working with Async runtime

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();

💡 Examples

Enable TLS features

The crate exposes features to select the TLS backend used by reqwest:

  • default: enables the default-tls feature in reqwest (Rustls-based).
  • native-tls: uses OpenSSL instead of the default Rustls backend. When using native-tls, you typically also want to disable default features to avoid pulling in default-tls:
[dependencies]
outscale_api = { version = "1", default-features = false, features = ["native-tls"] }

Explore the examples

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

📜 License

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.


🤝 Contributing

We welcome contributions!

Please read our Contributing Guidelines and Code of Conduct before submitting a pull request.

About

Outscale SDK for Rust

Topics

Resources

Code of conduct

Contributing

Stars

Watchers

Forks

Contributors 8

Languages