| Crates.io | docparser |
| lib.rs | docparser |
| version | 0.1.0 |
| created_at | 2025-06-10 14:30:00.578019+00 |
| updated_at | 2025-06-10 14:30:00.578019+00 |
| description | A CLI tool to extract Rust doc comments and export them in JSON or WSON format |
| homepage | |
| repository | https://github.com/LunaStev/docparser |
| max_upload_size | |
| id | 1707168 |
| size | 40,630 |
Extract Rust documentation comments from source files and output them in JSON or WSON format.
Parses Rust source files and collects:
//!)///)Outputs in:
json: Standard JSON formatwson: Wave Serialization Object Notation (WSON)Install from source:
cargo install docparser
After installation, you can run docparser as a CLI tool.
docparser <filename> [--format json|wson]
Default (WSON) format:
docparser src/lib.rs
JSON format:
docparser src/lib.rs --format json
Display help:
docparser --help
WSON output (default):
{
module_docs = [
"This module is a user API.",
"All user-related features are here."
],
functions = [
{
name = "create_user",
docs = [
"Create a user.",
"",
"# Parameters",
"* `name` - Username",
"* `age` - Age",
"",
"# Returns",
"* `User` struct"
]
}
],
structs = [
],
enums = [
]
}
This project is licensed under the Mozilla Public License 2.0. See LICENSE for more details.