cerca

lean forum software (pmc local branch)
Log | Files | Refs | README | LICENSE

commit 39cd2184c54d76f5a5132c3638ffe0c35dc85375
parent 553edadf17558020086ae9577c675bcbcfc58489
Author: Alexander Cobleigh <cblgh@cblgh.org>
Date:   Mon, 22 Jul 2024 11:17:15 +0200

Merge pull request #67 from decentral1se/size-docs

docs: binary size
Diffstat:
MREADME.md | 17+++++++++++++++++
1 file changed, 17 insertions(+), 0 deletions(-)

diff --git a/README.md b/README.md @@ -80,3 +80,20 @@ To launch a local instance of the forum, run those commands (linux): - `go run run.go --authkey 0 --allowlist temp.txt --dev` It should respond `Serving forum on :8277`. Just go on [http://localhost:8277](http://localhost:8277). + +### Building binaries with reduced size +This is optional, but if you want to minimize the size of any binary (whether it be the `cerca` executable +or any of the binaries in [`cmd/`](/cmd/) follow the instructions below. Less useful for active development, more +useful for sending binaries to other computers. + +Pass `-ldflags="-s -w"` when building your binary: + +``` +go build -ldflags="-s -w" . +``` + +Additionally, run [upx](https://upx.github.io) on any generated binary: + +``` +upx --lzma cerca +```