Skip to content

Feature: Rust Nightly #9

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

Merged
merged 1 commit into from
Mar 31, 2025
Merged

Feature: Rust Nightly #9

merged 1 commit into from
Mar 31, 2025

Conversation

monofox
Copy link
Contributor

@monofox monofox commented Mar 30, 2025

Currently, the whole system must be switched to Rust nightly in order to just jump in and compile with cargo build.

This commit introduces the rust-toolchain.toml, which declares, that the project must be compiled with the nightly compiler.

In this case, it is automatically downloading the right toolchain. See:

$ ~/d/e/t/web-github (feature/nightly)> env TASKDATA=~/.task cargo run
info: syncing channel updates for 'nightly-x86_64-unknown-linux-gnu'
info: latest update on 2025-03-30, rust version 1.88.0-nightly (1799887bb 2025-03-29)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
info: downloading component 'rust-std'
info: downloading component 'rustc'
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
info: installing component 'rust-std'
info: installing component 'rustc'
info: installing component 'rustfmt'
   Compiling taskwarrior-web v2.0.0 (~/d/e/t/web-github)
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 3.93s
     Running `target/debug/taskwarrior-web`
(...)

If you uninstall in the workspace you even get a warning note:

~/d/e/t/web-github (feature/nightly) [101]> rustup toolchain uninstall nightly
warn: removing the active toolchain; a toolchain override will be required for running Rust tools
info: uninstalling toolchain 'nightly-x86_64-unknown-linux-gnu'
info: toolchain 'nightly-x86_64-unknown-linux-gnu' uninstalled

Currently, the whole system must be switched to Rust nightly in order to
just jumpin and compile with `cargo build`.

This commit introduces the `rust-toolchain.toml`, which declares,
that the project must be compiled with the `nightly` compiler.
@tmahmood tmahmood merged commit cd8950d into tmahmood:main Mar 31, 2025
1 of 2 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