Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

EU CBAM & Carbon Tax Calculation Engine — Rust Client Crate

Crates.io Documentation License: MIT Stanza API

EU CBAM Scope 1/2 embedded emissions and EU ETS carbon tax liability calculator across Iron, Steel, Aluminum, Cement, Fertilizers, and Hydrogen.

Official high-performance, asynchronous Rust client library for EU CBAM & Carbon Tax Calculation Engine, built on the Stanza Micro-API Network. Uses pure Rustls TLS (zero C/OpenSSL dependencies) and Tokio for maximum concurrency and safety.


📦 Installation

Add to your Cargo.toml:

[dependencies]
stanzaapi-cbam-carbon = "1.0.0"
tokio = { version = "1.0", features = ["full"] }

Or use cargo add:

cargo add stanzaapi-cbam-carbon

🚀 Quickstart

use stanzaapi_cbam_carbon::CbamCarbonClient;

#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
    // Reads STANZA_API_KEY from environment automatically
    // Public edge default: https://api.stanzaapi.com/cbam-carbon
    let client = CbamCarbonClient::new(None, None);

    let response = client.validate({"goods_category":"iron_and_steel","production_country":"TR","quantity_tonnes":500}).await?;

    if response.success {
        println!("Verification Success: {:?}", response.data);
    } else {
        eprintln!("Validation Error: {:?}", response.error);
    }

    Ok(())
}

📄 Example Response

{
  "success": true,
  "data": {
    "goods_category": "iron_and_steel",
    "direct_emissions_tco2e": 950,
    "estimated_ets_liability_eur": 71250
  }
}

🔗 Useful Links

📄 License

MIT © Stanza — Powered by Stanza.

Releases

Packages

Contributors

Languages