Coder Social home page Coder Social logo

rules's Introduction

Bazel Rules

This directory contains examples of Bazel rules. For additional information, please refer to the documentation.

Getting started

These examples cover the most basic features: creating a rule, creating actions, passing information from a dependency to a target.

  • empty: Minimal example to show the creation of a rule.

  • attributes: Example of a rule with attributes.

  • actions.run: Example where a binary target is used as implicit dependency and executed by the rule.

  • actions.write: Example where a file is generated.

  • expand_template: Example where a file is generated based on a template.

  • shell command: Example where a shell command is executed to do simple text file processing.

  • mandatory provider: Example with a mandatory provider, to access information from a dependency.

  • optional provider: Example with an optional provider, to access information from a dependency.

  • depsets: Example of a using a depset to gather transitive information. Each target collects data from its dependencies.

Additional examples

These examples explore more specific scenarios. They allow you to have more control on the behavior of the rules.

  • executable: Example of an executable rule.

  • test rule: Example of a test rule.

  • runfiles: Example of an executable rule with runfiles (files required at runtime).

  • computed dependencies: Example with computed dependencies. The set of implicit dependencies depends on the rule attributes.

  • predeclared outputs: Example with attr.output_list and outputs.

  • implicit output: Example with implicit outputs. Some outputs are available only when explicitly requested.

  • aspect: Example of using an aspect to collect information from other rules.

rules

rules's People

Contributors

jtpadilla avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.