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

Add rust-toolchain.toml to raytracing example #3607

Merged
merged 5 commits into from
Oct 18, 2023

Conversation

jthemphill
Copy link
Contributor

The raytracing example requires a nightly build of Rust, and the source code to the Rust std library.

Running build.sh while your stable toolchain is active will result in an error:

error: the `-Z` flag is only accepted on the nightly channel of Cargo, but this is the `stable` channel

I tried changing build.sh to run cargo +nightly, but this broke CI.

My inclination here is to describe these dependencies with a toolchain file. It's one less build flag to forget.

@jthemphill jthemphill changed the title Add rust-toolchain.toml to raytracing example Add rust-toolchain.toml to raytracing example Sep 12, 2023
Copy link
Collaborator

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you, this is great!

examples/raytrace-parallel/rust-toolchain.toml Outdated Show resolved Hide resolved
Copy link
Collaborator

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CI is failing because of the toolchain file.
I just took a quick look at the documentation to see if there is some flag to ignore it but couldn't really find anything. Would you mind exploring what to do here?

A quick solution that comes to mind here is to just use +stable to override the toolchain file.

@jthemphill
Copy link
Contributor Author

Okay, I do think the clippy CI run needs to either install a nightly version of clippy, or it needs to change the command from cargo clippy to cargo +stable clippy to specify that we use stable clippy even when arust-toolchain.toml file calls for nightly.

@daxpedda
Copy link
Collaborator

cargo +stable clippy

I'm in favor of that.

@daxpedda daxpedda added the waiting for author Waiting for author to respond label Oct 12, 2023
@jthemphill jthemphill force-pushed the raytracing-toolchain branch from 197555d to 5adf341 Compare October 18, 2023 07:13
@jthemphill jthemphill requested a review from daxpedda October 18, 2023 07:27
@daxpedda daxpedda removed the waiting for author Waiting for author to respond label Oct 18, 2023
Copy link
Collaborator

@daxpedda daxpedda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks.

@daxpedda daxpedda merged commit 2e9ff5d into rustwasm:main Oct 18, 2023
25 checks passed
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.

2 participants