-
Notifications
You must be signed in to change notification settings - Fork 441
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RFC: First class support for external crates #530
Comments
If there was One True Build system, then sure it would make sense for all
those random tools to provide their corresponding .bzl files. As it stands,
only by chance does cxx have direct support for bazel. Maybe `bzlmod` will
change this and supplant Cargo et al, but I suspect that is a long
way away. I think it makes perfect sense for these plugins to continue to
accumulate in rules_rust as needed.
…On Tue, Dec 8, 2020 at 11:10 PM UebelAndre ***@***.***> wrote:
In working on #392 <#392> I
found https://github.com/dtolnay/cxx which is a crate that could
potentially satisfy the need for both bindgen and cbindgen. The
interesting bit is that cxx provides Bazel rules for use with rules_cc
and rules_rust. This stands out to me as the ideal location for such
rules. However, the primary Rust rules for Bazel include proto/grpc,
bindgen, and wasm-bindgen rules which are all based on external crates.
There's even talk of adding additional rules for external crates (#479
<#479> #392
<#392>).
My questions are, is this the ideal future? Should rules_rust have first
class rules for these crates? Or should we be striving add these rules to
the relevant crates? Where should the line be drawn on what gets added to
the rules and what doesn't?
@damienmg <https://github.com/damienmg> @illicitonion
<https://github.com/illicitonion> @mfarrugi <https://github.com/mfarrugi>
@smklein <https://github.com/smklein> @dfreese
<https://github.com/dfreese>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#530>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAROG6FV3LHQFXUBYIGEOJTST32BXANCNFSM4US47SIA>
.
|
What is And I don't feel like it makes "perfect" sense. The thing I'd like to take a crack at is a rule (likely backed by I think even if |
bzlmod is https://github.com/bazelbuild/bzlmod
…On Wed, Dec 9, 2020 at 9:33 PM UebelAndre ***@***.***> wrote:
What is bzlmod?
And I don't feel like it makes "perfect" sense. The thing I'd like to take
a crack at is a rule (likely backed by cargo-raze) which lives in
rules_rust could be used to build a crate given it's Cargo.toml and
Cargo.lock files and be used in a small .bzl file committed to that repo.
I would imagine if the footprint is small enough and it didn't conflict
with design choices of that crate, that it could be added once and go
untouched for quite some time.
I think even if rules_rust continues to have first class rules for these
external crates, that this is functionality that would be extremely
beneficial.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#530 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAROG6EMMHWRN4BETHRH6N3SUAXODANCNFSM4US47SIA>
.
|
Closing this since there doesn't appear to be much interest and the focus has sorta shifted. Maybe my original hopes for this RFC can be solved in the future with better ways to interact with external crates |
In working on #392 I found https://github.com/dtolnay/cxx which is a crate that could potentially satisfy the need for both
bindgen
andcbindgen
. The interesting bit is thatcxx
provides Bazel rules for use withrules_cc
andrules_rust
. This stands out to me as the ideal location for such rules. However, the primary Rust rules for Bazel includeproto
/grpc
,bindgen
, andwasm-bindgen
rules which are all based on external crates. There's even talk of adding additional rules for external crates (#479 #392).My questions are, is this the ideal future? Should
rules_rust
have first class rules for these crates? Or should we be striving add these rules to the relevant crates? Where should the line be drawn on what gets added to the rules and what doesn't?@damienmg @illicitonion @mfarrugi @smklein @dfreese
The text was updated successfully, but these errors were encountered: