Skip to content

vox-tauri-codegen API Reference (generated)

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

Emit minimal Tauri 2 shell files beside generated Vox Rust + Vite apps.

Tauri 2 packaging hints for vox compile.

Emits a tauri.conf.json fragment compatible with Tauri CLI v2 ($schema URL). Full src-tauri Rust crate wiring is completed by cargo tauri init / upstream templates on first clone; this crate keeps the identifier, window, and frontendDist SSOT-aligned with [bundle] in Vox.toml.

When a workspace root containing [RUNTIME_CAPABILITIES_REL] is supplied, also emits runtime-capabilities.projection.json — a merge-friendly projection of the capability → Tauri / Android / iOS packaging map (see docs/src/adr/036-webir-hir-unification-compare-both.md).

DependencyKind
vox-compilerNormal
StructDescription
TauriEmitParams—
FunctionDescription
tauri_desktop_config_valueBuild the desktop tauri.conf.json document (Tauri CLI v2).
serialize_tauri_desktop_configPretty-printed tauri.conf.json body for embedding into generated src-tauri/.
write_tauri_desktop_configWrite a V2 tauri.conf.json (overwrites). Used by vox compile to refresh bundle ids after codegen.
seed_placeholder_icon—
find_contracts_repo_rootWalk parents of start until contracts/capability/runtime-capabilities.v1.yaml exists.
emit_tauri_packaging_hintsWrites tauri/tauri.conf.json plus tauri/README.md under out_root. When contracts_repo_root is Some and contains [RUNTIME_CAPABILITIES_REL], also writes runtime-capabilities.projection.json beside those files. Pass required to include only capability rows whose ids appear in [vox_compiler::required_capabilities::RequiredRuntimeCapabilities::capability_ids] (plus a derived tauri_permission_allow_list); pass None to mirror the full YAML contract. Consumers run cargo tauri build from a src-tauri crate that includes or merges this config (see README).
ConstantDescription
RUNTIME_CAPABILITIES_RELRelative path from repository root to the runtime capability packaging SSOT.
Dependency Topology, diagram 14 nodes, 3 edges: vox-tauri-codegen → vox-compiler; vox-cli → vox-tauri-codegen; vox-codegen → vox-tauri-codegenvox-tauri-codegenvox-compilervox-clivox-codegen
Diagram source
graph {
direction: right
node vox_tauri_codegen: "vox-tauri-codegen"
node vox_compiler: "vox-compiler"
vox_tauri_codegen -> vox_compiler
node vox_cli: "vox-cli"
vox_cli -> vox_tauri_codegen
node vox_codegen: "vox-codegen"
vox_codegen -> vox_tauri_codegen
}
Consumer CrateRole
vox-cliDirect workspace dependent
vox-codegenDirect workspace dependent
KindSymbolSignatureSourceDescription
structTauriEmitParamspub struct TauriEmitParams<'a>crates/vox-tauri-codegen/src/lib.rs#L22-L26—
fntauri_desktop_config_valuepub fn tauri_desktop_config_value(params: &TauriEmitParams<'_>) -> serde_json::Valuecrates/vox-tauri-codegen/src/lib.rs#L72-L91Build the desktop tauri.conf.json document (Tauri CLI v2).
fnserialize_tauri_desktop_configpub fn serialize_tauri_desktop_config(params: &TauriEmitParams<'_>) -> Result<String>crates/vox-tauri-codegen/src/lib.rs#L94-L97Pretty-printed tauri.conf.json body for embedding into generated src-tauri/.
fnwrite_tauri_desktop_configpub fn write_tauri_desktop_config(path: &Path, params: &TauriEmitParams<'_>) -> Result<()>crates/vox-tauri-codegen/src/lib.rs#L100-L108Write a V2 tauri.conf.json (overwrites). Used by vox compile to refresh bundle ids after codegen.
fnseed_placeholder_iconpub fn seed_placeholder_icon(src_tauri_dir: &Path) -> Result<()>crates/vox-tauri-codegen/src/lib.rs#L119-L127—
fnfind_contracts_repo_rootpub fn find_contracts_repo_root(start: &Path) -> Option<PathBuf>crates/vox-tauri-codegen/src/lib.rs#L131-L142Walk parents of start until contracts/capability/runtime-capabilities.v1.yaml exists.
fnemit_tauri_packaging_hintspub fn emit_tauri_packaging_hints(crates/vox-tauri-codegen/src/lib.rs#L248Writes tauri/tauri.conf.json plus tauri/README.md under out_root. When contracts_repo_root is Some and contains [RUNTIME_CAPABILITIES_REL], also writes runtime-capabilities.projection.json beside those files. Pass required to include only capability rows whose ids appear in [vox_compiler::required_capabilities::RequiredRuntimeCapabilities::capability_ids] (plus a derived tauri_permission_allow_list); pass None to mirror the full YAML contract. Consumers run cargo tauri build from a src-tauri crate that includes or merges this config (see README).