bazelbuild / bazelbuild/rules_rust

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

Open
#3,781 7 comments 0 reactions 0 assignees View on GitHub
crate-universe needs-design
Dominant language
Starlark
Stars
843
Forks
651
Avg merge
2d 18h
Merged PRs (30d)
15

Description

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!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.