GithubHelp home page GithubHelp logo

rajeev921 / buck2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from facebook/buck2

0.0 0.0 0.0 37.02 MB

Build system, successor to Buck

Home Page: https://buck2.build/

License: Apache License 2.0

Shell 0.02% JavaScript 0.18% C++ 0.07% Python 1.70% Erlang 1.85% Go 0.09% Rust 74.67% TypeScript 0.02% CSS 0.03% HTML 0.01% RenderScript 0.01% Batchfile 0.01% Starlark 21.34% Nix 0.01%

buck2's Introduction

Buck2 CI

This repo contains the code for the Buck2 build system - the successor to the original Buck build system.

We're keen for you to give Buck2 a go and let us know any problems you run into.

Getting started

You can either download the latest buck2 binary, or build from source.

Buck2 is written in Rust, which requires rustup to compile.

You can either build buck2 from a clone of the Buck2 repo:

git clone https://github.com/facebook/buck2.git
cd buck2/
cargo install --path=app/buck2

Or alternatively install it directly from GitHub:

rustup install nightly-2023-04-23
cargo +nightly-2023-04-23 install --git https://github.com/facebook/buck2.git buck2

Build uses prebuilt protoc binary from protoc-bin-vendored crate. If these binaries to do not work on your machine (for example, when building for NixOS), path to protoc binary and protobuf include path can be specified via BUCK2_BUILD_PROTOC and BUCK2_BUILD_PROTOC_INCLUDE environment variables.

To build a project with buck2, go to the getting started guide.

Terminology conventions

Frequently used terms and their definitions can be found in the glossary page.

Coding conventions

Beyond the obvious (well-tested, easy to read) we prefer guidelines that are automatically enforced, e.g. through Rustfmt, Clippy or the custom linter we have written. Some rules:

  • Use the utilities from Gazebo where they are useful, in particular, dupe.
  • Prefer to_owned to convert &str to String.
  • Qualify anyhow::Result rather than use anyhow::Result.
  • Most errors should be returned as anyhow::Result. Inspecting errors outside tests and the top-level error handler is strongly discouraged.
  • Most errors should be constructed with thiserror deriving enum values, not raw anyhow!.
  • We use the derivative library to derive the PartialEq and Hash traits when some fields should be ignored.
  • Prefer use crate::foo::bar over use super::bar or use crate::foo::*, apart from test modules which often have use super::* at the top.
  • Modules should either have submodules or types/functions/constants, but not both.
  • Prefer anyhow::Error for checking internal invariants that are maintained between multiple files, while panic!/unreachable! are reasonable if the invariant is file-local.

Error messages

  • Names (of variables, targets, files, etc) should be quoted with backticks, e.g. Variable `x` not defined.
  • Lists should use square brackets, e.g. Available targets: [`aa`, `bb`].
  • Error messages should start with an upper case letter. Error messages should not end with a period.

License

Buck2 is both MIT and Apache License, Version 2.0 licensed, as found in the LICENSE-MIT and LICENSE-APACHE files.

buck2's People

Contributors

stepancheg avatar krallin avatar ndmitchell avatar bobyangyf avatar wendy728 avatar iguridi avatar blackm00n avatar andrewjcg avatar themarwhal avatar chatura-atapattu avatar get9 avatar christolliday avatar lmvasquezg avatar milend avatar kapji avatar raulg4435 avatar jakobdegen avatar maxovtsin avatar shonaganuma avatar thegeorge avatar zertosh avatar zsol avatar navidqar avatar rmaz avatar loganwendholt avatar brandonthebuilder avatar grievejia avatar geralt-encore avatar shayne-fletcher avatar lebentle 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.