-
Notifications
You must be signed in to change notification settings - Fork 406
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
Update rules_rust to use Bazel's toolchains feature. #52
Conversation
This allows rust targets to only depend on (and thus download) the toolchains that are used, dynamically chosen based on the current target platform. Fixes #14.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome, this is exciting! Please let @davidzchen chime in.
@davidzchen Do you have time to review this, and do you have an opinion of the fact that it requires the latest Bazel? Should we cut a release of rules_rust before merging this, for people who haven't upgraded to use? |
Sorry for the delay. This looks great. Thanks, John! |
return f | ||
return input | ||
|
||
def _get_files(input): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this and _get_first_file seem like good candidates for skylib cc @laurentlb
* Make rule tests compatible with the new string representations in Skylark (bazelbuild#51) * Rename set to depset (bazelbuild#50) * Update rules_rust to use Bazel's toolchains feature. (bazelbuild#52) This allows rust targets to only depend on (and thus download) the toolchains that are used, dynamically chosen based on the current target platform. Fixes bazelbuild#14. * Sketch of dylib support * Update compiler toolchain to 1.20.0. (bazelbuild#56) * Fix transitive dylib support. * Fix 'data' field not being made available to rust_test rule. * Topological sort for dylib link flags * Tidy rpath fn * Fix linking transitive static libs, and dylib ordering. * Actually export rust_library.dynamic_libs * Make sure TMPDIR exists for rustc. * Properly include dynamic_libs in runfiles. * fix syntax errors * more * Add support for depending on shared libraries on linux. * Merge raze patches into dylibs branch. * Fixup merge, including remove broken ctx.file.out_dir_tar from doc_* rules. * look for native deps when only transitive * deduplicate rpaths * hackily fix .so symlink..
This allows rust targets to only depend on (and thus download) the
toolchains that are used, dynamically chosen based on the current target
platform.
This requires use of Bazel 0.5.4, and will not work with earlier releases of Bazel.
Fixes #14.