cargo-equip
A Cargo subcommand to bundle your code into one .rs file for competitive programming.
Example
[]
= "lib"
= "0.0.0"
= "2018"
[]
= []
= []
= ["crate::xorshift", "::__atcoder::modint"]
= []
# ..
= ["::__atcoder::internal_bit", "::__atcoder::modint"]
= []
= []
= []
= []
= []
= ["::__atcoder::internal_bit", "::__atcoder::segtree"]
= ["::__atcoder::internal_math"]
= ["::__atcoder::internal_type_traits", "::__atcoder::internal_queue"]
= ["::__atcoder::internal_type_traits"]
= ["::__atcoder::internal_math"]
= ["::__atcoder::internal_scc"]
= ["::__atcoder::internal_bit", "::__atcoder::internal_type_traits"]
= ["::__atcoder::internal_scc"]
[]
= { = "ac-library-rs", = "https://github.com/rust-lang-ja/ac-library-rs", = "replace-absolute-paths" }
[]
= "bin"
= "0.0.0"
= "2018"
[]
= { = "ac-library-rs", = "https://github.com/rust-lang-ja/ac-library-rs", = "replace-absolute-paths" }
= { = "lib", = "/path/to/lib" }
use ::;
use Write as _;
↓
$ cargo equip --remove docs test-items --minify mods --rustfmt --check -o ./bundled.rs
Bundling code
warning: could not minify the code. inserting spaces: `internal_math`
Checking cargo-equip-check-output-rml3nu3kghlx3ar4 v0.1.0 (/tmp/cargo-equip-check-output-rml3nu3kghlx3ar4)
Finished dev [unoptimized + debuginfo] target(s) in 0.30s
Submit Info #24741 - Library-Checker
Installation
Crates.io
$ cargo install cargo-equip
master
$ cargo install --git https://github.com/qryxip/cargo-equip
GitHub Releases
Usage
TODO (Japanese)
License
Dual-licensed under MIT or Apache-2.0.