floopfloop
Official Rust SDK for the FloopFloop API. Build a project, refine it, manage secrets and subdomains from any async-Rust codebase.
Install
Or in Cargo.toml:
[]
= "0.1.0-alpha.1"
# Runtime — the SDK doesn't bundle one; bring tokio yourself:
= { = "1", = ["rt-multi-thread", "macros"] }
Quickstart
Grab an API key: floop keys create my-sdk (via the floop CLI) or the dashboard → Account → API Keys. Business plan required to mint new keys.
use ;
async
Streaming progress
use ;
use Duration;
let res = client.projects.stream.await;
match res
stream de-duplicates identical consecutive snapshots (same status / step / progress / queue_position) so you don't see dozens of identical "queued" events while a build waits — matches the Node, Python, and Go SDKs.
Error handling
Every call returns Result<T, floopfloop::FloopError>. FloopError.code is a FloopErrorCode enum with a catch-all Other(String) variant so unknown server codes round-trip without an SDK update.
use FloopErrorCode;
match client.projects.status.await
Known codes: Unauthorized, Forbidden, ValidationError, RateLimited, NotFound, Conflict, ServiceUnavailable, ServerError, NetworkError, Timeout, BuildFailed, BuildCancelled, Unknown, plus Other(String) for pass-through.
Resources
| Accessor | Methods |
|---|---|
client.projects() |
create, list, get, status, cancel, reactivate, refine, conversations, stream, wait_for_live |
client.subdomains() |
check, suggest |
client.secrets() |
list, set, remove |
client.library() |
list, clone_project |
client.usage() |
summary |
client.api_keys() |
list, create, remove (accepts id or name) |
client.uploads() |
create (presign + direct S3 PUT, returns UploadedAttachment for Projects.refine) |
client.user() |
me |
Method-for-method parity with @floopfloop/sdk (Node), floopfloop (Python), and floop-go-sdk (Go).
Configuration
use Client;
use Duration;
let client = builder
.base_url // default production URL otherwise
.timeout // default 30s
.user_agent_suffix // appended after floopfloop-rust-sdk/<v>
// .http_client(my_reqwest_client) // bring your own reqwest::Client
.build?;
Client is cheap to clone (wraps an Arc) and all methods are &self, so share it across tasks without concern.
TLS
Uses rustls by default (no system OpenSSL required on any platform). If you need native TLS instead, depend on reqwest directly in your app with native-tls and pass your own http_client into Client::builder.
Versioning
Follows Semantic Versioning. Breaking changes in 0.x are called out in CHANGELOG.md and a new tag is cut with v<version>. Tag push triggers the release workflow which publishes to crates.io.
License
MIT