Rust competitive programming workspace with a reusable library under src/
and multiple per-problem binaries under src/bin/.
The codebase is derived from:
to-omer/competitive-libraryfor the algorithm and data structure libraryEndle/rust_codeforce_templatefor the contest-oriented project layout
src/lib.rs: library entry point exposed ascpsrc/bin/_template.rs: starter file used when resetting problem filessrc/bin/{main,a,b,c,d,e,f,g}.rs: contest or problem entry pointscr: helper python script to bundle, compile, and run a selected binary
- Rust toolchain
- Edit the target binary, for example
src/bin/a.rsorsrc/bin/main.rs. - Run it normally during development:
cargo run --bin a- Bundle, compile, and execute the single-file submission:
./cr a./cr --reset backs up the current problem files under backup/<timestamp>/
and restores fresh copies from src/bin/_template.rs.
Bundled output is written to /tmp/.
All credit goes to the amazing to-omer and Endle for the library and template they have provided.
This repository is distributed under the GNU General Public License, version 3. It includes inherited MIT-licensed and CC0-licensed upstream code.