-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.bazelrc
More file actions
84 lines (71 loc) · 3.33 KB
/
.bazelrc
File metadata and controls
84 lines (71 loc) · 3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Bazel configuration for rules_wasm_component
# Import CI-specific configuration when in CI environment
try-import %workspace%/.bazelrc.ci
# Enable modern features
common --enable_bzlmod
common --experimental_google_legacy_api
# Build settings
build --incompatible_enable_cc_toolchain_resolution
build --enable_platform_specific_config
# Test settings
test --test_output=errors
test --test_summary=detailed
# Platform-specific settings
build:linux --copt=-fPIC
build:macos --copt=-fPIC
# WebAssembly specific settings
build:wasm --platforms=//platforms:wasm32-unknown-unknown
build:wasm --@rules_rust//:no_std=alloc
# WASI settings
build:wasi --platforms=//platforms:wasm32-wasi
build:wasi --@rules_rust//:no_std=alloc
# Default WASM component platform (use WASI for component model compatibility)
build:wasm_component --platforms=//platforms:wasm32-wasi
# Remote cache (if using remote execution)
# build --remote_cache=...
# Performance
build --jobs=auto
build --local_resources=memory=HOST_RAM*.8
build --local_resources=cpu=HOST_CPUS*.8
# Environment isolation for hermetic builds
build --action_env=WASI_SDK_PATH=
build --incompatible_strict_action_env
# Clippy configuration - only enable with --config=clippy
build:clippy --aspects=@rules_rust//rust:defs.bzl%rust_clippy_aspect
build:clippy --output_groups=+clippy_checks
build:clippy --@rules_rust//:clippy_flags=-D,warnings,-D,clippy::all,-D,clippy::correctness,-D,clippy::style,-D,clippy::complexity,-D,clippy::perf
# ============================================================================
# Enterprise / Air-Gap Configuration
# ============================================================================
# The following environment variables allow you to configure corporate mirrors
# for all external dependencies. This supports enterprise deployments with:
# - Air-gap/offline builds
# - Corporate artifact repositories (JFrog, Nexus, Harbor, Minio)
# - Security scanning and compliance requirements
#
# To use corporate mirrors, set these in your environment or .bazelrc.user:
#
# GitHub Releases Mirror (for wasm-tools, wit-bindgen, wac, wkg, wasmtime, wizer, wasi-sdk):
# build --action_env=BAZEL_WASM_GITHUB_MIRROR=https://artifactory.company.com/github
#
# Node.js Mirror (for jco toolchain):
# build --action_env=BAZEL_NODEJS_MIRROR=https://artifactory.company.com/nodejs
#
# NPM Registry Mirror (for jco and componentize-js packages):
# build --action_env=BAZEL_NPM_REGISTRY=https://artifactory.company.com/npm
#
# Go SDK Mirror (for TinyGo toolchain):
# build --action_env=BAZEL_GO_MIRROR=https://artifactory.company.com/golang
#
# Go Module Proxy (for wit-bindgen-go and other Go dependencies):
# build --action_env=BAZEL_GOPROXY=https://artifactory.company.com/go-proxy
#
# Example corporate configuration (.bazelrc.user):
# build --action_env=BAZEL_WASM_GITHUB_MIRROR=https://nexus.corp.com/repository/github-proxy
# build --action_env=BAZEL_NODEJS_MIRROR=https://nexus.corp.com/repository/nodejs-dist
# build --action_env=BAZEL_NPM_REGISTRY=https://nexus.corp.com/repository/npm-group
# build --action_env=BAZEL_GO_MIRROR=https://nexus.corp.com/repository/golang-dist
# build --action_env=BAZEL_GOPROXY=https://nexus.corp.com/repository/go-proxy
#
# All downloads include mandatory SHA256 checksum verification for security.
# See checksums/tools/*.json for the complete list of verified checksums.