diff --git a/Cargo.toml b/Cargo.toml index 796637a..a0b27c4 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -34,7 +34,7 @@ base64 = "^0.12" url = { version = "^2.1", features = ["serde"] } snafu = "^0.6" bitflags = "^1.2" - +uuid = { version = "1", features = ["v4"] } # runtime optional deps actix-web = { version = "4", optional = true } actix-http = { version = "3", optional = true } @@ -52,14 +52,9 @@ poem-lib = { version = "=1.2.34", optional = true, package = "poem" } [target."cfg(not(target_arch = \"wasm32\"))".dependencies] hostname = "^0.3" -uuid = { version = "^0.8", features = ["v4"] } [target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies] web-sys = { version = "^0.3", features = ["Window", "Location"] } -uuid = { version = "^0.8", features = ["v4", "wasm-bindgen"] } - -[target.'cfg(all(target_arch = "wasm32", target_os="wasi"))'.dependencies] -uuid = { version = "^0.8", features = ["v4"] } [dev-dependencies] rstest = "0.6" diff --git a/example-projects/reqwest-wasm-example/Cargo.toml b/example-projects/reqwest-wasm-example/Cargo.toml index f924018..b35fb03 100644 --- a/example-projects/reqwest-wasm-example/Cargo.toml +++ b/example-projects/reqwest-wasm-example/Cargo.toml @@ -11,7 +11,7 @@ crate-type = ["cdylib"] [dependencies] reqwest = "^0.11" -uuid = "0.8" +uuid = "1" cloudevents-sdk = { path = "../..", features = ["reqwest"] } url = { version = "^2.1" } web-sys = { version = "0.3.39", features = ["Window", "Location"] } diff --git a/example-projects/reqwest-wasm-example/src/lib.rs b/example-projects/reqwest-wasm-example/src/lib.rs index 5a96f48..2b1a31b 100644 --- a/example-projects/reqwest-wasm-example/src/lib.rs +++ b/example-projects/reqwest-wasm-example/src/lib.rs @@ -11,7 +11,7 @@ pub async fn run( data: String, ) -> Result<(), JsValue> { let event = EventBuilderV10::new() - .id(&Uuid::new_v4().to_hyphenated().to_string()) + .id(&Uuid::new_v4().hyphenated().to_string()) .ty(ty) .source("http://localhost/") .data(datacontenttype, data)