cargo-aur icon indicating copy to clipboard operation
cargo-aur copied to clipboard

support rust workspace

Open Ludea opened this issue 2 years ago • 5 comments

workspace seems to be not supported.

I get workspace with 2 subprojets, but when running cargo aur, get Error: missing field package at line 1 column 1

Ludea avatar Feb 06 '23 10:02 Ludea

Would it work if you ran cargo aur within the subcrate?

fosskers avatar Feb 07 '23 00:02 fosskers

doesn't work because binaries are into /workspaceroot/target/release/XXX and not /workspaceroot/workspacemember/target/release/XXX

Ludea avatar Feb 07 '23 08:02 Ludea

Related:

With a structure like so:

crate1/
  - crate2/
    - src/
      - lib.rs
    - Cargo.toml
  - src/
    - bin.rs
    - lib.rs
  - Cargo.toml

It fails when the root cargo toml uses workspace.package keys for anything in the package section, for example:

[package]
...
license.workspace = true

[workspace]
members = ["crate2"]

[workspace.package]
license = "MIT"

ozwaldorf avatar Jun 15 '23 23:06 ozwaldorf

Thanks for the extra info.

fosskers avatar Jun 21 '23 00:06 fosskers

One possible workaround for the detection of target/ would be to symlink to target/ from <subcrate>/target/.

fosskers avatar Oct 02 '23 07:10 fosskers