Skip to content

Commit c292e7c

Browse files
Renamed features
Moved all bindings under a binding crate Signed-off-by: Francesco Guardiani <[email protected]>
1 parent cd98c67 commit c292e7c

File tree

30 files changed

+43
-44
lines changed

30 files changed

+43
-44
lines changed

.github/workflows/rust_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ jobs:
9797
with:
9898
command: build
9999
toolchain: ${{ matrix.toolchain }}
100-
args: --target wasm32-unknown-unknown --features cloudevents-reqwest
100+
args: --target wasm32-unknown-unknown --features reqwest-binding
101101

102102
# Build examples
103103
- uses: actions-rs/cargo@v1

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@ categories = ["web-programming", "encoding", "data-structures"]
1717
name = "cloudevents"
1818

1919
[features]
20-
cloudevents-actix = ["actix-web", "async-trait", "lazy_static", "bytes", "futures"]
21-
cloudevents-reqwest = ["reqwest", "async-trait", "lazy_static", "bytes"]
22-
cloudevents-rdkafka = ["rdkafka", "lazy_static", "bytes"]
23-
cloudevents-warp = ["warp", "lazy_static", "bytes", "http", "hyper"]
20+
actix-binding = ["actix-web", "async-trait", "lazy_static", "bytes", "futures"]
21+
reqwest-binding = ["reqwest", "async-trait", "lazy_static", "bytes"]
22+
rdkafka-binding = ["rdkafka", "lazy_static", "bytes"]
23+
warp-binding = ["warp", "lazy_static", "bytes", "http", "hyper"]
2424

2525
[dependencies]
2626
serde = { version = "^1.0", features = ["derive"] }

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ The core modules include definitions for the `Event` and
2525
mechanism to support various Protocol Bindings, each of which is
2626
enabled by a specific [feature flag]:
2727

28-
* `cloudevents-actix`: Integration with [actix](https://actix.rs/).
29-
* `cloudevents-warp`: Integration with [warp](https://github.com/seanmonstar/warp/).
30-
* `cloudevents-reqwest`: Integration with [reqwest](https://github.com/seanmonstar/reqwest).
31-
* `cloudevents-rdkafka`: Integration with [rdkafka](https://fede1024.github.io/rust-rdkafka).
28+
* `actix-binding`: Integration with [actix](https://actix.rs/).
29+
* `warp-binding`: Integration with [warp](https://github.com/seanmonstar/warp/).
30+
* `reqwest-binding`: Integration with [reqwest](https://github.com/seanmonstar/reqwest).
31+
* `rdkafka-binding`: Integration with [rdkafka](https://fede1024.github.io/rust-rdkafka).
3232

3333
This crate is continuously tested to work with GNU libc, WASM and musl
3434
toolchains.
@@ -40,7 +40,7 @@ enabling your Protocol Binding of choice:
4040

4141
```toml
4242
[dependencies]
43-
cloudevents-sdk = { version = "0.3.1", features = ["cloudevents-actix"] }
43+
cloudevents-sdk = { version = "0.3.1", features = ["actix-binding"] }
4444
```
4545

4646
Now you can start creating events:

example-projects/actix-web-example/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors = ["Francesco Guardiani <[email protected]>"]
55
edition = "2018"
66

77
[dependencies]
8-
cloudevents-sdk = { path = "../..", features = ["cloudevents-actix"] }
8+
cloudevents-sdk = { path = "../..", features = ["actix-binding"] }
99
actix-web = "^3"
1010
actix-cors = "^0.5"
1111
lazy_static = "1.4.0"

example-projects/rdkafka-example/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ edition = "2018"
88

99
[dependencies]
1010
async-trait = "^0.1.33"
11-
cloudevents-sdk = { path = "../..", features = ["cloudevents-rdkafka"] }
11+
cloudevents-sdk = { path = "../..", features = ["rdkafka-binding"] }
1212
lazy_static = "1.4.0"
1313
bytes = "^1.0"
1414
url = { version = "^2.1", features = ["serde"] }

example-projects/rdkafka-example/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ use futures::StreamExt;
33
use serde_json::json;
44

55
use cloudevents::{EventBuilder, EventBuilderV10};
6-
use cloudevents::rdkafka::{FutureRecordExt, MessageExt, MessageRecord};
6+
use cloudevents::binding::rdkafka::{FutureRecordExt, MessageExt, MessageRecord};
77

88
use rdkafka::config::{ClientConfig, RDKafkaLogLevel};
99
use rdkafka::consumer::stream_consumer::StreamConsumer;

example-projects/reqwest-wasm-example/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ crate-type = ["cdylib"]
1111

1212
[dependencies]
1313
reqwest = "^0.11"
14-
cloudevents-sdk = { path = "../..", features = ["cloudevents-reqwest"] }
14+
cloudevents-sdk = { path = "../..", features = ["reqwest-binding"] }
1515
url = { version = "^2.1" }
1616
web-sys = { version = "0.3.39", features = ["Window", "Location"] }
1717
wasm-bindgen-futures = "0.4.12"

example-projects/reqwest-wasm-example/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use cloudevents::reqwest::RequestBuilderExt;
1+
use cloudevents::binding::reqwest::RequestBuilderExt;
22
use cloudevents::{EventBuilder, EventBuilderV10};
33
use wasm_bindgen::prelude::*;
44

example-projects/warp-example/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ categories = ["web-programming", "encoding"]
77
license-file = "../LICENSE"
88

99
[dependencies]
10-
cloudevents-sdk = { path = "../..", features = ["cloudevents-warp"] }
10+
cloudevents-sdk = { path = "../..", features = ["warp-binding"] }
1111
warp = "^0.3"
1212
tokio = { version = "^1.0", features = ["full"] }

example-projects/warp-example/src/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
use cloudevents::warp::{filter, reply};
1+
use cloudevents::binding::warp::{filter, reply};
22
use warp::Filter;
33

44
#[tokio::main]

0 commit comments

Comments
 (0)