!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

465 Members
Rust111 Servers

Load older messages


SenderMessageTime
22 Aug 2024
@jackleightcap:matrix.orgJack Leightcap hey all -- i'm packaging a rust project, and noticed that nixpkgs doesn't include oxalica/rust-overlay: i'm curious then if there's a way to add targets to rustc inside nixpkgs, something like in a rust-toolchain.toml targets = [ "thumbv7em-none-eabihf" ] 03:01:12
@jackleightcap:matrix.orgJack Leightcap the context is an embedded firmware, so the target platform is fixed to arm-embedded. would pkgsCross.arm-embedded accomplish this? 03:05:10
@9hp71n:matrix.orgghpzinPretty sure this exact target is covered by something related to cross in rust section in nixpkgs.04:26:18
@9hp71n:matrix.orgghpzin * Jack Leightcap:
Pretty sure this exact target is covered by something related to cross in rust section in nixpkgs.
https://github.com/NixOS/nixpkgs/blob/c79da508a6bea132f3a0debcec870063f99078f1/doc/languages-frameworks/rust.section.md#cross-compilation-cross-compilation
04:27:01
@jackleightcap:matrix.orgJack Leightcapthanks, RTFM needed and useful here04:38:57
@9hp71n:matrix.orgghpzin Does anybody know if there are workarounds for Cargo.lock having dependencies with same name, but different urls ?
https://github.com/NixOS/nixpkgs/issues/183344
06:21:05
@9hp71n:matrix.orgghpzin * Does anybody know if there are workarounds for Cargo.lock having dependencies with same name, but different urls ?
https://github.com/NixOS/nixpkgs/issues/183344
(other than editing Cargo.lock to use same one and hoping for the best)
06:24:01
@9hp71n:matrix.orgghpzin * Does anybody know if there are workarounds for Cargo.lock having dependencies with same name, but different urls ?
https://github.com/NixOS/nixpkgs/issues/30742
(other than editing Cargo.lock to use same one and hoping for the best)
06:33:14
@asmundesen:matrix.orgArtur Manuel joined the room.12:57:53
@asmundesen:matrix.orgArtur Manuel changed their profile picture.14:53:09
@niko:puppygock.gaynyanbinary 🏳️‍⚧️ left the room.17:19:45
@creepinson:matrix.orgTheo Paris
In reply to @9hp71n:matrix.org
Jack Leightcap:
Pretty sure this exact target is covered by something related to cross in rust section in nixpkgs.
https://github.com/NixOS/nixpkgs/blob/c79da508a6bea132f3a0debcec870063f99078f1/doc/languages-frameworks/rust.section.md#cross-compilation-cross-compilation
Is there a way to compile the rust std as a derivation in that case? It says the std isn't compiled when using the cross target...
21:23:17
@creepinson:matrix.orgTheo Paris* Is there a way to compile the rust std as a derivation in that case? It says the std isn't compiled when using the cross target... Not sure whether or not the core/alloc crate applies here21:23:46
23 Aug 2024
@creepinson:matrix.orgTheo ParisSo building a rust crate for mingw with llvm ends up trying to cross compile rustc and cargo for mingw instead of just the rust crate... What would be the correct fix for this? Additionally, building x86_64-w64-mingw32-rustc fails due to dlltool04:09:22
@creepinson:matrix.orgTheo Paris * So building a rust crate for mingw with llvm ends up trying to cross compile rustc and cargo for mingw instead of just the rust crate... What would be the correct fix for this? Additionally, building x86_64-w64-mingw32-rustc fails due to dlltool with pkgsLLVM 04:09:28
@k900:0upti.meK900How are you doing that? Also, why LLVM? 04:10:19
@creepinson:matrix.orgTheo Paris
(import nixpkgs {
          system = "x86_64-linux";
          crossSystem = {
            system = "x86_64-windows";
            rust = {
              rustcTarget = "x86_64-pc-windows-gnu";
            };
          };
        }).pkgsLLVM.pkgsCross.mingwW64
04:10:58
@creepinson:matrix.orgTheo ParisIf I set useLLVM and linker to lld in crossSystem instead of outside crossSystem, it fails to build compiler-rt-libc. 04:11:32
@creepinson:matrix.orgTheo Paris * If I set useLLVM and linker to lld in crossSystem instead of outside crossSystem, it fails to build compiler-rt-libc, probably because it tries to use lld flags with lld-link04:12:12
@k900:0upti.meK900Yeah this is very wrong for a variety of reasons 04:14:21
@k900:0upti.meK900What are you trying to achieve here 04:14:28
@k900:0upti.meK900Do you want MinGW or MSVC04:14:37
@creepinson:matrix.orgTheo ParisI am trying to cross compile a rust crate with mingw and LLVM.04:14:55
@k900:0upti.meK900This makes no sense because MinGW is GNU04:15:30
@k900:0upti.meK900So do you want MinGW or LLVM 04:15:37
@creepinson:matrix.orgTheo ParisI wanted mingw because its posix04:15:46
@k900:0upti.meK900Then why is LLVM even there 04:16:00
@creepinson:matrix.orgTheo ParisBecause I want to use llvm tools and clang instead of gcc04:16:19
@k900:0upti.meK900Why? 04:16:45
@creepinson:matrix.orgTheo ParisIf there is a way to uses clang/lld-link to cross compile without mingw then I have no idea what that way would be.04:16:55

Show newer messages


Back to Room ListRoom Version: 6