Giter Club home page Giter Club logo

incubator's Introduction

Overview

incubator is a place to start new projects.

Project structure


├── cmd             - Go binaries
├── crates          - Cargo workspace Crates
├── incubator       - Python packages root namespace
│   ├── <appname>   - Python applications have their own directories
│   └── common      - Python common libraries nested here
├── pkg             - Go packages
├── scripts         - Place to put build/helper/miscellaneous scripts
├── third_party     - Package for managing third-party resources
│   ├── cargo       - Rust's Cargo config
│   ├── golang      - Golang's packaging config
│   ├── python      - Python's packaging config
│   └── workspace   - Place to put repository rules, to keep WORKSPACE cleaner
└── tools           - Place to put tools for this workspace
    ├── python      - Python tooling config
    └── rules       - Custom rules for this workspace

Language Support

Bazel provides toolchains for compiling and running code for different languages, however, to make your editor happy, you may need to install toolchains on your machine.

Use asdf to do this:

asdf plugin add python
asdf plugin add golang
asdf plugin add rust
asdf plugin add nodejs
asdf install

You may also want to install direnv and run

direnv allow

To add workspace-specific helper scripts to your path when working in this workspace.

Go

Add, remove or update a dependency with go get

go get github.com/example/foo
go mod tidy

Then run

bazel run //:gazelle_update_repos

Python

Add, remove or update a dependency in requirements.in

vim $(bazelisk info workspace)/requirents.in

Then run the update script to compile requirements_lock.txt and install the requirements into your current Python environment.

update-python-deps

Rust

Install cargo-edit to make life a little easier:

cargo install cargo-edit

Changing dependencies

Add, remove or update a dependency with cargo-edit

cd crates/my_crate
cargo-add my_dep
cargo-rm other_dep
cargo-upgrade third_dep

Using these scripts will update the Cargo.lock and generate bazel macros for the Cargo dependencies.

For the moment, the Cargo workspace can't specify the dependencies to inherit, but work around this is happening and that's really exciting.

incubator's People

Contributors

jmileson avatar

Watchers

 avatar  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.