From 2414c872821ab7ad8c9ff8dca5a91433ffb307f3 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Fri, 27 Sep 2024 14:13:21 +0200 Subject: feat(tvix/build), add OciBuildService, the old way This is just patchset 10 of CL10855, before the color_eyre changes, rebased to the tvix_castore api. Change-Id: If4b42412ff8568058908cda971ad7d6f2d9f9b7b --- This provides a build service invoking runc. It can be used by using the `oci://$path_to_some_tempdir` builder URL for now. For now, it can be tested as such: ``` BUILD_SERVICE_ADDR=oci://$PWD/bundles target/debug/tvix let pkgs = (import {}); in builtins.readDir pkgs.perl ``` readDir is to actually trigger IO into the store path (which triggers the builds). For now it fails due to missing reference scanning (see followup CLs). Change-Id: I09b40e410114ce69966a41a0e3c33281b859e443 Reviewed-on: https://cl.tvl.fyi/c/depot/+/12526 Autosubmit: yuka Tested-by: BuildkiteCI Reviewed-by: flokli --- tvix/build/Cargo.toml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'tvix/build/Cargo.toml') diff --git a/tvix/build/Cargo.toml b/tvix/build/Cargo.toml index b9073b7ff61a..842c4e7afad8 100644 --- a/tvix/build/Cargo.toml +++ b/tvix/build/Cargo.toml @@ -9,16 +9,26 @@ clap = { workspace = true, features = ["derive", "env"] } itertools = { workspace = true } prost = { workspace = true } thiserror = { workspace = true } -tokio = { workspace = true } +tokio = { workspace = true, features = ["process"] } tokio-listener = { workspace = true, features = ["tonic012"] } tonic = { workspace = true, features = ["tls", "tls-roots"] } -tvix-castore = { path = "../castore" } -tvix-tracing = { path = "../tracing" } +# TODO: put the fuse dep behind a feature flag? +tvix-castore = { path = "../castore", features = ["fuse"]} tracing = { workspace = true } url = { workspace = true } mimalloc = { workspace = true } tonic-reflection = { workspace = true, optional = true } +anyhow = "1.0.79" +blake3 = "1.5.0" +bstr = "1.6.0" +data-encoding = "2.5.0" +futures = "0.3.30" +oci-spec = "0.6.4" +serde_json = "1.0.111" +tvix-tracing = { path = "../tracing" } +uuid = { version = "1.7.0", features = ["v4"] } + [build-dependencies] prost-build = { workspace = true } tonic-build = { workspace = true } @@ -29,6 +39,8 @@ tonic-reflection = ["dep:tonic-reflection", "tvix-castore/tonic-reflection"] [dev-dependencies] rstest = { workspace = true } +lazy_static = "1.4.0" +tempfile = "3.3.0" [lints] workspace = true -- cgit 1.4.1