rustdoc-llms
Rust documentation helper to generate file `llms.txt` for large language models (LLMs)
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.8%) to scientific vocabulary
Repository
Rust documentation helper to generate file `llms.txt` for large language models (LLMs)
Basic Info
- Host: GitHub
- Owner: SixArm
- License: other
- Language: Rust
- Default Branch: main
- Size: 126 KB
Statistics
- Stars: 4
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
rustdoc-llms
Rust documentation helper that helps a Rust crate developer generate a file
llms.txt that helps provide context to large language models (LLMs).
Thanks to excellent work by the Rust team, rustdoc team, and rustdoc-md team.
How to use this
Install:
sh
cargo install rustdoc-llms
Use the tool when you're working on a crate and you want to document it:
sh
rustdoc-llms
The tool creates two files:
target/doc/foo_bar.json(this uses your own crate naming convention)target/doc/llms.txt(this is a markdown file created by rustdoc-md)
If you like, you can copy these files to the top level of your repository, which can make the files easier to find for search engines and AI systems:
sh
cp target/doc/foo_bar.json llms.json
cp target/doc/llms.txt llms.txt
Scope
This Rust crate is deliberately small and simple. The purpose is to make it
slightly-easier to generate llms based on what's currently easy and available
for Rust crate developers.
Currently this tool calls existing command line interfaces, using cargo and
rustdoc-md with specialized compiler flags. If this tool is useful in
practice, then I intend to iterate to add command line arguments, options,
tests, and the like.
Contributing
Pull requests are welcome. Issues are welcome.
If you want to help in other ways, or provide constructive criticism, or ask questions directly, then please feel free to contact me. I'm Joel Parker Henderson and my email is joel@joelparkerhenderson.com.
What this does
This implements the help description here.
Step 1: Generate JSON documentation:
sh
RUSTC_BOOTSTRAP=1 RUSTDOCFLAGS="-Z unstable-options --output-format json" cargo doc --no-deps
Step 2: Convert from JSON into Markdown:
sh
rustdoc-md --path target/doc/foo_bar.json --output target/doc/foo_bar.md
Step 3: Copy from Markdown file into LLMs file:
sh
cp target/doc/foo_bar.json llms.json
cp target/doc/foo_bar.md llms.txt
Owner
- Name: SixArm
- Login: SixArm
- Kind: organization
- Email: sixarm@sixarm.com
- Location: San Francisco
- Website: http://sixarm.com
- Twitter: sixarm
- Repositories: 580
- Profile: https://github.com/SixArm
SixArm Software
Citation (CITATION.cff)
cff-version: 1.2.0
title: Assertables: Rust crate of assert macros for testing
message: >-
If you use this work and you want to cite it,
then you can use the metadata from this file.
type: software
authors:
- given-names: Joel Parker
family-names: Henderson
email: joel@joelparkerhenderson.com
affiliation: joelparkerhenderson.com
orcid: 'https://orcid.org/0009-0000-4681-282X'
identifiers:
- type: url
value: 'https://github.com/SixArm/assertables-rust-crate/'
description: Assertables: Rust crate of assert macros for testing
repository-code: 'https://github.com/SixArm/assertables-rust-crate/'
abstract: >-
Assertables: Rust crate of assert macros for testing
license: See license file
GitHub Events
Total
- Watch event: 3
- Push event: 4
- Create event: 2
Last Year
- Watch event: 3
- Push event: 4
- Create event: 2
Packages
- Total packages: 1
-
Total downloads:
- cargo 1,077 total
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
crates.io: rustdoc-llms
Rust documentation helper to generate file llms.txt to help training AI large language models (LLMs).
- Documentation: https://docs.rs/rustdoc-llms/
- License: MIT OR Apache-2.0 OR GPL-2.0 OR GPL-3.0 OR BSD-3-Clause
-
Latest release: 0.3.0
published 10 months ago
Rankings
Maintainers (1)
Dependencies
- anstream 0.6.19
- anstyle 1.0.11
- anstyle-parse 0.2.7
- anstyle-query 1.1.3
- anstyle-wincon 3.0.9
- clap 4.5.40
- clap_builder 4.5.40
- clap_derive 4.5.40
- clap_lex 0.7.5
- colorchoice 1.0.4
- equivalent 1.0.2
- eyre 0.6.12
- hashbrown 0.15.4
- heck 0.5.0
- indenter 0.3.3
- indexmap 2.9.0
- is_terminal_polyfill 1.70.1
- itoa 1.0.15
- memchr 2.7.5
- once_cell 1.21.3
- once_cell_polyfill 1.70.1
- proc-macro2 1.0.95
- quote 1.0.40
- rustdoc-md 0.1.0
- ryu 1.0.20
- serde 1.0.219
- serde_derive 1.0.219
- serde_json 1.0.140
- serde_spanned 0.6.9
- strsim 0.11.1
- syn 2.0.104
- toml 0.8.23
- toml_datetime 0.6.11
- toml_edit 0.22.27
- toml_write 0.1.2
- unicode-ident 1.0.18
- utf8parse 0.2.2
- windows-sys 0.59.0
- windows-targets 0.52.6
- windows_aarch64_gnullvm 0.52.6
- windows_aarch64_msvc 0.52.6
- windows_i686_gnu 0.52.6
- windows_i686_gnullvm 0.52.6
- windows_i686_msvc 0.52.6
- windows_x86_64_gnu 0.52.6
- windows_x86_64_gnullvm 0.52.6
- windows_x86_64_msvc 0.52.6
- winnow 0.7.11