Skip to content

staging overlay mirrors entire workspace root #583

@rocketman-code

Description

@rocketman-code

Summary

The staging overlay in src/staging.rs mirrors every file and directory under the workspace root (excluding target/ and .git/). For large workspaces with many crates, thousands of files get symlinked even though only a handful are being compiled by the current wrapper invocation.

Impact

This is O(workspace_size) per crate compilation. For small-to-medium projects, overhead is negligible. For large monorepos with hundreds of crates, the symlink creation could measurably slow builds.

Suggested optimization

Mirror only the subtree containing the crate being compiled, not the entire workspace. The wrapper knows the crate's source directory from the config, so it could scope the overlay to just that subtree plus any directories referenced by include! / include_str! / include_bytes!.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low priorityenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions