You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to use the wit-bindgen executable from wit-bindgen-cli but I can't figure out why it won't work.
Here's an example in a single MODULE.bazel file:
module(name="foo")
bazel_dep(name="rules_rust", version="0.49.1")
crate=use_extension("@rules_rust//crate_universe:extension.bzl", "crate")
# For these 2 crates, I can get the bin# at e.g. `@crates//:protoc-gen-prost__protoc-gen-prost`crate.spec(package="protoc-gen-prost", version="0.3.1")
crate.annotation(crate="protoc-gen-prost", gen_binaries= ["protoc-gen-prost"])
crate.spec(package="protoc-gen-tonic", version="0.4.0")
crate.annotation(crate="protoc-gen-tonic", gen_binaries= ["protoc-gen-tonic"])
# For this one, I can't.# Uncommenting the annotation causes an error.crate.spec(package="wit-bindgen-cli", version="0.29.0")
#crate.annotation(crate = "wit-bindgen-cli", gen_binaries = ["wit-bindgen"])crate.from_specs()
use_repo(crate, "crates")
Uncommenting the annotation for wit-bindgen-cli causes the error: Error: Unused annotations were provided. Please remove them. So, rules_rust seems to think wit-bindgen-cliis not a dependency (verified with bazel query). Everything is fine for the first two. You can see all the generated targets with bazel query '@crates//...' --output build.
What is it about wit-bindgen-cli that makes it seemingly invisible to rules_rust?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I need to use the
wit-bindgen
executable fromwit-bindgen-cli
but I can't figure out why it won't work.Here's an example in a single
MODULE.bazel
file:Uncommenting the annotation for
wit-bindgen-cli
causes the error:Error: Unused annotations were provided. Please remove them
. So,rules_rust
seems to thinkwit-bindgen-cli
is not a dependency (verified withbazel query
). Everything is fine for the first two. You can see all the generated targets withbazel query '@crates//...' --output build
.What is it about
wit-bindgen-cli
that makes it seemingly invisible torules_rust
?Beta Was this translation helpful? Give feedback.
All reactions