@cargo_env.bzl//:cargo_env.bzl
re-export to allow syntax sugar: load("@cargo_env.bzl", "cargo_env")
Functions & Macros
env_wrapperParameters
*name | |
*binary | |
*environment | |
visibility | Default: None |
kwargs |
Rules
cargo_envGenerates a Cargo environment file for cargo builds.
An example of using this rule is:
cargo_env(
name = "cargo_env",
clang = "@llvm_toolchain_llvm//:bin/clang",
include_directories = ["@my_library//:headers_directory"],
libclang = "@llvm_toolchain_llvm//:lib/libclang.so",
openssl_dir = "@openssl//:gen_dir",
env_directories = {
"SOME_PACKAGE_PATH": "@some_package//:source_files",
},
)
| Attribute | Type | Description |
|---|---|---|
*name | name | A unique name for this target. |
clang | label | The clang binary. Default: None |
env_directories | dictionary: Strings → Label | Map of environment variable names to filegroup targets. The path will be the repo/package root of the target. Example: {"MY_LIB_PATH": "@my_lib//:source_files"} Default: {} |
include_directories | list of labels | Include directories for C++ to find. Default: [] |
libclang | label | libclang shared library (libclang.so). Default: None |
openssl_dir | label | The OpenSSL directory. Default: None |
@cargo_env.bzl//cargo_env:cargo_env.bzl
Generates a Cargo environment file and wrapper scripts for cargo builds using dependencies provided by Bazel.
Functions & Macros
env_wrapperParameters
*name | |
*binary | |
*environment | |
visibility | Default: None |
kwargs |
Rules
cargo_envGenerates a Cargo environment file for cargo builds.
An example of using this rule is:
cargo_env(
name = "cargo_env",
clang = "@llvm_toolchain_llvm//:bin/clang",
include_directories = ["@my_library//:headers_directory"],
libclang = "@llvm_toolchain_llvm//:lib/libclang.so",
openssl_dir = "@openssl//:gen_dir",
env_directories = {
"SOME_PACKAGE_PATH": "@some_package//:source_files",
},
)
| Attribute | Type | Description |
|---|---|---|
*name | name | A unique name for this target. |
clang | label | The clang binary. Default: None |
env_directories | dictionary: Strings → Label | Map of environment variable names to filegroup targets. The path will be the repo/package root of the target. Example: {"MY_LIB_PATH": "@my_lib//:source_files"} Default: {} |
include_directories | list of labels | Include directories for C++ to find. Default: [] |
libclang | label | libclang shared library (libclang.so). Default: None |
openssl_dir | label | The OpenSSL directory. Default: None |