ralfbiedert / interoptopus

The polyglot bindings generator for your library (C#, C, Python, …) 🐙
MIT License
321 stars 28 forks source link

Convert rust document comments into C# style #80

Open ZhaoXiangXML opened 1 year ago

ZhaoXiangXML commented 1 year ago

Is it possible to convert rust document comments into C# style so we can generate C# API document with it?

for instance:

/// This function has documentation.
#[ffi_function]
#[no_mangle]
pub extern "C" fn documented(_x: StructDocumented) -> EnumDocumented {
    EnumDocumented::A
}

should be convert to:

/// <summary>
/// This function has documentation.
/// </summary>
...
ralfbiedert commented 1 year ago

No this isn't supported, and it's in general not on the roadmap. Main reason is Interoptopus is a general-purpose generator, and it would be impossible to properly satisfy all Python, C#, ... documentation tags.

I would, however, accept PRs that automatically inserts some tags that can easily and universally be inferred (e.g., create summary from first Rust summary sentence), but that's about it.