[workspace]
members = [".", "pelagos-dockerd", "pelagos-cri"]
resolver = "2"

[patch.crates-io]
# k3s/kubelet sends the Unix socket path URL-encoded as :authority (e.g. %2Frun%2Fpelagos%2Fcri.sock).
# The http crate rejects this, causing h2 to RST_STREAM with PROTOCOL_ERROR. This local patch
# falls back to "localhost" instead of failing the stream.
h2 = { path = "vendor/h2" }

[package]
name = "pelagos"
version = "0.65.12"
edition = "2021"
rust-version = "1.76"
description = "Fast Linux container runtime — OCI-compatible, namespaces, cgroups v2, seccomp, networking, image management"
license = "Apache-2.0"
repository = "https://github.com/pelagos-containers/pelagos"
homepage = "https://github.com/pelagos-containers/pelagos"
readme = "README.md"
keywords = ["container", "runtime", "linux", "namespaces", "oci"]
categories = ["os::linux-apis", "command-line-utilities", "virtualization"]
exclude = [
    "scripts/",
    "docs/",
    "alpine-rootfs/",
    ".github/",
    "ONGOING_TASKS.md",
    "CLAUDE.md",
]

[features]
embedded-wasm = ["dep:wasmtime", "dep:wasmtime-wasi"]

[dependencies]
log = "0.4"
env_logger = "0.11"
nix = { version = "0.31.1", features = ["process", "sched", "mount", "fs", "term", "poll", "signal", "ioctl"] }
libc = "0.2"
clap = {version = "3.1.6", features = ["derive"] }
thiserror = "2.0"
bitflags = "2.6"
cgroups-rs = "0.5.0"  # Added 2026-02-16 for future cgroup management (v1 & v2 support)
seccompiler = "0.5.0"  # Pure Rust seccomp-BPF for syscall filtering (used by Firecracker)
serde = { version = "1", features = ["derive"] }  # JSON serialization for OCI config.json / state.json
serde_json = "1"  # JSON parsing for OCI bundle config and state files
oci-client = "0.16"  # OCI registry client for image pulls
tokio = { version = "1", features = ["rt", "rt-multi-thread", "net", "time", "io-util", "process", "fs", "signal", "macros"] }  # Async runtime: image pulls + async TCP port proxy
flate2 = "1"  # Gzip decompression for OCI layer tarballs
tar = "0.4"  # Tar extraction for OCI layers
tempfile = "3"  # Temp files for layer downloads
sha2 = "0.10"  # SHA-256 for content-addressable layer digests
ignore = "0.4"  # Gitignore-style pattern matching for .remignore
ureq = "2"      # Blocking HTTP client for ADD URL downloads
toml = { version = "0.8", features = ["parse"] }  # TOML config file parsing
bzip2 = { version = "0.5", features = ["static"] }  # bz2 decompression; static links libbz2 for musl portability
xz2 = { version = "0.1", features = ["static"] }    # xz decompression; static links liblzma for musl portability
containerd-shim = "0.10"  # Shim v2 protocol (ttrpc) for containerd-shim-pelagos-wasm-v1 binary
wasmtime      = { version = "42", optional = true, default-features = false, features = ["cranelift", "runtime", "wat", "component-model"] }
wasmtime-wasi = { version = "42", optional = true, default-features = false, features = ["p1", "p2"] }

[[bin]]
name = "pelagos"
path = "src/main.rs"

[[bin]]
name = "pelagos-dns"
path = "src/bin/pelagos-dns.rs"

[[bin]]
name = "pelagos-shim-wasm"
path = "src/bin/pelagos-shim-wasm.rs"

[dev-dependencies]
serial_test = "3"
futures-util = "0.3"

# Removed unused dependencies:
# - subprocess (never used)
# - cgroups-fs (replaced with cgroups-rs which supports v1 & v2)
# - palaver (never used)