about summary refs log tree commit diff
path: root/tvix/Cargo.lock (follow)
AgeCommit message (Collapse)AuthorFilesLines
2023-12-11 r/7158 chore(tvix): drop sled compression supportFlorian Klink1-1/+0
It's been a while since the last sled release, and that one binds to a pretty old version of zstd, requiring workarounds like cl/10090. Upstream sled main branch currently has zstd halfway patched out (it's a no-op, but the feature flag and options are still there), and it's in that state for a year. Rather than maintaining our own fork of sled, let's just stop using the compression feature in sled, dropping the version pin to zstd that way, removing the need for cl/10090. This doesn't mean we won't reintroduce per-blob compression - but we probably just won't let sled take care of the compression, but do it ourselves - which is necessary for more chunked blob storage anyways. Even though we do drop the feature flag, we still need to explicitly use use_compression(false). Change-Id: I0e4892d29e41c76653272dc1a3625180da6fee12 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10257 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2023-12-11 r/7154 feat(tvix/build): add derivation_to_build_requestFlorian Klink1-0/+3
This function converts from a nix_compat::derivation::Derivation to a BuildRequest. In addition to the Derivation itself, it needs two lookup functions to map input paths to their castore nodes. Change-Id: I0332982f0bc7933a5fda137fe39d5a850639d929 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10236 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-12-11 r/7151 feat(tvix/build): initFlorian Klink1-0/+12
This adds the tvix-build crate, currently only containing a `tvix_build::proto` module, exposing the data structures defined in tvix/build/protos. Change-Id: I75f5d9196969ed0877b1fe640cacfecba0fb2e03 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10235 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2023-12-11 r/7146 chore(tvix): bump criterion to 0.5Florian Klink1-41/+8
Change-Id: I28904ca23437b4bb745c0eb1f4eb9ae33e09eb5a Reviewed-on: https://cl.tvl.fyi/c/depot/+/10244 Reviewed-by: grfn <grfn@gws.fyi> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-12-09 r/7133 chore(tvix/nix_cli): drop crateFlorian Klink1-8/+0
The only thing this was doing was invoking nix-store --add, which is not gonna help us populate the tvix-store at all (and we now have `tvix-store import`). This is also (rightfully) causing clippy warnings, because of some fields being unused. It's more of a skeleton, and rather than shelling out to Nix for some usecases, we might introduce a "compatible" Nix CLI frontend for a subset of commands. Drop this for now, to decrease the noise and confusion. Change-Id: I2fd399e9320260f08893b685561755af9c7c961c Reviewed-on: https://cl.tvl.fyi/c/depot/+/10226 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2023-11-19 r/7042 feat(tvix/nix-compat): add narinfo::Signature::verifyFlorian Klink1-42/+180
This adds support for verifying signatures found in NARInfo files. This still needs to be hooked together with the nix+http[s] backend. Change-Id: Ic1c8ddbdecfb05cefca2492808388b0f7f3f2637 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10081 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2023-11-19 r/7038 feat(tvix/store/pathinfoservice): implement NixHTTPPathInfoServiceFlorian Klink1-0/+173
NixHTTPPathInfoService acts as a bridge in between the Nix HTTP Binary cache protocol provided by Nix binary caches such as cache.nixos.org, and the Tvix Store Model. It implements the [PathInfoService] trait in an interesting way: Every [PathInfoService::get] fetches the .narinfo and referred NAR file, inserting components into a [BlobService] and [DirectoryService], then returning a [PathInfo] struct with the root. Due to this being quite a costly operation, clients are expected to layer this service with store composition, so they're only ingested once. The client is expected to be (indirectly) using the same [BlobService] and [DirectoryService], so able to fetch referred Directories and Blobs. [PathInfoService::put] and [PathInfoService::nar] are not implemented and return an error if called. This behaves very similar to the nar-bridge-pathinfo code in nar-bridge, except it's now in Rust. Change-Id: Ia03d4fed9d0657965d100299af97cd917a03f2f0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10069 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-11-19 r/7032 fix(tvix): patch futures::AsyncBufReadExt::fill_bufedef1-16/+8
This fixes EOF handling for buffered readers. Link: https://github.com/rust-lang/futures-rs/pull/2801 Change-Id: Ie98ca6a3e1de38500b0195e9b62511501acb1d2c Reviewed-on: https://cl.tvl.fyi/c/depot/+/10086 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-11-19 r/7031 chore(tvix): upgrade futures to 0.3.29edef1-18/+18
Change-Id: I8fd63be3cbec8766fd6d72cd9271989a19774816 Reviewed-on: https://cl.tvl.fyi/c/depot/+/10085 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-11-10 r/6986 feat(nix-compat/narinfo): turn flags into bitfieldsedef1-0/+1
Change-Id: I8b95723444013e97bc6ec8d282c7135b1aede114 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9987 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-11-05 r/6959 chore(tvix): bump proptest dependencyVincent Ambo1-34/+27
This *might* contain a fix for a clippy lint thrown by that crate. Relates to b/321. Change-Id: Ia7ebd3e26e0feb8bcc7a6c811b1e583f9016fd9e Reviewed-on: https://cl.tvl.fyi/c/depot/+/9966 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Autosubmit: tazjin <tazjin@tvl.su>
2023-11-04 r/6936 refactor(tvix): move tvix glue code into glue crateFlorian Klink1-0/+17
There's various bits and pieces in tvix-cli that use both the store and evaluator, as well as nix-compat. For example, builtins.derivation, as well as the reference scanning implementation. This "glue code" currently isn't accessible from anywhere else, but it'd be very useful if it were. Move it out into a `glue` crate, and make `tvix-cli` a consumer of it. All the KnownPaths setup and passing around, as well as NIX_PATH handling is also something that should probably be moved into the glue crate as well, but that's something left for a future CL. Change-Id: I080ed3d1825ab23790666486840f301f00856277 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9908 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-10-27 r/6897 feat(tvix/nix-compat): add narinfo parsing and serialisationedef1-23/+4
Change-Id: I72c63414794642ca8d85c3f635f49db888420c40 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9852 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-10-27 r/6883 refactor(tvix): condense long bytestringsedef1-0/+8
Change-Id: I3bea0827ec2c8db835334ce378a7bf3a39e9b1a3 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9849 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2023-10-23 r/6874 test(tvix/cli/derivation): add test cases for output path calcFlorian Klink1-0/+1
Get some test coverage with some calls to builtins.derivation. The expected output paths were calculated with Nix. Change-Id: I2ce205ea5244e8ef939d9cacb033283fc6f15d17 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9817 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-10-16 r/6835 feat(nix-compat): add bench for aterm parsingFlorian Klink1-0/+1
Change-Id: Ie9416f0046b6ee0a02096a7712cdba9cc84db4f6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9733 Reviewed-by: Connor Brewster <cbrewster@hey.com> Reviewed-by: Gabriel Doriath Döhler <gabriel.doriath.dohler@ens.fr> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de>
2023-10-16 r/6831 feat(nix-compat/{aterm,derivation}): init parserFlorian Klink1-0/+18
This provides a nom-based parser for Nix derivations in ATerm format, which can be reached via `Derivation::from_aterm_bytes`. Some of the lower-level ATerm primitives are moved into a (new) aterm module, and some more higher-level ones that construct derivation- specific types. Also, move the escape_bytes function into there, this is a generic ATerm thing. Change-Id: I2b03b8a1461c7ea2fcb8640c2fc3d1fa3ea719fb Reviewed-on: https://cl.tvl.fyi/c/depot/+/9730 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2023-10-15 r/6813 feat(tvix/nix-compat/nixhash/NixHashWithMode): from_algo_mode_hashFlorian Klink1-0/+1
Change-Id: Ieae628fab1926a498ae5c3eb27df1b722e6151d7 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9728 Reviewed-by: edef <edef@edef.eu> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-10-14 r/6810 refactor(tvix/store): Upgrade tokio-listener to get tonic supportConnor Brewster1-2/+3
Tonic support was added to tokio-listener upstream which removes the need for use to have tonic compatibility wrapper types around it. See: https://github.com/vi/tokio-listener/pull/2 Fixes b/311 Change-Id: I04a2dbb3bc3c8bfe9339583c0b46070c7ec97811 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9721 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2023-10-12 r/6789 feat(tvix/store): enable tls[-roots] feature in tonicFlorian Klink1-0/+142
This teaches tonic to speak https, so `grpc+https` becomes a working connection string. Change-Id: I9c550ea665b829725b545a164cf6f78587bd5213 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9714 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Brian McGee <brian@bmcgee.ie> Tested-by: BuildkiteCI
2023-10-10 r/6778 fix(tvix/castore): use bstr for formatting names in errorsedef1-0/+1
Much friendlier than either Base64 or raw byte slices. Change-Id: I9b4cdd57c83ddc76c0be8103da4320207657a72b Reviewed-on: https://cl.tvl.fyi/c/depot/+/9622 Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-10-10 r/6769 feat(tvix/store): use tvix_compat::nar::writer::asyncedef1-0/+13
Change-Id: Iad36872244df6f2225a2884f6b20cacd8f918b31 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9619 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Autosubmit: edef <edef@edef.eu>
2023-10-10 r/6768 feat(tvix/nix-compat): add nar::writer::asyncedef1-0/+2
Change-Id: Ib962f889836659fd278beec461ee329b00e64ea5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9615 Autosubmit: edef <edef@edef.eu> Reviewed-by: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-10-08 r/6743 test(tvix/store): use tokio-retry for exp backoffFlorian Klink1-0/+1
Rather than using this loop, use exponential backoff while waiting for the socket path to be created. Change-Id: I3056b1525784cd712b1d81f84876c9ca0be10dc6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9569 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2023-10-08 r/6742 test(tvix/castore): use tokio-retry for exp backoffFlorian Klink1-0/+12
Rather than using this loop, use exponential backoff while waiting for the socket path to be created. Change-Id: I18706a64ce06f8916a07892dfbcd409ac5b3bff1 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9568 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2023-10-08 r/6739 refactor(tvix/eval/tests): migrate to tempfileFlorian Klink1-70/+8
tempdir pulls in remove_dir_all 0.5.3 with https://rustsec.org/advisories/RUSTSEC-2023-0018.html, and we use tempfile everywhere else too, so let's just migrate to that. Change-Id: I735ade7b65e12fc26e3d43ca95fcfa07fcc64642 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9565 Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-10-08 r/6736 chore(tvix): bump tokio[-util], tonic, prostFlorian Klink1-53/+36
This bumps all these dependencies to their more recent versions. We have to enable the `macros` tonic feature, and looks like we should also enable `rt`, not only `rt-multi-thread`. Change-Id: Icc3600848fca0bacce24f4889d088e75711594ef Reviewed-on: https://cl.tvl.fyi/c/depot/+/8984 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su>
2023-10-08 r/6735 refactor(tvix/castore): move tests to grpc client, rm tonic-mockFlorian Klink1-14/+0
Similar to gen_directorysvc_grpc_client, introduce a gen_blobsvc_grpc_client function that provides a gRPC client connected to a blobservice. The test is update to use that client to test against, rather than the server trait, removing the last usage of tonic_mock, so it's removed as well. Fixes b/243. Change-Id: If746e8600588da247eb53a63b70fe72f139e9e77 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9564 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de>
2023-10-08 r/6723 chore(tvix/store): drop tonic-mock from dependenciesFlorian Klink1-1/+0
It's not used in here. Change-Id: If1dbf360ec37b649c27d3a9bf11f7bf0ca947631 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9558 Reviewed-by: Connor Brewster <cbrewster@hey.com> Autosubmit: flokli <flokli@flokli.de> Reviewed-by: edef <edef@edef.eu> Tested-by: BuildkiteCI
2023-10-02 r/6687 fix(tvix/store): Fix FUSE support on MacOSBrian Olsen1-1/+1
This partially fixes b/312 and gets FUSE to work again on MacOS. It is mostly small type changes and an update to fuse-backend-rs because upstream currently doesn't work with MacFuse. It also sets the default FUSE thread count on MacOS to 1 because otherwise the mount command will hang when shutting down as only one thread gets ENODEV and all the others just keep blocking. Change-Id: Ifb3c4268caf296c487049c1dc4618acb32497f44 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9490 Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com> Reviewed-by: flokli <flokli@flokli.de>
2023-09-26 r/6654 chore(tvix/store): move fuse-backend-rs back to upstreamFlorian Klink1-1/+1
It's in no release yet, but this is the current rev in master. Change-Id: I9e4bc2fde26e85c4182bd66b3e566c2d957072ed Reviewed-on: https://cl.tvl.fyi/c/depot/+/9469 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI
2023-09-25 r/6653 feat(tvix/store): Support listening on UNIX domain socketsConnor Brewster1-33/+76
This adds support for listening on UNIX domain sockets via the tokio-listener crate. The crate will automatically determine whether to start a TCP or UNIX domain socket server based on the listen address. Unfortunately, it's not compatible with tonic right out of the box so I added some wrapper types to implement the necessary traits to make things work. We should investigate upstreaming a `tonic` option to the tokio-listener crate which implements the relevant `tonic` traits. Example: ``` $ tvix-store daemon -l /run/tvix-store.sock INFO tvix_store: tvix-store listening on /run/tvix-store.sock $ tvix-store mount -l /mnt/tvix --blob-service-addr grpc+unix:///run/tvix-store.sock --directory-service-addr grpc+unix:///run/tvix-store.sock --path-info-service-addr grpc+unix:///run/tvix-store.sock $ ls /mnt/tvix ``` Change-Id: I91c4a4b0c5a177b3b90e6c01a4e5d263130e6bdb Reviewed-on: https://cl.tvl.fyi/c/depot/+/9429 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-09-24 r/6642 feat(tvix/store/fs): Add support for virtiofs backendConnor Brewster1-0/+60
This adds a virtiofs daemon implementation which hooks into the existing tvix-store filesystem implementation that is used for FUSE. This allows adding the filesystem to a microvm without having to set up FUSE inside the guest. Change-Id: If80c36c9657f2289853e8d9a364bf4f1f7b7559c Reviewed-on: https://cl.tvl.fyi/c/depot/+/9344 Autosubmit: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2023-09-22 r/6630 chore(tvix/castore): remove dependency on anyhowFlorian Klink1-1/+0
We don't use this here, except in a test, where we don't really use it either. Change-Id: Ia6c45fccf663fe328942b1e1a2cd1c3a1b7f9ae5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9376 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI
2023-09-22 r/6629 refactor(tvix): move castore into tvix-castore crateFlorian Klink1-0/+33
This splits the pure content-addressed layers from tvix-store into a `castore` crate, and only leaves PathInfo related things, as well as the CLI entrypoint in the tvix-store crate. Notable changes: - `fixtures` and `utils` had to be moved out of the `test` cfg, so they can be imported from tvix-store. - Some ad-hoc fixtures in the test were moved to proper fixtures in the same step. - The protos are now created by a (more static) recipe in the protos/ directory. The (now two) golang targets are commented out, as it's not possible to update them properly in the same CL. This will be done by a followup CL once this is merged (and whitby deployed) Bug: https://b.tvl.fyi/issues/301 Change-Id: I8d675d4bf1fb697eb7d479747c1b1e3635718107 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9370 Reviewed-by: tazjin <tazjin@tvl.su> Reviewed-by: flokli <flokli@flokli.de> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: Connor Brewster <cbrewster@hey.com>
2023-09-22 r/6627 chore(tvix): remove some unused crate dependenciesFlorian Klink1-136/+10
Change-Id: I31b0e7be3a2ebc268c6f4045ba282e8fb1c72a64 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9375 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: Connor Brewster <cbrewster@hey.com>
2023-09-21 r/6623 refactor(tvix/store): Asyncify PathInfoService and DirectoryServiceConnor Brewster1-0/+1
We've decided to asyncify all of the services to reduce some of the pains going back and for between sync<->async. The end goal will be for all the tvix-store internals to be async and then expose a sync interface for things like tvix eval io. Change-Id: I97c71f8db1d05a38bd8f625df5087d565705d52d Reviewed-on: https://cl.tvl.fyi/c/depot/+/9369 Autosubmit: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2023-09-20 r/6621 refactor(tvix/store/fuse): Switch from fuser to fuse-backend-rsConnor Brewster1-61/+110
This switches the FUSE implementation from fuser to fuse-backend-rs. fuse-backend-rs is designed to work with both FUSE and virtiofs. Virtiofs support will make it possible to plug the tvix-store into a microvm and have `/nix/store` access without having to setup FUSE inside the guest. Additionally fuse-backend-rs has nice support for running multiple FUSE threads and has some async support. The goal of this commit is to mechanically switch over to fuse-backend-rs with minimal changes. I did have to add some locks here and there because fuse-backend-rs uses `&self` on all methods whereas fuser uses `&mut self`. `&self` is required for concurrent access to the FUSE server, so this makes sense. We can consider switching to concurrent maps and use some other techniques to reduce lock contention and critical section size. Issue: https://b.tvl.fyi/issues/305 Change-Id: Icde5a58c6eef98f8984c1e04e980b756dfb76b47 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9341 Tested-by: BuildkiteCI Reviewed-by: flokli <flokli@flokli.de>
2023-09-18 r/6606 refactor(tvix/store/blobsvc): make BlobStore asyncFlorian Klink1-9/+81
We previously kept the trait of a BlobService sync. This however had some annoying consequences: - It became more and more complicated to track when we're in a context with an async runtime in the context or not, producing bugs like https://b.tvl.fyi/issues/304 - The sync trait shielded away async clients from async worloads, requiring manual block_on code inside the gRPC client code, and spawn_blocking calls in consumers of the trait, even if they were async (like the gRPC server) - We had to write our own custom glue code (SyncReadIntoAsyncRead) to convert a sync io::Read into a tokio::io::AsyncRead, which already existed in tokio internally, but upstream ia hesitant to expose. This now makes the BlobService trait async (via the async_trait macro, like we already do in various gRPC parts), and replaces the sync readers and writers with their async counterparts. Tests interacting with a BlobService now need to have an async runtime available, the easiest way for this is to mark the test functions with the tokio::test macro, allowing us to directly .await in the test function. In places where we don't have an async runtime available from context (like tvix-cli), we can pass one down explicitly. Now that we don't provide a sync interface anymore, the (sync) FUSE library now holds a pointer to a tokio runtime handle, and needs to at least have 2 threads available when talking to a blob service (which is why some of the tests now use the multi_thread flavor). The FUSE tests got a bit more verbose, as we couldn't use the setup_and_mount function accepting a callback anymore. We can hopefully move some of the test fixture setup to rstest in the future to make this less repetitive. Co-Authored-By: Connor Brewster <cbrewster@hey.com> Change-Id: Ia0501b606e32c852d0108de9c9016b21c94a3c05 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9329 Reviewed-by: Connor Brewster <cbrewster@hey.com> Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-09-05 r/6557 feat(tvix/store): fix ctrl-c handling on mount commandFlorian Klink1-0/+10
This enables the tokio `signal` feature, and registers a ctrl_c signal handler, which will use the unmount handle to unmount in case a ctrl-c signal is received. This avoids having disconnected mountpoints when Ctrl-C'ing a `tvix-store mount` invocation. In case the filesystem is unmounted externally (via `umount /path/to/ mountpoint`), the future is waiting for the signal is never resolved and the task is stopped. Change-Id: I149f705a6cb50188177f2a6c6a5fcd77218e2a3f Reviewed-on: https://cl.tvl.fyi/c/depot/+/9218 Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI
2023-09-05 r/6553 chore(tvix/store): drop walkdir workaround for symlinks at rootFlorian Klink1-2/+2
https://github.com/BurntSushi/walkdir/pull/170 got merged, meaning we don't need to keep our own logic in here anymore. Our test cases already cover this. Change-Id: Ied3043ee651c8aafa10271c1e1ca5d460fb6c0b8 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9269 Autosubmit: flokli <flokli@flokli.de> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su>
2023-09-04 r/6550 refactor(tvix/{cli,store}): move TvixStoreIO to tvix-cli crateFlorian Klink1-1/+1
This trait is eval-specific, there's no point in dealing with these things in tvix-store. This implements the EvalIO interface for a Tvix store. The proper place for this glue code (for now) is tvix-cli, which knows about both tvix-store and tvix-eval. There's one annoyance with this move: The `tvix-store import` subcommand previously also used the TvixStoreIO implementation (because it conveniently did what we wanted). Some of this code had to be duplicated, mostly logic to calculate the NAR-based output path and create the PathInfo object. Some, but potentially more of this can be extracted into helper functions in a shared crate, and then be used from both TvixStoreIO in tvix-cli as well as the tvix-store CLI entrypoint. Change-Id: Ia7515e83c1b54f95baf810fbd8414c5521382d40 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9212 Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de>
2023-07-31 r/6453 refactor(tvix/cli/refscan): use wu-manber crate with &[u8] supportFlorian Klink1-1/+1
PR'ed at https://github.com/tvlfyi/wu-manber/pull/1, and now merged. Change-Id: I8c71e359196396a1d42a3ea2ab7ac15b137b2db0 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8992 Tested-by: BuildkiteCI Autosubmit: flokli <flokli@flokli.de> Reviewed-by: raitobezarius <tvl@lahfa.xyz>
2023-07-31 r/6449 refactor(tvix/nix-compat): support non-unicode DerivationsFlorian Klink1-0/+18
Derivations can have non-unicode strings in their env values, so the ATerm representations are not necessarily String anymore, but Vec<u8>. Change-Id: Ic23839471eb7f68d9c3c30667c878830946b6607 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8990 Tested-by: BuildkiteCI Reviewed-by: raitobezarius <tvl@lahfa.xyz> Autosubmit: flokli <flokli@flokli.de>
2023-07-22 r/6439 feat(tvix/store/proto): use Bytes instead of Vec<u8>Florian Klink1-0/+2
Makes use of https://github.com/tokio-rs/prost/pull/341, which makes our bytes field cheaper to clone. It's a bit annoying to configure due to https://github.com/hyperium/tonic/issues/908, but the workaround does get the job done. Change-Id: I25714600b041bb5432d3adf5859b151e72b12778 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8975 Reviewed-by: raitobezarius <tvl@lahfa.xyz> Tested-by: BuildkiteCI Reviewed-by: tazjin <tazjin@tvl.su> Autosubmit: flokli <flokli@flokli.de>
2023-06-22 r/6345 fix(tvix/serde): remove unnecessary dependency on genawaiterEvgeny Zemtsov1-1/+0
Change-Id: I52f13c6b508793603bc726353e9bf7d5f12fddf4 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8850 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-06-22 r/6344 feat(tvix/eval): allow extending builtins outside of tvix_evalEvgeny Zemtsov1-0/+1
The change allows applications that use tvix_serde for parsing nix-based configuration to extend the language with domain-specific set of features. Change-Id: Ia86612308a167c456ecf03e93fe0fbae55b876a6 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8848 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-06-14 r/6302 feat(tvix/store/blobsvc): add from_addrFlorian Klink1-2/+63
This allows constructing blob stores with a URL syntax at runtime, by passing the --blob-service-addr arg. We probably still want to have some builder pattern here, to allow additional schemes to be registered. Change-Id: Ie588ff7a7c6fb64c9474dfbd2e4bc5f168dfd778 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8742 Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-06-10 r/6261 chore(tvix/store): add fuse featureFlorian Klink1-2/+67
This brings in fuse (via the `fuser` crate), and adds pkg-config and libfuse to the dev shell, so `cargo build` can link against it. Change-Id: I0d11607490e27d946bdf92b0b9e45f9ab644ba74 Reviewed-on: https://cl.tvl.fyi/c/depot/+/8664 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
2023-05-24 r/6193 feat(tvix/cli): use TvixStoreIO instead of NixCompatIOFlorian Klink1-0/+1
This switches tvix-cli over from using `NixCompatIO` to `TvixStoreIO`. For now, we simply instantiate in-memory services instead of getting fancy with constructors inside tvix-store, but long-term, we might want to support some URI syntax, to make this configurable at runtime. nixpkgs eval tests might be fine (and fast!) with a purely in-memory backend, but other usages might involve talking to a local tvix-store over gRPC (using the gRPC client, either unix domain socket or even further away remote), or running tvix-store in "embedded" mode (using another client than the gRPC client). Change-Id: I509afd3dc5ce3f2d52b0fb7067748fab820e26ab Reviewed-on: https://cl.tvl.fyi/c/depot/+/8572 Autosubmit: flokli <flokli@flokli.de> Reviewed-by: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI