Skip to content

Commit ddfafb1

Browse files
committed
No more Node, just Rust.
1 parent b8adda1 commit ddfafb1

31 files changed

Lines changed: 434 additions & 1342 deletions

.cargo/config.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,8 @@ build-config = "build --release --bin config"
33
build-package = "build --release --bin package"
44
build-run = "build --release --bin run"
55
build-tools = "build --release --bin config --bin package --bin run"
6+
7+
[net]
8+
# Use the git CLI (and its credential helper, configured via `gh auth login`)
9+
# to fetch git dependencies — this is to access the private repo.
10+
git-fetch-with-cli = true

.github/workflows/downloadable_binaries.yml

Lines changed: 3 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ permissions:
3434

3535
jobs:
3636
# Builds the plain terminal binary on all
37-
# four target platforms. build_terminal.js has no --target flag, so
38-
# this can only cross four OS *runners*, not cross-compile from one.
37+
# four target platforms. The package tool builds natively on each
38+
# runner OS, so this crosses four OS *runners*, not cross-compiles.
3939
build-terminal:
4040
if: ${{ github.event_name != 'workflow_dispatch' || inputs.terminal }}
4141
name: Build Terminal Binary (${{ matrix.name }})
@@ -71,17 +71,6 @@ jobs:
7171
- name: Install Rust
7272
uses: dtolnay/rust-toolchain@stable
7373

74-
- name: Setup pnpm
75-
uses: pnpm/action-setup@v6
76-
77-
- name: Setup Node
78-
uses: actions/setup-node@v6
79-
with:
80-
cache: pnpm
81-
82-
- name: Install dependencies
83-
run: pnpm install
84-
8574
# Build the Rust package tool first, then use it for all subsequent builds.
8675
- name: Build tools
8776
shell: bash
@@ -147,7 +136,7 @@ jobs:
147136
path: "*-terminal-${{ matrix.name }}.zip"
148137

149138
# Builds the macOS-native binary (built with the
150-
# macos-native feature) and wraps it into a .app + .dmg via bundle.js.
139+
# macos-native feature) and wraps it into a .app + .dmg.
151140
build-macos-native:
152141
if: ${{ github.event_name != 'workflow_dispatch' || inputs.macos }}
153142
name: Build macOS Native (${{ matrix.name }})
@@ -179,23 +168,6 @@ jobs:
179168
- name: Install Rust
180169
uses: dtolnay/rust-toolchain@stable
181170

182-
- name: Setup pnpm
183-
uses: pnpm/action-setup@v6
184-
185-
- name: Setup Node
186-
uses: actions/setup-node@v6
187-
with:
188-
cache: pnpm
189-
190-
# librsvg provides rsvg-convert, used by bundle.js to render the app
191-
# icon at multiple sizes for the .icns file. sips/iconutil/hdiutil
192-
# are built into macOS, no install needed.
193-
- name: Install macOS bundling deps
194-
run: brew install librsvg
195-
196-
- name: Install dependencies
197-
run: pnpm install
198-
199171
# Build the Rust package tool first, then use it for all subsequent builds.
200172
- name: Build tools
201173
shell: bash
@@ -262,17 +234,6 @@ jobs:
262234
- name: Install Rust
263235
uses: dtolnay/rust-toolchain@stable
264236

265-
- name: Setup pnpm
266-
uses: pnpm/action-setup@v6
267-
268-
- name: Setup Node
269-
uses: actions/setup-node@v6
270-
with:
271-
cache: pnpm
272-
273-
- name: Install dependencies
274-
run: pnpm install
275-
276237
# Build the Rust package tool first, then use it for all subsequent builds.
277238
- name: Build tools
278239
shell: bash

.github/workflows/github_pages.yml

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,9 @@ jobs:
7272
run: |
7373
git config --global url."https://${{ secrets.INCREDIBLE_ALPHA }}@github.com/".insteadOf "https://github.com/"
7474
75-
# Installs the pnpm CLI on the runner (pnpm isn't preinstalled like npm is).
76-
# Needed before any `pnpm install` / `pnpm run` calls below.
77-
- name: Setup pnpm
78-
uses: pnpm/action-setup@v6
79-
8075
# Prepares the runner for a GitHub Pages deployment (sets up Pages-specific
81-
# env/config) and ensures Node.js is available. This does NOT install project
82-
# dependencies — that's the separate "Install dependencies" step below.
83-
- name: Setup Pages & Node
76+
# env/config).
77+
- name: Setup Pages
8478
uses: actions/configure-pages@v6
8579

