Releases: cloudevents/sdk-rust
CloudEvents v0.7.0
- Batch Event implementation for reqwest bindings #200
- dependency updates
CloudEvents v0.6.0
A few critical fixes and dependency updates.
And a new NATS binding!
CloudEvents v0.5.0
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
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 thecloudevents::binding::actix
modulereqwest
to use thecloudevents::binding::reqwest
modulerdkafka
to use thecloudevents::binding::rdkafka
modulewarp
to use thecloudevents::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
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
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
tox
, 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 withget_data
or the ownership withtake_data
. To set the data, you can use bothset_data
orset_data_unchecked
and you must manually invoke the conversion fromT
toevent::Data
(usually withtry_into()
) set_datacontenttype
andset_dataschema
now are part ofEvent
public API- Removed
Data::from_*
methods, since they were not really useful and they were confusing
Message APIs
- Now
message::Error
isSend
andSync
- Renamed some variants of
message::Error
, following G-GOOD-ERR
Integrations
- Actix-web integration: Renamed
RequestExt::into_event
toRequestExt::to_event
, following C-CONV - Actix-web integration: Renamed
cloudevents_sdk_actix_web::RequestExt
tocloudevents_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
On the behalf of CloudEvents community, I'm pleased to announce the 0.2 release of cloudevents/sdk-rust.
New features
- New crate
cloudevents-sdk-rdkafka
: Integration with https://fede1024.github.io/rust-rdkafka. Now you can easily send and receive CloudEvents to/from Kafka using rust! #60 by @pranav-bhatt - New nice apis in
cloudevents-sdk-reqwest
andcloudevents-sdk-actix-web
: #57 & #58 by @pranav-bhatt - New APIs on
Event
to iterate through context attributes, extensions and both: #55 & #66 by @pranav-bhatt & @slinkydeveloper - Redesigned the event builder, now it doesn't require manual parsing of url and time and it can be cloned (to use it as template): #53 by @slinkydeveloper
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 returnsResult
onbuild()
. 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
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!
The first release is out on crates.io: https://crates.io/crates/cloudevents-sdk