Skip to main content

emit_c_doxygen

Function emit_c_doxygen 

Source
pub fn emit_c_doxygen(out: &mut String, doc: &str, indent: &str)
Expand description

Emit Doxygen-style C documentation comments using ///-prefixed lines.

Used by alef-backend-ffi above every extern "C" fn, the *_len() companion, opaque-handle typedef, and (post-cbindgen) the type/enum declarations cbindgen surfaces in the generated .h. cbindgen translates /// source lines into a single /** ... */ Doxygen block per item, so we only need to emit per-line /// content here.

Translates rustdoc sections via render_doxygen_sections:

  • # Arguments\param <name> <description> (one per arg).
  • # Returns\return <description>.
  • # Errors\note <description> (Doxygen has no \throws for C; \note is the convention).
  • # Safety\note SAFETY: <description>.
  • # Example\code\endcode block.

Markdown links ([text](url)) are flattened to text (url). Body lines are word-wrapped at ~100 columns so the rendered /** */ block stays readable in IDE tooltips and terminal viewers.