Skip to content
This repository was archived by the owner on Jan 18, 2025. It is now read-only.
This repository was archived by the owner on Jan 18, 2025. It is now read-only.

Automatically add --manifest-path when -x and -C are combined #219

@jaskij

Description

@jaskij

To preface: I'm not a cargo-watch user, but I've been in a discussion with one, helping them work around some issues where the sanest workaround is an out-of-tree build (TLDR: bind mounts in Docker on anything but Linux have longstanding performance issues, OP in the Reddit discussion cut their build time by something close to 20x).

What I proposed, as a solution to their issue, is a Dockerfile that looks like this:

RUN mkdir -p /build
WORKDIR `/src`
ENTRYPOINT cargo watch -C /build -x run --manifest-path=/src/Cargo.toml -- --your-arg

It seems reasonable to add that --manifest-path argument automatically if -C is present. Perhaps do not change the behavior of existing -x, but rather add a new flag, -X.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions