Skip to content

Commit 2da5943

Browse files
authored
Merge pull request #83 from tamirelazar/dev
Release 0.1.1
2 parents f838723 + 33f7950 commit 2da5943

10 files changed

Lines changed: 342 additions & 14 deletions

File tree

.dockerignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Keep the build context tiny. Exclude every target dir (root + nested crates
2+
# like tslime-wasm), the Nix `result` symlink, and all dev-meta. Only source,
3+
# Cargo manifests, and embedded assets reach the build.
4+
**/target
5+
result
6+
tslime-wasm
7+
.git
8+
.meta.git
9+
.claude
10+
.superpowers
11+
docs
12+
assets/demos
13+
.ws6_preview
14+
.github

.github/workflows/release.yml

Lines changed: 110 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,17 @@ jobs:
2626
runs-on: ${{ matrix.os }}
2727
strategy:
2828
matrix:
29-
os: [ubuntu-latest, macos-latest, windows-latest]
3029
include:
3130
- os: ubuntu-latest
31+
target: x86_64-unknown-linux-musl
3232
artifact_name: tslime
3333
asset_name: tslime-linux-x86_64
3434
- os: macos-latest
35+
target: aarch64-apple-darwin
3536
artifact_name: tslime
36-
asset_name: tslime-macos-x86_64
37+
asset_name: tslime-macos-arm64
3738
- os: windows-latest
39+
target: x86_64-pc-windows-msvc
3840
artifact_name: tslime.exe
3941
asset_name: tslime-windows-x86_64.exe
4042

@@ -44,6 +46,12 @@ jobs:
4446

4547
- name: Install Rust toolchain
4648
uses: dtolnay/rust-toolchain@stable
49+
with:
50+
targets: ${{ matrix.target }}
51+
52+
- name: Install musl tools (Linux)
53+
if: runner.os == 'Linux'
54+
run: sudo apt-get update -qq && sudo apt-get install -y --no-install-recommends musl-tools
4755

4856
- name: Cache cargo registry
4957
uses: actions/cache@v4
@@ -64,26 +72,34 @@ jobs:
6472
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
6573

6674
- name: Build release binary
67-
run: cargo build --release --verbose
75+
run: cargo build --release --verbose --target ${{ matrix.target }}
6876

6977
- name: Check binary size
7078
if: runner.os == 'Linux'
7179
run: |
72-
size target/release/tslime
73-
SIZE=$(stat -c%s target/release/tslime)
74-
# Headroom over the ~3.1MB Linux release binary.
80+
BIN="target/${{ matrix.target }}/release/tslime"
81+
size "$BIN" || true
82+
SIZE=$(stat -c%s "$BIN")
7583
MAX_SIZE=4000000
7684
if [ "$SIZE" -gt "$MAX_SIZE" ]; then
7785
echo "Binary size $SIZE exceeds $MAX_SIZE limit"
7886
exit 1
7987
fi
8088
echo "Binary size $SIZE is under $MAX_SIZE limit"
8189
90+
# Stage the binary under its release asset name so the downloaded artifact
91+
# is named correctly for `gh release create` (no post-download rename).
92+
- name: Stage binary
93+
shell: bash
94+
run: |
95+
mkdir -p dist
96+
cp "target/${{ matrix.target }}/release/${{ matrix.artifact_name }}" "dist/${{ matrix.asset_name }}"
97+
8298
- name: Upload artifact
8399
uses: actions/upload-artifact@v4
84100
with:
85101
name: ${{ matrix.asset_name }}
86-
path: target/release/${{ matrix.artifact_name }}
102+
path: dist/${{ matrix.asset_name }}
87103

88104
gui-build:
89105
name: GUI Build
@@ -148,3 +164,90 @@ jobs:
148164
with:
149165
name: ${{ matrix.asset_name }}
150166
path: target/release/${{ matrix.artifact_name }}
167+
168+
# Publish a GitHub Release with the CLI binaries attached and notes pulled
169+
# from the matching CHANGELOG section. Tag pushes only (skipped for manual
170+
# workflow_dispatch runs, which have no tag to release).
171+
release:
172+
name: Publish GitHub Release
173+
needs: build
174+
if: startsWith(github.ref, 'refs/tags/v')
175+
runs-on: ubuntu-latest
176+
permissions:
177+
contents: write
178+
steps:
179+
- name: Checkout code
180+
uses: actions/checkout@v4
181+
182+
- name: Download Linux binary
183+
uses: actions/download-artifact@v4
184+
with:
185+
name: tslime-linux-x86_64
186+
path: dist
187+
188+
- name: Download Windows binary
189+
uses: actions/download-artifact@v4
190+
with:
191+
name: tslime-windows-x86_64.exe
192+
path: dist
193+
194+
- name: Extract release notes from CHANGELOG
195+
shell: bash
196+
run: |
197+
version="${GITHUB_REF_NAME#v}"
198+
awk -v v="$version" '
199+
$0 ~ ("^## \\[" v "\\]") { found=1; next }
200+
found && /^## \[/ { exit }
201+
found { print }
202+
' CHANGELOG.md > RELEASE_NOTES.md
203+
if [ ! -s RELEASE_NOTES.md ]; then
204+
printf 'tslime %s\n' "$GITHUB_REF_NAME" > RELEASE_NOTES.md
205+
fi
206+
207+
- name: Create GitHub Release
208+
env:
209+
GH_TOKEN: ${{ github.token }}
210+
shell: bash
211+
run: |
212+
gh release create "$GITHUB_REF_NAME" \
213+
--repo "$GITHUB_REPOSITORY" \
214+
--title "tslime $GITHUB_REF_NAME" \
215+
--notes-file RELEASE_NOTES.md \
216+
dist/tslime-linux-x86_64 \
217+
dist/tslime-windows-x86_64.exe
218+
219+
# Publish a container image to GHCR so users can `docker run --rm -it
220+
# ghcr.io/<owner>/tslime` without installing anything. Self-contained build
221+
# (the Dockerfile compiles the static musl binary onto a scratch image). Tag
222+
# pushes only. linux/amd64; arm64 is a follow-up.
223+
docker:
224+
name: Publish Docker image
225+
needs: hygiene
226+
if: startsWith(github.ref, 'refs/tags/v')
227+
runs-on: ubuntu-latest
228+
permissions:
229+
contents: read
230+
packages: write
231+
steps:
232+
- name: Checkout code
233+
uses: actions/checkout@v4
234+
235+
- name: Log in to GitHub Container Registry
236+
uses: docker/login-action@v3
237+
with:
238+
registry: ghcr.io
239+
username: ${{ github.actor }}
240+
password: ${{ secrets.GITHUB_TOKEN }}
241+
242+
- name: Set up Docker Buildx
243+
uses: docker/setup-buildx-action@v3
244+
245+
- name: Build and push image
246+
uses: docker/build-push-action@v6
247+
with:
248+
context: .
249+
platforms: linux/amd64
250+
push: true
251+
tags: |
252+
ghcr.io/${{ github.repository }}:latest
253+
ghcr.io/${{ github.repository }}:${{ github.ref_name }}

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,7 @@ tslime_frame_*.png
2323

2424
# Git worktrees
2525
.worktrees/
26+
27+
# Nix build result symlinks
28+
result
29+
result-*

CHANGELOG.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,34 @@ All notable changes to this project will be documented in this file.
44
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/);
55
versioning follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [0.1.0] - TBD
7+
## [0.1.1] - 2026-06-26
8+
9+
Distribution and release-pipeline fixes.
10+
11+
### Changed
12+
- Linux release binary is now statically linked (musl target), so the single
13+
`tslime-linux-x86_64` download runs on any x86_64 Linux distribution
14+
regardless of glibc version.
15+
- Install documentation now leads with `cargo install` and a Homebrew tap;
16+
see the README for per-platform paths.
17+
18+
### Fixed
19+
- macOS distribution: prebuilt macOS binaries are no longer published (the
20+
previous one was Gatekeeper-blocked and mislabeled as x86_64 while actually
21+
being arm64). Install on macOS via `brew install tamirelazar/tslime/tslime`
22+
or `cargo install tslime`, both of which avoid Gatekeeper.
23+
24+
### Added
25+
- Homebrew tap `tamirelazar/homebrew-tslime` (source build).
26+
- One-paste install blocks for Linux and Windows in the README: they fetch the
27+
latest release binary, install it to a user directory, put it on `PATH`, and
28+
(on Windows) clear the Mark-of-the-Web so SmartScreen stays quiet.
29+
- Nix flake: `nix run github:tamirelazar/tslime` runs tslime ephemerally without
30+
installing; `nix build` and `nix profile install` are also supported.
31+
- Docker image on GHCR: `docker run --rm -it ghcr.io/tamirelazar/tslime` runs
32+
tslime ephemerally without installing (published on release; linux/amd64).
33+
34+
## [0.1.0] - 2026-06-26
835

