#docs #embed #markdown-text

macro inline-doc

Embed markdown/text files as documentation

1 unstable release

0.1.0 Jan 25, 2025

#572 in Procedural macros

Download history 100/week @ 2025-01-24 15/week @ 2025-01-31 4/week @ 2025-02-07

119 downloads per month

Custom license

3KB

inline-doc

A working version of

#[doc = include_str!("path")]

Important to note that the path goes from the root of the project.

This project was inspired by lsp_doc and made to work on stable.

Example usage

#[inline_doc("src/docs/thing/documentation.md")]
struct Thing;

#[inline_doc("src/docs/thing.md")]
fn thing() {}

NOTE

When you change anything you need to restart rust-analyzer for the documentation to come into effect. rust-analyzer caches files so it wont update automatically.

Dependencies

~215–650KB
~16K SLoC