diff --git a/crates/wit-bindgen-rust-macro/src/lib.rs b/crates/wit-bindgen-rust-macro/src/lib.rs index 5e7e2008..c4b7c973 100644 --- a/crates/wit-bindgen-rust-macro/src/lib.rs +++ b/crates/wit-bindgen-rust-macro/src/lib.rs @@ -126,6 +126,9 @@ impl Parse for Config { Opt::TokioPath(path) => { opts.tokio_path = Some(path.value()); } + Opt::TokioUtilPath(path) => { + opts.tokio_util_path = Some(path.value()); + } Opt::TracingPath(path) => { opts.tracing_path = Some(path.value()); } @@ -297,6 +300,7 @@ mod kw { syn::custom_keyword!(bytes_path); syn::custom_keyword!(futures_path); syn::custom_keyword!(tokio_path); + syn::custom_keyword!(tokio_util_path); syn::custom_keyword!(tracing_path); syn::custom_keyword!(wasm_tokio_path); syn::custom_keyword!(wrpc_transport_path); @@ -318,6 +322,7 @@ enum Opt { BytesPath(syn::LitStr), FuturesPath(syn::LitStr), TokioPath(syn::LitStr), + TokioUtilPath(syn::LitStr), TracingPath(syn::LitStr), WasmTokioPath(syn::LitStr), WrpcTransportPath(syn::LitStr), @@ -405,6 +410,10 @@ impl Parse for Opt { input.parse::()?; input.parse::()?; Ok(Opt::TokioPath(input.parse()?)) + } else if l.peek(kw::tokio_util_path) { + input.parse::()?; + input.parse::()?; + Ok(Opt::TokioUtilPath(input.parse()?)) } else if l.peek(kw::tracing_path) { input.parse::()?; input.parse::()?;