diff --git a/Cargo.toml b/Cargo.toml index 6a520e8..23d63b6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,17 @@ -# cargo-features = ["codegen-backend"] - [workspace] -members = [ "tui", "sound" , "fader_master", "midi"] +members = ["fader_master", "midi", "sound", "tui"] resolver = "3" [workspace.package] version = "0.1.0" edition = "2024" +rust-version = "1.88" +license = "MIT" +repository = "https://git.dandaedre.com/MadGobblins/fader_master" +publish = false -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html +[workspace.dependencies] +ratatui = { version = "0.29.0", features = ["all-widgets", "serde"] } [profile.dev] debug = true diff --git a/Jenkinsfile b/Jenkinsfile index 805615d..f5d4648 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -22,6 +22,7 @@ pipeline { BADGE_PUBLICATION_ROOT = '/mnt/assets/coverage' COVERAGE_MIN_LINES = '20' CARGO_LLVM_COV_VERSION = '0.9.1' + RUSTUP_TOOLCHAIN = '1.88.0' } stages { @@ -51,12 +52,11 @@ pipeline { exit 1 fi - rustup toolchain install stable \ + rustup toolchain install "${RUSTUP_TOOLCHAIN}" \ --profile minimal \ --component rustfmt \ --component clippy \ --component llvm-tools-preview - rustup default stable if ! cargo llvm-cov --version 2>/dev/null \ | grep -F "cargo-llvm-cov ${CARGO_LLVM_COV_VERSION}" >/dev/null; then diff --git a/README.md b/README.md index 6bb6da3..60fc030 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ planned in the following documents: - [Architecture and library research](architecture.md) - [Implementation tasks and acceptance tests](task.md) - [Project-agent instructions and test/commit workflow](AGENTS.md) +- [Build prerequisites and MSRV](docs/build.md) - [CI coverage and badge lifecycle](docs/ci-coverage.md) # References diff --git a/docs/build.md b/docs/build.md new file mode 100644 index 0000000..7fa9c8e --- /dev/null +++ b/docs/build.md @@ -0,0 +1,39 @@ +# Build prerequisites + +`fader_master` targets Linux and uses Rust 2024. Rust 1.88.0 is the selected +minimum supported Rust version (MSRV) and the repository-pinned development +toolchain. `rustup` reads `rust-toolchain.toml` and installs the required +`rustfmt`, Clippy, and LLVM tools components. + +The current scaffold needs a C compiler and linker for transitive Rust system +crates, but it does not yet link to an audio daemon or MIDI library. On a +Debian-family Linux system, the foundation prerequisites are: + +```sh +sudo apt-get install build-essential pkg-config +rustup toolchain install 1.88.0 \ + --profile minimal \ + --component rustfmt \ + --component clippy \ + --component llvm-tools-preview +``` + +Future PulseAudio, PipeWire, ALSA, MIDI, and udev adapters will add native +development packages. Their exact package names and feature-specific build +commands must be documented when those adapters are introduced; the scaffold +does not claim those dependencies yet. + +From a fresh checkout, use the tracked lockfile for reproducible resolution: + +```sh +cargo build --workspace --locked +cargo test --workspace --all-targets --all-features --locked +``` + +Verify the MSRV explicitly without allowing `rust-toolchain.toml` to select a +newer installed toolchain: + +```sh +cargo +1.88.0 check --workspace --all-targets --all-features --locked +cargo +1.88.0 test --workspace --all-targets --all-features --locked +``` diff --git a/fader_master/Cargo.toml b/fader_master/Cargo.toml index ce6d5ab..0beace4 100644 --- a/fader_master/Cargo.toml +++ b/fader_master/Cargo.toml @@ -2,5 +2,9 @@ name = "fader_master" version.workspace = true edition.workspace = true +rust-version.workspace = true +license.workspace = true +repository.workspace = true +publish.workspace = true [dependencies] diff --git a/midi/Cargo.toml b/midi/Cargo.toml index def58a0..4a830c7 100644 --- a/midi/Cargo.toml +++ b/midi/Cargo.toml @@ -2,5 +2,9 @@ name = "midi" version.workspace = true edition.workspace = true +rust-version.workspace = true +license.workspace = true +repository.workspace = true +publish.workspace = true [dependencies] diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100644 index 0000000..68d4dab --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "1.88.0" +profile = "minimal" +components = ["clippy", "llvm-tools-preview", "rustfmt"] diff --git a/sound/Cargo.toml b/sound/Cargo.toml index 921a911..d54ac4e 100644 --- a/sound/Cargo.toml +++ b/sound/Cargo.toml @@ -1,6 +1,10 @@ [package] name = "volume_lib" -version = "0.1.0" -edition = "2024" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +repository.workspace = true +publish.workspace = true [dependencies] diff --git a/task.md b/task.md index 4bff424..b6973bb 100644 --- a/task.md +++ b/task.md @@ -17,7 +17,7 @@ Baseline test attempt on 2026-10-05: `cargo test --workspace --all-targets --off Dependencies: planning. -- [ ] **M0.1 Toolchain and build:** select/test an MSRV and pinned toolchain, centralize workspace metadata/dependencies, track Cargo.lock for the executable, document native build prerequisites. Acceptance: a fresh supported Linux checkout builds and tests reproducibly with `--locked`; the chosen MSRV builds the chosen dependency set. +- [x] **M0.1 Toolchain and build:** select/test an MSRV and pinned toolchain, centralize workspace metadata/dependencies, track Cargo.lock for the executable, document native build prerequisites. Acceptance: a fresh supported Linux checkout builds and tests reproducibly with `--locked`; the chosen MSRV builds the chosen dependency set. - [ ] **M0.2 CI gates:** align Jenkins with AGENTS.md, including doctests, Clippy `-D warnings`, release build and later backend feature matrix. Acceptance: representative formatting/lint/test failures fail the pipeline; default and full-feature builds pass with provisioned dependencies. - [x] **M0.2a Coverage badges:** measure locked all-target line coverage with a pinned tool, enforce the documented 20% scaffold floor, and generate/archive the version, test, and coverage badges on every build. Publish atomically only from `main`, with fresh-build markers preventing stale test or coverage values. Acceptance: renderer, coverage lifecycle, finalization, and publication fixture tests pass; the real local measurement is above the floor. Jenkins publication and public retrieval remain deployment checks. - [ ] **M0.3 Domain boundary:** add `fader-core` and `fader-config`, wire current crates inward, remove placeholder arithmetic tests as real contracts replace them. Acceptance: core tests run without a terminal, sound daemon, native device connection, or Tokio runtime; dependency graph has no cycles. diff --git a/tui/Cargo.toml b/tui/Cargo.toml index 4ea315d..9b61c45 100644 --- a/tui/Cargo.toml +++ b/tui/Cargo.toml @@ -1,7 +1,11 @@ [package] name = "tui" -version = "0.1.0" -edition = "2024" +version.workspace = true +edition.workspace = true +rust-version.workspace = true +license.workspace = true +repository.workspace = true +publish.workspace = true [dependencies] -ratatui = { version = "0.29.0", features = ["all-widgets", "serde"] } +ratatui.workspace = true