oxalica / rust-overlay

Pure and reproducible nix overlay of binary distributed rust toolchains
MIT License
960 stars 57 forks source link

Custom Rust toolchain for Solana #147

Closed nasadorian closed 9 months ago

nasadorian commented 12 months ago

Hi, I've been using this overlay for Rust and it's amazing, so thank you!

Recently I've been trying to work on Nix-ifying the Solana toolchain and running into issues (e.g. rustc not seeing the stdlib files on invocation).

For context, Solana maintains forks of rustc, cargo, rustdoc, llvm and the stdlib for a specific compile target (SBF aka Solana's version of BPF). However, they do not publish their binaries in the standard Rustup format this repository seems to rely on. They simply ship the binaries as tarballs and have custom tooling which relies on rustup under the hood to link everything together.

I'm wondering if it's possible to override / extend the toolchain provided here to package up Solana's toolchain. What I'm thinking is to append their sbf-solana-solana lib folder to the existing one, then inject the necessary binaries into the derivation. Is this possible out of the box?

oxalica commented 9 months ago

owever, they do not publish their binaries in the standard Rustup format this repository seems to rely on. They simply ship the binaries as tarballs and have custom tooling which relies on rustup under the hood to link everything together.

Sorry but it does not seem possible since we synchronize manifests from rustup server and are tightly coupled with them.