qcs-api-client-common 0.17.3

Common code for QCS API clients
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! This binary is used to generate Python stub files (type hints).
//! For more information on why this exists as a separate binary rather than a build script,
//! see the [`pyo3-stub-gen`][] documentation.
//!
//! [`pyo3-stub-gen`]: https://github.com/Jij-Inc/pyo3-stub-gen

#[cfg(not(feature = "stubs"))]
fn main() {
    eprintln!("Executing this binary only makes sense with the --stubs feature enabled.");
}

#[cfg(feature = "stubs")]
fn main() -> Result<(), Box<dyn std::error::Error>> {
    let mut stub = qcs_api_client_common::stub_info()?;
    rigetti_pyo3::stubs::sort(&mut stub);
    stub.generate()?;
    Ok(())
}