Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ COPY go.mod go.sum ./
RUN if [ ! -f vendor/modules.txt ]; then go mod download; fi

COPY . .
RUN CGO_ENABLED=0 go build -tags go_json -o /go/bin/golbat
# `thin`: trimmed pogo schema (pogo/vbase.thin.pb.go) — decode skips the fields
# Golbat never reads. Same decoded values as the full schema; fewer allocations.
RUN CGO_ENABLED=0 go build -tags go_json,thin -o /go/bin/golbat
RUN mkdir /empty-dir

# Now copy it into our base image.
Expand Down
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,15 @@ FLAGS = go_json
#FLAGS := go_json
#endif

# `thin` selects the trimmed pogo schema (pogo/vbase.thin.pb.go): decode skips
# the ~97% of proto fields Golbat never reads, cutting decode allocations. This
# is the default production build. Use `make golbat-full` for the full schema
# (identical decoded values; only useful for contributors adding field access).
golbat: FORCE
go build -tags $(FLAGS) golbat
go build -tags $(FLAGS),thin golbat

golbat-full: FORCE
go build -tags $(FLAGS) -o golbat golbat

# --- Profile-guided optimization --------------------------------------------
# Go (>= 1.21) automatically applies ./default.pgo when building the golbat
Expand Down
2 changes: 2 additions & 0 deletions pogo/vbase.pb.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
//go:build !thin

//
// Copyright 2016-2026 --=FurtiF=--.
//
Expand Down
Loading