{"id":16567764,"url":"https://github.com/endle/rust-bundler-cp","last_synced_at":"2025-03-16T20:31:08.173Z","repository":{"id":37832754,"uuid":"394547806","full_name":"Endle/rust-bundler-cp","owner":"Endle","description":"rust-bundler-cp bundles a cargo package into a single rust file. It's designed for Competitive programming like Codeforces.","archived":false,"fork":false,"pushed_at":"2024-04-07T17:29:56.000Z","size":132,"stargazers_count":17,"open_issues_count":2,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-12T21:07:23.375Z","etag":null,"topics":["codeforces","competitive-programming","rust"],"latest_commit_sha":null,"homepage":"https://crates.io/crates/rust_bundler_cp","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/Endle.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}},"created_at":"2021-08-10T06:25:13.000Z","updated_at":"2024-09-13T06:40:07.000Z","dependencies_parsed_at":"2024-04-07T18:41:08.798Z","dependency_job_id":null,"html_url":"https://github.com/Endle/rust-bundler-cp","commit_stats":{"total_commits":90,"total_committers":8,"mean_commits":11.25,"dds":0.6555555555555556,"last_synced_commit":"c0e3131d504978ad98ec46afb27942cc7cd32150"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Endle%2Frust-bundler-cp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Endle%2Frust-bundler-cp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Endle%2Frust-bundler-cp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Endle%2Frust-bundler-cp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Endle","download_url":"https://codeload.github.com/Endle/rust-bundler-cp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221667740,"owners_count":16860623,"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":["codeforces","competitive-programming","rust"],"created_at":"2024-10-11T21:07:26.569Z","updated_at":"2024-10-27T11:13:40.759Z","avatar_url":"https://github.com/Endle.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"#  [![Stand With Ukraine](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/badges/StandWithUkraine.svg)](https://stand-with-ukraine.pp.ua) rust-bundler-cp\n\n\n\nThis project is based on [rust-bundler](https://github.com/slava-sh/rust-bundler/)\n\nCreates a single-source-file version of a Cargo package. It's designed for Competitive Programming like Codeforces.\n\n\n\n## Features\n\n* Uses [Syn](https://docs.rs/syn/latest/syn/) to parse and manipulate a complete syntax tree, instead of doing replacement with regular expression.  \n* Replaces `extern crate my_lib;` in `main.rs` with the contents of `lib.rs`.\n* Expands `mod my_mod;` declarations into `mod my_mod { ... }` blocks.\n* [rustfmt](https://github.com/rust-lang/rustfmt) needs to be available in `PATH`, i.e. `dnf install rustfmt`. I'll consider bundle `rustfmt` in my code later.\n* Unsupported: External `[dependencies]` in `Cargo.toml`  \n\n## Example\n \n[Endle's codeforces template](https://github.com/Endle/rust_codeforce_template) is co-evoloved with [rust-bundler-cp](https://github.com/Endle/rust-bundler-cp), and is considered as the example of it.  \n\n## Usage\n\nInstall:\n```sh\n$ cargo install rust_bundler_cp\n```\n\nRun:\n```sh\n$ rust_bundler_cp --input path/to/project \u003eoutput.rs\n$ rust_bundler_cp --input path/to/project --binary a\n```\n\n\n\n## Similar Projects\n* This project is based on [slava-sh /rust-bundler](https://github.com/slava-sh/rust-bundler)\n* [lpenz/rust-sourcebundler](https://github.com/lpenz/rust-sourcebundler)\n  is based on regular expressions, whereas this project manipulates the syntax tree\n* [MarcosCosmos/cg-rust-bundler](https://github.com/MarcosCosmos/cg-rust-bundler)\n* [golang.org/x/tools/cmd/bundle](https://godoc.org/golang.org/x/tools/cmd/bundle) for Go\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendle%2Frust-bundler-cp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fendle%2Frust-bundler-cp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fendle%2Frust-bundler-cp/lists"}