build: let Rust crates live beside the C++ they belong to

wd_rust_crate and wd_rust_binary take explicit srcs, crate_root and
cxx_bridge_hdrs, so a crate can share a package with C++ instead of globbing
everything in it, and the generated bridge headers take the package's C++
include path. wd_rust_binary also gains malloc, tool (linkopts_tool + cpu:8, as
wd_cc_binary) and a _cross alias, enough to build a production binary with it.

clippy.toml and rustfmt.toml move to the repository root, where they apply to
every crate; `just clippy` accepts a label as well as a src/rust crate name.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
Dan Lapid 2026-09-20 23:52:29 -04:00 • committed by Dan Lapid
commit 92069bfbb9
12 changed files with 105 additions and 31 deletions