Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump Rust version to 1.56.0 #118

Closed
TonalidadeHidrica opened this issue Mar 26, 2023 · 8 comments
Closed

Bump Rust version to 1.56.0 #118

TonalidadeHidrica opened this issue Mar 26, 2023 · 8 comments

Comments

@TonalidadeHidrica
Copy link
Collaborator

TonalidadeHidrica commented Mar 26, 2023

Currently, the MSRV (Minimum Supported Rust Version) is essentially 1.42.0, which is intednded to work in AtCoder.
Now that AtCoder is updating the version, it may be a good idea to bump supported version, so that we can now use 2021 Edition and various new features.

However we also need to consider other websites (CodeForces, yukicoder, ...) too. I'm going to survey the Rust versions used in other platforms and post them as a succeeding comment.

@TonalidadeHidrica
Copy link
Collaborator Author

TonalidadeHidrica commented Mar 26, 2023

Here is a collection of "famous" online judge sites, accompanied by available rust versions. (The choice is very subjective. Feel free to suggest other websites that are somewhat famous. I also tried to include as much Japanese judges as possible.)

FYI:

  • Rust 2018 Edition was stablized since 1.31.0.
  • Rust 2021 Edition was stablized since 1.56.0.

See also this Wiki, which is not as comprehensive as this list, but contains some more useful information.


Basically, I think we may bump MSRV to Rust 1.56.0, adopting Rust 2021. Apart from GCJ, the only websites that will be no longer supported are AOJ and MojaCoder. Do you think it is OK, or shuold we stick to 1.42-ish versions?

@TonalidadeHidrica TonalidadeHidrica changed the title Bump Rust version Bump Rust version to 1.56.0 Mar 26, 2023
@TonalidadeHidrica
Copy link
Collaborator Author

TonalidadeHidrica commented Mar 26, 2023

My bad, I shuold have checked #83 first. Anyway, this issue suggests a completely different direction from #83 , and I want other users' opinions.

@TonalidadeHidrica
Copy link
Collaborator Author

One possible downside of upgrading the edition to 2021 is that it may no longer compile when "expanded."

@mizar
Copy link
Collaborator

mizar commented Apr 17, 2023

yukicoder Bumped 1.68.1 (2021).

@togatoga
Copy link
Contributor

togatoga commented Oct 21, 2023

@TonalidadeHidrica

Thank you for bringing this topic. I think it's enough to stick with AtCoder platform because ac-library-rs is a rust port of AtCoder Library.
For me, it's super painful to keep using 1.42.0 version because some platforms seem not to support 1.42.0.
I want to bump the version as soon as possible.

@koba-e964
Copy link
Collaborator

koba-e964 commented Oct 24, 2023

Universal Cup (contest.ucup.ac) seems to support Rust 1.66.0.
(evidence: the following code

fn main() {
// 1.66.0
let x = Some((1, "hi"));
let y = None::<(u8, u32)>;

assert_eq!(x.unzip(), (Some(1), Some("hi")));
assert_eq!(y.unzip(), (None, None));
// 1.67.0
assert_eq!(5i32.checked_ilog(5), Some(1));
}

emits a compilation error: https://contest.ucup.ac/submission/225227)

Maybe somewhere between 1.60.0 and 1.70.0 should be fine.

@koba-e964
Copy link
Collaborator

koba-e964 commented Oct 24, 2023

Personal opinion: we want to support AtCoder (1.70.0) and Codeforces (1.72.0) because:

  • AtCoder is the primary objective of this project
  • Codeforces wields the biggest stick in competitive programming

All other platforms are insignificant compared to these two, so we can update to 1.70.0.

@koba-e964
Copy link
Collaborator

Closing because #137 was merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants