cloudevents-sdk
cargo install cloudevents-sdk

cloudevents-sdk

Rust library to interact with CloudEvents

by cloudevents

0.3.0 (see all)License:non-standard
cargo install cloudevents-sdk
Readme

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

  • 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.
  • cloudevents-sdk-rdkafka: Integration with rust-rdkafka.

Get Started

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

[dependencies]
cloudevents-sdk = "0.3.0"

Now you can start creating events:

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

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

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

Each SDK may have its own unique processes, tooling and guidelines, common governance related material can be found in the CloudEvents community directory. In particular, in there you will find information concerning how SDK projects are managed, guidelines for how PR reviews and approval, and our Code of Conduct information.

GitHub Stars

78

LAST COMMIT

7mos ago

MAINTAINERS

2

CONTRIBUTORS

15

OPEN ISSUES

7

OPEN PRs

6
VersionTagPublished
0.3.0
2yrs ago
0.2.0
2yrs ago
0.1.0
2yrs ago
0.0.1
2yrs ago
No alternatives found
No tutorials found
Add a tutorial