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

Change Rust compilation flags #281

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Matistjati
Copy link

This PR has two main aims:

  • Make the rust compilation flags more consistent with what Kattis is using by increasing optimization level to 3, allowing target-cpu=native and bumping version to 2021.
  • Make it possible to compile multiple files. I'm very new to Rust, so take everything i say with a large grain of salt. As far as i understand, the intended use of rustc seems to be that you only give it the main file, which then imports modules. Thus, because the behavior when handling submissions with multiple files currently is to feed all of them into rustc, it simply gives an error. Changing it to {mainfile} instead of {files} allows you to submit multiple files if you place the main function in the file called main.rs. It also doesn't break existing submissions with a single file, no matter their name. Note that these are the only ones that can currently compile, so I don't think there are any drawbacks to this change.

Motivation: I want to create a problem with a "judge runner" by using the include folder, like https://open.kattis.com/problems/vectorfunctions.

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

Successfully merging this pull request may close these issues.

1 participant