You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/src/configuration.md
+92Lines changed: 92 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -470,3 +470,95 @@ Then in your documentation files, you can use breathe directives:
470
470
\`\`\`{doxygenfunction} MyNamespace::myFunction
471
471
\`\`\`
472
472
```
473
+
474
+
## Sphinx-Rust Integration
475
+
476
+
Yardang provides integration with [sphinx-rust](https://sphinx-rust.readthedocs.io/) for documenting Rust code. To use this feature, install yardang with the sphinx-rust extra:
477
+
478
+
```bash
479
+
pip install yardang[sphinx-rust]
480
+
```
481
+
482
+
All sphinx-rust configuration is under `[tool.yardang.sphinx-rust]`.
483
+
484
+
### `crates`
485
+
486
+
A list of paths to Rust crates to document.
487
+
488
+
```toml
489
+
[tool.yardang.sphinx-rust]
490
+
crates = [
491
+
"path/to/crate1",
492
+
"path/to/crate2",
493
+
]
494
+
```
495
+
496
+
### `doc-formats`
497
+
498
+
A dictionary mapping crate names to their docstring format. Valid values are `"restructuredtext"` (default) or `"myst-nb"` (for markdown docstrings).
499
+
500
+
```toml
501
+
[tool.yardang.sphinx-rust]
502
+
doc-formats = { mycrate = "myst-nb" }
503
+
```
504
+
505
+
**Note:** When using `myst_nb` as your Sphinx parser (which yardang uses by default), use `"myst-nb"` instead of `"markdown"` for markdown docstrings.
506
+
507
+
### `viewcode`
508
+
509
+
Enable links to the source code for documented items. Defaults to `true`.
510
+
511
+
```toml
512
+
[tool.yardang.sphinx-rust]
513
+
viewcode = true
514
+
```
515
+
516
+
### Complete Example
517
+
518
+
Here's a complete example configuration for a Rust project:
0 commit comments