!FBuJyWXTGcGtHTPphC:nixos.org

Nix Rust

667 Members
Rust149 Servers

Load older messages


SenderMessageTime
22 Mar 2025
@k900:0upti.meK900You'd have to write your own store subclass and that's C++15:35:04
@k900:0upti.meK900Even Lix doesn't have enough Rust infrastructure to do that in Rust15:35:19
@gumby0811:matrix.orggumby0811sounds like a learning opportunity 15:35:27
@k900:0upti.meK900But also I'd argue there's a pretty big impedance mismatch between OCI semantics and Nix stores15:35:59
@gumby0811:matrix.orggumby0811my short term goal would simply be hey can I take a registry layer and store it in Nix and it be equivalent to something built purely with Nix. 15:36:09
@k900:0upti.meK900Nix doesn't really need anything the OCI spec provides15:36:12
@k900:0upti.meK900Except copying blobs around15:36:21
@gumby0811:matrix.orggumby0811yea I would be treating the OCI registry as a blob store.. 15:36:34
@k900:0upti.meK900And there are significantly easier ways to copy blobs around15:36:48
@gumby0811:matrix.orggumby0811the idea being that I would be able to leverage existing infra for storing Nix stuff because everyone already talks OCI registry.. so I could store it there and then have a thing that pulls it down.. to a local Nix store.. maybe making it easier for air gapped environments or just playing nice with places that don't do Nix15:37:57
@k900:0upti.meK900I feel like S3, which already exists, is kind of that already?15:38:16
@gumby0811:matrix.orggumby0811oh yea I actually didn't know you could store Nix store in S315:38:32
@k900:0upti.meK900You can and it is in fact how cache.nixos.org works15:38:42
@gumby0811:matrix.orggumby0811my inspiration kind of came from nix-snapshotter.. but it depends on Nix to be available on the host... I thought maybe something like this would allow to decouple that requirement. I don't know this all my might be just an academic exploration to teach me Rust.. thank you for the knowledge15:42:19
@griff79:matrix.orggriff gumby0811: it depends where you want to sit in the stack. If you just want to make something that Nix can substitute from and copy NAR files to that is pretty simple. You either implement two types of endpoints on a HTTP server or S3 server. Most binary caches do this. If you want to talk to the Nix daemon directly or want to implement a remote builder of some kind you need the daemon protocol and no complete implementation of that exists in Rust. Harmonia has some client stuff, Snix/Twix has some server stuff, Tweag did a nix-remote crate that also implements some of it and Gorgon can work as a proxy so has some client an server stuff. Lastly I would be remiss to not mention my own implementation of some of the daemon protocol Nix.rs. 16:41:48
@griff79:matrix.orggriffIf you need to make NAR files on the fly or need to read an write them there is a sync impl on crates last I looked and i know that Snix has sync and async impls and Nix.rs has an old async one.16:45:00
@griff79:matrix.orggriff For a HTTP cache that makes NAR files on the fly you would also need to deal with Narinfo files. Snix has a parser for them but it is a pretty simple text format in the style of "key: value\n" 16:48:26
@gumby0811:matrix.orggumby0811thanks!17:19:34
@vaw:nlih.devaw joined the room.21:25:44
23 Mar 2025
@tomasajt:matrix.orgToma
In reply to @tomasajt:matrix.org
Some feedback would be appreciated for https://github.com/NixOS/nixpkgs/pull/390171
ideally, this should go into the current staging cycle

Looking for some feedback on this.

It un-breaks a few packages, including rustdesk*

10:37:54
@k900:0upti.meK900LGTM10:40:36
@k900:0upti.meK900But I don't understand it super well10:40:47
24 Mar 2025
@tomasajt:matrix.orgTomaBtw what do you all think about still keeping fetchCargoTarball around? Just in case fetchCargoVendor is incapable of doing something it might be useful. Though we'd probably want to make it clear that there are no hash stability guarantees.11:36:58
@k900:0upti.meK900I'd rather not have two ways of doing the same thing11:39:49
@k900:0upti.meK900If fetchCargoVendor can't do something, it should be fixed11:40:04
@emilazy:matrix.orgemilyI think it would be an attractive nuisance to keep11:42:03
@emilazy:matrix.orgemilyespecially since it'd probably require maintenance for future versions of the format anyway?11:42:53
@tomasajt:matrix.orgTomaI guess people can just copy the implementation out of tree if they really wanted to use it.13:03:22
@aloisw:julia0815.de@aloisw:julia0815.de joined the room.17:31:26
@aloisw:julia0815.de@aloisw:julia0815.de It seems that rustc.doc lost the standard library documentation somewhere in staging-next 2025-03-03. Is that issue known? 17:47:24

Show newer messages


Back to Room ListRoom Version: 6