CloudEvents SDK Rust ![Crates badge] ![Docs badge]

This project implements the CloudEvents Spec for Rust.

Note: This project is WIP under active development, hence all APIs are considered unstable.

Spec support

| | v0.3 | v1.0 | | :---------------------------: | :----------------------------------------------------------------------------: | :---------------------------------------------------------------------------------: | | CloudEvents Core | ✓ | ✓ | | AMQP Protocol Binding | ✕ | ✕ | | AVRO Event Format | ✕ | ✕ | | HTTP Protocol Binding | ✓ | ✓ | | JSON Event Format | ✓ | ✓ | | Kafka Protocol Binding | ✓ | ✓ | | MQTT Protocol Binding | ✕ | ✕ | | NATS Protocol Binding | ✕ | ✕ | | Web hook | ✕ | ✕ |

Crates

Get Started

To get started, add the dependency to Cargo.toml:

toml cloudevents-sdk = "0.2.0"

Now you can start creating events:

```rust use cloudevents::{EventBuilder, EventBuilderV10}; use url::Url;

let event = EventBuilderV10::new() .id("aaa") .source(Url::parse("http://localhost").unwrap()) .ty("example.demo") .build() .unwrap(); ```

Checkout the examples using our integrations to learn how to send and receive events:

Development & Contributing

If you're interested in contributing to sdk-rust, look at Contributing documentation

Community