{"id":16592547,"url":"https://github.com/jakestanger/rust-bindocs","last_synced_at":"2026-04-25T03:16:30.763Z","repository":{"id":184723570,"uuid":"672364186","full_name":"JakeStanger/rust-bindocs","owner":"JakeStanger","description":"A tool to assist writing documentation for Rust binaries.","archived":false,"fork":false,"pushed_at":"2023-07-29T21:06:56.000Z","size":32,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-26T22:37:45.542Z","etag":null,"topics":["binary","cli","documentation","generator","markdown","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/bindocs","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JakeStanger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-29T20:26:53.000Z","updated_at":"2023-07-29T21:08:34.000Z","dependencies_parsed_at":"2023-07-29T22:46:26.601Z","dependency_job_id":null,"html_url":"https://github.com/JakeStanger/rust-bindocs","commit_stats":null,"previous_names":["jakestanger/rust-bindocs"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeStanger%2Frust-bindocs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeStanger%2Frust-bindocs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeStanger%2Frust-bindocs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JakeStanger%2Frust-bindocs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JakeStanger","download_url":"https://codeload.github.com/JakeStanger/rust-bindocs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242241245,"owners_count":20095339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary","cli","documentation","generator","markdown","rust"],"created_at":"2024-10-11T23:21:16.278Z","updated_at":"2026-04-25T03:16:30.694Z","avatar_url":"https://github.com/JakeStanger.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Bindocs\n\nA tool to assist writing documentation for Rust binaries.\n\n---\n\nRustdoc is a brilliant tool, but it's only really suited to libraries.\nDocumenting applications can be a pain,\nbecause you often need to reference types from the code,\nbut don't want to include all the internal information or require end-users to look at code docs.\nThe alternative is writing everything by hand, but keeping that in sync with code changes can be a pain,\nand it is easy to make mistakes.\n\nThis tool is designed to simplify that process by providing a basic templating engine\nthat can generate documentation straight from your source code, optimised for end-users,\nand inlined in your existing docs.\n\nExisting Rustdoc comments are fully supported, \nand the contained markdown is seemingly integrated into your document.\n\n\u003e ⚠️ The tool is currently in its infancy. \n\u003e Only Markdown output is supported, and expect bugs.\n\n## Installation\n\n`cargo install bindocs`\n\n[crate](https://crates.io/crates/bindocs)\n\n## Usage\n\nThe crate includes a CLI.\nPoint it at the root of a crate, optionally specify the documentation input/output directories,\nand your docs will be rendered out.\n\n\n### Args\n\n\n#### project_path\n\n\u003e Type: `PathBuf`\n\nPath to the crate root.\nDefaults to current dir.\n\n#### docs_path\n\n\u003e Type: `PathBuf?`\n\nPath to the document templates(s).\nThis can be a file name for a single file, or a directory for multiple.\nDefaults to `\u003cproject_path\u003e/docs`.\n\n#### output_path\n\n\u003e Type: `PathBuf?`\n\nPath to output the rendered doc(s).\nThis can be a file name for a single file, or directory for multiple.\nDefaults to `\u003cproject_path\u003e/target/bindoc`.\n\n\n---\n\nInside your input markdown, use `\u003c%  template_blocks  %\u003e` to denote where types should automatically be injected.\nYou can inject any struct or enum owned by your crate.\n\nFor example, if you have a `config` module containing a `MyConfig` struct:\n\n```rust\nstruct MyConfig {\n    /// Enables foo mode.\n    foo: bool,\n    \n    /// Specifies the `bar` value to use.\n    /// \n    /// # Example\n    /// \n    /// ```json\n    /// { \"bar\" = \"baz\" }\n    /// ```\n    bar: String,\n}\n```\n\nYou can inject it into your documentation as follows:\n\n```markdown\n# My docs page\n\nLorem ipsum dolar sit amet.\n\n\u003c%  config::AppConfig  %\u003e\n\nOrnare lectus sit amet est placerat in egestas.\n```\n\nThis will produce an output similar to the below:\n\n````markdown\n## MyConfig\n\n### foo\n\n\u003e Type: `bool`\n\nEnables foo mode.\n\n### bar\n\n\u003e Type: `String`\n\nSpecifies the `bar` value to use.\n\n#### Example\n\n```json\n{ \"bar\": \"baz\" }\n```\n````\n\n\u003e ✅ If the type is uniquely named within your project, \n\u003e you can omit the path (ie just `AppConfig`) and bindocs will resolve it still.\n\n### Configuring injections\n\nEach injection can be individually configured using [Corn](https://github.com/jakestanger/corn)\nafter the path to the type, before the closing brace.\n\nFor example, to change the heading depth:\n\n```markdown\n\u003c%  config::AppConfig { depth = 3 }  %\u003e\n```\n\n#### Injection replace options\n\n\n##### header\n\n\u003e Type: `bool`\n\nWhether to include the element header.\nDefaults to true.\n\n##### depth\n\n\u003e Type: `usize`\n\nThe current heading depth, starting at `0`.\nHeadings will be placed at one more than the current depth.\nFor example, if the next heading should be `## h2`, use a depth of `1`.\n\n\n## Contributing\n\nContributions are welcome!\n\nIf you find any issues, please open a bug report.\n\nIf you have a feature request, please open an issue first to allow it to be discussed.\nMore options and render formats are more than likely to be accepted.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakestanger%2Frust-bindocs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakestanger%2Frust-bindocs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakestanger%2Frust-bindocs/lists"}