module(
name = "hawdb",
version = "0.36.0",
)
bazel_dep(name = "rules_rust", version = "0.75.0")
bazel_dep(name = "rules_shell", version = "0.8.0")
bazel_dep(name = "rules_tla", version = "0.2.0")
bazel_dep(name = "bazel_skylib", version = "1.9.2")
bazel_dep(name = "platforms", version = "1.1.0")
bazel_dep(name = "rules_python", version = "2.5.0")
bazel_dep(name = "rules_go", version = "0.65.0")
bazel_dep(name = "gazelle", version = "0.54.0")
local_path_override(
module_name = "rules_tla",
path = "third_party/rules_tla",
)
rust = use_extension("@rules_rust//rust:extensions.bzl", "rust")
rust.toolchain(
edition = "2024",
versions = ["1.99.1"],
)
use_repo(rust, "rust_toolchains")
_CRATE_PLATFORM_TRIPLES = [
"aarch64-apple-darwin",
"aarch64-unknown-linux-gnu",
"wasm32-unknown-unknown",
"wasm32-wasip1",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"x86_64-unknown-linux-gnu",
"x86_64-unknown-nixos-gnu",
]
crate = use_extension("@rules_rust//crate_universe:extensions.bzl", "crate")
crate.from_cargo(
name = "crate_index",
cargo_lockfile = "//:Cargo.lock",
manifests = ["//:Cargo.toml"],
supported_platform_triples = _CRATE_PLATFORM_TRIPLES,
)
use_repo(crate, "crate_index")
crate.spec(
package = "opentelemetry",
repositories = ["telemetry_crates"],
version = "=0.33.1",
default_features = False,
features = ["metrics"],
)
crate.from_specs(
name = "telemetry_crates",
cargo_lockfile = "//crates/telemetry:Cargo.Bazel.lock",
supported_platform_triples = _CRATE_PLATFORM_TRIPLES,
)
use_repo(crate, "telemetry_crates")
crate.spec(
package = "base64",
repositories = ["ffi_crates"],
version = "0.22",
)
crate.from_specs(
name = "ffi_crates",
cargo_lockfile = "//bindings/ffi:Cargo.Bazel.lock",
supported_platform_triples = _CRATE_PLATFORM_TRIPLES,
)
use_repo(crate, "ffi_crates")
go_sdk = use_extension("@rules_go//go:extensions.bzl", "go_sdk")
go_sdk.from_file(go_mod = "//bindings/go:go.mod")
go_deps = use_extension("@gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//bindings/go:go.mod")
use_repo(go_deps, "com_github_ebitengine_purego")
crate.spec(
features = [
"abi3-py311",
"extension-module",
],
package = "pyo3",
repositories = ["python_crates"],
version = "0.29",
)
crate.from_specs(
name = "python_crates",
cargo_lockfile = "//bindings/python:Cargo.Bazel.lock",
)
_PYTHON_BUILD_ENV = {
"PYO3_BUILD_EXTENSION_MODULE": "1",
"PYO3_NO_PYTHON": "1",
}
crate.annotation(
build_script_env = _PYTHON_BUILD_ENV,
crate = "pyo3",
repositories = ["python_crates"],
)
crate.annotation(
build_script_env = _PYTHON_BUILD_ENV,
crate = "pyo3-build-config",
repositories = ["python_crates"],
)
crate.annotation(
build_script_env = _PYTHON_BUILD_ENV,
crate = "pyo3-ffi",
repositories = ["python_crates"],
)
use_repo(crate, "python_crates")
python = use_extension("@rules_python//python/extensions:python.bzl", "python")
python.toolchain(python_version = "3.11")
pip = use_extension("@rules_python//python/extensions:pip.bzl", "pip")
pip.parse(
hub_name = "python_test_deps",
python_version = "3.11",
requirements_lock = "//bindings/python:requirements.txt",
)
use_repo(pip, "python_test_deps")