Rust compiler/libraries are outdated

Could you please upgrade the rust compiler to the last version (1.33.0) and enable edition = “2018”? It’s easier to code in rust since NLL:

time crate: no longer actively maintained, see The author recommends using the chrono crate instead.

rand crate: a lot of work was done since 5.4, see

Compared to other languages (at least python and c++), we have not regex, could you please add the regex crate?

Maybe add lazy_static as suggested by




We will deploy 1.33.0 soon.

Our current compilation command line is (excluding --extern flags):

/usr/local/bin/rustc -O /tmp/ -o /tmp/Answer

Please let us know how it should be changed (cannot find the “edition” flag in the current doc :

Regarding crates, when adding the new rand version, multiple versions of rand_core end up in the target directory. Not sure how that works and what to add to the rustc command line in that case… There are even dependencies from rand_core 0.3.1 to rand_core 0.4 (what? how can this work?). So will have to try a few things before we can update the rand crate.

Note: We are not using Cargo when building. I guess the edition=2018 specified in Cargo.toml is somehow transmitted to rustc but I could not find the equivalent command line.


1 Like


you can use cargo in verbose mode: cargo build -v
give me: rustc --edition=2018 --crate-name hello_2018 src/ --color always --crate-type bin…

which makes things difficult :confused:

Note: do not forget to replace in your templates, trim_right() by trim_end().

cargo tree:
hello_2018 v0.1.0 (/var/home/mpardo/hello_2018)
└── rand v0.6.5
├── libc v0.2.50
├── rand_chacha v0.1.1
│ └── rand_core v0.3.1
│ └── rand_core v0.4.0

rand_chacha depend on rand_core 0.3.1 but I think it was a mistake. rand_chacha was publish on before upgrading his dependencies:

-rand_chacha to 0.1.1, sha1: rand_isaac-0.1.1-55-g04b780c40d, 2019-01-03
-publish on, 2019-01-04:
-rand_chacha, rust_core dependency update to 0.4, sha1: 0.6.4-38-g67c856bfe9, 2019-01-23
-not published


rand_core 0.3.1 really depends on rand_core 0.4: and github, which is strange

Rust updated and libraries updated as well. Check


It’s a huge update. Thanks again.

There have been 7 stable Rust releases since 1.33 (including in particular stabilization of many apis and a great upgrade upgrade for HashMap).
It might be time for an upgrade if not too time-consuming! :slightly_smiling_face:

Also, crossbeam/crossbeam_channel and rayon crates are basics of parallelism in Rust and would be great additions to those that are already there. (BTW, thank you so much for already adding itertools! <3)

We get language updates about twice a year.

So, if Rust has new features, they will be available on CodinGame too - together with updates of other languages.
You won’t get much benefit from multithreading here, as your code is run on a single physical core anyways.

1 Like

Rust is upgraded to 1.38.

1 Like