Git Product home page Git Product logo

sdk-rust's Introduction

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

Crate Structure

The core modules include definitions for the Event and EventBuilder data structures, JSON serialization rules, and a mechanism to support various Protocol Bindings, each of which is enabled by a specific feature flag:

  • actix: Integration with actix.
  • axum: Integration with axum.
  • warp: Integration with warp.
  • reqwest: Integration with reqwest.
  • rdkafka: Integration with rdkafka.
  • nats: Integration with nats

This crate is continuously tested to work with GNU libc, WASM and musl toolchains.

Get Started

To get started, add the dependency to Cargo.toml, optionally enabling your Protocol Binding of choice:

[dependencies]
cloudevents-sdk = { version = "0.7.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.

sdk-rust's People

Contributors

335g avatar andrewwebber avatar ctron avatar dejanb avatar dependabot[bot] avatar jakubnoga avatar jcrossley3 avatar lazzaretti avatar markmandel avatar matzew avatar milenkovicm avatar minghuaw avatar pranav-bhatt avatar rkudryashov avatar slinkydeveloper avatar sunli829 avatar tottoto avatar upsuper avatar xiaoas avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.