User story
As a coding agent implementing the Rust FFT spike (tracked in #93), I want a minimal, buildable Cargo binary crate at spike/audio-sync/, so that subsequent issues have a clean project skeleton to add code into.
Background
RFC 0001 (#90) proposes rewriting the editing pipeline in Rust. To validate that the agent-driven Rust dev loop is workable before committing, the team is running a spike: port the FFT cross-correlation algorithm from scripts/sync/AudioSyncer.js to a standalone Rust binary and verify output matches across three target machines.
This issue creates the Cargo crate skeleton only — no algorithm logic. It must be entirely isolated from the existing Next.js/Node repo: no root-level Cargo.toml workspace, no changes to package.json, no CI config. The crate lives under spike/ and can be deleted wholesale when the spike is done.
Acceptance criteria
Happy path
Given the repository is checked out on a machine with Rust toolchain installed (rustup + stable toolchain)
When cargo build --manifest-path spike/audio-sync/Cargo.toml is run
Then it exits 0 and produces a binary
Error path / edge case
Given someone runs npm install or npm run build in the repo root
When Node resolves workspace packages
Then there is no change in behaviour — the Cargo crate is invisible to the Node toolchain
Out of scope
- Any algorithm logic —
src/lib.rs and src/main.rs should be stubs only
- CI configuration or cross-compilation setup
- A root-level
Cargo.toml workspace — explicitly forbidden
Technical context
Required dependencies (add to spike/audio-sync/Cargo.toml):
Stub src/main.rs:
fn main() {
println!("audio-sync spike — not yet implemented");
}
Stub src/lib.rs: empty file (subsequent issues will add functions here).
.gitignore addition: add spike/audio-sync/target/ to the repo's root .gitignore so build artifacts are not tracked.
No workspace: spike/audio-sync/Cargo.toml must be a standalone manifest, not a member of any workspace. Do not create a spike/Cargo.toml.
Implementation details
- Create
spike/audio-sync/Cargo.toml:
[package]
name = "audio-sync"
version = "0.1.0"
edition = "2021"
[dependencies]
rustfft = "6"
hound = "3"
- Create
spike/audio-sync/src/main.rs with the stub above.
- Create
spike/audio-sync/src/lib.rs as an empty file.
- Add
spike/audio-sync/target/ to the root .gitignore.
- Run
cargo build --manifest-path spike/audio-sync/Cargo.toml and confirm it exits 0.
- Commit
spike/audio-sync/Cargo.toml, spike/audio-sync/Cargo.lock, spike/audio-sync/src/main.rs, spike/audio-sync/src/lib.rs, and the .gitignore change.
Additional test scenarios
- N/A — this issue scaffolds the project; no logic to test yet
Hard constraints
- Must not create a root-level
Cargo.toml or any workspace config
- Must not modify any file outside
spike/ except the root .gitignore
- Must use
rustfft (not a C FFT binding) — the spike's purpose is to validate pure-Rust development
Dependency issues
Independent of #94 (fixtures) — can be done in parallel.
Issues #96, #97, #98 (algorithm ports) all depend on this one.
User story
As a coding agent implementing the Rust FFT spike (tracked in #93), I want a minimal, buildable Cargo binary crate at
spike/audio-sync/, so that subsequent issues have a clean project skeleton to add code into.Background
RFC 0001 (#90) proposes rewriting the editing pipeline in Rust. To validate that the agent-driven Rust dev loop is workable before committing, the team is running a spike: port the FFT cross-correlation algorithm from
scripts/sync/AudioSyncer.jsto a standalone Rust binary and verify output matches across three target machines.This issue creates the Cargo crate skeleton only — no algorithm logic. It must be entirely isolated from the existing Next.js/Node repo: no root-level
Cargo.tomlworkspace, no changes topackage.json, no CI config. The crate lives underspike/and can be deleted wholesale when the spike is done.Acceptance criteria
Happy path
Given the repository is checked out on a machine with Rust toolchain installed (
rustup+ stable toolchain)When
cargo build --manifest-path spike/audio-sync/Cargo.tomlis runThen it exits 0 and produces a binary
Error path / edge case
Given someone runs
npm installornpm run buildin the repo rootWhen Node resolves workspace packages
Then there is no change in behaviour — the Cargo crate is invisible to the Node toolchain
Out of scope
src/lib.rsandsrc/main.rsshould be stubs onlyCargo.tomlworkspace — explicitly forbiddenTechnical context
Required dependencies (add to
spike/audio-sync/Cargo.toml):rustfft = "6"— pure-Rust FFT, no native deps, deterministic across platforms. This is the only FFT crate permitted for this spike (hard constraint from spike(rust): port AudioSyncer FFT correlation to Rust to validate agent-driven dev loop #93).hound = "3"— WAV file reader/writer in pure Rust.Stub
src/main.rs:Stub
src/lib.rs: empty file (subsequent issues will add functions here)..gitignoreaddition: addspike/audio-sync/target/to the repo's root.gitignoreso build artifacts are not tracked.No workspace:
spike/audio-sync/Cargo.tomlmust be a standalone manifest, not a member of any workspace. Do not create aspike/Cargo.toml.Implementation details
spike/audio-sync/Cargo.toml:spike/audio-sync/src/main.rswith the stub above.spike/audio-sync/src/lib.rsas an empty file.spike/audio-sync/target/to the root.gitignore.cargo build --manifest-path spike/audio-sync/Cargo.tomland confirm it exits 0.spike/audio-sync/Cargo.toml,spike/audio-sync/Cargo.lock,spike/audio-sync/src/main.rs,spike/audio-sync/src/lib.rs, and the.gitignorechange.Additional test scenarios
Hard constraints
Cargo.tomlor any workspace configspike/except the root.gitignorerustfft(not a C FFT binding) — the spike's purpose is to validate pure-Rust developmentDependency issues
Independent of #94 (fixtures) — can be done in parallel.
Issues #96, #97, #98 (algorithm ports) all depend on this one.