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

An export! macro wishlist #14

Open
4 of 5 tasks
emk opened this issue Feb 5, 2018 · 2 comments
Open
4 of 5 tasks

An export! macro wishlist #14

emk opened this issue Feb 5, 2018 · 2 comments

Comments

@emk
Copy link

emk commented Feb 5, 2018

Wow, what a great idea for a crate! I just used this to massively simplify some neon bindings at work. I especially like the export! macro.

While working on this, I wrote a wishlist for enhancements to the export! macro. And yes, I may be able to find some time to work on some of these if you're interested. :-)

  • Optional arguments. It would be great if we could write Option<Foo>, and have that translate to get rather than require.
  • Functions which return Result values. Ideally, I should be able to return any type implementing Error, and have it converted to a Throw result. But this raises the question: Should all exported functions return Result?
  • Rust doc comment support. I should be able to document exported methods with /// without getting an error. This is an easy fix.
  • Automatic #[allow(non_snake_case)] so that exported functions can be given idiomatic JavaScript names.
  • A documentation example showing how to use serde_bytes::ByteBuf to handle JsBuffer values.

Do any of these features interest you? Would you be willing to consider a PR if I prepared one?

@GabrielCastro
Copy link
Owner

All of these, except Error handling, is fixed as of v0.1.1

@emk
Copy link
Author

emk commented Nov 5, 2018

Great! Thank you so much.

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

No branches or pull requests

2 participants