Derive macro for plugin option parsing #12466
Labels
enhancement
New feature or request
needs-triage
An issue that hasn't had any proper look
plugins
This issue is about plugins
Related problem
Plugin command signatures and option handling has significant boilerplate. Information like error handling and conversion is fairly manual. The signature and certain behavior are in separate pieces of the program.
Describe the solution you'd like
A derive macro to allow plugin commands to declare their arguments. Ideally it should follow a similar API to clap's derive macro. That means following both an API that is proven and is familiar among Rustaceans. It can be built mostly on top of the
nu_protocol::FromValue
trait.Describe alternatives you've considered
No response
Additional context and details
I am interested in working on this feature. I have limited experience in nu and derive macros, but after digging into syn, quote, and proc macros it feels doable.
In parallel, I am working on an LDAP plugin. That can be a test ground for how it looks on a real world plugin.
The text was updated successfully, but these errors were encountered: