{"id":13484782,"url":"https://github.com/lpenz/rust-sourcebundler","last_synced_at":"2025-04-04T18:04:58.991Z","repository":{"id":21860834,"uuid":"94255870","full_name":"lpenz/rust-sourcebundler","owner":"lpenz","description":"Bundle the source code of a binary in a crate into a single .rs file to be used in single-file programming competition sites","archived":false,"fork":false,"pushed_at":"2025-03-17T19:24:12.000Z","size":93,"stargazers_count":62,"open_issues_count":6,"forks_count":12,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T17:09:47.220Z","etag":null,"topics":["codingame","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rustsourcebundler","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/lpenz.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":"2017-06-13T20:41:39.000Z","updated_at":"2025-03-20T20:33:01.000Z","dependencies_parsed_at":"2023-11-16T00:27:29.203Z","dependency_job_id":"53e21717-e457-4c0e-8dbc-99cffc0cd3eb","html_url":"https://github.com/lpenz/rust-sourcebundler","commit_stats":{"total_commits":73,"total_committers":2,"mean_commits":36.5,"dds":"0.013698630136986356","last_synced_commit":"1556403d79db2951c68e978ec95c069e7f2962ca"},"previous_names":[],"tags_count":23,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpenz%2Frust-sourcebundler","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpenz%2Frust-sourcebundler/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpenz%2Frust-sourcebundler/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lpenz%2Frust-sourcebundler/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lpenz","download_url":"https://codeload.github.com/lpenz/rust-sourcebundler/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226213,"owners_count":20904465,"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":["codingame","rust"],"created_at":"2024-07-31T17:01:33.453Z","updated_at":"2025-04-04T18:04:58.956Z","avatar_url":"https://github.com/lpenz.png","language":"Rust","funding_links":[],"categories":["Rust","rust"],"sub_categories":[],"readme":"[![CI](https://github.com/lpenz/rust-sourcebundler/actions/workflows/ci.yml/badge.svg)](https://github.com/lpenz/rust-sourcebundler/actions/workflows/ci.yml)\n[![coveralls](https://coveralls.io/repos/github/lpenz/rust-sourcebundler/badge.svg?branch=main)](https://coveralls.io/github/lpenz/rust-sourcebundler?branch=main)\n[![crates.io](https://img.shields.io/crates/v/rustsourcebundler.svg)](https://crates.io/crates/rustsourcebundler)\n\n# rust-sourcebundler\n\nBundle the source code of a rust cargo crate in a single source file.\n\nVery useful for sending the source code to a competitive programming site that\naccept only a single file ([codingame](https://codingame.com), I'm looking at\nyou) and still keeping the cargo structure locally.\n\n\n## Usage\n\nAdd the following snippet to your *Cargo.toml*:\n\n```toml\n[package]\n(...)\nbuild = \"build.rs\"\n\n[build-dependencies]\nrustsourcebundler = { git = \"https://github.com/lpenz/rust-sourcebundler\" }\n```\n\nAnd create the file *build.rs* with the following:\n\n```rust\n//! Bundle mybin.rs and the crate libraries into singlefile.rs\n\nuse std::path::Path;\nextern crate rustsourcebundler;\nuse rustsourcebundler::Bundler;\n\nfn main() {\n    let mut bundler: Bundler = Bundler::new(Path::new(\"src/bin/mybin.rs\"),\n                                            Path::new(\"src/bin/singlefile.rs\"));\n    bundler.crate_name(\"\u003ccrate name\u003e\");\n    bundler.run();\n}\n```\n\nYou can use the code inside the *example* directory of this repository\nas a starting point.\n\n\n## Similar Projects\n\n* [slava-sh/rust-bundler](https://github.com/slava-sh/rust-bundler)\n* [Endle/rust-bundler-cp](https://github.com/Endle/rust-bundler-cp)\n* [MarcosCosmos/cg-rust-bundler](https://github.com/MarcosCosmos/cg-rust-bundler)\n  written in python\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpenz%2Frust-sourcebundler","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flpenz%2Frust-sourcebundler","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flpenz%2Frust-sourcebundler/lists"}