Use Rust in Codeforce v2 — My practice with rust-bundler

Правка en2, от cotton, 2021-09-15 11:55:00

In 2021 July, I posted a blog Use Rust in Codeforce — My practice with rust-bundler. After some work, I published a new package rust_bundler_cp, which is designed for competitive programming, and concentrating on codeforces' environment.

Quick guide:

  1. cargo install rust_bundler_cp
  2. git clone --depth=1
  3. cd rust_codeforce_template
  4. rust_bundler_cp --input . --output /dev/shm/

I'm excited to introduce a new feature (experimental): Remove unused pub mod At top of my, I have several pub mod as my code template.

pub mod pr;
pub mod algo;
pub mod nd;
pub mod multi_queue;
pub mod nums;
pub mod iters;

Although Codeforces has a generous code size limit: 64kb, it's always better to avoid unnecessary code. My new version rust_bundler_cp may examine If a mod is not used in, it would be removed from the final output with explicit arg:
rust_bundler_cp --input . --output /dev/shm/ --remove_unused_mod

Looking forward to your feedback!

Теги rust, cf-tool


  Rev. Язык Кто Когда Δ Комментарий
en2 Английский cotton 2021-09-15 11:55:00 54 Format
en1 Английский cotton 2021-09-15 11:52:17 1351 Initial revision (published)