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:
|
||||
let
|
||||
importedFile =
|
||||
if scopedArgs != { } && builtins ? scopedImport # For tvix
|
||||
if scopedArgs != { } && builtins ? scopedImport # For snix
|
||||
then builtins.scopedImport scopedArgs path
|
||||
else import path;
|
||||
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",
|
||||
"serde",
|
||||
"sha2",
|
||||
"snix-castore",
|
||||
"snix-store",
|
||||
"snix-tracing",
|
||||
"thiserror 2.0.9",
|
||||
"tokio",
|
||||
"tokio-listener",
|
||||
|
|
@ -2513,9 +2516,6 @@ dependencies = [
|
|||
"tracing",
|
||||
"tracing-subscriber",
|
||||
"tracing-test",
|
||||
"tvix-castore",
|
||||
"tvix-store",
|
||||
"tvix-tracing",
|
||||
"url",
|
||||
]
|
||||
|
||||
|
|
@ -2649,12 +2649,12 @@ dependencies = [
|
|||
"futures",
|
||||
"mimalloc",
|
||||
"nix-compat",
|
||||
"snix-castore",
|
||||
"snix-store",
|
||||
"snix-tracing",
|
||||
"tokio",
|
||||
"tokio-listener",
|
||||
"tracing",
|
||||
"tvix-castore",
|
||||
"tvix-store",
|
||||
"tvix-tracing",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
|
@ -4134,6 +4134,317 @@ dependencies = [
|
|||
"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]]
|
||||
name = "socket2"
|
||||
version = "0.5.8"
|
||||
|
|
@ -4987,317 +5298,6 @@ dependencies = [
|
|||
"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]]
|
||||
name = "typeid"
|
||||
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
|
||||
# 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
|
||||
# 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
|
||||
# technical limitation and it should be our aim to remove this
|
||||
# workspace file and make the subprojects independent.
|
||||
#
|
||||
# Note also that CI targets for actual projects should *not* be tied
|
||||
# to //tvix, but to its subprojects. A potential file at
|
||||
# //tvix/default.nix should likely *not* expose anything other than
|
||||
# to //snix, but to its subprojects. A potential file at
|
||||
# //snix/default.nix should likely *not* expose anything other than
|
||||
# extra steps or other auxiliary targets.
|
||||
|
||||
[workspace]
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
# tvix/boot
|
||||
# snix/boot
|
||||
|
||||
This directory provides tooling to boot VMs with /nix/store provided by
|
||||
virtiofs.
|
||||
|
||||
In the `tests/` subdirectory, there's some integration tests.
|
||||
|
||||
## //tvix/boot:runVM
|
||||
A script spinning up a `tvix-store virtiofs` daemon, then starting a cloud-
|
||||
## //snix/boot:runVM
|
||||
A script spinning up a `snix-store virtiofs` daemon, then starting a cloud-
|
||||
hypervisor VM.
|
||||
|
||||
The cloud-hypervisor VM is using a (semi-)minimal kernel image with virtiofs
|
||||
|
|
@ -21,42 +21,42 @@ It supports the following env vars:
|
|||
boot)
|
||||
|
||||
### 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:
|
||||
|
||||
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
|
||||
```
|
||||
|
||||
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 \
|
||||
--directory-service-addr=redb://$PWD/directories.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)
|
||||
pkill nar-bridge
|
||||
```
|
||||
|
||||
By default, the `tvix-store virtiofs` command used in the `runVM` script
|
||||
connects to a running `tvix-store daemon` via gRPC - in which case you want to
|
||||
keep `tvix-store daemon` running.
|
||||
By default, the `snix-store virtiofs` command used in the `runVM` script
|
||||
connects to a running `snix-store daemon` via gRPC - in which case you want to
|
||||
keep `snix-store daemon` running.
|
||||
|
||||
In case you want to have `tvix-store virtiofs` open the stores directly, kill
|
||||
`tvix-store daemon` too, and export the addresses from above:
|
||||
In case you want to have `snix-store virtiofs` open the stores directly, kill
|
||||
`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 DIRECTORY_SERVICE_ADDR=redb://$PWD/directories.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:
|
||||
|
||||
```
|
||||
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
|
||||
|
|
@ -95,10 +95,10 @@ Run the VM like this:
|
|||
|
||||
```
|
||||
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
|
||||
|
|
@ -115,15 +115,15 @@ Hello, world!
|
|||
```
|
||||
|
||||
#### 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.
|
||||
|
||||
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.
|
||||
|
||||
|
||||
```
|
||||
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 {
|
||||
# A binary that sets up /nix/store from virtiofs, lists all store paths, and
|
||||
# powers off the machine.
|
||||
tvix-init = pkgs.buildGoModule rec {
|
||||
name = "tvix-init";
|
||||
snix-init = pkgs.buildGoModule rec {
|
||||
name = "snix-init";
|
||||
src = lib.fileset.toSource {
|
||||
root = ./.;
|
||||
fileset = ./tvix-init.go;
|
||||
fileset = ./snix-init.go;
|
||||
};
|
||||
vendorHash = null;
|
||||
postPatch = "go mod init ${name}";
|
||||
|
|
@ -48,7 +48,7 @@ rec {
|
|||
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 {
|
||||
name = "initrd.cpio";
|
||||
nativeBuildInputs = [ pkgs.go ];
|
||||
|
|
@ -58,22 +58,22 @@ rec {
|
|||
cp -R ${uroot.src} /tmp/go/src/github.com/u-root/u-root
|
||||
cd /tmp/go/src/github.com/u-root/u-root
|
||||
chmod +w .
|
||||
cp ${tvix-init}/bin/tvix-init tvix-init
|
||||
cp ${snix-init}/bin/snix-init snix-init
|
||||
|
||||
export HOME=$(mktemp -d)
|
||||
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.
|
||||
# Supports the following env vars (and defaults)
|
||||
# CH_NUM_CPUS=2
|
||||
# CH_MEM_SIZE=512M
|
||||
# CH_CMDLINE=""
|
||||
runVM = pkgs.writers.writeBashBin "run-tvix-vm" ''
|
||||
runVM = pkgs.writers.writeBashBin "run-snix-vm" ''
|
||||
tempdir=$(mktemp -d)
|
||||
|
||||
cleanup() {
|
||||
|
|
@ -86,11 +86,11 @@ rec {
|
|||
trap cleanup EXIT
|
||||
|
||||
# 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=$!
|
||||
|
||||
# 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_MEM_SIZE="''${CH_MEM_SIZE:-512M}"
|
||||
|
|
@ -105,7 +105,7 @@ rec {
|
|||
--kernel ${kernel}/${pkgs.stdenv.hostPlatform.linux-kernel.target} \
|
||||
--initramfs ${initrd} \
|
||||
--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 = [
|
||||
|
|
@ -38,13 +38,13 @@ func parseCmdline(cmdline string) map[string]string {
|
|||
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.
|
||||
func mountTvixStore(dest string) error {
|
||||
func mountSnixStore(dest string) error {
|
||||
if err := os.MkdirAll(dest, os.ModePerm); err != nil {
|
||||
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)
|
||||
}
|
||||
|
||||
|
|
@ -80,30 +80,30 @@ func main() {
|
|||
}
|
||||
cmdlineFields := parseCmdline(string(cmdline))
|
||||
|
||||
if _, ok := cmdlineFields["tvix.find"]; ok {
|
||||
// If tvix.find is set, invoke find /nix/store
|
||||
if err := mountTvixStore("/nix/store"); err != nil {
|
||||
log.Printf("Failed to mount tvix store: %v\n", err)
|
||||
if _, ok := cmdlineFields["snix.find"]; ok {
|
||||
// If snix.find is set, invoke find /nix/store
|
||||
if err := mountSnixStore("/nix/store"); err != nil {
|
||||
log.Printf("Failed to mount snix store: %v\n", err)
|
||||
}
|
||||
|
||||
if err := run("find", "/nix/store"); err != nil {
|
||||
log.Printf("Failed to run find command: %s\n", err)
|
||||
}
|
||||
} else if _, ok := cmdlineFields["tvix.shell"]; ok {
|
||||
// If tvix.shell is set, mount the nix store to /nix/store directly,
|
||||
} else if _, ok := cmdlineFields["snix.shell"]; ok {
|
||||
// If snix.shell is set, mount the nix store to /nix/store directly,
|
||||
// then invoke the elvish shell
|
||||
if err := mountTvixStore("/nix/store"); err != nil {
|
||||
log.Printf("Failed to mount tvix store: %v\n", err)
|
||||
if err := mountSnixStore("/nix/store"); err != nil {
|
||||
log.Printf("Failed to mount snix store: %v\n", err)
|
||||
}
|
||||
|
||||
if err := run("elvish"); err != nil {
|
||||
log.Printf("Failed to run shell: %s\n", err)
|
||||
}
|
||||
} else if v, ok := cmdlineFields["tvix.run"]; ok {
|
||||
// If tvix.run is set, mount the nix store to /nix/store directly,
|
||||
} else if v, ok := cmdlineFields["snix.run"]; ok {
|
||||
// If snix.run is set, mount the nix store to /nix/store directly,
|
||||
// then invoke the command.
|
||||
if err := mountTvixStore("/nix/store"); err != nil {
|
||||
log.Printf("Failed to mount tvix store: %v\n", err)
|
||||
if err := mountSnixStore("/nix/store"); err != nil {
|
||||
log.Printf("Failed to mount snix store: %v\n", err)
|
||||
}
|
||||
|
||||
if err := run(v); err != nil {
|
||||
|
|
@ -118,8 +118,8 @@ func main() {
|
|||
}
|
||||
|
||||
// Mount /fs/nix/store
|
||||
if err := mountTvixStore("/fs/nix/store"); err != nil {
|
||||
log.Fatalf("Failed to mount tvix store: %v\n", err)
|
||||
if err := mountSnixStore("/fs/nix/store"); err != nil {
|
||||
log.Fatalf("Failed to mount snix store: %v\n", err)
|
||||
}
|
||||
|
||||
// Invoke switch_root, which will take care of moving /proc, /sys and /dev.
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
{ depot, pkgs, lib, ... }:
|
||||
|
||||
let
|
||||
# Seed a tvix-store with the specified path, then start a VM with the
|
||||
# tvix-boot initrd.
|
||||
# Seed a snix-store with the specified path, then start a VM with the
|
||||
# snix-boot initrd.
|
||||
# Allows customizing the cmdline, which can be used to list files,
|
||||
# or specify what init should be booted.
|
||||
mkBootTest =
|
||||
|
|
@ -17,20 +17,20 @@ let
|
|||
# Whether the path should be imported as a closure.
|
||||
# If false, importPathName must be specified.
|
||||
, 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
|
||||
# takes quite some time.
|
||||
, useNarBridge ? false
|
||||
|
||||
, 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.
|
||||
, preStart ? ""
|
||||
|
||||
# The cmdline to pass to the VM.
|
||||
# Defaults to tvix.find, which lists all files in the store.
|
||||
, vmCmdline ? "tvix.find"
|
||||
# Defaults to snix.find, which lists all files in the store.
|
||||
, vmCmdline ? "snix.find"
|
||||
# The string we expect to find in the VM output.
|
||||
# Defaults the value of `path` (the store path we upload).
|
||||
, assertVMOutput ? path
|
||||
|
|
@ -43,10 +43,10 @@ let
|
|||
name = "run-vm";
|
||||
|
||||
nativeBuildInputs = [
|
||||
depot.tvix.store
|
||||
depot.tvix.boot.runVM
|
||||
depot.snix.store
|
||||
depot.snix.boot.runVM
|
||||
] ++ lib.optionals (isClosure && useNarBridge) [
|
||||
depot.tvix.nar-bridge
|
||||
depot.snix.nar-bridge
|
||||
pkgs.curl
|
||||
pkgs.rush-parallel
|
||||
pkgs.zstd.bin
|
||||
|
|
@ -60,32 +60,32 @@ let
|
|||
|
||||
${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} \
|
||||
DIRECTORY_SERVICE_ADDR=${lib.escapeShellArg directoryServiceAddr} \
|
||||
PATH_INFO_SERVICE_ADDR=${lib.escapeShellArg pathInfoServiceAddr} \
|
||||
tvix-store \
|
||||
snix-store \
|
||||
--otlp=false \
|
||||
daemon -l $PWD/tvix-store.sock &
|
||||
daemon -l $PWD/snix-store.sock &
|
||||
|
||||
# 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
|
||||
# our tvix-store daemon over the unix socket.
|
||||
export BLOB_SERVICE_ADDR=grpc+unix://$PWD/tvix-store.sock
|
||||
export DIRECTORY_SERVICE_ADDR=grpc+unix://$PWD/tvix-store.sock
|
||||
export PATH_INFO_SERVICE_ADDR=grpc+unix://$PWD/tvix-store.sock
|
||||
# Export env vars so that subsequent snix-store commands will talk to
|
||||
# our snix-store daemon over the unix socket.
|
||||
export BLOB_SERVICE_ADDR=grpc+unix://$PWD/snix-store.sock
|
||||
export DIRECTORY_SERVICE_ADDR=grpc+unix://$PWD/snix-store.sock
|
||||
export PATH_INFO_SERVICE_ADDR=grpc+unix://$PWD/snix-store.sock
|
||||
'' + 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}
|
||||
outpath=$(tvix-store import ${importPathName})
|
||||
outpath=$(snix-store import ${importPathName})
|
||||
|
||||
echo "imported to $outpath"
|
||||
'' + lib.optionalString (isClosure && !useNarBridge) ''
|
||||
echo "Copying closure ${path}…"
|
||||
# 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) ''
|
||||
echo "Starting nar-bridge…"
|
||||
nar-bridge \
|
||||
|
|
@ -123,10 +123,10 @@ let
|
|||
# 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 {}) < {}'
|
||||
'' + ''
|
||||
# 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…"
|
||||
|
||||
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
|
||||
'';
|
||||
requiredSystemFeatures = [ "kvm" ];
|
||||
|
|
@ -182,9 +182,9 @@ depot.nix.readTree.drvTargets {
|
|||
importPathName = "docs";
|
||||
});
|
||||
|
||||
closure-tvix = (mkBootTest {
|
||||
closure-snix = (mkBootTest {
|
||||
blobServiceAddr = "objectstore+file:///build/blobs";
|
||||
path = depot.tvix.store;
|
||||
path = depot.snix.store;
|
||||
isClosure = true;
|
||||
});
|
||||
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
Copyright © The Tvix Authors
|
||||
Copyright © The Snix Project
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
# 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.
|
||||
|
||||
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.
|
||||
|
||||
Additionally, code useful when interacting with these data structures
|
||||
|
|
@ -1,19 +1,20 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright © 2022 The Tvix Authors
|
||||
// Copyright © 2025 The Snix Project
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc (unknown)
|
||||
// source: tvix/build/protos/build.proto
|
||||
// source: snix/build/protos/build.proto
|
||||
|
||||
package buildv1
|
||||
|
||||
import (
|
||||
castore_go "code.tvl.fyi/tvix/castore-go"
|
||||
protoreflect "google.golang.org/protobuf/reflect/protoreflect"
|
||||
protoimpl "google.golang.org/protobuf/runtime/protoimpl"
|
||||
reflect "reflect"
|
||||
proto "snix.dev/castore/proto"
|
||||
sync "sync"
|
||||
unsafe "unsafe"
|
||||
)
|
||||
|
|
@ -47,7 +48,7 @@ const (
|
|||
// to either the input's deriver (and needs to build it) or else a trusted
|
||||
// source for the built input.
|
||||
// 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
|
||||
// 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
|
||||
// needed to substitute / make these available in the build environment.
|
||||
// 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.
|
||||
// In the case of a Nix derivation, this is usually
|
||||
// ["/path/to/some-bash/bin/bash", "-e", "/path/to/some/builder.sh"].
|
||||
|
|
@ -124,7 +125,7 @@ type BuildRequest struct {
|
|||
|
||||
func (x *BuildRequest) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -136,7 +137,7 @@ func (x *BuildRequest) String() string {
|
|||
func (*BuildRequest) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -149,10 +150,10 @@ func (x *BuildRequest) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use BuildRequest.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
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?
|
||||
// The outputs that were produced after successfully building.
|
||||
// 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.
|
||||
OutputsNeedles []*Build_OutputNeedles `protobuf:"bytes,3,rep,name=outputs_needles,json=outputsNeedles,proto3" json:"outputs_needles,omitempty"`
|
||||
unknownFields protoimpl.UnknownFields
|
||||
|
|
@ -238,7 +239,7 @@ type Build struct {
|
|||
|
||||
func (x *Build) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -250,7 +251,7 @@ func (x *Build) String() string {
|
|||
func (*Build) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -263,7 +264,7 @@ func (x *Build) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use Build.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -273,7 +274,7 @@ func (x *Build) GetBuildRequest() *BuildRequest {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (x *Build) GetOutputs() []*castore_go.Node {
|
||||
func (x *Build) GetOutputs() []*proto.Node {
|
||||
if x != nil {
|
||||
return x.Outputs
|
||||
}
|
||||
|
|
@ -298,7 +299,7 @@ type BuildRequest_EnvVar struct {
|
|||
|
||||
func (x *BuildRequest_EnvVar) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -310,7 +311,7 @@ func (x *BuildRequest_EnvVar) String() string {
|
|||
func (*BuildRequest_EnvVar) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -323,7 +324,7 @@ func (x *BuildRequest_EnvVar) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use BuildRequest_EnvVar.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -369,7 +370,7 @@ type BuildRequest_BuildConstraints struct {
|
|||
|
||||
func (x *BuildRequest_BuildConstraints) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -381,7 +382,7 @@ func (x *BuildRequest_BuildConstraints) String() string {
|
|||
func (*BuildRequest_BuildConstraints) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -394,7 +395,7 @@ func (x *BuildRequest_BuildConstraints) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use BuildRequest_BuildConstraints.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -442,7 +443,7 @@ type BuildRequest_AdditionalFile struct {
|
|||
|
||||
func (x *BuildRequest_AdditionalFile) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -454,7 +455,7 @@ func (x *BuildRequest_AdditionalFile) String() string {
|
|||
func (*BuildRequest_AdditionalFile) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -467,7 +468,7 @@ func (x *BuildRequest_AdditionalFile) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use BuildRequest_AdditionalFile.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -494,7 +495,7 @@ type Build_OutputNeedles struct {
|
|||
|
||||
func (x *Build_OutputNeedles) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -506,7 +507,7 @@ func (x *Build_OutputNeedles) String() string {
|
|||
func (*Build_OutputNeedles) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -519,7 +520,7 @@ func (x *Build_OutputNeedles) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use Build_OutputNeedles.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -529,17 +530,17 @@ func (x *Build_OutputNeedles) GetNeedles() []uint64 {
|
|||
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{
|
||||
0x0a, 0x1d, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x70, 0x72, 0x6f,
|
||||
var file_snix_build_protos_build_proto_rawDesc = string([]byte{
|
||||
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,
|
||||
0x0d, 0x74, 0x76, 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,
|
||||
0x0d, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 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, 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,
|
||||
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,
|
||||
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,
|
||||
|
|
@ -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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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, 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,
|
||||
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,
|
||||
0x76, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69,
|
||||
0x5f, 0x66, 0x69, 0x6c, 0x65, 0x73, 0x18, 0x09, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2a, 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, 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, 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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0x65, 0x73, 0x42, 0x24, 0x5a, 0x22, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x74, 0x76, 0x6c, 0x2e, 0x66,
|
||||
0x79, 0x69, 0x2f, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2d, 0x67, 0x6f,
|
||||
0x3b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x73, 0x42, 0x1e, 0x5a, 0x1c, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x62,
|
||||
0x75, 0x69, 0x6c, 0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x62, 0x75, 0x69, 0x6c, 0x64,
|
||||
0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
})
|
||||
|
||||
var (
|
||||
file_tvix_build_protos_build_proto_rawDescOnce sync.Once
|
||||
file_tvix_build_protos_build_proto_rawDescData []byte
|
||||
file_snix_build_protos_build_proto_rawDescOnce sync.Once
|
||||
file_snix_build_protos_build_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_tvix_build_protos_build_proto_rawDescGZIP() []byte {
|
||||
file_tvix_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)))
|
||||
func file_snix_build_protos_build_proto_rawDescGZIP() []byte {
|
||||
file_snix_build_protos_build_proto_rawDescOnce.Do(func() {
|
||||
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_tvix_build_protos_build_proto_goTypes = []any{
|
||||
(*BuildRequest)(nil), // 0: tvix.build.v1.BuildRequest
|
||||
(*Build)(nil), // 1: tvix.build.v1.Build
|
||||
(*BuildRequest_EnvVar)(nil), // 2: tvix.build.v1.BuildRequest.EnvVar
|
||||
(*BuildRequest_BuildConstraints)(nil), // 3: tvix.build.v1.BuildRequest.BuildConstraints
|
||||
(*BuildRequest_AdditionalFile)(nil), // 4: tvix.build.v1.BuildRequest.AdditionalFile
|
||||
(*Build_OutputNeedles)(nil), // 5: tvix.build.v1.Build.OutputNeedles
|
||||
(*castore_go.Node)(nil), // 6: tvix.castore.v1.Node
|
||||
var file_snix_build_protos_build_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_snix_build_protos_build_proto_goTypes = []any{
|
||||
(*BuildRequest)(nil), // 0: snix.build.v1.BuildRequest
|
||||
(*Build)(nil), // 1: snix.build.v1.Build
|
||||
(*BuildRequest_EnvVar)(nil), // 2: snix.build.v1.BuildRequest.EnvVar
|
||||
(*BuildRequest_BuildConstraints)(nil), // 3: snix.build.v1.BuildRequest.BuildConstraints
|
||||
(*BuildRequest_AdditionalFile)(nil), // 4: snix.build.v1.BuildRequest.AdditionalFile
|
||||
(*Build_OutputNeedles)(nil), // 5: snix.build.v1.Build.OutputNeedles
|
||||
(*proto.Node)(nil), // 6: snix.castore.v1.Node
|
||||
}
|
||||
var file_tvix_build_protos_build_proto_depIdxs = []int32{
|
||||
6, // 0: tvix.build.v1.BuildRequest.inputs:type_name -> tvix.castore.v1.Node
|
||||
2, // 1: tvix.build.v1.BuildRequest.environment_vars:type_name -> tvix.build.v1.BuildRequest.EnvVar
|
||||
3, // 2: tvix.build.v1.BuildRequest.constraints:type_name -> tvix.build.v1.BuildRequest.BuildConstraints
|
||||
4, // 3: tvix.build.v1.BuildRequest.additional_files:type_name -> tvix.build.v1.BuildRequest.AdditionalFile
|
||||
0, // 4: tvix.build.v1.Build.build_request:type_name -> tvix.build.v1.BuildRequest
|
||||
6, // 5: tvix.build.v1.Build.outputs:type_name -> tvix.castore.v1.Node
|
||||
5, // 6: tvix.build.v1.Build.outputs_needles:type_name -> tvix.build.v1.Build.OutputNeedles
|
||||
var file_snix_build_protos_build_proto_depIdxs = []int32{
|
||||
6, // 0: snix.build.v1.BuildRequest.inputs:type_name -> snix.castore.v1.Node
|
||||
2, // 1: snix.build.v1.BuildRequest.environment_vars:type_name -> snix.build.v1.BuildRequest.EnvVar
|
||||
3, // 2: snix.build.v1.BuildRequest.constraints:type_name -> snix.build.v1.BuildRequest.BuildConstraints
|
||||
4, // 3: snix.build.v1.BuildRequest.additional_files:type_name -> snix.build.v1.BuildRequest.AdditionalFile
|
||||
0, // 4: snix.build.v1.Build.build_request:type_name -> snix.build.v1.BuildRequest
|
||||
6, // 5: snix.build.v1.Build.outputs:type_name -> snix.castore.v1.Node
|
||||
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 input_type
|
||||
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
|
||||
}
|
||||
|
||||
func init() { file_tvix_build_protos_build_proto_init() }
|
||||
func file_tvix_build_protos_build_proto_init() {
|
||||
if File_tvix_build_protos_build_proto != nil {
|
||||
func init() { file_snix_build_protos_build_proto_init() }
|
||||
func file_snix_build_protos_build_proto_init() {
|
||||
if File_snix_build_protos_build_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
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,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_tvix_build_protos_build_proto_goTypes,
|
||||
DependencyIndexes: file_tvix_build_protos_build_proto_depIdxs,
|
||||
MessageInfos: file_tvix_build_protos_build_proto_msgTypes,
|
||||
GoTypes: file_snix_build_protos_build_proto_goTypes,
|
||||
DependencyIndexes: file_snix_build_protos_build_proto_depIdxs,
|
||||
MessageInfos: file_snix_build_protos_build_proto_msgTypes,
|
||||
}.Build()
|
||||
File_tvix_build_protos_build_proto = out.File
|
||||
file_tvix_build_protos_build_proto_goTypes = nil
|
||||
file_tvix_build_protos_build_proto_depIdxs = nil
|
||||
File_snix_build_protos_build_proto = out.File
|
||||
file_snix_build_protos_build_proto_goTypes = nil
|
||||
file_snix_build_protos_build_proto_depIdxs = nil
|
||||
}
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
let
|
||||
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
|
||||
(pkgs.buildGoModule {
|
||||
|
|
@ -18,7 +18,7 @@ in
|
|||
${regenerate}
|
||||
if [[ -n "$(git status --porcelain -unormal)" ]]; then
|
||||
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 "-----------------------------"
|
||||
git status -unormal
|
||||
exit 1
|
||||
|
|
@ -27,5 +27,7 @@ in
|
|||
alwaysRun = true;
|
||||
};
|
||||
};
|
||||
# https://git.snix.dev/snix/snix/issues/60
|
||||
meta.ci.skip = true;
|
||||
passthru.regenerate = regenerate;
|
||||
})
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright © 2022 The Tvix Authors
|
||||
// Copyright © 2025 The Snix Project
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc (unknown)
|
||||
// source: tvix/build/protos/rpc_build.proto
|
||||
// source: snix/build/protos/rpc_build.proto
|
||||
|
||||
package buildv1
|
||||
|
||||
|
|
@ -23,31 +24,31 @@ const (
|
|||
_ = 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{
|
||||
0x0a, 0x21, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x70, 0x72, 0x6f,
|
||||
var file_snix_build_protos_rpc_build_proto_rawDesc = string([]byte{
|
||||
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,
|
||||
0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x74, 0x76, 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,
|
||||
0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2e,
|
||||
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,
|
||||
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,
|
||||
0x76, 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,
|
||||
0x65, 0x12, 0x3c, 0x0a, 0x07, 0x44, 0x6f, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x1b, 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, 0x1a, 0x14, 0x2e, 0x73, 0x6e, 0x69, 0x78,
|
||||
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,
|
||||
0x74, 0x76, 0x69, 0x78, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2d, 0x67, 0x6f, 0x3b, 0x62, 0x75,
|
||||
0x69, 0x6c, 0x64, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x1e, 0x5a, 0x1c, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x62, 0x75, 0x69, 0x6c,
|
||||
0x64, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x76, 0x31, 0x62,
|
||||
0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
})
|
||||
|
||||
var file_tvix_build_protos_rpc_build_proto_goTypes = []any{
|
||||
(*BuildRequest)(nil), // 0: tvix.build.v1.BuildRequest
|
||||
(*Build)(nil), // 1: tvix.build.v1.Build
|
||||
var file_snix_build_protos_rpc_build_proto_goTypes = []any{
|
||||
(*BuildRequest)(nil), // 0: snix.build.v1.BuildRequest
|
||||
(*Build)(nil), // 1: snix.build.v1.Build
|
||||
}
|
||||
var file_tvix_build_protos_rpc_build_proto_depIdxs = []int32{
|
||||
0, // 0: tvix.build.v1.BuildService.DoBuild:input_type -> tvix.build.v1.BuildRequest
|
||||
1, // 1: tvix.build.v1.BuildService.DoBuild:output_type -> tvix.build.v1.Build
|
||||
var file_snix_build_protos_rpc_build_proto_depIdxs = []int32{
|
||||
0, // 0: snix.build.v1.BuildService.DoBuild:input_type -> snix.build.v1.BuildRequest
|
||||
1, // 1: snix.build.v1.BuildService.DoBuild:output_type -> snix.build.v1.Build
|
||||
1, // [1:2] is the sub-list for method output_type
|
||||
0, // [0:1] is the sub-list for method input_type
|
||||
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
|
||||
}
|
||||
|
||||
func init() { file_tvix_build_protos_rpc_build_proto_init() }
|
||||
func file_tvix_build_protos_rpc_build_proto_init() {
|
||||
if File_tvix_build_protos_rpc_build_proto != nil {
|
||||
func init() { file_snix_build_protos_rpc_build_proto_init() }
|
||||
func file_snix_build_protos_rpc_build_proto_init() {
|
||||
if File_snix_build_protos_rpc_build_proto != nil {
|
||||
return
|
||||
}
|
||||
file_tvix_build_protos_build_proto_init()
|
||||
file_snix_build_protos_build_proto_init()
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
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,
|
||||
NumMessages: 0,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_tvix_build_protos_rpc_build_proto_goTypes,
|
||||
DependencyIndexes: file_tvix_build_protos_rpc_build_proto_depIdxs,
|
||||
GoTypes: file_snix_build_protos_rpc_build_proto_goTypes,
|
||||
DependencyIndexes: file_snix_build_protos_rpc_build_proto_depIdxs,
|
||||
}.Build()
|
||||
File_tvix_build_protos_rpc_build_proto = out.File
|
||||
file_tvix_build_protos_rpc_build_proto_goTypes = nil
|
||||
file_tvix_build_protos_rpc_build_proto_depIdxs = nil
|
||||
File_snix_build_protos_rpc_build_proto = out.File
|
||||
file_snix_build_protos_rpc_build_proto_goTypes = nil
|
||||
file_snix_build_protos_rpc_build_proto_depIdxs = nil
|
||||
}
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright © 2022 The Tvix Authors
|
||||
// Copyright © 2025 The Snix Project
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: tvix/build/protos/rpc_build.proto
|
||||
// source: snix/build/protos/rpc_build.proto
|
||||
|
||||
package buildv1
|
||||
|
||||
|
|
@ -22,7 +23,7 @@ import (
|
|||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
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.
|
||||
|
|
@ -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,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var BuildService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "tvix.build.v1.BuildService",
|
||||
ServiceName: "snix.build.v1.BuildService",
|
||||
HandlerType: (*BuildServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
|
|
@ -120,5 +121,5 @@ var BuildService_ServiceDesc = grpc.ServiceDesc{
|
|||
},
|
||||
},
|
||||
Streams: []grpc.StreamDesc{},
|
||||
Metadata: "tvix/build/protos/rpc_build.proto",
|
||||
Metadata: "snix/build/protos/rpc_build.proto",
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "tvix-build"
|
||||
name = "snix-build"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
|
|
@ -13,7 +13,7 @@ tokio = { workspace = true, features = ["process"] }
|
|||
tokio-listener = { workspace = true, features = ["tonic012"] }
|
||||
tonic = { workspace = true, features = ["tls", "tls-roots"] }
|
||||
# TODO: put the fuse dep behind a feature flag?
|
||||
tvix-castore = { path = "../castore", features = ["fuse"]}
|
||||
snix-castore = { path = "../castore", features = ["fuse"]}
|
||||
tracing.workspace = true
|
||||
url.workspace = true
|
||||
mimalloc.workspace = true
|
||||
|
|
@ -26,7 +26,7 @@ data-encoding = "2.5.0"
|
|||
futures = "0.3.30"
|
||||
oci-spec = "0.7.0"
|
||||
serde_json = "1.0.111"
|
||||
tvix-tracing = { path = "../tracing" }
|
||||
snix-tracing = { path = "../tracing" }
|
||||
uuid = { version = "1.7.0", features = ["v4"] }
|
||||
|
||||
[build-dependencies]
|
||||
|
|
@ -35,7 +35,7 @@ tonic-build.workspace = true
|
|||
|
||||
[features]
|
||||
default = []
|
||||
tonic-reflection = ["dep:tonic-reflection", "tvix-castore/tonic-reflection"]
|
||||
tonic-reflection = ["dep:tonic-reflection", "snix-castore/tonic-reflection"]
|
||||
|
||||
[dev-dependencies]
|
||||
rstest.workspace = true
|
||||
|
|
@ -7,7 +7,7 @@ fn main() -> Result<()> {
|
|||
#[cfg(feature = "tonic-reflection")]
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
|
@ -17,11 +17,11 @@ fn main() -> Result<()> {
|
|||
.build_client(true)
|
||||
.emit_rerun_if_changed(false)
|
||||
.bytes(["."])
|
||||
.extern_path(".tvix.castore.v1", "::tvix_castore::proto")
|
||||
.extern_path(".snix.castore.v1", "::snix_castore::proto")
|
||||
.compile_protos(
|
||||
&[
|
||||
"tvix/build/protos/build.proto",
|
||||
"tvix/build/protos/rpc_build.proto",
|
||||
"snix/build/protos/build.proto",
|
||||
"snix/build/protos/rpc_build.proto",
|
||||
],
|
||||
// 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
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
{ depot, lib, ... }:
|
||||
|
||||
(depot.tvix.crates.workspaceMembers.tvix-build.build.override {
|
||||
(depot.snix.crates.workspaceMembers.snix-build.build.override {
|
||||
runTests = true;
|
||||
}).overrideAttrs (old: rec {
|
||||
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;
|
||||
features = [ "tonic-reflection" ];
|
||||
});
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
Copyright © The Tvix Authors
|
||||
Copyright © The Snix Project
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
|
@ -1,13 +1,14 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright © 2022 The Tvix Authors
|
||||
// Copyright © 2025 The Snix Project
|
||||
|
||||
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.
|
||||
// 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
|
||||
// source for the built input.
|
||||
// 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
|
||||
// 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
|
||||
// needed to substitute / make these available in the build environment.
|
||||
// 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.
|
||||
// In the case of a Nix derivation, this is usually
|
||||
|
|
@ -160,7 +161,7 @@ message Build {
|
|||
|
||||
// The outputs that were produced after successfully building.
|
||||
// They are sorted by their names.
|
||||
repeated tvix.castore.v1.Node outputs = 2;
|
||||
repeated snix.castore.v1.Node outputs = 2;
|
||||
|
||||
message OutputNeedles {
|
||||
// The numbers are indexing into `refscan_needles` originally specified in the BuildRequest.
|
||||
|
|
@ -4,8 +4,8 @@ let
|
|||
"buf.yaml"
|
||||
"buf.gen.yaml"
|
||||
# We need to include castore.proto (only), as it's referred.
|
||||
"^tvix(/castore(/protos(/castore\.proto)?)?)?$"
|
||||
"^tvix(/build(/protos(/.*\.proto)?)?)?$"
|
||||
"^snix(/castore(/protos(/castore\.proto)?)?)?$"
|
||||
"^snix(/build(/protos(/.*\.proto)?)?)?$"
|
||||
];
|
||||
in
|
||||
depot.nix.readTree.drvTargets {
|
||||
|
|
@ -45,7 +45,7 @@ depot.nix.readTree.drvTargets {
|
|||
buf generate
|
||||
|
||||
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
|
||||
// Copyright © 2022 The Tvix Authors
|
||||
// Copyright © 2025 The Snix Project
|
||||
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 {
|
||||
rpc DoBuild(BuildRequest) returns (Build);
|
||||
|
|
@ -1,21 +1,21 @@
|
|||
use clap::Parser;
|
||||
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::SystemOptions;
|
||||
use tokio_listener::UserOptions;
|
||||
use tonic::{self, transport::Server};
|
||||
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")]
|
||||
use tvix_build::proto::FILE_DESCRIPTOR_SET;
|
||||
use snix_build::proto::FILE_DESCRIPTOR_SET;
|
||||
#[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;
|
||||
|
||||
|
|
@ -30,7 +30,7 @@ struct Cli {
|
|||
}
|
||||
#[derive(Subcommand)]
|
||||
enum Commands {
|
||||
/// Runs the tvix-build daemon.
|
||||
/// Runs the snix-build daemon.
|
||||
Daemon {
|
||||
#[arg(long, short = 'l')]
|
||||
listen_address: Option<String>,
|
||||
|
|
@ -50,7 +50,7 @@ enum Commands {
|
|||
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||
let cli = Cli::parse();
|
||||
|
||||
tvix_tracing::TracingBuilder::default()
|
||||
snix_tracing::TracingBuilder::default()
|
||||
.enable_progressbar()
|
||||
.build()?;
|
||||
|
||||
|
|
@ -2,7 +2,7 @@ use std::collections::{BTreeMap, HashSet};
|
|||
use std::path::PathBuf;
|
||||
|
||||
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.
|
||||
/// It is distinct from an actual \[Build\] that has already happened, or might be
|
||||
/// 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
|
||||
/// source for the built input.
|
||||
/// 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
|
||||
/// builder from having to "trust" any input-addressed paths, contrary to Nix.
|
||||
///
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
use super::{grpc::GRPCBuildService, BuildService, DummyBuildService};
|
||||
use tvix_castore::{blobservice::BlobService, directoryservice::DirectoryService};
|
||||
use snix_castore::{blobservice::BlobService, directoryservice::DirectoryService};
|
||||
use url::Url;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
|
|
@ -48,7 +48,7 @@ where
|
|||
scheme => {
|
||||
if scheme.starts_with("grpc+") {
|
||||
let client = crate::proto::build_service_client::BuildServiceClient::new(
|
||||
tvix_castore::tonic::channel_from_url(&url)
|
||||
snix_castore::tonic::channel_from_url(&url)
|
||||
.await
|
||||
.map_err(std::io::Error::other)?,
|
||||
);
|
||||
|
|
@ -69,15 +69,15 @@ where
|
|||
mod tests {
|
||||
use super::from_addr;
|
||||
use rstest::rstest;
|
||||
use snix_castore::{
|
||||
blobservice::{BlobService, MemoryBlobService},
|
||||
directoryservice::{DirectoryService, MemoryDirectoryService},
|
||||
};
|
||||
use std::sync::Arc;
|
||||
#[cfg(target_os = "linux")]
|
||||
use std::sync::LazyLock;
|
||||
#[cfg(target_os = "linux")]
|
||||
use tempfile::TempDir;
|
||||
use tvix_castore::{
|
||||
blobservice::{BlobService, MemoryBlobService},
|
||||
directoryservice::{DirectoryService, MemoryDirectoryService},
|
||||
};
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
static TMPDIR_OCI_1: LazyLock<TempDir> = LazyLock::new(|| TempDir::new().unwrap());
|
||||
|
|
@ -1,16 +1,16 @@
|
|||
use anyhow::Context;
|
||||
use bstr::BStr;
|
||||
use oci_spec::runtime::{LinuxIdMapping, LinuxIdMappingBuilder};
|
||||
use tokio::process::{Child, Command};
|
||||
use tonic::async_trait;
|
||||
use tracing::{debug, instrument, warn, Span};
|
||||
use tvix_castore::{
|
||||
use snix_castore::{
|
||||
blobservice::BlobService,
|
||||
directoryservice::DirectoryService,
|
||||
fs::fuse::FuseDaemon,
|
||||
import::fs::ingest_path,
|
||||
refscan::{ReferencePattern, ReferenceScanner},
|
||||
};
|
||||
use tokio::process::{Child, Command};
|
||||
use tonic::async_trait;
|
||||
use tracing::{debug, instrument, warn, Span};
|
||||
use uuid::Uuid;
|
||||
|
||||
use crate::buildservice::BuildRequest;
|
||||
|
|
@ -22,7 +22,7 @@ use std::{ffi::OsStr, path::PathBuf, process::Stdio};
|
|||
|
||||
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
|
||||
|
||||
pub struct OCIBuildService<BS, DS> {
|
||||
|
|
@ -127,7 +127,7 @@ where
|
|||
.context("failed to calculate host output paths")
|
||||
.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());
|
||||
// NOTE: impl Drop for FuseDaemon unmounts, so if the call is cancelled, umount.
|
||||
let _fuse_daemon = tokio::task::spawn_blocking({
|
||||
|
|
@ -138,7 +138,7 @@ where
|
|||
|
||||
let root_nodes = Box::new(request.inputs.clone());
|
||||
move || {
|
||||
let fs = tvix_castore::fs::TvixStoreFs::new(
|
||||
let fs = snix_castore::fs::SnixStoreFs::new(
|
||||
blob_service,
|
||||
directory_service,
|
||||
root_nodes,
|
||||
|
|
@ -216,7 +216,7 @@ where
|
|||
};
|
||||
|
||||
Ok::<_, std::io::Error>((
|
||||
tvix_castore::proto::Node::from_name_and_node(
|
||||
snix_castore::proto::Node::from_name_and_node(
|
||||
output_path
|
||||
.file_name()
|
||||
.and_then(|s| s.to_str())
|
||||
|
|
@ -225,7 +225,7 @@ fn configure_mounts<'a>(
|
|||
rootless: bool,
|
||||
allow_network: bool,
|
||||
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,
|
||||
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 itertools::Itertools;
|
||||
use tvix_castore::{DirectoryError, Node, PathComponent};
|
||||
use snix_castore::{DirectoryError, Node, PathComponent};
|
||||
|
||||
mod grpc_buildservice_wrapper;
|
||||
|
||||
pub use grpc_buildservice_wrapper::GRPCBuildServiceWrapper;
|
||||
|
||||
tonic::include_proto!("tvix.build.v1");
|
||||
tonic::include_proto!("snix.build.v1");
|
||||
|
||||
#[cfg(feature = "tonic-reflection")]
|
||||
/// Compiled file descriptors for implementing [gRPC
|
||||
/// reflection](https://github.com/grpc/grpc/blob/master/doc/server-reflection.md) with e.g.
|
||||
/// [`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.
|
||||
#[derive(Debug, thiserror::Error)]
|
||||
|
|
@ -120,7 +120,7 @@ where
|
|||
|
||||
fn path_to_string(path: &Path) -> String {
|
||||
path.to_str()
|
||||
.expect("Tvix Bug: unable to convert Path to String")
|
||||
.expect("Snix Bug: unable to convert Path to String")
|
||||
.to_string()
|
||||
}
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ impl From<crate::buildservice::BuildRequest> for BuildRequest {
|
|||
.inputs
|
||||
.into_iter()
|
||||
.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(),
|
||||
command_args: value.command_args,
|
||||
|
|
@ -311,7 +311,7 @@ impl From<crate::buildservice::AdditionalFile> for build_request::AdditionalFile
|
|||
path: value
|
||||
.path
|
||||
.to_str()
|
||||
.expect("Tvix bug: expected a valid path")
|
||||
.expect("Snix bug: expected a valid path")
|
||||
.to_string(),
|
||||
contents: value.contents,
|
||||
}
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
Copyright © The Tvix Authors
|
||||
Copyright © The Snix Project
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
# 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.
|
||||
|
||||
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.
|
||||
|
||||
Additionally, code useful when interacting with these data structures
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
// SPDX-FileCopyrightText: edef <edef@unfathomable.blue>
|
||||
// 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.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc (unknown)
|
||||
// source: tvix/castore/protos/castore.proto
|
||||
// source: snix/castore/protos/castore.proto
|
||||
|
||||
package castorev1
|
||||
|
||||
|
|
@ -45,7 +46,7 @@ type Directory struct {
|
|||
|
||||
func (x *Directory) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -57,7 +58,7 @@ func (x *Directory) String() string {
|
|||
func (*Directory) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -70,7 +71,7 @@ func (x *Directory) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use Directory.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -118,7 +119,7 @@ type DirectoryNode struct {
|
|||
|
||||
func (x *DirectoryNode) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -130,7 +131,7 @@ func (x *DirectoryNode) String() string {
|
|||
func (*DirectoryNode) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -143,7 +144,7 @@ func (x *DirectoryNode) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use DirectoryNode.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -184,7 +185,7 @@ type FileNode struct {
|
|||
|
||||
func (x *FileNode) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -196,7 +197,7 @@ func (x *FileNode) String() string {
|
|||
func (*FileNode) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -209,7 +210,7 @@ func (x *FileNode) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use FileNode.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -253,7 +254,7 @@ type SymlinkNode struct {
|
|||
|
||||
func (x *SymlinkNode) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -265,7 +266,7 @@ func (x *SymlinkNode) String() string {
|
|||
func (*SymlinkNode) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -278,7 +279,7 @@ func (x *SymlinkNode) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use SymlinkNode.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -310,7 +311,7 @@ type Node struct {
|
|||
|
||||
func (x *Node) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -322,7 +323,7 @@ func (x *Node) String() string {
|
|||
func (*Node) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -335,7 +336,7 @@ func (x *Node) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use Node.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -394,22 +395,22 @@ func (*Node_File) 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{
|
||||
0x0a, 0x21, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70,
|
||||
var file_snix_castore_protos_castore_proto_rawDesc = string([]byte{
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
|
|
@ -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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0x66, 0x79, 0x69, 0x2f, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65,
|
||||
0x2d, 0x67, 0x6f, 0x3b, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x76, 0x31, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6f, 0x64, 0x65, 0x42, 0x22, 0x5a, 0x20, 0x73, 0x6e, 0x69, 0x78, 0x2e, 0x64, 0x65, 0x76, 0x2f,
|
||||
0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x61,
|
||||
0x73, 0x74, 0x6f, 0x72, 0x65, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
})
|
||||
|
||||
var (
|
||||
file_tvix_castore_protos_castore_proto_rawDescOnce sync.Once
|
||||
file_tvix_castore_protos_castore_proto_rawDescData []byte
|
||||
file_snix_castore_protos_castore_proto_rawDescOnce sync.Once
|
||||
file_snix_castore_protos_castore_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_tvix_castore_protos_castore_proto_rawDescGZIP() []byte {
|
||||
file_tvix_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)))
|
||||
func file_snix_castore_protos_castore_proto_rawDescGZIP() []byte {
|
||||
file_snix_castore_protos_castore_proto_rawDescOnce.Do(func() {
|
||||
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_tvix_castore_protos_castore_proto_goTypes = []any{
|
||||
(*Directory)(nil), // 0: tvix.castore.v1.Directory
|
||||
(*DirectoryNode)(nil), // 1: tvix.castore.v1.DirectoryNode
|
||||
(*FileNode)(nil), // 2: tvix.castore.v1.FileNode
|
||||
(*SymlinkNode)(nil), // 3: tvix.castore.v1.SymlinkNode
|
||||
(*Node)(nil), // 4: tvix.castore.v1.Node
|
||||
var file_snix_castore_protos_castore_proto_msgTypes = make([]protoimpl.MessageInfo, 5)
|
||||
var file_snix_castore_protos_castore_proto_goTypes = []any{
|
||||
(*Directory)(nil), // 0: snix.castore.v1.Directory
|
||||
(*DirectoryNode)(nil), // 1: snix.castore.v1.DirectoryNode
|
||||
(*FileNode)(nil), // 2: snix.castore.v1.FileNode
|
||||
(*SymlinkNode)(nil), // 3: snix.castore.v1.SymlinkNode
|
||||
(*Node)(nil), // 4: snix.castore.v1.Node
|
||||
}
|
||||
var file_tvix_castore_protos_castore_proto_depIdxs = []int32{
|
||||
1, // 0: tvix.castore.v1.Directory.directories:type_name -> tvix.castore.v1.DirectoryNode
|
||||
2, // 1: tvix.castore.v1.Directory.files:type_name -> tvix.castore.v1.FileNode
|
||||
3, // 2: tvix.castore.v1.Directory.symlinks:type_name -> tvix.castore.v1.SymlinkNode
|
||||
1, // 3: tvix.castore.v1.Node.directory:type_name -> tvix.castore.v1.DirectoryNode
|
||||
2, // 4: tvix.castore.v1.Node.file:type_name -> tvix.castore.v1.FileNode
|
||||
3, // 5: tvix.castore.v1.Node.symlink:type_name -> tvix.castore.v1.SymlinkNode
|
||||
var file_snix_castore_protos_castore_proto_depIdxs = []int32{
|
||||
1, // 0: snix.castore.v1.Directory.directories:type_name -> snix.castore.v1.DirectoryNode
|
||||
2, // 1: snix.castore.v1.Directory.files:type_name -> snix.castore.v1.FileNode
|
||||
3, // 2: snix.castore.v1.Directory.symlinks:type_name -> snix.castore.v1.SymlinkNode
|
||||
1, // 3: snix.castore.v1.Node.directory:type_name -> snix.castore.v1.DirectoryNode
|
||||
2, // 4: snix.castore.v1.Node.file:type_name -> snix.castore.v1.FileNode
|
||||
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 input_type
|
||||
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
|
||||
}
|
||||
|
||||
func init() { file_tvix_castore_protos_castore_proto_init() }
|
||||
func file_tvix_castore_protos_castore_proto_init() {
|
||||
if File_tvix_castore_protos_castore_proto != nil {
|
||||
func init() { file_snix_castore_protos_castore_proto_init() }
|
||||
func file_snix_castore_protos_castore_proto_init() {
|
||||
if File_snix_castore_protos_castore_proto != nil {
|
||||
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_File)(nil),
|
||||
(*Node_Symlink)(nil),
|
||||
|
|
@ -493,17 +493,17 @@ func file_tvix_castore_protos_castore_proto_init() {
|
|||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
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,
|
||||
NumMessages: 5,
|
||||
NumExtensions: 0,
|
||||
NumServices: 0,
|
||||
},
|
||||
GoTypes: file_tvix_castore_protos_castore_proto_goTypes,
|
||||
DependencyIndexes: file_tvix_castore_protos_castore_proto_depIdxs,
|
||||
MessageInfos: file_tvix_castore_protos_castore_proto_msgTypes,
|
||||
GoTypes: file_snix_castore_protos_castore_proto_goTypes,
|
||||
DependencyIndexes: file_snix_castore_protos_castore_proto_depIdxs,
|
||||
MessageInfos: file_snix_castore_protos_castore_proto_msgTypes,
|
||||
}.Build()
|
||||
File_tvix_castore_protos_castore_proto = out.File
|
||||
file_tvix_castore_protos_castore_proto_goTypes = nil
|
||||
file_tvix_castore_protos_castore_proto_depIdxs = nil
|
||||
File_snix_castore_protos_castore_proto = out.File
|
||||
file_snix_castore_protos_castore_proto_goTypes = nil
|
||||
file_snix_castore_protos_castore_proto_depIdxs = nil
|
||||
}
|
||||
|
|
@ -3,8 +3,8 @@ package castorev1_test
|
|||
import (
|
||||
"testing"
|
||||
|
||||
castorev1pb "code.tvl.fyi/tvix/castore-go"
|
||||
"github.com/stretchr/testify/assert"
|
||||
castorev1pb "snix.dev/castore/proto"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
let
|
||||
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
|
||||
(pkgs.buildGoModule {
|
||||
|
|
@ -18,7 +18,7 @@ in
|
|||
${regenerate}
|
||||
if [[ -n "$(git status --porcelain -unormal)" ]]; then
|
||||
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 "-----------------------------"
|
||||
git status -unormal
|
||||
exit 1
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
module code.tvl.fyi/tvix/castore-go
|
||||
module snix.dev/castore/proto
|
||||
|
||||
go 1.22
|
||||
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright © 2022 The Tvix Authors
|
||||
// Copyright © 2025 The Snix Project
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc (unknown)
|
||||
// source: tvix/castore/protos/rpc_blobstore.proto
|
||||
// source: snix/castore/protos/rpc_blobstore.proto
|
||||
|
||||
package castorev1
|
||||
|
||||
|
|
@ -38,7 +39,7 @@ type StatBlobRequest struct {
|
|||
|
||||
func (x *StatBlobRequest) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -50,7 +51,7 @@ func (x *StatBlobRequest) String() string {
|
|||
func (*StatBlobRequest) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -63,7 +64,7 @@ func (x *StatBlobRequest) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use StatBlobRequest.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -102,7 +103,7 @@ type StatBlobResponse struct {
|
|||
|
||||
func (x *StatBlobResponse) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -114,7 +115,7 @@ func (x *StatBlobResponse) String() string {
|
|||
func (*StatBlobResponse) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -127,7 +128,7 @@ func (x *StatBlobResponse) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use StatBlobResponse.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -154,7 +155,7 @@ type ReadBlobRequest struct {
|
|||
|
||||
func (x *ReadBlobRequest) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -166,7 +167,7 @@ func (x *ReadBlobRequest) String() string {
|
|||
func (*ReadBlobRequest) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -179,7 +180,7 @@ func (x *ReadBlobRequest) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use ReadBlobRequest.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -200,7 +201,7 @@ type BlobChunk struct {
|
|||
|
||||
func (x *BlobChunk) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -212,7 +213,7 @@ func (x *BlobChunk) String() string {
|
|||
func (*BlobChunk) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -225,7 +226,7 @@ func (x *BlobChunk) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use BlobChunk.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -245,7 +246,7 @@ type PutBlobResponse struct {
|
|||
|
||||
func (x *PutBlobResponse) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -257,7 +258,7 @@ func (x *PutBlobResponse) String() string {
|
|||
func (*PutBlobResponse) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -270,7 +271,7 @@ func (x *PutBlobResponse) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use PutBlobResponse.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -292,7 +293,7 @@ type StatBlobResponse_ChunkMeta struct {
|
|||
|
||||
func (x *StatBlobResponse_ChunkMeta) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -304,7 +305,7 @@ func (x *StatBlobResponse_ChunkMeta) String() string {
|
|||
func (*StatBlobResponse_ChunkMeta) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -317,7 +318,7 @@ func (x *StatBlobResponse_ChunkMeta) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use StatBlobResponse_ChunkMeta.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -334,12 +335,12 @@ func (x *StatBlobResponse_ChunkMeta) GetSize() uint64 {
|
|||
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{
|
||||
0x0a, 0x27, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70,
|
||||
var file_snix_castore_protos_rpc_blobstore_proto_rawDesc = string([]byte{
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
|
|
@ -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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
|
|
@ -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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0x28, 0x5a, 0x26, 0x63, 0x6f, 0x64,
|
||||
0x65, 0x2e, 0x74, 0x76, 0x6c, 0x2e, 0x66, 0x79, 0x69, 0x2f, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x63,
|
||||
0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2d, 0x67, 0x6f, 0x3b, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72,
|
||||
0x65, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0x22, 0x5a, 0x20, 0x73, 0x6e, 0x69,
|
||||
0x78, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72,
|
||||
0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x76, 0x31, 0x62, 0x06, 0x70,
|
||||
0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
})
|
||||
|
||||
var (
|
||||
file_tvix_castore_protos_rpc_blobstore_proto_rawDescOnce sync.Once
|
||||
file_tvix_castore_protos_rpc_blobstore_proto_rawDescData []byte
|
||||
file_snix_castore_protos_rpc_blobstore_proto_rawDescOnce sync.Once
|
||||
file_snix_castore_protos_rpc_blobstore_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_tvix_castore_protos_rpc_blobstore_proto_rawDescGZIP() []byte {
|
||||
file_tvix_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)))
|
||||
func file_snix_castore_protos_rpc_blobstore_proto_rawDescGZIP() []byte {
|
||||
file_snix_castore_protos_rpc_blobstore_proto_rawDescOnce.Do(func() {
|
||||
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_tvix_castore_protos_rpc_blobstore_proto_goTypes = []any{
|
||||
(*StatBlobRequest)(nil), // 0: tvix.castore.v1.StatBlobRequest
|
||||
(*StatBlobResponse)(nil), // 1: tvix.castore.v1.StatBlobResponse
|
||||
(*ReadBlobRequest)(nil), // 2: tvix.castore.v1.ReadBlobRequest
|
||||
(*BlobChunk)(nil), // 3: tvix.castore.v1.BlobChunk
|
||||
(*PutBlobResponse)(nil), // 4: tvix.castore.v1.PutBlobResponse
|
||||
(*StatBlobResponse_ChunkMeta)(nil), // 5: tvix.castore.v1.StatBlobResponse.ChunkMeta
|
||||
var file_snix_castore_protos_rpc_blobstore_proto_msgTypes = make([]protoimpl.MessageInfo, 6)
|
||||
var file_snix_castore_protos_rpc_blobstore_proto_goTypes = []any{
|
||||
(*StatBlobRequest)(nil), // 0: snix.castore.v1.StatBlobRequest
|
||||
(*StatBlobResponse)(nil), // 1: snix.castore.v1.StatBlobResponse
|
||||
(*ReadBlobRequest)(nil), // 2: snix.castore.v1.ReadBlobRequest
|
||||
(*BlobChunk)(nil), // 3: snix.castore.v1.BlobChunk
|
||||
(*PutBlobResponse)(nil), // 4: snix.castore.v1.PutBlobResponse
|
||||
(*StatBlobResponse_ChunkMeta)(nil), // 5: snix.castore.v1.StatBlobResponse.ChunkMeta
|
||||
}
|
||||
var file_tvix_castore_protos_rpc_blobstore_proto_depIdxs = []int32{
|
||||
5, // 0: tvix.castore.v1.StatBlobResponse.chunks:type_name -> tvix.castore.v1.StatBlobResponse.ChunkMeta
|
||||
0, // 1: tvix.castore.v1.BlobService.Stat:input_type -> tvix.castore.v1.StatBlobRequest
|
||||
2, // 2: tvix.castore.v1.BlobService.Read:input_type -> tvix.castore.v1.ReadBlobRequest
|
||||
3, // 3: tvix.castore.v1.BlobService.Put:input_type -> tvix.castore.v1.BlobChunk
|
||||
1, // 4: tvix.castore.v1.BlobService.Stat:output_type -> tvix.castore.v1.StatBlobResponse
|
||||
3, // 5: tvix.castore.v1.BlobService.Read:output_type -> tvix.castore.v1.BlobChunk
|
||||
4, // 6: tvix.castore.v1.BlobService.Put:output_type -> tvix.castore.v1.PutBlobResponse
|
||||
var file_snix_castore_protos_rpc_blobstore_proto_depIdxs = []int32{
|
||||
5, // 0: snix.castore.v1.StatBlobResponse.chunks:type_name -> snix.castore.v1.StatBlobResponse.ChunkMeta
|
||||
0, // 1: snix.castore.v1.BlobService.Stat:input_type -> snix.castore.v1.StatBlobRequest
|
||||
2, // 2: snix.castore.v1.BlobService.Read:input_type -> snix.castore.v1.ReadBlobRequest
|
||||
3, // 3: snix.castore.v1.BlobService.Put:input_type -> snix.castore.v1.BlobChunk
|
||||
1, // 4: snix.castore.v1.BlobService.Stat:output_type -> snix.castore.v1.StatBlobResponse
|
||||
3, // 5: snix.castore.v1.BlobService.Read:output_type -> snix.castore.v1.BlobChunk
|
||||
4, // 6: snix.castore.v1.BlobService.Put:output_type -> snix.castore.v1.PutBlobResponse
|
||||
4, // [4:7] is the sub-list for method output_type
|
||||
1, // [1:4] is the sub-list for method input_type
|
||||
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
|
||||
}
|
||||
|
||||
func init() { file_tvix_castore_protos_rpc_blobstore_proto_init() }
|
||||
func file_tvix_castore_protos_rpc_blobstore_proto_init() {
|
||||
if File_tvix_castore_protos_rpc_blobstore_proto != nil {
|
||||
func init() { file_snix_castore_protos_rpc_blobstore_proto_init() }
|
||||
func file_snix_castore_protos_rpc_blobstore_proto_init() {
|
||||
if File_snix_castore_protos_rpc_blobstore_proto != nil {
|
||||
return
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
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,
|
||||
NumMessages: 6,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_tvix_castore_protos_rpc_blobstore_proto_goTypes,
|
||||
DependencyIndexes: file_tvix_castore_protos_rpc_blobstore_proto_depIdxs,
|
||||
MessageInfos: file_tvix_castore_protos_rpc_blobstore_proto_msgTypes,
|
||||
GoTypes: file_snix_castore_protos_rpc_blobstore_proto_goTypes,
|
||||
DependencyIndexes: file_snix_castore_protos_rpc_blobstore_proto_depIdxs,
|
||||
MessageInfos: file_snix_castore_protos_rpc_blobstore_proto_msgTypes,
|
||||
}.Build()
|
||||
File_tvix_castore_protos_rpc_blobstore_proto = out.File
|
||||
file_tvix_castore_protos_rpc_blobstore_proto_goTypes = nil
|
||||
file_tvix_castore_protos_rpc_blobstore_proto_depIdxs = nil
|
||||
File_snix_castore_protos_rpc_blobstore_proto = out.File
|
||||
file_snix_castore_protos_rpc_blobstore_proto_goTypes = nil
|
||||
file_snix_castore_protos_rpc_blobstore_proto_depIdxs = nil
|
||||
}
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright © 2022 The Tvix Authors
|
||||
// Copyright © 2025 The Snix Project
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: tvix/castore/protos/rpc_blobstore.proto
|
||||
// source: snix/castore/protos/rpc_blobstore.proto
|
||||
|
||||
package castorev1
|
||||
|
||||
|
|
@ -22,9 +23,9 @@ import (
|
|||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
BlobService_Stat_FullMethodName = "/tvix.castore.v1.BlobService/Stat"
|
||||
BlobService_Read_FullMethodName = "/tvix.castore.v1.BlobService/Read"
|
||||
BlobService_Put_FullMethodName = "/tvix.castore.v1.BlobService/Put"
|
||||
BlobService_Stat_FullMethodName = "/snix.castore.v1.BlobService/Stat"
|
||||
BlobService_Read_FullMethodName = "/snix.castore.v1.BlobService/Read"
|
||||
BlobService_Put_FullMethodName = "/snix.castore.v1.BlobService/Put"
|
||||
)
|
||||
|
||||
// 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,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var BlobService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "tvix.castore.v1.BlobService",
|
||||
ServiceName: "snix.castore.v1.BlobService",
|
||||
HandlerType: (*BlobServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{
|
||||
{
|
||||
|
|
@ -243,5 +244,5 @@ var BlobService_ServiceDesc = grpc.ServiceDesc{
|
|||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "tvix/castore/protos/rpc_blobstore.proto",
|
||||
Metadata: "snix/castore/protos/rpc_blobstore.proto",
|
||||
}
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright © 2022 The Tvix Authors
|
||||
// Copyright © 2025 The Snix Project
|
||||
|
||||
// Code generated by protoc-gen-go. DO NOT EDIT.
|
||||
// versions:
|
||||
// protoc-gen-go v1.36.5
|
||||
// protoc (unknown)
|
||||
// source: tvix/castore/protos/rpc_directory.proto
|
||||
// source: snix/castore/protos/rpc_directory.proto
|
||||
|
||||
package castorev1
|
||||
|
||||
|
|
@ -41,7 +42,7 @@ type GetDirectoryRequest struct {
|
|||
|
||||
func (x *GetDirectoryRequest) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -53,7 +54,7 @@ func (x *GetDirectoryRequest) String() string {
|
|||
func (*GetDirectoryRequest) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -66,7 +67,7 @@ func (x *GetDirectoryRequest) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use GetDirectoryRequest.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -114,7 +115,7 @@ type PutDirectoryResponse struct {
|
|||
|
||||
func (x *PutDirectoryResponse) Reset() {
|
||||
*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.StoreMessageInfo(mi)
|
||||
}
|
||||
|
|
@ -126,7 +127,7 @@ func (x *PutDirectoryResponse) String() string {
|
|||
func (*PutDirectoryResponse) ProtoMessage() {}
|
||||
|
||||
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 {
|
||||
ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
|
||||
if ms.LoadMessageInfo() == nil {
|
||||
|
|
@ -139,7 +140,7 @@ func (x *PutDirectoryResponse) ProtoReflect() protoreflect.Message {
|
|||
|
||||
// Deprecated: Use PutDirectoryResponse.ProtoReflect.Descriptor instead.
|
||||
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 {
|
||||
|
|
@ -149,13 +150,13 @@ func (x *PutDirectoryResponse) GetRootDigest() []byte {
|
|||
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{
|
||||
0x0a, 0x27, 0x74, 0x76, 0x69, 0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2f, 0x70,
|
||||
var file_snix_castore_protos_rpc_directory_proto_rawDesc = string([]byte{
|
||||
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,
|
||||
0x6f, 0x72, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0f, 0x74, 0x76, 0x69, 0x78, 0x2e,
|
||||
0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x1a, 0x21, 0x74, 0x76, 0x69, 0x78,
|
||||
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, 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, 0x6f, 0x22, 0x58, 0x0a,
|
||||
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,
|
||||
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,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x24, 0x2e, 0x74,
|
||||
0x76, 0x69, 0x78, 0x2e, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x47,
|
||||
0x72, 0x76, 0x69, 0x63, 0x65, 0x12, 0x49, 0x0a, 0x03, 0x47, 0x65, 0x74, 0x12, 0x24, 0x2e, 0x73,
|
||||
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,
|
||||
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,
|
||||
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,
|
||||
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, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0x28, 0x5a, 0x26,
|
||||
0x63, 0x6f, 0x64, 0x65, 0x2e, 0x74, 0x76, 0x6c, 0x2e, 0x66, 0x79, 0x69, 0x2f, 0x74, 0x76, 0x69,
|
||||
0x78, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x2d, 0x67, 0x6f, 0x3b, 0x63, 0x61, 0x73,
|
||||
0x74, 0x6f, 0x72, 0x65, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x72, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x42, 0x22, 0x5a, 0x20,
|
||||
0x73, 0x6e, 0x69, 0x78, 0x2e, 0x64, 0x65, 0x76, 0x2f, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65,
|
||||
0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x3b, 0x63, 0x61, 0x73, 0x74, 0x6f, 0x72, 0x65, 0x76, 0x31,
|
||||
0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
})
|
||||
|
||||
var (
|
||||
file_tvix_castore_protos_rpc_directory_proto_rawDescOnce sync.Once
|
||||
file_tvix_castore_protos_rpc_directory_proto_rawDescData []byte
|
||||
file_snix_castore_protos_rpc_directory_proto_rawDescOnce sync.Once
|
||||
file_snix_castore_protos_rpc_directory_proto_rawDescData []byte
|
||||
)
|
||||
|
||||
func file_tvix_castore_protos_rpc_directory_proto_rawDescGZIP() []byte {
|
||||
file_tvix_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)))
|
||||
func file_snix_castore_protos_rpc_directory_proto_rawDescGZIP() []byte {
|
||||
file_snix_castore_protos_rpc_directory_proto_rawDescOnce.Do(func() {
|
||||
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_tvix_castore_protos_rpc_directory_proto_goTypes = []any{
|
||||
(*GetDirectoryRequest)(nil), // 0: tvix.castore.v1.GetDirectoryRequest
|
||||
(*PutDirectoryResponse)(nil), // 1: tvix.castore.v1.PutDirectoryResponse
|
||||
(*Directory)(nil), // 2: tvix.castore.v1.Directory
|
||||
var file_snix_castore_protos_rpc_directory_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
|
||||
var file_snix_castore_protos_rpc_directory_proto_goTypes = []any{
|
||||
(*GetDirectoryRequest)(nil), // 0: snix.castore.v1.GetDirectoryRequest
|
||||
(*PutDirectoryResponse)(nil), // 1: snix.castore.v1.PutDirectoryResponse
|
||||
(*Directory)(nil), // 2: snix.castore.v1.Directory
|
||||
}
|
||||
var file_tvix_castore_protos_rpc_directory_proto_depIdxs = []int32{
|
||||
0, // 0: tvix.castore.v1.DirectoryService.Get:input_type -> tvix.castore.v1.GetDirectoryRequest
|
||||
2, // 1: tvix.castore.v1.DirectoryService.Put:input_type -> tvix.castore.v1.Directory
|
||||
2, // 2: tvix.castore.v1.DirectoryService.Get:output_type -> tvix.castore.v1.Directory
|
||||
1, // 3: tvix.castore.v1.DirectoryService.Put:output_type -> tvix.castore.v1.PutDirectoryResponse
|
||||
var file_snix_castore_protos_rpc_directory_proto_depIdxs = []int32{
|
||||
0, // 0: snix.castore.v1.DirectoryService.Get:input_type -> snix.castore.v1.GetDirectoryRequest
|
||||
2, // 1: snix.castore.v1.DirectoryService.Put:input_type -> snix.castore.v1.Directory
|
||||
2, // 2: snix.castore.v1.DirectoryService.Get:output_type -> snix.castore.v1.Directory
|
||||
1, // 3: snix.castore.v1.DirectoryService.Put:output_type -> snix.castore.v1.PutDirectoryResponse
|
||||
2, // [2:4] is the sub-list for method output_type
|
||||
0, // [0:2] is the sub-list for method input_type
|
||||
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
|
||||
}
|
||||
|
||||
func init() { file_tvix_castore_protos_rpc_directory_proto_init() }
|
||||
func file_tvix_castore_protos_rpc_directory_proto_init() {
|
||||
if File_tvix_castore_protos_rpc_directory_proto != nil {
|
||||
func init() { file_snix_castore_protos_rpc_directory_proto_init() }
|
||||
func file_snix_castore_protos_rpc_directory_proto_init() {
|
||||
if File_snix_castore_protos_rpc_directory_proto != nil {
|
||||
return
|
||||
}
|
||||
file_tvix_castore_protos_castore_proto_init()
|
||||
file_tvix_castore_protos_rpc_directory_proto_msgTypes[0].OneofWrappers = []any{
|
||||
file_snix_castore_protos_castore_proto_init()
|
||||
file_snix_castore_protos_rpc_directory_proto_msgTypes[0].OneofWrappers = []any{
|
||||
(*GetDirectoryRequest_Digest)(nil),
|
||||
}
|
||||
type x struct{}
|
||||
out := protoimpl.TypeBuilder{
|
||||
File: protoimpl.DescBuilder{
|
||||
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,
|
||||
NumMessages: 2,
|
||||
NumExtensions: 0,
|
||||
NumServices: 1,
|
||||
},
|
||||
GoTypes: file_tvix_castore_protos_rpc_directory_proto_goTypes,
|
||||
DependencyIndexes: file_tvix_castore_protos_rpc_directory_proto_depIdxs,
|
||||
MessageInfos: file_tvix_castore_protos_rpc_directory_proto_msgTypes,
|
||||
GoTypes: file_snix_castore_protos_rpc_directory_proto_goTypes,
|
||||
DependencyIndexes: file_snix_castore_protos_rpc_directory_proto_depIdxs,
|
||||
MessageInfos: file_snix_castore_protos_rpc_directory_proto_msgTypes,
|
||||
}.Build()
|
||||
File_tvix_castore_protos_rpc_directory_proto = out.File
|
||||
file_tvix_castore_protos_rpc_directory_proto_goTypes = nil
|
||||
file_tvix_castore_protos_rpc_directory_proto_depIdxs = nil
|
||||
File_snix_castore_protos_rpc_directory_proto = out.File
|
||||
file_snix_castore_protos_rpc_directory_proto_goTypes = nil
|
||||
file_snix_castore_protos_rpc_directory_proto_depIdxs = nil
|
||||
}
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright © 2022 The Tvix Authors
|
||||
// Copyright © 2025 The Snix Project
|
||||
|
||||
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
|
||||
// versions:
|
||||
// - protoc-gen-go-grpc v1.5.1
|
||||
// - protoc (unknown)
|
||||
// source: tvix/castore/protos/rpc_directory.proto
|
||||
// source: snix/castore/protos/rpc_directory.proto
|
||||
|
||||
package castorev1
|
||||
|
||||
|
|
@ -22,8 +23,8 @@ import (
|
|||
const _ = grpc.SupportPackageIsVersion9
|
||||
|
||||
const (
|
||||
DirectoryService_Get_FullMethodName = "/tvix.castore.v1.DirectoryService/Get"
|
||||
DirectoryService_Put_FullMethodName = "/tvix.castore.v1.DirectoryService/Put"
|
||||
DirectoryService_Get_FullMethodName = "/snix.castore.v1.DirectoryService/Get"
|
||||
DirectoryService_Put_FullMethodName = "/snix.castore.v1.DirectoryService/Put"
|
||||
)
|
||||
|
||||
// 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,
|
||||
// and not to be introspected or modified (even as a copy)
|
||||
var DirectoryService_ServiceDesc = grpc.ServiceDesc{
|
||||
ServiceName: "tvix.castore.v1.DirectoryService",
|
||||
ServiceName: "snix.castore.v1.DirectoryService",
|
||||
HandlerType: (*DirectoryServiceServer)(nil),
|
||||
Methods: []grpc.MethodDesc{},
|
||||
Streams: []grpc.StreamDesc{
|
||||
|
|
@ -192,5 +193,5 @@ var DirectoryService_ServiceDesc = grpc.ServiceDesc{
|
|||
ClientStreams: true,
|
||||
},
|
||||
},
|
||||
Metadata: "tvix/castore/protos/rpc_directory.proto",
|
||||
Metadata: "snix/castore/protos/rpc_directory.proto",
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
[package]
|
||||
name = "tvix-castore"
|
||||
name = "snix-castore"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ tonic.workspace = true
|
|||
tower.workspace = true
|
||||
tracing.workspace = true
|
||||
tracing-indicatif.workspace = true
|
||||
tvix-tracing = { path = "../tracing", features = ["tonic"] }
|
||||
snix-tracing = { path = "../tracing", features = ["tonic"] }
|
||||
url.workspace = true
|
||||
walkdir.workspace = true
|
||||
zstd.workspace = true
|
||||
|
|
@ -7,7 +7,7 @@ fn main() -> Result<()> {
|
|||
#[cfg(feature = "tonic-reflection")]
|
||||
{
|
||||
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);
|
||||
};
|
||||
|
|
@ -20,9 +20,9 @@ fn main() -> Result<()> {
|
|||
.type_attribute(".", "#[derive(Eq, Hash)]")
|
||||
.compile_protos(
|
||||
&[
|
||||
"tvix/castore/protos/castore.proto",
|
||||
"tvix/castore/protos/rpc_blobstore.proto",
|
||||
"tvix/castore/protos/rpc_directory.proto",
|
||||
"snix/castore/protos/castore.proto",
|
||||
"snix/castore/protos/rpc_blobstore.proto",
|
||||
"snix/castore/protos/rpc_directory.proto",
|
||||
],
|
||||
// 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
|
||||
|
|
@ -1,13 +1,13 @@
|
|||
{ depot, pkgs, lib, ... }:
|
||||
|
||||
(depot.tvix.crates.workspaceMembers.tvix-castore.build.override {
|
||||
(depot.snix.crates.workspaceMembers.snix-castore.build.override {
|
||||
runTests = true;
|
||||
testPreRun = ''
|
||||
export SSL_CERT_FILE=/dev/null
|
||||
'';
|
||||
}).overrideAttrs (old: rec {
|
||||
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;
|
||||
features = ([ "cloud" "fuse" "tonic-reflection" "xp-composition-url-refs" ]
|
||||
# virtiofs feature currently fails to build on Darwin
|
||||
|
|
@ -16,7 +16,7 @@
|
|||
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;
|
||||
testPreRun = ''
|
||||
export SSL_CERT_FILE=/dev/null
|
||||
|
|
@ -1,4 +1,5 @@
|
|||
Copyright © The Tvix Authors
|
||||
Copyright © The Snix Project
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
|
|
@ -1,11 +1,12 @@
|
|||
// SPDX-FileCopyrightText: edef <edef@unfathomable.blue>
|
||||
// SPDX-License-Identifier: OSL-3.0 OR MIT OR Apache-2.0
|
||||
// Copyright © 2025 The Snix Project
|
||||
|
||||
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.
|
||||
// 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 [
|
||||
"buf.yaml"
|
||||
"buf.gen.yaml"
|
||||
"^tvix(/castore(/protos(/.*\.proto)?)?)?$"
|
||||
"^snix(/castore(/protos(/.*\.proto)?)?)?$"
|
||||
];
|
||||
in
|
||||
depot.nix.readTree.drvTargets {
|
||||
|
|
@ -42,7 +42,7 @@ depot.nix.readTree.drvTargets {
|
|||
buf generate
|
||||
|
||||
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
|
||||
// Copyright © 2022 The Tvix Authors
|
||||
// Copyright © 2025 The Snix Project
|
||||
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.
|
||||
// BLAKE3 is used as a hashing function for the data. Uploading a blob will
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
// Copyright © 2022 The Tvix Authors
|
||||
// Copyright © 2025 The Snix Project
|
||||
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 {
|
||||
// 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 tracing::{instrument, Instrument as _};
|
||||
|
||||
/// Connects to a (remote) tvix-store BlobService over gRPC.
|
||||
/// Connects to a (remote) snix-store BlobService over gRPC.
|
||||
#[derive(Clone)]
|
||||
pub struct GRPCBlobService<T> {
|
||||
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.
|
||||
// - 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.
|
||||
// Constructing the channel is handled by tvix_castore::channel::from_url.
|
||||
// Constructing the channel is handled by snix_castore::channel::from_url.
|
||||
Ok(GRPCBlobServiceConfig {
|
||||
url: url.to_string(),
|
||||
})
|
||||
|
|
@ -27,7 +27,7 @@ use crate::{
|
|||
use super::{BlobReader, BlobService, BlobWriter, ChunkedReader};
|
||||
|
||||
/// Uses any object storage supported by the [object_store] crate to provide a
|
||||
/// tvix-castore [BlobService].
|
||||
/// snix-castore [BlobService].
|
||||
///
|
||||
/// # Data format
|
||||
/// Data is organized in "blobs" and "chunks".
|
||||
|
|
@ -16,8 +16,8 @@
|
|||
//! ```
|
||||
//! use std::sync::Arc;
|
||||
//!
|
||||
//! use tvix_castore::composition::*;
|
||||
//! use tvix_castore::blobservice::BlobService;
|
||||
//! use snix_castore::composition::*;
|
||||
//! use snix_castore::blobservice::BlobService;
|
||||
//!
|
||||
//! #[derive(serde::Deserialize)]
|
||||
//! struct MyBlobServiceConfig {
|
||||
|
|
@ -50,8 +50,8 @@
|
|||
//!
|
||||
//! ```
|
||||
//! use std::sync::Arc;
|
||||
//! use tvix_castore::composition::*;
|
||||
//! use tvix_castore::blobservice::BlobService;
|
||||
//! use snix_castore::composition::*;
|
||||
//! use snix_castore::blobservice::BlobService;
|
||||
//!
|
||||
//! # fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
//! # 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
|
||||
//!
|
||||
//! ```
|
||||
//! # pub fn add_my_service(reg: &mut tvix_castore::composition::Registry) {}
|
||||
//! let mut my_registry = tvix_castore::composition::Registry::default();
|
||||
//! tvix_castore::composition::add_default_services(&mut my_registry);
|
||||
//! # pub fn add_my_service(reg: &mut snix_castore::composition::Registry) {}
|
||||
//! let mut my_registry = snix_castore::composition::Registry::default();
|
||||
//! snix_castore::composition::add_default_services(&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
|
||||
}
|
||||
|
||||
/// 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(|| {
|
||||
let mut reg = Default::default();
|
||||
add_default_services(&mut reg);
|
||||
|
|
@ -270,7 +270,7 @@ pub static REG: LazyLock<&'static Registry> = LazyLock::new(|| {
|
|||
|
||||
// ---------- 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.
|
||||
/// This can be used outside to create your own registry with the builtin 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
|
||||
/// from one process at the same time.
|
||||
/// - `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`
|
||||
/// Connects to a (remote) tvix-store gRPC service.
|
||||
/// Connects to a (remote) snix-store gRPC service.
|
||||
pub async fn from_addr(
|
||||
uri: &str,
|
||||
) -> 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 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)]
|
||||
pub struct GRPCDirectoryService<T> {
|
||||
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.
|
||||
// - 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.
|
||||
// Constructing the channel is handled by tvix_castore::channel::from_url.
|
||||
// Constructing the channel is handled by snix_castore::channel::from_url.
|
||||
Ok(GRPCDirectoryServiceConfig {
|
||||
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 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()))?;
|
||||
|
||||
#[cfg(target_os = "linux")]
|
||||
|
|
@ -17,7 +17,7 @@ use crate::{
|
|||
fixtures, Node,
|
||||
};
|
||||
use crate::{
|
||||
fs::{TvixStoreFs, XATTR_NAME_BLOB_DIGEST, XATTR_NAME_DIRECTORY_DIGEST},
|
||||
fs::{SnixStoreFs, XATTR_NAME_BLOB_DIGEST, XATTR_NAME_DIRECTORY_DIGEST},
|
||||
PathComponent,
|
||||
};
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ where
|
|||
BS: BlobService + Send + Sync + Clone + 'static,
|
||||
DS: DirectoryService + Send + Sync + Clone + 'static,
|
||||
{
|
||||
let fs = TvixStoreFs::new(
|
||||
let fs = SnixStoreFs::new(
|
||||
blob_service,
|
||||
directory_service,
|
||||
Arc::new(root_nodes),
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
//! 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 crate::{path::PathComponent, B3Digest, Node};
|
||||
|
|
@ -43,7 +43,7 @@ use tokio::{
|
|||
};
|
||||
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].
|
||||
///
|
||||
/// 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
|
||||
/// allocation", aka reserve Directory.size inodes for each directory node we
|
||||
/// explore.
|
||||
/// Tests for this live in the tvix-store crate.
|
||||
pub struct TvixStoreFs<BS, DS, RN> {
|
||||
/// Tests for this live in the snix-store crate.
|
||||
pub struct SnixStoreFs<BS, DS, RN> {
|
||||
blob_service: BS,
|
||||
directory_service: DS,
|
||||
root_nodes_provider: RN,
|
||||
|
|
@ -119,7 +119,7 @@ pub struct TvixStoreFs<BS, DS, RN> {
|
|||
tokio_handle: tokio::runtime::Handle,
|
||||
}
|
||||
|
||||
impl<BS, DS, RN> TvixStoreFs<BS, DS, RN>
|
||||
impl<BS, DS, RN> SnixStoreFs<BS, DS, RN>
|
||||
where
|
||||
BS: BlobService + Clone + Send,
|
||||
DS: DirectoryService + Clone + Send + 'static,
|
||||
|
|
@ -297,11 +297,11 @@ where
|
|||
/// Buffer size of the channel providing nodes in the mount root
|
||||
const ROOT_NODES_BUFFER_SIZE: usize = 16;
|
||||
|
||||
const XATTR_NAME_DIRECTORY_DIGEST: &[u8] = b"user.tvix.castore.directory.digest";
|
||||
const XATTR_NAME_BLOB_DIGEST: &[u8] = b"user.tvix.castore.blob.digest";
|
||||
const XATTR_NAME_DIRECTORY_DIGEST: &[u8] = b"user.snix.castore.directory.digest";
|
||||
const XATTR_NAME_BLOB_DIGEST: &[u8] = b"user.snix.castore.blob.digest";
|
||||
|
||||
#[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
|
||||
BS: BlobService + Clone + Send + '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
|
||||
BS: BlobService + Clone + Send + 'static,
|
||||
DS: DirectoryService + Send + Clone + 'static,
|
||||
|
|
@ -4,7 +4,7 @@ use crate::{path::PathComponent, Error, Node};
|
|||
use futures::stream::BoxStream;
|
||||
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.
|
||||
#[async_trait]
|
||||
pub trait RootNodes: Send + Sync {
|
||||
|
|
@ -227,7 +227,7 @@ where
|
|||
let listener = Listener::new(socket, true).unwrap();
|
||||
|
||||
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)?;
|
||||
|
||||
fs_daemon.start(listener).map_err(|_| Error::StartDaemon)?;
|
||||
|
|
@ -259,7 +259,7 @@ impl IngestionEntryGraph {
|
|||
let entry = self
|
||||
.graph
|
||||
.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()));
|
||||
|
||||
|
|
@ -286,7 +286,7 @@ impl IngestionEntryGraph {
|
|||
fn get_node(&self, index: NodeIndex) -> &IngestionEntry {
|
||||
self.graph
|
||||
.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?;
|
||||
|
||||
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
|
||||
// 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