Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-C", "target-feature=+crt-static"]
20 changes: 14 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# crate it just uploaded.
#
# Binary targets (CLI `tonin` and `tonin-proxy`, built per release):
# - x86_64-unknown-linux-gnu (Linux x86_64)
# - aarch64-unknown-linux-gnu (Linux ARM64, e.g. Graviton)
# - x86_64-unknown-linux-musl (Linux x86_64)
# - aarch64-unknown-linux-musl (Linux ARM64, e.g. Graviton)
# - x86_64-apple-darwin (macOS Intel)
# - aarch64-apple-darwin (macOS Apple Silicon)
# - x86_64-pc-windows-msvc (Windows x86_64)
Expand Down Expand Up @@ -183,10 +183,10 @@ jobs:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
archive: tar.gz
- target: aarch64-unknown-linux-gnu
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
archive: tar.gz
- target: x86_64-apple-darwin
Expand Down Expand Up @@ -229,6 +229,10 @@ jobs:
echo "skipped=false" >> "$GITHUB_OUTPUT"
fi

- name: Install musl-tools
if: matrix.target == 'x86_64-unknown-linux-musl' && steps.check.outputs.skipped != 'true'
run: sudo apt-get update && sudo apt-get install -y musl-tools

- name: Install Rust 1.93 with target ${{ matrix.target }}
if: steps.check.outputs.skipped != 'true'
uses: dtolnay/rust-toolchain@stable
Expand Down Expand Up @@ -274,10 +278,10 @@ jobs:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
archive: tar.gz
- target: aarch64-unknown-linux-gnu
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
archive: tar.gz
- target: x86_64-apple-darwin
Expand Down Expand Up @@ -317,6 +321,10 @@ jobs:
echo "skipped=false" >> "$GITHUB_OUTPUT"
fi

- name: Install musl-tools
if: matrix.target == 'x86_64-unknown-linux-musl' && steps.check.outputs.skipped != 'true'
run: sudo apt-get update && sudo apt-get install -y musl-tools

- name: Install Rust 1.93 with target ${{ matrix.target }}
if: steps.check.outputs.skipped != 'true'
uses: dtolnay/rust-toolchain@stable
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# Cargo.
**/Cargo.lock.bak
.cargo/
!.cargo/config.toml

# Incremental compilation / cache.
**/*.rlib
Expand Down
6 changes: 3 additions & 3 deletions scripts/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ detect_target() {
case "$os" in
Linux)
case "$arch" in
x86_64) echo "x86_64-unknown-linux-gnu" ;;
aarch64|arm64) echo "aarch64-unknown-linux-gnu" ;;
x86_64) echo "x86_64-unknown-linux-musl" ;;
aarch64|arm64) echo "aarch64-unknown-linux-musl" ;;
*) err "Unsupported Linux architecture: $arch (pre-built binary not available; use 'cargo install tonin')" ;;
esac ;;
Darwin)
Expand Down Expand Up @@ -143,7 +143,7 @@ install_binary() {
local repo="$1" # e.g. Rushit/tonin
local bin="$2" # e.g. tonin
local version="$3" # e.g. v0.5.4
local target="$4" # e.g. x86_64-unknown-linux-gnu
local target="$4" # e.g. x86_64-unknown-linux-musl
local dest_dir="$5" # e.g. /usr/local/bin

local dest="${dest_dir}/${bin}"
Expand Down
Loading