Skip to content

Conversation

yotamofek
Copy link

I'm opening a "draft" PR for this, because there are definitely some issues to address,
but wanted to show a POC for this.

Having tokio-compat macros that are orthogonal to the tokio ones will make the transition story from 0.1 to 0.2 a little easier, I hope.

Unfortunately, these are, for the time being, mostly copy-pasted from tokio-macros (they have undergone some changes on latest master, but I'm sticking the version of the macros released with tokio 0.2.6). I tried anything I could think of to prevent this "ugly" duplication of code, but alas... couldn't find any reasonable method to do it. :(

Some questions I'd like to ask the maintainers of this create before taking this PR out of draft status:

  • Is this even something you guys think should be part of the tokio-compat story?
  • Should the file hierarchy of this repo be changed to a "workspace" style with multiple crates? Currently I just created a new crate a root-level dir, because of the (current) limitation whereas a proc macro crate can export only proc macros.
  • Naming-themed bikeshedding: tokio-compat-macros? tokio-macros-compat?

Obviously this also needs a little documentation, but I wanted to get a general green-light before going down that path.

(Also - this is my first "real" contribution to the Rust ecosystem, would really love to be able to give some back to this amazing community.)

@StanislavGlebik
Copy link

Very interested in this, thanks for working on it!

@yotamofek
Copy link
Author

@StanislavGlebik
Glad to know there's actual interest in this. :)
I've been using this code for production stuff for a few weeks now,
but have put off updating it to reflect the updated tokio 0.2 macros,
will hopefully have time in the next day or two.
And then, hopefully, the maintainers of this repo might be more interested in pushing this in.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants