Repository navigation
Expand file tree
/
Copy pathMODULE.bazel
More file actions
56 lines (46 loc) · 2.79 KB
/
Copy pathMODULE.bazel
File metadata and controls
56 lines (46 loc) · 2.79 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
"""bitwrap-io: pure-Bazel (Bzlmod) build.
Petri nets as ZK containers — editor + gnark prover + Solidity codegen. Go deps
are sourced from go.mod via Gazelle's go_deps extension, so `go build`/`go test`
(and the Makefile) keep working alongside Bazel.
Pins mirror the ecosystem-wide line (rules_go 0.61.1 / gazelle 0.51.3 / Go SDK
1.26.0) so every repo's build graph produces matching remote-cache action keys.
go-pflow is consumed as an ordinary registry dep (go.mod pins v0.9.0) — no local
replace, so no cross-repo wiring is needed here.
"""
module(
name = "bitwrap_io",
version = "0.0.0",
)
bazel_dep(name = "rules_go", version = "0.61.1", repo_name = "io_bazel_rules_go")
bazel_dep(name = "gazelle", version = "0.51.3", repo_name = "bazel_gazelle")
# Hermetic Node.js — runs the vanilla-ESM parity tests (no npm/package.json) as
# Bazel test targets, so `bazel test //...` covers Go<->JS parity.
bazel_dep(name = "rules_nodejs", version = "6.7.4")
# The browser modules under public/ are vendored copies of pflow-xyz's. They
# have to be committed here — public/embed.go embeds them and the Makefile is
# the ship path — but pflow-js.lock can only pin their bytes, which says nothing
# about which upstream version they came from.
#
# This pins the version. //public:vendored_js_matches_upstream diffs each
# vendored file against @pflow_xyz//public:browser_modules at the commit below,
# so bumping the pin is a deliberate, reviewable act and staleness is visible in
# the build rather than only in a sha256 nobody can date.
bazel_dep(name = "pflow_xyz", version = "0.0.0")
git_override(
module_name = "pflow_xyz",
commit = "09a4e2ed78c0e977cf58d35f24f8acce9748f095",
remote = "https://github.com/pflow-xyz/pflow-xyz.git",
)
node = use_extension("@rules_nodejs//nodejs:extensions.bzl", "node")
node.toolchain(node_version = "22.14.0")
# Hermetic Go SDK, pinned to the ecosystem-wide line (1.26.0) so compiled
# actions share remote-cache keys graph-wide. The SDK only needs to be >= go.mod's
# `go`/`toolchain` directives. nogo runs static analysis at build.
go_sdk = use_extension("@io_bazel_rules_go//go:extensions.bzl", "go_sdk")
go_sdk.download(version = "1.26.0")
go_sdk.nogo(nogo = "//:nogo")
# External Go deps come straight from go.mod / go.sum (incl. go-pflow v0.9.0).
go_deps = use_extension("@bazel_gazelle//:extensions.bzl", "go_deps")
go_deps.from_file(go_mod = "//:go.mod")
# `bazel mod tidy` populates this use_repo list from the go.mod graph.
use_repo(go_deps, "com_github_consensys_gnark", "com_github_consensys_gnark_crypto", "com_github_holiman_uint256", "com_github_ipfs_go_cid", "com_github_multiformats_go_multibase", "com_github_multiformats_go_multihash", "com_github_pflow_xyz_go_pflow", "com_github_piprate_json_gold", "com_github_rs_zerolog", "org_golang_x_crypto", "org_golang_x_sync")