{"id":16346388,"url":"https://github.com/milesgranger/proffer","last_synced_at":"2025-06-21T09:04:28.307Z","repository":{"id":57657602,"uuid":"195735807","full_name":"milesgranger/proffer","owner":"milesgranger","description":"Code generation library for Rust","archived":false,"fork":false,"pushed_at":"2019-11-23T05:27:57.000Z","size":105,"stargazers_count":9,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-21T09:02:44.688Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.rs/proffer","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/milesgranger.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}},"created_at":"2019-07-08T04:21:05.000Z","updated_at":"2024-05-30T09:27:24.000Z","dependencies_parsed_at":"2022-08-26T05:21:37.221Z","dependency_job_id":null,"html_url":"https://github.com/milesgranger/proffer","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/milesgranger/proffer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milesgranger%2Fproffer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milesgranger%2Fproffer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milesgranger%2Fproffer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milesgranger%2Fproffer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/milesgranger","download_url":"https://codeload.github.com/milesgranger/proffer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/milesgranger%2Fproffer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261095303,"owners_count":23108782,"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":[],"created_at":"2024-10-11T00:35:14.135Z","updated_at":"2025-06-21T09:04:23.291Z","avatar_url":"https://github.com/milesgranger.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Proffer\n\n[![CircleCI](https://circleci.com/gh/milesgranger/proffer.svg?style=svg)](https://circleci.com/gh/milesgranger/proffer)\n[![crates.io](http://meritbadge.herokuapp.com/proffer)](https://crates.io/crates/proffer)\n[![License](https://img.shields.io/badge/license-Unlicense-green.svg)](http://unlicense.org/)\n[![Coverage Status](https://coveralls.io/repos/github/milesgranger/proffer/badge.svg?branch=master)](https://coveralls.io/github/milesgranger/proffer?branch=master)\n---\n\n[API Documentation](https://docs.rs/proffer)\n\nCode generation for Rust\n\nNamely useful for generating source code\nfrom other data such as JSON\n\n\n\nExample\n-------\n\nSee the documentation for more examples\n\n```rust\nuse proffer::*;\nlet ipl = Impl::new(\"That\")\n    .add_generic(Generic::new(\"T\").add_trait_bounds(vec![\"ToString\"]).to_owned())\n    .add_function(\n        Function::new(\"foo\")\n            .set_is_pub(true)\n            .add_parameter(Parameter::new(\"bar1\", \"T\"))\n            .add_parameter(Parameter::new(\"bar2\", \"S\"))\n            .set_return_ty(\"T\")\n            .add_generic(Generic::new(\"S\"))\n            .set_body(\"bar\")\n            .to_owned()\n    ).to_owned();\n\nlet expected = r#\"\n    impl\u003cT\u003e That\u003cT\u003e\n        where\n            T: ToString,\n    {\n        pub fn foo\u003cS\u003e(bar1: T, bar2: S) -\u003e T\n            where\n                S: ,\n        {\n            bar\n        }\n    }\n\"#;\n\nlet src_code = ipl.generate();\nprintln!(\"{}\", \u0026src_code);\n\nassert_eq!(\n    norm_whitespace(expected),\n    norm_whitespace(\u0026src_code)\n)\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilesgranger%2Fproffer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmilesgranger%2Fproffer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmilesgranger%2Fproffer/lists"}