Asset Synchronization
July 18, 2026 ยท View on GitHub
This guide explains how embedded assets are consumed by the vtcode-core crate.
Overview
VT Code embeds selected workspace assets directly into the vtcode-core crate at build time. The build.rs script resolves these assets from the workspace root, so there is no separate mirror directory to maintain.
Synchronized Assets
The following asset is currently embedded:
| Source (Workspace) | Embedded Destination | Purpose |
|---|---|---|
docs/modules/vtcode_docs_map.md | docs/vtcode_docs_map.md (in crate build output) | Documentation map for self-documentation |
How It Works
- Single Source of Truth: Assets are maintained at the workspace root (e.g.,
docs/modules/vtcode_docs_map.md). - Build-Time Embedding:
crates/codegen/vtcode-core/build.rscopies the asset into the crate's build output during compilation. - No Manual Sync Required: Because the build script reads directly from the workspace root, there is no separate sync step or mirror directory.
Verification
After modifying an embedded asset:
# Verify the crate still builds
cargo check --package vtcode-core
# Run tests
cargo nextest run -p vtcode-core
Adding New Embedded Assets
To embed a new asset:
- Add to
build.rs: Append a(source_relative, dest_relative)tuple toEMBEDDED_ASSETSincrates/codegen/vtcode-core/build.rs. - Test the Build: Ensure
cargo check --package vtcode-coresucceeds and the asset is available at runtime.
Related Documentation
- Development Guide - Development overview