cargo-equip
A Cargo subcommand to bundle your code into one .rs file for competitive programming.
Example
[]
= "my_library"
= "0.0.0"
= "2018"
[]
= []
= []
= ["crate::xorshift", "::__aclrs::modint"]
= []
# ..
= ["::__aclrs::internal_bit", "::__aclrs::modint"]
= []
= []
= []
= []
= []
= ["::__aclrs::internal_bit", "::__aclrs::segtree"]
= ["::__aclrs::internal_math"]
= ["::__aclrs::internal_type_traits", "::__aclrs::internal_queue"]
= ["::__aclrs::internal_type_traits"]
= ["::__aclrs::internal_math"]
= ["::__aclrs::internal_scc"]
= ["::__aclrs::internal_bit", "::__aclrs::internal_type_traits"]
= ["::__aclrs::internal_scc"]
[]
= { = "ac-library-rs", = "https://github.com/rust-lang-ja/ac-library-rs", = "replace-absolute-paths" }
[]
= "solve"
= "0.0.0"
= "2018"
[]
= { = "ac-library-rs", = "https://github.com/rust-lang-ja/ac-library-rs", = "replace-absolute-paths" }
= { = "my_library", = "../my_library" }
use ModInt;
use ;
use Write as _;
↓
❯ cargo equip --resolve-cfgs --remove docs --minify libs --rustfmt --check -o ./bundled.rs
Bundling the code
warning: found `crate` paths. replacing them with `crate::__aclrs`
Checking cargo-equip-check-output-nhuj1nqc32ksbrs2 v0.1.0 (/tmp/cargo-equip-check-output-nhuj1nqc32ksbrs2)
Finished dev [unoptimized + debuginfo] target(s) in 0.31s
Submit Info #27831 - 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.