Skip to content

vox-deploy-codegen API Reference (generated)

Crate: vox-deploy-codegen · Version: 0.6.0 · Target: Library (lib.rs)

Deployment artifact codegen: Dockerfile, Compose, K8s, Fly, Coolify, systemd. Pure text generation.

Deployment artifact codegen for the Vox toolchain.

Generates Dockerfiles, Compose files, Kubernetes manifests, Fly.io configs, Coolify configurations, and systemd unit files from Vox environment declarations. This is pure text generation — no runtime execution.

Submodules:

  • [deploy_target] — unified DeployTarget enum + per-target execution helpers
  • [generate] — Dockerfile / Compose generation from EnvironmentSpec
  • [bare_metal] — systemd unit file generation
DependencyKind
vox-configNormal
vox-container-typesNormal
ModuleDescription
bare_metal—
deploy_target—
generate—
Dependency Topology, diagram 18 nodes, 7 edges: vox-deploy-codegen → vox-config; vox-deploy-codegen → vox-container-types; vox-audit → vox-deploy-codegen; vox-cli → vox-deploy-codegen; vox-codegen → vox-deploy-codegen; vox-codegen-ts → vox-deploy-codegen; vox-integration-tests → vox-deploy-codegenvox-deploy-codegenvox-configvox-container-typesvox-auditvox-clivox-codegenvox-codegen-tsvox-integration-tests
Diagram source
graph {
direction: right
node vox_deploy_codegen: "vox-deploy-codegen"
node vox_config: "vox-config"
vox_deploy_codegen -> vox_config
node vox_container_types: "vox-container-types"
vox_deploy_codegen -> vox_container_types
node vox_audit: "vox-audit"
vox_audit -> vox_deploy_codegen
node vox_cli: "vox-cli"
vox_cli -> vox_deploy_codegen
node vox_codegen: "vox-codegen"
vox_codegen -> vox_deploy_codegen
node vox_codegen_ts: "vox-codegen-ts"
vox_codegen_ts -> vox_deploy_codegen
node vox_integration_tests: "vox-integration-tests"
vox_integration_tests -> vox_deploy_codegen
}
Consumer CrateRole
vox-auditDirect workspace dependent
vox-cliDirect workspace dependent
vox-codegenDirect workspace dependent
vox-codegen-tsDirect workspace dependent
vox-integration-testsDirect workspace dependent
KindSymbolSignatureSourceDescription
fnbare_metal::generate_systemd_unitpub fn generate_systemd_unit(spec: &EnvironmentSpec, app_name: &str) -> Stringcrates/vox-deploy-codegen/src/bare_metal.rs#L7-L39Generate a systemd .service file from an EnvironmentSpec. Use this when @environment has base: "bare-metal" — instead of a Dockerfile you get a drop-in systemd unit file ready for deployment.
enumdeploy_target::DeployTargetpub enum DeployTargetcrates/vox-deploy-codegen/src/deploy_target.rs#L27-L40A fully-resolved deployment target for a Vox application. Constructed by the CLI from Vox.toml [deploy] plus any CLI overrides, then executed via [DeployTarget::execute].
structdeploy_target::ContainerTargetpub struct ContainerTargetcrates/vox-deploy-codegen/src/deploy_target.rs#L44-L57Configuration for an OCI container deployment.
structdeploy_target::BareMetalTargetpub struct BareMetalTargetcrates/vox-deploy-codegen/src/deploy_target.rs#L61-L74Configuration for a bare-metal (systemd) deployment.
structdeploy_target::ComposeTargetpub struct ComposeTargetcrates/vox-deploy-codegen/src/deploy_target.rs#L78-L87Configuration for a Docker/Podman Compose deployment.
structdeploy_target::KubernetesTargetpub struct KubernetesTargetcrates/vox-deploy-codegen/src/deploy_target.rs#L91-L100Configuration for a Kubernetes deployment.
structdeploy_target::FlyTargetpub struct FlyTargetcrates/vox-deploy-codegen/src/deploy_target.rs#L104-L113Configuration for a Fly.io deployment.
structdeploy_target::CoolifyTargetpub struct CoolifyTargetcrates/vox-deploy-codegen/src/deploy_target.rs#L117-L123Configuration for a Coolify deployment.
fndeploy_target::kind_namepub fn kind_name(&self) -> &'static strcrates/vox-deploy-codegen/src/deploy_target.rs#L127-L136Return a human-readable name for this target type.
fndeploy_target::executepub fn execute(&self, runtime: Option<&dyn ContainerRuntime>, dry_run: bool) -> Result<()>crates/vox-deploy-codegen/src/deploy_target.rs#L142-L151Execute this deployment target. For Container targets, runtime must be provided. For other targets, runtime is unused.
fndeploy_target::resolve_target_kindpub fn resolve_target_kind(crates/vox-deploy-codegen/src/deploy_target.rs#L364Resolve which deploy target string to use, given the raw deploy section, the environment name, and any CLI override.
fndeploy_target::build_container_targetpub fn build_container_target(crates/vox-deploy-codegen/src/deploy_target.rs#L381Build a [ContainerTarget] from manifest values and CLI overrides.
structgenerate::EnvironmentSpecpub struct EnvironmentSpeccrates/vox-deploy-codegen/src/generate.rs#L18-L39Declarative specification for a container environment. Maps directly to Vox environment declarations in user source code. The codegen layer constructs an EnvironmentSpec from the AST node and passes it here to generate a Dockerfile.
fngenerate::generate_dockerfile_from_specpub fn generate_dockerfile_from_spec(spec: &EnvironmentSpec) -> Stringcrates/vox-deploy-codegen/src/generate.rs#L45-L108Generate a Dockerfile string from an [EnvironmentSpec]. Produces an OCI-compatible Dockerfile that works with both Docker and Podman.
fngenerate::generate_default_dockerfilepub fn generate_default_dockerfile() -> Stringcrates/vox-deploy-codegen/src/generate.rs#L115-L132Generate a default Dockerfile for a Rust-first Vox deployment. Expects a release binary in the build context named vox-app (e.g. from vox bundle or cargo build --release in target/generated). For the legacy Node + npx tsx server.ts lane, use an explicit @environment block or a hand-authored Dockerfile; see repository docs.
fngenerate::generate_compose_filepub fn generate_compose_file() -> Stringcrates/vox-deploy-codegen/src/generate.rs#L144-L171Generate a docker-compose.yml that works with both Docker Compose and Podman Compose. Omits the deprecated version field for OCI compatibility. Optional mens-related environment entries are loaded from docker/vox-compose-mens-environment.block.yaml (SSOT shared with docs).
fngenerate::generate_kubernetes_manifestspub fn generate_kubernetes_manifests(crates/vox-deploy-codegen/src/generate.rs#L174Generate basic Kubernetes manifests (Deployment and Service) for a Vox app.