-
- bazelisk is recommended
-
poetry: development only
-
protoc: development only
- [prost_build] of Rust depends on protoc binary, so to use rust-analyzer on development, you need to install protoc
-
Xcode (only macOS): for build LightGBM with cmake
- Some C++ headers can not be found on binding generation without Xcode
- After installing Xcode, you can check configurations by the below command.
sudo xcodebuild -license # Check gcc configured with prefix of Xcode not CommandLineTools gcc --version > Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/4.2.1 > Apple clang version 13.0.0 (clang-1300.0.29.30) > Target: x86_64-apple-darwin20.6.0 > Thread model: posix > InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
This is an example repository to build python bindings of rust (PyO3) using Bazel.
bazel run //python-cmd
bazel build //pythonlib:pythonlib_wheel
Update BUILD.bazel by Cargo.toml Run this command every time you update Cargo.toml.
CARGO_BAZEL_REPIN=1 bazel sync --only=crate_index
Update BUILD.bazel of Golang with the following command:
bazel run @go_sdk//:bin/go -- mod tidy
bazel run //:gazelle
bazel run //:gazelle-update-repos
Check the README.md for more information.
Go Library
TODO: Write more
Python library
Run pytest ob pythonlib
bazel test //pythonlib:pytest
Format packages with the following command:
bazel query "attr(tags, '\\bformat\\b', //...)" | xargs -I{} bazel run {}
Lint packages with the following command:
bazel test //... --test_tag_filters lint