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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,6 @@ scripts/diarize/__pycache__/

# Editor
.vscode/settings.json

# Rust spike build artifacts
spike/audio-sync/target/
49 changes: 49 additions & 0 deletions docs/implementation-guides/issue-95-rust-scaffold.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Issue #95 — spike(rust/scaffold): create spike/audio-sync Cargo binary crate

## Goal

Create a minimal, buildable Cargo binary crate at `spike/audio-sync/` as a clean skeleton for subsequent Rust spike issues (#96, #97, #98). No algorithm logic — stubs only.

## Steps

### Step 1 — Create Cargo.toml

Create `spike/audio-sync/Cargo.toml` as a standalone manifest (no workspace).

**Status check:** `test -f spike/audio-sync/Cargo.toml`

### Step 2 — Create src/main.rs and src/lib.rs stubs

Create `spike/audio-sync/src/main.rs` with stub `main()` and `spike/audio-sync/src/lib.rs` as an empty file.

**Status check:** `test -f spike/audio-sync/src/main.rs && test -f spike/audio-sync/src/lib.rs`

### Step 3 — Add spike/audio-sync/target/ to .gitignore

Append `spike/audio-sync/target/` to the root `.gitignore` so build artifacts are not tracked.

**Status check:** `grep -q 'spike/audio-sync/target/' .gitignore`

### Step 4 — Add spike/audio-sync/README.md

Create setup and usage instructions for peers who need to install Rust.

**Status check:** `test -f spike/audio-sync/README.md`

### Step 5 — Verify build

Run `cargo build --manifest-path spike/audio-sync/Cargo.toml` and confirm exit 0.

**Status check:** `cargo build --manifest-path spike/audio-sync/Cargo.toml && echo OK`

### Step 6 — Commit

Commit `Cargo.toml`, `Cargo.lock`, `src/main.rs`, `src/lib.rs`, `README.md`, and `.gitignore` change.

**Status check:** `git log --oneline -1 | grep -q 'spike(rust/scaffold)'`

## Out of scope

- Any algorithm logic
- Root-level `Cargo.toml` workspace
- CI configuration
89 changes: 89 additions & 0 deletions spike/audio-sync/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 8 additions & 0 deletions spike/audio-sync/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "audio-sync"
version = "0.1.0"
edition = "2021"

[dependencies]
rustfft = "6"
hound = "3"
61 changes: 61 additions & 0 deletions spike/audio-sync/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
# audio-sync spike

Standalone Rust binary for FFT cross-correlation sync. Part of the RFC 0001 Rust rewrite spike (see [issue #93](https://github.com/ragTechDev/deckcreate/issues/93)).

> **Temporary** — this crate lives under `spike/` and will be deleted when the spike concludes.

## Prerequisites

Rust stable toolchain via `rustup`:

```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Then restart your shell (or run `source "$HOME/.cargo/env"`), and verify:

```bash
rustc --version # e.g. rustc 1.79.0
cargo --version
```

No other dependencies — `rustfft` and `hound` are pure Rust and compile without any system libraries.

## Build

From the repo root:

```bash
cargo build --manifest-path spike/audio-sync/Cargo.toml
```

Or from inside the crate:

```bash
cd spike/audio-sync
cargo build
```

## Run

```bash
cargo run --manifest-path spike/audio-sync/Cargo.toml
# → audio-sync spike — not yet implemented
```

## Dependencies

| Crate | Version | Purpose |
|-------|---------|---------|
| `rustfft` | 6 | Pure-Rust FFT (no native deps, deterministic across platforms) |
| `hound` | 3 | WAV file reader/writer |

## Fixtures

Test WAV files are in `fixtures/`:

| File | Description |
|------|-------------|
| `fixtures/audio-track.wav` | Isolated audio track |
| `fixtures/video-audio.wav` | Audio extracted from video |
| `fixtures/baseline.json` | JS baseline offset for cross-validation |
Empty file added spike/audio-sync/src/lib.rs
Empty file.
3 changes: 3 additions & 0 deletions spike/audio-sync/src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fn main() {
println!("audio-sync spike — not yet implemented");
}
Loading