Skip to content

Latest commit

 

History

History
24 lines (18 loc) · 1.13 KB

architecture.md

File metadata and controls

24 lines (18 loc) · 1.13 KB

Architecture

The current architecture is line-aware, which means that each line is treated independently of each other.

Lifetime of a Doxygen comment

The Doxygen comment, enters the parser, and each line is processed individually and transformed into a Value. A Value can be either: a notation, a value, a separator or an unknown value.

Then, the Vec<Value> generated by the parser is transformed to an intermediate representation that classifies the values into: a brief, a description, various params, deprecation status, list of To-Dos, the description of the returned value, etc.

And finally, the intermediate representation is transformed into a Rustdoc string. The generator knows what are the params, description, brief, etc. and can convert them directly to the Rustdoc string.

Groups

With the current implementation and architecture, groups are at least difficult. Because of that, groups are completely ignored right now.

Speed

Benchmarks show that the time for parsing, transforming and generating the ctru-sys bindings is around 680ms. With the following specs:

  • AMD Ryzen 5 3400G
  • 16GB RAM