!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

709 Members
Rust162 Servers

Load older messages


SenderMessageTime
30 Aug 2022
@aruzeta:matrix.orgaru left the room.14:56:50
1 Sep 2022
@typetetris:matrix.orgtypetetris joined the room.08:15:39
@typetetris:matrix.orgtypetetrisI have a project with several libs and apps in a single workspace. But I would like to package the apps separately. How do I prevent rebuilds in unrelated apps, if only the source of another app is touched? Is splitting the repository/workspace the only pragmatic option? The build system (naersk, cargo2nix, etc ...) would need to be aware of this and only include needed sources, but I am not aware of one doing that.08:19:04
@dpc:matrix.orgdpc typetetris: You could possibly build the whole workspace, and then use another derivation to copy some binaries from that workspace build. 18:34:35
@dpc:matrix.orgdpc typetetris: Alternatively, crane can run cargo build --bin <cargo-bin> and create a binary out of it, which I use to build single-binary containers, like this: https://github.com/fedimint/fedimint/blob/6624d833de202417da1255759076f4c3f09ac3cf/flake.nix#L179 18:35:41
@dpc:matrix.orgdpcI imagine cargo2nix and naersk might have similar functionality.18:36:11
2 Sep 2022
@typetetris:matrix.orgtypetetrisHmm, would have to try this. But I would expect it to rebuild the single-binary build everytime unrelated sources in the same workspace change. Those build system don't usually filter sources on components to be build.05:32:41
@typetetris:matrix.orgtypetetrisOf course, that is a very specific requirement.05:32:56
@typetetris:matrix.orgtypetetrisSo it is ok, they don't do this.05:33:08
@kity:kity.wtfproblems changed their display name from ash (it/its) 🏳️‍⚧️ to problems.14:09:44
4 Sep 2022
@dusk:gaze.systemsdusk joined the room.16:01:21
5 Sep 2022
@enemycube:matrix.orgenemycube joined the room.14:33:01
@newam:matrix.orgnewamI'm trying to build embedded rust firmware with nix, but not having much success with the recommendations in the rust-section of the nix manual, if anyone here has experience with this I could use some help 😃 https://discourse.nixos.org/t/building-embedded-rust-firmware-with-nix/21477 16:18:39
@withoutwithin:matrix.orgXe Iasohow do i make a rust compiler with the wasm32-wasi target enabled?16:56:27
@a-kenji:matrix.orga-kenjiI used the oxalica overlay here: https://github.com/zellij-org/zellij/blob/main/.nix/plugins.nix16:57:49
@a-kenji:matrix.orga-kenjiThis is where the toolchain is specified: https://github.com/zellij-org/zellij/blob/main/rust-toolchain.toml, but i am not quite sure how to do it without an overlay.16:59:00
@withoutwithin:matrix.orgXe Iaso:+1: thanks17:04:55
6 Sep 2022
@dusk:gaze.systemsdusk changed their profile picture.23:50:07
7 Sep 2022
@dpc:matrix.orgdpc

Can I somehow do nix shell nixpkgs#rust-analyzer nixpkgs#openssl nixpkgs#pkg-config github:nix-community/fenix#complete without running nix flake init first?

Basically when I have to temporarily work on Rust project that isn't flakified, I just want to get the dev env working without having some extra files checked in.

18:25:00
@slby:matrix.orgslbyYes18:25:59
@slby:matrix.orgslbyWith this syntax you don't need a flake.18:26:25
@dpc:matrix.orgdpc Oh, I see. I got myself confused then by using .# initially . Thanks. 18:30:19
@slby:matrix.orgslby

And you probably want someting like

 nix shell github:nix-community/fenix#complete.toolchain

for enix.

18:31:21
@slby:matrix.orgslby *

And you probably want someting like

 nix shell github:nix-community/fenix#complete.toolchain

for fenix.

18:31:24
@dpc:matrix.orgdpc One last thing nix shell nixpkgs#rust-analyzer nixpkgs#openssl.dev nixpkgs#openssl nixpkgs#pkg-config github:nix-community/fenix#complete.toolchain does not add openssl to PKG_CONFIG_PATH 18:33:26
@dpc:matrix.orgdpcWhat can I do about it, other than add it manually?18:33:55
@pennae:matrix.eno.spacepennae use a devShell with all your dependencies in it rather than nix shell 18:36:46
@slby:matrix.orgslbyI am not too sure about that, does it work with nix develop? It doesn't know what kind of input openssl is. so it doesn't prepare it.18:37:02
8 Sep 2022
@figsoda:matrix.orgfigsoda I think you would need to set LD_LIBRARY_PATH to make it work with nix develop 00:54:00
@figsoda:matrix.orgfigsoda nix-shell should work though 00:54:22

Show newer messages


Back to Room ListRoom Version: 6