tursodatabase / libsql-client-rs

libSQL Rust client library can be used to communicate with sqld natively over HTTP protocol with native Rust interface.
MIT License
75 stars 29 forks source link

update cloudflare worker dep to 0.0.18 #41

Closed aifrim closed 1 year ago

aifrim commented 1 year ago

When trying to use libsql-client within a Cloudflare Worker environment I get this

error[E0432]: unresolved imports `syn::FnArg`, `syn::ImplItem`, `syn::Item`
 --> /home/aifrim/.cargo/registry/src/index.crates.io-6f17d22bba15001f/worker-macros-0.0.6/src/durable_object.rs:3:36
  |
3 | use syn::{spanned::Spanned, Error, FnArg, ImplItem, Item, Type, TypePath};
  |                                    ^^^^^  ^^^^^^^^  ^^^^ no `Item` in the root
  |                                    |      |
  |                                    |      no `ImplItem` in the root
  |                                    no `FnArg` in the root

error[E0432]: unresolved import `syn::ItemFn`
 --> /home/aifrim/.cargo/registry/src/index.crates.io-6f17d22bba15001f/worker-macros-0.0.6/src/event.rs:3:75
  |
3 | use syn::{parse_macro_input, punctuated::Punctuated, token::Comma, Ident, ItemFn};
  |                                                                           ^^^^^^ no `ItemFn` in the root

For more information about this error, try `rustc --explain E0432`.

Here is how it is defined in my Cargo.toml (since the latest changes

[dependencies]
libsql-client = { version = "0.31.10", default-features = false, features = [
    "worker",
    "workers_backend",
    "mapping_names_to_values_in_rows",
], git = "https://github.com/libsql/libsql-client-rs" }

And when I change the git url to my fork https://github.com/aifrim/libsql-client-rs the build works.