{"id":31929542,"url":"https://github.com/apskhem/rust-code-builder","last_synced_at":"2025-10-14T03:25:02.250Z","repository":{"id":274812851,"uuid":"924094436","full_name":"apskhem/rust-code-builder","owner":"apskhem","description":"A code builder used for Rust code generation.","archived":false,"fork":false,"pushed_at":"2025-01-29T15:20:16.000Z","size":22,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T15:24:16.260Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apskhem.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2025-01-29T12:06:34.000Z","updated_at":"2025-01-29T15:20:20.000Z","dependencies_parsed_at":"2025-01-29T15:34:26.922Z","dependency_job_id":null,"html_url":"https://github.com/apskhem/rust-code-builder","commit_stats":null,"previous_names":["apskhem/rust-code-builder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/apskhem/rust-code-builder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apskhem%2Frust-code-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apskhem%2Frust-code-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apskhem%2Frust-code-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apskhem%2Frust-code-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apskhem","download_url":"https://codeload.github.com/apskhem/rust-code-builder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apskhem%2Frust-code-builder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279017786,"owners_count":26086144,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-10-14T03:24:58.898Z","updated_at":"2025-10-14T03:25:02.244Z","avatar_url":"https://github.com/apskhem.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rust Code Builder\n\nA simple crate for building and managing structured code elements dynamically. It provides tools to create blocks of code, insert lines, and handle indentation, making it useful for code generation in a `no_std` environment.\n\n## Features\n- Supports structured code blocks with nested elements\n- Allows inserting lines and empty lines dynamically\n- Provides configurable indentation settings\n- Works in `no_std` environments\n\n## Usage\n\nAdd `rust-code-builder` as a dependency in your `Cargo.toml`:\n```toml\n[dependencies]\nrust-code-builder = \"0.1.0\"\n```\n\n### Example\n```rust\nuse rust_code_builder::{CodeSpace, Block};\n\nlet code = CodeSpace::new()\n  .insert_line(\"let x = 42;\")\n  .insert_new_line()\n  .insert_block(\n    Block::new()\n      .set_signature(Some(BlockSignature::Custom(String::from(\"if x \u003e 0\"))))\n      .insert_line(\"println!(\\\"Positive number!\\\");\"),\n  );\n\nprintln!(\"{}\", code);\n```\n\n### Output\n```\nlet x = 42;\n\nif x \u003e 0 {\n  println!(\"Positive number!\");\n}\n\n```\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0\n  ([LICENSE-APACHE](LICENSE-APACHE) or \u003chttp://www.apache.org/licenses/LICENSE-2.0\u003e)\n- MIT license\n  ([LICENSE-MIT](LICENSE-MIT) or \u003chttp://opensource.org/licenses/MIT\u003e)\n\n## Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted\nfor inclusion in the work by you, as defined in the Apache-2.0 license, shall be\ndual licensed as above, without any additional terms or conditions.\n\nAlways welcome you to participate, contribute and together.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapskhem%2Frust-code-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapskhem%2Frust-code-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapskhem%2Frust-code-builder/lists"}