tvl-depot/tvix/castore/Cargo.toml
Yureka 52bb3c6d02 feat(tvix/composition): allow urls as anonymous stores
This allows specifying an url in place of a named reference to another
composition entry, if the castore crate has been compiled with the
 xp-store-composition feature.

Example: `--directory-service-addr cache://?near=memory://&far=memory://`

This would be equivalent to the instantiation via toml file:

```toml
[memory1]
type = "memory"

[memory2]
type = "memory"

[default]
type = "cache"
near = "memory1"
far = "memory2"
```

Note that each anonymous url causes a distinct instance to be created.

Change-Id: Iee5a07a94b063b5e767c704d9cad0114fa843164
Reviewed-on: https://cl.tvl.fyi/c/depot/+/12146
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
2024-10-10 12:53:08 +00:00

105 lines
3.5 KiB
TOML

[package]
name = "tvix-castore"
version = "0.1.0"
edition = "2021"
[dependencies]
async-compression = { workspace = true, features = ["tokio", "zstd"] }
async-stream = { workspace = true }
async-tempfile = { workspace = true }
blake3 = { workspace = true, features = ["rayon", "std", "traits-preview"] }
bstr = { workspace = true }
bytes = { workspace = true }
data-encoding = { workspace = true }
digest = { workspace = true }
fastcdc = { workspace = true, features = ["tokio"] }
futures = { workspace = true }
lazy_static = { workspace = true }
object_store = { workspace = true, features = ["http"] }
parking_lot = { workspace = true }
pin-project-lite = { workspace = true }
prost = { workspace = true }
thiserror = { workspace = true }
tokio-stream = { workspace = true, features = ["fs", "net"] }
tokio-util = { workspace = true, features = ["io", "io-util", "codec"] }
tokio-tar = { workspace = true }
tokio = { workspace = true, features = ["fs", "macros", "net", "rt", "rt-multi-thread", "signal"] }
tonic = { workspace = true }
tower = { workspace = true }
tracing = { workspace = true }
tracing-indicatif = { workspace = true }
tvix-tracing = { path = "../tracing", features = ["tonic"] }
url = { workspace = true }
walkdir = { workspace = true }
zstd = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_with = { workspace = true }
serde_qs = { workspace = true }
petgraph = { workspace = true }
pin-project = { workspace = true }
erased-serde = { workspace = true }
serde_tagged = { workspace = true }
hyper-util = { workspace = true }
redb = { workspace = true, features = ["logging"] }
bigtable_rs = { workspace = true, optional = true }
fuse-backend-rs = { workspace = true, optional = true }
libc = { workspace = true, optional = true }
threadpool = { workspace = true, optional = true }
tonic-reflection = { workspace = true, optional = true }
vhost = { workspace = true, optional = true }
vhost-user-backend = { workspace = true, optional = true }
virtio-queue = { workspace = true, optional = true }
vm-memory = { workspace = true, optional = true }
vmm-sys-util = { workspace = true, optional = true }
virtio-bindings = { workspace = true, optional = true }
wu-manber = { workspace = true }
[build-dependencies]
prost-build = { workspace = true }
tonic-build = { workspace = true }
[dev-dependencies]
async-process = { workspace = true }
rstest = { workspace = true }
tempfile = { workspace = true }
tokio-retry = { workspace = true }
hex-literal = { workspace = true }
rstest_reuse = { workspace = true }
xattr = { workspace = true }
serde_json = { workspace = true }
tokio-test = { workspace = true }
[features]
default = ["cloud"]
cloud = [
"dep:bigtable_rs",
"object_store/aws",
"object_store/azure",
"object_store/gcp",
]
fs = ["dep:fuse-backend-rs", "dep:threadpool", "dep:libc"]
virtiofs = [
"fs",
"dep:vhost",
"dep:vhost-user-backend",
"dep:virtio-queue",
"dep:vm-memory",
"dep:vmm-sys-util",
"dep:virtio-bindings",
"fuse-backend-rs?/vhost-user-fs", # impl FsCacheReqHandler for SlaveFsCacheReq
"fuse-backend-rs?/virtiofs",
]
fuse = ["fs"]
tonic-reflection = ["dep:tonic-reflection"]
# It's already possible for other crates to build a
# fully fledged store composition system based on castore composition.
# However, this feature enables anonymous url syntax which might
# inherently expose arbitrary composition possibilities to the user.
xp-store-composition = []
# Whether to run the integration tests.
# Requires the following packages in $PATH:
# cbtemulator, google-cloud-bigtable-tool
integration = []
[lints]
workspace = true