!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

708 Members
Rust163 Servers

Load older messages


SenderMessageTime
4 May 2022
@wybpip:matrix.orgAn exploring bot joined the room.15:02:10
@wybpip:matrix.orgAn exploring bot left the room.15:02:11
5 May 2022
@bernardo:matrix.parity.iobernardo changed their display name from bernardo ooo (sick) to bernardo.12:38:54
6 May 2022
@js:ukvly.orgJulian Stecklinahey! does anyone have a quick example of using fenix with musl target?13:17:42
@js:ukvly.orgJulian StecklinaI'm trying to build a small rust cmdline app as static binary13:17:51
7 May 2022
@a-kenji:matrix.orga-kenji
In reply to @js:ukvly.org
hey! does anyone have a quick example of using fenix with musl target?
Sorry, only with the oxalica overlay.
11:33:39
@js:ukvly.orgJulian Stecklina
In reply to @a-kenji:matrix.org
Sorry, only with the oxalica overlay.
There was a cross compiling example that worked with minor changes. So I'm good :)
11:34:56
@a-kenji:matrix.orga-kenji
In reply to @js:ukvly.org
There was a cross compiling example that worked with minor changes. So I'm good :)
Ah, awesome! Was just about to post my link. Glad it worked.
11:35:25
@a-kenji:matrix.orga-kenjiI found the musl shell is something I don't want gced often, because it takes ages to build.11:36:15
@js:ukvly.orgJulian StecklinaI should contribute a working example to the readme. I'm probably not the only one trying to do this11:36:22
@a-kenji:matrix.orga-kenjiYes, that is a good idea.11:36:54
@johnbenber:matrix.orgjohnbenber joined the room.23:38:22
9 May 2022
@srid:matrix.orgSridhar Ratnakumar joined the room.00:22:27
@srid:matrix.orgSridhar Ratnakumar
In reply to @mixedCase:matrix.org
Hey everyone. I'm trying to start a Rust project and would like to have Nix working from the start. Is there any boilerplate for this that's more up to date than https://github.com/srid/rust-nix-template?
Hi! I just updated this to use dream2nix. Changes here
00:24:36
@mixedCase:matrix.orgAndrés Rodríguez
In reply to @srid:matrix.org
Hi! I just updated this to use dream2nix. Changes here
Thanks for the release! Good to know
00:25:27
@dpc:matrix.orgdpc joined the room.00:31:20
@kayla.fire:matrix.orgkayla (she/they) joined the room.10:57:28
@niklaskorz:matrix.orgniklaskorz joined the room.12:18:00
@tyberius_prime:matrix.orgTyberiusPrime (fiber at home when) joined the room.14:50:40
@stopbystudent:matrix.orgstopbystudent joined the room.15:18:30
10 May 2022
@dpc:matrix.orgdpc

Help. I'm trying to port my fenix toolschain setup to crane and:

      fenix-pkgs = fenix.packages.${system};
      fenix-channel = fenix-pkgs.stable;

      craneLib = (crane.mkLib pkgs).overrideScope' (final: prev: {
        # inherit (fenix-channel) cargo rustc;
      });

I can't uncomment that line because it breaks everything. AFAICT, that's what I was more or less doing in naersk

05:05:55
@dpc:matrix.orgdpc

Hmm...

Found something that works.

      fenix-pkgs = fenix.packages.${system};
      fenix-channel = (fenix-pkgs.stable);

      craneLib = (crane.mkLib pkgs).overrideScope' (final: prev: {
        cargo = fenix-channel.cargo;
        rustc = fenix-channel.rustc;
      });

Is this the right way then?

05:19:13
@dpc:matrix.orgdpc
In reply to @js:ukvly.org

or for me on nixos 21.11:

error: /nix/store/qjgj2642srlbr59wwdihnn66sw97ming-glibc-2.33-123/lib/libpthread.so.0: undefined symbol: __libc_siglongjmp, version GLIBC_PRIVATE
   --> /home/julian/.cargo/registry/src/github.com-1ecc6299db9ec823/proc-macro-error-1.0.4/src/lib.rs:284:9
    |
284 | pub use proc_macro_error_attr::proc_macro_error;
    |         ^^^^^^^^^^^^^^^^^^^^^
I am hitting this problem all the time myself. The reason is that normal cargo/rustup are impure. The only reliable solution I've found is to use nix flakes + lorri for everything on NixOs.
05:29:41
@a-kenji:matrix.orga-kenji
In reply to @dpc:matrix.org
I am hitting this problem all the time myself. The reason is that normal cargo/rustup are impure. The only reliable solution I've found is to use nix flakes + lorri for everything on NixOs.
Why is lorri important here?
05:51:11
@dpc:matrix.orgdpc a-kenji: It's just making the an experience so smooth that it's close to just using system-wide rustup/cargo 06:12:57
@dpc:matrix.orgdpc You cd into your project and everything gets set up as it should be, and you can open your editor, run cargo build etc. and things just work 06:13:37
@a-kenji:matrix.orga-kenji Ah, yeah. I think I didn't understand you correctly there. I thought you meant that lorri is important for cargo/rustup. 06:17:20
@a-kenji:matrix.orga-kenjiLorri is a pretty nice project, I agree!06:17:49
@slby:matrix.orgslby

Does anyone have examples how to deal with a build.rs script like this?:
https://github.com/raduzaharia-medium/gtk-rss-reader-resource/blob/main/build.rs

fn main() {
    compile_resources(
        "content",
        "content/app.gresource.xml",
        "gtk-rss-reader.gresource",
    );
}
12:34:02
11 May 2022
@dpc:matrix.orgdpc In a nixifified project using flakes, do you check-in the .envrc file into git, or is every contributor expected to create it if they use something like lorri? 15:47:56

Show newer messages


Back to Room ListRoom Version: 6