Skip to main content

tabularium_sdk/
lib.rs

1//! Async Rust client for the [Tabularium](https://tabularium.wiki) plugin
2//! registry HTTP API.
3//!
4//! The client is generated at build time by
5//! [`progenitor`](https://docs.rs/progenitor) from the registry's published
6//! OpenAPI 3.0 spec (`openapi.json`, shipped in this crate). Re-generation
7//! happens automatically on every `cargo build`, so updating the spec snapshot
8//! and re-publishing is the entire release loop.
9//!
10//! # Quickstart
11//!
12//! ```no_run
13//! # use tabularium_sdk::Client;
14//! # #[tokio::main]
15//! # async fn main() -> Result<(), Box<dyn std::error::Error>> {
16//! let client = Client::new("https://registry.spitzli.dev");
17//! let plugins = client.list_plugins().send().await?;
18//! for p in plugins.into_inner().plugins {
19//!     println!("{} — {}", p.id, p.name);
20//! }
21//! # Ok(())
22//! # }
23//! ```
24
25// Suppress lints inside the generated bindings — we don't control its style.
26// `elided_named_lifetimes` was renamed to `mismatched_lifetime_syntaxes` in
27// Rust 1.83; allowing both with `renamed_and_removed_lints` silenced keeps
28// the crate warning-free across the toolchain versions used in CI.
29#![allow(
30    renamed_and_removed_lints,
31    clippy::all,
32    elided_lifetimes_in_paths,
33    elided_named_lifetimes,
34    mismatched_lifetime_syntaxes,
35    rustdoc::all
36)]
37
38include!(concat!(env!("OUT_DIR"), "/codegen.rs"));