Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Detailed Examples #17

Closed
glademiller opened this issue Dec 5, 2017 · 5 comments
Closed

Detailed Examples #17

glademiller opened this issue Dec 5, 2017 · 5 comments

Comments

@glademiller
Copy link

I love where this project is going and I would be surprised if it wasn't already on your radar but a good examples directory would be excellent.

The main issue I faced yesterday when trying to use darling was getting the example in the Readme compiling I had to implement a trait by hand in order for it to work which wasn't in the example.

Once I got that working it is a bit of work to figure out how to setup something in a struct to get be able to derive data about the fields on a struct. Similar to how serde allows you to annotate each field. I think a few good examples would go a long way to making darling easily usable.

@TedDriggs
Copy link
Owner

I've picked up the project for the first time in a few months, and I definitely agree there's room for some better examples.

The main issue I faced yesterday when trying to use darling was getting the example in the Readme compiling I had to implement a trait by hand in order for it to work which wasn't in the example.

That's... concerning. I'll look into that.

@TedDriggs
Copy link
Owner

@glademiller I've added one example, though I haven't had time to test it in depth.

@glademiller
Copy link
Author

Great! Thanks for the quick reply. I'll take a close look this evening.

@TedDriggs
Copy link
Owner

I've now added a second example, and found a way to make the examples produce something useful when they're run.

@glademiller
Copy link
Author

These are excellent. Thank you for taking the time to get this done. I have something I want to build and this will help a lot. From my perspective you met my expectations for this issue and it could be closed unless you want to use it as a jumping off point for further examples.

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

No branches or pull requests

2 participants