936
First public release.
1037

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "tslime"
3-
version = "0.1.0"
3+
version = "0.1.1"
44
edition = "2021"
55
authors = ["tslime contributors"]
66
description = "A lightweight terminal screensaver simulating slime mold growth patterns"
@@ -12,6 +12,9 @@ license = "MIT"
1212
keywords = ["terminal", "screensaver", "slime-mold", "generative-art", "physarum"]
1313
categories = ["command-line-utilities", "visualization", "simulation"]
1414
rust-version = "1.70"
15+
# Only the explicitly declared [[example]] targets are built; this stops cargo
16+
# from auto-discovering stray local files under examples/ (e.g. dev prototypes).
17+
autoexamples = false
1518
exclude = [
1619
".github/",
1720
"assets/demos/*.gif",

Dockerfile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Self-contained build: rust:alpine targets x86_64-unknown-linux-musl by
2+
# default, so a plain release build produces a static binary that runs on an
3+
# empty `scratch` image. Final image is just the ~3.6MB binary — no OS layer.
4+
FROM rust:alpine AS build
5+
RUN apk add --no-cache musl-dev
6+
WORKDIR /src
7+
COPY . .
8+
RUN cargo build --release
9+
10+
FROM scratch
11+
COPY --from=build /src/target/release/tslime /tslime
12+
ENTRYPOINT ["/tslime"]

README.md

Lines changed: 66 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,77 @@ binary, runs on Linux, macOS, Windows, and over SSH.
1010

1111
## Install
1212

13-
From crates.io:
13+
### Any platform — cargo
1414

1515
```bash
1616
cargo install tslime
1717
```
1818

19-
From source (requires Rust 1.70 or later):
19+
Builds from source (requires Rust 1.70 or later). This is the universal path
20+
and sidesteps macOS Gatekeeper entirely.
21+
22+
### Try it without installing — Nix
23+
24+
If you have Nix with flakes, run tslime ephemerally — nothing is installed:
25+
26+
```bash
27+
nix run github:tamirelazar/tslime
28+
```
29+
30+
### Try it without installing — Docker
31+
32+
No Nix? Run the published container instead — nothing is installed on the host:
33+
34+
```bash
35+
docker run --rm -it ghcr.io/tamirelazar/tslime
36+
```
37+
38+
### macOS — Homebrew
39+
40+
```bash
41+
brew install tamirelazar/tslime/tslime
42+
```
43+
44+
### Linux — prebuilt binary
45+
46+
The Linux binary is statically linked (musl) and runs on any x86_64 distribution.
47+
Paste this to install it to `~/.local/bin`:
48+
49+
```bash
50+
mkdir -p ~/.local/bin
51+
curl -fsSL https://github.com/tamirelazar/tslime/releases/latest/download/tslime-linux-x86_64 -o ~/.local/bin/tslime
52+
chmod +x ~/.local/bin/tslime
53+
~/.local/bin/tslime --version
54+
```
55+
56+
If `tslime` isn't found afterwards, add `~/.local/bin` to your `PATH`:
57+
58+
```bash
59+
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.profile && export PATH="$HOME/.local/bin:$PATH"
60+
```
61+
62+
### Windows — prebuilt binary
63+
64+
Paste this into **PowerShell**. It downloads the binary, clears the
65+
Mark-of-the-Web so SmartScreen stays quiet, and adds it to your `PATH`:
66+
67+
```powershell
68+
$dir = "$env:LOCALAPPDATA\Programs\tslime"
69+
New-Item -ItemType Directory -Force -Path $dir | Out-Null
70+
Invoke-WebRequest "https://github.com/tamirelazar/tslime/releases/latest/download/tslime-windows-x86_64.exe" -OutFile "$dir\tslime.exe"
71+
Unblock-File "$dir\tslime.exe"
72+
$userPath = [Environment]::GetEnvironmentVariable("Path", "User")
73+
if ($userPath -notlike "*$dir*") { [Environment]::SetEnvironmentVariable("Path", "$userPath;$dir", "User") }
74+
& "$dir\tslime.exe" --version
75+
```
76+
77+
Open a new terminal afterwards so the `PATH` change takes effect (or run
78+
`$env:Path += ";$dir"` in the current one), then just run `tslime`.
79+
80+
> macOS prebuilt binaries are not published — use Homebrew or `cargo install`
81+
> (both avoid Gatekeeper). ARM Linux (aarch64): use `cargo install`.
82+
83+
### From source
2084

2185
```bash
2286
git clone https://github.com/tamirelazar/tslime.git
@@ -25,8 +89,6 @@ cargo build --release
2589
./target/release/tslime
2690
```
2791

28-
Prebuilt binaries for Linux, macOS, and Windows accompany each release.
29-
3092
## Usage
3193

3294
Run with no arguments for the interactive mode:

0 commit comments

Comments
 (0)