-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Custom toolchain support #58
Comments
I'd like to chip in and broaden the scope of this issue: Another interesting thing to have would be the esp32 rust toolchain |
I'm trying to find a way to develop for the esp32 using rust on nix, what would it take to get it added to fenix |
After quite some struggle, I managed to import the esp-rs/rust-build toolchain and make it work - albeit not through The magic sauce to install the custom toolchain is in
I've tried my best to make it work - by copying it into my project - but I just couldn't as I couldn't wrap my head around the 3-4 levels of nested function evaluation ( All I needed really was the So I just ended up copying the
There might be a way to do the same with the current public API, @figsoda can probably clarify that. I assume it would be similar for other custom toolchains that come prebuilt. Important If you're also targeting You'll need nixpkgs-esp-dev too, which brings in a bunch of related tooling. One of which is
What's more, nixpkgs-esp-dev exports This will make esp-idf-sys angry, since that crate wants the Therefore you need to unset the exported Among other things, Hope this was helpful, cheers! |
Through a weekend project I ended up trying to package Solana with Nix. The part that I'm struggling with is
cargo-build-bpf
. Essentially this downloads so-called BPF tools and then it usesrustup toolchain link
to create a custom toolchain which is later used withcargo build +bpf
. Now how do I make this work with Nix?I first tried a
devShell
that uses Fenix withrustup
in it. Curiously, ifrustup
is in the shell,cargo
fails witherror: no override and no default toolchain set
. If I remove it,cargo
(from Fenix) works again, but the command fails because it can't link the toolchain without rustup.My other idea would be to patch out the
rustup
call and just do the toolchain linking myself. At the end of the day these just appear to be symlinks, more or less. But that's reimplementing a part ofrustup
which also doesn't sound great.Any thoughts on supporting custom toolchains with Fenix, considering Fenix aims to replace
rustup
?The text was updated successfully, but these errors were encountered: