{"id":16713175,"url":"https://github.com/picrap/deps-gen","last_synced_at":"2026-04-29T19:02:24.043Z","repository":{"id":222021193,"uuid":"755968133","full_name":"picrap/deps-gen","owner":"picrap","description":"Generate files based on dependencies and templates, such as licenses file","archived":false,"fork":false,"pushed_at":"2025-06-23T16:27:14.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-01T22:13:16.985Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/picrap.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-11T16:01:35.000Z","updated_at":"2025-06-23T16:27:18.000Z","dependencies_parsed_at":"2024-02-15T21:25:13.726Z","dependency_job_id":"2668c604-b7a6-4cc3-8dd6-7cc9ec4bde56","html_url":"https://github.com/picrap/deps-gen","commit_stats":null,"previous_names":["picrap/deps-gen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/picrap/deps-gen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picrap%2Fdeps-gen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picrap%2Fdeps-gen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picrap%2Fdeps-gen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picrap%2Fdeps-gen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/picrap","download_url":"https://codeload.github.com/picrap/deps-gen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/picrap%2Fdeps-gen/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32439301,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T18:12:22.909Z","status":"ssl_error","status_checked_at":"2026-04-29T18:11:33.322Z","response_time":110,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-12T20:45:45.678Z","updated_at":"2026-04-29T19:02:24.024Z","avatar_url":"https://github.com/picrap.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# deps-gen\n*From `Cargo.lock` to a generated file.*\n\n# Why?\n\nThe goal is to generate a file from a template with dependencies from `Cargo.lock`.\n\n# How?\n## Build\nIn `Cargo.toml`, add the following line:\n```toml\n[build-dependencies]\ndeps-gen = \"*\"\n```\nthen in your `build.rs`:\n```rust\nuse deps_gen;\n\nfn main() {\n    gen_deps();\n    // // or\n    // let mut configuration = deps::Configuration::new()\n    // // do some changes to configuration here\n    // deps::gen_deps_with_conf(configuration);\n}\n```\n\nThe default configuration will take a `src/deps.template.rs` file and generate a `src/deps.rs` .\n\n## Templating\nThe library uses handlebars with the default [supported syntax](https://docs.rs/handlebars/5.1.0/handlebars/#built-in-helpers).\nThe supported field are\n- `dependencies`, an array with the following values\n  - `name`\n  - `version`\n  - `authors`\n  - `id`\n  - `source`\n  - `description`\n  - `dependencies`\n  - `license`\n  - `license_file`\n  - `targets`\n  - `features`\n  - `manifest_path`\n  - `categories`\n  - `keywords`\n  - `readme`\n  - `repository`\n  - `homepage`\n  - `documentation`\n  - `edition`\n\nsee [Rust manifest reference](https://doc.rust-lang.org/cargo/reference/manifest.html#the-documentation-field) for fields details\n\nAlso note that `//{}` is replaced with ` ` (an empty string) after template processing. This allows to cleanup.\n\n## An example\n\n`deps.template.rs`:\n\n```rust\n#[allow(dead_code)]\n\npub struct License {\n    pub name: \u0026'static str,\n    pub version: \u0026'static str,\n}\n\nimpl License {\n    pub fn all() -\u003e Vec\u003cSelf\u003e {\n        vec![\n            //{}{{#each dependencies}}\n            Self {\n                name: \"{{name}}\",\n                version: \"{{version}}\",\n            },\n            //{}{{/each}}\n        ]\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicrap%2Fdeps-gen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpicrap%2Fdeps-gen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpicrap%2Fdeps-gen/lists"}