Skip to content

Commit 1c43829

Browse files
committed
docs: add manual macOS build guide for v0.1.1
1 parent 09859f0 commit 1c43829

1 file changed

Lines changed: 214 additions & 0 deletions

File tree

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
# Manual macOS Build for v0.1.1 Release
2+
3+
**Date:** February 4, 2026
4+
**Purpose:** Create macOS binaries for v0.1.1 release
5+
6+
---
7+
8+
## Prerequisites on Your MacBook
9+
10+
- macOS Ventura (13) or later
11+
- Xcode Command Line Tools installed
12+
- Homebrew installed
13+
- Pixi installed
14+
15+
---
16+
17+
## Step-by-Step Build Instructions
18+
19+
### 1. Clone and Setup
20+
21+
```bash
22+
# Clone the repository (or pull if you already have it)
23+
cd ~/dev-coffee/repos # or wherever you keep your projects
24+
git clone https://github.com/itsdevcoffee/mojo-audio.git
25+
cd mojo-audio
26+
27+
# Checkout the v0.1.1 tag
28+
git fetch --tags
29+
git checkout v0.1.1
30+
31+
# Install dependencies
32+
pixi install
33+
```
34+
35+
### 2. Verify Mojo Version
36+
37+
```bash
38+
# Check that you got the stable version
39+
pixi run mojo --version
40+
41+
# Should show: 0.26.1.0 (release) or similar
42+
```
43+
44+
### 3. Build the FFI Library
45+
46+
```bash
47+
# Build optimized .dylib for macOS
48+
pixi run build-ffi-optimized
49+
50+
# Verify the build
51+
ls -lh libmojo_audio.dylib
52+
file libmojo_audio.dylib
53+
54+
# Expected output should show:
55+
# - File size around 20-30KB
56+
# - Mach-O 64-bit dynamically linked shared library arm64
57+
```
58+
59+
### 4. Package for Release
60+
61+
```bash
62+
# Create release directory
63+
mkdir -p release/macos-arm64
64+
65+
# Copy files
66+
cp libmojo_audio.dylib release/macos-arm64/
67+
cp include/mojo_audio.h release/macos-arm64/
68+
69+
# Create installation instructions
70+
cat > release/macos-arm64/INSTALL.md << 'EOF'
71+
# mojo-audio FFI - macOS Apple Silicon (arm64)
72+
73+
## Installation
74+
75+
```bash
76+
sudo cp libmojo_audio.dylib /usr/local/lib/
77+
sudo cp mojo_audio.h /usr/local/include/
78+
```
79+
80+
## Verification
81+
82+
```bash
83+
ls -l /usr/local/lib/libmojo_audio.dylib
84+
ls -l /usr/local/include/mojo_audio.h
85+
```
86+
87+
## Usage
88+
89+
Link against the library when compiling:
90+
91+
```bash
92+
# C
93+
gcc -o demo demo.c -lmojo_audio
94+
95+
# Rust
96+
# Add to your build.rs or link manually
97+
```
98+
99+
## Requirements
100+
101+
- macOS Ventura (13) or later
102+
- Apple Silicon (M1/M2/M3)
103+
EOF
104+
105+
# Create tarball
106+
tar czf mojo-audio-v0.1.1-macos-arm64.tar.gz -C release/macos-arm64 .
107+
108+
# Verify tarball
109+
tar tzf mojo-audio-v0.1.1-macos-arm64.tar.gz
110+
```
111+
112+
### 5. Upload to GitHub Release
113+
114+
```bash
115+
# Option A: Using gh CLI (recommended)
116+
gh release upload v0.1.1 mojo-audio-v0.1.1-macos-arm64.tar.gz
117+
118+
# Option B: Manual upload via GitHub web interface
119+
# 1. Go to: https://github.com/itsdevcoffee/mojo-audio/releases/tag/v0.1.1
120+
# 2. Click "Edit release"
121+
# 3. Drag and drop: mojo-audio-v0.1.1-macos-arm64.tar.gz
122+
# 4. Click "Update release"
123+
```
124+
125+
---
126+
127+
## Optional: Build for Intel Macs (x86_64)
128+
129+
If you want to also build for Intel Macs, you'll need an Intel Mac or use Rosetta:
130+
131+
```bash
132+
# Note: This may not work perfectly via Rosetta, but you can try
133+
arch -x86_64 pixi run build-ffi-optimized
134+
135+
# Then package similarly:
136+
mkdir -p release/macos-x86_64
137+
cp libmojo_audio.dylib release/macos-x86_64/
138+
cp include/mojo_audio.h release/macos-x86_64/
139+
# ... (same packaging steps as above)
140+
tar czf mojo-audio-v0.1.1-macos-x86_64.tar.gz -C release/macos-x86_64 .
141+
```
142+
143+
---
144+
145+
## Troubleshooting
146+
147+
### Build fails with "unable to locate module 'types'"
148+
149+
```bash
150+
# Verify the source structure
151+
tree src/ffi/
152+
153+
# Should show:
154+
# src/ffi/
155+
# ├── __init__.mojo
156+
# ├── audio_ffi.mojo
157+
# └── types.mojo
158+
159+
# If missing, you're not on the right branch/tag
160+
git status
161+
git checkout v0.1.1
162+
```
163+
164+
### "ImmutOrigin" error
165+
166+
```bash
167+
# This means you have an old Mojo version
168+
pixi run mojo --version
169+
170+
# Should be 0.26.1.0 (release)
171+
# If not, run:
172+
pixi update mojo max
173+
```
174+
175+
### Permission denied when uploading
176+
177+
```bash
178+
# Make sure you're authenticated
179+
gh auth status
180+
181+
# If not logged in:
182+
gh auth login
183+
```
184+
185+
---
186+
187+
## Success Checklist
188+
189+
- [ ] Built `libmojo_audio.dylib` successfully
190+
- [ ] Verified file is Mach-O arm64 format
191+
- [ ] Created tarball with .dylib, .h, and INSTALL.md
192+
- [ ] Uploaded to GitHub release v0.1.1
193+
- [ ] Verified download link works
194+
195+
---
196+
197+
## Next Steps
198+
199+
After uploading:
200+
1. Update the release notes to mention macOS support
201+
2. Test the download and installation on a clean macOS system
202+
3. Announce macOS availability
203+
204+
---
205+
206+
## Future: Automated macOS Builds
207+
208+
For v0.1.2+, the GitHub Actions workflow will handle this automatically:
209+
- Updated to stable Mojo 26.1.0
210+
- macOS builds will work in CI
211+
- No manual building needed
212+
213+
This manual process is only needed for v0.1.1 since we discovered the version
214+
mismatch issue after releasing.

0 commit comments

Comments
 (0)