Skip to content

Use procedural macros for man pages

AdminXVII requested to merge AdminXVII/ion:macro-builtins into master

To avoid recopying the man page of each builtin for documentation, create a macro that check for the help argument and print the man page as rustdoc documentation.

This also has the added benefit of making the man pages closer to the builtins, and thus making it easier to see if the implementation matches the specification.

Ideally, man pages would be parsed from rustdoc comments, but I did not find a way to capture non-related attributes in the macro. Using function style macro seems less clean to me, but would allow to parse comments.

Edited by AdminXVII

Merge request reports