6 releases

new 0.4.2 May 30, 2023
0.4.1 May 21, 2023
0.4.0 Apr 4, 2023
0.3.1 Feb 28, 2023
0.2.2 Jan 5, 2023

#125 in FFI

Download history 60/week @ 2023-02-11 38/week @ 2023-02-18 149/week @ 2023-02-25 40/week @ 2023-03-04 87/week @ 2023-03-11 104/week @ 2023-03-18 139/week @ 2023-03-25 347/week @ 2023-04-01 652/week @ 2023-04-08 193/week @ 2023-04-15 432/week @ 2023-04-22 497/week @ 2023-04-29 305/week @ 2023-05-06 144/week @ 2023-05-13 240/week @ 2023-05-20 357/week @ 2023-05-27

1,118 downloads per month
Used in 3 crates (2 directly)

BSD-3-Clause

51KB
1.5K SLoC

doxygen-rs

Transform Doxygen to Rustdoc.

Docs available here

Installation

Add this to your Cargo.toml

[dependencies]
doxygen-rs = "0.4"

Usage with Bindgen

Available on >=0.63 bindgen

#[derive(Debug)]
struct Cb;

impl ParseCallbacks for Cb {
    fn process_comment(&self, comment: &str) -> Option<String> {
        Some(doxygen_rs::transform(comment))
    }
}

Example

use doxygen_rs::transform;

let rustdoc = transform("@brief Example Doxygen brief");
assert_eq!(rustdoc, "Example Doxygen brief\n\n");

lib.rs:

Simple Doxygen to Rustdoc translation.

Provides a simple and straightforward API to translate raw Doxygen comments to Rustdoc comments. Purely experimental right now, maybe practical in a future?

Examples

use doxygen_rs::transform;

let rustdoc = transform("@brief Example Doxygen brief");
assert_eq!(rustdoc, "Example Doxygen brief");

Usage with bindgen >= 0.63

# trait ParseCallbacks {
#   fn process_comment(&self, comment: &str) -> Option<String>;
# }
#[derive(Debug)]
struct Cb;

impl ParseCallbacks for Cb {
    fn process_comment(&self, comment: &str) -> Option<String> {
        Some(doxygen_rs::transform(comment))
    }
}

Dependencies

~1.5MB
~37K SLoC