Skip to content

example of a bazel project which refers to an entire submodule of crates by relative path of crate dependency? #3781

@sthornington

Description

@sthornington

Hi folks,

We are trying to further integrate a legacy mixed C++ + Rust bazel repository with another cargo workspace repository, via git submodule. We are running into some problems with cargo-bazel not creating crate labels for cargo crates referred to by relative path? I am not sure why? Does anyone have an example of how to make this work?

The only way I have gotten it to work so far is by literally putting redundant BUILD files into this otherwise-pure cargo repository so that bazel can build these things with labels like //submodules/mycargorepo/whatever but I would really much prefer if it were @submodules_mycargorepo_crate_index//:whatever or something like that, but I cannot seem to make it work ... Please help!

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