Skip to content

[examples] Add Dylint integration example#123

Draft
andyscott wants to merge 2 commits into
hermeticbuild:mainfrom
andyscott:pr/dylint-example
Draft

[examples] Add Dylint integration example#123
andyscott wants to merge 2 commits into
hermeticbuild:mainfrom
andyscott:pr/dylint-example

Conversation

@andyscott
Copy link
Copy Markdown

Summary

  • add a self-contained Dylint integration example under examples/dylint
  • keep Dylint-specific rules local to the example rather than exposing a core rules_rs API
  • demonstrate target-local custom lint selection with two independent Dylint configs

Stacked on #122. Until that PR lands, GitHub will show the prerequisite
rustc-dev toolchain changes in this draft PR as well. The intended review
scope for this PR is only the example layer added on top of #122.

Motivation

The example shows how a downstream repository can integrate Dylint with generated rules_rs toolchains once nightly rustc-dev support is available, without making Dylint itself a first-class ruleset feature.

Details

  • add a standalone nested Bazel module at examples/dylint
  • keep the Dylint helper rules and runner beside the example as local recipe code
  • configure the example to use the nightly rustc-dev toolchain path
  • verify that two Rust targets built from the same source can select different Dylint libraries through target-local lint configs
  • exclude the nested module from root //... traversal via .bazelignore

Validation

  • reviewed as a stacked follow-up on top of the nightly rustc-dev toolchain PR
  • root-workspace bazel query //examples/dylint:* confirms the nested module is excluded from the top-level workspace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant