0

I'd like to provide my Pest grammar file in documentation generated by rustdoc. All .rs files get their corresponding html in doc/src/cratename, but I cannot found any option to add files with other extensions. Is there any way?

3
  • Do you want to parse a pest grammar file and add doc comments to the documentation or do you just want the whole grammar in the documentation? Commented Apr 8, 2024 at 20:04
  • I'd just want to have the full file, same way all .rs files are attached and browsable. Commented Apr 8, 2024 at 21:35
  • 1
    You can do #[doc = include_str!("../path/to/file")], if that's any help. See doc.rust-lang.org/rustdoc/write-documentation/… Commented Apr 8, 2024 at 22:00

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.