Skip to content

rust: replace fenix with rust-overlay allow specifying rust version#1500

Merged
domenkozar merged 6 commits into
cachix:mainfrom
eyJhb:rust-versions
Jun 27, 2025
Merged

rust: replace fenix with rust-overlay allow specifying rust version#1500
domenkozar merged 6 commits into
cachix:mainfrom
eyJhb:rust-versions

Conversation

@eyJhb

@eyJhb eyJhb commented Oct 5, 2024

Copy link
Copy Markdown
Contributor

Adds basic support for specifying the version of the rust toolchain you want to use.
This change moves away from using fenix, to instead using rust-overlay.

It seems to work just fine, and is somewhat minimal invasive.
TODO:

  • Not sure what to do about removing the renamed option, and then using it again.. Is there any better ways?
  • Make targets work, nothing compiles atm.

Example:

{
  languages.rust = {
    enable = true;

    # latest stable version
    # channel = "stable";

    # nightly version
    # channel = "nightly";
    # version = "2024-06-20";

    # specific stable version
    # channel = "stable";
    # version = "1.70.0";

  };
}
inputs:
  devenv:
    url: github:eyJhb/devenv/rust-versions

@eyJhb eyJhb marked this pull request as draft October 5, 2024 16:36
@eyJhb eyJhb marked this pull request as ready for review October 5, 2024 16:36
@eyJhb eyJhb force-pushed the rust-versions branch 2 times, most recently from 2d0eb48 to b454a69 Compare October 5, 2024 17:26
@eyJhb eyJhb marked this pull request as draft October 5, 2024 18:04
@eyJhb

eyJhb commented Oct 5, 2024

Copy link
Copy Markdown
Contributor Author

I fixed targets not working, but it's not pretty. I copied combine.nix from fenix, and not sure what the better way is.

@eyJhb eyJhb marked this pull request as ready for review October 5, 2024 19:35
@domenkozar

Copy link
Copy Markdown
Member

We should error out of channel values in version, to properly instruct how to migrate for users that are still using version for channels.

@domenkozar

Copy link
Copy Markdown
Member

FYI, both rust examples fail in CI.

@domenkozar domenkozar marked this pull request as draft October 24, 2024 09:31
@domenkozar

Copy link
Copy Markdown
Member

@eyJhb would be great to get this in!

@eyJhb

eyJhb commented Nov 15, 2024

Copy link
Copy Markdown
Contributor Author

We should error out of channel values in version, to properly instruct how to migrate for users that are still using version for channels.

I am unsure how this should be done, can you give me any pointers? Tests and docs should be fixed now. The failing test on main should also be working now (it seemed to be failing before).

@domenkozar

Copy link
Copy Markdown
Member

Nice! I think it needs pre-commit run -a

@eyJhb

eyJhb commented Nov 16, 2024

Copy link
Copy Markdown
Contributor Author

Nice! I think it needs pre-commit run -a

Should be done now! :)

@eyJhb eyJhb marked this pull request as ready for review November 16, 2024 20:01
@domenkozar

Copy link
Copy Markdown
Member

It seems like rust-cross-wasm failed with clippy hook:

0000.12:     Checking devenv-tasks v0.1.0 (/run/github-runner/cachix-x86_64-linux-1/devenv/devenv/devenv-tasks)
0000.12: error: the `-Z unstable-options` flag must also be passed to enable the flag `check-cfg`
0000.12: 
0000.12: error: could not compile `devenv-tasks` (lib)
0000.12: warning: build failed, waiting for other jobs to finish...
0000.12: 

@domenkozar

Copy link
Copy Markdown
Member

Ah, seems that's an existing bug using git-hooks. I'll test this soon!

@eyJhb

eyJhb commented Nov 30, 2024

Copy link
Copy Markdown
Contributor Author

@domenkozar rebased ! :)

@domenkozar

Copy link
Copy Markdown
Member

Wish to get back to this one soon :)

@domenkozar domenkozar mentioned this pull request Jun 23, 2025
2 tasks
@domenkozar domenkozar merged commit 0350732 into cachix:main Jun 27, 2025
@eyJhb

eyJhb commented Jun 27, 2025

Copy link
Copy Markdown
Contributor Author

❤️ @domenkozar

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