chore(snix): s/tvix/snix/
Change-Id: Iae961416eea0a38bc57df7b736f6dda5903b0828
This commit is contained in:
parent
768f053416
commit
36e4d017f5
1417 changed files with 3741 additions and 3650 deletions
|
|
@ -81,7 +81,7 @@ let
|
||||||
importFile = args: scopedArgs: path: parts: filter:
|
importFile = args: scopedArgs: path: parts: filter:
|
||||||
let
|
let
|
||||||
importedFile =
|
importedFile =
|
||||||
if scopedArgs != { } && builtins ? scopedImport # For tvix
|
if scopedArgs != { } && builtins ? scopedImport # For snix
|
||||||
then builtins.scopedImport scopedArgs path
|
then builtins.scopedImport scopedArgs path
|
||||||
else import path;
|
else import path;
|
||||||
pathType = builtins.typeOf importedFile;
|
pathType = builtins.typeOf importedFile;
|
||||||
|
|
|
||||||
0
tvix/.gitignore → snix/.gitignore
vendored
0
tvix/.gitignore → snix/.gitignore
vendored
634
tvix/Cargo.lock → snix/Cargo.lock
generated
634
tvix/Cargo.lock → snix/Cargo.lock
generated
|
|
@ -2501,6 +2501,9 @@ dependencies = [
|
||||||
"rstest",
|
"rstest",
|
||||||
"serde",
|
"serde",
|
||||||
"sha2",
|
"sha2",
|
||||||
|
"snix-castore",
|
||||||
|
"snix-store",
|
||||||
|
"snix-tracing",
|
||||||
"thiserror 2.0.9",
|
"thiserror 2.0.9",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-listener",
|
"tokio-listener",
|
||||||
|
|
@ -2513,9 +2516,6 @@ dependencies = [
|
||||||
"tracing",
|
"tracing",
|
||||||
"tracing-subscriber",
|
"tracing-subscriber",
|
||||||
"tracing-test",
|
"tracing-test",
|
||||||
"tvix-castore",
|
|
||||||
"tvix-store",
|
|
||||||
"tvix-tracing",
|
|
||||||
"url",
|
"url",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
@ -2649,12 +2649,12 @@ dependencies = [
|
||||||
"futures",
|
"futures",
|
||||||
"mimalloc",
|
"mimalloc",
|
||||||
"nix-compat",
|
"nix-compat",
|
||||||
|
"snix-castore",
|
||||||
|
"snix-store",
|
||||||
|
"snix-tracing",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tokio-listener",
|
"tokio-listener",
|
||||||
"tracing",
|
"tracing",
|
||||||
"tvix-castore",
|
|
||||||
"tvix-store",
|
|
||||||
"tvix-tracing",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|
@ -4134,6 +4134,317 @@ dependencies = [
|
||||||
"syn 1.0.109",
|
"syn 1.0.109",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "snix-build"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"blake3",
|
||||||
|
"bstr",
|
||||||
|
"bytes",
|
||||||
|
"clap",
|
||||||
|
"data-encoding",
|
||||||
|
"futures",
|
||||||
|
"itertools 0.12.1",
|
||||||
|
"mimalloc",
|
||||||
|
"oci-spec",
|
||||||
|
"prost",
|
||||||
|
"prost-build",
|
||||||
|
"rstest",
|
||||||
|
"serde_json",
|
||||||
|
"snix-castore",
|
||||||
|
"snix-tracing",
|
||||||
|
"tempfile",
|
||||||
|
"thiserror 2.0.9",
|
||||||
|
"tokio",
|
||||||
|
"tokio-listener",
|
||||||
|
"tonic",
|
||||||
|
"tonic-build",
|
||||||
|
"tonic-reflection",
|
||||||
|
"tracing",
|
||||||
|
"url",
|
||||||
|
"uuid",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "snix-castore"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"async-compression",
|
||||||
|
"async-process",
|
||||||
|
"async-stream",
|
||||||
|
"async-tempfile",
|
||||||
|
"auto_impl",
|
||||||
|
"bigtable_rs",
|
||||||
|
"blake3",
|
||||||
|
"bstr",
|
||||||
|
"bytes",
|
||||||
|
"clap",
|
||||||
|
"data-encoding",
|
||||||
|
"digest",
|
||||||
|
"erased-serde",
|
||||||
|
"fastcdc",
|
||||||
|
"fuse-backend-rs",
|
||||||
|
"futures",
|
||||||
|
"hex-literal",
|
||||||
|
"hyper-util",
|
||||||
|
"libc",
|
||||||
|
"object_store",
|
||||||
|
"parking_lot",
|
||||||
|
"petgraph",
|
||||||
|
"pin-project",
|
||||||
|
"pin-project-lite",
|
||||||
|
"prost",
|
||||||
|
"prost-build",
|
||||||
|
"redb",
|
||||||
|
"rstest",
|
||||||
|
"rstest_reuse",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"serde_qs",
|
||||||
|
"serde_tagged",
|
||||||
|
"serde_with",
|
||||||
|
"snix-tracing",
|
||||||
|
"tempfile",
|
||||||
|
"thiserror 2.0.9",
|
||||||
|
"threadpool",
|
||||||
|
"tokio",
|
||||||
|
"tokio-retry",
|
||||||
|
"tokio-stream",
|
||||||
|
"tokio-tar",
|
||||||
|
"tokio-test",
|
||||||
|
"tokio-util",
|
||||||
|
"toml 0.8.19",
|
||||||
|
"tonic",
|
||||||
|
"tonic-build",
|
||||||
|
"tonic-reflection",
|
||||||
|
"tower 0.4.13",
|
||||||
|
"tracing",
|
||||||
|
"tracing-indicatif",
|
||||||
|
"url",
|
||||||
|
"vhost",
|
||||||
|
"vhost-user-backend",
|
||||||
|
"virtio-bindings 0.2.4",
|
||||||
|
"virtio-queue",
|
||||||
|
"vm-memory",
|
||||||
|
"vmm-sys-util",
|
||||||
|
"walkdir",
|
||||||
|
"wu-manber",
|
||||||
|
"xattr",
|
||||||
|
"zstd",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "snix-cli"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"bytes",
|
||||||
|
"clap",
|
||||||
|
"dirs",
|
||||||
|
"expect-test",
|
||||||
|
"mimalloc",
|
||||||
|
"rnix",
|
||||||
|
"rowan",
|
||||||
|
"rustc-hash 2.1.0",
|
||||||
|
"rustyline",
|
||||||
|
"smol_str",
|
||||||
|
"snix-build",
|
||||||
|
"snix-eval",
|
||||||
|
"snix-glue",
|
||||||
|
"snix-store",
|
||||||
|
"snix-tracing",
|
||||||
|
"thiserror 2.0.9",
|
||||||
|
"tokio",
|
||||||
|
"tracing",
|
||||||
|
"tracing-indicatif",
|
||||||
|
"wu-manber",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "snix-eval"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"bstr",
|
||||||
|
"bytes",
|
||||||
|
"codemap",
|
||||||
|
"codemap-diagnostic",
|
||||||
|
"criterion",
|
||||||
|
"data-encoding",
|
||||||
|
"dirs",
|
||||||
|
"genawaiter",
|
||||||
|
"itertools 0.12.1",
|
||||||
|
"lexical-core",
|
||||||
|
"md-5",
|
||||||
|
"mimalloc",
|
||||||
|
"nohash-hasher",
|
||||||
|
"os_str_bytes",
|
||||||
|
"path-clean",
|
||||||
|
"pretty_assertions",
|
||||||
|
"proptest",
|
||||||
|
"regex",
|
||||||
|
"rnix",
|
||||||
|
"rowan",
|
||||||
|
"rstest",
|
||||||
|
"rustc-hash 2.1.0",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"sha1",
|
||||||
|
"sha2",
|
||||||
|
"smol_str",
|
||||||
|
"snix-eval-builtin-macros",
|
||||||
|
"tabwriter",
|
||||||
|
"tempfile",
|
||||||
|
"test-strategy",
|
||||||
|
"thiserror 2.0.9",
|
||||||
|
"toml 0.6.0",
|
||||||
|
"vu128",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "snix-eval-builtin-macros"
|
||||||
|
version = "0.0.1"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"snix-eval",
|
||||||
|
"syn 1.0.109",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "snix-glue"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"async-compression",
|
||||||
|
"bstr",
|
||||||
|
"bytes",
|
||||||
|
"clap",
|
||||||
|
"criterion",
|
||||||
|
"data-encoding",
|
||||||
|
"futures",
|
||||||
|
"hex-literal",
|
||||||
|
"magic",
|
||||||
|
"md-5",
|
||||||
|
"mimalloc",
|
||||||
|
"nix 0.27.1",
|
||||||
|
"nix-compat",
|
||||||
|
"pin-project",
|
||||||
|
"pretty_assertions",
|
||||||
|
"reqwest",
|
||||||
|
"rstest",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"sha1",
|
||||||
|
"sha2",
|
||||||
|
"snix-build",
|
||||||
|
"snix-castore",
|
||||||
|
"snix-eval",
|
||||||
|
"snix-store",
|
||||||
|
"snix-tracing",
|
||||||
|
"tempfile",
|
||||||
|
"thiserror 2.0.9",
|
||||||
|
"tokio",
|
||||||
|
"tokio-tar",
|
||||||
|
"tokio-util",
|
||||||
|
"tracing",
|
||||||
|
"tracing-indicatif",
|
||||||
|
"url",
|
||||||
|
"walkdir",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "snix-serde"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"bstr",
|
||||||
|
"serde",
|
||||||
|
"snix-eval",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "snix-store"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"anyhow",
|
||||||
|
"async-compression",
|
||||||
|
"async-process",
|
||||||
|
"async-stream",
|
||||||
|
"auto_impl",
|
||||||
|
"bigtable_rs",
|
||||||
|
"blake3",
|
||||||
|
"bstr",
|
||||||
|
"bytes",
|
||||||
|
"clap",
|
||||||
|
"count-write",
|
||||||
|
"data-encoding",
|
||||||
|
"ed25519",
|
||||||
|
"ed25519-dalek",
|
||||||
|
"futures",
|
||||||
|
"hex-literal",
|
||||||
|
"hyper-util",
|
||||||
|
"lru",
|
||||||
|
"md-5",
|
||||||
|
"mimalloc",
|
||||||
|
"nix-compat",
|
||||||
|
"parking_lot",
|
||||||
|
"pin-project-lite",
|
||||||
|
"prost",
|
||||||
|
"prost-build",
|
||||||
|
"redb",
|
||||||
|
"reqwest",
|
||||||
|
"reqwest-middleware",
|
||||||
|
"rstest",
|
||||||
|
"rstest_reuse",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"serde_qs",
|
||||||
|
"serde_with",
|
||||||
|
"sha1",
|
||||||
|
"sha2",
|
||||||
|
"snix-castore",
|
||||||
|
"snix-tracing",
|
||||||
|
"tempfile",
|
||||||
|
"thiserror 2.0.9",
|
||||||
|
"tokio",
|
||||||
|
"tokio-listener",
|
||||||
|
"tokio-retry",
|
||||||
|
"tokio-stream",
|
||||||
|
"tokio-util",
|
||||||
|
"toml 0.8.19",
|
||||||
|
"tonic",
|
||||||
|
"tonic-build",
|
||||||
|
"tonic-health",
|
||||||
|
"tonic-reflection",
|
||||||
|
"tower 0.4.13",
|
||||||
|
"tower-http",
|
||||||
|
"tracing",
|
||||||
|
"tracing-indicatif",
|
||||||
|
"url",
|
||||||
|
"walkdir",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "snix-tracing"
|
||||||
|
version = "0.1.0"
|
||||||
|
dependencies = [
|
||||||
|
"axum",
|
||||||
|
"http 1.2.0",
|
||||||
|
"indicatif",
|
||||||
|
"opentelemetry",
|
||||||
|
"opentelemetry-http",
|
||||||
|
"opentelemetry-otlp",
|
||||||
|
"opentelemetry-semantic-conventions",
|
||||||
|
"opentelemetry_sdk",
|
||||||
|
"reqwest-tracing",
|
||||||
|
"thiserror 2.0.9",
|
||||||
|
"tokio",
|
||||||
|
"tonic",
|
||||||
|
"tracing",
|
||||||
|
"tracing-indicatif",
|
||||||
|
"tracing-opentelemetry",
|
||||||
|
"tracing-subscriber",
|
||||||
|
"tracing-tracy",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "socket2"
|
name = "socket2"
|
||||||
version = "0.5.8"
|
version = "0.5.8"
|
||||||
|
|
@ -4987,317 +5298,6 @@ dependencies = [
|
||||||
"toml 0.8.19",
|
"toml 0.8.19",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tvix-build"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"anyhow",
|
|
||||||
"blake3",
|
|
||||||
"bstr",
|
|
||||||
"bytes",
|
|
||||||
"clap",
|
|
||||||
"data-encoding",
|
|
||||||
"futures",
|
|
||||||
"itertools 0.12.1",
|
|
||||||
"mimalloc",
|
|
||||||
"oci-spec",
|
|
||||||
"prost",
|
|
||||||
"prost-build",
|
|
||||||
"rstest",
|
|
||||||
"serde_json",
|
|
||||||
"tempfile",
|
|
||||||
"thiserror 2.0.9",
|
|
||||||
"tokio",
|
|
||||||
"tokio-listener",
|
|
||||||
"tonic",
|
|
||||||
"tonic-build",
|
|
||||||
"tonic-reflection",
|
|
||||||
"tracing",
|
|
||||||
"tvix-castore",
|
|
||||||
"tvix-tracing",
|
|
||||||
"url",
|
|
||||||
"uuid",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tvix-castore"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"async-compression",
|
|
||||||
"async-process",
|
|
||||||
"async-stream",
|
|
||||||
"async-tempfile",
|
|
||||||
"auto_impl",
|
|
||||||
"bigtable_rs",
|
|
||||||
"blake3",
|
|
||||||
"bstr",
|
|
||||||
"bytes",
|
|
||||||
"clap",
|
|
||||||
"data-encoding",
|
|
||||||
"digest",
|
|
||||||
"erased-serde",
|
|
||||||
"fastcdc",
|
|
||||||
"fuse-backend-rs",
|
|
||||||
"futures",
|
|
||||||
"hex-literal",
|
|
||||||
"hyper-util",
|
|
||||||
"libc",
|
|
||||||
"object_store",
|
|
||||||
"parking_lot",
|
|
||||||
"petgraph",
|
|
||||||
"pin-project",
|
|
||||||
"pin-project-lite",
|
|
||||||
"prost",
|
|
||||||
"prost-build",
|
|
||||||
"redb",
|
|
||||||
"rstest",
|
|
||||||
"rstest_reuse",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"serde_qs",
|
|
||||||
"serde_tagged",
|
|
||||||
"serde_with",
|
|
||||||
"tempfile",
|
|
||||||
"thiserror 2.0.9",
|
|
||||||
"threadpool",
|
|
||||||
"tokio",
|
|
||||||
"tokio-retry",
|
|
||||||
"tokio-stream",
|
|
||||||
"tokio-tar",
|
|
||||||
"tokio-test",
|
|
||||||
"tokio-util",
|
|
||||||
"toml 0.8.19",
|
|
||||||
"tonic",
|
|
||||||
"tonic-build",
|
|
||||||
"tonic-reflection",
|
|
||||||
"tower 0.4.13",
|
|
||||||
"tracing",
|
|
||||||
"tracing-indicatif",
|
|
||||||
"tvix-tracing",
|
|
||||||
"url",
|
|
||||||
"vhost",
|
|
||||||
"vhost-user-backend",
|
|
||||||
"virtio-bindings 0.2.4",
|
|
||||||
"virtio-queue",
|
|
||||||
"vm-memory",
|
|
||||||
"vmm-sys-util",
|
|
||||||
"walkdir",
|
|
||||||
"wu-manber",
|
|
||||||
"xattr",
|
|
||||||
"zstd",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tvix-cli"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"bytes",
|
|
||||||
"clap",
|
|
||||||
"dirs",
|
|
||||||
"expect-test",
|
|
||||||
"mimalloc",
|
|
||||||
"rnix",
|
|
||||||
"rowan",
|
|
||||||
"rustc-hash 2.1.0",
|
|
||||||
"rustyline",
|
|
||||||
"smol_str",
|
|
||||||
"thiserror 2.0.9",
|
|
||||||
"tokio",
|
|
||||||
"tracing",
|
|
||||||
"tracing-indicatif",
|
|
||||||
"tvix-build",
|
|
||||||
"tvix-eval",
|
|
||||||
"tvix-glue",
|
|
||||||
"tvix-store",
|
|
||||||
"tvix-tracing",
|
|
||||||
"wu-manber",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tvix-eval"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"bstr",
|
|
||||||
"bytes",
|
|
||||||
"codemap",
|
|
||||||
"codemap-diagnostic",
|
|
||||||
"criterion",
|
|
||||||
"data-encoding",
|
|
||||||
"dirs",
|
|
||||||
"genawaiter",
|
|
||||||
"itertools 0.12.1",
|
|
||||||
"lexical-core",
|
|
||||||
"md-5",
|
|
||||||
"mimalloc",
|
|
||||||
"nohash-hasher",
|
|
||||||
"os_str_bytes",
|
|
||||||
"path-clean",
|
|
||||||
"pretty_assertions",
|
|
||||||
"proptest",
|
|
||||||
"regex",
|
|
||||||
"rnix",
|
|
||||||
"rowan",
|
|
||||||
"rstest",
|
|
||||||
"rustc-hash 2.1.0",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"sha1",
|
|
||||||
"sha2",
|
|
||||||
"smol_str",
|
|
||||||
"tabwriter",
|
|
||||||
"tempfile",
|
|
||||||
"test-strategy",
|
|
||||||
"thiserror 2.0.9",
|
|
||||||
"toml 0.6.0",
|
|
||||||
"tvix-eval-builtin-macros",
|
|
||||||
"vu128",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tvix-eval-builtin-macros"
|
|
||||||
version = "0.0.1"
|
|
||||||
dependencies = [
|
|
||||||
"proc-macro2",
|
|
||||||
"quote",
|
|
||||||
"syn 1.0.109",
|
|
||||||
"tvix-eval",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tvix-glue"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"async-compression",
|
|
||||||
"bstr",
|
|
||||||
"bytes",
|
|
||||||
"clap",
|
|
||||||
"criterion",
|
|
||||||
"data-encoding",
|
|
||||||
"futures",
|
|
||||||
"hex-literal",
|
|
||||||
"magic",
|
|
||||||
"md-5",
|
|
||||||
"mimalloc",
|
|
||||||
"nix 0.27.1",
|
|
||||||
"nix-compat",
|
|
||||||
"pin-project",
|
|
||||||
"pretty_assertions",
|
|
||||||
"reqwest",
|
|
||||||
"rstest",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"sha1",
|
|
||||||
"sha2",
|
|
||||||
"tempfile",
|
|
||||||
"thiserror 2.0.9",
|
|
||||||
"tokio",
|
|
||||||
"tokio-tar",
|
|
||||||
"tokio-util",
|
|
||||||
"tracing",
|
|
||||||
"tracing-indicatif",
|
|
||||||
"tvix-build",
|
|
||||||
"tvix-castore",
|
|
||||||
"tvix-eval",
|
|
||||||
"tvix-store",
|
|
||||||
"tvix-tracing",
|
|
||||||
"url",
|
|
||||||
"walkdir",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tvix-serde"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"bstr",
|
|
||||||
"serde",
|
|
||||||
"tvix-eval",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tvix-store"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"anyhow",
|
|
||||||
"async-compression",
|
|
||||||
"async-process",
|
|
||||||
"async-stream",
|
|
||||||
"auto_impl",
|
|
||||||
"bigtable_rs",
|
|
||||||
"blake3",
|
|
||||||
"bstr",
|
|
||||||
"bytes",
|
|
||||||
"clap",
|
|
||||||
"count-write",
|
|
||||||
"data-encoding",
|
|
||||||
"ed25519",
|
|
||||||
"ed25519-dalek",
|
|
||||||
"futures",
|
|
||||||
"hex-literal",
|
|
||||||
"hyper-util",
|
|
||||||
"lru",
|
|
||||||
"md-5",
|
|
||||||
"mimalloc",
|
|
||||||
"nix-compat",
|
|
||||||
"parking_lot",
|
|
||||||
"pin-project-lite",
|
|
||||||
"prost",
|
|
||||||
"prost-build",
|
|
||||||
"redb",
|
|
||||||
"reqwest",
|
|
||||||
"reqwest-middleware",
|
|
||||||
"rstest",
|
|
||||||
"rstest_reuse",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"serde_qs",
|
|
||||||
"serde_with",
|
|
||||||
"sha1",
|
|
||||||
"sha2",
|
|
||||||
"tempfile",
|
|
||||||
"thiserror 2.0.9",
|
|
||||||
"tokio",
|
|
||||||
"tokio-listener",
|
|
||||||
"tokio-retry",
|
|
||||||
"tokio-stream",
|
|
||||||
"tokio-util",
|
|
||||||
"toml 0.8.19",
|
|
||||||
"tonic",
|
|
||||||
"tonic-build",
|
|
||||||
"tonic-health",
|
|
||||||
"tonic-reflection",
|
|
||||||
"tower 0.4.13",
|
|
||||||
"tower-http",
|
|
||||||
"tracing",
|
|
||||||
"tracing-indicatif",
|
|
||||||
"tvix-castore",
|
|
||||||
"tvix-tracing",
|
|
||||||
"url",
|
|
||||||
"walkdir",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "tvix-tracing"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"axum",
|
|
||||||
"http 1.2.0",
|
|
||||||
"indicatif",
|
|
||||||
"opentelemetry",
|
|
||||||
"opentelemetry-http",
|
|
||||||
"opentelemetry-otlp",
|
|
||||||
"opentelemetry-semantic-conventions",
|
|
||||||
"opentelemetry_sdk",
|
|
||||||
"reqwest-tracing",
|
|
||||||
"thiserror 2.0.9",
|
|
||||||
"tokio",
|
|
||||||
"tonic",
|
|
||||||
"tracing",
|
|
||||||
"tracing-indicatif",
|
|
||||||
"tracing-opentelemetry",
|
|
||||||
"tracing-subscriber",
|
|
||||||
"tracing-tracy",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "typeid"
|
name = "typeid"
|
||||||
version = "1.0.2"
|
version = "1.0.2"
|
||||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,18 +1,18 @@
|
||||||
# This Cargo file is a workspace configuration as per
|
# This Cargo file is a workspace configuration as per
|
||||||
# https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html
|
# https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html
|
||||||
#
|
#
|
||||||
# We add this file to get a coherent set of dependencies across Tvix
|
# We add this file to get a coherent set of dependencies across Snix
|
||||||
# crates by sharing a Cargo.lock. This is necessary because of the
|
# crates by sharing a Cargo.lock. This is necessary because of the
|
||||||
# currently limited support for Rust builds in Nix.
|
# currently limited support for Rust builds in Nix.
|
||||||
#
|
#
|
||||||
# Note that this explicitly does *not* mean that //tvix should be
|
# Note that this explicitly does *not* mean that //snix should be
|
||||||
# considered "one project": This is simply a workaround for a
|
# considered "one project": This is simply a workaround for a
|
||||||
# technical limitation and it should be our aim to remove this
|
# technical limitation and it should be our aim to remove this
|
||||||
# workspace file and make the subprojects independent.
|
# workspace file and make the subprojects independent.
|
||||||
#
|
#
|
||||||
# Note also that CI targets for actual projects should *not* be tied
|
# Note also that CI targets for actual projects should *not* be tied
|
||||||
# to //tvix, but to its subprojects. A potential file at
|
# to //snix, but to its subprojects. A potential file at
|
||||||
# //tvix/default.nix should likely *not* expose anything other than
|
# //snix/default.nix should likely *not* expose anything other than
|
||||||
# extra steps or other auxiliary targets.
|
# extra steps or other auxiliary targets.
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
|
|
@ -1,12 +1,12 @@
|
||||||
# tvix/boot
|
# snix/boot
|
||||||
|
|
||||||
This directory provides tooling to boot VMs with /nix/store provided by
|
This directory provides tooling to boot VMs with /nix/store provided by
|
||||||
virtiofs.
|
virtiofs.
|
||||||
|
|
||||||
In the `tests/` subdirectory, there's some integration tests.
|
In the `tests/` subdirectory, there's some integration tests.
|
||||||
|
|
||||||
## //tvix/boot:runVM
|
## //snix/boot:runVM
|
||||||
A script spinning up a `tvix-store virtiofs` daemon, then starting a cloud-
|
A script spinning up a `snix-store virtiofs` daemon, then starting a cloud-
|
||||||
hypervisor VM.
|
hypervisor VM.
|
||||||
|
|
||||||
The cloud-hypervisor VM is using a (semi-)minimal kernel image with virtiofs
|
The cloud-hypervisor VM is using a (semi-)minimal kernel image with virtiofs
|
||||||
|
|
@ -21,42 +21,42 @@ It supports the following env vars:
|
||||||
boot)
|
boot)
|
||||||
|
|
||||||
### Usage
|
### Usage
|
||||||
First, ensure you have `tvix-store` in `$PATH`, as that's what `run-tvix-vm`
|
First, ensure you have `snix-store` in `$PATH`, as that's what `run-snix-vm`
|
||||||
expects:
|
expects:
|
||||||
|
|
||||||
Assuming you ran `cargo build --profile=release-with-debug` before, and are in
|
Assuming you ran `cargo build --profile=release-with-debug` before, and are in
|
||||||
the `tvix` directory:
|
the `snix` directory:
|
||||||
|
|
||||||
```
|
```
|
||||||
export PATH=$PATH:$PWD/target/release-with-debug
|
export PATH=$PATH:$PWD/target/release-with-debug
|
||||||
```
|
```
|
||||||
|
|
||||||
Now, spin up tvix-daemon, connecting to some (local) backends:
|
Now, spin up snix-daemon, connecting to some (local) backends:
|
||||||
|
|
||||||
```
|
```
|
||||||
tvix-store --otlp=false daemon \
|
snix-store --otlp=false daemon \
|
||||||
--blob-service-addr=objectstore+file://$PWD/blobs \
|
--blob-service-addr=objectstore+file://$PWD/blobs \
|
||||||
--directory-service-addr=redb://$PWD/directories.redb \
|
--directory-service-addr=redb://$PWD/directories.redb \
|
||||||
--path-info-service-addr=redb://$PWD/pathinfo.redb &
|
--path-info-service-addr=redb://$PWD/pathinfo.redb &
|
||||||
```
|
```
|
||||||
|
|
||||||
Copy some data into tvix-store (we use `nar-bridge` for this for now):
|
Copy some data into snix-store (we use `nar-bridge` for this for now):
|
||||||
|
|
||||||
```
|
```
|
||||||
mg run //tvix:nar-bridge -- --otlp=false &
|
mg run //snix:nar-bridge -- --otlp=false &
|
||||||
rm -Rf ~/.cache/nix; nix copy --to http://localhost:9000\?compression\=none $(mg build //third_party/nixpkgs:hello)
|
rm -Rf ~/.cache/nix; nix copy --to http://localhost:9000\?compression\=none $(mg build //third_party/nixpkgs:hello)
|
||||||
pkill nar-bridge
|
pkill nar-bridge
|
||||||
```
|
```
|
||||||
|
|
||||||
By default, the `tvix-store virtiofs` command used in the `runVM` script
|
By default, the `snix-store virtiofs` command used in the `runVM` script
|
||||||
connects to a running `tvix-store daemon` via gRPC - in which case you want to
|
connects to a running `snix-store daemon` via gRPC - in which case you want to
|
||||||
keep `tvix-store daemon` running.
|
keep `snix-store daemon` running.
|
||||||
|
|
||||||
In case you want to have `tvix-store virtiofs` open the stores directly, kill
|
In case you want to have `snix-store virtiofs` open the stores directly, kill
|
||||||
`tvix-store daemon` too, and export the addresses from above:
|
`snix-store daemon` too, and export the addresses from above:
|
||||||
|
|
||||||
```
|
```
|
||||||
pkill tvix-store
|
pkill snix-store
|
||||||
export BLOB_SERVICE_ADDR=objectstore+file://$PWD/blobs
|
export BLOB_SERVICE_ADDR=objectstore+file://$PWD/blobs
|
||||||
export DIRECTORY_SERVICE_ADDR=redb://$PWD/directories.redb
|
export DIRECTORY_SERVICE_ADDR=redb://$PWD/directories.redb
|
||||||
export PATH_INFO_SERVICE_ADDR=redb://$PWD/pathinfo.redb
|
export PATH_INFO_SERVICE_ADDR=redb://$PWD/pathinfo.redb
|
||||||
|
|
@ -66,7 +66,7 @@ export PATH_INFO_SERVICE_ADDR=redb://$PWD/pathinfo.redb
|
||||||
Run the VM like this:
|
Run the VM like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
CH_CMDLINE=tvix.shell mg run //tvix/boot:runVM --
|
CH_CMDLINE=snix.shell mg run //snix/boot:runVM --
|
||||||
```
|
```
|
||||||
|
|
||||||
You'll get dropped into an interactive shell, from which you can do things with
|
You'll get dropped into an interactive shell, from which you can do things with
|
||||||
|
|
@ -95,10 +95,10 @@ Run the VM like this:
|
||||||
|
|
||||||
```
|
```
|
||||||
hello_cmd=$(mg build //third_party/nixpkgs:hello)/bin/hello
|
hello_cmd=$(mg build //third_party/nixpkgs:hello)/bin/hello
|
||||||
CH_CMDLINE=tvix.run=$hello_cmd mg run //tvix/boot:runVM --
|
CH_CMDLINE=snix.run=$hello_cmd mg run //snix/boot:runVM --
|
||||||
```
|
```
|
||||||
|
|
||||||
Observe it executing the file (and closure) from the tvix-store:
|
Observe it executing the file (and closure) from the snix-store:
|
||||||
|
|
||||||
```
|
```
|
||||||
[ 0.277486] Run /init as init process
|
[ 0.277486] Run /init as init process
|
||||||
|
|
@ -115,15 +115,15 @@ Hello, world!
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Boot a NixOS system closure
|
#### Boot a NixOS system closure
|
||||||
It's also possible to boot a system closure. To do this, tvix-init honors the
|
It's also possible to boot a system closure. To do this, snix-init honors the
|
||||||
init= cmdline option, and will `switch_root` to it.
|
init= cmdline option, and will `switch_root` to it.
|
||||||
|
|
||||||
Make sure to first copy that system closure into tvix-store,
|
Make sure to first copy that system closure into snix-store,
|
||||||
using a similar `nix copy` comamnd as above.
|
using a similar `nix copy` comamnd as above.
|
||||||
|
|
||||||
|
|
||||||
```
|
```
|
||||||
CH_CMDLINE=init=/nix/store/…-nixos-system-…/init mg run //tvix/boot:runVM --
|
CH_CMDLINE=init=/nix/store/…-nixos-system-…/init mg run //snix/boot:runVM --
|
||||||
```
|
```
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
@ -3,11 +3,11 @@
|
||||||
rec {
|
rec {
|
||||||
# A binary that sets up /nix/store from virtiofs, lists all store paths, and
|
# A binary that sets up /nix/store from virtiofs, lists all store paths, and
|
||||||
# powers off the machine.
|
# powers off the machine.
|
||||||
tvix-init = pkgs.buildGoModule rec {
|
snix-init = pkgs.buildGoModule rec {
|
||||||
name = "tvix-init";
|
name = "snix-init";
|
||||||
src = lib.fileset.toSource {
|
src = lib.fileset.toSource {
|
||||||
root = ./.;
|
root = ./.;
|
||||||
fileset = ./tvix-init.go;
|
fileset = ./snix-init.go;
|
||||||
};
|
};
|
||||||
vendorHash = null;
|
vendorHash = null;
|
||||||
postPatch = "go mod init ${name}";
|
postPatch = "go mod init ${name}";
|
||||||
|
|
@ -48,7 +48,7 @@ rec {
|
||||||
doCheck = false; # Some tests invoke /bin/bash
|
doCheck = false; # Some tests invoke /bin/bash
|
||||||
};
|
};
|
||||||
|
|
||||||
# Use u-root to build a initrd with our tvix-init inside.
|
# Use u-root to build a initrd with our snix-init inside.
|
||||||
initrd = pkgs.stdenv.mkDerivation {
|
initrd = pkgs.stdenv.mkDerivation {
|
||||||
name = "initrd.cpio";
|
name = "initrd.cpio";
|
||||||
nativeBuildInputs = [ pkgs.go ];
|
nativeBuildInputs = [ pkgs.go ];
|
||||||
|
|
@ -58,22 +58,22 @@ rec {
|
||||||
cp -R ${uroot.src} /tmp/go/src/github.com/u-root/u-root
|
cp -R ${uroot.src} /tmp/go/src/github.com/u-root/u-root
|
||||||
cd /tmp/go/src/github.com/u-root/u-root
|
cd /tmp/go/src/github.com/u-root/u-root
|
||||||
chmod +w .
|
chmod +w .
|
||||||
cp ${tvix-init}/bin/tvix-init tvix-init
|
cp ${snix-init}/bin/snix-init snix-init
|
||||||
|
|
||||||
export HOME=$(mktemp -d)
|
export HOME=$(mktemp -d)
|
||||||
export GOROOT="$(go env GOROOT)"
|
export GOROOT="$(go env GOROOT)"
|
||||||
|
|
||||||
GO111MODULE=off GOPATH=/tmp/go GOPROXY=off ${uroot}/bin/u-root -files ./tvix-init -initcmd "/tvix-init" -o $out
|
GO111MODULE=off GOPATH=/tmp/go GOPROXY=off ${uroot}/bin/u-root -files ./snix-init -initcmd "/snix-init" -o $out
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
# Start a `tvix-store` virtiofs daemon from $PATH, then a cloud-hypervisor
|
# Start a `snix-store` virtiofs daemon from $PATH, then a cloud-hypervisor
|
||||||
# pointed to it.
|
# pointed to it.
|
||||||
# Supports the following env vars (and defaults)
|
# Supports the following env vars (and defaults)
|
||||||
# CH_NUM_CPUS=2
|
# CH_NUM_CPUS=2
|
||||||
# CH_MEM_SIZE=512M
|
# CH_MEM_SIZE=512M
|
||||||
# CH_CMDLINE=""
|
# CH_CMDLINE=""
|
||||||
runVM = pkgs.writers.writeBashBin "run-tvix-vm" ''
|
runVM = pkgs.writers.writeBashBin "run-snix-vm" ''
|
||||||
tempdir=$(mktemp -d)
|
tempdir=$(mktemp -d)
|
||||||
|
|
||||||
cleanup() {
|
cleanup() {
|
||||||
|
|
@ -86,11 +86,11 @@ rec {
|
||||||
trap cleanup EXIT
|
trap cleanup EXIT
|
||||||
|
|
||||||
# Spin up the virtiofs daemon
|
# Spin up the virtiofs daemon
|
||||||
tvix-store --otlp=false virtiofs -l $tempdir/tvix.sock &
|
snix-store --otlp=false virtiofs -l $tempdir/snix.sock &
|
||||||
virtiofsd_pid=$!
|
virtiofsd_pid=$!
|
||||||
|
|
||||||
# Wait for the socket to exist.
|
# Wait for the socket to exist.
|
||||||
until [ -e $tempdir/tvix.sock ]; do sleep 0.1; done
|
until [ -e $tempdir/snix.sock ]; do sleep 0.1; done
|
||||||
|
|
||||||
CH_NUM_CPUS="''${CH_NUM_CPUS:-2}"
|
CH_NUM_CPUS="''${CH_NUM_CPUS:-2}"
|
||||||
CH_MEM_SIZE="''${CH_MEM_SIZE:-512M}"
|
CH_MEM_SIZE="''${CH_MEM_SIZE:-512M}"
|
||||||
|
|
@ -105,7 +105,7 @@ rec {
|
||||||
--kernel ${kernel}/${pkgs.stdenv.hostPlatform.linux-kernel.target} \
|
--kernel ${kernel}/${pkgs.stdenv.hostPlatform.linux-kernel.target} \
|
||||||
--initramfs ${initrd} \
|
--initramfs ${initrd} \
|
||||||
--cmdline "console=ttyS0 $CH_CMDLINE" \
|
--cmdline "console=ttyS0 $CH_CMDLINE" \
|
||||||
--fs tag=tvix,socket=$tempdir/tvix.sock,num_queues=''${CH_NUM_CPU},queue_size=512
|
--fs tag=snix,socket=$tempdir/snix.sock,num_queues=''${CH_NUM_CPU},queue_size=512
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta.ci.targets = [
|
meta.ci.targets = [
|
||||||
|
|
@ -38,13 +38,13 @@ func parseCmdline(cmdline string) map[string]string {
|
||||||
return out
|
return out
|
||||||
}
|
}
|
||||||
|
|
||||||
// mounts the nix store from the virtiofs tag to the given destination,
|
// mounts the snix store from the virtiofs tag to the given destination,
|
||||||
// creating the destination if it doesn't exist already.
|
// creating the destination if it doesn't exist already.
|
||||||
func mountTvixStore(dest string) error {
|
func mountSnixStore(dest string) error {
|
||||||
if err := os.MkdirAll(dest, os.ModePerm); err != nil {
|
if err := os.MkdirAll(dest, os.ModePerm); err != nil {
|
||||||
return fmt.Errorf("unable to mkdir dest: %w", err)
|
return fmt.Errorf("unable to mkdir dest: %w", err)
|
||||||
}
|
}
|
||||||
if err := run("mount", "-t", "virtiofs", "tvix", dest, "-o", "ro"); err != nil {
|
if err := run("mount", "-t", "virtiofs", "snix", dest, "-o", "ro"); err != nil {
|
||||||
return fmt.Errorf("unable to run mount: %w", err)
|
return fmt.Errorf("unable to run mount: %w", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -80,30 +80,30 @@ func main() {
|
||||||
}
|
}
|
||||||
cmdlineFields := parseCmdline(string(cmdline))
|
cmdlineFields := parseCmdline(string(cmdline))
|
||||||
|
|
||||||
if _, ok := cmdlineFields["tvix.find"]; ok {
|
if _, ok := cmdlineFields["snix.find"]; ok {
|
||||||
// If tvix.find is set, invoke find /nix/store
|
// If snix.find is set, invoke find /nix/store
|
||||||
if err := mountTvixStore("/nix/store"); err != nil {
|
if err := mountSnixStore("/nix/store"); err != nil {
|
||||||
log.Printf("Failed to mount tvix store: %v\n", err)
|
log.Printf("Failed to mount snix store: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := run("find", "/nix/store"); err != nil {
|
if err := run("find", "/nix/store"); err != nil {
|
||||||
log.Printf("Failed to run find command: %s\n", err)
|
log.Printf("Failed to run find command: %s\n", err)
|
||||||
}
|
}
|
||||||
} else if _, ok := cmdlineFields["tvix.shell"]; ok {
|
} else if _, ok := cmdlineFields["snix.shell"]; ok {
|
||||||
// If tvix.shell is set, mount the nix store to /nix/store directly,
|
// If snix.shell is set, mount the nix store to /nix/store directly,
|
||||||
// then invoke the elvish shell
|
// then invoke the elvish shell
|
||||||
if err := mountTvixStore("/nix/store"); err != nil {
|
if err := mountSnixStore("/nix/store"); err != nil {
|
||||||
log.Printf("Failed to mount tvix store: %v\n", err)
|
log.Printf("Failed to mount snix store: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := run("elvish"); err != nil {
|
if err := run("elvish"); err != nil {
|
||||||
log.Printf("Failed to run shell: %s\n", err)
|
log.Printf("Failed to run shell: %s\n", err)
|
||||||
}
|
}
|
||||||
} else if v, ok := cmdlineFields["tvix.run"]; ok {
|
} else if v, ok := cmdlineFields["snix.run"]; ok {
|
||||||
// If tvix.run is set, mount the nix store to /nix/store directly,
|
// If snix.run is set, mount the nix store to /nix/store directly,
|
||||||
// then invoke the command.
|
// then invoke the command.
|
||||||
if err := mountTvixStore("/nix/store"); err != nil {
|
if err := mountSnixStore("/nix/store"); err != nil {
|
||||||
log.Printf("Failed to mount tvix store: %v\n", err)
|
log.Printf("Failed to mount snix store: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
if err := run(v); err != nil {
|
if err := run(v); err != nil {
|
||||||
|
|
@ -118,8 +118,8 @@ func main() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mount /fs/nix/store
|
// Mount /fs/nix/store
|
||||||
if err := mountTvixStore("/fs/nix/store"); err != nil {
|
if err := mountSnixStore("/fs/nix/store"); err != nil {
|
||||||
log.Fatalf("Failed to mount tvix store: %v\n", err)
|
log.Fatalf("Failed to mount snix store: %v\n", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Invoke switch_root, which will take care of moving /proc, /sys and /dev.
|
// Invoke switch_root, which will take care of moving /proc, /sys and /dev.
|
||||||
|
|
@ -1,8 +1,8 @@
|
||||||
{ depot, pkgs, lib, ... }:
|
{ depot, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
# Seed a tvix-store with the specified path, then start a VM with the
|
# Seed a snix-store with the specified path, then start a VM with the
|
||||||
# tvix-boot initrd.
|
# snix-boot initrd.
|
||||||
# Allows customizing the cmdline, which can be used to list files,
|
# Allows customizing the cmdline, which can be used to list files,
|
||||||
# or specify what init should be booted.
|
# or specify what init should be booted.
|
||||||
mkBootTest =
|
mkBootTest =
|
||||||
|
|
@ -17,20 +17,20 @@ let
|
||||||
# Whether the path should be imported as a closure.
|
# Whether the path should be imported as a closure.
|
||||||
# If false, importPathName must be specified.
|
# If false, importPathName must be specified.
|
||||||
, isClosure ? false
|
, isClosure ? false
|
||||||
# Whether to use nar-bridge to upload, rather than tvix-store copy.
|
# Whether to use nar-bridge to upload, rather than snix-store copy.
|
||||||
# using nar-bridge currently is "slower", as the `pkgs.mkBinaryCache` build
|
# using nar-bridge currently is "slower", as the `pkgs.mkBinaryCache` build
|
||||||
# takes quite some time.
|
# takes quite some time.
|
||||||
, useNarBridge ? false
|
, useNarBridge ? false
|
||||||
|
|
||||||
, importPathName ? null
|
, importPathName ? null
|
||||||
|
|
||||||
# Commands to run before starting the tvix-daemon. Useful to provide
|
# Commands to run before starting the snix-daemon. Useful to provide
|
||||||
# auxillary mock services.
|
# auxillary mock services.
|
||||||
, preStart ? ""
|
, preStart ? ""
|
||||||
|
|
||||||
# The cmdline to pass to the VM.
|
# The cmdline to pass to the VM.
|
||||||
# Defaults to tvix.find, which lists all files in the store.
|
# Defaults to snix.find, which lists all files in the store.
|
||||||
, vmCmdline ? "tvix.find"
|
, vmCmdline ? "snix.find"
|
||||||
# The string we expect to find in the VM output.
|
# The string we expect to find in the VM output.
|
||||||
# Defaults the value of `path` (the store path we upload).
|
# Defaults the value of `path` (the store path we upload).
|
||||||
, assertVMOutput ? path
|
, assertVMOutput ? path
|
||||||
|
|
@ -43,10 +43,10 @@ let
|
||||||
name = "run-vm";
|
name = "run-vm";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
depot.tvix.store
|
depot.snix.store
|
||||||
depot.tvix.boot.runVM
|
depot.snix.boot.runVM
|
||||||
] ++ lib.optionals (isClosure && useNarBridge) [
|
] ++ lib.optionals (isClosure && useNarBridge) [
|
||||||
depot.tvix.nar-bridge
|
depot.snix.nar-bridge
|
||||||
pkgs.curl
|
pkgs.curl
|
||||||
pkgs.rush-parallel
|
pkgs.rush-parallel
|
||||||
pkgs.zstd.bin
|
pkgs.zstd.bin
|
||||||
|
|
@ -60,32 +60,32 @@ let
|
||||||
|
|
||||||
${preStart}
|
${preStart}
|
||||||
|
|
||||||
# Start the tvix daemon, listening on a unix socket.
|
# Start the snix daemon, listening on a unix socket.
|
||||||
BLOB_SERVICE_ADDR=${lib.escapeShellArg blobServiceAddr} \
|
BLOB_SERVICE_ADDR=${lib.escapeShellArg blobServiceAddr} \
|
||||||
DIRECTORY_SERVICE_ADDR=${lib.escapeShellArg directoryServiceAddr} \
|
DIRECTORY_SERVICE_ADDR=${lib.escapeShellArg directoryServiceAddr} \
|
||||||
PATH_INFO_SERVICE_ADDR=${lib.escapeShellArg pathInfoServiceAddr} \
|
PATH_INFO_SERVICE_ADDR=${lib.escapeShellArg pathInfoServiceAddr} \
|
||||||
tvix-store \
|
snix-store \
|
||||||
--otlp=false \
|
--otlp=false \
|
||||||
daemon -l $PWD/tvix-store.sock &
|
daemon -l $PWD/snix-store.sock &
|
||||||
|
|
||||||
# Wait for the service to report healthy.
|
# Wait for the service to report healthy.
|
||||||
timeout 22 sh -c "until ${pkgs.ip2unix}/bin/ip2unix -r out,path=$PWD/tvix-store.sock ${pkgs.grpc-health-check}/bin/grpc-health-check --address 127.0.0.1 --port 8080; do sleep 1; done"
|
timeout 22 sh -c "until ${pkgs.ip2unix}/bin/ip2unix -r out,path=$PWD/snix-store.sock ${pkgs.grpc-health-check}/bin/grpc-health-check --address 127.0.0.1 --port 8080; do sleep 1; done"
|
||||||
|
|
||||||
# Export env vars so that subsequent tvix-store commands will talk to
|
# Export env vars so that subsequent snix-store commands will talk to
|
||||||
# our tvix-store daemon over the unix socket.
|
# our snix-store daemon over the unix socket.
|
||||||
export BLOB_SERVICE_ADDR=grpc+unix://$PWD/tvix-store.sock
|
export BLOB_SERVICE_ADDR=grpc+unix://$PWD/snix-store.sock
|
||||||
export DIRECTORY_SERVICE_ADDR=grpc+unix://$PWD/tvix-store.sock
|
export DIRECTORY_SERVICE_ADDR=grpc+unix://$PWD/snix-store.sock
|
||||||
export PATH_INFO_SERVICE_ADDR=grpc+unix://$PWD/tvix-store.sock
|
export PATH_INFO_SERVICE_ADDR=grpc+unix://$PWD/snix-store.sock
|
||||||
'' + lib.optionalString (!isClosure) ''
|
'' + lib.optionalString (!isClosure) ''
|
||||||
echo "Importing ${path} into tvix-store with name ${importPathName}…"
|
echo "Importing ${path} into snix-store with name ${importPathName}…"
|
||||||
cp -R ${path} ${importPathName}
|
cp -R ${path} ${importPathName}
|
||||||
outpath=$(tvix-store import ${importPathName})
|
outpath=$(snix-store import ${importPathName})
|
||||||
|
|
||||||
echo "imported to $outpath"
|
echo "imported to $outpath"
|
||||||
'' + lib.optionalString (isClosure && !useNarBridge) ''
|
'' + lib.optionalString (isClosure && !useNarBridge) ''
|
||||||
echo "Copying closure ${path}…"
|
echo "Copying closure ${path}…"
|
||||||
# This picks up the `closure` key in `$NIX_ATTRS_JSON_FILE` automatically.
|
# This picks up the `closure` key in `$NIX_ATTRS_JSON_FILE` automatically.
|
||||||
tvix-store --otlp=false copy
|
snix-store --otlp=false copy
|
||||||
'' + lib.optionalString (isClosure && useNarBridge) ''
|
'' + lib.optionalString (isClosure && useNarBridge) ''
|
||||||
echo "Starting nar-bridge…"
|
echo "Starting nar-bridge…"
|
||||||
nar-bridge \
|
nar-bridge \
|
||||||
|
|
@ -123,10 +123,10 @@ let
|
||||||
# and disable checking here, to keep the logic simple.
|
# and disable checking here, to keep the logic simple.
|
||||||
ls -d $to_upload/*.narinfo | rush 'curl -s -T - --unix-socket $PWD/nar-bridge.sock http://localhost:9000/$(basename {}) < {}'
|
ls -d $to_upload/*.narinfo | rush 'curl -s -T - --unix-socket $PWD/nar-bridge.sock http://localhost:9000/$(basename {}) < {}'
|
||||||
'' + ''
|
'' + ''
|
||||||
# Invoke a VM using tvix as the backing store, ensure the outpath appears in its listing.
|
# Invoke a VM using snix as the backing store, ensure the outpath appears in its listing.
|
||||||
echo "Starting VM…"
|
echo "Starting VM…"
|
||||||
|
|
||||||
CH_CMDLINE="${vmCmdline}" run-tvix-vm 2>&1 | tee output.txt
|
CH_CMDLINE="${vmCmdline}" run-snix-vm 2>&1 | tee output.txt
|
||||||
grep "${assertVMOutput}" output.txt
|
grep "${assertVMOutput}" output.txt
|
||||||
'';
|
'';
|
||||||
requiredSystemFeatures = [ "kvm" ];
|
requiredSystemFeatures = [ "kvm" ];
|
||||||
|
|
@ -182,9 +182,9 @@ depot.nix.readTree.drvTargets {
|
||||||
importPathName = "docs";
|
importPathName = "docs";
|
||||||
});
|
});
|
||||||
|
|
||||||
closure-tvix = (mkBootTest {
|
closure-snix = (mkBootTest {
|
||||||
blobServiceAddr = "objectstore+file:///build/blobs";
|
blobServiceAddr = "objectstore+file:///build/blobs";
|
||||||
path = depot.tvix.store;
|
path = depot.snix.store;
|
||||||
isClosure = true;
|
isClosure = true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
Copyright © The Tvix Authors
|
Copyright © The Tvix Authors
|
||||||
|
Copyright © The Snix Project
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
# build-go
|
# build-go
|
||||||
|
|
||||||
This directory contains generated golang bindings, both for the `tvix-build`
|
This directory contains generated golang bindings, both for the `snix-build`
|
||||||
data models, as well as the gRPC bindings.
|
data models, as well as the gRPC bindings.
|
||||||
|
|
||||||
They are generated with `mg run //tvix/build-go:regenerate`.
|
They are generated with `mg run //snix/build-go:regenerate`.
|
||||||
These files end with `.pb.go`, and are ensured to be up to date by a CI check.
|
These files end with `.pb.go`, and are ensured to be up to date by a CI check.
|
||||||
|
|
||||||
Additionally, code useful when interacting with these data structures
|
Additionally, code useful when interacting with these data structures
|
||||||
|
|
@ -1,19 +1,20 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
// Copyright © 2022 The Tvix Authors
|
// Copyright © 2022 The Tvix Authors
|
||||||
|
// Copyright © 2025 The Snix Project
|
||||||
|
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.36.5
|
// protoc-gen-go v1.36.5
|
||||||
// protoc (unknown)
|
// protoc (unknown)
|
||||||
// source: tvix/build/protos/build.proto
|
// source: snix/build/protos/build.proto
|
||||||
|
|
||||||
package buildv1
|
package buildv1
|
||||||
|
|
||||||
import (
|
import (
|
||||||
castore_go "code.tvl.fyi/tvix/castore-go"
|
|
||||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||||
reflect "reflect"
|
reflect "reflect"
|
||||||
|
proto "snix.dev/castore/proto"
|
||||||
sync "sync"
|
sync "sync"
|
||||||
unsafe "unsafe"
|
unsafe "unsafe"
|
||||||
)
|
)
|
||||||
|
|
@ -47,7 +48,7 @@ const (
|
||||||
// to either the input's deriver (and needs to build it) or else a trusted
|
// to either the input's deriver (and needs to build it) or else a trusted
|
||||||
// source for the built input.
|
// source for the built input.
|
||||||
// to upload input-addressed paths, requiring the trusted users concept.
|
// to upload input-addressed paths, requiring the trusted users concept.
|
||||||
// - tvix-build records a list of tvix.castore.v1.Node as inputs.
|
// - snix-build records a list of snix.castore.v1.Node as inputs.
|
||||||
// These map from the store path base name to their contents, relieving the
|
// These map from the store path base name to their contents, relieving the
|
||||||
// builder from having to "trust" any input-addressed paths, contrary to Nix.
|
// builder from having to "trust" any input-addressed paths, contrary to Nix.
|
||||||
//
|
//
|
||||||
|
|
@ -67,7 +68,7 @@ type BuildRequest struct {
|
||||||
// As all references are content-addressed, no additional signatures are
|
// As all references are content-addressed, no additional signatures are
|
||||||
// needed to substitute / make these available in the build environment.
|
// needed to substitute / make these available in the build environment.
|
||||||
// Inputs MUST be sorted by their names.
|
// Inputs MUST be sorted by their names.
|
||||||
Inputs []*castore_go.Node `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"`
|
Inputs []*proto.Node `protobuf:"bytes,1,rep,name=inputs,proto3" json:"inputs,omitempty"`
|
||||||
// The command (and its args) executed as the build script.
|
// The command (and its args) executed as the build script.
|
||||||
// In the case of a Nix derivation, this is usually
|
// In the case of a Nix derivation, this is usually
|
||||||
// ["/path/to/some-bash/bin/bash", "-e", "/path/to/some/builder.sh"].
|
// ["/path/to/some-bash/bin/bash", "-e", "/path/to/some/builder.sh"].
|
||||||
|
|
@ -124,7 +125,7 @@ type BuildRequest struct {
|
||||||
|
|
||||||
func (x *BuildRequest) Reset() {
|
func (x *BuildRequest) Reset() {
|
||||||
*x = BuildRequest{}
|
*x = BuildRequest{}
|
||||||
mi := &file_tvix_build_protos_build_proto_msgTypes[0]
|
mi := &file_snix_build_protos_build_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -136,7 +137,7 @@ func (x *BuildRequest) String() string {
|
||||||
func (*BuildRequest) ProtoMessage() {}
|
func (*BuildRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *BuildRequest) ProtoReflect() protoreflect.Message {
|
func (x *BuildRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_build_protos_build_proto_msgTypes[0]
|
mi := &file_snix_build_protos_build_proto_msgTypes[0]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -149,10 +150,10 @@ func (x *BuildRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use BuildRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use BuildRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*BuildRequest) Descriptor() ([]byte, []int) {
|
func (*BuildRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_build_protos_build_proto_rawDescGZIP(), []int{0}
|
return file_snix_build_protos_build_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BuildRequest) GetInputs() []*castore_go.Node {
|
func (x *BuildRequest) GetInputs() []*proto.Node {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Inputs
|
return x.Inputs
|
||||||
}
|
}
|
||||||
|
|
@ -229,7 +230,7 @@ type Build struct {
|
||||||
BuildRequest *BuildRequest `protobuf:"bytes,1,opt,name=build_request,json=buildRequest,proto3" json:"build_request,omitempty"` // <- TODO: define hashing scheme for BuildRequest, refer to it by hash?
|
BuildRequest *BuildRequest `protobuf:"bytes,1,opt,name=build_request,json=buildRequest,proto3" json:"build_request,omitempty"` // <- TODO: define hashing scheme for BuildRequest, refer to it by hash?
|
||||||
// The outputs that were produced after successfully building.
|
// The outputs that were produced after successfully building.
|
||||||
// They are sorted by their names.
|
// They are sorted by their names.
|
||||||
Outputs []*castore_go.Node `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"`
|
Outputs []*proto.Node `protobuf:"bytes,2,rep,name=outputs,proto3" json:"outputs,omitempty"`
|
||||||
// Contains the same number of elements as the `outputs` field.
|
// Contains the same number of elements as the `outputs` field.
|
||||||
OutputsNeedles []*Build_OutputNeedles `protobuf:"bytes,3,rep,name=outputs_needles,json=outputsNeedles,proto3" json:"outputs_needles,omitempty"`
|
OutputsNeedles []*Build_OutputNeedles `protobuf:"bytes,3,rep,name=outputs_needles,json=outputsNeedles,proto3" json:"outputs_needles,omitempty"`
|
||||||
unknownFields protoimpl.UnknownFields
|
unknownFields protoimpl.UnknownFields
|
||||||
|
|
@ -238,7 +239,7 @@ type Build struct {
|
||||||
|
|
||||||
func (x *Build) Reset() {
|
func (x *Build) Reset() {
|
||||||
*x = Build{}
|
*x = Build{}
|
||||||
mi := &file_tvix_build_protos_build_proto_msgTypes[1]
|
mi := &file_snix_build_protos_build_proto_msgTypes[1]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -250,7 +251,7 @@ func (x *Build) String() string {
|
||||||
func (*Build) ProtoMessage() {}
|
func (*Build) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *Build) ProtoReflect() protoreflect.Message {
|
func (x *Build) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_build_protos_build_proto_msgTypes[1]
|
mi := &file_snix_build_protos_build_proto_msgTypes[1]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -263,7 +264,7 @@ func (x *Build) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use Build.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Build.ProtoReflect.Descriptor instead.
|
||||||
func (*Build) Descriptor() ([]byte, []int) {
|
func (*Build) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_build_protos_build_proto_rawDescGZIP(), []int{1}
|
return file_snix_build_protos_build_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Build) GetBuildRequest() *BuildRequest {
|
func (x *Build) GetBuildRequest() *BuildRequest {
|
||||||
|
|
@ -273,7 +274,7 @@ func (x *Build) GetBuildRequest() *BuildRequest {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Build) GetOutputs() []*castore_go.Node {
|
func (x *Build) GetOutputs() []*proto.Node {
|
||||||
if x != nil {
|
if x != nil {
|
||||||
return x.Outputs
|
return x.Outputs
|
||||||
}
|
}
|
||||||
|
|
@ -298,7 +299,7 @@ type BuildRequest_EnvVar struct {
|
||||||
|
|
||||||
func (x *BuildRequest_EnvVar) Reset() {
|
func (x *BuildRequest_EnvVar) Reset() {
|
||||||
*x = BuildRequest_EnvVar{}
|
*x = BuildRequest_EnvVar{}
|
||||||
mi := &file_tvix_build_protos_build_proto_msgTypes[2]
|
mi := &file_snix_build_protos_build_proto_msgTypes[2]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -310,7 +311,7 @@ func (x *BuildRequest_EnvVar) String() string {
|
||||||
func (*BuildRequest_EnvVar) ProtoMessage() {}
|
func (*BuildRequest_EnvVar) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *BuildRequest_EnvVar) ProtoReflect() protoreflect.Message {
|
func (x *BuildRequest_EnvVar) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_build_protos_build_proto_msgTypes[2]
|
mi := &file_snix_build_protos_build_proto_msgTypes[2]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -323,7 +324,7 @@ func (x *BuildRequest_EnvVar) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use BuildRequest_EnvVar.ProtoReflect.Descriptor instead.
|
// Deprecated: Use BuildRequest_EnvVar.ProtoReflect.Descriptor instead.
|
||||||
func (*BuildRequest_EnvVar) Descriptor() ([]byte, []int) {
|
func (*BuildRequest_EnvVar) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_build_protos_build_proto_rawDescGZIP(), []int{0, 0}
|
return file_snix_build_protos_build_proto_rawDescGZIP(), []int{0, 0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BuildRequest_EnvVar) GetKey() string {
|
func (x *BuildRequest_EnvVar) GetKey() string {
|
||||||
|
|
@ -369,7 +370,7 @@ type BuildRequest_BuildConstraints struct {
|
||||||
|
|
||||||
func (x *BuildRequest_BuildConstraints) Reset() {
|
func (x *BuildRequest_BuildConstraints) Reset() {
|
||||||
*x = BuildRequest_BuildConstraints{}
|
*x = BuildRequest_BuildConstraints{}
|
||||||
mi := &file_tvix_build_protos_build_proto_msgTypes[3]
|
mi := &file_snix_build_protos_build_proto_msgTypes[3]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -381,7 +382,7 @@ func (x *BuildRequest_BuildConstraints) String() string {
|
||||||
func (*BuildRequest_BuildConstraints) ProtoMessage() {}
|
func (*BuildRequest_BuildConstraints) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *BuildRequest_BuildConstraints) ProtoReflect() protoreflect.Message {
|
func (x *BuildRequest_BuildConstraints) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_build_protos_build_proto_msgTypes[3]
|
mi := &file_snix_build_protos_build_proto_msgTypes[3]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -394,7 +395,7 @@ func (x *BuildRequest_BuildConstraints) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use BuildRequest_BuildConstraints.ProtoReflect.Descriptor instead.
|
// Deprecated: Use BuildRequest_BuildConstraints.ProtoReflect.Descriptor instead.
|
||||||
func (*BuildRequest_BuildConstraints) Descriptor() ([]byte, []int) {
|
func (*BuildRequest_BuildConstraints) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_build_protos_build_proto_rawDescGZIP(), []int{0, 1}
|
return file_snix_build_protos_build_proto_rawDescGZIP(), []int{0, 1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BuildRequest_BuildConstraints) GetSystem() string {
|
func (x *BuildRequest_BuildConstraints) GetSystem() string {
|
||||||
|
|
@ -442,7 +443,7 @@ type BuildRequest_AdditionalFile struct {
|
||||||
|
|
||||||
func (x *BuildRequest_AdditionalFile) Reset() {
|
func (x *BuildRequest_AdditionalFile) Reset() {
|
||||||
*x = BuildRequest_AdditionalFile{}
|
*x = BuildRequest_AdditionalFile{}
|
||||||
mi := &file_tvix_build_protos_build_proto_msgTypes[4]
|
mi := &file_snix_build_protos_build_proto_msgTypes[4]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -454,7 +455,7 @@ func (x *BuildRequest_AdditionalFile) String() string {
|
||||||
func (*BuildRequest_AdditionalFile) ProtoMessage() {}
|
func (*BuildRequest_AdditionalFile) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *BuildRequest_AdditionalFile) ProtoReflect() protoreflect.Message {
|
func (x *BuildRequest_AdditionalFile) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_build_protos_build_proto_msgTypes[4]
|
mi := &file_snix_build_protos_build_proto_msgTypes[4]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -467,7 +468,7 @@ func (x *BuildRequest_AdditionalFile) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use BuildRequest_AdditionalFile.ProtoReflect.Descriptor instead.
|
// Deprecated: Use BuildRequest_AdditionalFile.ProtoReflect.Descriptor instead.
|
||||||
func (*BuildRequest_AdditionalFile) Descriptor() ([]byte, []int) {
|
func (*BuildRequest_AdditionalFile) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_build_protos_build_proto_rawDescGZIP(), []int{0, 2}
|
return file_snix_build_protos_build_proto_rawDescGZIP(), []int{0, 2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BuildRequest_AdditionalFile) GetPath() string {
|
func (x *BuildRequest_AdditionalFile) GetPath() string {
|
||||||
|
|
@ -494,7 +495,7 @@ type Build_OutputNeedles struct {
|
||||||
|
|
||||||
func (x *Build_OutputNeedles) Reset() {
|
func (x *Build_OutputNeedles) Reset() {
|
||||||
*x = Build_OutputNeedles{}
|
*x = Build_OutputNeedles{}
|
||||||
mi := &file_tvix_build_protos_build_proto_msgTypes[5]
|
mi := &file_snix_build_protos_build_proto_msgTypes[5]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -506,7 +507,7 @@ func (x *Build_OutputNeedles) String() string {
|
||||||
func (*Build_OutputNeedles) ProtoMessage() {}
|
func (*Build_OutputNeedles) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *Build_OutputNeedles) ProtoReflect() protoreflect.Message {
|
func (x *Build_OutputNeedles) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_build_protos_build_proto_msgTypes[5]
|
mi := &file_snix_build_protos_build_proto_msgTypes[5]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -519,7 +520,7 @@ func (x *Build_OutputNeedles) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use Build_OutputNeedles.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Build_OutputNeedles.ProtoReflect.Descriptor instead.
|
||||||
func (*Build_OutputNeedles) Descriptor() ([]byte, []int) {
|
func (*Build_OutputNeedles) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_build_protos_build_proto_rawDescGZIP(), []int{1, 0}
|
return file_snix_build_protos_build_proto_rawDescGZIP(), []int{1, 0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Build_OutputNeedles) GetNeedles() []uint64 {
|
func (x *Build_OutputNeedles) GetNeedles() []uint64 {
|
||||||
|
|
@ -529,17 +530,17 @@ func (x *Build_OutputNeedles) GetNeedles() []uint64 {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var File_tvix_build_protos_build_proto protoreflect.FileDescriptor
|
var File_snix_build_protos_build_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_tvix_build_protos_build_proto_rawDesc = string([]byte{
|
var file_snix_build_protos_build_proto_rawDesc = string([]byte{
|
||||||
0x0a, 0x1d, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x70, 0x72, 0x6f,
|
0x0a, 0x1d, 0x73, 0x6e, 0x69, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x70, 0x72, 0x6f,
|
||||||
0x74, 0x6f, 0x73, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
0x74, 0x6f, 0x73, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12,
|
||||||
0x0d, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x21,
|
0x0d, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x1a, 0x21,
|
||||||
0x74, 0x76, 0x69, 0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f,
|
0x73, 0x6e, 0x69, 0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f,
|
||||||
0x74, 0x6f, 0x73, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
0x74, 0x6f, 0x73, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x6f, 0x22, 0xb9, 0x06, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x6f, 0x22, 0xb9, 0x06, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
|
0x73, 0x74, 0x12, 0x2d, 0x0a, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03,
|
||||||
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72,
|
0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72,
|
||||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74,
|
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x06, 0x69, 0x6e, 0x70, 0x75, 0x74,
|
||||||
0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x61, 0x72, 0x67,
|
0x73, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x5f, 0x61, 0x72, 0x67,
|
||||||
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64,
|
0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64,
|
||||||
|
|
@ -553,17 +554,17 @@ var file_tvix_build_protos_build_proto_rawDesc = string([]byte{
|
||||||
0x70, 0x75, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70,
|
0x70, 0x75, 0x74, 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x09, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70,
|
||||||
0x75, 0x74, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65,
|
0x75, 0x74, 0x73, 0x12, 0x4d, 0x0a, 0x10, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65,
|
||||||
0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e,
|
0x6e, 0x74, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e,
|
||||||
0x74, 0x76, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75,
|
0x73, 0x6e, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75,
|
||||||
0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61,
|
0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61,
|
||||||
0x72, 0x52, 0x0f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61,
|
0x72, 0x52, 0x0f, 0x65, 0x6e, 0x76, 0x69, 0x72, 0x6f, 0x6e, 0x6d, 0x65, 0x6e, 0x74, 0x56, 0x61,
|
||||||
0x72, 0x73, 0x12, 0x4e, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74,
|
0x72, 0x73, 0x12, 0x4e, 0x0a, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e, 0x74,
|
||||||
0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x62,
|
0x73, 0x18, 0x08, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x2c, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x62,
|
||||||
0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71,
|
0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71,
|
||||||
0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72,
|
0x75, 0x65, 0x73, 0x74, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x43, 0x6f, 0x6e, 0x73, 0x74, 0x72,
|
||||||
0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e,
|
0x61, 0x69, 0x6e, 0x74, 0x73, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x72, 0x61, 0x69, 0x6e,
|
||||||
0x74, 0x73, 0x12, 0x55, 0x0a, 0x10, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
|
0x74, 0x73, 0x12, 0x55, 0x0a, 0x10, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c,
|
||||||
0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x74,
|
0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x73,
|
||||||
0x76, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69,
|
0x6e, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69,
|
||||||
0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69,
|
0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x41, 0x64, 0x64, 0x69, 0x74, 0x69,
|
||||||
0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69,
|
0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x52, 0x0f, 0x61, 0x64, 0x64, 0x69, 0x74, 0x69,
|
||||||
0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x66,
|
0x6f, 0x6e, 0x61, 0x6c, 0x46, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x27, 0x0a, 0x0f, 0x72, 0x65, 0x66,
|
||||||
|
|
@ -591,54 +592,54 @@ var file_tvix_build_protos_build_proto_rawDesc = string([]byte{
|
||||||
0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xf2, 0x01,
|
0x01, 0x28, 0x0c, 0x52, 0x08, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x73, 0x22, 0xf2, 0x01,
|
||||||
0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x40, 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64,
|
0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x40, 0x0a, 0x0d, 0x62, 0x75, 0x69, 0x6c, 0x64,
|
||||||
0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
|
0x5f, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b,
|
||||||
0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42,
|
0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42,
|
||||||
0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x62, 0x75, 0x69,
|
0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x0c, 0x62, 0x75, 0x69,
|
||||||
0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x75, 0x74,
|
0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2f, 0x0a, 0x07, 0x6f, 0x75, 0x74,
|
||||||
0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x74, 0x76, 0x69,
|
0x70, 0x75, 0x74, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x73, 0x6e, 0x69,
|
||||||
0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64,
|
0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4e, 0x6f, 0x64,
|
||||||
0x65, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x6f, 0x75,
|
0x65, 0x52, 0x07, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73, 0x12, 0x4b, 0x0a, 0x0f, 0x6f, 0x75,
|
||||||
0x74, 0x70, 0x75, 0x74, 0x73, 0x5f, 0x6e, 0x65, 0x65, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20,
|
0x74, 0x70, 0x75, 0x74, 0x73, 0x5f, 0x6e, 0x65, 0x65, 0x64, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20,
|
||||||
0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64,
|
0x03, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64,
|
||||||
0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74,
|
0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74,
|
||||||
0x4e, 0x65, 0x65, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73,
|
0x4e, 0x65, 0x65, 0x64, 0x6c, 0x65, 0x73, 0x52, 0x0e, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x73,
|
||||||
0x4e, 0x65, 0x65, 0x64, 0x6c, 0x65, 0x73, 0x1a, 0x29, 0x0a, 0x0d, 0x4f, 0x75, 0x74, 0x70, 0x75,
|
0x4e, 0x65, 0x65, 0x64, 0x6c, 0x65, 0x73, 0x1a, 0x29, 0x0a, 0x0d, 0x4f, 0x75, 0x74, 0x70, 0x75,
|
||||||
0x74, 0x4e, 0x65, 0x65, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x65, 0x64,
|
0x74, 0x4e, 0x65, 0x65, 0x64, 0x6c, 0x65, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x6e, 0x65, 0x65, 0x64,
|
||||||
0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x07, 0x6e, 0x65, 0x65, 0x64, 0x6c,
|
0x6c, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x04, 0x52, 0x07, 0x6e, 0x65, 0x65, 0x64, 0x6c,
|
||||||
0x65, 0x73, 0x42, 0x24, 0x5a, 0x22, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x74, 0x76, 0x6c, 0x2e, 0x66,
|
0x65, 0x73, 0x42, 0x1e, 0x5a, 0x1c, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x62,
|
||||||
0x79, 0x69, 0x2f, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2d, 0x67, 0x6f,
|
0x75, 0x69, 0x6c, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x62, 0x75, 0x69, 0x6c, 0x64,
|
||||||
0x3b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
})
|
})
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_tvix_build_protos_build_proto_rawDescOnce sync.Once
|
file_snix_build_protos_build_proto_rawDescOnce sync.Once
|
||||||
file_tvix_build_protos_build_proto_rawDescData []byte
|
file_snix_build_protos_build_proto_rawDescData []byte
|
||||||
)
|
)
|
||||||
|
|
||||||
func file_tvix_build_protos_build_proto_rawDescGZIP() []byte {
|
func file_snix_build_protos_build_proto_rawDescGZIP() []byte {
|
||||||
file_tvix_build_protos_build_proto_rawDescOnce.Do(func() {
|
file_snix_build_protos_build_proto_rawDescOnce.Do(func() {
|
||||||
file_tvix_build_protos_build_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_tvix_build_protos_build_proto_rawDesc), len(file_tvix_build_protos_build_proto_rawDesc)))
|
file_snix_build_protos_build_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_snix_build_protos_build_proto_rawDesc), len(file_snix_build_protos_build_proto_rawDesc)))
|
||||||
})
|
})
|
||||||
return file_tvix_build_protos_build_proto_rawDescData
|
return file_snix_build_protos_build_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_tvix_build_protos_build_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
var file_snix_build_protos_build_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||||
var file_tvix_build_protos_build_proto_goTypes = []any{
|
var file_snix_build_protos_build_proto_goTypes = []any{
|
||||||
(*BuildRequest)(nil), // 0: tvix.build.v1.BuildRequest
|
(*BuildRequest)(nil), // 0: snix.build.v1.BuildRequest
|
||||||
(*Build)(nil), // 1: tvix.build.v1.Build
|
(*Build)(nil), // 1: snix.build.v1.Build
|
||||||
(*BuildRequest_EnvVar)(nil), // 2: tvix.build.v1.BuildRequest.EnvVar
|
(*BuildRequest_EnvVar)(nil), // 2: snix.build.v1.BuildRequest.EnvVar
|
||||||
(*BuildRequest_BuildConstraints)(nil), // 3: tvix.build.v1.BuildRequest.BuildConstraints
|
(*BuildRequest_BuildConstraints)(nil), // 3: snix.build.v1.BuildRequest.BuildConstraints
|
||||||
(*BuildRequest_AdditionalFile)(nil), // 4: tvix.build.v1.BuildRequest.AdditionalFile
|
(*BuildRequest_AdditionalFile)(nil), // 4: snix.build.v1.BuildRequest.AdditionalFile
|
||||||
(*Build_OutputNeedles)(nil), // 5: tvix.build.v1.Build.OutputNeedles
|
(*Build_OutputNeedles)(nil), // 5: snix.build.v1.Build.OutputNeedles
|
||||||
(*castore_go.Node)(nil), // 6: tvix.castore.v1.Node
|
(*proto.Node)(nil), // 6: snix.castore.v1.Node
|
||||||
}
|
}
|
||||||
var file_tvix_build_protos_build_proto_depIdxs = []int32{
|
var file_snix_build_protos_build_proto_depIdxs = []int32{
|
||||||
6, // 0: tvix.build.v1.BuildRequest.inputs:type_name -> tvix.castore.v1.Node
|
6, // 0: snix.build.v1.BuildRequest.inputs:type_name -> snix.castore.v1.Node
|
||||||
2, // 1: tvix.build.v1.BuildRequest.environment_vars:type_name -> tvix.build.v1.BuildRequest.EnvVar
|
2, // 1: snix.build.v1.BuildRequest.environment_vars:type_name -> snix.build.v1.BuildRequest.EnvVar
|
||||||
3, // 2: tvix.build.v1.BuildRequest.constraints:type_name -> tvix.build.v1.BuildRequest.BuildConstraints
|
3, // 2: snix.build.v1.BuildRequest.constraints:type_name -> snix.build.v1.BuildRequest.BuildConstraints
|
||||||
4, // 3: tvix.build.v1.BuildRequest.additional_files:type_name -> tvix.build.v1.BuildRequest.AdditionalFile
|
4, // 3: snix.build.v1.BuildRequest.additional_files:type_name -> snix.build.v1.BuildRequest.AdditionalFile
|
||||||
0, // 4: tvix.build.v1.Build.build_request:type_name -> tvix.build.v1.BuildRequest
|
0, // 4: snix.build.v1.Build.build_request:type_name -> snix.build.v1.BuildRequest
|
||||||
6, // 5: tvix.build.v1.Build.outputs:type_name -> tvix.castore.v1.Node
|
6, // 5: snix.build.v1.Build.outputs:type_name -> snix.castore.v1.Node
|
||||||
5, // 6: tvix.build.v1.Build.outputs_needles:type_name -> tvix.build.v1.Build.OutputNeedles
|
5, // 6: snix.build.v1.Build.outputs_needles:type_name -> snix.build.v1.Build.OutputNeedles
|
||||||
7, // [7:7] is the sub-list for method output_type
|
7, // [7:7] is the sub-list for method output_type
|
||||||
7, // [7:7] is the sub-list for method input_type
|
7, // [7:7] is the sub-list for method input_type
|
||||||
7, // [7:7] is the sub-list for extension type_name
|
7, // [7:7] is the sub-list for extension type_name
|
||||||
|
|
@ -646,26 +647,26 @@ var file_tvix_build_protos_build_proto_depIdxs = []int32{
|
||||||
0, // [0:7] is the sub-list for field type_name
|
0, // [0:7] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_tvix_build_protos_build_proto_init() }
|
func init() { file_snix_build_protos_build_proto_init() }
|
||||||
func file_tvix_build_protos_build_proto_init() {
|
func file_snix_build_protos_build_proto_init() {
|
||||||
if File_tvix_build_protos_build_proto != nil {
|
if File_snix_build_protos_build_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_tvix_build_protos_build_proto_rawDesc), len(file_tvix_build_protos_build_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_snix_build_protos_build_proto_rawDesc), len(file_snix_build_protos_build_proto_rawDesc)),
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 6,
|
NumMessages: 6,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
GoTypes: file_tvix_build_protos_build_proto_goTypes,
|
GoTypes: file_snix_build_protos_build_proto_goTypes,
|
||||||
DependencyIndexes: file_tvix_build_protos_build_proto_depIdxs,
|
DependencyIndexes: file_snix_build_protos_build_proto_depIdxs,
|
||||||
MessageInfos: file_tvix_build_protos_build_proto_msgTypes,
|
MessageInfos: file_snix_build_protos_build_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_tvix_build_protos_build_proto = out.File
|
File_snix_build_protos_build_proto = out.File
|
||||||
file_tvix_build_protos_build_proto_goTypes = nil
|
file_snix_build_protos_build_proto_goTypes = nil
|
||||||
file_tvix_build_protos_build_proto_depIdxs = nil
|
file_snix_build_protos_build_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
regenerate = pkgs.writeShellScript "regenerate" ''
|
regenerate = pkgs.writeShellScript "regenerate" ''
|
||||||
(cd $(git rev-parse --show-toplevel)/tvix/build-go && rm *.pb.go && cp ${depot.tvix.build.protos.go-bindings}/*.pb.go . && chmod +w *.pb.go)
|
(cd $(git rev-parse --show-toplevel)/snix/build-go && rm *.pb.go && cp ${depot.snix.build.protos.go-bindings}/*.pb.go . && chmod +w *.pb.go)
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
(pkgs.buildGoModule {
|
(pkgs.buildGoModule {
|
||||||
|
|
@ -18,7 +18,7 @@ in
|
||||||
${regenerate}
|
${regenerate}
|
||||||
if [[ -n "$(git status --porcelain -unormal)" ]]; then
|
if [[ -n "$(git status --porcelain -unormal)" ]]; then
|
||||||
echo "-----------------------------"
|
echo "-----------------------------"
|
||||||
echo ".pb.go files need to be updated, mg run //tvix/build-go/regenerate"
|
echo ".pb.go files need to be updated, mg run //snix/build-go/regenerate"
|
||||||
echo "-----------------------------"
|
echo "-----------------------------"
|
||||||
git status -unormal
|
git status -unormal
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -27,5 +27,7 @@ in
|
||||||
alwaysRun = true;
|
alwaysRun = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
# https://git.snix.dev/snix/snix/issues/60
|
||||||
|
meta.ci.skip = true;
|
||||||
passthru.regenerate = regenerate;
|
passthru.regenerate = regenerate;
|
||||||
})
|
})
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
// Copyright © 2022 The Tvix Authors
|
// Copyright © 2022 The Tvix Authors
|
||||||
|
// Copyright © 2025 The Snix Project
|
||||||
|
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.36.5
|
// protoc-gen-go v1.36.5
|
||||||
// protoc (unknown)
|
// protoc (unknown)
|
||||||
// source: tvix/build/protos/rpc_build.proto
|
// source: snix/build/protos/rpc_build.proto
|
||||||
|
|
||||||
package buildv1
|
package buildv1
|
||||||
|
|
||||||
|
|
@ -23,31 +24,31 @@ const (
|
||||||
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
|
||||||
)
|
)
|
||||||
|
|
||||||
var File_tvix_build_protos_rpc_build_proto protoreflect.FileDescriptor
|
var File_snix_build_protos_rpc_build_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_tvix_build_protos_rpc_build_proto_rawDesc = string([]byte{
|
var file_snix_build_protos_rpc_build_proto_rawDesc = string([]byte{
|
||||||
0x0a, 0x21, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x70, 0x72, 0x6f,
|
0x0a, 0x21, 0x73, 0x6e, 0x69, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x70, 0x72, 0x6f,
|
||||||
0x74, 0x6f, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x70, 0x72,
|
0x74, 0x6f, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x70, 0x72,
|
||||||
0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e,
|
0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e,
|
||||||
0x76, 0x31, 0x1a, 0x1d, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x70,
|
0x76, 0x31, 0x1a, 0x1d, 0x73, 0x6e, 0x69, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x70,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||||
0x6f, 0x32, 0x4c, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
0x6f, 0x32, 0x4c, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63,
|
||||||
0x65, 0x12, 0x3c, 0x0a, 0x07, 0x44, 0x6f, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x1b, 0x2e, 0x74,
|
0x65, 0x12, 0x3c, 0x0a, 0x07, 0x44, 0x6f, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x1b, 0x2e, 0x73,
|
||||||
0x76, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69,
|
0x6e, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69,
|
||||||
0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x74, 0x76, 0x69, 0x78,
|
0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x14, 0x2e, 0x73, 0x6e, 0x69, 0x78,
|
||||||
0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42,
|
0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x42,
|
||||||
0x24, 0x5a, 0x22, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x74, 0x76, 0x6c, 0x2e, 0x66, 0x79, 0x69, 0x2f,
|
0x1e, 0x5a, 0x1c, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x62, 0x75, 0x69, 0x6c,
|
||||||
0x74, 0x76, 0x69, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2d, 0x67, 0x6f, 0x3b, 0x62, 0x75,
|
0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x76, 0x31, 0x62,
|
||||||
0x69, 0x6c, 0x64, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
})
|
})
|
||||||
|
|
||||||
var file_tvix_build_protos_rpc_build_proto_goTypes = []any{
|
var file_snix_build_protos_rpc_build_proto_goTypes = []any{
|
||||||
(*BuildRequest)(nil), // 0: tvix.build.v1.BuildRequest
|
(*BuildRequest)(nil), // 0: snix.build.v1.BuildRequest
|
||||||
(*Build)(nil), // 1: tvix.build.v1.Build
|
(*Build)(nil), // 1: snix.build.v1.Build
|
||||||
}
|
}
|
||||||
var file_tvix_build_protos_rpc_build_proto_depIdxs = []int32{
|
var file_snix_build_protos_rpc_build_proto_depIdxs = []int32{
|
||||||
0, // 0: tvix.build.v1.BuildService.DoBuild:input_type -> tvix.build.v1.BuildRequest
|
0, // 0: snix.build.v1.BuildService.DoBuild:input_type -> snix.build.v1.BuildRequest
|
||||||
1, // 1: tvix.build.v1.BuildService.DoBuild:output_type -> tvix.build.v1.Build
|
1, // 1: snix.build.v1.BuildService.DoBuild:output_type -> snix.build.v1.Build
|
||||||
1, // [1:2] is the sub-list for method output_type
|
1, // [1:2] is the sub-list for method output_type
|
||||||
0, // [0:1] is the sub-list for method input_type
|
0, // [0:1] is the sub-list for method input_type
|
||||||
0, // [0:0] is the sub-list for extension type_name
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
|
|
@ -55,26 +56,26 @@ var file_tvix_build_protos_rpc_build_proto_depIdxs = []int32{
|
||||||
0, // [0:0] is the sub-list for field type_name
|
0, // [0:0] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_tvix_build_protos_rpc_build_proto_init() }
|
func init() { file_snix_build_protos_rpc_build_proto_init() }
|
||||||
func file_tvix_build_protos_rpc_build_proto_init() {
|
func file_snix_build_protos_rpc_build_proto_init() {
|
||||||
if File_tvix_build_protos_rpc_build_proto != nil {
|
if File_snix_build_protos_rpc_build_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_tvix_build_protos_build_proto_init()
|
file_snix_build_protos_build_proto_init()
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_tvix_build_protos_rpc_build_proto_rawDesc), len(file_tvix_build_protos_rpc_build_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_snix_build_protos_rpc_build_proto_rawDesc), len(file_snix_build_protos_rpc_build_proto_rawDesc)),
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 0,
|
NumMessages: 0,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
GoTypes: file_tvix_build_protos_rpc_build_proto_goTypes,
|
GoTypes: file_snix_build_protos_rpc_build_proto_goTypes,
|
||||||
DependencyIndexes: file_tvix_build_protos_rpc_build_proto_depIdxs,
|
DependencyIndexes: file_snix_build_protos_rpc_build_proto_depIdxs,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_tvix_build_protos_rpc_build_proto = out.File
|
File_snix_build_protos_rpc_build_proto = out.File
|
||||||
file_tvix_build_protos_rpc_build_proto_goTypes = nil
|
file_snix_build_protos_rpc_build_proto_goTypes = nil
|
||||||
file_tvix_build_protos_rpc_build_proto_depIdxs = nil
|
file_snix_build_protos_rpc_build_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
// Copyright © 2022 The Tvix Authors
|
// Copyright © 2022 The Tvix Authors
|
||||||
|
// Copyright © 2025 The Snix Project
|
||||||
|
|
||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
// - protoc (unknown)
|
// - protoc (unknown)
|
||||||
// source: tvix/build/protos/rpc_build.proto
|
// source: snix/build/protos/rpc_build.proto
|
||||||
|
|
||||||
package buildv1
|
package buildv1
|
||||||
|
|
||||||
|
|
@ -22,7 +23,7 @@ import (
|
||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
const (
|
const (
|
||||||
BuildService_DoBuild_FullMethodName = "/tvix.build.v1.BuildService/DoBuild"
|
BuildService_DoBuild_FullMethodName = "/snix.build.v1.BuildService/DoBuild"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BuildServiceClient is the client API for BuildService service.
|
// BuildServiceClient is the client API for BuildService service.
|
||||||
|
|
@ -111,7 +112,7 @@ func _BuildService_DoBuild_Handler(srv interface{}, ctx context.Context, dec fun
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
var BuildService_ServiceDesc = grpc.ServiceDesc{
|
var BuildService_ServiceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "tvix.build.v1.BuildService",
|
ServiceName: "snix.build.v1.BuildService",
|
||||||
HandlerType: (*BuildServiceServer)(nil),
|
HandlerType: (*BuildServiceServer)(nil),
|
||||||
Methods: []grpc.MethodDesc{
|
Methods: []grpc.MethodDesc{
|
||||||
{
|
{
|
||||||
|
|
@ -120,5 +121,5 @@ var BuildService_ServiceDesc = grpc.ServiceDesc{
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Streams: []grpc.StreamDesc{},
|
Streams: []grpc.StreamDesc{},
|
||||||
Metadata: "tvix/build/protos/rpc_build.proto",
|
Metadata: "snix/build/protos/rpc_build.proto",
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tvix-build"
|
name = "snix-build"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|
@ -13,7 +13,7 @@ tokio = { workspace = true, features = ["process"] }
|
||||||
tokio-listener = { workspace = true, features = ["tonic012"] }
|
tokio-listener = { workspace = true, features = ["tonic012"] }
|
||||||
tonic = { workspace = true, features = ["tls", "tls-roots"] }
|
tonic = { workspace = true, features = ["tls", "tls-roots"] }
|
||||||
# TODO: put the fuse dep behind a feature flag?
|
# TODO: put the fuse dep behind a feature flag?
|
||||||
tvix-castore = { path = "../castore", features = ["fuse"]}
|
snix-castore = { path = "../castore", features = ["fuse"]}
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
url.workspace = true
|
url.workspace = true
|
||||||
mimalloc.workspace = true
|
mimalloc.workspace = true
|
||||||
|
|
@ -26,7 +26,7 @@ data-encoding = "2.5.0"
|
||||||
futures = "0.3.30"
|
futures = "0.3.30"
|
||||||
oci-spec = "0.7.0"
|
oci-spec = "0.7.0"
|
||||||
serde_json = "1.0.111"
|
serde_json = "1.0.111"
|
||||||
tvix-tracing = { path = "../tracing" }
|
snix-tracing = { path = "../tracing" }
|
||||||
uuid = { version = "1.7.0", features = ["v4"] }
|
uuid = { version = "1.7.0", features = ["v4"] }
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
|
|
@ -35,7 +35,7 @@ tonic-build.workspace = true
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
tonic-reflection = ["dep:tonic-reflection", "tvix-castore/tonic-reflection"]
|
tonic-reflection = ["dep:tonic-reflection", "snix-castore/tonic-reflection"]
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rstest.workspace = true
|
rstest.workspace = true
|
||||||
|
|
@ -7,7 +7,7 @@ fn main() -> Result<()> {
|
||||||
#[cfg(feature = "tonic-reflection")]
|
#[cfg(feature = "tonic-reflection")]
|
||||||
{
|
{
|
||||||
let out_dir = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap());
|
let out_dir = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap());
|
||||||
let descriptor_path = out_dir.join("tvix.build.v1.bin");
|
let descriptor_path = out_dir.join("snix.build.v1.bin");
|
||||||
|
|
||||||
builder = builder.file_descriptor_set_path(descriptor_path);
|
builder = builder.file_descriptor_set_path(descriptor_path);
|
||||||
};
|
};
|
||||||
|
|
@ -17,11 +17,11 @@ fn main() -> Result<()> {
|
||||||
.build_client(true)
|
.build_client(true)
|
||||||
.emit_rerun_if_changed(false)
|
.emit_rerun_if_changed(false)
|
||||||
.bytes(["."])
|
.bytes(["."])
|
||||||
.extern_path(".tvix.castore.v1", "::tvix_castore::proto")
|
.extern_path(".snix.castore.v1", "::snix_castore::proto")
|
||||||
.compile_protos(
|
.compile_protos(
|
||||||
&[
|
&[
|
||||||
"tvix/build/protos/build.proto",
|
"snix/build/protos/build.proto",
|
||||||
"tvix/build/protos/rpc_build.proto",
|
"snix/build/protos/rpc_build.proto",
|
||||||
],
|
],
|
||||||
// If we are in running `cargo build` manually, using `../..` works fine,
|
// If we are in running `cargo build` manually, using `../..` works fine,
|
||||||
// but in case we run inside a nix build, we need to instead point PROTO_ROOT
|
// but in case we run inside a nix build, we need to instead point PROTO_ROOT
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
{ depot, lib, ... }:
|
{ depot, lib, ... }:
|
||||||
|
|
||||||
(depot.tvix.crates.workspaceMembers.tvix-build.build.override {
|
(depot.snix.crates.workspaceMembers.snix-build.build.override {
|
||||||
runTests = true;
|
runTests = true;
|
||||||
}).overrideAttrs (old: rec {
|
}).overrideAttrs (old: rec {
|
||||||
meta.ci.targets = lib.filter (x: lib.hasPrefix "with-features" x || x == "no-features") (lib.attrNames passthru);
|
meta.ci.targets = lib.filter (x: lib.hasPrefix "with-features" x || x == "no-features") (lib.attrNames passthru);
|
||||||
passthru = old.passthru // (depot.tvix.utils.mkFeaturePowerset {
|
passthru = old.passthru // (depot.snix.utils.mkFeaturePowerset {
|
||||||
inherit (old) crateName;
|
inherit (old) crateName;
|
||||||
features = [ "tonic-reflection" ];
|
features = [ "tonic-reflection" ];
|
||||||
});
|
});
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
Copyright © The Tvix Authors
|
Copyright © The Tvix Authors
|
||||||
|
Copyright © The Snix Project
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|
@ -1,13 +1,14 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
// Copyright © 2022 The Tvix Authors
|
// Copyright © 2022 The Tvix Authors
|
||||||
|
// Copyright © 2025 The Snix Project
|
||||||
|
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package tvix.build.v1;
|
package snix.build.v1;
|
||||||
|
|
||||||
import "tvix/castore/protos/castore.proto";
|
import "snix/castore/protos/castore.proto";
|
||||||
|
|
||||||
option go_package = "code.tvl.fyi/tvix/build-go;buildv1";
|
option go_package = "snix.dev/build/proto;buildv1";
|
||||||
|
|
||||||
// A BuildRequest describes the request of something to be run on the builder.
|
// A BuildRequest describes the request of something to be run on the builder.
|
||||||
// It is distinct from an actual [Build] that has already happened, or might be
|
// It is distinct from an actual [Build] that has already happened, or might be
|
||||||
|
|
@ -31,7 +32,7 @@ option go_package = "code.tvl.fyi/tvix/build-go;buildv1";
|
||||||
// to either the input's deriver (and needs to build it) or else a trusted
|
// to either the input's deriver (and needs to build it) or else a trusted
|
||||||
// source for the built input.
|
// source for the built input.
|
||||||
// to upload input-addressed paths, requiring the trusted users concept.
|
// to upload input-addressed paths, requiring the trusted users concept.
|
||||||
// - tvix-build records a list of tvix.castore.v1.Node as inputs.
|
// - snix-build records a list of snix.castore.v1.Node as inputs.
|
||||||
// These map from the store path base name to their contents, relieving the
|
// These map from the store path base name to their contents, relieving the
|
||||||
// builder from having to "trust" any input-addressed paths, contrary to Nix.
|
// builder from having to "trust" any input-addressed paths, contrary to Nix.
|
||||||
//
|
//
|
||||||
|
|
@ -50,7 +51,7 @@ message BuildRequest {
|
||||||
// As all references are content-addressed, no additional signatures are
|
// As all references are content-addressed, no additional signatures are
|
||||||
// needed to substitute / make these available in the build environment.
|
// needed to substitute / make these available in the build environment.
|
||||||
// Inputs MUST be sorted by their names.
|
// Inputs MUST be sorted by their names.
|
||||||
repeated tvix.castore.v1.Node inputs = 1;
|
repeated snix.castore.v1.Node inputs = 1;
|
||||||
|
|
||||||
// The command (and its args) executed as the build script.
|
// The command (and its args) executed as the build script.
|
||||||
// In the case of a Nix derivation, this is usually
|
// In the case of a Nix derivation, this is usually
|
||||||
|
|
@ -160,7 +161,7 @@ message Build {
|
||||||
|
|
||||||
// The outputs that were produced after successfully building.
|
// The outputs that were produced after successfully building.
|
||||||
// They are sorted by their names.
|
// They are sorted by their names.
|
||||||
repeated tvix.castore.v1.Node outputs = 2;
|
repeated snix.castore.v1.Node outputs = 2;
|
||||||
|
|
||||||
message OutputNeedles {
|
message OutputNeedles {
|
||||||
// The numbers are indexing into `refscan_needles` originally specified in the BuildRequest.
|
// The numbers are indexing into `refscan_needles` originally specified in the BuildRequest.
|
||||||
|
|
@ -4,8 +4,8 @@ let
|
||||||
"buf.yaml"
|
"buf.yaml"
|
||||||
"buf.gen.yaml"
|
"buf.gen.yaml"
|
||||||
# We need to include castore.proto (only), as it's referred.
|
# We need to include castore.proto (only), as it's referred.
|
||||||
"^tvix(/castore(/protos(/castore\.proto)?)?)?$"
|
"^snix(/castore(/protos(/castore\.proto)?)?)?$"
|
||||||
"^tvix(/build(/protos(/.*\.proto)?)?)?$"
|
"^snix(/build(/protos(/.*\.proto)?)?)?$"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
depot.nix.readTree.drvTargets {
|
depot.nix.readTree.drvTargets {
|
||||||
|
|
@ -45,7 +45,7 @@ depot.nix.readTree.drvTargets {
|
||||||
buf generate
|
buf generate
|
||||||
|
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp tvix/build/protos/*.pb.go $out/
|
cp snix/build/protos/*.pb.go $out/
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
// Copyright © 2022 The Tvix Authors
|
// Copyright © 2022 The Tvix Authors
|
||||||
|
// Copyright © 2025 The Snix Project
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package tvix.build.v1;
|
package snix.build.v1;
|
||||||
|
|
||||||
import "tvix/build/protos/build.proto";
|
import "snix/build/protos/build.proto";
|
||||||
|
|
||||||
option go_package = "code.tvl.fyi/tvix/build-go;buildv1";
|
option go_package = "snix.dev/build/proto;buildv1";
|
||||||
|
|
||||||
service BuildService {
|
service BuildService {
|
||||||
rpc DoBuild(BuildRequest) returns (Build);
|
rpc DoBuild(BuildRequest) returns (Build);
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
use clap::Parser;
|
use clap::Parser;
|
||||||
use clap::Subcommand;
|
use clap::Subcommand;
|
||||||
|
use snix_build::{
|
||||||
|
buildservice,
|
||||||
|
proto::{build_service_server::BuildServiceServer, GRPCBuildServiceWrapper},
|
||||||
|
};
|
||||||
|
use snix_castore::blobservice;
|
||||||
|
use snix_castore::directoryservice;
|
||||||
use tokio_listener::Listener;
|
use tokio_listener::Listener;
|
||||||
use tokio_listener::SystemOptions;
|
use tokio_listener::SystemOptions;
|
||||||
use tokio_listener::UserOptions;
|
use tokio_listener::UserOptions;
|
||||||
use tonic::{self, transport::Server};
|
use tonic::{self, transport::Server};
|
||||||
use tracing::info;
|
use tracing::info;
|
||||||
use tvix_build::{
|
|
||||||
buildservice,
|
|
||||||
proto::{build_service_server::BuildServiceServer, GRPCBuildServiceWrapper},
|
|
||||||
};
|
|
||||||
use tvix_castore::blobservice;
|
|
||||||
use tvix_castore::directoryservice;
|
|
||||||
|
|
||||||
#[cfg(feature = "tonic-reflection")]
|
#[cfg(feature = "tonic-reflection")]
|
||||||
use tvix_build::proto::FILE_DESCRIPTOR_SET;
|
use snix_build::proto::FILE_DESCRIPTOR_SET;
|
||||||
#[cfg(feature = "tonic-reflection")]
|
#[cfg(feature = "tonic-reflection")]
|
||||||
use tvix_castore::proto::FILE_DESCRIPTOR_SET as CASTORE_FILE_DESCRIPTOR_SET;
|
use snix_castore::proto::FILE_DESCRIPTOR_SET as CASTORE_FILE_DESCRIPTOR_SET;
|
||||||
|
|
||||||
use mimalloc::MiMalloc;
|
use mimalloc::MiMalloc;
|
||||||
|
|
||||||
|
|
@ -30,7 +30,7 @@ struct Cli {
|
||||||
}
|
}
|
||||||
#[derive(Subcommand)]
|
#[derive(Subcommand)]
|
||||||
enum Commands {
|
enum Commands {
|
||||||
/// Runs the tvix-build daemon.
|
/// Runs the snix-build daemon.
|
||||||
Daemon {
|
Daemon {
|
||||||
#[arg(long, short = 'l')]
|
#[arg(long, short = 'l')]
|
||||||
listen_address: Option<String>,
|
listen_address: Option<String>,
|
||||||
|
|
@ -50,7 +50,7 @@ enum Commands {
|
||||||
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||||
let cli = Cli::parse();
|
let cli = Cli::parse();
|
||||||
|
|
||||||
tvix_tracing::TracingBuilder::default()
|
snix_tracing::TracingBuilder::default()
|
||||||
.enable_progressbar()
|
.enable_progressbar()
|
||||||
.build()?;
|
.build()?;
|
||||||
|
|
||||||
|
|
@ -2,7 +2,7 @@ use std::collections::{BTreeMap, HashSet};
|
||||||
use std::path::PathBuf;
|
use std::path::PathBuf;
|
||||||
|
|
||||||
use bytes::Bytes;
|
use bytes::Bytes;
|
||||||
use tvix_castore::{Node, PathComponent};
|
use snix_castore::{Node, PathComponent};
|
||||||
/// A BuildRequest describes the request of something to be run on the builder.
|
/// A BuildRequest describes the request of something to be run on the builder.
|
||||||
/// It is distinct from an actual \[Build\] that has already happened, or might be
|
/// It is distinct from an actual \[Build\] that has already happened, or might be
|
||||||
/// currently ongoing.
|
/// currently ongoing.
|
||||||
|
|
@ -26,7 +26,7 @@ use tvix_castore::{Node, PathComponent};
|
||||||
/// to either the input's deriver (and needs to build it) or else a trusted
|
/// to either the input's deriver (and needs to build it) or else a trusted
|
||||||
/// source for the built input.
|
/// source for the built input.
|
||||||
/// to upload input-addressed paths, requiring the trusted users concept.
|
/// to upload input-addressed paths, requiring the trusted users concept.
|
||||||
/// * tvix-build records a list of tvix.castore.v1.Node as inputs.
|
/// * snix-build records a list of snix.castore.v1.Node as inputs.
|
||||||
/// These map from the store path base name to their contents, relieving the
|
/// These map from the store path base name to their contents, relieving the
|
||||||
/// builder from having to "trust" any input-addressed paths, contrary to Nix.
|
/// builder from having to "trust" any input-addressed paths, contrary to Nix.
|
||||||
///
|
///
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
use super::{grpc::GRPCBuildService, BuildService, DummyBuildService};
|
use super::{grpc::GRPCBuildService, BuildService, DummyBuildService};
|
||||||
use tvix_castore::{blobservice::BlobService, directoryservice::DirectoryService};
|
use snix_castore::{blobservice::BlobService, directoryservice::DirectoryService};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
|
|
@ -48,7 +48,7 @@ where
|
||||||
scheme => {
|
scheme => {
|
||||||
if scheme.starts_with("grpc+") {
|
if scheme.starts_with("grpc+") {
|
||||||
let client = crate::proto::build_service_client::BuildServiceClient::new(
|
let client = crate::proto::build_service_client::BuildServiceClient::new(
|
||||||
tvix_castore::tonic::channel_from_url(&url)
|
snix_castore::tonic::channel_from_url(&url)
|
||||||
.await
|
.await
|
||||||
.map_err(std::io::Error::other)?,
|
.map_err(std::io::Error::other)?,
|
||||||
);
|
);
|
||||||
|
|
@ -69,15 +69,15 @@ where
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::from_addr;
|
use super::from_addr;
|
||||||
use rstest::rstest;
|
use rstest::rstest;
|
||||||
|
use snix_castore::{
|
||||||
|
blobservice::{BlobService, MemoryBlobService},
|
||||||
|
directoryservice::{DirectoryService, MemoryDirectoryService},
|
||||||
|
};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
use std::sync::LazyLock;
|
use std::sync::LazyLock;
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
use tempfile::TempDir;
|
use tempfile::TempDir;
|
||||||
use tvix_castore::{
|
|
||||||
blobservice::{BlobService, MemoryBlobService},
|
|
||||||
directoryservice::{DirectoryService, MemoryDirectoryService},
|
|
||||||
};
|
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
static TMPDIR_OCI_1: LazyLock<TempDir> = LazyLock::new(|| TempDir::new().unwrap());
|
static TMPDIR_OCI_1: LazyLock<TempDir> = LazyLock::new(|| TempDir::new().unwrap());
|
||||||
|
|
@ -1,16 +1,16 @@
|
||||||
use anyhow::Context;
|
use anyhow::Context;
|
||||||
use bstr::BStr;
|
use bstr::BStr;
|
||||||
use oci_spec::runtime::{LinuxIdMapping, LinuxIdMappingBuilder};
|
use oci_spec::runtime::{LinuxIdMapping, LinuxIdMappingBuilder};
|
||||||
use tokio::process::{Child, Command};
|
use snix_castore::{
|
||||||
use tonic::async_trait;
|
|
||||||
use tracing::{debug, instrument, warn, Span};
|
|
||||||
use tvix_castore::{
|
|
||||||
blobservice::BlobService,
|
blobservice::BlobService,
|
||||||
directoryservice::DirectoryService,
|
directoryservice::DirectoryService,
|
||||||
fs::fuse::FuseDaemon,
|
fs::fuse::FuseDaemon,
|
||||||
import::fs::ingest_path,
|
import::fs::ingest_path,
|
||||||
refscan::{ReferencePattern, ReferenceScanner},
|
refscan::{ReferencePattern, ReferenceScanner},
|
||||||
};
|
};
|
||||||
|
use tokio::process::{Child, Command};
|
||||||
|
use tonic::async_trait;
|
||||||
|
use tracing::{debug, instrument, warn, Span};
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
use crate::buildservice::BuildRequest;
|
use crate::buildservice::BuildRequest;
|
||||||
|
|
@ -22,7 +22,7 @@ use std::{ffi::OsStr, path::PathBuf, process::Stdio};
|
||||||
|
|
||||||
use super::BuildService;
|
use super::BuildService;
|
||||||
|
|
||||||
const SANDBOX_SHELL: &str = env!("TVIX_BUILD_SANDBOX_SHELL");
|
const SANDBOX_SHELL: &str = env!("SNIX_BUILD_SANDBOX_SHELL");
|
||||||
const MAX_CONCURRENT_BUILDS: usize = 2; // TODO: make configurable
|
const MAX_CONCURRENT_BUILDS: usize = 2; // TODO: make configurable
|
||||||
|
|
||||||
pub struct OCIBuildService<BS, DS> {
|
pub struct OCIBuildService<BS, DS> {
|
||||||
|
|
@ -127,7 +127,7 @@ where
|
||||||
.context("failed to calculate host output paths")
|
.context("failed to calculate host output paths")
|
||||||
.map_err(std::io::Error::other)?;
|
.map_err(std::io::Error::other)?;
|
||||||
|
|
||||||
// assemble a BTreeMap of Nodes to pass into TvixStoreFs.
|
// assemble a BTreeMap of Nodes to pass into SnixStoreFs.
|
||||||
let patterns = ReferencePattern::new(request.refscan_needles.clone());
|
let patterns = ReferencePattern::new(request.refscan_needles.clone());
|
||||||
// NOTE: impl Drop for FuseDaemon unmounts, so if the call is cancelled, umount.
|
// NOTE: impl Drop for FuseDaemon unmounts, so if the call is cancelled, umount.
|
||||||
let _fuse_daemon = tokio::task::spawn_blocking({
|
let _fuse_daemon = tokio::task::spawn_blocking({
|
||||||
|
|
@ -138,7 +138,7 @@ where
|
||||||
|
|
||||||
let root_nodes = Box::new(request.inputs.clone());
|
let root_nodes = Box::new(request.inputs.clone());
|
||||||
move || {
|
move || {
|
||||||
let fs = tvix_castore::fs::TvixStoreFs::new(
|
let fs = snix_castore::fs::SnixStoreFs::new(
|
||||||
blob_service,
|
blob_service,
|
||||||
directory_service,
|
directory_service,
|
||||||
root_nodes,
|
root_nodes,
|
||||||
|
|
@ -216,7 +216,7 @@ where
|
||||||
};
|
};
|
||||||
|
|
||||||
Ok::<_, std::io::Error>((
|
Ok::<_, std::io::Error>((
|
||||||
tvix_castore::proto::Node::from_name_and_node(
|
snix_castore::proto::Node::from_name_and_node(
|
||||||
output_path
|
output_path
|
||||||
.file_name()
|
.file_name()
|
||||||
.and_then(|s| s.to_str())
|
.and_then(|s| s.to_str())
|
||||||
|
|
@ -225,7 +225,7 @@ fn configure_mounts<'a>(
|
||||||
rootless: bool,
|
rootless: bool,
|
||||||
allow_network: bool,
|
allow_network: bool,
|
||||||
scratch_paths: impl IntoIterator<Item = &'a Path>,
|
scratch_paths: impl IntoIterator<Item = &'a Path>,
|
||||||
inputs: impl Iterator<Item = (&'a tvix_castore::PathComponent, &'a tvix_castore::Node)>,
|
inputs: impl Iterator<Item = (&'a snix_castore::PathComponent, &'a snix_castore::Node)>,
|
||||||
|
|
||||||
inputs_dir: &Path,
|
inputs_dir: &Path,
|
||||||
ro_host_mounts: impl IntoIterator<Item = (&'a Path, &'a Path)>,
|
ro_host_mounts: impl IntoIterator<Item = (&'a Path, &'a Path)>,
|
||||||
|
|
@ -2,19 +2,19 @@ use std::collections::{BTreeMap, HashSet};
|
||||||
use std::path::{Path, PathBuf};
|
use std::path::{Path, PathBuf};
|
||||||
|
|
||||||
use itertools::Itertools;
|
use itertools::Itertools;
|
||||||
use tvix_castore::{DirectoryError, Node, PathComponent};
|
use snix_castore::{DirectoryError, Node, PathComponent};
|
||||||
|
|
||||||
mod grpc_buildservice_wrapper;
|
mod grpc_buildservice_wrapper;
|
||||||
|
|
||||||
pub use grpc_buildservice_wrapper::GRPCBuildServiceWrapper;
|
pub use grpc_buildservice_wrapper::GRPCBuildServiceWrapper;
|
||||||
|
|
||||||
tonic::include_proto!("tvix.build.v1");
|
tonic::include_proto!("snix.build.v1");
|
||||||
|
|
||||||
#[cfg(feature = "tonic-reflection")]
|
#[cfg(feature = "tonic-reflection")]
|
||||||
/// Compiled file descriptors for implementing [gRPC
|
/// Compiled file descriptors for implementing [gRPC
|
||||||
/// reflection](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md) with e.g.
|
/// reflection](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md) with e.g.
|
||||||
/// [`tonic_reflection`](https://docs.rs/tonic-reflection).
|
/// [`tonic_reflection`](https://docs.rs/tonic-reflection).
|
||||||
pub const FILE_DESCRIPTOR_SET: &[u8] = tonic::include_file_descriptor_set!("tvix.build.v1");
|
pub const FILE_DESCRIPTOR_SET: &[u8] = tonic::include_file_descriptor_set!("snix.build.v1");
|
||||||
|
|
||||||
/// Errors that occur during the validation of [BuildRequest] messages.
|
/// Errors that occur during the validation of [BuildRequest] messages.
|
||||||
#[derive(Debug, thiserror::Error)]
|
#[derive(Debug, thiserror::Error)]
|
||||||
|
|
@ -120,7 +120,7 @@ where
|
||||||
|
|
||||||
fn path_to_string(path: &Path) -> String {
|
fn path_to_string(path: &Path) -> String {
|
||||||
path.to_str()
|
path.to_str()
|
||||||
.expect("Tvix Bug: unable to convert Path to String")
|
.expect("Snix Bug: unable to convert Path to String")
|
||||||
.to_string()
|
.to_string()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -149,7 +149,7 @@ impl From<crate::buildservice::BuildRequest> for BuildRequest {
|
||||||
.inputs
|
.inputs
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|(name, node)| {
|
.map(|(name, node)| {
|
||||||
tvix_castore::proto::Node::from_name_and_node(name.into(), node)
|
snix_castore::proto::Node::from_name_and_node(name.into(), node)
|
||||||
})
|
})
|
||||||
.collect(),
|
.collect(),
|
||||||
command_args: value.command_args,
|
command_args: value.command_args,
|
||||||
|
|
@ -311,7 +311,7 @@ impl From<crate::buildservice::AdditionalFile> for build_request::AdditionalFile
|
||||||
path: value
|
path: value
|
||||||
.path
|
.path
|
||||||
.to_str()
|
.to_str()
|
||||||
.expect("Tvix bug: expected a valid path")
|
.expect("Snix bug: expected a valid path")
|
||||||
.to_string(),
|
.to_string(),
|
||||||
contents: value.contents,
|
contents: value.contents,
|
||||||
}
|
}
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
Copyright © The Tvix Authors
|
Copyright © The Tvix Authors
|
||||||
|
Copyright © The Snix Project
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
# castore-go
|
# castore-go
|
||||||
|
|
||||||
This directory contains generated golang bindings, both for the `tvix-castore`
|
This directory contains generated golang bindings, both for the `snix-castore`
|
||||||
data models, as well as the gRPC bindings.
|
data models, as well as the gRPC bindings.
|
||||||
|
|
||||||
They are generated with `mg run //tvix:castore-go:regenerate`.
|
They are generated with `mg run //snix/castore-go:regenerate`.
|
||||||
These files end with `.pb.go`, and are ensured to be up to date by a CI check.
|
These files end with `.pb.go`, and are ensured to be up to date by a CI check.
|
||||||
|
|
||||||
Additionally, code useful when interacting with these data structures
|
Additionally, code useful when interacting with these data structures
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
// SPDX-FileCopyrightText: edef <edef@unfathomable.blue>
|
// SPDX-FileCopyrightText: edef <edef@unfathomable.blue>
|
||||||
// SPDX-License-Identifier: OSL-3.0 OR MIT OR Apache-2.0
|
// SPDX-License-Identifier: OSL-3.0 OR MIT OR Apache-2.0
|
||||||
|
// Copyright © 2025 The Snix Project
|
||||||
|
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.36.5
|
// protoc-gen-go v1.36.5
|
||||||
// protoc (unknown)
|
// protoc (unknown)
|
||||||
// source: tvix/castore/protos/castore.proto
|
// source: snix/castore/protos/castore.proto
|
||||||
|
|
||||||
package castorev1
|
package castorev1
|
||||||
|
|
||||||
|
|
@ -45,7 +46,7 @@ type Directory struct {
|
||||||
|
|
||||||
func (x *Directory) Reset() {
|
func (x *Directory) Reset() {
|
||||||
*x = Directory{}
|
*x = Directory{}
|
||||||
mi := &file_tvix_castore_protos_castore_proto_msgTypes[0]
|
mi := &file_snix_castore_protos_castore_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -57,7 +58,7 @@ func (x *Directory) String() string {
|
||||||
func (*Directory) ProtoMessage() {}
|
func (*Directory) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *Directory) ProtoReflect() protoreflect.Message {
|
func (x *Directory) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_castore_protos_castore_proto_msgTypes[0]
|
mi := &file_snix_castore_protos_castore_proto_msgTypes[0]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -70,7 +71,7 @@ func (x *Directory) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use Directory.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Directory.ProtoReflect.Descriptor instead.
|
||||||
func (*Directory) Descriptor() ([]byte, []int) {
|
func (*Directory) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_castore_protos_castore_proto_rawDescGZIP(), []int{0}
|
return file_snix_castore_protos_castore_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Directory) GetDirectories() []*DirectoryNode {
|
func (x *Directory) GetDirectories() []*DirectoryNode {
|
||||||
|
|
@ -118,7 +119,7 @@ type DirectoryNode struct {
|
||||||
|
|
||||||
func (x *DirectoryNode) Reset() {
|
func (x *DirectoryNode) Reset() {
|
||||||
*x = DirectoryNode{}
|
*x = DirectoryNode{}
|
||||||
mi := &file_tvix_castore_protos_castore_proto_msgTypes[1]
|
mi := &file_snix_castore_protos_castore_proto_msgTypes[1]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -130,7 +131,7 @@ func (x *DirectoryNode) String() string {
|
||||||
func (*DirectoryNode) ProtoMessage() {}
|
func (*DirectoryNode) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *DirectoryNode) ProtoReflect() protoreflect.Message {
|
func (x *DirectoryNode) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_castore_protos_castore_proto_msgTypes[1]
|
mi := &file_snix_castore_protos_castore_proto_msgTypes[1]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -143,7 +144,7 @@ func (x *DirectoryNode) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use DirectoryNode.ProtoReflect.Descriptor instead.
|
// Deprecated: Use DirectoryNode.ProtoReflect.Descriptor instead.
|
||||||
func (*DirectoryNode) Descriptor() ([]byte, []int) {
|
func (*DirectoryNode) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_castore_protos_castore_proto_rawDescGZIP(), []int{1}
|
return file_snix_castore_protos_castore_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *DirectoryNode) GetName() []byte {
|
func (x *DirectoryNode) GetName() []byte {
|
||||||
|
|
@ -184,7 +185,7 @@ type FileNode struct {
|
||||||
|
|
||||||
func (x *FileNode) Reset() {
|
func (x *FileNode) Reset() {
|
||||||
*x = FileNode{}
|
*x = FileNode{}
|
||||||
mi := &file_tvix_castore_protos_castore_proto_msgTypes[2]
|
mi := &file_snix_castore_protos_castore_proto_msgTypes[2]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -196,7 +197,7 @@ func (x *FileNode) String() string {
|
||||||
func (*FileNode) ProtoMessage() {}
|
func (*FileNode) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *FileNode) ProtoReflect() protoreflect.Message {
|
func (x *FileNode) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_castore_protos_castore_proto_msgTypes[2]
|
mi := &file_snix_castore_protos_castore_proto_msgTypes[2]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -209,7 +210,7 @@ func (x *FileNode) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use FileNode.ProtoReflect.Descriptor instead.
|
// Deprecated: Use FileNode.ProtoReflect.Descriptor instead.
|
||||||
func (*FileNode) Descriptor() ([]byte, []int) {
|
func (*FileNode) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_castore_protos_castore_proto_rawDescGZIP(), []int{2}
|
return file_snix_castore_protos_castore_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *FileNode) GetName() []byte {
|
func (x *FileNode) GetName() []byte {
|
||||||
|
|
@ -253,7 +254,7 @@ type SymlinkNode struct {
|
||||||
|
|
||||||
func (x *SymlinkNode) Reset() {
|
func (x *SymlinkNode) Reset() {
|
||||||
*x = SymlinkNode{}
|
*x = SymlinkNode{}
|
||||||
mi := &file_tvix_castore_protos_castore_proto_msgTypes[3]
|
mi := &file_snix_castore_protos_castore_proto_msgTypes[3]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -265,7 +266,7 @@ func (x *SymlinkNode) String() string {
|
||||||
func (*SymlinkNode) ProtoMessage() {}
|
func (*SymlinkNode) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *SymlinkNode) ProtoReflect() protoreflect.Message {
|
func (x *SymlinkNode) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_castore_protos_castore_proto_msgTypes[3]
|
mi := &file_snix_castore_protos_castore_proto_msgTypes[3]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -278,7 +279,7 @@ func (x *SymlinkNode) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use SymlinkNode.ProtoReflect.Descriptor instead.
|
// Deprecated: Use SymlinkNode.ProtoReflect.Descriptor instead.
|
||||||
func (*SymlinkNode) Descriptor() ([]byte, []int) {
|
func (*SymlinkNode) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_castore_protos_castore_proto_rawDescGZIP(), []int{3}
|
return file_snix_castore_protos_castore_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *SymlinkNode) GetName() []byte {
|
func (x *SymlinkNode) GetName() []byte {
|
||||||
|
|
@ -310,7 +311,7 @@ type Node struct {
|
||||||
|
|
||||||
func (x *Node) Reset() {
|
func (x *Node) Reset() {
|
||||||
*x = Node{}
|
*x = Node{}
|
||||||
mi := &file_tvix_castore_protos_castore_proto_msgTypes[4]
|
mi := &file_snix_castore_protos_castore_proto_msgTypes[4]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -322,7 +323,7 @@ func (x *Node) String() string {
|
||||||
func (*Node) ProtoMessage() {}
|
func (*Node) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *Node) ProtoReflect() protoreflect.Message {
|
func (x *Node) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_castore_protos_castore_proto_msgTypes[4]
|
mi := &file_snix_castore_protos_castore_proto_msgTypes[4]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -335,7 +336,7 @@ func (x *Node) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use Node.ProtoReflect.Descriptor instead.
|
// Deprecated: Use Node.ProtoReflect.Descriptor instead.
|
||||||
func (*Node) Descriptor() ([]byte, []int) {
|
func (*Node) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_castore_protos_castore_proto_rawDescGZIP(), []int{4}
|
return file_snix_castore_protos_castore_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *Node) GetNode() isNode_Node {
|
func (x *Node) GetNode() isNode_Node {
|
||||||
|
|
@ -394,22 +395,22 @@ func (*Node_File) isNode_Node() {}
|
||||||
|
|
||||||
func (*Node_Symlink) isNode_Node() {}
|
func (*Node_Symlink) isNode_Node() {}
|
||||||
|
|
||||||
var File_tvix_castore_protos_castore_proto protoreflect.FileDescriptor
|
var File_snix_castore_protos_castore_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_tvix_castore_protos_castore_proto_rawDesc = string([]byte{
|
var file_snix_castore_protos_castore_proto_rawDesc = string([]byte{
|
||||||
0x0a, 0x21, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70,
|
0x0a, 0x21, 0x73, 0x6e, 0x69, 0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72,
|
0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72,
|
||||||
0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72,
|
0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72,
|
||||||
0x65, 0x2e, 0x76, 0x31, 0x22, 0xb8, 0x01, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f,
|
0x65, 0x2e, 0x76, 0x31, 0x22, 0xb8, 0x01, 0x0a, 0x09, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f,
|
||||||
0x72, 0x79, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x69, 0x65,
|
0x72, 0x79, 0x12, 0x40, 0x0a, 0x0b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x69, 0x65,
|
||||||
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63,
|
0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63,
|
||||||
0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74,
|
0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74,
|
||||||
0x6f, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f,
|
0x6f, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x0b, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f,
|
||||||
0x72, 0x69, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20,
|
0x72, 0x69, 0x65, 0x73, 0x12, 0x2f, 0x0a, 0x05, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x02, 0x20,
|
||||||
0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f,
|
0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f,
|
||||||
0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05,
|
0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05,
|
||||||
0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x08, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b,
|
0x66, 0x69, 0x6c, 0x65, 0x73, 0x12, 0x38, 0x0a, 0x08, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b,
|
||||||
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63,
|
0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63,
|
||||||
0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e,
|
0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e,
|
||||||
0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x22,
|
0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x08, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x73, 0x22,
|
||||||
0x4f, 0x0a, 0x0d, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65,
|
0x4f, 0x0a, 0x0d, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65,
|
||||||
|
|
@ -429,49 +430,48 @@ var file_tvix_castore_protos_castore_proto_rawDesc = string([]byte{
|
||||||
0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
|
||||||
0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0xb9, 0x01, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65,
|
0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0xb9, 0x01, 0x0a, 0x04, 0x4e, 0x6f, 0x64, 0x65,
|
||||||
0x12, 0x3e, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20,
|
0x12, 0x3e, 0x0a, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20,
|
||||||
0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f,
|
0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f,
|
||||||
0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x4e,
|
0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x4e,
|
||||||
0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79,
|
0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x09, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79,
|
||||||
0x12, 0x2f, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
|
0x12, 0x2f, 0x0a, 0x04, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19,
|
||||||
0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31,
|
0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31,
|
||||||
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c,
|
0x2e, 0x46, 0x69, 0x6c, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x04, 0x66, 0x69, 0x6c,
|
||||||
0x65, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01,
|
0x65, 0x12, 0x38, 0x0a, 0x07, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x03, 0x20, 0x01,
|
||||||
0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72,
|
0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72,
|
||||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65,
|
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x4e, 0x6f, 0x64, 0x65,
|
||||||
0x48, 0x00, 0x52, 0x07, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x42, 0x06, 0x0a, 0x04, 0x6e,
|
0x48, 0x00, 0x52, 0x07, 0x73, 0x79, 0x6d, 0x6c, 0x69, 0x6e, 0x6b, 0x42, 0x06, 0x0a, 0x04, 0x6e,
|
||||||
0x6f, 0x64, 0x65, 0x42, 0x28, 0x5a, 0x26, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x74, 0x76, 0x6c, 0x2e,
|
0x6f, 0x64, 0x65, 0x42, 0x22, 0x5a, 0x20, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x64, 0x65, 0x76, 0x2f,
|
||||||
0x66, 0x79, 0x69, 0x2f, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65,
|
0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x61,
|
||||||
0x2d, 0x67, 0x6f, 0x3b, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x76, 0x31, 0x62, 0x06, 0x70,
|
0x73, 0x74, 0x6f, 0x72, 0x65, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_tvix_castore_protos_castore_proto_rawDescOnce sync.Once
|
file_snix_castore_protos_castore_proto_rawDescOnce sync.Once
|
||||||
file_tvix_castore_protos_castore_proto_rawDescData []byte
|
file_snix_castore_protos_castore_proto_rawDescData []byte
|
||||||
)
|
)
|
||||||
|
|
||||||
func file_tvix_castore_protos_castore_proto_rawDescGZIP() []byte {
|
func file_snix_castore_protos_castore_proto_rawDescGZIP() []byte {
|
||||||
file_tvix_castore_protos_castore_proto_rawDescOnce.Do(func() {
|
file_snix_castore_protos_castore_proto_rawDescOnce.Do(func() {
|
||||||
file_tvix_castore_protos_castore_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_tvix_castore_protos_castore_proto_rawDesc), len(file_tvix_castore_protos_castore_proto_rawDesc)))
|
file_snix_castore_protos_castore_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_snix_castore_protos_castore_proto_rawDesc), len(file_snix_castore_protos_castore_proto_rawDesc)))
|
||||||
})
|
})
|
||||||
return file_tvix_castore_protos_castore_proto_rawDescData
|
return file_snix_castore_protos_castore_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_tvix_castore_protos_castore_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
var file_snix_castore_protos_castore_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||||
var file_tvix_castore_protos_castore_proto_goTypes = []any{
|
var file_snix_castore_protos_castore_proto_goTypes = []any{
|
||||||
(*Directory)(nil), // 0: tvix.castore.v1.Directory
|
(*Directory)(nil), // 0: snix.castore.v1.Directory
|
||||||
(*DirectoryNode)(nil), // 1: tvix.castore.v1.DirectoryNode
|
(*DirectoryNode)(nil), // 1: snix.castore.v1.DirectoryNode
|
||||||
(*FileNode)(nil), // 2: tvix.castore.v1.FileNode
|
(*FileNode)(nil), // 2: snix.castore.v1.FileNode
|
||||||
(*SymlinkNode)(nil), // 3: tvix.castore.v1.SymlinkNode
|
(*SymlinkNode)(nil), // 3: snix.castore.v1.SymlinkNode
|
||||||
(*Node)(nil), // 4: tvix.castore.v1.Node
|
(*Node)(nil), // 4: snix.castore.v1.Node
|
||||||
}
|
}
|
||||||
var file_tvix_castore_protos_castore_proto_depIdxs = []int32{
|
var file_snix_castore_protos_castore_proto_depIdxs = []int32{
|
||||||
1, // 0: tvix.castore.v1.Directory.directories:type_name -> tvix.castore.v1.DirectoryNode
|
1, // 0: snix.castore.v1.Directory.directories:type_name -> snix.castore.v1.DirectoryNode
|
||||||
2, // 1: tvix.castore.v1.Directory.files:type_name -> tvix.castore.v1.FileNode
|
2, // 1: snix.castore.v1.Directory.files:type_name -> snix.castore.v1.FileNode
|
||||||
3, // 2: tvix.castore.v1.Directory.symlinks:type_name -> tvix.castore.v1.SymlinkNode
|
3, // 2: snix.castore.v1.Directory.symlinks:type_name -> snix.castore.v1.SymlinkNode
|
||||||
1, // 3: tvix.castore.v1.Node.directory:type_name -> tvix.castore.v1.DirectoryNode
|
1, // 3: snix.castore.v1.Node.directory:type_name -> snix.castore.v1.DirectoryNode
|
||||||
2, // 4: tvix.castore.v1.Node.file:type_name -> tvix.castore.v1.FileNode
|
2, // 4: snix.castore.v1.Node.file:type_name -> snix.castore.v1.FileNode
|
||||||
3, // 5: tvix.castore.v1.Node.symlink:type_name -> tvix.castore.v1.SymlinkNode
|
3, // 5: snix.castore.v1.Node.symlink:type_name -> snix.castore.v1.SymlinkNode
|
||||||
6, // [6:6] is the sub-list for method output_type
|
6, // [6:6] is the sub-list for method output_type
|
||||||
6, // [6:6] is the sub-list for method input_type
|
6, // [6:6] is the sub-list for method input_type
|
||||||
6, // [6:6] is the sub-list for extension type_name
|
6, // [6:6] is the sub-list for extension type_name
|
||||||
|
|
@ -479,12 +479,12 @@ var file_tvix_castore_protos_castore_proto_depIdxs = []int32{
|
||||||
0, // [0:6] is the sub-list for field type_name
|
0, // [0:6] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_tvix_castore_protos_castore_proto_init() }
|
func init() { file_snix_castore_protos_castore_proto_init() }
|
||||||
func file_tvix_castore_protos_castore_proto_init() {
|
func file_snix_castore_protos_castore_proto_init() {
|
||||||
if File_tvix_castore_protos_castore_proto != nil {
|
if File_snix_castore_protos_castore_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_tvix_castore_protos_castore_proto_msgTypes[4].OneofWrappers = []any{
|
file_snix_castore_protos_castore_proto_msgTypes[4].OneofWrappers = []any{
|
||||||
(*Node_Directory)(nil),
|
(*Node_Directory)(nil),
|
||||||
(*Node_File)(nil),
|
(*Node_File)(nil),
|
||||||
(*Node_Symlink)(nil),
|
(*Node_Symlink)(nil),
|
||||||
|
|
@ -493,17 +493,17 @@ func file_tvix_castore_protos_castore_proto_init() {
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_tvix_castore_protos_castore_proto_rawDesc), len(file_tvix_castore_protos_castore_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_snix_castore_protos_castore_proto_rawDesc), len(file_snix_castore_protos_castore_proto_rawDesc)),
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 5,
|
NumMessages: 5,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 0,
|
NumServices: 0,
|
||||||
},
|
},
|
||||||
GoTypes: file_tvix_castore_protos_castore_proto_goTypes,
|
GoTypes: file_snix_castore_protos_castore_proto_goTypes,
|
||||||
DependencyIndexes: file_tvix_castore_protos_castore_proto_depIdxs,
|
DependencyIndexes: file_snix_castore_protos_castore_proto_depIdxs,
|
||||||
MessageInfos: file_tvix_castore_protos_castore_proto_msgTypes,
|
MessageInfos: file_snix_castore_protos_castore_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_tvix_castore_protos_castore_proto = out.File
|
File_snix_castore_protos_castore_proto = out.File
|
||||||
file_tvix_castore_protos_castore_proto_goTypes = nil
|
file_snix_castore_protos_castore_proto_goTypes = nil
|
||||||
file_tvix_castore_protos_castore_proto_depIdxs = nil
|
file_snix_castore_protos_castore_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
|
|
@ -3,8 +3,8 @@ package castorev1_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
castorev1pb "code.tvl.fyi/tvix/castore-go"
|
|
||||||
"github.com/stretchr/testify/assert"
|
"github.com/stretchr/testify/assert"
|
||||||
|
castorev1pb "snix.dev/castore/proto"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
let
|
let
|
||||||
regenerate = pkgs.writeShellScript "regenerate" ''
|
regenerate = pkgs.writeShellScript "regenerate" ''
|
||||||
(cd $(git rev-parse --show-toplevel)/tvix/castore-go && rm *.pb.go && cp ${depot.tvix.castore.protos.go-bindings}/*.pb.go . && chmod +w *.pb.go)
|
(cd $(git rev-parse --show-toplevel)/snix/castore-go && rm *.pb.go && cp ${depot.snix.castore.protos.go-bindings}/*.pb.go . && chmod +w *.pb.go)
|
||||||
'';
|
'';
|
||||||
in
|
in
|
||||||
(pkgs.buildGoModule {
|
(pkgs.buildGoModule {
|
||||||
|
|
@ -18,7 +18,7 @@ in
|
||||||
${regenerate}
|
${regenerate}
|
||||||
if [[ -n "$(git status --porcelain -unormal)" ]]; then
|
if [[ -n "$(git status --porcelain -unormal)" ]]; then
|
||||||
echo "-----------------------------"
|
echo "-----------------------------"
|
||||||
echo ".pb.go files need to be updated, mg run //tvix/castore-go/regenerate"
|
echo ".pb.go files need to be updated, mg run //snix/castore-go/regenerate"
|
||||||
echo "-----------------------------"
|
echo "-----------------------------"
|
||||||
git status -unormal
|
git status -unormal
|
||||||
exit 1
|
exit 1
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
module code.tvl.fyi/tvix/castore-go
|
module snix.dev/castore/proto
|
||||||
|
|
||||||
go 1.22
|
go 1.22
|
||||||
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
// Copyright © 2022 The Tvix Authors
|
// Copyright © 2022 The Tvix Authors
|
||||||
|
// Copyright © 2025 The Snix Project
|
||||||
|
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.36.5
|
// protoc-gen-go v1.36.5
|
||||||
// protoc (unknown)
|
// protoc (unknown)
|
||||||
// source: tvix/castore/protos/rpc_blobstore.proto
|
// source: snix/castore/protos/rpc_blobstore.proto
|
||||||
|
|
||||||
package castorev1
|
package castorev1
|
||||||
|
|
||||||
|
|
@ -38,7 +39,7 @@ type StatBlobRequest struct {
|
||||||
|
|
||||||
func (x *StatBlobRequest) Reset() {
|
func (x *StatBlobRequest) Reset() {
|
||||||
*x = StatBlobRequest{}
|
*x = StatBlobRequest{}
|
||||||
mi := &file_tvix_castore_protos_rpc_blobstore_proto_msgTypes[0]
|
mi := &file_snix_castore_protos_rpc_blobstore_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -50,7 +51,7 @@ func (x *StatBlobRequest) String() string {
|
||||||
func (*StatBlobRequest) ProtoMessage() {}
|
func (*StatBlobRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *StatBlobRequest) ProtoReflect() protoreflect.Message {
|
func (x *StatBlobRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_castore_protos_rpc_blobstore_proto_msgTypes[0]
|
mi := &file_snix_castore_protos_rpc_blobstore_proto_msgTypes[0]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -63,7 +64,7 @@ func (x *StatBlobRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use StatBlobRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use StatBlobRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*StatBlobRequest) Descriptor() ([]byte, []int) {
|
func (*StatBlobRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_castore_protos_rpc_blobstore_proto_rawDescGZIP(), []int{0}
|
return file_snix_castore_protos_rpc_blobstore_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *StatBlobRequest) GetDigest() []byte {
|
func (x *StatBlobRequest) GetDigest() []byte {
|
||||||
|
|
@ -102,7 +103,7 @@ type StatBlobResponse struct {
|
||||||
|
|
||||||
func (x *StatBlobResponse) Reset() {
|
func (x *StatBlobResponse) Reset() {
|
||||||
*x = StatBlobResponse{}
|
*x = StatBlobResponse{}
|
||||||
mi := &file_tvix_castore_protos_rpc_blobstore_proto_msgTypes[1]
|
mi := &file_snix_castore_protos_rpc_blobstore_proto_msgTypes[1]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -114,7 +115,7 @@ func (x *StatBlobResponse) String() string {
|
||||||
func (*StatBlobResponse) ProtoMessage() {}
|
func (*StatBlobResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *StatBlobResponse) ProtoReflect() protoreflect.Message {
|
func (x *StatBlobResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_castore_protos_rpc_blobstore_proto_msgTypes[1]
|
mi := &file_snix_castore_protos_rpc_blobstore_proto_msgTypes[1]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -127,7 +128,7 @@ func (x *StatBlobResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use StatBlobResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use StatBlobResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*StatBlobResponse) Descriptor() ([]byte, []int) {
|
func (*StatBlobResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_castore_protos_rpc_blobstore_proto_rawDescGZIP(), []int{1}
|
return file_snix_castore_protos_rpc_blobstore_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *StatBlobResponse) GetChunks() []*StatBlobResponse_ChunkMeta {
|
func (x *StatBlobResponse) GetChunks() []*StatBlobResponse_ChunkMeta {
|
||||||
|
|
@ -154,7 +155,7 @@ type ReadBlobRequest struct {
|
||||||
|
|
||||||
func (x *ReadBlobRequest) Reset() {
|
func (x *ReadBlobRequest) Reset() {
|
||||||
*x = ReadBlobRequest{}
|
*x = ReadBlobRequest{}
|
||||||
mi := &file_tvix_castore_protos_rpc_blobstore_proto_msgTypes[2]
|
mi := &file_snix_castore_protos_rpc_blobstore_proto_msgTypes[2]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -166,7 +167,7 @@ func (x *ReadBlobRequest) String() string {
|
||||||
func (*ReadBlobRequest) ProtoMessage() {}
|
func (*ReadBlobRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *ReadBlobRequest) ProtoReflect() protoreflect.Message {
|
func (x *ReadBlobRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_castore_protos_rpc_blobstore_proto_msgTypes[2]
|
mi := &file_snix_castore_protos_rpc_blobstore_proto_msgTypes[2]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -179,7 +180,7 @@ func (x *ReadBlobRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use ReadBlobRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use ReadBlobRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*ReadBlobRequest) Descriptor() ([]byte, []int) {
|
func (*ReadBlobRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_castore_protos_rpc_blobstore_proto_rawDescGZIP(), []int{2}
|
return file_snix_castore_protos_rpc_blobstore_proto_rawDescGZIP(), []int{2}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *ReadBlobRequest) GetDigest() []byte {
|
func (x *ReadBlobRequest) GetDigest() []byte {
|
||||||
|
|
@ -200,7 +201,7 @@ type BlobChunk struct {
|
||||||
|
|
||||||
func (x *BlobChunk) Reset() {
|
func (x *BlobChunk) Reset() {
|
||||||
*x = BlobChunk{}
|
*x = BlobChunk{}
|
||||||
mi := &file_tvix_castore_protos_rpc_blobstore_proto_msgTypes[3]
|
mi := &file_snix_castore_protos_rpc_blobstore_proto_msgTypes[3]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -212,7 +213,7 @@ func (x *BlobChunk) String() string {
|
||||||
func (*BlobChunk) ProtoMessage() {}
|
func (*BlobChunk) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *BlobChunk) ProtoReflect() protoreflect.Message {
|
func (x *BlobChunk) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_castore_protos_rpc_blobstore_proto_msgTypes[3]
|
mi := &file_snix_castore_protos_rpc_blobstore_proto_msgTypes[3]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -225,7 +226,7 @@ func (x *BlobChunk) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use BlobChunk.ProtoReflect.Descriptor instead.
|
// Deprecated: Use BlobChunk.ProtoReflect.Descriptor instead.
|
||||||
func (*BlobChunk) Descriptor() ([]byte, []int) {
|
func (*BlobChunk) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_castore_protos_rpc_blobstore_proto_rawDescGZIP(), []int{3}
|
return file_snix_castore_protos_rpc_blobstore_proto_rawDescGZIP(), []int{3}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *BlobChunk) GetData() []byte {
|
func (x *BlobChunk) GetData() []byte {
|
||||||
|
|
@ -245,7 +246,7 @@ type PutBlobResponse struct {
|
||||||
|
|
||||||
func (x *PutBlobResponse) Reset() {
|
func (x *PutBlobResponse) Reset() {
|
||||||
*x = PutBlobResponse{}
|
*x = PutBlobResponse{}
|
||||||
mi := &file_tvix_castore_protos_rpc_blobstore_proto_msgTypes[4]
|
mi := &file_snix_castore_protos_rpc_blobstore_proto_msgTypes[4]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -257,7 +258,7 @@ func (x *PutBlobResponse) String() string {
|
||||||
func (*PutBlobResponse) ProtoMessage() {}
|
func (*PutBlobResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *PutBlobResponse) ProtoReflect() protoreflect.Message {
|
func (x *PutBlobResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_castore_protos_rpc_blobstore_proto_msgTypes[4]
|
mi := &file_snix_castore_protos_rpc_blobstore_proto_msgTypes[4]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -270,7 +271,7 @@ func (x *PutBlobResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use PutBlobResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use PutBlobResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*PutBlobResponse) Descriptor() ([]byte, []int) {
|
func (*PutBlobResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_castore_protos_rpc_blobstore_proto_rawDescGZIP(), []int{4}
|
return file_snix_castore_protos_rpc_blobstore_proto_rawDescGZIP(), []int{4}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PutBlobResponse) GetDigest() []byte {
|
func (x *PutBlobResponse) GetDigest() []byte {
|
||||||
|
|
@ -292,7 +293,7 @@ type StatBlobResponse_ChunkMeta struct {
|
||||||
|
|
||||||
func (x *StatBlobResponse_ChunkMeta) Reset() {
|
func (x *StatBlobResponse_ChunkMeta) Reset() {
|
||||||
*x = StatBlobResponse_ChunkMeta{}
|
*x = StatBlobResponse_ChunkMeta{}
|
||||||
mi := &file_tvix_castore_protos_rpc_blobstore_proto_msgTypes[5]
|
mi := &file_snix_castore_protos_rpc_blobstore_proto_msgTypes[5]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -304,7 +305,7 @@ func (x *StatBlobResponse_ChunkMeta) String() string {
|
||||||
func (*StatBlobResponse_ChunkMeta) ProtoMessage() {}
|
func (*StatBlobResponse_ChunkMeta) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *StatBlobResponse_ChunkMeta) ProtoReflect() protoreflect.Message {
|
func (x *StatBlobResponse_ChunkMeta) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_castore_protos_rpc_blobstore_proto_msgTypes[5]
|
mi := &file_snix_castore_protos_rpc_blobstore_proto_msgTypes[5]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -317,7 +318,7 @@ func (x *StatBlobResponse_ChunkMeta) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use StatBlobResponse_ChunkMeta.ProtoReflect.Descriptor instead.
|
// Deprecated: Use StatBlobResponse_ChunkMeta.ProtoReflect.Descriptor instead.
|
||||||
func (*StatBlobResponse_ChunkMeta) Descriptor() ([]byte, []int) {
|
func (*StatBlobResponse_ChunkMeta) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_castore_protos_rpc_blobstore_proto_rawDescGZIP(), []int{1, 0}
|
return file_snix_castore_protos_rpc_blobstore_proto_rawDescGZIP(), []int{1, 0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *StatBlobResponse_ChunkMeta) GetDigest() []byte {
|
func (x *StatBlobResponse_ChunkMeta) GetDigest() []byte {
|
||||||
|
|
@ -334,12 +335,12 @@ func (x *StatBlobResponse_ChunkMeta) GetSize() uint64 {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
var File_tvix_castore_protos_rpc_blobstore_proto protoreflect.FileDescriptor
|
var File_snix_castore_protos_rpc_blobstore_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_tvix_castore_protos_rpc_blobstore_proto_rawDesc = string([]byte{
|
var file_snix_castore_protos_rpc_blobstore_proto_rawDesc = string([]byte{
|
||||||
0x0a, 0x27, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70,
|
0x0a, 0x27, 0x73, 0x6e, 0x69, 0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x74,
|
0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x6c, 0x6f, 0x62, 0x73, 0x74,
|
||||||
0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x74, 0x76, 0x69, 0x78, 0x2e,
|
0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6e, 0x69, 0x78, 0x2e,
|
||||||
0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x22, 0x65, 0x0a, 0x0f, 0x53, 0x74,
|
0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x22, 0x65, 0x0a, 0x0f, 0x53, 0x74,
|
||||||
0x61, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a,
|
0x61, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a,
|
||||||
0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64,
|
0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64,
|
||||||
|
|
@ -349,7 +350,7 @@ var file_tvix_castore_protos_rpc_blobstore_proto_rawDesc = string([]byte{
|
||||||
0x61, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x65, 0x6e, 0x64, 0x42, 0x61,
|
0x61, 0x6f, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x65, 0x6e, 0x64, 0x42, 0x61,
|
||||||
0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65,
|
0x6f, 0x22, 0xa2, 0x01, 0x0a, 0x10, 0x53, 0x74, 0x61, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65,
|
||||||
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73,
|
0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73,
|
||||||
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63, 0x61,
|
0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61,
|
||||||
0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x42, 0x6c, 0x6f,
|
0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x42, 0x6c, 0x6f,
|
||||||
0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x4d,
|
0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x43, 0x68, 0x75, 0x6e, 0x6b, 0x4d,
|
||||||
0x65, 0x74, 0x61, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x62,
|
0x65, 0x74, 0x61, 0x52, 0x06, 0x63, 0x68, 0x75, 0x6e, 0x6b, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x62,
|
||||||
|
|
@ -366,54 +367,54 @@ var file_tvix_castore_protos_rpc_blobstore_proto_rawDesc = string([]byte{
|
||||||
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18,
|
0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18,
|
||||||
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x32, 0xe9, 0x01,
|
0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x32, 0xe9, 0x01,
|
||||||
0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a,
|
0x0a, 0x0b, 0x42, 0x6c, 0x6f, 0x62, 0x53, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x4b, 0x0a,
|
||||||
0x04, 0x53, 0x74, 0x61, 0x74, 0x12, 0x20, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73,
|
0x04, 0x53, 0x74, 0x61, 0x74, 0x12, 0x20, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73,
|
||||||
0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x42, 0x6c, 0x6f, 0x62,
|
0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x42, 0x6c, 0x6f, 0x62,
|
||||||
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63,
|
0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63,
|
||||||
0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x42, 0x6c,
|
0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x42, 0x6c,
|
||||||
0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x04, 0x52, 0x65,
|
0x6f, 0x62, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x46, 0x0a, 0x04, 0x52, 0x65,
|
||||||
0x61, 0x64, 0x12, 0x20, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72,
|
0x61, 0x64, 0x12, 0x20, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72,
|
||||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71,
|
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x42, 0x6c, 0x6f, 0x62, 0x52, 0x65, 0x71,
|
||||||
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74,
|
0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74,
|
||||||
0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x68, 0x75, 0x6e, 0x6b,
|
0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x62, 0x43, 0x68, 0x75, 0x6e, 0x6b,
|
||||||
0x30, 0x01, 0x12, 0x45, 0x0a, 0x03, 0x50, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x74, 0x76, 0x69, 0x78,
|
0x30, 0x01, 0x12, 0x45, 0x0a, 0x03, 0x50, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x73, 0x6e, 0x69, 0x78,
|
||||||
0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x62,
|
0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x6c, 0x6f, 0x62,
|
||||||
0x43, 0x68, 0x75, 0x6e, 0x6b, 0x1a, 0x20, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73,
|
0x43, 0x68, 0x75, 0x6e, 0x6b, 0x1a, 0x20, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73,
|
||||||
0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x52,
|
0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x74, 0x42, 0x6c, 0x6f, 0x62, 0x52,
|
||||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0x28, 0x5a, 0x26, 0x63, 0x6f, 0x64,
|
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0x22, 0x5a, 0x20, 0x73, 0x6e, 0x69,
|
||||||
0x65, 0x2e, 0x74, 0x76, 0x6c, 0x2e, 0x66, 0x79, 0x69, 0x2f, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x63,
|
0x78, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72,
|
||||||
0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2d, 0x67, 0x6f, 0x3b, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72,
|
0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x76, 0x31, 0x62, 0x06, 0x70,
|
||||||
0x65, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
})
|
})
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_tvix_castore_protos_rpc_blobstore_proto_rawDescOnce sync.Once
|
file_snix_castore_protos_rpc_blobstore_proto_rawDescOnce sync.Once
|
||||||
file_tvix_castore_protos_rpc_blobstore_proto_rawDescData []byte
|
file_snix_castore_protos_rpc_blobstore_proto_rawDescData []byte
|
||||||
)
|
)
|
||||||
|
|
||||||
func file_tvix_castore_protos_rpc_blobstore_proto_rawDescGZIP() []byte {
|
func file_snix_castore_protos_rpc_blobstore_proto_rawDescGZIP() []byte {
|
||||||
file_tvix_castore_protos_rpc_blobstore_proto_rawDescOnce.Do(func() {
|
file_snix_castore_protos_rpc_blobstore_proto_rawDescOnce.Do(func() {
|
||||||
file_tvix_castore_protos_rpc_blobstore_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_tvix_castore_protos_rpc_blobstore_proto_rawDesc), len(file_tvix_castore_protos_rpc_blobstore_proto_rawDesc)))
|
file_snix_castore_protos_rpc_blobstore_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_snix_castore_protos_rpc_blobstore_proto_rawDesc), len(file_snix_castore_protos_rpc_blobstore_proto_rawDesc)))
|
||||||
})
|
})
|
||||||
return file_tvix_castore_protos_rpc_blobstore_proto_rawDescData
|
return file_snix_castore_protos_rpc_blobstore_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_tvix_castore_protos_rpc_blobstore_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
var file_snix_castore_protos_rpc_blobstore_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||||
var file_tvix_castore_protos_rpc_blobstore_proto_goTypes = []any{
|
var file_snix_castore_protos_rpc_blobstore_proto_goTypes = []any{
|
||||||
(*StatBlobRequest)(nil), // 0: tvix.castore.v1.StatBlobRequest
|
(*StatBlobRequest)(nil), // 0: snix.castore.v1.StatBlobRequest
|
||||||
(*StatBlobResponse)(nil), // 1: tvix.castore.v1.StatBlobResponse
|
(*StatBlobResponse)(nil), // 1: snix.castore.v1.StatBlobResponse
|
||||||
(*ReadBlobRequest)(nil), // 2: tvix.castore.v1.ReadBlobRequest
|
(*ReadBlobRequest)(nil), // 2: snix.castore.v1.ReadBlobRequest
|
||||||
(*BlobChunk)(nil), // 3: tvix.castore.v1.BlobChunk
|
(*BlobChunk)(nil), // 3: snix.castore.v1.BlobChunk
|
||||||
(*PutBlobResponse)(nil), // 4: tvix.castore.v1.PutBlobResponse
|
(*PutBlobResponse)(nil), // 4: snix.castore.v1.PutBlobResponse
|
||||||
(*StatBlobResponse_ChunkMeta)(nil), // 5: tvix.castore.v1.StatBlobResponse.ChunkMeta
|
(*StatBlobResponse_ChunkMeta)(nil), // 5: snix.castore.v1.StatBlobResponse.ChunkMeta
|
||||||
}
|
}
|
||||||
var file_tvix_castore_protos_rpc_blobstore_proto_depIdxs = []int32{
|
var file_snix_castore_protos_rpc_blobstore_proto_depIdxs = []int32{
|
||||||
5, // 0: tvix.castore.v1.StatBlobResponse.chunks:type_name -> tvix.castore.v1.StatBlobResponse.ChunkMeta
|
5, // 0: snix.castore.v1.StatBlobResponse.chunks:type_name -> snix.castore.v1.StatBlobResponse.ChunkMeta
|
||||||
0, // 1: tvix.castore.v1.BlobService.Stat:input_type -> tvix.castore.v1.StatBlobRequest
|
0, // 1: snix.castore.v1.BlobService.Stat:input_type -> snix.castore.v1.StatBlobRequest
|
||||||
2, // 2: tvix.castore.v1.BlobService.Read:input_type -> tvix.castore.v1.ReadBlobRequest
|
2, // 2: snix.castore.v1.BlobService.Read:input_type -> snix.castore.v1.ReadBlobRequest
|
||||||
3, // 3: tvix.castore.v1.BlobService.Put:input_type -> tvix.castore.v1.BlobChunk
|
3, // 3: snix.castore.v1.BlobService.Put:input_type -> snix.castore.v1.BlobChunk
|
||||||
1, // 4: tvix.castore.v1.BlobService.Stat:output_type -> tvix.castore.v1.StatBlobResponse
|
1, // 4: snix.castore.v1.BlobService.Stat:output_type -> snix.castore.v1.StatBlobResponse
|
||||||
3, // 5: tvix.castore.v1.BlobService.Read:output_type -> tvix.castore.v1.BlobChunk
|
3, // 5: snix.castore.v1.BlobService.Read:output_type -> snix.castore.v1.BlobChunk
|
||||||
4, // 6: tvix.castore.v1.BlobService.Put:output_type -> tvix.castore.v1.PutBlobResponse
|
4, // 6: snix.castore.v1.BlobService.Put:output_type -> snix.castore.v1.PutBlobResponse
|
||||||
4, // [4:7] is the sub-list for method output_type
|
4, // [4:7] is the sub-list for method output_type
|
||||||
1, // [1:4] is the sub-list for method input_type
|
1, // [1:4] is the sub-list for method input_type
|
||||||
1, // [1:1] is the sub-list for extension type_name
|
1, // [1:1] is the sub-list for extension type_name
|
||||||
|
|
@ -421,26 +422,26 @@ var file_tvix_castore_protos_rpc_blobstore_proto_depIdxs = []int32{
|
||||||
0, // [0:1] is the sub-list for field type_name
|
0, // [0:1] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_tvix_castore_protos_rpc_blobstore_proto_init() }
|
func init() { file_snix_castore_protos_rpc_blobstore_proto_init() }
|
||||||
func file_tvix_castore_protos_rpc_blobstore_proto_init() {
|
func file_snix_castore_protos_rpc_blobstore_proto_init() {
|
||||||
if File_tvix_castore_protos_rpc_blobstore_proto != nil {
|
if File_snix_castore_protos_rpc_blobstore_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_tvix_castore_protos_rpc_blobstore_proto_rawDesc), len(file_tvix_castore_protos_rpc_blobstore_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_snix_castore_protos_rpc_blobstore_proto_rawDesc), len(file_snix_castore_protos_rpc_blobstore_proto_rawDesc)),
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 6,
|
NumMessages: 6,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
GoTypes: file_tvix_castore_protos_rpc_blobstore_proto_goTypes,
|
GoTypes: file_snix_castore_protos_rpc_blobstore_proto_goTypes,
|
||||||
DependencyIndexes: file_tvix_castore_protos_rpc_blobstore_proto_depIdxs,
|
DependencyIndexes: file_snix_castore_protos_rpc_blobstore_proto_depIdxs,
|
||||||
MessageInfos: file_tvix_castore_protos_rpc_blobstore_proto_msgTypes,
|
MessageInfos: file_snix_castore_protos_rpc_blobstore_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_tvix_castore_protos_rpc_blobstore_proto = out.File
|
File_snix_castore_protos_rpc_blobstore_proto = out.File
|
||||||
file_tvix_castore_protos_rpc_blobstore_proto_goTypes = nil
|
file_snix_castore_protos_rpc_blobstore_proto_goTypes = nil
|
||||||
file_tvix_castore_protos_rpc_blobstore_proto_depIdxs = nil
|
file_snix_castore_protos_rpc_blobstore_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
// Copyright © 2022 The Tvix Authors
|
// Copyright © 2022 The Tvix Authors
|
||||||
|
// Copyright © 2025 The Snix Project
|
||||||
|
|
||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
// - protoc (unknown)
|
// - protoc (unknown)
|
||||||
// source: tvix/castore/protos/rpc_blobstore.proto
|
// source: snix/castore/protos/rpc_blobstore.proto
|
||||||
|
|
||||||
package castorev1
|
package castorev1
|
||||||
|
|
||||||
|
|
@ -22,9 +23,9 @@ import (
|
||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
const (
|
const (
|
||||||
BlobService_Stat_FullMethodName = "/tvix.castore.v1.BlobService/Stat"
|
BlobService_Stat_FullMethodName = "/snix.castore.v1.BlobService/Stat"
|
||||||
BlobService_Read_FullMethodName = "/tvix.castore.v1.BlobService/Read"
|
BlobService_Read_FullMethodName = "/snix.castore.v1.BlobService/Read"
|
||||||
BlobService_Put_FullMethodName = "/tvix.castore.v1.BlobService/Put"
|
BlobService_Put_FullMethodName = "/snix.castore.v1.BlobService/Put"
|
||||||
)
|
)
|
||||||
|
|
||||||
// BlobServiceClient is the client API for BlobService service.
|
// BlobServiceClient is the client API for BlobService service.
|
||||||
|
|
@ -223,7 +224,7 @@ type BlobService_PutServer = grpc.ClientStreamingServer[BlobChunk, PutBlobRespon
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
var BlobService_ServiceDesc = grpc.ServiceDesc{
|
var BlobService_ServiceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "tvix.castore.v1.BlobService",
|
ServiceName: "snix.castore.v1.BlobService",
|
||||||
HandlerType: (*BlobServiceServer)(nil),
|
HandlerType: (*BlobServiceServer)(nil),
|
||||||
Methods: []grpc.MethodDesc{
|
Methods: []grpc.MethodDesc{
|
||||||
{
|
{
|
||||||
|
|
@ -243,5 +244,5 @@ var BlobService_ServiceDesc = grpc.ServiceDesc{
|
||||||
ClientStreams: true,
|
ClientStreams: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Metadata: "tvix/castore/protos/rpc_blobstore.proto",
|
Metadata: "snix/castore/protos/rpc_blobstore.proto",
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
// Copyright © 2022 The Tvix Authors
|
// Copyright © 2022 The Tvix Authors
|
||||||
|
// Copyright © 2025 The Snix Project
|
||||||
|
|
||||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// protoc-gen-go v1.36.5
|
// protoc-gen-go v1.36.5
|
||||||
// protoc (unknown)
|
// protoc (unknown)
|
||||||
// source: tvix/castore/protos/rpc_directory.proto
|
// source: snix/castore/protos/rpc_directory.proto
|
||||||
|
|
||||||
package castorev1
|
package castorev1
|
||||||
|
|
||||||
|
|
@ -41,7 +42,7 @@ type GetDirectoryRequest struct {
|
||||||
|
|
||||||
func (x *GetDirectoryRequest) Reset() {
|
func (x *GetDirectoryRequest) Reset() {
|
||||||
*x = GetDirectoryRequest{}
|
*x = GetDirectoryRequest{}
|
||||||
mi := &file_tvix_castore_protos_rpc_directory_proto_msgTypes[0]
|
mi := &file_snix_castore_protos_rpc_directory_proto_msgTypes[0]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -53,7 +54,7 @@ func (x *GetDirectoryRequest) String() string {
|
||||||
func (*GetDirectoryRequest) ProtoMessage() {}
|
func (*GetDirectoryRequest) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *GetDirectoryRequest) ProtoReflect() protoreflect.Message {
|
func (x *GetDirectoryRequest) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_castore_protos_rpc_directory_proto_msgTypes[0]
|
mi := &file_snix_castore_protos_rpc_directory_proto_msgTypes[0]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -66,7 +67,7 @@ func (x *GetDirectoryRequest) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use GetDirectoryRequest.ProtoReflect.Descriptor instead.
|
// Deprecated: Use GetDirectoryRequest.ProtoReflect.Descriptor instead.
|
||||||
func (*GetDirectoryRequest) Descriptor() ([]byte, []int) {
|
func (*GetDirectoryRequest) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_castore_protos_rpc_directory_proto_rawDescGZIP(), []int{0}
|
return file_snix_castore_protos_rpc_directory_proto_rawDescGZIP(), []int{0}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *GetDirectoryRequest) GetByWhat() isGetDirectoryRequest_ByWhat {
|
func (x *GetDirectoryRequest) GetByWhat() isGetDirectoryRequest_ByWhat {
|
||||||
|
|
@ -114,7 +115,7 @@ type PutDirectoryResponse struct {
|
||||||
|
|
||||||
func (x *PutDirectoryResponse) Reset() {
|
func (x *PutDirectoryResponse) Reset() {
|
||||||
*x = PutDirectoryResponse{}
|
*x = PutDirectoryResponse{}
|
||||||
mi := &file_tvix_castore_protos_rpc_directory_proto_msgTypes[1]
|
mi := &file_snix_castore_protos_rpc_directory_proto_msgTypes[1]
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
ms.StoreMessageInfo(mi)
|
ms.StoreMessageInfo(mi)
|
||||||
}
|
}
|
||||||
|
|
@ -126,7 +127,7 @@ func (x *PutDirectoryResponse) String() string {
|
||||||
func (*PutDirectoryResponse) ProtoMessage() {}
|
func (*PutDirectoryResponse) ProtoMessage() {}
|
||||||
|
|
||||||
func (x *PutDirectoryResponse) ProtoReflect() protoreflect.Message {
|
func (x *PutDirectoryResponse) ProtoReflect() protoreflect.Message {
|
||||||
mi := &file_tvix_castore_protos_rpc_directory_proto_msgTypes[1]
|
mi := &file_snix_castore_protos_rpc_directory_proto_msgTypes[1]
|
||||||
if x != nil {
|
if x != nil {
|
||||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||||
if ms.LoadMessageInfo() == nil {
|
if ms.LoadMessageInfo() == nil {
|
||||||
|
|
@ -139,7 +140,7 @@ func (x *PutDirectoryResponse) ProtoReflect() protoreflect.Message {
|
||||||
|
|
||||||
// Deprecated: Use PutDirectoryResponse.ProtoReflect.Descriptor instead.
|
// Deprecated: Use PutDirectoryResponse.ProtoReflect.Descriptor instead.
|
||||||
func (*PutDirectoryResponse) Descriptor() ([]byte, []int) {
|
func (*PutDirectoryResponse) Descriptor() ([]byte, []int) {
|
||||||
return file_tvix_castore_protos_rpc_directory_proto_rawDescGZIP(), []int{1}
|
return file_snix_castore_protos_rpc_directory_proto_rawDescGZIP(), []int{1}
|
||||||
}
|
}
|
||||||
|
|
||||||
func (x *PutDirectoryResponse) GetRootDigest() []byte {
|
func (x *PutDirectoryResponse) GetRootDigest() []byte {
|
||||||
|
|
@ -149,13 +150,13 @@ func (x *PutDirectoryResponse) GetRootDigest() []byte {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var File_tvix_castore_protos_rpc_directory_proto protoreflect.FileDescriptor
|
var File_snix_castore_protos_rpc_directory_proto protoreflect.FileDescriptor
|
||||||
|
|
||||||
var file_tvix_castore_protos_rpc_directory_proto_rawDesc = string([]byte{
|
var file_snix_castore_protos_rpc_directory_proto_rawDesc = string([]byte{
|
||||||
0x0a, 0x27, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70,
|
0x0a, 0x27, 0x73, 0x6e, 0x69, 0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70,
|
||||||
0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74,
|
0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x5f, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74,
|
||||||
0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x74, 0x76, 0x69, 0x78, 0x2e,
|
0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x73, 0x6e, 0x69, 0x78, 0x2e,
|
||||||
0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x21, 0x74, 0x76, 0x69, 0x78,
|
0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x21, 0x73, 0x6e, 0x69, 0x78,
|
||||||
0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f,
|
0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x73, 0x2f,
|
||||||
0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a,
|
0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x58, 0x0a,
|
||||||
0x13, 0x47, 0x65, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71,
|
0x13, 0x47, 0x65, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71,
|
||||||
|
|
@ -168,44 +169,44 @@ var file_tvix_castore_protos_rpc_directory_proto_rawDesc = string([]byte{
|
||||||
0x1f, 0x0a, 0x0b, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01,
|
0x1f, 0x0a, 0x0b, 0x72, 0x6f, 0x6f, 0x74, 0x5f, 0x64, 0x69, 0x67, 0x65, 0x73, 0x74, 0x18, 0x01,
|
||||||
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74,
|
0x20, 0x01, 0x28, 0x0c, 0x52, 0x0a, 0x72, 0x6f, 0x6f, 0x74, 0x44, 0x69, 0x67, 0x65, 0x73, 0x74,
|
||||||
0x32, 0xa9, 0x01, 0x0a, 0x10, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65,
|
0x32, 0xa9, 0x01, 0x0a, 0x10, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x53, 0x65,
|
||||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x24, 0x2e, 0x74,
|
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x24, 0x2e, 0x73,
|
||||||
0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47,
|
0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47,
|
||||||
0x65, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
0x65, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65,
|
||||||
0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72,
|
0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72,
|
||||||
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x30, 0x01,
|
0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x30, 0x01,
|
||||||
0x12, 0x4a, 0x0a, 0x03, 0x50, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63,
|
0x12, 0x4a, 0x0a, 0x03, 0x50, 0x75, 0x74, 0x12, 0x1a, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63,
|
||||||
0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74,
|
0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74,
|
||||||
0x6f, 0x72, 0x79, 0x1a, 0x25, 0x2e, 0x74, 0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f,
|
0x6f, 0x72, 0x79, 0x1a, 0x25, 0x2e, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f,
|
||||||
0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f,
|
0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x74, 0x44, 0x69, 0x72, 0x65, 0x63, 0x74, 0x6f,
|
||||||
0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0x28, 0x5a, 0x26,
|
0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0x22, 0x5a, 0x20,
|
||||||
0x63, 0x6f, 0x64, 0x65, 0x2e, 0x74, 0x76, 0x6c, 0x2e, 0x66, 0x79, 0x69, 0x2f, 0x74, 0x76, 0x69,
|
0x73, 0x6e, 0x69, 0x78, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65,
|
||||||
0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2d, 0x67, 0x6f, 0x3b, 0x63, 0x61, 0x73,
|
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x76, 0x31,
|
||||||
0x74, 0x6f, 0x72, 0x65, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||||
})
|
})
|
||||||
|
|
||||||
var (
|
var (
|
||||||
file_tvix_castore_protos_rpc_directory_proto_rawDescOnce sync.Once
|
file_snix_castore_protos_rpc_directory_proto_rawDescOnce sync.Once
|
||||||
file_tvix_castore_protos_rpc_directory_proto_rawDescData []byte
|
file_snix_castore_protos_rpc_directory_proto_rawDescData []byte
|
||||||
)
|
)
|
||||||
|
|
||||||
func file_tvix_castore_protos_rpc_directory_proto_rawDescGZIP() []byte {
|
func file_snix_castore_protos_rpc_directory_proto_rawDescGZIP() []byte {
|
||||||
file_tvix_castore_protos_rpc_directory_proto_rawDescOnce.Do(func() {
|
file_snix_castore_protos_rpc_directory_proto_rawDescOnce.Do(func() {
|
||||||
file_tvix_castore_protos_rpc_directory_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_tvix_castore_protos_rpc_directory_proto_rawDesc), len(file_tvix_castore_protos_rpc_directory_proto_rawDesc)))
|
file_snix_castore_protos_rpc_directory_proto_rawDescData = protoimpl.X.CompressGZIP(unsafe.Slice(unsafe.StringData(file_snix_castore_protos_rpc_directory_proto_rawDesc), len(file_snix_castore_protos_rpc_directory_proto_rawDesc)))
|
||||||
})
|
})
|
||||||
return file_tvix_castore_protos_rpc_directory_proto_rawDescData
|
return file_snix_castore_protos_rpc_directory_proto_rawDescData
|
||||||
}
|
}
|
||||||
|
|
||||||
var file_tvix_castore_protos_rpc_directory_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
var file_snix_castore_protos_rpc_directory_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||||
var file_tvix_castore_protos_rpc_directory_proto_goTypes = []any{
|
var file_snix_castore_protos_rpc_directory_proto_goTypes = []any{
|
||||||
(*GetDirectoryRequest)(nil), // 0: tvix.castore.v1.GetDirectoryRequest
|
(*GetDirectoryRequest)(nil), // 0: snix.castore.v1.GetDirectoryRequest
|
||||||
(*PutDirectoryResponse)(nil), // 1: tvix.castore.v1.PutDirectoryResponse
|
(*PutDirectoryResponse)(nil), // 1: snix.castore.v1.PutDirectoryResponse
|
||||||
(*Directory)(nil), // 2: tvix.castore.v1.Directory
|
(*Directory)(nil), // 2: snix.castore.v1.Directory
|
||||||
}
|
}
|
||||||
var file_tvix_castore_protos_rpc_directory_proto_depIdxs = []int32{
|
var file_snix_castore_protos_rpc_directory_proto_depIdxs = []int32{
|
||||||
0, // 0: tvix.castore.v1.DirectoryService.Get:input_type -> tvix.castore.v1.GetDirectoryRequest
|
0, // 0: snix.castore.v1.DirectoryService.Get:input_type -> snix.castore.v1.GetDirectoryRequest
|
||||||
2, // 1: tvix.castore.v1.DirectoryService.Put:input_type -> tvix.castore.v1.Directory
|
2, // 1: snix.castore.v1.DirectoryService.Put:input_type -> snix.castore.v1.Directory
|
||||||
2, // 2: tvix.castore.v1.DirectoryService.Get:output_type -> tvix.castore.v1.Directory
|
2, // 2: snix.castore.v1.DirectoryService.Get:output_type -> snix.castore.v1.Directory
|
||||||
1, // 3: tvix.castore.v1.DirectoryService.Put:output_type -> tvix.castore.v1.PutDirectoryResponse
|
1, // 3: snix.castore.v1.DirectoryService.Put:output_type -> snix.castore.v1.PutDirectoryResponse
|
||||||
2, // [2:4] is the sub-list for method output_type
|
2, // [2:4] is the sub-list for method output_type
|
||||||
0, // [0:2] is the sub-list for method input_type
|
0, // [0:2] is the sub-list for method input_type
|
||||||
0, // [0:0] is the sub-list for extension type_name
|
0, // [0:0] is the sub-list for extension type_name
|
||||||
|
|
@ -213,30 +214,30 @@ var file_tvix_castore_protos_rpc_directory_proto_depIdxs = []int32{
|
||||||
0, // [0:0] is the sub-list for field type_name
|
0, // [0:0] is the sub-list for field type_name
|
||||||
}
|
}
|
||||||
|
|
||||||
func init() { file_tvix_castore_protos_rpc_directory_proto_init() }
|
func init() { file_snix_castore_protos_rpc_directory_proto_init() }
|
||||||
func file_tvix_castore_protos_rpc_directory_proto_init() {
|
func file_snix_castore_protos_rpc_directory_proto_init() {
|
||||||
if File_tvix_castore_protos_rpc_directory_proto != nil {
|
if File_snix_castore_protos_rpc_directory_proto != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
file_tvix_castore_protos_castore_proto_init()
|
file_snix_castore_protos_castore_proto_init()
|
||||||
file_tvix_castore_protos_rpc_directory_proto_msgTypes[0].OneofWrappers = []any{
|
file_snix_castore_protos_rpc_directory_proto_msgTypes[0].OneofWrappers = []any{
|
||||||
(*GetDirectoryRequest_Digest)(nil),
|
(*GetDirectoryRequest_Digest)(nil),
|
||||||
}
|
}
|
||||||
type x struct{}
|
type x struct{}
|
||||||
out := protoimpl.TypeBuilder{
|
out := protoimpl.TypeBuilder{
|
||||||
File: protoimpl.DescBuilder{
|
File: protoimpl.DescBuilder{
|
||||||
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
|
||||||
RawDescriptor: unsafe.Slice(unsafe.StringData(file_tvix_castore_protos_rpc_directory_proto_rawDesc), len(file_tvix_castore_protos_rpc_directory_proto_rawDesc)),
|
RawDescriptor: unsafe.Slice(unsafe.StringData(file_snix_castore_protos_rpc_directory_proto_rawDesc), len(file_snix_castore_protos_rpc_directory_proto_rawDesc)),
|
||||||
NumEnums: 0,
|
NumEnums: 0,
|
||||||
NumMessages: 2,
|
NumMessages: 2,
|
||||||
NumExtensions: 0,
|
NumExtensions: 0,
|
||||||
NumServices: 1,
|
NumServices: 1,
|
||||||
},
|
},
|
||||||
GoTypes: file_tvix_castore_protos_rpc_directory_proto_goTypes,
|
GoTypes: file_snix_castore_protos_rpc_directory_proto_goTypes,
|
||||||
DependencyIndexes: file_tvix_castore_protos_rpc_directory_proto_depIdxs,
|
DependencyIndexes: file_snix_castore_protos_rpc_directory_proto_depIdxs,
|
||||||
MessageInfos: file_tvix_castore_protos_rpc_directory_proto_msgTypes,
|
MessageInfos: file_snix_castore_protos_rpc_directory_proto_msgTypes,
|
||||||
}.Build()
|
}.Build()
|
||||||
File_tvix_castore_protos_rpc_directory_proto = out.File
|
File_snix_castore_protos_rpc_directory_proto = out.File
|
||||||
file_tvix_castore_protos_rpc_directory_proto_goTypes = nil
|
file_snix_castore_protos_rpc_directory_proto_goTypes = nil
|
||||||
file_tvix_castore_protos_rpc_directory_proto_depIdxs = nil
|
file_snix_castore_protos_rpc_directory_proto_depIdxs = nil
|
||||||
}
|
}
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
// Copyright © 2022 The Tvix Authors
|
// Copyright © 2022 The Tvix Authors
|
||||||
|
// Copyright © 2025 The Snix Project
|
||||||
|
|
||||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||||
// versions:
|
// versions:
|
||||||
// - protoc-gen-go-grpc v1.5.1
|
// - protoc-gen-go-grpc v1.5.1
|
||||||
// - protoc (unknown)
|
// - protoc (unknown)
|
||||||
// source: tvix/castore/protos/rpc_directory.proto
|
// source: snix/castore/protos/rpc_directory.proto
|
||||||
|
|
||||||
package castorev1
|
package castorev1
|
||||||
|
|
||||||
|
|
@ -22,8 +23,8 @@ import (
|
||||||
const _ = grpc.SupportPackageIsVersion9
|
const _ = grpc.SupportPackageIsVersion9
|
||||||
|
|
||||||
const (
|
const (
|
||||||
DirectoryService_Get_FullMethodName = "/tvix.castore.v1.DirectoryService/Get"
|
DirectoryService_Get_FullMethodName = "/snix.castore.v1.DirectoryService/Get"
|
||||||
DirectoryService_Put_FullMethodName = "/tvix.castore.v1.DirectoryService/Put"
|
DirectoryService_Put_FullMethodName = "/snix.castore.v1.DirectoryService/Put"
|
||||||
)
|
)
|
||||||
|
|
||||||
// DirectoryServiceClient is the client API for DirectoryService service.
|
// DirectoryServiceClient is the client API for DirectoryService service.
|
||||||
|
|
@ -177,7 +178,7 @@ type DirectoryService_PutServer = grpc.ClientStreamingServer[Directory, PutDirec
|
||||||
// It's only intended for direct use with grpc.RegisterService,
|
// It's only intended for direct use with grpc.RegisterService,
|
||||||
// and not to be introspected or modified (even as a copy)
|
// and not to be introspected or modified (even as a copy)
|
||||||
var DirectoryService_ServiceDesc = grpc.ServiceDesc{
|
var DirectoryService_ServiceDesc = grpc.ServiceDesc{
|
||||||
ServiceName: "tvix.castore.v1.DirectoryService",
|
ServiceName: "snix.castore.v1.DirectoryService",
|
||||||
HandlerType: (*DirectoryServiceServer)(nil),
|
HandlerType: (*DirectoryServiceServer)(nil),
|
||||||
Methods: []grpc.MethodDesc{},
|
Methods: []grpc.MethodDesc{},
|
||||||
Streams: []grpc.StreamDesc{
|
Streams: []grpc.StreamDesc{
|
||||||
|
|
@ -192,5 +193,5 @@ var DirectoryService_ServiceDesc = grpc.ServiceDesc{
|
||||||
ClientStreams: true,
|
ClientStreams: true,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
Metadata: "tvix/castore/protos/rpc_directory.proto",
|
Metadata: "snix/castore/protos/rpc_directory.proto",
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
[package]
|
[package]
|
||||||
name = "tvix-castore"
|
name = "snix-castore"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
|
|
@ -29,7 +29,7 @@ tonic.workspace = true
|
||||||
tower.workspace = true
|
tower.workspace = true
|
||||||
tracing.workspace = true
|
tracing.workspace = true
|
||||||
tracing-indicatif.workspace = true
|
tracing-indicatif.workspace = true
|
||||||
tvix-tracing = { path = "../tracing", features = ["tonic"] }
|
snix-tracing = { path = "../tracing", features = ["tonic"] }
|
||||||
url.workspace = true
|
url.workspace = true
|
||||||
walkdir.workspace = true
|
walkdir.workspace = true
|
||||||
zstd.workspace = true
|
zstd.workspace = true
|
||||||
|
|
@ -7,7 +7,7 @@ fn main() -> Result<()> {
|
||||||
#[cfg(feature = "tonic-reflection")]
|
#[cfg(feature = "tonic-reflection")]
|
||||||
{
|
{
|
||||||
let out_dir = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap());
|
let out_dir = std::path::PathBuf::from(std::env::var("OUT_DIR").unwrap());
|
||||||
let descriptor_path = out_dir.join("tvix.castore.v1.bin");
|
let descriptor_path = out_dir.join("snix.castore.v1.bin");
|
||||||
|
|
||||||
builder = builder.file_descriptor_set_path(descriptor_path);
|
builder = builder.file_descriptor_set_path(descriptor_path);
|
||||||
};
|
};
|
||||||
|
|
@ -20,9 +20,9 @@ fn main() -> Result<()> {
|
||||||
.type_attribute(".", "#[derive(Eq, Hash)]")
|
.type_attribute(".", "#[derive(Eq, Hash)]")
|
||||||
.compile_protos(
|
.compile_protos(
|
||||||
&[
|
&[
|
||||||
"tvix/castore/protos/castore.proto",
|
"snix/castore/protos/castore.proto",
|
||||||
"tvix/castore/protos/rpc_blobstore.proto",
|
"snix/castore/protos/rpc_blobstore.proto",
|
||||||
"tvix/castore/protos/rpc_directory.proto",
|
"snix/castore/protos/rpc_directory.proto",
|
||||||
],
|
],
|
||||||
// If we are in running `cargo build` manually, using `../..` works fine,
|
// If we are in running `cargo build` manually, using `../..` works fine,
|
||||||
// but in case we run inside a nix build, we need to instead point PROTO_ROOT
|
// but in case we run inside a nix build, we need to instead point PROTO_ROOT
|
||||||
|
|
@ -1,13 +1,13 @@
|
||||||
{ depot, pkgs, lib, ... }:
|
{ depot, pkgs, lib, ... }:
|
||||||
|
|
||||||
(depot.tvix.crates.workspaceMembers.tvix-castore.build.override {
|
(depot.snix.crates.workspaceMembers.snix-castore.build.override {
|
||||||
runTests = true;
|
runTests = true;
|
||||||
testPreRun = ''
|
testPreRun = ''
|
||||||
export SSL_CERT_FILE=/dev/null
|
export SSL_CERT_FILE=/dev/null
|
||||||
'';
|
'';
|
||||||
}).overrideAttrs (old: rec {
|
}).overrideAttrs (old: rec {
|
||||||
meta.ci.targets = [ "integration-tests" ] ++ lib.filter (x: lib.hasPrefix "with-features" x || x == "no-features") (lib.attrNames passthru);
|
meta.ci.targets = [ "integration-tests" ] ++ lib.filter (x: lib.hasPrefix "with-features" x || x == "no-features") (lib.attrNames passthru);
|
||||||
passthru = (depot.tvix.utils.mkFeaturePowerset {
|
passthru = (depot.snix.utils.mkFeaturePowerset {
|
||||||
inherit (old) crateName;
|
inherit (old) crateName;
|
||||||
features = ([ "cloud" "fuse" "tonic-reflection" "xp-composition-url-refs" ]
|
features = ([ "cloud" "fuse" "tonic-reflection" "xp-composition-url-refs" ]
|
||||||
# virtiofs feature currently fails to build on Darwin
|
# virtiofs feature currently fails to build on Darwin
|
||||||
|
|
@ -16,7 +16,7 @@
|
||||||
export SSL_CERT_FILE=/dev/null
|
export SSL_CERT_FILE=/dev/null
|
||||||
'';
|
'';
|
||||||
}) // {
|
}) // {
|
||||||
integration-tests = depot.tvix.crates.workspaceMembers.${old.crateName}.build.override (old: {
|
integration-tests = depot.snix.crates.workspaceMembers.${old.crateName}.build.override (old: {
|
||||||
runTests = true;
|
runTests = true;
|
||||||
testPreRun = ''
|
testPreRun = ''
|
||||||
export SSL_CERT_FILE=/dev/null
|
export SSL_CERT_FILE=/dev/null
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
Copyright © The Tvix Authors
|
Copyright © The Tvix Authors
|
||||||
|
Copyright © The Snix Project
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining
|
Permission is hereby granted, free of charge, to any person obtaining
|
||||||
a copy of this software and associated documentation files (the
|
a copy of this software and associated documentation files (the
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
// SPDX-FileCopyrightText: edef <edef@unfathomable.blue>
|
// SPDX-FileCopyrightText: edef <edef@unfathomable.blue>
|
||||||
// SPDX-License-Identifier: OSL-3.0 OR MIT OR Apache-2.0
|
// SPDX-License-Identifier: OSL-3.0 OR MIT OR Apache-2.0
|
||||||
|
// Copyright © 2025 The Snix Project
|
||||||
|
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package tvix.castore.v1;
|
package snix.castore.v1;
|
||||||
|
|
||||||
option go_package = "code.tvl.fyi/tvix/castore-go;castorev1";
|
option go_package = "snix.dev/castore/proto;castorev1";
|
||||||
|
|
||||||
// A Directory can contain Directory, File or Symlink nodes.
|
// A Directory can contain Directory, File or Symlink nodes.
|
||||||
// Each of these nodes have a name attribute, which is the basename in that
|
// Each of these nodes have a name attribute, which is the basename in that
|
||||||
|
|
@ -3,7 +3,7 @@ let
|
||||||
protos = lib.sourceByRegex depot.path.origSrc [
|
protos = lib.sourceByRegex depot.path.origSrc [
|
||||||
"buf.yaml"
|
"buf.yaml"
|
||||||
"buf.gen.yaml"
|
"buf.gen.yaml"
|
||||||
"^tvix(/castore(/protos(/.*\.proto)?)?)?$"
|
"^snix(/castore(/protos(/.*\.proto)?)?)?$"
|
||||||
];
|
];
|
||||||
in
|
in
|
||||||
depot.nix.readTree.drvTargets {
|
depot.nix.readTree.drvTargets {
|
||||||
|
|
@ -42,7 +42,7 @@ depot.nix.readTree.drvTargets {
|
||||||
buf generate
|
buf generate
|
||||||
|
|
||||||
mkdir -p $out
|
mkdir -p $out
|
||||||
cp tvix/castore/protos/*.pb.go $out/
|
cp snix/castore/protos/*.pb.go $out/
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
// Copyright © 2022 The Tvix Authors
|
// Copyright © 2022 The Tvix Authors
|
||||||
|
// Copyright © 2025 The Snix Project
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package tvix.castore.v1;
|
package snix.castore.v1;
|
||||||
|
|
||||||
option go_package = "code.tvl.fyi/tvix/castore-go;castorev1";
|
option go_package = "snix.dev/castore/proto;castorev1";
|
||||||
|
|
||||||
// BlobService allows reading (or uploading) content-addressed blobs of data.
|
// BlobService allows reading (or uploading) content-addressed blobs of data.
|
||||||
// BLAKE3 is used as a hashing function for the data. Uploading a blob will
|
// BLAKE3 is used as a hashing function for the data. Uploading a blob will
|
||||||
|
|
@ -1,12 +1,13 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
// Copyright © 2022 The Tvix Authors
|
// Copyright © 2022 The Tvix Authors
|
||||||
|
// Copyright © 2025 The Snix Project
|
||||||
syntax = "proto3";
|
syntax = "proto3";
|
||||||
|
|
||||||
package tvix.castore.v1;
|
package snix.castore.v1;
|
||||||
|
|
||||||
import "tvix/castore/protos/castore.proto";
|
import "snix/castore/protos/castore.proto";
|
||||||
|
|
||||||
option go_package = "code.tvl.fyi/tvix/castore-go;castorev1";
|
option go_package = "snix.dev/castore/proto;castorev1";
|
||||||
|
|
||||||
service DirectoryService {
|
service DirectoryService {
|
||||||
// Get retrieves a stream of Directory messages, by using the lookup
|
// Get retrieves a stream of Directory messages, by using the lookup
|
||||||
|
|
@ -21,7 +21,7 @@ use tokio_util::{
|
||||||
use tonic::{async_trait, Code, Status};
|
use tonic::{async_trait, Code, Status};
|
||||||
use tracing::{instrument, Instrument as _};
|
use tracing::{instrument, Instrument as _};
|
||||||
|
|
||||||
/// Connects to a (remote) tvix-store BlobService over gRPC.
|
/// Connects to a (remote) snix-store BlobService over gRPC.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct GRPCBlobService<T> {
|
pub struct GRPCBlobService<T> {
|
||||||
instance_name: String,
|
instance_name: String,
|
||||||
|
|
@ -200,7 +200,7 @@ impl TryFrom<url::Url> for GRPCBlobServiceConfig {
|
||||||
// normally grpc+unix for unix sockets, and grpc+http(s) for the HTTP counterparts.
|
// normally grpc+unix for unix sockets, and grpc+http(s) for the HTTP counterparts.
|
||||||
// - In the case of unix sockets, there must be a path, but may not be a host.
|
// - In the case of unix sockets, there must be a path, but may not be a host.
|
||||||
// - In the case of non-unix sockets, there must be a host, but no path.
|
// - In the case of non-unix sockets, there must be a host, but no path.
|
||||||
// Constructing the channel is handled by tvix_castore::channel::from_url.
|
// Constructing the channel is handled by snix_castore::channel::from_url.
|
||||||
Ok(GRPCBlobServiceConfig {
|
Ok(GRPCBlobServiceConfig {
|
||||||
url: url.to_string(),
|
url: url.to_string(),
|
||||||
})
|
})
|
||||||
|
|
@ -27,7 +27,7 @@ use crate::{
|
||||||
use super::{BlobReader, BlobService, BlobWriter, ChunkedReader};
|
use super::{BlobReader, BlobService, BlobWriter, ChunkedReader};
|
||||||
|
|
||||||
/// Uses any object storage supported by the [object_store] crate to provide a
|
/// Uses any object storage supported by the [object_store] crate to provide a
|
||||||
/// tvix-castore [BlobService].
|
/// snix-castore [BlobService].
|
||||||
///
|
///
|
||||||
/// # Data format
|
/// # Data format
|
||||||
/// Data is organized in "blobs" and "chunks".
|
/// Data is organized in "blobs" and "chunks".
|
||||||
|
|
@ -16,8 +16,8 @@
|
||||||
//! ```
|
//! ```
|
||||||
//! use std::sync::Arc;
|
//! use std::sync::Arc;
|
||||||
//!
|
//!
|
||||||
//! use tvix_castore::composition::*;
|
//! use snix_castore::composition::*;
|
||||||
//! use tvix_castore::blobservice::BlobService;
|
//! use snix_castore::blobservice::BlobService;
|
||||||
//!
|
//!
|
||||||
//! #[derive(serde::Deserialize)]
|
//! #[derive(serde::Deserialize)]
|
||||||
//! struct MyBlobServiceConfig {
|
//! struct MyBlobServiceConfig {
|
||||||
|
|
@ -50,8 +50,8 @@
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
//! use std::sync::Arc;
|
//! use std::sync::Arc;
|
||||||
//! use tvix_castore::composition::*;
|
//! use snix_castore::composition::*;
|
||||||
//! use tvix_castore::blobservice::BlobService;
|
//! use snix_castore::blobservice::BlobService;
|
||||||
//!
|
//!
|
||||||
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
|
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
//! # tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap().block_on(async move {
|
//! # tokio::runtime::Builder::new_current_thread().enable_all().build().unwrap().block_on(async move {
|
||||||
|
|
@ -81,9 +81,9 @@
|
||||||
//! ### Example 3.: Creating another registry extending the default registry with third-party types
|
//! ### Example 3.: Creating another registry extending the default registry with third-party types
|
||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
//! # pub fn add_my_service(reg: &mut tvix_castore::composition::Registry) {}
|
//! # pub fn add_my_service(reg: &mut snix_castore::composition::Registry) {}
|
||||||
//! let mut my_registry = tvix_castore::composition::Registry::default();
|
//! let mut my_registry = snix_castore::composition::Registry::default();
|
||||||
//! tvix_castore::composition::add_default_services(&mut my_registry);
|
//! snix_castore::composition::add_default_services(&mut my_registry);
|
||||||
//! add_my_service(&mut my_registry);
|
//! add_my_service(&mut my_registry);
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
|
|
@ -260,7 +260,7 @@ pub fn with_registry<R>(reg: &'static Registry, f: impl FnOnce() -> R) -> R {
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The provided registry of tvix_castore, with all builtin BlobStore/DirectoryStore implementations
|
/// The provided registry of snix_castore, with all builtin BlobStore/DirectoryStore implementations
|
||||||
pub static REG: LazyLock<&'static Registry> = LazyLock::new(|| {
|
pub static REG: LazyLock<&'static Registry> = LazyLock::new(|| {
|
||||||
let mut reg = Default::default();
|
let mut reg = Default::default();
|
||||||
add_default_services(&mut reg);
|
add_default_services(&mut reg);
|
||||||
|
|
@ -270,7 +270,7 @@ pub static REG: LazyLock<&'static Registry> = LazyLock::new(|| {
|
||||||
|
|
||||||
// ---------- End of generic registry code --------- //
|
// ---------- End of generic registry code --------- //
|
||||||
|
|
||||||
/// Register the builtin services of tvix_castore (blob services and directory
|
/// Register the builtin services of snix_castore (blob services and directory
|
||||||
/// services) with the given registry.
|
/// services) with the given registry.
|
||||||
/// This can be used outside to create your own registry with the builtin types
|
/// This can be used outside to create your own registry with the builtin types
|
||||||
/// _and_ extra third party types.
|
/// _and_ extra third party types.
|
||||||
|
|
@ -20,9 +20,9 @@ use super::DirectoryService;
|
||||||
/// Uses redb, using a path on the disk for persistency. Can be only opened
|
/// Uses redb, using a path on the disk for persistency. Can be only opened
|
||||||
/// from one process at the same time.
|
/// from one process at the same time.
|
||||||
/// - `grpc+unix:///absolute/path/to/somewhere`
|
/// - `grpc+unix:///absolute/path/to/somewhere`
|
||||||
/// Connects to a local tvix-store gRPC service via Unix socket.
|
/// Connects to a local snix-store gRPC service via Unix socket.
|
||||||
/// - `grpc+http://host:port`, `grpc+https://host:port`
|
/// - `grpc+http://host:port`, `grpc+https://host:port`
|
||||||
/// Connects to a (remote) tvix-store gRPC service.
|
/// Connects to a (remote) snix-store gRPC service.
|
||||||
pub async fn from_addr(
|
pub async fn from_addr(
|
||||||
uri: &str,
|
uri: &str,
|
||||||
) -> Result<Arc<dyn DirectoryService>, Box<dyn std::error::Error + Send + Sync>> {
|
) -> Result<Arc<dyn DirectoryService>, Box<dyn std::error::Error + Send + Sync>> {
|
||||||
|
|
@ -14,7 +14,7 @@ use tokio_stream::wrappers::UnboundedReceiverStream;
|
||||||
use tonic::{async_trait, Code, Status};
|
use tonic::{async_trait, Code, Status};
|
||||||
use tracing::{instrument, warn, Instrument as _};
|
use tracing::{instrument, warn, Instrument as _};
|
||||||
|
|
||||||
/// Connects to a (remote) tvix-store DirectoryService over gRPC.
|
/// Connects to a (remote) snix-store DirectoryService over gRPC.
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub struct GRPCDirectoryService<T> {
|
pub struct GRPCDirectoryService<T> {
|
||||||
instance_name: String,
|
instance_name: String,
|
||||||
|
|
@ -231,7 +231,7 @@ impl TryFrom<url::Url> for GRPCDirectoryServiceConfig {
|
||||||
// This is normally grpc+unix for unix sockets, and grpc+http(s) for the HTTP counterparts.
|
// This is normally grpc+unix for unix sockets, and grpc+http(s) for the HTTP counterparts.
|
||||||
// - In the case of unix sockets, there must be a path, but may not be a host.
|
// - In the case of unix sockets, there must be a path, but may not be a host.
|
||||||
// - In the case of non-unix sockets, there must be a host, but no path.
|
// - In the case of non-unix sockets, there must be a host, but no path.
|
||||||
// Constructing the channel is handled by tvix_castore::channel::from_url.
|
// Constructing the channel is handled by snix_castore::channel::from_url.
|
||||||
Ok(GRPCDirectoryServiceConfig {
|
Ok(GRPCDirectoryServiceConfig {
|
||||||
url: url.to_string(),
|
url: url.to_string(),
|
||||||
})
|
})
|
||||||
|
|
@ -73,7 +73,7 @@ impl FuseDaemon {
|
||||||
{
|
{
|
||||||
let server = Arc::new(fuse_backend_rs::api::server::Server::new(Arc::new(fs)));
|
let server = Arc::new(fuse_backend_rs::api::server::Server::new(Arc::new(fs)));
|
||||||
|
|
||||||
let mut session = FuseSession::new(mountpoint.as_ref(), "tvix-store", "", true)
|
let mut session = FuseSession::new(mountpoint.as_ref(), "snix-store", "", true)
|
||||||
.map_err(|e| io::Error::new(io::ErrorKind::Other, e.to_string()))?;
|
.map_err(|e| io::Error::new(io::ErrorKind::Other, e.to_string()))?;
|
||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
|
|
@ -17,7 +17,7 @@ use crate::{
|
||||||
fixtures, Node,
|
fixtures, Node,
|
||||||
};
|
};
|
||||||
use crate::{
|
use crate::{
|
||||||
fs::{TvixStoreFs, XATTR_NAME_BLOB_DIGEST, XATTR_NAME_DIRECTORY_DIGEST},
|
fs::{SnixStoreFs, XATTR_NAME_BLOB_DIGEST, XATTR_NAME_DIRECTORY_DIGEST},
|
||||||
PathComponent,
|
PathComponent,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -48,7 +48,7 @@ where
|
||||||
BS: BlobService + Send + Sync + Clone + 'static,
|
BS: BlobService + Send + Sync + Clone + 'static,
|
||||||
DS: DirectoryService + Send + Sync + Clone + 'static,
|
DS: DirectoryService + Send + Sync + Clone + 'static,
|
||||||
{
|
{
|
||||||
let fs = TvixStoreFs::new(
|
let fs = SnixStoreFs::new(
|
||||||
blob_service,
|
blob_service,
|
||||||
directory_service,
|
directory_service,
|
||||||
Arc::new(root_nodes),
|
Arc::new(root_nodes),
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
//! This module contains all the data structures used to track information
|
//! This module contains all the data structures used to track information
|
||||||
//! about inodes, which present tvix-castore nodes in a filesystem.
|
//! about inodes, which present snix-castore nodes in a filesystem.
|
||||||
use std::time::Duration;
|
use std::time::Duration;
|
||||||
|
|
||||||
use crate::{path::PathComponent, B3Digest, Node};
|
use crate::{path::PathComponent, B3Digest, Node};
|
||||||
|
|
@ -43,7 +43,7 @@ use tokio::{
|
||||||
};
|
};
|
||||||
use tracing::{debug, error, instrument, warn, Instrument as _, Span};
|
use tracing::{debug, error, instrument, warn, Instrument as _, Span};
|
||||||
|
|
||||||
/// This implements a read-only FUSE filesystem for a tvix-store
|
/// This implements a read-only FUSE filesystem for a snix-store
|
||||||
/// with the passed [BlobService], [DirectoryService] and [RootNodes].
|
/// with the passed [BlobService], [DirectoryService] and [RootNodes].
|
||||||
///
|
///
|
||||||
/// Linux uses inodes in filesystems. When implementing FUSE, most calls are
|
/// Linux uses inodes in filesystems. When implementing FUSE, most calls are
|
||||||
|
|
@ -74,8 +74,8 @@ use tracing::{debug, error, instrument, warn, Instrument as _, Span};
|
||||||
/// merkle structure is a DAG, not a tree, this also means we can't do "bucketed
|
/// merkle structure is a DAG, not a tree, this also means we can't do "bucketed
|
||||||
/// allocation", aka reserve Directory.size inodes for each directory node we
|
/// allocation", aka reserve Directory.size inodes for each directory node we
|
||||||
/// explore.
|
/// explore.
|
||||||
/// Tests for this live in the tvix-store crate.
|
/// Tests for this live in the snix-store crate.
|
||||||
pub struct TvixStoreFs<BS, DS, RN> {
|
pub struct SnixStoreFs<BS, DS, RN> {
|
||||||
blob_service: BS,
|
blob_service: BS,
|
||||||
directory_service: DS,
|
directory_service: DS,
|
||||||
root_nodes_provider: RN,
|
root_nodes_provider: RN,
|
||||||
|
|
@ -119,7 +119,7 @@ pub struct TvixStoreFs<BS, DS, RN> {
|
||||||
tokio_handle: tokio::runtime::Handle,
|
tokio_handle: tokio::runtime::Handle,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<BS, DS, RN> TvixStoreFs<BS, DS, RN>
|
impl<BS, DS, RN> SnixStoreFs<BS, DS, RN>
|
||||||
where
|
where
|
||||||
BS: BlobService + Clone + Send,
|
BS: BlobService + Clone + Send,
|
||||||
DS: DirectoryService + Clone + Send + 'static,
|
DS: DirectoryService + Clone + Send + 'static,
|
||||||
|
|
@ -297,11 +297,11 @@ where
|
||||||
/// Buffer size of the channel providing nodes in the mount root
|
/// Buffer size of the channel providing nodes in the mount root
|
||||||
const ROOT_NODES_BUFFER_SIZE: usize = 16;
|
const ROOT_NODES_BUFFER_SIZE: usize = 16;
|
||||||
|
|
||||||
const XATTR_NAME_DIRECTORY_DIGEST: &[u8] = b"user.tvix.castore.directory.digest";
|
const XATTR_NAME_DIRECTORY_DIGEST: &[u8] = b"user.snix.castore.directory.digest";
|
||||||
const XATTR_NAME_BLOB_DIGEST: &[u8] = b"user.tvix.castore.blob.digest";
|
const XATTR_NAME_BLOB_DIGEST: &[u8] = b"user.snix.castore.blob.digest";
|
||||||
|
|
||||||
#[cfg(all(feature = "virtiofs", target_os = "linux"))]
|
#[cfg(all(feature = "virtiofs", target_os = "linux"))]
|
||||||
impl<BS, DS, RN> fuse_backend_rs::api::filesystem::Layer for TvixStoreFs<BS, DS, RN>
|
impl<BS, DS, RN> fuse_backend_rs::api::filesystem::Layer for SnixStoreFs<BS, DS, RN>
|
||||||
where
|
where
|
||||||
BS: BlobService + Clone + Send + 'static,
|
BS: BlobService + Clone + Send + 'static,
|
||||||
DS: DirectoryService + Send + Clone + 'static,
|
DS: DirectoryService + Send + Clone + 'static,
|
||||||
|
|
@ -312,7 +312,7 @@ where
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<BS, DS, RN> FileSystem for TvixStoreFs<BS, DS, RN>
|
impl<BS, DS, RN> FileSystem for SnixStoreFs<BS, DS, RN>
|
||||||
where
|
where
|
||||||
BS: BlobService + Clone + Send + 'static,
|
BS: BlobService + Clone + Send + 'static,
|
||||||
DS: DirectoryService + Send + Clone + 'static,
|
DS: DirectoryService + Send + Clone + 'static,
|
||||||
|
|
@ -4,7 +4,7 @@ use crate::{path::PathComponent, Error, Node};
|
||||||
use futures::stream::BoxStream;
|
use futures::stream::BoxStream;
|
||||||
use tonic::async_trait;
|
use tonic::async_trait;
|
||||||
|
|
||||||
/// Provides an interface for looking up root nodes in tvix-castore by given
|
/// Provides an interface for looking up root nodes in snix-castore by given
|
||||||
/// a lookup key (usually the basename), and optionally allow a listing.
|
/// a lookup key (usually the basename), and optionally allow a listing.
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
pub trait RootNodes: Send + Sync {
|
pub trait RootNodes: Send + Sync {
|
||||||
|
|
@ -227,7 +227,7 @@ where
|
||||||
let listener = Listener::new(socket, true).unwrap();
|
let listener = Listener::new(socket, true).unwrap();
|
||||||
|
|
||||||
let mut fs_daemon =
|
let mut fs_daemon =
|
||||||
VhostUserDaemon::new(String::from("vhost-user-fs-tvix-store"), backend, guest_mem)
|
VhostUserDaemon::new(String::from("vhost-user-fs-snix-store"), backend, guest_mem)
|
||||||
.map_err(|_| Error::NewDaemon)?;
|
.map_err(|_| Error::NewDaemon)?;
|
||||||
|
|
||||||
fs_daemon.start(listener).map_err(|_| Error::StartDaemon)?;
|
fs_daemon.start(listener).map_err(|_| Error::StartDaemon)?;
|
||||||
|
|
@ -259,7 +259,7 @@ impl IngestionEntryGraph {
|
||||||
let entry = self
|
let entry = self
|
||||||
.graph
|
.graph
|
||||||
.node_weight_mut(index)
|
.node_weight_mut(index)
|
||||||
.expect("Tvix bug: missing node entry");
|
.expect("Snix bug: missing node entry");
|
||||||
|
|
||||||
debug_assert!(!(entry.is_dir() && new_entry.is_dir()));
|
debug_assert!(!(entry.is_dir() && new_entry.is_dir()));
|
||||||
|
|
||||||
|
|
@ -286,7 +286,7 @@ impl IngestionEntryGraph {
|
||||||
fn get_node(&self, index: NodeIndex) -> &IngestionEntry {
|
fn get_node(&self, index: NodeIndex) -> &IngestionEntry {
|
||||||
self.graph
|
self.graph
|
||||||
.node_weight(index)
|
.node_weight(index)
|
||||||
.expect("Tvix bug: missing node entry")
|
.expect("Snix bug: missing node entry")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -134,7 +134,7 @@ where
|
||||||
|
|
||||||
let digest = upload_blob(&blob_service, &path, expected_size, r).await?;
|
let digest = upload_blob(&blob_service, &path, expected_size, r).await?;
|
||||||
|
|
||||||
assert_eq!(digest, expected_digest, "Tvix bug: blob digest mismatch");
|
assert_eq!(digest, expected_digest, "Snix bug: blob digest mismatch");
|
||||||
|
|
||||||
// Make sure we hold the permit until we finish writing the blob
|
// Make sure we hold the permit until we finish writing the blob
|
||||||
// to the [BlobService].
|
// to the [BlobService].
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue