Skip to content

Commit

Permalink
feat(rs-wit-bindgen): add tokio-util-path
Browse files Browse the repository at this point in the history
Signed-off-by: Roman Volosatovs <[email protected]>
  • Loading branch information
rvolosatovs committed Aug 15, 2024
1 parent 632498a commit 1ad7d83
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions crates/wit-bindgen-rust-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down Expand Up @@ -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);
Expand All @@ -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),
Expand Down Expand Up @@ -405,6 +410,10 @@ impl Parse for Opt {
input.parse::<kw::tokio_path>()?;
input.parse::<Token![:]>()?;
Ok(Opt::TokioPath(input.parse()?))
} else if l.peek(kw::tokio_util_path) {
input.parse::<kw::tokio_util_path>()?;
input.parse::<Token![:]>()?;
Ok(Opt::TokioUtilPath(input.parse()?))
} else if l.peek(kw::tracing_path) {
input.parse::<kw::tracing_path>()?;
input.parse::<Token![:]>()?;
Expand Down

0 comments on commit 1ad7d83

Please sign in to comment.