8680
# wasm-pack compiles Rust -> WebAssembly and packages it for JS consumption.
@@ -89,11 +83,6 @@ jobs:
8983
- name: Install wasm-pack
9084
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
9185

92-
# Installs JS dependencies declared in package.json (via pnpm-lock.yaml).
93-
# Required before running any pnpm scripts, including build:wasm below.
94-
- name: Install dependencies
95-
run: pnpm install
96-
9786
# Build the Rust package tool, then use it for the WASM build.
9887
- name: Build tools
9988
shell: bash

.gitignore

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,3 @@ Cargo.lock
3838
/package.exe
3939
/run.exe
4040

41-
# JavaScript / pnpm workspace
42-
**/node_modules
43-
pnpm-debug.log*
44-
.pnpm-store*

markdowns/DEVELOPMENT.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,30 @@ This project builds and packages for four platforms from a single codebase: **Te
44

55
**Build the tools** (from the repo root):
66

7+
Build all three tools (config, package, run):
8+
79
```bash
810
cargo build-tools
9-
tools/copy.js
1011
```
1112

12-
This builds all three tools (config, package, run) and copies the binaries to the project root.
13+
Then copy the freshly built binaries to the project root:
14+
15+
**macOS:**
16+
17+
```bash
18+
cp target/release/config target/release/package target/release/run .
19+
chmod +x config package run
20+
```
21+
22+
**Windows (PowerShell):**
23+
24+
```powershell
25+
copy target\release\config.exe .
26+
copy target\release\package.exe .
27+
copy target\release\run.exe .
28+
```
29+
30+
The tools are then executed from the project root (`./config`, `./package`, `./run` on macOS; `config.exe`, `package.exe`, `run.exe` on Windows).
1331

1432
**Configure the app:**
1533

markdowns/DEVELOPMENT_PREREQUISITES.md

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,14 @@ This document outlines the system requirements and installation steps needed to
88
* Cargo
99
* Incredible
1010
* WebAssembly
11-
* Pnpm
12-
* Vite
1311
* macOS AppKit (via objc2)
1412
* Windows API (via windows-rs)
1513

1614
## GitHub Authentication
1715

1816
This project depends on the private [incredible-alpha](https://github.com/ronilan/incredible-alpha) crate, pulled by Cargo as a git dependency over HTTPS. The first build (`cargo build-tools`) will fail until your machine can read that repo.
1917

20-
The easiest way to authenticate is the GitHub CLI:
18+
The easiest way to authenticate is the [GitHub CLI](https://cli.github.com/) — download and install it from [cli.github.com](https://cli.github.com/) if you don't have it already:
2119

2220
```bash
2321
gh auth login
@@ -29,36 +27,21 @@ Alternatively, create a fine-grained Personal Access Token with read access to `
2927

3028
## macOS
3129

32-
1. **Install Rust** - In Terminal, run the command from [rustup.rs](https://rustup.rs/):
33-
```bash
34-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
35-
```
36-
2. **Install Xcode Command Line Tools**:
30+
1. **Install Xcode Command Line Tools**:
3731
```bash
3832
xcode-select --install
3933
```
40-
3. **Enable pnpm**:
41-
```bash
42-
corepack enable
43-
```
44-
4. **Install wasm-pack**:
34+
2. **Install Rust** - Download and run the installer from [rustup.rs](https://rustup.rs/)
35+
3. **Install wasm-pack**:
4536
```bash
4637
cargo install wasm-pack
4738
```
48-
5. **Install librsvg** (for macOS app icon generation):
49-
```bash
50-
brew install librsvg
51-
```
5239

5340
## Windows
5441

5542
1. **Install Rust** - Download and run [rustup-init.exe](https://rustup.rs/) from [rustup.rs](https://rustup.rs/)
56-
2. **Enable pnpm** - Open PowerShell and run:
57-
```powershell
58-
corepack enable
59-
```
60-
3. **Install wasm-pack** - In PowerShell:
43+
2. **Install wasm-pack** - In PowerShell:
6144
```powershell
6245
cargo install wasm-pack
6346
```
64-
4. **Install Visual Studio Build Tools** - Download from [visualstudio.microsoft.com](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022). In the installer, select the **"Desktop development with C++"** workload. This is required to compile the `sharp` native image module and provides the Windows SDK.
47+
3. **Install Visual Studio Build Tools** - Download from [visualstudio.microsoft.com](https://visualstudio.microsoft.com/downloads/#build-tools-for-visual-studio-2022). In the installer, select the **"Desktop development with C++"** workload. This provides the Windows SDK and is required to build the native Windows binary.

package.json

Lines changed: 0 additions & 20 deletions
This file was deleted.

0 commit comments

Comments
 (0)