Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Parse Cargo's --manifest-path option to determine mounted docker root #494

Closed
wants to merge 1 commit into from

Commits on Mar 19, 2022

  1. feat: Parse Cargo's --manifest-path option to determine mounted docker

    root
    
    This commits adds support for parsing the `--manifest-path` option to cross. So
    far, the `Cargo.toml` manifest of the crate (or its Cargo workspace) to compile
    has been assumed to be in the current working directory. This means, that
    relative crate dependencies were not supported, because those paths were not
    mapped into the docker container.
    
    Take the following example structure, where `my-bin` depends on `my-lib`:
    .
    ├── my-bin
    │   ├── Cargo.toml
    │   └── src
    │       └── main.rs
    └── my-lib
        ├── Cargo.toml
        └── src
            └── lib.rs
    
    This commits enables such scenarios, by running cross from `.` like so:
    `cross build --manifest-path=my-lib/Cargo.toml --target x86_64-pc-windows-gnu`,
    as `.` is mapped as the container's root, and the options passed through to
    Cargo.
    
    Related cross-rs#388 cross-rs#139 cross-rs#277 cross-rs#78
    
    Co-authored-by: Kviring Alexey <[email protected]>
    wngr and avkviring committed Mar 19, 2022
    Configuration menu
    Copy the full SHA
    a46b030 View commit details
    Browse the repository at this point in the history