Skip to content

Commit

Permalink
add guide to compile from source
Browse files Browse the repository at this point in the history
  • Loading branch information
shenwei356 committed Aug 5, 2022
1 parent 9f6ac04 commit 3198f95
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,29 @@ And then:
#### Method 2: For Go developer

go get -u github.com/shenwei356/rush/

#### Method 3: Compiling from source

# download Go from https://go.dev/dl
wget https://go.dev/dl/go1.17.12.linux-amd64.tar.gz

tar -zxf go1.17.12.linux-amd64.tar.gz -C $HOME/

# or
# echo "export PATH=$PATH:$HOME/go/bin" >> ~/.bashrc
# source ~/.bashrc
export PATH=$PATH:$HOME/go/bin

git clone https://github.com/shenwei356/rush
cd rush

go build

# or statically-linked binary
CGO_ENABLED=0 go build -tags netgo -ldflags '-w -s'

# or cross compile for other operating systems and architectures
CGO_ENABLED=0 GOOS=openbsd GOARCH=amd64 go build -tags netgo -ldflags '-w -s'


## Usage
Expand Down

0 comments on commit 3198f95

Please sign in to comment.