Why doesn't rules_rust respect the mod
keyword?
#2040
Replies: 1 comment
-
I think I understand now... The rust module system seems incompatible with bazel's efficient compilation and linking of binaries, since you'd have to tell bazel about all the files in your project upfront. So I'm going to close this. It did help to find the |
Beta Was this translation helpful? Give feedback.
-
I have a small dummy project here where I've been playing around with rules_rust:
But rules_rust doesn't seem to build unless I remove the
mod app;
line insrc/main.rs
and changeuse app::app::app;
->use app::app;
. See here for build error.The result is that
cargo run
never works at the same time asbazel run
, because their linking system is different. Am I doing something wrong, or is this intended?Beta Was this translation helpful? Give feedback.
All reactions