Skip to content

Releases: cloudevents/sdk-rust

CloudEvents v0.7.0

24 Feb 11:44
4a86973
Compare
Choose a tag to compare
  • Batch Event implementation for reqwest bindings #200
  • dependency updates

CloudEvents v0.6.0

07 Nov 23:42
e28424e
Compare
Choose a tag to compare

A few critical fixes and dependency updates.

And a new NATS binding!

CloudEvents v0.5.0

17 Mar 04:04
2c5933b
Compare
Choose a tag to compare

Includes support for the latest official actix-web release: v4

Introducing experimental support for the new Rust web libraries: axum and poem.

Reorganized integration with external libraries

07 Jul 13:36
2cae3f0
Compare
Choose a tag to compare

On the behalf of CloudEvents community, I'm pleased to announce the 0.4 release of cloudevents/sdk-rust!

No more integration crates!

From now on, integrations are not going to be shipped as separate crates anymore, but as features within the cloudevents-sdk crate, under the cloudevents::binding module. These features are:

  • actix to use the cloudevents::binding::actix module
  • reqwest to use the cloudevents::binding::reqwest module
  • rdkafka to use the cloudevents::binding::rdkafka module
  • warp to use the cloudevents::binding::warp module (details below)

Check out the refreshed examples for more details: https://github.com/cloudevents/sdk-rust/tree/master/example-projects

Deeper actix-web integration

Thanks to the change described above, we can now provide deeper integrations with the various libraries. As an example, now we provide implementations of actix_web::FromRequest and actix_web::Responder for cloudevents::Event, which allows you to read and write CloudEvents in HTTP envelopes without invoking any additional method:

#[post("/")]
async fn post_event(event: Event) -> Event {
    println!("Received Event: {:?}", event);
    event
}

#[get("/")]
async fn get_event() -> Event {
    EventBuilderV10::new()
        .id("0001")
        .ty("example.test")
        .source("http://localhost/")
        .data("application/json", json!({"hello": "world"}))
        .extension("someint", "10")
        .build()
        .unwrap()
}

Check out the updated actix-web example: https://github.com/cloudevents/sdk-rust/blob/master/example-projects/actix-web-example/

seanmonstar/warp integration

We have a new integration with the web server framework warp, please check it out! For more details: #97

API Breaking changes

There is a breaking change in the type of the source attribute, which now uses an alias type for String. As described in the original issue, because the url::Url type cannot store URI references, we had to modify the type to String to fix incompatibilities. For more details: #106

And more

Other notable changes:

  • Updated warp to 0.3, rdkafka to 0.25 and reqwest to 0.11: #113
  • Fix null attributes in the json unmarshalling, per recent spec update: #142

I wish to thank all the contributors involved in this release!

For a complete list check out the milestone: https://github.com/cloudevents/sdk-rust/milestone/4?closed=1

Serde hotfix

18 Jan 17:24
364ad7b
Compare
Choose a tag to compare
Serde hotfix Pre-release
Pre-release

This release includes an important hotfix that prevents sdk-rust to work with the latest version of serde: #110
It also includes an internal refactoring that removes serde-value dependency: #107

For a complete changelog, look at: https://github.com/cloudevents/sdk-rust/milestone/5?closed=1

Refreshed APIs and aligned with Rust conventions

02 Nov 09:09
d69ab90
Compare
Choose a tag to compare

On the behalf of CloudEvents community, I'm pleased to announce the 0.3 release of cloudevents/sdk-rust!

Changes to the APIs

This release includes important (breaking) changes, in order to align with the Rust API Guidelines. Below you'll find a non exhaustive list of all the relevant changes.

Event APIs

  • The getters were renamed from get_x to x, following C-GETTER
  • Now all setters returns the previous value of the field
  • Now Data is exported in the main crate
  • Implemented the various std traits Debug, Display, Eq/PartialEq, whenever possible, in public data types
  • Reworked read/write data apis in Event. Now there are no more hidden copies. To read data, you can get a borrow with get_data or the ownership with take_data. To set the data, you can use both set_data or set_data_unchecked and you must manually invoke the conversion from T to event::Data (usually with try_into())
  • set_datacontenttype and set_dataschema now are part of Event public API
  • Removed Data::from_* methods, since they were not really useful and they were confusing

Message APIs

  • Now message::Error is Send and Sync
  • Renamed some variants of message::Error, following G-GOOD-ERR

Integrations

  • Actix-web integration: Renamed RequestExt::into_event to RequestExt::to_event, following C-CONV
  • Actix-web integration: Renamed cloudevents_sdk_actix_web::RequestExt to cloudevents_sdk_actix_web::HttpRequestExt for consistency
  • All integrations: All *Ext trait are now sealed, following C-SEALED

Other changes

  • Actix-web updated to 3.0
  • Now our CI runs the matrix of different supported build targets (glibc/musl/wasm) in each PR and run more lints
  • Now our CI test examples
  • A lot of additions to our docs

For a complete changelog, look at: https://github.com/cloudevents/sdk-rust/milestone/3?closed=1

What's next

In the next releases, we'll focus on improving the stability of the main crate cloudevents-sdk. We're also working on adding support for no_std and we hope to receive new contributions for new integrations!

Huge thanks to all people involved in this release!

0.2: Kafka and new APIs to work with Event

06 Aug 13:59
35b37e5
Compare
Choose a tag to compare

On the behalf of CloudEvents community, I'm pleased to announce the 0.2 release of cloudevents/sdk-rust.

New features

Improvements & bug fixes

  • Improvements in docs: #51 & #71
  • Now Event deserialization does not assume default values anymore (and it fails if some mandatory attributes are not there): #41

Breaking changes

  • Removed hardcoded constants from specversion crate: #52
  • Redesigned the event builder, now it requires importing the EventBuilder trait and returns Result on build(). It also does not assume anymore the default values: #53

For a complete changelog, look at: https://github.com/cloudevents/sdk-rust/milestone/2?closed=1

Huge thanks to all people involved in this release!

First release of sdk-rust

20 May 12:08
Compare
Choose a tag to compare
Pre-release

Yes, this time it's for real! We're pleased to announce you the first release of sdk-rust! Look at https://github.com/cloudevents/sdk-rust#get-started to start using it

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

First release!

13 Mar 07:42
Compare
Choose a tag to compare
First release! Pre-release
Pre-release

The first release is out on crates.io: https://crates.io/crates/cloudevents-sdk