maxpert / marmot

A distributed SQLite replicator built on top of NATS
https://maxpert.github.io/marmot/
MIT License
1.86k stars 42 forks source link

Build for mac OSX #50

Closed jacobzeng closed 1 year ago

jacobzeng commented 1 year ago

First of all, thanks for the cool tool. Do you consider build the executable file for mac OSX (amd64 and arm64)?

maxpert commented 1 year ago

I believe you just need to pass GOOS and GOARCH environment variable while building binaries.

maxpert commented 1 year ago

Were you able to build it with env variables?

maxpert commented 1 year ago

Closing due to inactivity

mindreframer commented 1 year ago

@maxpert I got this bash script to compile the binary on MacBook AIR M1 (2020)

#!/bin/sh

CC=gcc-13 \
CXX=g++-13 \
GOOS=darwin GOARCH=arm64 CGO_ENABLED=1 \
go build -ldflags "-linkmode external" -o dist/osx/arm64/marmot

Maybe it helps someone. It would be great to also have binary releases for OSX, maybe with https://goreleaser.com/quick-start/ ?

Cheers and thanks for the project, it looks great and the code is very clean!

maxpert commented 1 year ago

Given high demand I think it make sense to have binary builds for Mac in place as well

maxpert commented 1 year ago

75 has been merged and v0.8.5 already has binaries available. A follow up item might be to publish brew tap