cloudevents-sdk 0.1.0

CloudEvents official Rust SDK
Documentation

CloudEvents SDK Rust Crates badge Docs badge

This project implements the CloudEvents Spec for Rust.

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

Spec support

v0.3 v1.0
CloudEvents Core :heavy_check_mark: :heavy_check_mark:
AMQP Protocol Binding :x: :x:
AVRO Event Format :x: :x:
HTTP Protocol Binding :heavy_check_mark: :heavy_check_mark:
JSON Event Format :heavy_check_mark: :heavy_check_mark:
Kafka Protocol Binding :x: :x:
MQTT Protocol Binding :x: :x:
NATS Protocol Binding :x: :x:
Web hook :x: :x:

Crates

  • cloudevents-sdk: Provides Event data structure, JSON Event format implementation. This module is tested to work with GNU libc, WASM and musl toolchains.
  • cloudevents-sdk-actix-web: Integration with Actix Web.
  • cloudevents-sdk-reqwest: Integration with reqwest.

Get Started

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

cloudevents-sdk = "0.1.0"

Now you can start creating events:

use cloudevents::EventBuilder;
use url::Url;

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

Checkout the examples using our integrations with actix-web and reqwest to learn how to send and receive events:

Development & Contributing

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

Community