bazelbuild / bazelbuild/rules_rust
Provide rules_license metadata in crate BUILD files
- Dominant language
- Starlark
- Stars
- 843
- Forks
- 651
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 15
Description
Please provide an option to include rules_license metadata when rendering crate BUILD files.
- [package_info](https://bazelbuild.github.io/rules_license/latest.html#package_info)
- [license](https://bazelbuild.github.io/rules_license/latest.html#license)
For example the BUILD file for the [rand](https://crates.io/crates/rand) crate would include
...
load("@rules_license//rules:package_info.bzl", "package_info")
load("@rules_license//rules:license.bzl", "license")
package(
default_package_metadata = [
":license",
":package_info",
],
default_visibility = ["//visibility:public"],
)
package_info(
name = "package_info",
package_name = "rand",
package_version = "0.8.5",
package_url = "https://github.com/rust-random/rand",
)
license(
name = "license",
license_kinds = [
"@rules_license//licenses/spdx:Apache-2.0",
"@rules_license//licenses/spdx:MIT",
],
)
...
Contributor guide
Assessment
This issue has not been assessed yet.