feat(tvix/proto): add castore.proto

This is
0d4906cbabb183caa96e763671810fb39bd0c935:ripple/fossil/src/store.proto,
from https://src.unfathomable.blue.

It is not pulled in as a subtree, as some of the commits in there break
index-pack:

```
remote: error: object 2f487c3bf7cd8efd64f1d217edac732db98ff1c0: badDateOverflow: invalid author/committer line - date causes integer overflow
remote: fatal: fsck error in packed object
error: remote unpack failed: index-pack abnormal exit
```

Co-authored-by: edef <edef@unfathomable.blue>
Change-Id: I3369044090a3192e2322775a335887c37536a942
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7126
Tested-by: BuildkiteCI
Reviewed-by: edef <edef@edef.eu>
This commit is contained in:
Florian Klink 2022-10-28 16:26:13 +02:00 committed by flokli
parent 10ad47371d
commit 5392d73816
2 changed files with 41 additions and 0 deletions

40
tvix/proto/castore.proto Normal file
View file

@ -0,0 +1,40 @@
// SPDX-FileCopyrightText: edef <edef@unfathomable.blue>
// SPDX-License-Identifier: OSL-3.0 OR MIT OR Apache-2.0
syntax = "proto3";
package fossil.store;
message Directory {
repeated DirectoryNode directories = 1;
repeated FileNode files = 2;
repeated LinkNode links = 3;
}
message DirectoryNode {
string name = 1;
bytes ref = 2;
uint32 size = 3;
}
message FileNode {
string name = 1;
bytes ref = 2;
uint32 size = 3;
bool executable = 4;
}
message LinkNode {
string name = 1;
string target = 2;
}
message Blob {
bytes bao_inline = 3;
repeated Chunk chunks = 4;
}
message Chunk {
uint64 offset = 1;
uint32 length = 2;
}

View file

@ -5,5 +5,6 @@
pkgs.runCommand "tvix-cc-proto" { } ''
mkdir $out
${pkgs.protobuf}/bin/protoc -I ${./.} castore.proto --cpp_out=$out
${pkgs.protobuf}/bin/protoc -I ${./.} evaluator.proto --cpp_out=$out
''